From 188272eb9c875d82a9e87be91c98c1deabe6ea4b Mon Sep 17 00:00:00 2001 From: Frans Bongers Date: Wed, 19 Mar 2025 20:13:20 +0100 Subject: removed code no longer needed for compatability --- rules.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index c2b93f0..c231e0e 100644 --- a/rules.js +++ b/rules.js @@ -1176,13 +1176,11 @@ states.draw_glory = { const index = random(game.bag_of_glory.length); const faction = game.bag_of_glory[index]; game.glory.push(faction); - if (!game.glory_current_year) { - game.glory_current_year = game.glory_current_year = { - a: false, - c: false, - m: false, - }; - } + game.glory_current_year = game.glory_current_year = { + a: false, + c: false, + m: false, + }; game.glory_current_year[faction] = true; array_remove(game.bag_of_glory, index); logi(`Pulled T${faction} from the Bag`); @@ -2245,9 +2243,9 @@ function gain_hero_points(faction_id, value, skip_abilities = false) { } if (!skip_abilities && faction_id === data_1.ANARCHISTS_ID && - (game.active_abilities || []).includes(data_1.ANARCHIST_EXTRA_HERO_POINT)) { + game.active_abilities.includes(data_1.ANARCHIST_EXTRA_HERO_POINT)) { value++; - game.active_abilities = (game.active_abilities || []).filter((ability) => ability !== data_1.ANARCHIST_EXTRA_HERO_POINT); + array_remove(game.active_abilities, game.active_abilities.indexOf(data_1.ANARCHIST_EXTRA_HERO_POINT)); } if (!skip_abilities && faction_id === data_1.COMMUNISTS_ID && -- cgit v1.2.3