summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-09 19:13:50 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commitfbbacf3239641b48508c5ee29b01125eac024c13 (patch)
tree470e05aad39aa711ae767868a5a39f58b1591ef2
parente4c704c492c17b95c4deebb1abb903fc798219a9 (diff)
downloadcrusader-rex-fbbacf3239641b48508c5ee29b01125eac024c13.tar.gz
crusader: Summarize battle flash when storming/sallying.
-rw-r--r--rules.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/rules.js b/rules.js
index c31c65a..7053557 100644
--- a/rules.js
+++ b/rules.js
@@ -2425,11 +2425,14 @@ states.declare_storm = {
function storm_with_block(who) {
push_undo();
game.storming.push(who);
+ if (game.storming.length > 1)
+ game.flash = game.active + " storm with " + game.storming.length + " blocks.";
+ else
+ game.flash = game.active + " storm with 1 block.";
if (block_plural(who))
- game.flash = block_name(who) + " storm.";
+ log(game.active[0] + ": " + block_name(who) + " storm.");
else
- game.flash = block_name(who) + " storms.";
- log(game.active[0] + ": " + game.flash);
+ log(game.active[0] + ": " + block_name(who) + " storms.");
}
// DECLARE SALLY
@@ -2491,11 +2494,14 @@ function sally_with_block(who) {
push_undo();
remove_from_array(game.castle, who);
game.sallying.push(who);
+ if (game.sallying.length > 1)
+ game.flash = game.active + " sally with " + game.sallying.length + " blocks.";
+ else
+ game.flash = game.active + " sally with 1 block.";
if (block_plural(who))
- game.flash = block_name(who) + " sally.";
+ log(game.active[0] + ": " + block_name(who) + " sally.");
else
- game.flash = block_name(who) + " sallies.";
- log(game.active[0] + ": " + game.flash);
+ log(game.active[0] + ": " + block_name(who) + " sallies.");
}
// RETREAT AFTER COMBAT