AI War:AI Wave Size Calculations
Documentation: AI Type Factors that affect wave size
(in development)
Grouped By Wave Multiplyer
case AIType.NeinzulYoungster:
case AIType.Mad_Bomber:
case AIType.Vicious_Raider:
case AIType.Technologist_Raider:
case AIType.Attritioner:
case AIType.ZenithDescendant:
case AIType.StarfleetCommander:
case AIType.Experimentalist:
case AIType.GravDriller:
case AIType.The_Tank:
case AIType.The_Core:
case AIType.Feeding_Parasite:
case AIType.Technologist_Parasite:
case AIType.Bully:
case AIType.Assassin:
case AIType.SpeedRacer:
Actual Code
from this post http://www.arcengames.com/forums/index.php/topic,7636.msg63734.html#msg63734
[quote author=x4000 link=topic=7636.msg63734#msg63734 date=1289923913]
[code]
public static int AdjustNumberShipsFromAIType( AIPlayer player, AIPlanet planet, int NumberOfShips, bool IsForReinforcement ) { FInt multiplier = Mat.One; bool isCore = planet.IsCoreAIPlanet || planet.IsHomePlanet; if ( planet.ControllingPlayer < Configuration.FIRST_AI_PLAYER_INDEX ) isCore = false; switch ( player.AIType ) { case AIType.NeinzulYoungster: if ( IsForReinforcement ) multiplier = FInt.FromParts( 0, 250 ); else multiplier = FInt.FromParts( 1, 500 ); break; case AIType.Mad_Bomber: if ( IsForReinforcement ) { if ( !isCore ) return 1; //only gets one ship per non-core reinforcement else multiplier = FInt.FromParts( 0, 250 ); } else multiplier = FInt.FromParts( 2, 0 ); break; case AIType.Vicious_Raider: case AIType.Technologist_Raider: if ( IsForReinforcement ) multiplier = FInt.FromParts( 0, 300 ); else multiplier = FInt.FromParts( 1, 500 ); break; case AIType.Attritioner: case AIType.ZenithDescendant: case AIType.StarfleetCommander: case AIType.Experimentalist: case AIType.GravDriller: if ( IsForReinforcement ) multiplier = FInt.FromParts( 0, 400 ); else multiplier = FInt.FromParts( 1, 250 ); break; case AIType.The_Tank: case AIType.The_Core: if ( IsForReinforcement ) multiplier = FInt.FromParts( 0, 300 ); else multiplier = FInt.FromParts( 0, 500 ); break; case AIType.Feeding_Parasite: case AIType.Technologist_Parasite: case AIType.Bully: case AIType.Assassin: case AIType.SpeedRacer: if ( !IsForReinforcement ) multiplier = FInt.FromParts( 1, 250 ); break; } int numberOfShips = ( NumberOfShips * multiplier * AILoop.Instance.UnitCapScale.AIShipCountScale ).IntValue; if ( numberOfShips < 1 ) return 1; else return numberOfShips; }
[/code] [/quote]