mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +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.
|
||||
// getAncientRuinBonus, if it places a new unit, does too
|
||||
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()
|
||||
&& tile.improvement != null
|
||||
&& tile.getTileImprovement()!!.isAncientRuinsEquivalent()
|
||||
&& improvement != null
|
||||
&& tile.ruleset.tileImprovements[improvement]!!.isAncientRuinsEquivalent()
|
||||
) {
|
||||
getAncientRuinBonus(tile)
|
||||
}
|
||||
if (tile.improvement == Constants.barbarianEncampment && !civ.isBarbarian())
|
||||
if (improvement == Constants.barbarianEncampment && !civ.isBarbarian())
|
||||
clearEncampment(tile)
|
||||
// Check whether any civilians without military units are there.
|
||||
// Keep in mind that putInTile(), which calls this method,
|
||||
|
Reference in New Issue
Block a user