mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
3.11.16-patch1
Fixed x100 combat modifier for units in rough/open terrain
This commit is contained in:
parent
b30e6e6fdd
commit
07cee7e679
@ -3,8 +3,8 @@ package com.unciv.build
|
||||
object BuildConfig {
|
||||
const val kotlinVersion = "1.3.71"
|
||||
const val appName = "Unciv"
|
||||
const val appCodeNumber = 503
|
||||
const val appVersion = "3.11.16"
|
||||
const val appCodeNumber = 504
|
||||
const val appVersion = "3.11.16-patch1"
|
||||
|
||||
const val gdxVersion = "1.9.12"
|
||||
const val roboVMVersion = "2.3.1"
|
||||
|
@ -6,7 +6,6 @@ import com.unciv.logic.map.TileInfo
|
||||
import com.unciv.models.Counter
|
||||
import com.unciv.models.ruleset.unit.UnitType
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
import kotlin.collections.set
|
||||
import kotlin.math.max
|
||||
import kotlin.math.pow
|
||||
@ -262,19 +261,13 @@ object BattleDamage {
|
||||
for (BDM in getBattleDamageModifiersOfUnit(unit.unit)) {
|
||||
val text = BDM.getText()
|
||||
// this will change when we change over everything to ints
|
||||
if (BDM.vs == "units in open terrain" && !isRoughTerrain) modifiers.add(text, (BDM.modificationAmount*100).toInt())
|
||||
if (BDM.vs == "units in rough terrain" && isRoughTerrain) modifiers.add(text, (BDM.modificationAmount*100).toInt())
|
||||
if (BDM.vs == "units in open terrain" && !isRoughTerrain) modifiers.add(text, (BDM.modificationAmount).toInt())
|
||||
if (BDM.vs == "units in rough terrain" && isRoughTerrain) modifiers.add(text, (BDM.modificationAmount).toInt())
|
||||
}
|
||||
|
||||
return modifiers
|
||||
}
|
||||
|
||||
fun Counter<String>.toOldModifiers(): HashMap<String, Float> {
|
||||
val modifiers = HashMap<String,Float>()
|
||||
for((key,value) in this) modifiers[key] = value.toFloat()/100
|
||||
return modifiers
|
||||
}
|
||||
|
||||
private fun modifiersToMultiplicationBonus(modifiers: Counter<String>): Float {
|
||||
var finalModifier = 1f
|
||||
for (modifierValue in modifiers.values) finalModifier *= (1 + modifierValue/100f) // so 25 will result in *= 1.25
|
||||
|
@ -255,12 +255,11 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
||||
}
|
||||
|
||||
} catch (ex: Exception) {
|
||||
Gdx.app.postRunnable {
|
||||
val couldntDownloadLatestGame = Popup(this)
|
||||
couldntDownloadLatestGame.addGoodSizedLabel("Couldn't download the latest game state!").row()
|
||||
couldntDownloadLatestGame.addCloseButton()
|
||||
couldntDownloadLatestGame.addAction(Actions.delay(5f, Actions.run { couldntDownloadLatestGame.close() }))
|
||||
|
||||
Gdx.app.postRunnable {
|
||||
loadingGamePopup.close()
|
||||
couldntDownloadLatestGame.open()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user