From 68d249e1cff4b1638e4eefa463f3a680ffd62d6c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 7 Jul 2022 23:48:36 +0200 Subject: Battle dialog. --- play.html | 97 ++++++++++++++++++++++++++++++ play.js | 154 ++++++++++++++++++++++++++++++++++++++++------- rules.js | 200 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 414 insertions(+), 37 deletions(-) diff --git a/play.html b/play.html index 9b888f5..5df888b 100644 --- a/play.html +++ b/play.html @@ -31,6 +31,80 @@ header.your_turn { background-color: orange; } cursor: pointer; } +/* BATTLE DIALOG */ + +#battle_header { background-color: brown; color: gold } +#battle_hits { background-color: #c4ab8b; } +#battle_line_1, #battle_line_2 { background-color: #d6c4a9; background: url(texture_clear.png); } +#battle_buttons { background-color: #c4ab8b; } +#battle_message { background-color: #d6c4a9; } + +#battle { + position: fixed; + min-width: 524px; /* 6 blocks wide */ + left: 12px; + top: 56px; + z-index: 100; + box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.5); + border: 1px solid black; + user-select: none; +} + +#battle_header { + cursor: move; + padding: 2px 8px; + line-height: 24px; + min-height: 24px; + text-align: center; + font-weight: bold; + border-bottom: 1px solid black; +} + +#battle_message { + padding: 2px 8px; + line-height: 24px; + min-height: 24px; + text-align: center; + border-top: 1px solid black; +} + +#battle_hits { + padding: 4px; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 6px; + border-bottom: 1px solid black; +} + +#battle_hits .hits_text { + width: 24px; +} + +#battle_hits .hits_icon { + display: block; + vertical-align: middle +} + +#battle_line_1, #battle_line_2 { + padding: 20px; + min-height: 60px; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 16px; +} + +#battle_buttons { + padding: 12px; + min-height: 28px; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 12px; + border-top: 1px solid black; +} + /* TABLES */ table { border-collapse: collapse; font-size: 12px; } @@ -361,6 +435,29 @@ svg .hex.allied_control { +
+
+
+ +
0
+ +
0
+ +
0
+ +
0
+
+
+
+
+ + + + +
+
+
+