diff options
author | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-25 19:57:58 -0400 |
---|---|---|
committer | Joël Simoneau <simoneaujoel@gmail.com> | 2025-04-25 19:57:58 -0400 |
commit | b94414d6a241bac4be4e5f4e105be1e9b74125d1 (patch) | |
tree | 9cd17540e6f50cd235978f4cb176e3b668a168c3 | |
parent | c60048674da7495d7c4408a3a79fff63040ef23d (diff) | |
download | vijayanagara-b94414d6a241bac4be4e5f4e105be1e9b74125d1.tar.gz |
Nobody is safe
-rw-r--r-- | rules.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1299,8 +1299,8 @@ function goto_attack_space() { }) for_each_movable(game.cmd.attacker, p => { if (piece_space(p) === game.cmd.where) { - set_add(game.cmd.selected, p) if (game.cmd.attacker === MI || !set_has(game.cmd.pieces, p)) { + set_add(game.cmd.selected, p) set_add(game.cmd.pieces, p) game.cmd.n_units[0] += 1 } @@ -1528,6 +1528,13 @@ states.attack_casualties = { ) { view.prompt = `Attack: Remove ${game.cmd.count} piece${game.cmd.count > 1 ? "s" : ""} as casualties.` + // Adding all units in space as targets + if (game.cmd.step === 3) { + for_each_movable(game.cmd.attacker, p => { + if (piece_space(p) === game.cmd.where) { set_add(game.cmd.selected, p) } + }) + } + for (let p of game.cmd.selected) if (piece_faction(p) === game.current) gen_action_piece(p) |