mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04: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 ae1a2e9ece75227e5df3ee56aee4c7270657da2f.
This commit is contained in:
parent
898d312109
commit
02e10b1000
@ -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) })
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user