From fbbacf3239641b48508c5ee29b01125eac024c13 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 9 Jul 2021 19:13:50 +0200 Subject: crusader: Summarize battle flash when storming/sallying. --- rules.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'rules.js') 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 -- cgit v1.2.3