Resolved #12468 - great general unique works with conditionals (cache for 'has unique' ignores conditionals)

This commit is contained in:
yairm210 2024-11-14 08:33:16 +02:00
parent 386c0812be
commit 8d4a16dd39

View File

@ -117,7 +117,7 @@ class MapUnitCache(private val mapUnit: MapUnit) {
canEnterCityStates = mapUnit.hasUnique(UniqueType.CanTradeWithCityStateForGoldAndInfluence)
hasStrengthBonusInRadiusUnique = mapUnit.hasUnique(UniqueType.StrengthBonusInRadius)
hasStrengthBonusInRadiusUnique = mapUnit.hasUnique(UniqueType.StrengthBonusInRadius, StateForConditionals.IgnoreConditionals)
hasCitadelPlacementUnique = mapUnit.getMatchingUniques(UniqueType.ConstructImprovementInstantly)
.mapNotNull { mapUnit.civ.gameInfo.ruleset.tileImprovements[it.params[0]] }
.any { it.hasUnique(UniqueType.OneTimeTakeOverTilesInRadius) }