diff options
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2025,14 +2025,14 @@ states.remove_attack_from_fronts = { card_id === 6 ? 'Remove an attack from a Front.' : 'Remove attacks from a Front.'; - const front_data = f ?? {}; + const front_data = f ?? []; let is_front_with_attacks = false; FRONTS.forEach((id) => { if (game.fronts[id].value >= 0 || game.fronts[id].status !== null) { return; } - if (card_id === 6 && front_data[id]) { + if (card_id === 6 && front_data.includes(id)) { return; } is_front_with_attacks = true; @@ -2054,12 +2054,12 @@ states.remove_attack_from_fronts = { update_front(id, removed_value, get_active_faction()); - const fronts = f ?? {}; - fronts[id] = removed_value; + const fronts = f ?? []; + fronts.push(id); update_active_node_args({ f: fronts }); - if (card_id === 6 && Object.keys(fronts).length === 3) { + if (card_id === 6 && fronts.length === 3) { resolve_active_and_proceed(); } else if (card_id === 39 || card_id === 16) { insert_after_active_node( @@ -2075,7 +2075,7 @@ states.remove_attack_from_fronts = { }, skip() { const { f, v: card_id } = get_active_node_args(); - const values: number[] = Object.values(f ?? {}); + const values = f ?? []; if (card_id === 39 && values.length > 0) { insert_after_active_node( create_state_node('attack_front', get_active_faction(), { |