mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 23:40:01 +07:00
Allow barb camps to function after giving ruins effects (#11137)
* Allow barb camps to function after giving ruins effects * Add comment
This commit is contained in:
@ -802,14 +802,16 @@ class MapUnit : IsPartOfGameInfoSerialization {
|
|||||||
// addPromotion requires currentTile to be valid because it accesses ruleset through it.
|
// addPromotion requires currentTile to be valid because it accesses ruleset through it.
|
||||||
// getAncientRuinBonus, if it places a new unit, does too
|
// getAncientRuinBonus, if it places a new unit, does too
|
||||||
currentTile = tile
|
currentTile = tile
|
||||||
|
// The improvement may get removed if it has ruins effects or is a barbarian camp, and will still be needed if removed
|
||||||
|
val improvement = tile.improvement
|
||||||
|
|
||||||
if (civ.isMajorCiv()
|
if (civ.isMajorCiv()
|
||||||
&& tile.improvement != null
|
&& improvement != null
|
||||||
&& tile.getTileImprovement()!!.isAncientRuinsEquivalent()
|
&& tile.ruleset.tileImprovements[improvement]!!.isAncientRuinsEquivalent()
|
||||||
) {
|
) {
|
||||||
getAncientRuinBonus(tile)
|
getAncientRuinBonus(tile)
|
||||||
}
|
}
|
||||||
if (tile.improvement == Constants.barbarianEncampment && !civ.isBarbarian())
|
if (improvement == Constants.barbarianEncampment && !civ.isBarbarian())
|
||||||
clearEncampment(tile)
|
clearEncampment(tile)
|
||||||
// Check whether any civilians without military units are there.
|
// Check whether any civilians without military units are there.
|
||||||
// Keep in mind that putInTile(), which calls this method,
|
// Keep in mind that putInTile(), which calls this method,
|
||||||
|
Reference in New Issue
Block a user