Skip to content

Commit

Permalink
Move Until Healed wake up to startTurn so Fortify lasts until start o…
Browse files Browse the repository at this point in the history
…f turn (#12786)
  • Loading branch information
itanasi authored Jan 11, 2025
1 parent a3b48ab commit 534850f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/com/unciv/logic/map/mapunit/UnitTurnManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ class UnitTurnManager(val unit: MapUnit) {
if (!unit.hasUnitMovedThisTurn() || unit.hasUnique(UniqueType.HealsEvenAfterAction))
healUnit()

if (unit.action != null && unit.health > 99)
if (unit.isActionUntilHealed()) {
unit.action = null // wake up when healed
}

if (unit.isPreparingParadrop() || unit.isPreparingAirSweep())
unit.action = null

Expand Down Expand Up @@ -157,6 +152,11 @@ class UnitTurnManager(val unit: MapUnit) {
}
) unit.action = null

if (unit.action != null && unit.health > 99)
if (unit.isActionUntilHealed()) {
unit.action = null // wake up when healed
}

val tileOwner = unit.getTile().getOwner()
if (tileOwner != null
&& !unit.cache.canEnterForeignTerrain
Expand Down

0 comments on commit 534850f

Please sign in to comment.