diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-03-28 17:45:33 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-03-28 17:45:33 +0100 |
commit | af6f5046978e0808287a3eaeea090e02e7afa949 (patch) | |
tree | bd9a6a507de29c5a4878081fe5fb2403a1346368 /rules.js | |
parent | 93e9fab572ce3a90ad18ac83504ec3d05f3b60c2 (diff) | |
download | land-and-freedom-af6f5046978e0808287a3eaeea090e02e7afa949.tar.gz |
Add "medallion" source type for use with Momentum/Archives/Volunteers.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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'; } |