diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 52 |
1 files changed, 26 insertions, 26 deletions
@@ -27,7 +27,7 @@ Special card rules implemented: */ // TODO: morale cube limit (cannot place on special if maxed) -// TODO: fizzle when action says to take cards from other dice? +// TODO: null action when action says to take cards from other dice? const data = require("./data.js") @@ -522,13 +522,13 @@ function pursue_card(c) { eliminate_card(c) } -function remove_card(c) { - log(c + " removed.") +function retire_card(c) { + log(c + " retired.") eliminate_card(c) } -function retire_card(c) { - log(c + " retired.") +function remove_card(c) { + log(c + " removed.") eliminate_card(c) } @@ -596,7 +596,7 @@ function is_card_in_play_or_reserve(c) { ) } -function is_routed(c) { +function is_removed_from_play(c) { return !is_card_in_play_or_reserve(c) } @@ -927,9 +927,9 @@ function can_place_dice(c) { if (game.scenario === S8_BROOKLYN_HEIGHTS) { if (c === S8_CLINTON) { - if (is_routed(S8_GRANT)) + if (is_removed_from_play(S8_GRANT)) return false - if (is_routed(S8_HESSIANS)) + if (is_removed_from_play(S8_HESSIANS)) return false } } @@ -1688,7 +1688,7 @@ states.action = { if (can_take_action(c, data.cards[c].actions[0], 0)) gen_action_action1(c) else if (has_dice) - gen_action_fizzle1(c) + gen_action_null1(c) } } if (data.cards[c].actions.length >= 2) { @@ -1696,7 +1696,7 @@ states.action = { if (can_take_action(c, data.cards[c].actions[1], 1)) gen_action_action2(c) else if (has_dice) - gen_action_fizzle2(c) + gen_action_null2(c) } } if (data.cards[c].retire) @@ -1717,13 +1717,13 @@ states.action = { push_undo() goto_take_action(c, 1) }, - f1(c) { + n1(c) { push_undo() - goto_fizzle(c) + goto_null(c) }, - f2(c) { + n2(c) { push_undo() - goto_fizzle(c) + goto_null(c) }, roll() { clear_undo() @@ -1732,7 +1732,7 @@ states.action = { }, } -function goto_fizzle(c) { +function goto_null(c) { log("Fizzled " + card_number(c)) pay_for_action(c) end_action_phase() @@ -2175,7 +2175,7 @@ function can_take_reaction(c, a, wild) { if (game.scenario === S15_TEWKESBURY) { if (c === S15_WENLOCK) { - if (is_routed(S15_SOMERSET)) + if (is_removed_from_play(S15_SOMERSET)) return false } } @@ -2183,7 +2183,7 @@ function can_take_reaction(c, a, wild) { if (game.scenario === S31_NEWBURY_1ST) { if (c === S31_GERARD) { // TODO: or is it while London New Bands is in play? - if (is_routed(S31_SKIPPON)) + if (is_removed_from_play(S31_SKIPPON)) return false } } @@ -2545,7 +2545,7 @@ function should_rout_card(c) { let rout_with = card_has_rule(c, "rout_with") if (rout_with) { for (let other of rout_with) - if (!is_routed(other)) + if (!is_removed_from_play(other)) return false return true } @@ -2564,7 +2564,7 @@ function should_remove_card(c) { let remove_with = card_has_rule(c, "remove_with") if (remove_with) { for (let other of remove_with) - if (!is_routed(other)) + if (!is_removed_from_play(other)) return false return true } @@ -2575,7 +2575,7 @@ function should_retire_card(c) { let retire_with = card_has_rule(c, "retire_with") if (retire_with) { for (let other of retire_with) - if (!is_routed(other)) + if (!is_removed_from_play(other)) return false return true } @@ -2722,14 +2722,14 @@ function should_enter_reserve(c) { if (Array.isArray(reserve)) { for (let t of reserve) { - if (is_routed(t)) + if (is_removed_from_play(t)) return true } } if (game.scenario === S30_EDGEHILL) { if (c === S30_BALFOUR || c === S30_STAPLETON) { - return is_routed(S30_RUPERT) && is_routed(S30_WILMOT) + return is_removed_from_play(S30_RUPERT) && is_removed_from_play(S30_WILMOT) } } @@ -2804,12 +2804,12 @@ function gen_action_action2(c) { gen_action("a2", c) } -function gen_action_fizzle1(c) { - gen_action("f1", c) +function gen_action_null1(c) { + gen_action("n1", c) } -function gen_action_fizzle2(c) { - gen_action("f2", c) +function gen_action_null2(c) { + gen_action("n2", c) } function gen_action_retire(c) { |