mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-27 08:09:21 +07:00
Merge pull request #671 from ninjatao/fix_pillage
Fixed : Pillaging destroyed improvement even on land.
This commit is contained in:
@ -92,13 +92,13 @@ class UnitActions {
|
|||||||
if(!unit.type.isCivilian() && tile.improvement !=null){
|
if(!unit.type.isCivilian() && tile.improvement !=null){
|
||||||
actionList += UnitAction("Pillage", unit.currentMovement>0)
|
actionList += UnitAction("Pillage", unit.currentMovement>0)
|
||||||
{
|
{
|
||||||
tile.improvement = null
|
|
||||||
// http://well-of-souls.com/civ/civ5_improvements.html says that naval improvements are destroyed upon pilllage
|
// 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
|
// and I can't find any other sources so I'll go with that
|
||||||
if(tile.isLand()) {
|
if(tile.isLand()) {
|
||||||
tile.improvementInProgress = tile.improvement
|
tile.improvementInProgress = tile.improvement
|
||||||
tile.turnsToImprovement = 2
|
tile.turnsToImprovement = 2
|
||||||
}
|
}
|
||||||
|
tile.improvement = null
|
||||||
unit.useMovementPoints(1f)
|
unit.useMovementPoints(1f)
|
||||||
unit.health = min(100,unit.health+25)
|
unit.health = min(100,unit.health+25)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user