summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2025-01-04 19:53:06 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2025-01-04 19:53:06 +0000
commitab3f02b4d0706ebdcde8ba6ba630469fe4d6c99e (patch)
tree6b7671b452b03757b721b9028db53dfe39dc30a9
parentbd238d5a5e26a31065f76e1374dd1591acb46779 (diff)
download1989-dawn-of-freedom-ab3f02b4d0706ebdcde8ba6ba630469fe4d6c99e.tar.gz
Add icons to Switch Influence
-rw-r--r--rules.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 0cbf71c..c05bcd6 100644
--- a/rules.js
+++ b/rules.js
@@ -5256,11 +5256,13 @@ function vm_support_check_modified() {
game.state = 'vm_support_check_prep'
}
-function vm_switch_infl(id) {
+function vm_switch_infl(space) {
push_undo()
- game.demInfl[id] -= game.vm_available_ops
- game.comInfl[id] += game.vm_available_ops
- log(`Replaced ${pluralize(game.vm_available_ops,'SP')} in %${id}.`)
+ let starting_control = check_control(space)
+ game.demInfl[space] -= game.vm_available_ops
+ game.comInfl[space] += game.vm_available_ops
+ let end_control = check_control(space)
+ log(`Replaced ${pluralize(game.vm_available_ops,'SP')} in %${space}. ${get_icons(starting_control,end_control)}`)
game.vm_available_ops = 0
check_tyrant()
}