-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the multiple comparison unique pack #11280
Add the multiple comparison unique pack #11280
Conversation
Supports resources, stats and years
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
You're half-right here. Let's looks at this from a language perspective first. "Between 1900 and 2000 year(s)" does not parse well. Years aren't something you have, but they are something you count. Since that's the case, why not use the same unique for numbers as well? Base numbers are also a countable! In fact this can be generalized to "when [countable] is between [countable2] and [countable3]" Examples: When Gold is between Science and Culture, when Iron is between Horses and Gems. Second problem I have is with the if/elses. What we actually need here is a function to get a string, and return a number - which we can then use for both the first and second element. |
In that case we need to add the "countable" unique parameter
In that case, please give me the desired wording of the uniques
Did you mean this function? fun getCountableNumber(countable: String): Int |
I've got an idea: We can make a "countable" mega-parameter which would accept all of the following:
And even more... There is a lot of these, but I think we need to add support of nested parameters. Something like: When [number of cities <with population at least 5>] is larger than [4] What's your opinion about this? |
We'll need to see how we structure the nested filters |
[] - this is a parameter character We need a "internal conditional" or "parameter conditional" character. Let's decide together what it should be |
We really don't need such a thing |
So, in that case, would we use [] for parameter conditionals? The following conditional unique should be true if a player has more than 4 cities with population of at least 5 Please rewrite it with your preferred syntax. <When [number of cities <with population at least 5>] is larger than [4]> |
For now, I can make a pack of countable-checking conditional uniques, which does not involve nested conditions. |
I made a multiple comparison unique pack, which contains 4 new uniques and 6 modified ones to support year as a parameter. Though i made a similar PR several days ago #11250 and the PR for support of years #11262 (which was rejected), I've combined these two pull requests into this one.
I hope that this time year-related uniques will be introduced, as there is another PR adding events #11276
If you have some remarks, share them in the comments. Constructive feedback welcome.