From 48792ccae967434082403c2ae03a7281a512a871 Mon Sep 17 00:00:00 2001 From: lishaoxia1985 <49801619+lishaoxia1985@users.noreply.github.com> Date: Thu, 3 Oct 2019 17:29:17 +0800 Subject: [PATCH 1/2] update --- core/src/com/unciv/logic/battle/CityCombatant.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/battle/CityCombatant.kt b/core/src/com/unciv/logic/battle/CityCombatant.kt index 14b63e5d2f..c780a93146 100644 --- a/core/src/com/unciv/logic/battle/CityCombatant.kt +++ b/core/src/com/unciv/logic/battle/CityCombatant.kt @@ -26,7 +26,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/1.54488 (about 2/3 not 2/5), i use another method, because in original game the city only has strength attribute (in other words, City's AttackingStrength() = getCityStrength() in original game). + 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 getDefendingStrength(): Int{ if(isDefeated()) return 1 return getCityStrength() From 0f51f769025afe2765df96971fa8476d51d3524b Mon Sep 17 00:00:00 2001 From: lishaoxia1985 <49801619+lishaoxia1985@users.noreply.github.com> Date: Thu, 3 Oct 2019 17:32:19 +0800 Subject: [PATCH 2/2] update --- core/src/com/unciv/logic/battle/CityCombatant.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/battle/CityCombatant.kt b/core/src/com/unciv/logic/battle/CityCombatant.kt index c780a93146..4d4ef751bf 100644 --- a/core/src/com/unciv/logic/battle/CityCombatant.kt +++ b/core/src/com/unciv/logic/battle/CityCombatant.kt @@ -26,7 +26,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() //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 getDefendingStrength(): Int{ if(isDefeated()) return 1 return getCityStrength()