mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-20 20:59:18 +07:00
Can no longer promote units with 0 movement by sneaking into the promotion screen from elsewhere
This commit is contained in:
@ -40,6 +40,7 @@ class PromotionPickerScreen(val unit: MapUnit) : PickerScreen() {
|
|||||||
val canBePromoted = unit.promotions.canBePromoted()
|
val canBePromoted = unit.promotions.canBePromoted()
|
||||||
val canChangeState = game.worldScreen.canChangeState
|
val canChangeState = game.worldScreen.canChangeState
|
||||||
val canPromoteNow = canBePromoted && canChangeState
|
val canPromoteNow = canBePromoted && canChangeState
|
||||||
|
&& unit.currentMovement > 0 && unit.attacksThisTurn == 0
|
||||||
if (!canPromoteNow)
|
if (!canPromoteNow)
|
||||||
rightSideButton.isEnabled = false
|
rightSideButton.isEnabled = false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user