From ba49b45691c35d4b4a1a484f0b8c26e2dcbad206 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 23 Jun 2021 14:37:40 +0200 Subject: crusader: Add Jihad badges. --- rules.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index c3fe05c..805a581 100644 --- a/rules.js +++ b/rules.js @@ -5,7 +5,7 @@ // TODO: can sea move into fortified port that is under attack but not yet besieged? // TODO: pause after battle ends to show final result/action - +// TODO: optional retreat after combat round 3 if storming exports.scenarios = [ "Third Crusade" @@ -3357,8 +3357,10 @@ function make_battle_view() { battle.title += " \u2014 Combat Deployment"; else battle.title += " \u2014 Round " + game.combat_round; - if (game.where == game.jihad) + if (game.where == game.jihad) { + battle.jihad = game.attacker[game.where]; battle.title += " \u2014 Jihad!"; + } function fill_cell(cell, owner, fn) { for (let b in BLOCKS) @@ -3470,6 +3472,9 @@ exports.view = function(state, current) { actions: null, }; + if (game.jihad && game.jihad != game.p1) + view.jihad = game.jihad; + states[game.state].prompt(view, current); if (states[game.state].show_battle) -- cgit v1.2.3