summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-04-03 10:14:09 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-04-03 10:14:09 -0400
commit56846b64880053551828148b5ec7db534e6d99d4 (patch)
tree5bc1c9588e36ae2cfde1663a0bd781a534c973ca /rules.js
parentd49dfb9c949424dc847ee9e97c0b9026779fb6ff (diff)
downloadvijayanagara-56846b64880053551828148b5ec7db534e6d99d4.tar.gz
Support multiple supports
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 29d459d..7b3d059 100644
--- a/rules.js
+++ b/rules.js
@@ -995,7 +995,7 @@ function prompt_end_cmd(cost) {
else
view.prompt = game.cmd.type + ": Done."
}
- return (game.cmd.spaces.length > 0) ? 1 : 0
+ return true
}
function select_cmd_space(s, cost) {
@@ -1262,7 +1262,7 @@ states.attack_adjacent_support = {
else if (game.current === VE)
view.prompt = "Attack: Add up to one Raja from adjacent Province with a Temple."
- if (game.cmd.support_space == null) {
+ if (game.cmd.support_space === null) {
for (let s = first_space; s <= last_space; ++s)
if (is_adjacent(game.cmd.where, s) && can_support_from(s, game.cmd.attacker))
gen_action_space(s)
@@ -1491,6 +1491,7 @@ function end_attack_casualties() {
}
function goto_attack_resolution() {
+ game.cmd.support_space = null
if (is_rebel_faction(game.cmd.target) && is_rebel_faction(game.cmd.attacker))
attack_influence_shift()
else if (game.cmd.attacker === MI && !is_timurid()) {