Resolved #614 - bug withpillaged water tiles

This commit is contained in:
Yair Morgenstern 2019-03-29 15:26:31 +03:00
parent b0830ba487
commit f38da59fe9

View File

@ -91,9 +91,13 @@ class UnitActions {
if(!unit.type.isCivilian() && tile.improvement !=null){
actionList += UnitAction("Pillage", unit.currentMovement>0)
{
tile.improvementInProgress = tile.improvement
tile.turnsToImprovement = 2
tile.improvement = null
// http://well-of-souls.com/civ/civ5_improvements.html says that naval improvements are destroyed upon pilllage
// and I can't find any other sources so I'll go with that
if(tile.isLand()) {
tile.improvementInProgress = tile.improvement
tile.turnsToImprovement = 2
}
unit.useMovementPoints(1f)
unit.health = min(100,unit.health+25)
}