diff options
-rw-r--r-- | rules.js | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -2106,8 +2106,9 @@ function is_n_from_warangal(n, s) { return true } else if (path.length < n) { for (let neighbor of SPACES[node].adjacent) { - if (!set_has(path, neighbor) && !set_has(game.decree.campaign, neighbor)) { - queue.push([neighbor, [...path, neighbor]]); + // if (!set_has(path, neighbor) && !set_has(game.decree.campaign, neighbor)) { + if (!set_has(path, neighbor) && !game.decree.campaign.includes(neighbor)) { + queue.push([neighbor, [...path, neighbor]]); } } } @@ -2763,6 +2764,8 @@ states.plunder_remove = { function end_plunder() { if (game.summary && game.summary.length > 0) { pop_summary() + } else if (game.summary) { + game.summary = null } let n = count_pieces(game.cmd.where, MI, TROOPS) - 3 @@ -5564,9 +5567,9 @@ states.vm_conspire_trade = { states.vm_govern_attack_demand = { prompt() { event_prompt("Govern, Attack or Demande Obedience in selected Province.") - view.actions.govern = can_govern() ? 1 : 0 - view.actions.attack = can_attack() ? 1 : 0 - view.actions.demand = can_demand() ? 1 : 0 + view.actions.govern = can_govern() && can_govern_in_space(game.vm.s) ? 1 : 0 + view.actions.attack = can_attack() && can_attack_in_space(game.vm.s) ? 1 : 0 + view.actions.demand = can_demand() && can_demand_in_space(game.vm.s) ? 1 : 0 }, govern() { push_undo() |