mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 23:40:01 +07:00
Only heal when pillaging Improvements (#8511)
* Only Pillaging Improvements (not Roads) Heal 25HP
* Block repairs in Hostile Tiles
* Revert "Block repairs in Hostile Tiles"
This reverts commit ae1a2e9ece
.
This commit is contained in:
@ -49,6 +49,7 @@ object UnitActionsPillage {
|
||||
UnitActionType.Pillage,
|
||||
action = {
|
||||
val pillagedImprovement = unit.currentTile.getImprovementToPillageName()!!
|
||||
val pillagingImprovement = unit.currentTile.canPillageTileImprovement()
|
||||
val pillageText = "An enemy [${unit.baseUnit.name}] has pillaged our [$pillagedImprovement]"
|
||||
val icon = "ImprovementIcons/$pillagedImprovement"
|
||||
tile.getOwner()?.addNotification(
|
||||
@ -68,7 +69,8 @@ object UnitActionsPillage {
|
||||
val freePillage = unit.hasUnique(UniqueType.NoMovementToPillage, checkCivInfoUniques = true)
|
||||
if (!freePillage) unit.useMovementPoints(1f)
|
||||
|
||||
unit.healBy(25)
|
||||
if (pillagingImprovement) // only Improvements heal HP
|
||||
unit.healBy(25)
|
||||
}.takeIf { unit.currentMovement > 0 && UnitActions.canPillage(unit, tile) })
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user