mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-08 23:08:35 +07:00
Fix 'Sleep Until Healed' action missing (#10718)
Sleep until healed check unit injured logic fix
This commit is contained in:
@ -229,7 +229,7 @@ object UnitActions {
|
||||
|
||||
private fun getSleepUntilHealedActions(unit: MapUnit, tile: Tile): List<UnitAction> {
|
||||
if (!shouldHaveSleepAction(unit, tile)) return listOf()
|
||||
if (unit.health < 100) return listOf()
|
||||
if (unit.health == 100) return listOf()
|
||||
return listOf(UnitAction(UnitActionType.SleepUntilHealed,
|
||||
action = { unit.action = UnitActionType.SleepUntilHealed.value }
|
||||
.takeIf { !unit.isSleepingUntilHealed() && unit.canHealInCurrentTile() }
|
||||
|
Reference in New Issue
Block a user