//-- TBK07 --//
//By Strangelove
//v2.2
//30.12.2019


{$I improvestaticai.script}
{$I transformunits.script}
{$I difficulty.script}

{$DEFINE DEBUG} //Enable extended Debug
//{$UNDEF DEBUG}


procedure OnMissionStart();
begin
	//Define Modifiers [Easy3, Easy2, Easy1, Normal, Hard1, Hard2, Hard3]
	EquipRateMod := [3, 2, 1.5, 1, 0.66, 0.5, 0.33]; //Schools are usually the limiting factor
	RecruitDelayMod := [1, 1, 1, 1, 1, 1, 1];
	RecruitLimitMod := [1, 1, 1, 1, 1.33, 1.66, 2];
	WorkerLimitMod := [1, 1, 1, 1, 1.33, 1.66, 2];
	
end;


procedure OnTick();
begin
	if States.GameTime = (MAX_HANDS +1) then
		case States.MissionDifficulty() of
			mdEasy1:
			begin
				RemoveDefencePositionAndGroup(2, 108, 58); //Melee
				RemoveDefencePositionAndGroup(2, 115, 60);
			end;
			mdHard1: //Add additional Units for defence
			begin
				AddDefencePositionAndGroup(4, 16, 55, 45, 6, 32); //Swordies
				AddDefencePositionAndGroup(4, 16, 80, 50, 2, 32);
				AddDefencePositionAndGroup(4, 16, 96, 18, 4, 32);
				AddDefencePositionAndGroup(4, 20, 85, 25, 2, 32); //Pikes
				AddDefencePositionAndGroup(4, 20, 66, 50, 6, 32);
				AddDefencePositionAndGroup(3, 22, 110, 10, 4, 32); //Knights
			end;
		end;
		
	if States.GameTime() = 450 then
	begin
		Actions.ShowMsgGoto(-1, 60, 69, '<$0>');
		Actions.FogRevealCircle(0, 60, 69, 15);
	end;
end;