From 0664662395403efb0a6a43c8dc6d8a20ced54cf3 Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Sun, 9 Mar 2025 13:55:05 +0100 Subject: resolve spend hero points state immediately --- rules.js | 13 ++----------- rules.ts | 13 ++----------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/rules.js b/rules.js index 69c3e8c..da7fd96 100644 --- a/rules.js +++ b/rules.js @@ -1665,13 +1665,6 @@ states.return_card = { }; states.spend_hero_points = { inactive: 'spend Hero points', - auto_resolve() { - const hero_points = game.hero_points[get_active_faction()]; - if (hero_points === 0) { - return true; - } - return false; - }, prompt() { const hero_points = game.hero_points[get_active_faction()]; view.prompt = `Spend up to ${hero_points} Hero Points.`; @@ -1728,13 +1721,13 @@ states.spend_hero_points = { }); update_bonus(b, data_1.ON); pay_hero_points(get_active_faction(), 2); - next(); + resolve_active_and_proceed(); }, draw_card() { const faction = get_active_faction(); pay_hero_points(faction, 1); draw_hand_cards(faction, 1); - next(); + resolve_active_and_proceed(); }, remove_blank_marker() { const faction = get_active_faction(); @@ -1746,7 +1739,6 @@ states.spend_hero_points = { } insert_after_active_node(create_seq_node([ create_state_node('remove_blank_marker', faction), - create_state_node('spend_hero_points', faction), ])); resolve_active_and_proceed(); }, @@ -1768,7 +1760,6 @@ states.spend_hero_points = { track_id, strength: 1, }), - create_state_node('spend_hero_points', faction), ])); resolve_active_and_proceed(); }, diff --git a/rules.ts b/rules.ts index 8a6918b..c528950 100644 --- a/rules.ts +++ b/rules.ts @@ -2052,13 +2052,6 @@ states.return_card = { states.spend_hero_points = { inactive: 'spend Hero points', - auto_resolve() { - const hero_points = game.hero_points[get_active_faction()]; - if (hero_points === 0) { - return true; - } - return false; - }, prompt() { const hero_points = game.hero_points[get_active_faction()]; @@ -2129,13 +2122,13 @@ states.spend_hero_points = { }); update_bonus(b, ON); pay_hero_points(get_active_faction(), 2); - next(); + resolve_active_and_proceed(); }, draw_card() { const faction = get_active_faction(); pay_hero_points(faction, 1); draw_hand_cards(faction, 1); - next(); + resolve_active_and_proceed(); }, remove_blank_marker() { const faction = get_active_faction(); @@ -2147,7 +2140,6 @@ states.spend_hero_points = { insert_after_active_node( create_seq_node([ create_state_node('remove_blank_marker', faction), - create_state_node('spend_hero_points', faction), ]) ); resolve_active_and_proceed(); @@ -2170,7 +2162,6 @@ states.spend_hero_points = { track_id, strength: 1, }), - create_state_node('spend_hero_points', faction), ]) ); resolve_active_and_proceed(); -- cgit v1.2.3