diff options
-rw-r--r-- | rules.js | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -2095,6 +2095,7 @@ states.take_actions = { place_militia() { push_undo() let where = get_governor_location(game.selected_governor) + log("Place Militia in %" + where + ".") spend_populace(2) add_militia(where) resume_take_actions() @@ -5023,15 +5024,17 @@ function goto_end_of_turn() { } function goto_grow_mobs() { - for (let where = 0; where < 12; ++where) { - if ((game.count & (1 << where)) === 0) { - if (is_own_province(where) && get_mobs(where) && !has_amphitheater(where)) { - game.state = "grow_mobs" - return - } - } + game.count = 0 + for (let where = 0; where < 12; ++where) + if ((game.count & (1 << where)) === 0) + if (is_own_province(where) && get_mobs(where) && !has_amphitheater(where)) + game.count |= (1 << where) + if (game.count) { + game.state = "grow_mobs" + log_br() + } else { + goto_flip_inactive_barbarians() } - goto_flip_inactive_barbarians() } states.grow_mobs = { @@ -5040,15 +5043,16 @@ states.grow_mobs = { prompt("End of Turn: Add a mob in each province you govern with mob and no amphitheater.") view.color = POPULACE for (let where = 0; where < 12; ++where) - if ((game.count & (1 << where)) === 0) - if (is_own_province(where) && get_mobs(where) && !has_amphitheater(where)) - gen_action_region(where) + if (game.count & (1 << where)) + gen_action_region(where) }, region(where) { push_undo() - game.count |= (1 << where) + log("Mob grows in %" + where + ".") set_mobs(where, get_mobs(where) + 1) - goto_grow_mobs() + game.count &= !(1 << where) + if (game.count === 0) + goto_flip_inactive_barbarians() }, } |