Captured Khans now automate properly

This commit is contained in:
Yair Morgenstern 2020-02-12 20:34:32 +02:00
parent d9d6f4eeb8
commit 3402065e3c
2 changed files with 3 additions and 2 deletions

View file

@ -447,7 +447,8 @@ class NextTurnAutomation{
when {
unit.type.isRanged() -> rangedUnits.add(unit)
unit.type.isMelee() -> meleeUnits.add(unit)
unit.name == civInfo.getEquivalentUnit(Constants.greatGeneral).name -> generals.add(unit) //generals move after military units
unit.name == Constants.greatGeneral || unit.baseUnit.replaces == Constants.greatGeneral
-> generals.add(unit) //generals move after military units
else -> civilianUnits.add(unit)
}
}

View file

@ -44,7 +44,7 @@ class UnitAutomation {
return SpecificUnitAutomation().automateWorkBoats(unit)
}
if (unit.name == unit.civInfo.getEquivalentUnit(Constants.greatGeneral).name)
if (unit.name == Constants.greatGeneral || unit.baseUnit.replaces == Constants.greatGeneral)
return SpecificUnitAutomation().automateGreatGeneral(unit)
if (unit.type == UnitType.Fighter)