UnitAutomation
object UnitAutomation
Content copied to clipboard
Functions
automatedExplore
Link copied to clipboard
This is what a unit with the 'explore' action does. It also explores, but also has other functions, like healing if necessary.
automateUnitMoves
Link copied to clipboard
chooseBombardTarget
Link copied to clipboard
containsEnemyMilitaryUnit
Link copied to clipboard
private fun containsEnemyMilitaryUnit(unit: MapUnit, tileInfo: TileInfo): Boolean
Content copied to clipboard
countDistanceToClosestEnemy
Link copied to clipboard
private fun countDistanceToClosestEnemy(unit: MapUnit, tile: TileInfo): Int
Content copied to clipboard
getBombardTargets
Link copied to clipboard
headTowardsEnemyCity
Link copied to clipboard
private fun headTowardsEnemyCity(unit: MapUnit, closestReachableEnemyCity: TileInfo): Boolean
Content copied to clipboard
isGoodTileForFogBusting
Link copied to clipboard
private fun isGoodTileForFogBusting(unit: MapUnit, tile: TileInfo): Boolean
Content copied to clipboard
isGoodTileToExplore
Link copied to clipboard
tryAccompanySettlerOrGreatPerson
Link copied to clipboard
tryAdvanceTowardsCloseEnemy
Link copied to clipboard
Move towards the closest attackable enemy of the unit.
tryBombardEnemy
Link copied to clipboard
tryEnterOwnClosestCity
Link copied to clipboard
tryExplore
Link copied to clipboard
tryFogBust
Link copied to clipboard
tryGarrisoningUnit
Link copied to clipboard
tryGoToRuinAndEncampment
Link copied to clipboard
tryHeadTowardsEncampment
Link copied to clipboard
tryHeadTowardsEnemyCity
Link copied to clipboard
tryHeadTowardsSiegedCity
Link copied to clipboard
tryHealUnit
Link copied to clipboard
tryPillageImprovement
Link copied to clipboard
tryRunAwayIfNeccessary
Link copied to clipboard
Returns whether the civilian spends its turn hiding and not moving
tryTakeBackCapturedCity
Link copied to clipboard
tryUpgradeUnit
Link copied to clipboard
Properties
CLOSE_ENEMY_TILES_AWAY_LIMIT
Link copied to clipboard
CLOSE_ENEMY_TURNS_AWAY_LIMIT
Link copied to clipboard
Sources
jvm source
Link copied to clipboard