Unified "X is only available under Y conditions" into a single unique (#6133)

* Unified "X is only available under Y conditions" into a single unique

There were a few problems with existing uniques - they weren't really composable, the offered things they didn't keep, etc

For example, "Incompatible with [policy/tech/promotion]", UniqueTarget.Policy, UniqueTarget.Tech, UniqueTarget.Promotion. In fact, promotions only checked promotion incompatibility, promotions - promotion incompat, etc

Additionally, with a few more changes, this could cover several other uniques - "Hidden until [amount] social policy branches have been completed", "Requires at least [amount] population", perhaps others

I have to say I think conditionals are the best thing ever and they make amazing composability possible :)

* Autoupdate correctly recognizes parameters
Updated ruleset jsons

* Deprecation texts should be allowed to forward to other deprecated uniques so we only need to change the leaves when introducing new uniques, not go through the whole tree
This commit is contained in:
Yair Morgenstern
2022-02-12 19:03:30 +02:00
committed by GitHub
parent 4fb4722e3a
commit e72dcc8b0d
14 changed files with 74 additions and 33 deletions

View File

@ -135,8 +135,8 @@
},{
"name": "Piety",
"era": "Classical era",
"uniques": ["[+100]% Production when constructing [Shrine] buildings [in all cities]", "[+100]% Production when constructing [Temple] buildings [in all cities]",
"Incompatible with [Rationalism]"],
"uniques": ["[+100]% Production when constructing [Shrine] buildings [in all cities]", "[+100]% Production when constructing [Temple] buildings [in all cities]",
"Only available <before adopting [Rationalism]>"],
"policies": [
{
"name": "Organized Religion",
@ -276,7 +276,7 @@
{
"name": "Rationalism",
"era": "Renaissance era",
"uniques": ["[+15]% [Science] <while the empire is happy>", "Incompatible with [Piety]"],
"uniques": ["[+15]% [Science] <while the empire is happy>", "Only available <before adopting [Piety]>"],
"policies": [
{
"name": "Secularism",
@ -323,7 +323,7 @@
{
"name": "Freedom",
"era": "Renaissance era",
"uniques": ["[+25]% great person generation [in all cities]", "Incompatible with [Autocracy]", "Incompatible with [Order]"],
"uniques": ["[+25]% great person generation [in all cities]", "Only available <before adopting [Autocracy]>", "Only available <before adopting [Order]>"],
"policies": [
{
"name": "Constitution",
@ -369,7 +369,7 @@
"name": "Autocracy",
"era": "Industrial era",
"uniques": ["[-33]% maintenance costs <for [All] units>", "Upon capturing a city, receive [10] times its [Culture] production as [Culture] immediately",
"Incompatible with [Order]", "Incompatible with [Freedom]"],
"Only available <before adopting [Order]>", "Only available <before adopting [Freedom]>"],
"policies": [
{
"name": "Populism",
@ -418,7 +418,7 @@
{
"name": "Order",
"era": "Industrial era",
"uniques": ["[+1 Happiness] [in all cities]", "Incompatible with [Autocracy]", "Incompatible with [Freedom]"],
"uniques": ["[+1 Happiness] [in all cities]", "Only available <before adopting [Autocracy]>", "Only available <before adopting [Freedom]>"],
"policies": [
{
"name": "United Front",