summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-10-31 11:19:57 +0100
committerTor Andersson <tor@ccxvii.net>2022-11-30 13:26:51 +0100
commit7d43c414ba32a664019152dd1d50b143d9d214f2 (patch)
tree702e894ec9b31af30e26c27ef334071b78bdcabb
parentdbf5c2ef44b6ea1ff9e37098517f8bbbda2bb479 (diff)
downloadcrusader-rex-7d43c414ba32a664019152dd1d50b143d9d214f2.tar.gz
Regroup after Assassins kill last block in siege.
-rw-r--r--rules.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 5d33bb6..cf46b40 100644
--- a/rules.js
+++ b/rules.js
@@ -1349,6 +1349,7 @@ function goto_event_card(event) {
function goto_assassins() {
game.state = 'assassins'
game.who = ASSASSINS
+ game.assassins = 1
}
states.assassins = {
@@ -1406,11 +1407,15 @@ states.assassins_show_2 = {
}
function assassins_next_2() {
- lift_siege(game.where)
game.location[ASSASSINS] = MASYAF
game.who = NOBODY
- game.where = NOWHERE
- end_player_turn()
+ if (count_friendly(game.where) > 0 && count_enemy(game.where) === 0) {
+ goto_regroup()
+ } else {
+ delete game.assassins
+ game.where = NOWHERE
+ end_player_turn()
+ }
}
function assassinate(who, where) {
@@ -2321,7 +2326,12 @@ states.regroup = {
end_regroup: function () {
clear_undo()
print_summary(game.active + " regrouped:", true)
- if (is_winter())
+ if (game.assassins) {
+ delete game.assassins
+ game.where = NOWHERE
+ end_player_turn()
+ }
+ else if (is_winter())
goto_winter_2()
else if (is_contested_town(game.where))
next_combat_round()