summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js29
1 files changed, 26 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 2d099a1..718ad24 100644
--- a/rules.js
+++ b/rules.js
@@ -757,6 +757,20 @@ function can_replace_cube_in_any(list) {
return false
}
+function can_de_escalate(list) {
+ for (let s of list)
+ if (has_friendly_cube(s))
+ return true
+ return false
+}
+
+function can_spread_influence(list) {
+ for (let s of list)
+ if (has_friendly_cube(s))
+ return true
+ return false
+}
+
function can_place_cube(s, removed = 0) {
return find_available_cube(removed) >= 0 && count_friendly_cubes(s) < 4
}
@@ -1966,8 +1980,17 @@ states.bonus_action = {
view.prompt = "Pivotal Space Bonus Action in " + DIMENSION_NAME[game.where] + "."
view.where = game.where
view.actions.pass = 1
- view.actions.de_escalate = 1
- view.actions.spread_influence = 1
+
+ if (can_de_escalate(dimension))
+ view.actions.de_escalate = 1
+ else
+ view.actions.de_escalate = 0
+
+ if (can_spread_influence(dimension))
+ view.actions.spread_influence = 1
+ else
+ view.actions.spread_influence = 0
+
if (can_replace_cube_in_any(dimension))
view.actions.turncoat = 1
else
@@ -3197,7 +3220,7 @@ states.vm_move = {
if (!game.vm.b.includes(s))
for_each_friendly_cube(s, gen_action_piece)
} else {
- game.selected_cube = game.who
+ view.selected_cube = game.who
for (let s of game.vm.b)
if (count_friendly_cubes(s) < 4)
gen_action_space(s)