Merge pull request #431 from ninjatao/fix_city_defeated_info

Fix city defeated info.
This commit is contained in:
Yair Morgenstern 2019-01-23 09:56:12 +02:00 committed by GitHub
commit 1a6089ead1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ class Battle(val gameInfo:GameInfo) {
if(attacker.getCivilization()!=defender.getCivilization()) { // If what happened was that a civilian unit was captures, that's dealt with in the CaptureCilvilianUnit function
val whatHappenedString =
if (attacker.isDefeated()) " {was destroyed while attacking}"
if (attacker !is CityCombatant && attacker.isDefeated()) " {was destroyed while attacking}"
else " has " + (if (defender.isDefeated()) "destroyed" else "attacked")
val attackerString =
if (attacker.getUnitType() == UnitType.City) "Enemy city [" + attacker.getName() + "]"