summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js23
1 files changed, 16 insertions, 7 deletions
diff --git a/rules.js b/rules.js
index d29a7d7..21262a8 100644
--- a/rules.js
+++ b/rules.js
@@ -4891,11 +4891,20 @@ states.political_shift = {
prompt() {
let info = event_shift[current_political_effect()]
prompt("Shift " + TRACK_NAME[info.track] + ".")
- if (info.condition === undefined || info.condition())
- view.actions.shift = info.amount
+ if (info.condition === undefined || info.condition()) {
+ if (info.track === "saxony")
+ view.actions.shift_saxony = info.amount
+ if (info.track === "russia")
+ view.actions.shift_russia = info.amount
+ if (info.track === "italy")
+ view.actions.shift_italy = info.amount
+ }
view.actions.pass = 1
view.pc = game.pc
},
+ shift_italy(n) { this.shift(n) },
+ shift_russia(n) { this.shift(n) },
+ shift_saxony(n) { this.shift(n) },
shift(n) {
push_undo()
let info = event_shift[current_political_effect()]
@@ -5079,10 +5088,10 @@ states.saxony_shift_battle = {
inactive: "shift Saxony marker",
prompt() {
prompt(`Shift Saxony marker ${game.count} to the right.`)
- view.actions.shift = [ 1 ]
+ view.actions.shift_saxony = [ 1 ]
view.actions.pass = 1
},
- shift(_) {
+ shift_saxony(_) {
log("Saxony marker " + game.count + " right.")
let save_saxony = game.saxony
game.saxony = Math.max(1, Math.min(5, game.saxony + game.count))
@@ -5107,12 +5116,12 @@ states.saxony_shift_supply = {
inactive: "shift Saxony marker",
prompt() {
prompt(`Shift Saxony marker up to ${game.count} to the right.`)
- view.actions.shift = []
+ view.actions.shift_saxony = []
for (let i = 1; i <= game.count; ++i)
- view.actions.shift.push(i)
+ view.actions.shift_saxony.push(i)
view.actions.pass = 1
},
- shift(n) {
+ shift_saxony(n) {
log("Saxony marker " + n + " right.")
let save_saxony = game.saxony
game.saxony = Math.max(1, Math.min(5, game.saxony + n))