From 10d098b9dec47e3c22798d3c03d1f9510c5d84c4 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 14 Mar 2019 22:29:25 +0200 Subject: [PATCH] 2.13.14 --- android/build.gradle | 4 ++-- core/src/com/unciv/logic/battle/Battle.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index c8e880ac3c..7d2169dc59 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 28 - versionCode 215 - versionName "2.13.13" + versionCode 216 + versionName "2.13.14" } // Had to add this crap for Travis to build, it wanted to sign the app diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index d0e15158a4..53efe5bbbb 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -77,15 +77,15 @@ class Battle(val gameInfo:GameInfo) { if(defender.isDefeated() - && defender.getUnitType() == UnitType.City + && defender is CityCombatant && attacker.isMelee() && attacker.getUnitType().isLandUnit()){ - conquerCity((defender as CityCombatant).city, attacker) + conquerCity(defender.city, attacker) } // we're a melee unit and we destroyed\captured an enemy unit else if (attacker.isMelee() - && (defender.isDefeated() || defender.getCivInfo()==attacker.getCivInfo() ) + && (defender.isDefeated() || defender.getCivInfo()==attacker.getCivInfo()) // This is so that if we attack e.g. a barbarian in enemy territory that we can't enter, we won't enter it && (attacker as MapUnitCombatant).unit.canMoveTo(attackedTile)) { // we destroyed an enemy military unit and there was a civilian unit in the same tile as well