mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Resources can now again provide uniques applying to the entire civ (#6072)
This commit is contained in:
parent
599a09176d
commit
39483d78bd
@ -404,6 +404,11 @@ class CivilizationInfo {
|
|||||||
if (religionManager.religion != null)
|
if (religionManager.religion != null)
|
||||||
yieldAll(religionManager.religion!!.getFounderUniques().filter { it.isOfType(uniqueType) })
|
yieldAll(religionManager.religion!!.getFounderUniques().filter { it.isOfType(uniqueType) })
|
||||||
|
|
||||||
|
yieldAll(getCivResources().asSequence()
|
||||||
|
.filter { it.amount > 0 }
|
||||||
|
.flatMap { it.resource.getMatchingUniques(uniqueType, stateForConditionals) }
|
||||||
|
)
|
||||||
|
|
||||||
yieldAll(gameInfo.ruleSet.globalUniques.getMatchingUniques(uniqueType, stateForConditionals))
|
yieldAll(gameInfo.ruleSet.globalUniques.getMatchingUniques(uniqueType, stateForConditionals))
|
||||||
|
|
||||||
}.filter {
|
}.filter {
|
||||||
|
@ -32,6 +32,7 @@ enum class UniqueTarget(val inheritsFrom: UniqueTarget? = null) {
|
|||||||
// These are a bit of a lie. There's no "Promotion only" or "UnitType only" uniques,
|
// These are a bit of a lie. There's no "Promotion only" or "UnitType only" uniques,
|
||||||
// they're all just Unit uniques in different places.
|
// they're all just Unit uniques in different places.
|
||||||
// So there should be no uniqueType that has a Promotion or UnitType target.
|
// So there should be no uniqueType that has a Promotion or UnitType target.
|
||||||
|
// Except meta-level uniques, such as 'incompatible with [promotion]', of course
|
||||||
Unit,
|
Unit,
|
||||||
UnitType(Unit),
|
UnitType(Unit),
|
||||||
Promotion(Unit),
|
Promotion(Unit),
|
||||||
@ -39,7 +40,7 @@ enum class UniqueTarget(val inheritsFrom: UniqueTarget? = null) {
|
|||||||
// Tile-specific
|
// Tile-specific
|
||||||
Terrain,
|
Terrain,
|
||||||
Improvement,
|
Improvement,
|
||||||
Resource,
|
Resource(Global),
|
||||||
Ruins,
|
Ruins,
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
@ -99,7 +100,7 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags:
|
|||||||
NullifiesStat("Nullifies [stat] [cityFilter]", UniqueTarget.Global),
|
NullifiesStat("Nullifies [stat] [cityFilter]", UniqueTarget.Global),
|
||||||
NullifiesGrowth("Nullifies Growth [cityFilter]", UniqueTarget.Global),
|
NullifiesGrowth("Nullifies Growth [cityFilter]", UniqueTarget.Global),
|
||||||
|
|
||||||
PercentProductionWonders("[amount]% Production when constructing [buildingFilter] wonders [cityFilter]", UniqueTarget.Global, UniqueTarget.Resource, UniqueTarget.FollowerBelief),
|
PercentProductionWonders("[amount]% Production when constructing [buildingFilter] wonders [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||||
PercentProductionBuildings("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
PercentProductionBuildings("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||||
PercentProductionUnits("[amount]% Production when constructing [baseUnitFilter] units [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
PercentProductionUnits("[amount]% Production when constructing [baseUnitFilter] units [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief),
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user