summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js5
-rw-r--r--rules.js23
2 files changed, 21 insertions, 7 deletions
diff --git a/play.js b/play.js
index 6e99804..e5bb15b 100644
--- a/play.js
+++ b/play.js
@@ -1346,8 +1346,8 @@ function on_update() {
action_button("subsidy", "Subsidy")
action_button("cancel", "Cancel")
- action_button("reduce", "Reduce military objectives")
- action_button("offer", "Offer peace")
+ action_button("reduce", "Reduce")
+ action_button("peace", "Peace")
action_button("accept", "Accept")
action_button("refuse", "Refuse")
@@ -1369,6 +1369,7 @@ function on_update() {
action_button("done", "Done")
action_button("end_political_card", "End political card")
+ action_button("end_place_hussars", "End place hussars")
action_button("end_cards", "End card draw")
action_button("end_setup", "End setup")
action_button("end_recruit", "End recruit")
diff --git a/rules.js b/rules.js
index 57f0da4..c47801f 100644
--- a/rules.js
+++ b/rules.js
@@ -1244,7 +1244,7 @@ states.place_hussars = {
if (!set_has(game.moved, p))
gen_action_piece(p)
if (!has_any_hussar(ELIMINATED))
- view.actions.next = 1
+ view.actions.end_place_hussars = 1
},
piece(p) {
push_undo()
@@ -1252,7 +1252,7 @@ states.place_hussars = {
game.selected = p
game.state = "place_hussars_where"
},
- next() {
+ end_place_hussars() {
end_place_hussars()
},
}
@@ -2111,6 +2111,7 @@ states.movement = {
this.end_movement()
},
end_movement() {
+ push_undo()
if (game.flags & F_MOVE_FLANDERS) {
for (let p of all_power_pieces[game.power])
if (is_flanders_space(game.pos[p]))
@@ -4645,10 +4646,10 @@ states.offer_peace = {
inactive: "offer peace",
prompt() {
prompt("Annex Silesia and offer temporary peace with Austria?")
- view.actions.offer = 1
+ view.actions.peace = 1
view.actions.pass = 1
},
- offer() {
+ peace() {
set_active_to_power(P_AUSTRIA)
game.state = "accept_peace"
},
@@ -4894,6 +4895,7 @@ states.france_reduces_military_objectives = {
view.actions.pass = 1
},
reduce() {
+ push_undo()
game.flags |= F_FRANCE_REDUCED
let n = 0
for (let s of all_core_austria_fortresses) {
@@ -4906,13 +4908,24 @@ states.france_reduces_military_objectives = {
n = (n + 1) >> 1
log("France set aside " + n + " victory markers.")
game.vp[SET_ASIDE_FRANCE] = n
- next_sequence_of_play()
+ game.state = "france_reduces_military_objectives_done"
},
pass() {
next_sequence_of_play()
},
}
+states.france_reduces_military_objectives_done = {
+ inactive: "supply",
+ prompt() {
+ prompt("Set aside " + game.vp[SET_ASIDE_FRANCE] + " victory markers.")
+ view.actions.next = 1
+ },
+ next() {
+ next_sequence_of_play()
+ },
+}
+
/* IMPERIAL ELECTION */
const POWER_FROM_IMPERIAL_ELECTION_STAGE = [