summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js24
1 files changed, 18 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index 639ff2d..162e309 100644
--- a/rules.js
+++ b/rules.js
@@ -2457,6 +2457,14 @@ function resume_movement_after_flanders_stacking() {
game.state = "movement"
}
+function is_neutral_power(pow) {
+ if (pow === P_SAXONY)
+ return is_saxony_neutral()
+ if (pow === P_PRUSSIA)
+ return is_prussia_neutral()
+ return false
+}
+
function is_forbidden_neutral_space(pow, to) {
if (is_saxony_neutral()) {
if (pow === P_SAXONY) {
@@ -3279,10 +3287,12 @@ function can_train_re_enter(p) {
}
function has_re_entry_space_for_supply_train(pow) {
- if (coop_minor_power(pow) !== pow)
- return can_re_enter_train_at_power_fortress(pow) || can_re_enter_train_at_power_fortress(coop_minor_power(pow))
- else
- return can_re_enter_train_at_power_fortress(pow)
+ if (can_re_enter_train_at_power_fortress(pow))
+ return true
+ let minor = coop_minor_power(pow)
+ if (minor !== pow && !is_neutral_power(minor))
+ return can_re_enter_train_at_power_fortress(minor)
+ return false
}
function gen_re_enter_train_at_power_fortress(pow) {
@@ -3392,8 +3402,9 @@ states.re_enter_train_where = {
view.draw = game.recruit.pool
gen_re_enter_train_at_power_fortress(game.power)
- if (coop_minor_power(game.power) !== game.power)
- gen_re_enter_train_at_power_fortress(coop_minor_power(game.power))
+ let minor = coop_minor_power(game.power)
+ if (minor !== game.power && !is_neutral_power(minor))
+ gen_re_enter_train_at_power_fortress(minor)
},
space(to) {
enter_train_at(game.selected, to)
@@ -5456,6 +5467,7 @@ states.send_expeditionary_corps = {
game.pos[p] = s
if (game.troops[p] === 0) {
+ game.count = 0
game.recruit = {
pool: [],
used: [],