mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
Merge branch 'master' of https://github.com/lishaoxia1985/UnCiv
This commit is contained in:
commit
f5f614208c
@ -27,7 +27,7 @@ class CityCombatant(val city: CityInfo) : ICombatant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun getUnitType(): UnitType = UnitType.City
|
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{
|
override fun getDefendingStrength(): Int{
|
||||||
if(isDefeated()) return 1
|
if(isDefeated()) return 1
|
||||||
return getCityStrength()
|
return getCityStrength()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user