From 8de16476a5ea639ae59045bcc618832412d41c79 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 29 Jun 2021 14:34:45 +0200 Subject: crusader: Simplify battle screen layout. --- play.html | 61 ++++++++++++++++++++++++++++++++++++++----------------------- rules.js | 3 ++- ui.js | 2 +- 3 files changed, 41 insertions(+), 25 deletions(-) diff --git a/play.html b/play.html index bbd33b6..ce2faf2 100644 --- a/play.html +++ b/play.html @@ -251,18 +251,34 @@ body.shift .block.known:hover { /* BATTLE BOARD */ -.battle { background-color: tan; } -.battle .battle_message { background-color: gainsboro; } -.battle .battle_header { background-color: #224467; color: white; font-weight: bold; } -#EC .battle_menu_list { min-height: 0; } -.battle_line > td { min-width: 700px; } +.battle { + background-color: tan; + min-width: 700px; +} +.battle .battle_message { + background-color: gainsboro; + text-align: center; + border-top: 1px solid black; +} +.battle .battle_header { + Xbackground-color: #224467; + background-color: steelblue; + color: white; + font-weight: bold; + text-align: center; + border-bottom: 1px solid black; +} +.battle .battle_menu { + margin: 10px 5px; +} -.battle td { border: none; } -#FA, #FB, #FC, #FD, #FR, #EA, #EB, #EC, #ER { margin: 0px auto; padding: 5px; } -.battle .battle_menu { margin: 10px 5px; } +#FF, #FC, #FR, #EF, #EC, #ER { margin: 0px auto; padding: 5px; } +#EC .battle_menu_list { min-height: 0; } +#ER .battle_menu_list { min-height: 0; } +#FR .battle_menu_list { min-height: 0; } -#ER { background-image: linear-gradient(to bottom, skyblue, tan); } -#FR { background-image: linear-gradient(to bottom, tan, darkseagreen); } +X#ER { background-image: linear-gradient(-2deg, tan 30%, skyblue 35%); } +X#FR { background-image: linear-gradient(182deg, tan 30%, olivedrab 35%); } #FC, #EC { background-color: gray; border-top: 5px dashed tan; @@ -270,7 +286,8 @@ body.shift .block.known:hover { } #FC, #EC, #FF, #EF { min-height: 120px; } -#FR, #ER { min-height: 40px; } +#ER { min-height: 15px; } +#FR { min-height: 15px; } #FC.c0, #EC.c0 { display: none; } #FC.c1, #EC.c1 { width: 90px; } @@ -367,18 +384,16 @@ body.shift .block.known:hover {
- - - - - - - - - - - -
+
+
+
+
+
+
+
+
+
+
diff --git a/rules.js b/rules.js index 19c9901..e379fb2 100644 --- a/rules.js +++ b/rules.js @@ -6,7 +6,8 @@ // TODO: can sea move into fortified port that is under attack but not yet besieged? no... // TODO: pause after battle ends to show final result/action? // TODO: optional retreat after combat round 3 if storming -// TODO: new combat deployment in round 2/3 if defenders are wiped out? maybe... +// TODO: new combat deployment in round 2/3 if defenders are wiped out and reserves are coming? +// see https://boardgamegeek.com/thread/423599/article/3731006 exports.scenarios = [ "Third Crusade" diff --git a/ui.js b/ui.js index b778e85..d9d55e6 100644 --- a/ui.js +++ b/ui.js @@ -769,7 +769,7 @@ function update_battle() { ui.battle_block[block].classList.add("known"); else ui.battle_block[block].classList.remove("known"); - if (game.moved[block]) + if (game.moved[block] || (name === "ER" || name === "FR")) ui.battle_block[block].classList.add("moved"); else ui.battle_block[block].classList.remove("moved"); -- cgit v1.2.3