summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-09 01:39:20 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:19:39 +0100
commitd49de477a33e5a30139febca24bb2d140331eb03 (patch)
tree54d15171be90f6cc4cff19212eb8c178e13f37e4
parent7e372b99a448a3997e79f40d2276eb0f67d4fa04 (diff)
downloadcrusader-rex-d49de477a33e5a30139febca24bb2d140331eb03.tar.gz
Use black highlight when assigning hits to blocks.
-rw-r--r--play.html3
-rw-r--r--ui.js4
2 files changed, 5 insertions, 2 deletions
diff --git a/play.html b/play.html
index 3cad8fe..14ea4a8 100644
--- a/play.html
+++ b/play.html
@@ -166,6 +166,9 @@ body.shift .block.known:hover {
.block.Franks.highlight:not(.selected) { box-shadow: 0 0 3px 0px white; }
+.hit .block.highlight { border-color: black; }
+.hit .block.Franks.highlight { box-shadow: 0 0 4px 0px black; }
+
.block.highlight { cursor: pointer; }
.block.moved { filter: brightness(80%) grayscale(40%); }
.block.highlight.moved { filter: brightness(95%) grayscale(40%); }
diff --git a/ui.js b/ui.js
index 2cfbfca..3f5763b 100644
--- a/ui.js
+++ b/ui.js
@@ -654,12 +654,12 @@ function update_battle() {
ui.battle_menu[block].classList.add('storm');
if (game.actions && game.actions.sally && game.actions.sally.includes(block))
ui.battle_menu[block].classList.add('sally');
- if (game.actions && game.actions.hit && game.actions.hit.includes(block))
- ui.battle_menu[block].classList.add('hit');
if (game.actions && game.actions.charge && game.actions.charge.includes(block))
ui.battle_menu[block].classList.add('charge');
if (game.actions && game.actions.treachery && game.actions.treachery.includes(block))
ui.battle_menu[block].classList.add('treachery');
+ if (game.actions && game.actions.hit && game.actions.hit.includes(block))
+ ui.battle_menu[block].classList.add('hit');
let class_name = battle_block_class_name(BLOCKS[block]);
if (game.actions && game.actions.block && game.actions.block.includes(block))