yoshi, this might take me a while...
Here's a better way to do it (I think, because it uses one less unit type):
A = UnitA (owner=CivB)
B = UnitB (owner=Barbarians)
A1 = UnitA (owner=Barbarians)
- UnitA's first coordinates are occupied by a Barbarian UnitA.
- UnitA's second coordinates are adjacent to UnitB.
- If there are 3 UnitA's being spawned each turn (3 cities), then it looks like this:
A1 A1 A1
A(3)<--B
- If UnitA (owner=CivB) killed--by UnitB--then CivA receives 10 gold.
- If one of the 3 cities is captured, the corresponding Barbarian UnitA is deleted (via ChangeTerrain), thus the corresponding UnitA will appear there instead of adjacent to UnitB as it usually would.
- (Note that UnitA's will just pile up at the first coordinates until CivB re-captures its city. The problem with using ChangeTerrain to delete the extra UnitA's that appear is that if it's set to do so each turn it will allow Barbarian UnitAs to appear again--without the city being re-captured. Perhaps putting the event in just the right order; i.e. CT event AFTER UnitA created but BEFORE Barbarian UnitA created).
Result:
A A1 A1
A(2)<--B
Now, UnitB will kill one less UnitA (as 1 UnitA is at its first set of coordinates).
If all 3 cities are taken:
A A A
?<--B
(Just get rid of the lone UnitB with a ChangeTerrain event each turn (triggered by destruction of UnitA so UnitB has time to destroy UnitA(s) before being deleted by the CT event).
NOTE: Don't use Fortresses in this version (i.e UnitB has to be able to destroy all in 1 attack).
If you don't like to see the 'trigger' combat in the corner of the screen, you can also use another AI civ (e.g. CivC) rather than the 8th (Barbarian) civ so that you won't see the combat taking place (i.e. Barbarian units are visible to all players whereas other civs' units are only visible once revealed). Just be sure that they are always at war (i.e. start out at war and don't negotiate).
This explanation is not as clear as I would like it to be because I'm used to doing it directly via Events.txt...and it's the first time I've applied the 'trigger unit' thing to something like this (so I'm not 100% sure about it).
Another, simpler way fo doing it is to just use terrain instead (i.e. have 1 tile of terrain with high output near CivA's cities--1 each?): when a CivB city is captured, the corresponding tile changes to low-output terrain. Changes back when city re-taken.
Downside is that ChangeTerrain also deletes any units that happen to be on that tile when the event triggers. Could put an 'Impassable' unit there belonging to a neutral civ (i.e. a civ that everyone starts out allied with and can't negotiate with) that gets replaced whenever the CT event triggers.
I think I'll just create the Events.txt for you. You can just fill in the necessary values like owner, unit name, and coordinates. It'll be faster that way.
Both versions (in this post) are in the same events file I've attached.