summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-09 11:57:03 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-09 11:57:03 +0100
commitfd2f3f6d70d1641c435a37a6f06d67fb04d22bb1 (patch)
tree0ebe9084527ec13a2b64341fb0c0744c6a5c0c2c
parent5b3fbba3357ab3de000cde0cead9dc1edeaffb1a (diff)
downloadmaria-fd2f3f6d70d1641c435a37a6f06d67fb04d22bb1.tar.gz
Flanders mixed stacking permission. No modifying Bavarian subsidy.
-rw-r--r--rules.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/rules.js b/rules.js
index e3127f4..c36946d 100644
--- a/rules.js
+++ b/rules.js
@@ -2402,8 +2402,8 @@ function resume_movement_after_flanders_stacking() {
flush_alternate_move()
set_active_to_power(coop_major_power(game.power))
game.selected = -1
+ // keep moving with new power
game.state = "movement"
- // TODO: proper alternation? resume_movement() ?
}
function is_forbidden_neutral_space(pow, to) {
@@ -3026,15 +3026,17 @@ states.move_give = {
}
function is_flanders_stack_move() {
- let here = game.pos[game.selected]
- if (is_flanders_space(here)) {
- if (game.power === P_PRAGMATIC) {
- if (find_general_of_power(here, P_AUSTRIA) >= 0)
- return true
- }
- if (game.power === P_AUSTRIA) {
- if (find_general_of_power(here, P_PRAGMATIC) >= 0)
- return true
+ if (!is_two_player()) {
+ let here = game.pos[game.selected]
+ if (is_flanders_space(here)) {
+ if (game.power === P_PRAGMATIC) {
+ if (find_general_of_power(here, P_AUSTRIA) >= 0)
+ return true
+ }
+ if (game.power === P_AUSTRIA) {
+ if (find_general_of_power(here, P_PRAGMATIC) >= 0)
+ return true
+ }
}
}
return false
@@ -3078,6 +3080,7 @@ function end_move_piece() {
}
delete game.move_path
+ delete game.forbidden
// uniting stacks: flag all as moved
let supreme = false
@@ -3091,9 +3094,6 @@ function end_move_piece() {
}
}
- if (game.flags & F_MOVE_FLANDERS)
- delete game.forbidden
-
if (supreme)
game.state = "move_supreme"
else if (is_flanders_stack_move())
@@ -3178,11 +3178,8 @@ states.confirm_flanders_stack_2 = {
view.actions.refuse = 1
},
accept() {
+ push_undo()
delete game.proposal
- if (game.power === P_AUSTRIA)
- set_active_to_power(P_PRAGMATIC)
- else
- set_active_to_power(P_AUSTRIA)
resume_movement_after_flanders_stacking()
},
refuse() {
@@ -5422,7 +5419,7 @@ function goto_saxony_becomes_neutral(reason) {
map_delete(game.contracts[P_PRUSSIA], P_SAXONY)
// Return all victory markers
- log(">Removed victory markers")
+ log("Removed victory markers.")
for (let s of all_home_country_fortresses[P_SAXONY]) {
let pow = map_get(game.victory, s, -1)
if (pow >= 0) {
@@ -6031,6 +6028,8 @@ states.propose_subsidy_to = {
prompt(`Subsidy contract from ${power_name[from]} to who?`)
for (let to of (is_two_player() ? all_minor_powers : all_powers)) {
if (from !== to && is_allied_power(from, to)) {
+ if (from === P_FRANCE && to === P_BAVARIA && game.turn <= 3)
+ continue // may not modify first 3-turn contract
if (to === P_SAXONY && is_saxony_neutral())
continue
gen_action_power(to)