First of all I remind you, that Progress is game to play humans against humans, without AI. I'm not an AI expert and I decided to provide changes making writing good AI very expensive. If you be AI expert and will join to Progress team, don't scare - maybe we can find best solution.
What is effects iterators?
Imagine we will replace Great Wall wonder with Walls improvement. So defense of each city depends on how many walls user was built (in each city). So we got:
Code: Select all
[effect_great_wall]
name = "Defense_Bonus1"
value = 10
reqs =
{
"type", "name", "range"
"IterationOfCities", "City", "Player"
"Building", "Walls", "City"
}
Code above will makes Progress sum each city with Walls as defense bonus of each city. If we would like to restrict this to only one player, we could:
Code: Select all
[effect_great_wall]
name = "Defense_Bonus1"
value = 10
reqs =
{
"type", "name", "range"
"IterationOfCities", "City", "Player"
"Building", "Great Wall", "Player"
"Building", "Walls", "City"
}
So only player with Great Walls World Wonder will have this bonus. I didn't test my solution yet. Maybe examples doesn't show this idea helpful, but there will be many use cases in future, like iterating adjacent tiles to find medic unit or to provide bonus in nearby cities if some city have wonder/building. I know this can be probably be done in lua, but I think humans prefer effects iterators syntax.
In future I will add triggers effect type. Triggers will be checked on each turn start and export symbols from effects. This could be also helpful.