diff options
-rw-r--r-- | rules.js | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -1513,7 +1513,7 @@ function next_strategy_card() { log_br() log("Tournament Rule!") log("British replacement card.") - set_add(game.b_hand, game.card = deal_card()) + set_add(game.b_hand, game.replacement_card = deal_card()) game.state = "draw_replacement_card_tournament" return } @@ -1564,7 +1564,7 @@ function clear_queue() { function draw_british_replacement() { if (game.b_draw > 0) { log("British replacement card.") - set_add(game.b_hand, game.card = deal_card()) + set_add(game.b_hand, game.replacement_card = deal_card()) game.b_draw-- return true } @@ -1574,7 +1574,7 @@ function draw_british_replacement() { function draw_american_replacement() { if (game.a_draw > 0) { log("American replacement card.") - set_add(game.a_hand, game.card = deal_card()) + set_add(game.a_hand, game.replacement_card = deal_card()) game.a_draw-- return true } @@ -1584,13 +1584,13 @@ function draw_american_replacement() { states.draw_replacement_card = { inactive: "to draw a replacement card", prompt() { - view.prompt = "You drew " + card_name(game.card) + "." - view.selected_card = game.card + view.prompt = "You drew " + card_name(game.replacement_card) + "." + view.selected_card = game.replacement_card view.actions.next = 1 }, next() { clear_undo() - game.card = 0 + delete game.replacement_card next_strategy_card() }, } @@ -1598,14 +1598,14 @@ states.draw_replacement_card = { states.draw_replacement_card_opponent = { inactive: "to draw a replacement card", prompt() { - view.prompt = "You drew " + card_name(game.card) + "." - view.selected_card = game.card + view.prompt = "You drew " + card_name(game.replacement_card) + "." + view.selected_card = game.replacement_card view.actions.next = 1 }, next() { clear_undo() + delete game.replacement_card game.active = ENEMY[game.active] - game.card = 0 next_strategy_card() }, } @@ -1613,12 +1613,13 @@ states.draw_replacement_card_opponent = { states.draw_replacement_card_tournament = { inactive: "to draw a replacement card", prompt() { - view.prompt = "You drew " + card_name(game.card) + "." - view.selected_card = game.card + view.prompt = "You drew " + card_name(game.replacement_card) + "." + view.selected_card = game.replacement_card view.actions.next = 1 }, next() { clear_undo() + delete game.replacement_card goto_strategy_phase(game.active) }, } |