diff --git a/android/assets/jsons/Translations/Other.json b/android/assets/jsons/Translations/Other.json index 421482c760..8bed89c302 100644 --- a/android/assets/jsons/Translations/Other.json +++ b/android/assets/jsons/Translations/Other.json @@ -1557,7 +1557,7 @@ French:"Entretien des transports" Romanian:"Întreținere trasporturi" Spanish:"Mantenimiento de transporte" - Simplified_Chinese:"道(铁)路维护" + Simplified_Chinese:"道(铁)路维护费" Portuguese:"Manutenção de transporte" German:"Unterhalt für Transport" } diff --git a/core/src/com/unciv/logic/battle/BattleDamage.kt b/core/src/com/unciv/logic/battle/BattleDamage.kt index 2821d8bf60..0763b797dd 100644 --- a/core/src/com/unciv/logic/battle/BattleDamage.kt +++ b/core/src/com/unciv/logic/battle/BattleDamage.kt @@ -200,7 +200,8 @@ class BattleDamage{ } private fun getHealthDependantDamageRatio(combatant: ICombatant): Float { - return if(combatant.getCivInfo().nation.unique == "Units fight as though they were at full strength even when damaged" && !combatant.getUnitType().isAirUnit()) + return if(combatant.getUnitType() == UnitType.City + || combatant.getCivInfo().nation.unique == "Units fight as though they were at full strength even when damaged" && !combatant.getUnitType().isAirUnit()) 1f else 1 - (100 - combatant.getHealth()) / 300f// Each 3 points of health reduces damage dealt by 1% like original game } @@ -228,12 +229,12 @@ class BattleDamage{ if(attacker.isRanged()) return 0 if(defender.getUnitType().isCivilian()) return 0 val ratio = getAttackingStrength(attacker,defender) / getDefendingStrength(attacker,defender) - return (damageModifier(ratio, true) * (if(defender.getUnitType() == UnitType.City) 1.00f else getHealthDependantDamageRatio(defender))).roundToInt() + return (damageModifier(ratio, true) * getHealthDependantDamageRatio(defender)).roundToInt() } fun calculateDamageToDefender(attacker: ICombatant, defender: ICombatant): Int { val ratio = getAttackingStrength(attacker,defender) / getDefendingStrength(attacker,defender) - return (damageModifier(ratio,false) * (if(attacker.getUnitType() == UnitType.City) 0.75f else getHealthDependantDamageRatio(attacker))).roundToInt() + return (damageModifier(ratio,false) * getHealthDependantDamageRatio(attacker)).roundToInt() } fun damageModifier(attackerToDefenderRatio:Float, damageToAttacker:Boolean): Float { diff --git a/core/src/com/unciv/logic/battle/CityCombatant.kt b/core/src/com/unciv/logic/battle/CityCombatant.kt index 3057dc0a3c..6b69945d68 100644 --- a/core/src/com/unciv/logic/battle/CityCombatant.kt +++ b/core/src/com/unciv/logic/battle/CityCombatant.kt @@ -27,7 +27,7 @@ class CityCombatant(val city: CityInfo) : ICombatant { } override fun getUnitType(): UnitType = UnitType.City - override fun getAttackingStrength(): Int = getCityStrength() //If we don't need to multiply by a modifier number (0.75) in Damage Calculations, getCityStrength() should multiply by 1/(x^i+0.5) (x = CityStrength / DefendUnitStrength, i = if(x>1) 1 else -1). + override fun getAttackingStrength(): Int = (getCityStrength() * 0.75).roundToInt() override fun getDefendingStrength(): Int{ if(isDefeated()) return 1 return getCityStrength()