{ Concentrates on fighting in Europe } const LAND = 0; const AIR = 1; const SEA = 2; NbrZones := GetZoneCount(); NbrUnits := GetUnitCount(); CurrentPlayer := GetCurrentPlayer(); Version( 4.0 ); UK := -1; Germany := -1; France := -1; Italy := -1; For i := 0 to getnationcount() - 1 do begin name := getnationname(i); If name = 'Germany' then Germany := i; If name = 'United Kingdom' then UK := i; If name = 'Italy' then Italy := i; If name = 'France' then France := i; end; If (getnationdiplomaticactions(CurrentPlayer) > 0) then If (isnationactive(UK)) AND (getnationstance(CurrentPlayer, UK) < 100) AND (getnationstance(CurrentPlayer, UK) > -100) then orderdiplomatic(UK, 3) else if (isnationactive(France)) AND (getnationstance(CurrentPlayer, France) < 100) AND (getnationstance(CurrentPlayer, France) > -100) then orderdiplomatic(France, 3) else If isnationactive(Germany) then orderdiplomatic(Germany,1); MyCap := FindZoneName( 'Northeastern USA' ); tNormandy := FindZoneName('Normandy'); tGermany := FindZoneName('Germany'); tItaly := FindZoneName('Southern Italy'); For i := 0 to getzoneneighborcount(tItaly) - 1 do If (NOT isZoneland(getzoneneighbor(tItaly, i))) then SeaZone := getzoneneighbor(tItaly, i); For i := 0 to NbrZones - 1 do If (getzoneowner(i) = CurrentPlayer) AND (isZoneport(i)) then begin orderGlobalRouteresources(i, 20); orderautorouteresources(i, MyCap); end; OrderGlobalRouteresources(MyCap, 20); if (getzoneresources(MyCap) > 60) AND (getzonefactories(MyCap) < getzonevalue(MyCap)) then orderbuildfactory(MyCap); transports := 0; for i := 0 to NbrUnits - 1 do If (getunitclass(i) = SEA) AND (getunitowner(i) = CurrentPlayer) then transports := transports + getunittransportroom(i); for i := 0 to getzoneunitcount(MyCap) - 1 do transports := transports - getunittransportweight(getzoneunit(MyCap, i)); tb := (0 - transports) div 2; If getzoneresources(MyCap) div 4 < tb then tb := getzoneresources(MyCap) div 4; if tb = 0 then tb := 1; Troops := getzoneresources(MyCap) div 2; If transports < 0 then orderbuildnavy(MyCap, 0, tb, 0, 0, 0, 0, 0) else orderbuildarmy(MyCap, Troops, 0, 0, 0); SetArray(Unit, NbrZones); For i := 0 to NbrZones - 1 do Unit[i] := -1; Artillery := 0; If iszonevisible(SeaZone) then For i := 0 to Getzoneunitcount(SeaZone) - 1 do begin tunit := getzoneunit(SeaZone, i); Artillery := Artillery + getunitforcecounttype(tunit, 1); end; Attack := Artillery >= 25; If Attack then Attack := isnationactive(Italy); for i := 0 to NbrUnits - 1 do begin if ( GetUnitOwner( i ) = CurrentPlayer ) then begin uc := GetUnitClass( i ); nCode := GetUnitID( i ); sCode := IntToStr( nCode ); uZone := getunitzone(i); if ( uc = LAND ) then begin if Unit[uZone] = -1 then Unit[uZone] := i else OrderUnitMerge( Unit[uZone], i ); If distance(findzonename('Midwestern USA'), uZone) <= 685 then begin orderunitmove(i, MyCap) end else if (isnationactive(Italy)) AND (uZone = tItaly) then begin end else begin nTarget := FindClosestEnemyZone( GetUnitZone( i ), 20 ); if ( nTarget >= 0 ) then begin if IsZoneNeighbor( GetUnitZone( i ), nTarget ) then OrderUnitInvade( i, nTarget ) else OrderUnitMove( i, nTarget ); end; end; end else if ( uc = AIR ) then begin if GetZoneOwner( GetUnitZone( i ) ) <> CurrentPlayer then begin if GetZoneForceCount( GetUnitZone( i ), false, true, true, true, true, true ) = 0 then OrderUnitReturnToBase( i ); end else begin If getunitorder(i) <> 0 then begin orderunitreturntobase(i); end else begin If distance(findzonename('Midwestern USA'), uZone) < distance(uZone, findzonename('England')) then begin If isnationalliedwith(UK, CurrentPlayer) then orderunitrebase(i, findzonename('England')) else orderunitrebase(i, MyCap); end else begin nTarget := FindClosestEnemyZone( GetUnitZone( i ), 20 ); If nTarget <> -1 then If (getunitrange(i) >= truedistance(nTarget, uZone)) AND (ntarget <> -1) then orderunitairstrike(i, nTarget) else orderunitrebase(i, UK); end; end; end end else if ( uc = SEA ) then begin orderunitlaunch(i); If getunitforcecounttype(i, 9) > 0 then begin If getunitboardedcount(i) > 0 then begin if (isnationactive(Italy)) then begin If (uZone = SeaZone) AND (Attack) then orderunitdisembarkall(i , tItaly) else if uZone <> SeaZone then orderunitmove(i, SeaZone); end else begin If iszoneneighbor(uZone, tNormandy) then orderunitdisembarkall(i, tNormandy) else For j := 0 to getzoneneighborcount(tNormandy) - 1 do If NOT iszoneland(getzoneneighbor(tNormandy, j)) then orderunitmove(i, getzoneneighbor(tNormandy, j)); end; end else begin If iszoneneighbor(uZone, MyCap) then begin orderunitembarkall(i, MyCap) end else begin ezone := -1; dist := 999999; for j := 0 to getzoneneighborcount(MyCap) - 1 do begin tzone := getzoneneighbor(MyCap, j); ndist := distance(tzone, uzone); If (NOT iszoneland(tzone)) AND (ndist < dist) then begin ezone := tzone; dist := ndist; end; end; orderunitmove(i, ezone); end; end; end; end else begin If getunitforcecounttype(i, 0) = 0 then begin japan := findzonename('Japan'); If japan <> -1 then orderunitbombard(i, japan); end; end; end; end;