Can no longer promote units with 0 movement by sneaking into the promotion screen from elsewhere

This commit is contained in:
yairm210
2021-12-29 00:13:09 +02:00
parent 0d78659e49
commit 7a00ebe2ec

View File

@ -40,6 +40,7 @@ class PromotionPickerScreen(val unit: MapUnit) : PickerScreen() {
val canBePromoted = unit.promotions.canBePromoted()
val canChangeState = game.worldScreen.canChangeState
val canPromoteNow = canBePromoted && canChangeState
&& unit.currentMovement > 0 && unit.attacksThisTurn == 0
if (!canPromoteNow)
rightSideButton.isEnabled = false