Hey all,
I've been channeling my pre-travel anxieties into a bit of coding fun. I needed a break from policies and whatnot, so I turned my attention to spies. Right now, I have implemented a fairly-simple function that gives spies a bit more functionality whilst engaged in surveillance in a city. In short, there is now a small chance (around 20% or so, roughly) every turn that a spy in a foreign city will possibly conduct one of the following actions:
The efficacy (and possibility) of each of these actions is based on the level of the spy (they must be at least agents to do any of them, and a secret agent for #4), what is being produced in the city, and a second random roll that is done after the first (so the real % chance hovers around 5-10%). Players are always alerted if one of them is done to their city (they aren't always told who did it, of course). The system works, the notifications are all in place, and (best of all) I didn't have to make any custom lua for it to work, as the events occur 'naturally' while spies are stationed in foreign cities.
These events do increase the possibility of spies being killed from being counter-spied, but such are the risks of spying! My eventual plan is to have the possibility of each function increase based on the duration of a spy's residence in a city (up to a certain point), and to add a couple more possible actions to the mix.
Thoughts?
G
I've been channeling my pre-travel anxieties into a bit of coding fun. I needed a break from policies and whatnot, so I turned my attention to spies. Right now, I have implemented a fairly-simple function that gives spies a bit more functionality whilst engaged in surveillance in a city. In short, there is now a small chance (around 20% or so, roughly) every turn that a spy in a foreign city will possibly conduct one of the following actions:
- Disrupt wonder/building production
- Delay a unit's production
- Remove a chunk of GPP from the city's furthest-along GP track
- Deal a small amount of damage to a city and cause it to enter temporary resistance
The efficacy (and possibility) of each of these actions is based on the level of the spy (they must be at least agents to do any of them, and a secret agent for #4), what is being produced in the city, and a second random roll that is done after the first (so the real % chance hovers around 5-10%). Players are always alerted if one of them is done to their city (they aren't always told who did it, of course). The system works, the notifications are all in place, and (best of all) I didn't have to make any custom lua for it to work, as the events occur 'naturally' while spies are stationed in foreign cities.
These events do increase the possibility of spies being killed from being counter-spied, but such are the risks of spying! My eventual plan is to have the possibility of each function increase based on the duration of a spy's residence in a city (up to a certain point), and to add a couple more possible actions to the mix.
Thoughts?
G