From af6f5046978e0808287a3eaeea090e02e7afa949 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 28 Mar 2025 17:45:33 +0100 Subject: Add "medallion" source type for use with Momentum/Archives/Volunteers. --- rules.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index 645d7b7..72edae1 100644 --- a/rules.js +++ b/rules.js @@ -1729,9 +1729,14 @@ states.remove_blank_marker = { pay_hero_points(faction, 1); const track_id = Math.floor(b / 11); const space_id = b % 11; - logp(`removed blank marker from ${get_track_name(track_id)} ${space_id}`); game.triggered_track_effects = game.triggered_track_effects.filter((id) => id !== b); - game.used_medallions.push(data_1.ARCHIVES_MEDALLION_ID); + if (get_active_node_args()?.src === 'medallion') { + logi(`M${data_1.ARCHIVES_MEDALLION_ID} removed Blank from ${get_track_name(track_id)} ${space_id}`); + game.used_medallions.push(data_1.ARCHIVES_MEDALLION_ID); + } + else { + logi(`Removed Blank from ${get_track_name(track_id)} ${space_id}`); + } resolve_active_and_proceed(); }, skip() { @@ -1885,6 +1890,7 @@ states.spend_hero_points = { const faction = get_active_faction(); pay_hero_points(faction, 1); insert_after_active_node(create_state_node('add_to_front', faction, { + src: 'medallion', t: data_1.ANY, v: 1, })); @@ -1912,7 +1918,7 @@ states.spend_hero_points = { else { game.used_medallions = [data_1.ARCHIVES_MEDALLION_ID]; } - insert_after_active_node(create_state_node('remove_blank_marker', faction)); + insert_after_active_node(create_state_node('remove_blank_marker', faction, { 'src': 'medallion' })); resolve_active_and_proceed(); }, tr0(x) { @@ -3007,6 +3013,8 @@ function get_source_name(source) { case 'tr4': return tracks[4].name + ' Trigger'; case 'track_icon': throw "UNUSED"; + case 'medallion': + return "Medallion"; case data_1.MOMENTUM: return 'Momentum'; } -- cgit v1.2.3