summaryrefslogtreecommitdiff
path: root/events.txt
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-15 00:01:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commitd195265a93d05a8466355c54ac4d211714d75014 (patch)
tree7b514be92e31062f0c20e351fa2ce12efa61e538 /events.txt
parent42ef73422399c6ed4e30f7538547c3cf3ef44383 (diff)
downloadandean-abyss-d195265a93d05a8466355c54ac4d211714d75014.tar.gz
Automate shaded event 64.
Diffstat (limited to 'events.txt')
-rw-r--r--events.txt22
1 files changed, 14 insertions, 8 deletions
diff --git a/events.txt b/events.txt
index f5efe07..44a3fbb 100644
--- a/events.txt
+++ b/events.txt
@@ -1046,14 +1046,20 @@ EVENT 64
endrepeat
SHADED 64
- prompt "Cartels Resources +2 for each Cartels Base in a City."
- piece all is_cartels_base(p) && is_city(s)
- auto_resources CARTELS 2
- endpiece
- prompt "Cartels Resources +1 for each Cartels Base in a Department."
- piece all is_cartels_base(p) && is_dept(s)
- auto_resources CARTELS 1
- endpiece
+ if AUTOMATIC
+ asm game.vm.n = count_matching_pieces((p,s) => is_cartels_base(p) && is_city(s)) * 2
+ asm game.vm.n += count_matching_pieces((p,s) => is_cartels_base(p) && is_dept(s))
+ resources CARTELS (game.vm.n)
+ else
+ prompt "Cartels Resources +2 for each Cartels Base in a City."
+ piece all is_cartels_base(p) && is_city(s)
+ auto_resources CARTELS 2
+ endpiece
+ prompt "Cartels Resources +1 for each Cartels Base in a Department."
+ piece all is_cartels_base(p) && is_dept(s)
+ auto_resources CARTELS 1
+ endpiece
+ endif
EVENT 65
# 5.1.3 - do both shipment and base if possible