Irkalla
ENTP POWWWEEEEEER
What's a reliable, foolproof way to tell which civ a player is playing? For example, say I wanted to test to see if a city's owner was French Empire.
I'm thinking there's a high possibility that I can do ProjectCiv: Sparta's trait with Lua. I've worked with this in my head, and this is the method I've come up with.
Count the number of Civs bearing TRAIT_WALLS_OF_SPARTA at the beginning of the game. Make a variable (iPop_old) for each one that starts at 1. On city pop growth, test these conditions in the following order. Is the city's owner's civ's trait TRAIT_WALLS_OF_SPARTA? Is the city their capital? Is the city's current population (after growth) greater than iPop_old?
If all these conditions are true, check for another set of circumstances. I'll leave this out, but it's to check to see what their most recent unitclass is.
Once these checks have given us a unitclass, increment iPop_old to the current population, force the city to instantly produce the given unitclass (with proper XP from barracks etc.) and then end.
Is there anything wrong with that method I've come up with? The biggest thing for me is figuring out how to do all this, as it isn't readily evident.
Also, on a side note, can we make it a bannable offence to say "LUA"? Pls?
I'm thinking there's a high possibility that I can do ProjectCiv: Sparta's trait with Lua. I've worked with this in my head, and this is the method I've come up with.
Count the number of Civs bearing TRAIT_WALLS_OF_SPARTA at the beginning of the game. Make a variable (iPop_old) for each one that starts at 1. On city pop growth, test these conditions in the following order. Is the city's owner's civ's trait TRAIT_WALLS_OF_SPARTA? Is the city their capital? Is the city's current population (after growth) greater than iPop_old?
If all these conditions are true, check for another set of circumstances. I'll leave this out, but it's to check to see what their most recent unitclass is.
Once these checks have given us a unitclass, increment iPop_old to the current population, force the city to instantly produce the given unitclass (with proper XP from barracks etc.) and then end.
Is there anything wrong with that method I've come up with? The biggest thing for me is figuring out how to do all this, as it isn't readily evident.
Also, on a side note, can we make it a bannable offence to say "LUA"? Pls?