summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-21 00:18:01 +0200
committerTor Andersson <tor@ccxvii.net>2024-10-21 00:49:22 +0200
commit3738bceb82cbfca34e7f4431a09e41ad3f124695 (patch)
tree2ce14838be9344a189e3285421c8ca70d76f94b9
parentc80d41f09ca11bcc41f35e55b55142e22820cfd5 (diff)
downloadmaria-3738bceb82cbfca34e7f4431a09e41ad3f124695.tar.gz
step -> stage rename
-rw-r--r--rules.js34
1 files changed, 17 insertions, 17 deletions
diff --git a/rules.js b/rules.js
index d6cb220..7165442 100644
--- a/rules.js
+++ b/rules.js
@@ -30,7 +30,7 @@ neutrality
*/
-// TODO: austria/pragmatic action step - show both sides cards and interleave movement on flanders map
+// TODO: austria/pragmatic action stage - show both sides cards and interleave movement on flanders map
// PLAN: move all austria on bohemia first, then alternate pragmatic and austria activations on flanders map
// TODO: confirm mixed stack creation on flanders map (force "undo" to previous location if denied?)
@@ -887,22 +887,22 @@ function eliminate_general(p, indent) {
/* SEQUENCE OF PLAY */
-const POWER_FROM_ACTION_STEP = [
+const POWER_FROM_ACTION_STAGE = [
P_FRANCE, // and bavaria
P_PRUSSIA, // and saxony
P_AUSTRIA, // and pragmatic army -- interleave with pragmatic moves on flanders map
P_PRAGMATIC, // interleave with austria moves on flanders map
]
-const title_from_action_step = [
+const title_from_action_stage = [
"=0 France and Bavaria",
"=2 Prussia and Saxony",
"=5 Austria",
"=4 Pragmatic Army",
]
-function set_active_to_current_action_step() {
- set_active_to_power(POWER_FROM_ACTION_STEP[game.step])
+function set_active_to_current_action_stage() {
+ set_active_to_power(POWER_FROM_ACTION_STAGE[game.stage])
}
function goto_end_turn() {
@@ -912,7 +912,7 @@ function goto_end_turn() {
function goto_start_turn() {
game.turn += 1
- game.step = 0
+ game.stage = 0
log("# Turn " + game.turn)
@@ -926,11 +926,11 @@ function goto_start_turn() {
}
function goto_action_stage() {
- set_active_to_current_action_step()
+ set_active_to_current_action_stage()
clear_undo()
- log(title_from_action_step[game.step])
+ log(title_from_action_stage[game.stage])
// TODO: minor powers controlled at the same time
@@ -940,7 +940,7 @@ function goto_action_stage() {
function end_action_stage() {
clear_undo()
- if (++game.step === 4)
+ if (++game.stage === 4)
goto_end_turn()
else
goto_action_stage()
@@ -1335,7 +1335,7 @@ function goto_supply() {
}
function resume_supply() {
- set_active_to_current_action_step()
+ set_active_to_current_action_stage()
if (game.supply.hussars.length > 0)
goto_supply_hussars()
else if (game.supply.restore.length > 0)
@@ -1565,7 +1565,7 @@ function movement_range() {
}
function goto_movement() {
- set_active_to_current_action_step()
+ set_active_to_current_action_stage()
game.state = "movement"
set_clear(game.moved)
@@ -2041,7 +2041,7 @@ function end_move_piece() {
} else {
game.selected = -1
game.state = "movement"
- set_active_to_current_action_step()
+ set_active_to_current_action_stage()
}
}
@@ -2518,7 +2518,7 @@ function goto_combat() {
function next_combat() {
clear_undo()
- set_active_to_current_action_step()
+ set_active_to_current_action_stage()
game.count = 0
delete game.attacker
delete game.defender
@@ -3086,7 +3086,7 @@ function goto_retroactive_conquest() {
/* SETUP */
-const POWER_FROM_SETUP_STEP = [
+const POWER_FROM_SETUP_STAGE = [
P_FRANCE,
P_BAVARIA,
P_PRUSSIA,
@@ -3096,7 +3096,7 @@ const POWER_FROM_SETUP_STEP = [
]
function set_active_setup_power() {
- game.power = POWER_FROM_SETUP_STEP[game.step]
+ game.power = POWER_FROM_SETUP_STAGE[game.stage]
game.active = current_player()
}
@@ -3230,7 +3230,7 @@ exports.setup = function (seed, _scenario, _options) {
power: P_FRANCE,
turn: 0,
- step: 0,
+ stage: 0,
pol_deck: null,
deck: null,
hand: [ [], [], [], [], [], [] ],
@@ -3360,7 +3360,7 @@ states.setup_general = {
}
function end_setup() {
- if (++game.step === 6) {
+ if (++game.stage === 6) {
goto_start_turn()
} else {
set_active_setup_power()