diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-07-20 20:38:03 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:19:39 +0100 |
commit | 022e525c09f2d724a55d2a4400d682c61aed1ade (patch) | |
tree | 4d8acbf71214c2d9c277503683665a57ddcf26ef /rules.js | |
parent | dc075673b258e4138eed8030da778daea61f2dfa (diff) | |
download | crusader-rex-022e525c09f2d724a55d2a4400d682c61aed1ade.tar.gz |
crusader: Skip sally declaration first field battle of new siege.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -2138,12 +2138,14 @@ function start_combat() { game.castle_owner = enemy(game.attacker[game.where]); game.active = game.castle_owner; game.state = 'combat_deployment'; + game.is_existing_siege = 0; } else { game.castle_owner = besieged_player(game.where); if (!game.attacker[game.where]) game.attacker[game.where] = enemy(game.castle_owner); console.log("CONTINUE SIEGE", game.attacker[game.where]); log("Existing siege continues."); + game.is_existing_siege = 1; next_combat_round(); } } else { @@ -2163,6 +2165,7 @@ function end_combat() { if (game.jihad === game.where) game.jihad = null; + delete game.is_existing_siege; delete game.castle_owner; delete game.storming; delete game.sallying; @@ -2399,7 +2402,9 @@ function goto_combat_round(new_combat_round) { log(game.attacker[game.where] + " are now the attacker."); } } - return goto_declare_sally(); + // No sally first round after combat deployment. + if (game.combat_round > 1 || game.is_existing_siege) + return goto_declare_sally(); } return goto_field_battle(); } |