mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Updated piety policy tree (#5195)
* Added piety policy tree * Misread an ability * Fixed filter
This commit is contained in:
parent
a4c520fd26
commit
9c66154a44
@ -135,24 +135,24 @@
|
|||||||
},{
|
},{
|
||||||
"name": "Piety",
|
"name": "Piety",
|
||||||
"era": "Classical era",
|
"era": "Classical era",
|
||||||
"uniques": ["+[15]% Production when constructing [Culture] buildings", "Incompatible with [Rationalism]"],
|
"uniques": ["+[100]% Production when constructing [Shrine] buildings", "+[100]% Production when constructing [Temple] buildings",
|
||||||
|
"Incompatible with [Rationalism]"],
|
||||||
"policies": [
|
"policies": [
|
||||||
{
|
{
|
||||||
"name": "Organized Religion",
|
"name": "Organized Religion",
|
||||||
"uniques": ["[+1 Happiness] from every [Monument]","[+1 Happiness] from every [Amphitheater]",
|
"uniques": ["[+1 Faith] from every [Shrine]","[+1 Faith] from every [Temple]"],
|
||||||
"[+1 Happiness] from every [Monastery]"],
|
|
||||||
"row": 1,
|
"row": 1,
|
||||||
"column": 2
|
"column": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Mandate Of Heaven",
|
"name": "Mandate Of Heaven",
|
||||||
"uniques": ["50% of excess happiness added to culture towards policies"],
|
"uniques": ["[50]% of excess happiness converted to [Culture]"],
|
||||||
"row": 1,
|
"row": 1,
|
||||||
"column": 5
|
"column": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Theocracy",
|
"name": "Theocracy",
|
||||||
"uniques": ["+[10]% [Gold] from every [Amphitheater]"],
|
"uniques": ["+[10]% [Gold] from every [Temple]"],
|
||||||
"requires": ["Organized Religion"],
|
"requires": ["Organized Religion"],
|
||||||
"row": 2,
|
"row": 2,
|
||||||
"column": 1
|
"column": 1
|
||||||
@ -166,26 +166,19 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Free Religion",
|
"name": "Free Religion",
|
||||||
"uniques": ["[+1 Culture] from every [Monument]", "[+1 Culture] from every [Amphitheater]", "[+1 Culture] from every [Monastery]",
|
"uniques": ["Culture cost of adopting new Policies reduced by [10]%"],
|
||||||
"Free Social Policy"],
|
"requires": ["Mandate Of Heaven", "Reformation"],
|
||||||
"requires": ["Mandate Of Heaven","Reformation"],
|
|
||||||
"row": 3,
|
"row": 3,
|
||||||
"column": 4
|
"column": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Piety Complete",
|
"name": "Piety Complete",
|
||||||
"uniques": ["Culture cost of adopting new Policies reduced by [10]%"]
|
"uniques": ["[Faith] cost of purchasing items in cities [-20]%", "[+3 Gold, +3 Culture] from every [Holy site]"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Patronage ",
|
"name": "Patronage",
|
||||||
// Yes, there is a space behind this word, and yes, this is necessary
|
|
||||||
// This is, because at the time of writing there existed another policy called 'Patronage' that was recently deprecated
|
|
||||||
// It would, however, still be possible for save-files to contain this policy
|
|
||||||
// Therefore, we had to differentiate between these two, and this was the least intrusive way to do so
|
|
||||||
// NOTE: If you remove the space here, also remove the extra space between 'patronage' and 'complete' in the 'patronage complete' policy.
|
|
||||||
// Otherwise, weird stuff will happen.
|
|
||||||
"era": "Classical era",
|
"era": "Classical era",
|
||||||
"uniques": ["City-State Influence degrades [25]% slower"],
|
"uniques": ["City-State Influence degrades [25]% slower"],
|
||||||
"policies": [
|
"policies": [
|
||||||
@ -224,11 +217,9 @@
|
|||||||
"column": 4
|
"column": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Patronage Complete",
|
"name": "Patronage Complete",
|
||||||
// This extra space is intentional, see above.
|
|
||||||
"uniques": ["Influence of all other civilizations with all city-states degrades [33]% faster",
|
"uniques": ["Influence of all other civilizations with all city-states degrades [33]% faster",
|
||||||
"Triggers the following global alert: [Our influence with City-States has started dropping faster!]"]
|
"Triggers the following global alert: [Our influence with City-States has started dropping faster!]"]
|
||||||
// This triggers a global alert in the G&K game also, based on my memory of playing it
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -65,6 +65,13 @@ object BackwardCompatibility {
|
|||||||
for (tech in civInfo.tech.techsResearched.toList())
|
for (tech in civInfo.tech.techsResearched.toList())
|
||||||
if (!ruleSet.technologies.containsKey(tech))
|
if (!ruleSet.technologies.containsKey(tech))
|
||||||
civInfo.tech.techsResearched.remove(tech)
|
civInfo.tech.techsResearched.remove(tech)
|
||||||
|
for (policy in civInfo.policies.adoptedPolicies.toList())
|
||||||
|
if (!ruleSet.policies.containsKey(policy)
|
||||||
|
// Converstion code for deprecated policies since 3.16.15
|
||||||
|
&& !(policy == "Patronage " || policy == "Patronage Complete")
|
||||||
|
//
|
||||||
|
)
|
||||||
|
civInfo.policies.adoptedPolicies.remove(policy)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,10 +178,19 @@ class CivInfoStats(val civInfo: CivilizationInfo) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Deprecated since 3.16.15
|
||||||
|
if (civInfo.hasUnique("50% of excess happiness added to culture towards policies")) {
|
||||||
|
val happiness = civInfo.getHappiness()
|
||||||
|
if (happiness > 0) statMap.add("Policies", Stats(culture = happiness / 2f))
|
||||||
|
}
|
||||||
|
//
|
||||||
|
|
||||||
if (civInfo.hasUnique("50% of excess happiness added to culture towards policies")) {
|
if (civInfo.getHappiness() > 0) {
|
||||||
val happiness = civInfo.getHappiness()
|
val excessHappinessConversion = Stats()
|
||||||
if (happiness > 0) statMap.add("Policies", Stats(culture = happiness / 2f))
|
for (unique in civInfo.getMatchingUniques("[]% of excess happiness converted to []")) {
|
||||||
|
excessHappinessConversion.add(Stat.valueOf(unique.params[1]), (unique.params[0].toInt() / 100 * civInfo.getHappiness()).toFloat())
|
||||||
|
}
|
||||||
|
statMap.add("Policies", excessHappinessConversion)
|
||||||
}
|
}
|
||||||
|
|
||||||
// negative gold hurts science
|
// negative gold hurts science
|
||||||
|
@ -50,6 +50,17 @@ class PolicyManager {
|
|||||||
fun getPolicyByName(name: String): Policy = civInfo.gameInfo.ruleSet.policies[name]!!
|
fun getPolicyByName(name: String): Policy = civInfo.gameInfo.ruleSet.policies[name]!!
|
||||||
|
|
||||||
fun setTransients() {
|
fun setTransients() {
|
||||||
|
// Deprecated "Patronage " policy since 3.16.15
|
||||||
|
if (adoptedPolicies.contains("Patronage ")) {
|
||||||
|
adoptedPolicies.remove("Patronage ")
|
||||||
|
adoptedPolicies.add("Patronage")
|
||||||
|
}
|
||||||
|
if (adoptedPolicies.contains("Patronage Complete")) {
|
||||||
|
adoptedPolicies.remove("Patronage Complete")
|
||||||
|
adoptedPolicies.add("Patronage Complete")
|
||||||
|
}
|
||||||
|
//
|
||||||
|
|
||||||
for (policyName in adoptedPolicies)
|
for (policyName in adoptedPolicies)
|
||||||
addPolicyToTransients(getPolicyByName(policyName))
|
addPolicyToTransients(getPolicyByName(policyName))
|
||||||
}
|
}
|
||||||
|
@ -476,6 +476,7 @@ class BaseUnit : INamed, INonPerpetualConstruction, ICivilopediaText {
|
|||||||
|
|
||||||
"Nuclear Weapon" -> isNuclearWeapon()
|
"Nuclear Weapon" -> isNuclearWeapon()
|
||||||
"Great Person", "Great" -> isGreatPerson()
|
"Great Person", "Great" -> isGreatPerson()
|
||||||
|
"Religious" -> uniques.contains("Religious Unit")
|
||||||
else -> {
|
else -> {
|
||||||
if (getType().matchesFilter(filter)) return true
|
if (getType().matchesFilter(filter)) return true
|
||||||
if (
|
if (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user