summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.html4
-rw-r--r--play.js2
-rw-r--r--rules.js19
3 files changed, 10 insertions, 15 deletions
diff --git a/play.html b/play.html
index 4bdc52e..122d23a 100644
--- a/play.html
+++ b/play.html
@@ -48,6 +48,10 @@
<div class="role_stat" id="role_stat_com">0 cards in hand</div>
<div class="role_user">-</div>
</div>
+ <div class="role" id="deck_data">
+ <div class="deck_name">Strategy deck:</div>
+ <div class="role_stat" id="deck_length">0 cards</div>
+ </div>
</div>
<div id="log"></div>
</aside>
diff --git a/play.js b/play.js
index 55efbb4..5c32a73 100644
--- a/play.js
+++ b/play.js
@@ -268,6 +268,7 @@ let ui = {
power_cards: [null],
dem_hand_count: document.getElementById("role_stat_dem"),
com_hand_count: document.getElementById("role_stat_com"),
+ deck_length: document.getElementById("deck_length"),
played_card: 0,
table_panel: document.getElementById("table_panel"),
hand_panel: document.getElementById("hand_panel"),
@@ -382,6 +383,7 @@ function on_update() {
} else{
ui.dem_hand_count.innerText = `${view.democrat_hand} cards in hand`
ui.com_hand_count.innerText = `${view.communist_hand} cards in hand`
+ ui.deck_length.innerText = `${view.strategy_deck} cards`
}
// UPDATE HAND
diff --git a/rules.js b/rules.js
index 96cdc0c..a023604 100644
--- a/rules.js
+++ b/rules.js
@@ -43,8 +43,6 @@ exports.setup = function (seed, scenario, options) {
vm_event: 0,
vm_event_to_do: false,
vm_infl_to_do: false,
- vm_influence_added: {},
- vm_max_infl: 0,
played_card: 0,
table_cards: [],
@@ -3314,8 +3312,6 @@ function end_round() {
game.vm_active_country = ''
game.return_state = ''
game.discard = false
- //game.warsaw_pact_summit = false
- game.vm_influence_added = {}
game.return = ''
game.valid_cards = []
game.valid_spaces = []
@@ -4249,19 +4245,12 @@ function pop_vm_prompt() {
}
function vm_return() {
- /* let return_vm = game.vm.return_vm;
- console.log('in vm_return')
- // Return control to the phasing player
- if (return_vm) {
- game.vm = return_vm;
- vm_next();
- } else {
- // End of VM execution, return to normal game state
- game.state = "play_card";
- } */
- console.log('in vm_return, discard:', game.strategy_discard)
+ //Remove temporary vm variables
delete game.support_check_modifier
+ delete game.vm_max_infl
+ delete game.vm_influence_added
+
game.vm_event = 0 /*Reset to 0 now that event has been completed. Hopefully this doesn't cause issues! */
if (game.persistent_events.includes(58)) {
reset_austria_hungary_border_reopened()