Arbitrary conditionals can become timed conditionals! (#6134)

* Arbitrary conditionals can become timed conditionals!
triggerCivwideUniques is activated in 3 situations:
- Tech complete
- Policy adopted
- Building complete

So for each of the unique containers for these I added a catch saying 'if this unique is a temporary unique then don't save it yourself

This has been lying around in todos for a while and generalizes one of the nasty hardcoded messes that I hate about Civ V. Why would you introduce ONE timed effect in the whole game?! You can use them all the time like Humankind or never use them like Civ IV, but why have just one whyyy

One more thing in this PR, that needed to be solved by the by, is allowing parameters to have a '2' on the end so we can autoreplace multiple parameters of the same type.
Using a regex is slightly more inefficient, but since this is A. only used once per UniqueType.kt, and B. allows us to have as many 'amount's as we want which is important if we have a lot of conditionals, I feel this is justified.

* Fixed comments from PR
This commit is contained in:
Yair Morgenstern
2022-02-12 19:03:11 +02:00
committed by GitHub
parent 55d92b9735
commit 4fb4722e3a
10 changed files with 37 additions and 19 deletions

View File

@ -407,7 +407,8 @@
},
{
"name": "Autocracy Complete",
"uniques": ["+[25]% attack strength to all [Military] units for [50] turns",
"uniques": [
"[+25]% Strength <when attacking> <for [Military] units> <for [50] turns>",
"May buy [Great General] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>",
"May buy [Great Admiral] units for [1000] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([500]) <starting from the [Industrial era]>"
]

View File

@ -400,7 +400,7 @@
},
{
"name": "Autocracy Complete",
"uniques": ["+[25]% attack strength to all [Military] units for [30] turns"]
"uniques": ["[+25]% Strength <when attacking> <for [Military] units> <for [30] turns>"]
}
]
},