summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-28 15:13:05 +0200
committerTor Andersson <tor@ccxvii.net>2023-05-03 18:48:16 +0200
commitf13ba29fe752ce8698858cbd40faa8337cd76c0f (patch)
treeba8937da2ac0db1b9524f7fd915bd0c90fa55c7a
parentae04af00445b2c6f821a81ae941c8d9d847f94bc (diff)
downloadandean-abyss-f13ba29fe752ce8698858cbd40faa8337cd76c0f.tar.gz
Check if free govt SA is possible.
-rw-r--r--events.txt16
-rw-r--r--rules.js12
2 files changed, 18 insertions, 10 deletions
diff --git a/events.txt b/events.txt
index 8c7f505..3fbb72b 100644
--- a/events.txt
+++ b/events.txt
@@ -102,9 +102,11 @@ SHADED 7
EVENT 8
current GOVT
- free_air_strike
- free_air_strike
- free_air_strike
+ repeat 3
+ if can_air_strike()
+ free_air_strike
+ endif
+ endrepeat
SHADED 8
resources GOVT -9
@@ -350,9 +352,11 @@ SHADED 26
EVENT 27
current GOVT
- free_govt_special_activity
- free_govt_special_activity
- free_govt_special_activity
+ repeat 3
+ if can_air_lift() || can_eradicate() || can_air_strike()
+ free_govt_special_activity
+ endif
+ endrepeat
SHADED 27
log "Until next Propaganda, no Government Special Activities where Guerrilla."
diff --git a/rules.js b/rules.js
index 09bf08a..d24fbd4 100644
--- a/rules.js
+++ b/rules.js
@@ -8381,9 +8381,11 @@ CODE[7 * 2 + 1] = [
// EVENT 8
CODE[8 * 2 + 0] = [
[ vm_current, GOVT ],
+ [ vm_repeat, 3 ],
+ [ vm_if, ()=>can_air_strike() ],
[ vm_free_air_strike ],
- [ vm_free_air_strike ],
- [ vm_free_air_strike ],
+ [ vm_endif ],
+ [ vm_endrepeat ],
[ vm_return ],
]
@@ -8739,9 +8741,11 @@ CODE[26 * 2 + 1] = [
// EVENT 27
CODE[27 * 2 + 0] = [
[ vm_current, GOVT ],
+ [ vm_repeat, 3 ],
+ [ vm_if, ()=>can_air_lift() || can_eradicate() || can_air_strike() ],
[ vm_free_govt_special_activity ],
- [ vm_free_govt_special_activity ],
- [ vm_free_govt_special_activity ],
+ [ vm_endif ],
+ [ vm_endrepeat ],
[ vm_return ],
]