summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js47
1 files changed, 5 insertions, 42 deletions
diff --git a/rules.js b/rules.js
index 59577fe..35512ac 100644
--- a/rules.js
+++ b/rules.js
@@ -223,7 +223,6 @@ const numberless_cards = [1, 2, 3, 4, 5, 6, 37, 38, 39, 40, 41, 42, 43, 44, 45,
const auto_resolve_events = [5, 8, 9, 13, 17, 25, 26, 30, 35, 50, 53, 54, 58, 59, 62, 63, 65, 70, 72, 74, 86, 99, 102, 108]
const switch_events = [6, 20, 71]
const one_turn_events = [ 8, 13, 25, 50, 63, 74, 49, 58, 59, 100, 101 ]
-const dem_asterisks = [2, 3, 4, 5, 19, 24, 26, 29, 33, 34, 36, 39, 40, 45, 46, 48, 49, 50, 54, 56, 58, 60, 61, 62, 63, 64, 65, 66, 68, 71, 72, 73, 74, 75, 77, 81, 84, 86, 87, 89, 90, 91, 93, 94, 97, 103, 105, 108, 110]
const PC_TACTIC_FAILS = 52
const PC_SUPPORT_FALTERS = 49
@@ -249,7 +248,7 @@ exports.roles = [ DEM, COM ]
// --- SET UP ---
-exports.setup = function (seed, scenario, options) {
+exports.setup = function (seed, scenario, _options) {
game = {
seed: seed,
log: [],
@@ -1330,8 +1329,9 @@ states.power_struggle = {
log_gap(`Played P${PC_TACTIC_FAILS}: P${game.played_power_card} no longer playable`)
}
} else {
- if (game.phase === 0 && leader_cards.includes(card)) {} /* Log nothing. Probably a better way to do this */
- else if (numberless_cards.includes(card)) {
+ if (game.phase === 0 && leader_cards.includes(card)) {
+ /* Log nothing. Probably a better way to do this */
+ } else if (numberless_cards.includes(card)) {
log_gap(`Played: P${card}`)
} else {
log_gap(`Played: P${card} V${power_cards[card].value}`)
@@ -2883,12 +2883,6 @@ function check_vp() {
return false
}
-function game_over() {
- if (game.vp >= 20 || game.vp <= -20) {
- return true
- } else { return false}
-}
-
function goto_game_over(result, victory) {
game.state = "game_over"
game.active = "None"
@@ -3909,15 +3903,6 @@ function log_side() {
log_br()
}
-function log_sep() {
- log(".hr")
-}
-
-function log_action(msg) {
- log_br()
- log(msg)
-}
-
// ============= SUMMARY FUNCTIONS =============
function push_summary() {
@@ -4105,18 +4090,6 @@ function vm_endif() {
vm_next()
}
-function vm_goto_step(step) {
- for (let i = game.vm.ip; i < CODE[game.vm.fp].length; i++) {
- if (CODE[game.vm.fp][i][0] === step) {
- game.vm.ip = i
- vm_exec()
- return
- }
- }
-
- console.log("ERROR: Target operation not found in the current procedure.")
-}
-
function vm_goto(op, nop, dir, step) {
let balance = 1
while (balance > 0) {
@@ -4204,16 +4177,6 @@ function vm_valid_spaces() {
vm_next()
}
-function vm_valid_spaces_com() {
- let operand = vm_operand(1)
- let space = spaces.find(space => space.ascii_name === operand)
- if (game.comInfl[space.space_id] >0) {
- game.valid_spaces.push(space.space_id)
- }
- check_systematization()
- vm_next()
-}
-
function vm_valid_spaces_opponent () {
let valid_spaces = []
for (let i = 0; i < spaces.length; i++) {
@@ -6895,7 +6858,7 @@ states.vm_kremlin_coup_sc_prep = {
view.prompt = `Kremlin Coup! Conduct a support check in ${country_name(game.vm_active_country)}'s Bureaucratic space.`
gen_action_space(game.selected_space)
},
- space(space) {
+ space(_space) {
push_undo()
game.state = 'vm_kremlin_coup_sc'
}