mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 02:42:16 -04:00
When a unit takes over a city, it now gets moved to that city
This commit is contained in:
parent
453e25ffe7
commit
7ff81ac901
@ -109,15 +109,15 @@ class Battle(val gameInfo:GameInfo) {
|
||||
}
|
||||
|
||||
|
||||
if (defender.isDefeated() && attacker.getCombatantType() == CombatantType.Melee)
|
||||
(attacker as MapUnitCombatant).unit.moveToTile(attackedTile)
|
||||
|
||||
if(defender.isDefeated()
|
||||
&& defender.getCombatantType() == CombatantType.City
|
||||
&& attacker.getCombatantType() == CombatantType.Melee){
|
||||
conquerCity((defender as CityCombatant).city, attacker)
|
||||
}
|
||||
|
||||
if (defender.isDefeated() && attacker.getCombatantType() == CombatantType.Melee)
|
||||
(attacker as MapUnitCombatant).unit.moveToTile(attackedTile)
|
||||
|
||||
if(attacker is MapUnitCombatant) attacker.unit.currentMovement = 0f
|
||||
}
|
||||
|
||||
@ -141,6 +141,7 @@ class Battle(val gameInfo:GameInfo) {
|
||||
enemyCiv.cities.first().cityConstructions.builtBuildings.add("Palace") // relocate palace
|
||||
}
|
||||
}
|
||||
(attacker as MapUnitCombatant).unit.moveToTile(city.getCenterTile())
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user