diff options
Diffstat (limited to 'rules.ts')
-rw-r--r-- | rules.ts | 23 |
1 files changed, 10 insertions, 13 deletions
@@ -1468,15 +1468,12 @@ states.draw_glory = { game.glory.push(faction); - // TODO: remove if statement, just here atm to not break - // running games - 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); @@ -2779,12 +2776,12 @@ function gain_hero_points( if ( !skip_abilities && faction_id === ANARCHISTS_ID && - // TODO: remove || [] and replace filter with array_remove - (game.active_abilities || []).includes(ANARCHIST_EXTRA_HERO_POINT) + game.active_abilities.includes(ANARCHIST_EXTRA_HERO_POINT) ) { value++; - game.active_abilities = (game.active_abilities || []).filter( - (ability) => ability !== ANARCHIST_EXTRA_HERO_POINT + array_remove( + game.active_abilities, + game.active_abilities.indexOf(ANARCHIST_EXTRA_HERO_POINT) ); } if ( |