diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-04-29 20:47:01 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-04-29 20:47:01 +0200 |
commit | fe6cade2c58184be8a9bd6eac6146ca74520fede (patch) | |
tree | 249673dafe21cdf5a0cb2999c5412499c9d95f93 | |
parent | c951cd9132ff0934162206e85278e9be83a63441 (diff) | |
download | plantagenet-fe6cade2c58184be8a9bd6eac6146ca74520fede.tar.gz |
tweak lord mat layout.
-rw-r--r-- | cards.css | 431 | ||||
-rw-r--r-- | images/die_black_pips.svg | 37 | ||||
-rw-r--r-- | images/die_white_pips.svg | 37 | ||||
-rw-r--r-- | play.css | 830 | ||||
-rw-r--r-- | play.html | 20 | ||||
-rw-r--r-- | play.js | 405 | ||||
-rw-r--r-- | rules.ts | 56 |
7 files changed, 971 insertions, 845 deletions
@@ -5,13 +5,16 @@ @font-face { font-family: "B612"; src: url(fonts/b612/B612-BoldItalic.woff2); font-weight: bold; font-style: italic; } @font-face { font-family: "B612"; src: url(fonts/b612/B612-Regular.woff2); } -.aow { +.card.york { background-color: hsl(204,79%,96%); } +.card.lancaster { background-color: hsl(40,96%,91%); } + +.card { position: relative; box-sizing: border-box; width: 186px; height: 260px; background-size: 186px 260px; - box-shadow: 1px 2px 4px #0004; + box-shadow: 0 0 0 1px #333, 1px 2px 4px #0004; text-align: center; line-height: 1; border-radius: 6px; @@ -88,154 +91,282 @@ body.shift .aow .number { .aow[data-card="L32"] .capability .subtitle { margin-left: 50px; margin-right: 5px; } .aow[data-card="L35"] .capability .text { margin-left: 47px; margin-right: 43px; padding-right: 0;} -.aow.c0 { background-image: url(cards.1x/aow_york_1.jpg) } -.aow.c1 { background-image: url(cards.1x/aow_york_2.jpg) } -.aow.c2 { background-image: url(cards.1x/aow_york_3.jpg) } -.aow.c3 { background-image: url(cards.1x/aow_york_4.jpg) } -.aow.c4 { background-image: url(cards.1x/aow_york_5.jpg) } -.aow.c5 { background-image: url(cards.1x/aow_york_6.jpg) } -.aow.c6 { background-image: url(cards.1x/aow_york_7.jpg) } -.aow.c7 { background-image: url(cards.1x/aow_york_8.jpg) } -.aow.c8 { background-image: url(cards.1x/aow_york_9.jpg) } -.aow.c9 { background-image: url(cards.1x/aow_york_10.jpg) } -.aow.c10 { background-image: url(cards.1x/aow_york_11.jpg) } -.aow.c11 { background-image: url(cards.1x/aow_york_12.jpg) } -.aow.c12 { background-image: url(cards.1x/aow_york_13.jpg) } -.aow.c13 { background-image: url(cards.1x/aow_york_14.jpg) } -.aow.c14 { background-image: url(cards.1x/aow_york_15.jpg) } -.aow.c15 { background-image: url(cards.1x/aow_york_16.jpg) } -.aow.c16 { background-image: url(cards.1x/aow_york_17.jpg) } -.aow.c17 { background-image: url(cards.1x/aow_york_18.jpg) } -.aow.c18 { background-image: url(cards.1x/aow_york_19.jpg) } -.aow.c19 { background-image: url(cards.1x/aow_york_20.jpg) } -.aow.c20 { background-image: url(cards.1x/aow_york_21.jpg) } -.aow.c21 { background-image: url(cards.1x/aow_york_22.jpg) } -.aow.c22 { background-image: url(cards.1x/aow_york_23.jpg) } -.aow.c23 { background-image: url(cards.1x/aow_york_24.jpg) } -.aow.c24 { background-image: url(cards.1x/aow_york_25.jpg) } -.aow.c25 { background-image: url(cards.1x/aow_york_26.jpg) } -.aow.c26 { background-image: url(cards.1x/aow_york_27.jpg) } -.aow.c27 { background-image: url(cards.1x/aow_york_28.jpg) } -.aow.c28 { background-image: url(cards.1x/aow_york_29.jpg) } -.aow.c29 { background-image: url(cards.1x/aow_york_30.jpg) } -.aow.c30 { background-image: url(cards.1x/aow_york_31.jpg) } -.aow.c31 { background-image: url(cards.1x/aow_york_32.jpg) } -.aow.c32 { background-image: url(cards.1x/aow_york_33.jpg) } -.aow.c33 { background-image: url(cards.1x/aow_york_34.jpg) } -.aow.c34 { background-image: url(cards.1x/aow_york_35.jpg) } -.aow.c35 { background-image: url(cards.1x/aow_york_36.jpg) } -.aow.c36 { background-image: url(cards.1x/aow_york_37.jpg) } -.aow.c37 { background-image: url(cards.1x/aow_lancaster_1.jpg) } -.aow.c38 { background-image: url(cards.1x/aow_lancaster_2.jpg) } -.aow.c39 { background-image: url(cards.1x/aow_lancaster_3.jpg) } -.aow.c40 { background-image: url(cards.1x/aow_lancaster_4.jpg) } -.aow.c41 { background-image: url(cards.1x/aow_lancaster_5.jpg) } -.aow.c42 { background-image: url(cards.1x/aow_lancaster_6.jpg) } -.aow.c43 { background-image: url(cards.1x/aow_lancaster_7.jpg) } -.aow.c44 { background-image: url(cards.1x/aow_lancaster_8.jpg) } -.aow.c45 { background-image: url(cards.1x/aow_lancaster_9.jpg) } -.aow.c46 { background-image: url(cards.1x/aow_lancaster_10.jpg) } -.aow.c47 { background-image: url(cards.1x/aow_lancaster_11.jpg) } -.aow.c48 { background-image: url(cards.1x/aow_lancaster_12.jpg) } -.aow.c49 { background-image: url(cards.1x/aow_lancaster_13.jpg) } -.aow.c50 { background-image: url(cards.1x/aow_lancaster_14.jpg) } -.aow.c51 { background-image: url(cards.1x/aow_lancaster_15.jpg) } -.aow.c52 { background-image: url(cards.1x/aow_lancaster_16.jpg) } -.aow.c53 { background-image: url(cards.1x/aow_lancaster_17.jpg) } -.aow.c54 { background-image: url(cards.1x/aow_lancaster_18.jpg) } -.aow.c55 { background-image: url(cards.1x/aow_lancaster_19.jpg) } -.aow.c56 { background-image: url(cards.1x/aow_lancaster_20.jpg) } -.aow.c57 { background-image: url(cards.1x/aow_lancaster_21.jpg) } -.aow.c58 { background-image: url(cards.1x/aow_lancaster_22.jpg) } -.aow.c59 { background-image: url(cards.1x/aow_lancaster_23.jpg) } -.aow.c60 { background-image: url(cards.1x/aow_lancaster_24.jpg) } -.aow.c61 { background-image: url(cards.1x/aow_lancaster_25.jpg) } -.aow.c62 { background-image: url(cards.1x/aow_lancaster_26.jpg) } -.aow.c63 { background-image: url(cards.1x/aow_lancaster_27.jpg) } -.aow.c64 { background-image: url(cards.1x/aow_lancaster_28.jpg) } -.aow.c65 { background-image: url(cards.1x/aow_lancaster_29.jpg) } -.aow.c66 { background-image: url(cards.1x/aow_lancaster_30.jpg) } -.aow.c67 { background-image: url(cards.1x/aow_lancaster_31.jpg) } -.aow.c68 { background-image: url(cards.1x/aow_lancaster_32.jpg) } -.aow.c69 { background-image: url(cards.1x/aow_lancaster_33.jpg) } -.aow.c70 { background-image: url(cards.1x/aow_lancaster_34.jpg) } -.aow.c71 { background-image: url(cards.1x/aow_lancaster_35.jpg) } -.aow.c72 { background-image: url(cards.1x/aow_lancaster_36.jpg) } -.aow.c73 { background-image: url(cards.1x/aow_lancaster_37.jpg) } +.card.aow.c0{background-image:url(cards.1x/aow_york_1.jpg)} +.card.aow.c1{background-image:url(cards.1x/aow_york_2.jpg)} +.card.aow.c2{background-image:url(cards.1x/aow_york_3.jpg)} +.card.aow.c3{background-image:url(cards.1x/aow_york_4.jpg)} +.card.aow.c4{background-image:url(cards.1x/aow_york_5.jpg)} +.card.aow.c5{background-image:url(cards.1x/aow_york_6.jpg)} +.card.aow.c6{background-image:url(cards.1x/aow_york_7.jpg)} +.card.aow.c7{background-image:url(cards.1x/aow_york_8.jpg)} +.card.aow.c8{background-image:url(cards.1x/aow_york_9.jpg)} +.card.aow.c9{background-image:url(cards.1x/aow_york_10.jpg)} +.card.aow.c10{background-image:url(cards.1x/aow_york_11.jpg)} +.card.aow.c11{background-image:url(cards.1x/aow_york_12.jpg)} +.card.aow.c12{background-image:url(cards.1x/aow_york_13.jpg)} +.card.aow.c13{background-image:url(cards.1x/aow_york_14.jpg)} +.card.aow.c14{background-image:url(cards.1x/aow_york_15.jpg)} +.card.aow.c15{background-image:url(cards.1x/aow_york_16.jpg)} +.card.aow.c16{background-image:url(cards.1x/aow_york_17.jpg)} +.card.aow.c17{background-image:url(cards.1x/aow_york_18.jpg)} +.card.aow.c18{background-image:url(cards.1x/aow_york_19.jpg)} +.card.aow.c19{background-image:url(cards.1x/aow_york_20.jpg)} +.card.aow.c20{background-image:url(cards.1x/aow_york_21.jpg)} +.card.aow.c21{background-image:url(cards.1x/aow_york_22.jpg)} +.card.aow.c22{background-image:url(cards.1x/aow_york_23.jpg)} +.card.aow.c23{background-image:url(cards.1x/aow_york_24.jpg)} +.card.aow.c24{background-image:url(cards.1x/aow_york_25.jpg)} +.card.aow.c25{background-image:url(cards.1x/aow_york_26.jpg)} +.card.aow.c26{background-image:url(cards.1x/aow_york_27.jpg)} +.card.aow.c27{background-image:url(cards.1x/aow_york_28.jpg)} +.card.aow.c28{background-image:url(cards.1x/aow_york_29.jpg)} +.card.aow.c29{background-image:url(cards.1x/aow_york_30.jpg)} +.card.aow.c30{background-image:url(cards.1x/aow_york_31.jpg)} +.card.aow.c31{background-image:url(cards.1x/aow_york_32.jpg)} +.card.aow.c32{background-image:url(cards.1x/aow_york_33.jpg)} +.card.aow.c33{background-image:url(cards.1x/aow_york_34.jpg)} +.card.aow.c34{background-image:url(cards.1x/aow_york_35.jpg)} +.card.aow.c35{background-image:url(cards.1x/aow_york_36.jpg)} +.card.aow.c36{background-image:url(cards.1x/aow_york_37.jpg)} +.card.aow.c37{background-image:url(cards.1x/aow_lancaster_1.jpg)} +.card.aow.c38{background-image:url(cards.1x/aow_lancaster_2.jpg)} +.card.aow.c39{background-image:url(cards.1x/aow_lancaster_3.jpg)} +.card.aow.c40{background-image:url(cards.1x/aow_lancaster_4.jpg)} +.card.aow.c41{background-image:url(cards.1x/aow_lancaster_5.jpg)} +.card.aow.c42{background-image:url(cards.1x/aow_lancaster_6.jpg)} +.card.aow.c43{background-image:url(cards.1x/aow_lancaster_7.jpg)} +.card.aow.c44{background-image:url(cards.1x/aow_lancaster_8.jpg)} +.card.aow.c45{background-image:url(cards.1x/aow_lancaster_9.jpg)} +.card.aow.c46{background-image:url(cards.1x/aow_lancaster_10.jpg)} +.card.aow.c47{background-image:url(cards.1x/aow_lancaster_11.jpg)} +.card.aow.c48{background-image:url(cards.1x/aow_lancaster_12.jpg)} +.card.aow.c49{background-image:url(cards.1x/aow_lancaster_13.jpg)} +.card.aow.c50{background-image:url(cards.1x/aow_lancaster_14.jpg)} +.card.aow.c51{background-image:url(cards.1x/aow_lancaster_15.jpg)} +.card.aow.c52{background-image:url(cards.1x/aow_lancaster_16.jpg)} +.card.aow.c53{background-image:url(cards.1x/aow_lancaster_17.jpg)} +.card.aow.c54{background-image:url(cards.1x/aow_lancaster_18.jpg)} +.card.aow.c55{background-image:url(cards.1x/aow_lancaster_19.jpg)} +.card.aow.c56{background-image:url(cards.1x/aow_lancaster_20.jpg)} +.card.aow.c57{background-image:url(cards.1x/aow_lancaster_21.jpg)} +.card.aow.c58{background-image:url(cards.1x/aow_lancaster_22.jpg)} +.card.aow.c59{background-image:url(cards.1x/aow_lancaster_23.jpg)} +.card.aow.c60{background-image:url(cards.1x/aow_lancaster_24.jpg)} +.card.aow.c61{background-image:url(cards.1x/aow_lancaster_25.jpg)} +.card.aow.c62{background-image:url(cards.1x/aow_lancaster_26.jpg)} +.card.aow.c63{background-image:url(cards.1x/aow_lancaster_27.jpg)} +.card.aow.c64{background-image:url(cards.1x/aow_lancaster_28.jpg)} +.card.aow.c65{background-image:url(cards.1x/aow_lancaster_29.jpg)} +.card.aow.c66{background-image:url(cards.1x/aow_lancaster_30.jpg)} +.card.aow.c67{background-image:url(cards.1x/aow_lancaster_31.jpg)} +.card.aow.c68{background-image:url(cards.1x/aow_lancaster_32.jpg)} +.card.aow.c69{background-image:url(cards.1x/aow_lancaster_33.jpg)} +.card.aow.c70{background-image:url(cards.1x/aow_lancaster_34.jpg)} +.card.aow.c71{background-image:url(cards.1x/aow_lancaster_35.jpg)} +.card.aow.c72{background-image:url(cards.1x/aow_lancaster_36.jpg)} +.card.aow.c73{background-image:url(cards.1x/aow_lancaster_37.jpg)} +.card.aow.lancaster.back{background-image:url(cards.1x/aow_lancaster_back.jpg)} +.card.aow.york.back{background-image:url(cards.1x/aow_york_back.jpg)} +.card.cc.lancaster.back{background-image:url(cards.1x/cc_lancaster_back.jpg)} +.card.cc.lancaster.pass{background-image:url(cards.1x/cc_lancaster_pass.jpg)} +.card.cc.lord_buckingham{background-image:url(cards.1x/cc_lancaster_buckingham.jpg)} +.card.cc.lord_clarence{background-image:url(cards.1x/cc_lancaster_clarence.jpg)} +.card.cc.lord_devon{background-image:url(cards.1x/cc_york_devon.jpg)} +.card.cc.lord_edward_iv{background-image:url(cards.1x/cc_york_edward_iv.jpg)} +.card.cc.lord_exeter_1{background-image:url(cards.1x/cc_lancaster_exeter.jpg)} +.card.cc.lord_exeter_2{background-image:url(cards.1x/cc_lancaster_exeter.jpg)} +.card.cc.lord_gloucester_1{background-image:url(cards.1x/cc_york_gloucester.jpg)} +.card.cc.lord_gloucester_2{background-image:url(cards.1x/cc_york_gloucester.jpg)} +.card.cc.lord_henry_tudor{background-image:url(cards.1x/cc_lancaster_henry_tudor.jpg)} +.card.cc.lord_henry_vi{background-image:url(cards.1x/cc_lancaster_henry_vi.jpg)} +.card.cc.lord_jasper_tudor_1{background-image:url(cards.1x/cc_lancaster_jasper_tudor.jpg)} +.card.cc.lord_jasper_tudor_2{background-image:url(cards.1x/cc_lancaster_jasper_tudor.jpg)} +.card.cc.lord_march{background-image:url(cards.1x/cc_york_march.jpg)} +.card.cc.lord_margaret{background-image:url(cards.1x/cc_lancaster_margaret.jpg)} +.card.cc.lord_norfolk{background-image:url(cards.1x/cc_york_norfolk.jpg)} +.card.cc.lord_northumberland_l{background-image:url(cards.1x/cc_lancaster_northumberland.jpg)} +.card.cc.lord_northumberland_y1{background-image:url(cards.1x/cc_york_northumberland.jpg)} +.card.cc.lord_northumberland_y2{background-image:url(cards.1x/cc_york_northumberland.jpg)} +.card.cc.lord_oxford{background-image:url(cards.1x/cc_lancaster_oxford.jpg)} +.card.cc.lord_pembroke{background-image:url(cards.1x/cc_york_pembroke.jpg)} +.card.cc.lord_richard_iii{background-image:url(cards.1x/cc_york_richard_iii.jpg)} +.card.cc.lord_rutland{background-image:url(cards.1x/cc_york_rutland.jpg)} +.card.cc.lord_salisbury{background-image:url(cards.1x/cc_york_salisbury.jpg)} +.card.cc.lord_somerset_1{background-image:url(cards.1x/cc_lancaster_somerset.jpg)} +.card.cc.lord_somerset_2{background-image:url(cards.1x/cc_lancaster_somerset.jpg)} +.card.cc.lord_warwick_l{background-image:url(cards.1x/cc_lancaster_warwick.jpg)} +.card.cc.lord_warwick_y{background-image:url(cards.1x/cc_york_warwick.jpg)} +.card.cc.lord_york{background-image:url(cards.1x/cc_york_york.jpg)} +.card.cc.york.back{background-image:url(cards.1x/cc_york_back.jpg)} +.card.cc.york.pass{background-image:url(cards.1x/cc_york_pass.jpg)} +.card.lord.lancaster.back{background-image:url(cards.1x/lord_lancaster_back.jpg)} +.card.lord.lord_buckingham{background-image:url(cards.1x/lord_lancaster_buckingham.jpg)} +.card.lord.lord_clarence{background-image:url(cards.1x/lord_lancaster_clarence.jpg)} +.card.lord.lord_devon{background-image:url(cards.1x/lord_york_devon.jpg)} +.card.lord.lord_edward_iv{background-image:url(cards.1x/lord_york_edward_iv.jpg)} +.card.lord.lord_exeter_1{background-image:url(cards.1x/lord_lancaster_exeter_1.jpg)} +.card.lord.lord_exeter_2{background-image:url(cards.1x/lord_lancaster_exeter_2.jpg)} +.card.lord.lord_gloucester_1{background-image:url(cards.1x/lord_york_gloucester_1.jpg)} +.card.lord.lord_gloucester_2{background-image:url(cards.1x/lord_york_gloucester_2.jpg)} +.card.lord.lord_henry_tudor{background-image:url(cards.1x/lord_lancaster_henry_tudor.jpg)} +.card.lord.lord_henry_vi{background-image:url(cards.1x/lord_lancaster_henry_vi.jpg)} +.card.lord.lord_jasper_tudor_1{background-image:url(cards.1x/lord_lancaster_jasper_tudor_1.jpg)} +.card.lord.lord_jasper_tudor_2{background-image:url(cards.1x/lord_lancaster_jasper_tudor_2.jpg)} +.card.lord.lord_march{background-image:url(cards.1x/lord_york_march.jpg)} +.card.lord.lord_margaret{background-image:url(cards.1x/lord_lancaster_margaret.jpg)} +.card.lord.lord_norfolk{background-image:url(cards.1x/lord_york_norfolk.jpg)} +.card.lord.lord_northumberland_l{background-image:url(cards.1x/lord_lancaster_northumberland_l.jpg)} +.card.lord.lord_northumberland_y1{background-image:url(cards.1x/lord_york_northumberland_y1.jpg)} +.card.lord.lord_northumberland_y2{background-image:url(cards.1x/lord_york_northumberland_y2.jpg)} +.card.lord.lord_oxford{background-image:url(cards.1x/lord_lancaster_oxford.jpg)} +.card.lord.lord_pembroke{background-image:url(cards.1x/lord_york_pembroke.jpg)} +.card.lord.lord_richard_iii{background-image:url(cards.1x/lord_york_richard_iii.jpg)} +.card.lord.lord_rutland{background-image:url(cards.1x/lord_york_rutland.jpg)} +.card.lord.lord_salisbury{background-image:url(cards.1x/lord_york_salisbury.jpg)} +.card.lord.lord_somerset_1{background-image:url(cards.1x/lord_lancaster_somerset_1.jpg)} +.card.lord.lord_somerset_2{background-image:url(cards.1x/lord_lancaster_somerset_2.jpg)} +.card.lord.lord_warwick_l{background-image:url(cards.1x/lord_lancaster_warwick_l.jpg)} +.card.lord.lord_warwick_y{background-image:url(cards.1x/lord_york_warwick_y.jpg)} +.card.lord.lord_york{background-image:url(cards.1x/lord_york_york.jpg)} +.card.lord.york.back{background-image:url(cards.1x/lord_york_back.jpg)} @media (min-resolution: 97dpi) { -.aow.c0 { background-image: url(cards.2x/aow_york_1.jpg) } -.aow.c1 { background-image: url(cards.2x/aow_york_2.jpg) } -.aow.c2 { background-image: url(cards.2x/aow_york_3.jpg) } -.aow.c3 { background-image: url(cards.2x/aow_york_4.jpg) } -.aow.c4 { background-image: url(cards.2x/aow_york_5.jpg) } -.aow.c5 { background-image: url(cards.2x/aow_york_6.jpg) } -.aow.c6 { background-image: url(cards.2x/aow_york_7.jpg) } -.aow.c7 { background-image: url(cards.2x/aow_york_8.jpg) } -.aow.c8 { background-image: url(cards.2x/aow_york_9.jpg) } -.aow.c9 { background-image: url(cards.2x/aow_york_10.jpg) } -.aow.c10 { background-image: url(cards.2x/aow_york_11.jpg) } -.aow.c11 { background-image: url(cards.2x/aow_york_12.jpg) } -.aow.c12 { background-image: url(cards.2x/aow_york_13.jpg) } -.aow.c13 { background-image: url(cards.2x/aow_york_14.jpg) } -.aow.c14 { background-image: url(cards.2x/aow_york_15.jpg) } -.aow.c15 { background-image: url(cards.2x/aow_york_16.jpg) } -.aow.c16 { background-image: url(cards.2x/aow_york_17.jpg) } -.aow.c17 { background-image: url(cards.2x/aow_york_18.jpg) } -.aow.c18 { background-image: url(cards.2x/aow_york_19.jpg) } -.aow.c19 { background-image: url(cards.2x/aow_york_20.jpg) } -.aow.c20 { background-image: url(cards.2x/aow_york_21.jpg) } -.aow.c21 { background-image: url(cards.2x/aow_york_22.jpg) } -.aow.c22 { background-image: url(cards.2x/aow_york_23.jpg) } -.aow.c23 { background-image: url(cards.2x/aow_york_24.jpg) } -.aow.c24 { background-image: url(cards.2x/aow_york_25.jpg) } -.aow.c25 { background-image: url(cards.2x/aow_york_26.jpg) } -.aow.c26 { background-image: url(cards.2x/aow_york_27.jpg) } -.aow.c27 { background-image: url(cards.2x/aow_york_28.jpg) } -.aow.c28 { background-image: url(cards.2x/aow_york_29.jpg) } -.aow.c29 { background-image: url(cards.2x/aow_york_30.jpg) } -.aow.c30 { background-image: url(cards.2x/aow_york_31.jpg) } -.aow.c31 { background-image: url(cards.2x/aow_york_32.jpg) } -.aow.c32 { background-image: url(cards.2x/aow_york_33.jpg) } -.aow.c33 { background-image: url(cards.2x/aow_york_34.jpg) } -.aow.c34 { background-image: url(cards.2x/aow_york_35.jpg) } -.aow.c35 { background-image: url(cards.2x/aow_york_36.jpg) } -.aow.c36 { background-image: url(cards.2x/aow_york_37.jpg) } -.aow.c37 { background-image: url(cards.2x/aow_lancaster_1.jpg) } -.aow.c38 { background-image: url(cards.2x/aow_lancaster_2.jpg) } -.aow.c39 { background-image: url(cards.2x/aow_lancaster_3.jpg) } -.aow.c40 { background-image: url(cards.2x/aow_lancaster_4.jpg) } -.aow.c41 { background-image: url(cards.2x/aow_lancaster_5.jpg) } -.aow.c42 { background-image: url(cards.2x/aow_lancaster_6.jpg) } -.aow.c43 { background-image: url(cards.2x/aow_lancaster_7.jpg) } -.aow.c44 { background-image: url(cards.2x/aow_lancaster_8.jpg) } -.aow.c45 { background-image: url(cards.2x/aow_lancaster_9.jpg) } -.aow.c46 { background-image: url(cards.2x/aow_lancaster_10.jpg) } -.aow.c47 { background-image: url(cards.2x/aow_lancaster_11.jpg) } -.aow.c48 { background-image: url(cards.2x/aow_lancaster_12.jpg) } -.aow.c49 { background-image: url(cards.2x/aow_lancaster_13.jpg) } -.aow.c50 { background-image: url(cards.2x/aow_lancaster_14.jpg) } -.aow.c51 { background-image: url(cards.2x/aow_lancaster_15.jpg) } -.aow.c52 { background-image: url(cards.2x/aow_lancaster_16.jpg) } -.aow.c53 { background-image: url(cards.2x/aow_lancaster_17.jpg) } -.aow.c54 { background-image: url(cards.2x/aow_lancaster_18.jpg) } -.aow.c55 { background-image: url(cards.2x/aow_lancaster_19.jpg) } -.aow.c56 { background-image: url(cards.2x/aow_lancaster_20.jpg) } -.aow.c57 { background-image: url(cards.2x/aow_lancaster_21.jpg) } -.aow.c58 { background-image: url(cards.2x/aow_lancaster_22.jpg) } -.aow.c59 { background-image: url(cards.2x/aow_lancaster_23.jpg) } -.aow.c60 { background-image: url(cards.2x/aow_lancaster_24.jpg) } -.aow.c61 { background-image: url(cards.2x/aow_lancaster_25.jpg) } -.aow.c62 { background-image: url(cards.2x/aow_lancaster_26.jpg) } -.aow.c63 { background-image: url(cards.2x/aow_lancaster_27.jpg) } -.aow.c64 { background-image: url(cards.2x/aow_lancaster_28.jpg) } -.aow.c65 { background-image: url(cards.2x/aow_lancaster_29.jpg) } -.aow.c66 { background-image: url(cards.2x/aow_lancaster_30.jpg) } -.aow.c67 { background-image: url(cards.2x/aow_lancaster_31.jpg) } -.aow.c68 { background-image: url(cards.2x/aow_lancaster_32.jpg) } -.aow.c69 { background-image: url(cards.2x/aow_lancaster_33.jpg) } -.aow.c70 { background-image: url(cards.2x/aow_lancaster_34.jpg) } -.aow.c71 { background-image: url(cards.2x/aow_lancaster_35.jpg) } -.aow.c72 { background-image: url(cards.2x/aow_lancaster_36.jpg) } -.aow.c73 { background-image: url(cards.2x/aow_lancaster_37.jpg) } +.card.aow.c0{background-image:url(cards.2x/aow_york_1.jpg)} +.card.aow.c1{background-image:url(cards.2x/aow_york_2.jpg)} +.card.aow.c2{background-image:url(cards.2x/aow_york_3.jpg)} +.card.aow.c3{background-image:url(cards.2x/aow_york_4.jpg)} +.card.aow.c4{background-image:url(cards.2x/aow_york_5.jpg)} +.card.aow.c5{background-image:url(cards.2x/aow_york_6.jpg)} +.card.aow.c6{background-image:url(cards.2x/aow_york_7.jpg)} +.card.aow.c7{background-image:url(cards.2x/aow_york_8.jpg)} +.card.aow.c8{background-image:url(cards.2x/aow_york_9.jpg)} +.card.aow.c9{background-image:url(cards.2x/aow_york_10.jpg)} +.card.aow.c10{background-image:url(cards.2x/aow_york_11.jpg)} +.card.aow.c11{background-image:url(cards.2x/aow_york_12.jpg)} +.card.aow.c12{background-image:url(cards.2x/aow_york_13.jpg)} +.card.aow.c13{background-image:url(cards.2x/aow_york_14.jpg)} +.card.aow.c14{background-image:url(cards.2x/aow_york_15.jpg)} +.card.aow.c15{background-image:url(cards.2x/aow_york_16.jpg)} +.card.aow.c16{background-image:url(cards.2x/aow_york_17.jpg)} +.card.aow.c17{background-image:url(cards.2x/aow_york_18.jpg)} +.card.aow.c18{background-image:url(cards.2x/aow_york_19.jpg)} +.card.aow.c19{background-image:url(cards.2x/aow_york_20.jpg)} +.card.aow.c20{background-image:url(cards.2x/aow_york_21.jpg)} +.card.aow.c21{background-image:url(cards.2x/aow_york_22.jpg)} +.card.aow.c22{background-image:url(cards.2x/aow_york_23.jpg)} +.card.aow.c23{background-image:url(cards.2x/aow_york_24.jpg)} +.card.aow.c24{background-image:url(cards.2x/aow_york_25.jpg)} +.card.aow.c25{background-image:url(cards.2x/aow_york_26.jpg)} +.card.aow.c26{background-image:url(cards.2x/aow_york_27.jpg)} +.card.aow.c27{background-image:url(cards.2x/aow_york_28.jpg)} +.card.aow.c28{background-image:url(cards.2x/aow_york_29.jpg)} +.card.aow.c29{background-image:url(cards.2x/aow_york_30.jpg)} +.card.aow.c30{background-image:url(cards.2x/aow_york_31.jpg)} +.card.aow.c31{background-image:url(cards.2x/aow_york_32.jpg)} +.card.aow.c32{background-image:url(cards.2x/aow_york_33.jpg)} +.card.aow.c33{background-image:url(cards.2x/aow_york_34.jpg)} +.card.aow.c34{background-image:url(cards.2x/aow_york_35.jpg)} +.card.aow.c35{background-image:url(cards.2x/aow_york_36.jpg)} +.card.aow.c36{background-image:url(cards.2x/aow_york_37.jpg)} +.card.aow.c37{background-image:url(cards.2x/aow_lancaster_1.jpg)} +.card.aow.c38{background-image:url(cards.2x/aow_lancaster_2.jpg)} +.card.aow.c39{background-image:url(cards.2x/aow_lancaster_3.jpg)} +.card.aow.c40{background-image:url(cards.2x/aow_lancaster_4.jpg)} +.card.aow.c41{background-image:url(cards.2x/aow_lancaster_5.jpg)} +.card.aow.c42{background-image:url(cards.2x/aow_lancaster_6.jpg)} +.card.aow.c43{background-image:url(cards.2x/aow_lancaster_7.jpg)} +.card.aow.c44{background-image:url(cards.2x/aow_lancaster_8.jpg)} +.card.aow.c45{background-image:url(cards.2x/aow_lancaster_9.jpg)} +.card.aow.c46{background-image:url(cards.2x/aow_lancaster_10.jpg)} +.card.aow.c47{background-image:url(cards.2x/aow_lancaster_11.jpg)} +.card.aow.c48{background-image:url(cards.2x/aow_lancaster_12.jpg)} +.card.aow.c49{background-image:url(cards.2x/aow_lancaster_13.jpg)} +.card.aow.c50{background-image:url(cards.2x/aow_lancaster_14.jpg)} +.card.aow.c51{background-image:url(cards.2x/aow_lancaster_15.jpg)} +.card.aow.c52{background-image:url(cards.2x/aow_lancaster_16.jpg)} +.card.aow.c53{background-image:url(cards.2x/aow_lancaster_17.jpg)} +.card.aow.c54{background-image:url(cards.2x/aow_lancaster_18.jpg)} +.card.aow.c55{background-image:url(cards.2x/aow_lancaster_19.jpg)} +.card.aow.c56{background-image:url(cards.2x/aow_lancaster_20.jpg)} +.card.aow.c57{background-image:url(cards.2x/aow_lancaster_21.jpg)} +.card.aow.c58{background-image:url(cards.2x/aow_lancaster_22.jpg)} +.card.aow.c59{background-image:url(cards.2x/aow_lancaster_23.jpg)} +.card.aow.c60{background-image:url(cards.2x/aow_lancaster_24.jpg)} +.card.aow.c61{background-image:url(cards.2x/aow_lancaster_25.jpg)} +.card.aow.c62{background-image:url(cards.2x/aow_lancaster_26.jpg)} +.card.aow.c63{background-image:url(cards.2x/aow_lancaster_27.jpg)} +.card.aow.c64{background-image:url(cards.2x/aow_lancaster_28.jpg)} +.card.aow.c65{background-image:url(cards.2x/aow_lancaster_29.jpg)} +.card.aow.c66{background-image:url(cards.2x/aow_lancaster_30.jpg)} +.card.aow.c67{background-image:url(cards.2x/aow_lancaster_31.jpg)} +.card.aow.c68{background-image:url(cards.2x/aow_lancaster_32.jpg)} +.card.aow.c69{background-image:url(cards.2x/aow_lancaster_33.jpg)} +.card.aow.c70{background-image:url(cards.2x/aow_lancaster_34.jpg)} +.card.aow.c71{background-image:url(cards.2x/aow_lancaster_35.jpg)} +.card.aow.c72{background-image:url(cards.2x/aow_lancaster_36.jpg)} +.card.aow.c73{background-image:url(cards.2x/aow_lancaster_37.jpg)} +.card.aow.lancaster.back{background-image:url(cards.2x/aow_lancaster_back.jpg)} +.card.aow.york.back{background-image:url(cards.2x/aow_york_back.jpg)} +.card.cc.lancaster.back{background-image:url(cards.2x/cc_lancaster_back.jpg)} +.card.cc.lancaster.pass{background-image:url(cards.2x/cc_lancaster_pass.jpg)} +.card.cc.lord_buckingham{background-image:url(cards.2x/cc_lancaster_buckingham.jpg)} +.card.cc.lord_clarence{background-image:url(cards.2x/cc_lancaster_clarence.jpg)} +.card.cc.lord_devon{background-image:url(cards.2x/cc_york_devon.jpg)} +.card.cc.lord_edward_iv{background-image:url(cards.2x/cc_york_edward_iv.jpg)} +.card.cc.lord_exeter_1{background-image:url(cards.2x/cc_lancaster_exeter.jpg)} +.card.cc.lord_exeter_2{background-image:url(cards.2x/cc_lancaster_exeter.jpg)} +.card.cc.lord_gloucester_1{background-image:url(cards.2x/cc_york_gloucester.jpg)} +.card.cc.lord_gloucester_2{background-image:url(cards.2x/cc_york_gloucester.jpg)} +.card.cc.lord_henry_tudor{background-image:url(cards.2x/cc_lancaster_henry_tudor.jpg)} +.card.cc.lord_henry_vi{background-image:url(cards.2x/cc_lancaster_henry_vi.jpg)} +.card.cc.lord_jasper_tudor_1{background-image:url(cards.2x/cc_lancaster_jasper_tudor.jpg)} +.card.cc.lord_jasper_tudor_2{background-image:url(cards.2x/cc_lancaster_jasper_tudor.jpg)} +.card.cc.lord_march{background-image:url(cards.2x/cc_york_march.jpg)} +.card.cc.lord_margaret{background-image:url(cards.2x/cc_lancaster_margaret.jpg)} +.card.cc.lord_norfolk{background-image:url(cards.2x/cc_york_norfolk.jpg)} +.card.cc.lord_northumberland_l{background-image:url(cards.2x/cc_lancaster_northumberland.jpg)} +.card.cc.lord_northumberland_y1{background-image:url(cards.2x/cc_york_northumberland.jpg)} +.card.cc.lord_northumberland_y2{background-image:url(cards.2x/cc_york_northumberland.jpg)} +.card.cc.lord_oxford{background-image:url(cards.2x/cc_lancaster_oxford.jpg)} +.card.cc.lord_pembroke{background-image:url(cards.2x/cc_york_pembroke.jpg)} +.card.cc.lord_richard_iii{background-image:url(cards.2x/cc_york_richard_iii.jpg)} +.card.cc.lord_rutland{background-image:url(cards.2x/cc_york_rutland.jpg)} +.card.cc.lord_salisbury{background-image:url(cards.2x/cc_york_salisbury.jpg)} +.card.cc.lord_somerset_1{background-image:url(cards.2x/cc_lancaster_somerset.jpg)} +.card.cc.lord_somerset_2{background-image:url(cards.2x/cc_lancaster_somerset.jpg)} +.card.cc.lord_warwick_l{background-image:url(cards.2x/cc_lancaster_warwick.jpg)} +.card.cc.lord_warwick_y{background-image:url(cards.2x/cc_york_warwick.jpg)} +.card.cc.lord_york{background-image:url(cards.2x/cc_york_york.jpg)} +.card.cc.york.back{background-image:url(cards.2x/cc_york_back.jpg)} +.card.cc.york.pass{background-image:url(cards.2x/cc_york_pass.jpg)} +.card.lord.lancaster.back{background-image:url(cards.2x/lord_lancaster_back.jpg)} +.card.lord.lord_buckingham{background-image:url(cards.2x/lord_lancaster_buckingham.jpg)} +.card.lord.lord_clarence{background-image:url(cards.2x/lord_lancaster_clarence.jpg)} +.card.lord.lord_devon{background-image:url(cards.2x/lord_york_devon.jpg)} +.card.lord.lord_edward_iv{background-image:url(cards.2x/lord_york_edward_iv.jpg)} +.card.lord.lord_exeter_1{background-image:url(cards.2x/lord_lancaster_exeter_1.jpg)} +.card.lord.lord_exeter_2{background-image:url(cards.2x/lord_lancaster_exeter_2.jpg)} +.card.lord.lord_gloucester_1{background-image:url(cards.2x/lord_york_gloucester_1.jpg)} +.card.lord.lord_gloucester_2{background-image:url(cards.2x/lord_york_gloucester_2.jpg)} +.card.lord.lord_henry_tudor{background-image:url(cards.2x/lord_lancaster_henry_tudor.jpg)} +.card.lord.lord_henry_vi{background-image:url(cards.2x/lord_lancaster_henry_vi.jpg)} +.card.lord.lord_jasper_tudor_1{background-image:url(cards.2x/lord_lancaster_jasper_tudor_1.jpg)} +.card.lord.lord_jasper_tudor_2{background-image:url(cards.2x/lord_lancaster_jasper_tudor_2.jpg)} +.card.lord.lord_march{background-image:url(cards.2x/lord_york_march.jpg)} +.card.lord.lord_margaret{background-image:url(cards.2x/lord_lancaster_margaret.jpg)} +.card.lord.lord_norfolk{background-image:url(cards.2x/lord_york_norfolk.jpg)} +.card.lord.lord_northumberland_l{background-image:url(cards.2x/lord_lancaster_northumberland_l.jpg)} +.card.lord.lord_northumberland_y1{background-image:url(cards.2x/lord_york_northumberland_y1.jpg)} +.card.lord.lord_northumberland_y2{background-image:url(cards.2x/lord_york_northumberland_y2.jpg)} +.card.lord.lord_oxford{background-image:url(cards.2x/lord_lancaster_oxford.jpg)} +.card.lord.lord_pembroke{background-image:url(cards.2x/lord_york_pembroke.jpg)} +.card.lord.lord_richard_iii{background-image:url(cards.2x/lord_york_richard_iii.jpg)} +.card.lord.lord_rutland{background-image:url(cards.2x/lord_york_rutland.jpg)} +.card.lord.lord_salisbury{background-image:url(cards.2x/lord_york_salisbury.jpg)} +.card.lord.lord_somerset_1{background-image:url(cards.2x/lord_lancaster_somerset_1.jpg)} +.card.lord.lord_somerset_2{background-image:url(cards.2x/lord_lancaster_somerset_2.jpg)} +.card.lord.lord_warwick_l{background-image:url(cards.2x/lord_lancaster_warwick_l.jpg)} +.card.lord.lord_warwick_y{background-image:url(cards.2x/lord_york_warwick_y.jpg)} +.card.lord.lord_york{background-image:url(cards.2x/lord_york_york.jpg)} +.card.lord.york.back{background-image:url(cards.2x/lord_york_back.jpg)} } diff --git a/images/die_black_pips.svg b/images/die_black_pips.svg new file mode 100644 index 0000000..d641f28 --- /dev/null +++ b/images/die_black_pips.svg @@ -0,0 +1,37 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="336" height="56"> +<g fill="black"> +<g transform="translate(0 0)"> +<circle r="6" cx="28" cy="28"/> +</g> +<g transform="translate(56 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="44" cy="44"/> +</g> +<g transform="translate(112 0)"> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="28" cy="28"/> +</g> +<g transform="translate(168 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="44" cy="44"/> +</g> +<g transform="translate(224 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="44" cy="44"/> +<circle r="6" cx="28" cy="28"/> +</g> +<g transform="translate(280 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="12" cy="28"/> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="44" cy="28"/> +<circle r="6" cx="44" cy="44"/> +</g> +</g> +</svg> diff --git a/images/die_white_pips.svg b/images/die_white_pips.svg new file mode 100644 index 0000000..efc864b --- /dev/null +++ b/images/die_white_pips.svg @@ -0,0 +1,37 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="336" height="56"> +<g fill="white"> +<g transform="translate(0 0)"> +<circle r="6" cx="28" cy="28"/> +</g> +<g transform="translate(56 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="44" cy="44"/> +</g> +<g transform="translate(112 0)"> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="28" cy="28"/> +</g> +<g transform="translate(168 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="44" cy="44"/> +</g> +<g transform="translate(224 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="44" cy="44"/> +<circle r="6" cx="28" cy="28"/> +</g> +<g transform="translate(280 0)"> +<circle r="6" cx="12" cy="12"/> +<circle r="6" cx="12" cy="28"/> +<circle r="6" cx="12" cy="44"/> +<circle r="6" cx="44" cy="12"/> +<circle r="6" cx="44" cy="28"/> +<circle r="6" cx="44" cy="44"/> +</g> +</g> +</svg> @@ -1,5 +1,4 @@ main { background-color: dimgray; } -#roles { background-color: gray; } header { background-color: silver; } body.York header.your_turn { background-color: hsl(217, 73%, 78%); } body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } @@ -7,7 +6,13 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } #role_Lancaster { background-color: hsl(355, 63%, 82%); } #turn_info { background-color: gray; } -#log { background-color: whitesmoke; } +/* LOG */ + +#log { + font-variant-numeric: tabular-nums; + background-color: whitesmoke; +} + #log .h1 { font-weight: bold; padding-top:2px; padding-bottom:2px; text-align: center; } #log .h2 { padding-top:2px; padding-bottom:2px; text-align: center; } #log .h3 { text-align: center; } @@ -20,7 +25,6 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } #log div { padding-left: 20px; text-indent: -12px; } #log div.i { padding-left: 32px; text-indent: -12px; } -#log div.ii { padding-left: 44px; text-indent: -12px; } #log .card_tip { font-style: italic; } #log .card_tip:hover { text-decoration: underline; } @@ -28,8 +32,85 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } #log .vassal_tip:hover { cursor: pointer; text-decoration: underline; } #log .locale_tip:hover { cursor: pointer; text-decoration: underline; } -#log { - font-variant-numeric: tabular-nums; +/* +#log span.black, #log span.white { + display: inline-block; + width: 12px; + height: 12px; + line-height: 12px; + text-align: center; + padding: 0; + text-indent: 0; + background-color: #999; + border: 1px solid black; + font-weight: bold; + border-radius: 50%; +} + +#log span.black { + background-color: #666; + color: white; + border: 1px solid #222; +} + +#log span.white { + background-color: #eee; + border: 1px solid #666; +} +*/ + +#log .white, #log .black { + display: inline-block; + vertical-align: -2px; + width: 12px; + height: 12px; + border-radius: 0px; + box-shadow: none; + border: none; + background-size: 600% 100%; + background-repeat: no-repeat; +} + +#log .white { + background-image: url(images/die_black_pips.svg); + background-color: #fff; + border: 1px solid #444; +} + +#log .black { + background-image: url(images/die_white_pips.svg); + background-color: #666; + border: 1px solid #222; +} + +.d0 { background-position: -100% 0 } +.d1 { background-position: 0% 0; } +.d2 { background-position: 20% 0; } +.d3 { background-position: 40% 0; } +.d4 { background-position: 60% 0; } +.d5 { background-position: 80% 0; } +.d6 { background-position: 100% 0; } + + +/* MAP */ + +#mapwrap { + width: 1275px; + height: 1650px; + box-shadow: 1px 2px 4px #0004; +} + +#map { + background-repeat: no-repeat; + background-size: cover; + width: 1275px; + height: 1650px; + overflow: clip; +} + +#map { background-image: url(map75.jpg) } +@media (min-resolution: 97dpi) { + #map { background-image: url(map150.jpg) } } /* PANELS */ @@ -37,8 +118,9 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } .panel { min-width: 1275px; max-width: 1275px; - margin: 12px auto 36px auto; background-color: #555; + box-shadow: 1px 2px 4px #0004; + margin: 12px auto; } .panel_header { @@ -47,15 +129,15 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } user-select: none; font-weight: bold; text-align: center; - padding: 3px 1em; } .panel_body { display: flex; justify-content: center; flex-wrap: wrap; - padding: 18px; - gap: 18px; + padding: 12px; + gap: 12px; + min-height: 260px; } .court_panel { @@ -67,18 +149,31 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } min-height: 524px; } -/* ARTS OF WAR */ +/* CURRENT CARD */ -#arts_of_war_list { - min-height: 260px; +#turn_info { + border-bottom: 1px solid black; + padding: 12px; + overflow: clip; } -/* PLAN */ +#turn_info .card { + margin: 0 auto; +} -#plan { - min-height: 260px; +@media (max-height: 800px) { + #turn_info { height: 95px; } + #turn_info:hover { height: auto; } } +@media (max-height: 600px) { + #turn_info { + display: none; + } +} + +/* PLAN */ + #plan_actions { background-color: #444; min-height: 130px; @@ -92,222 +187,162 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } width: 93px; height: 130px; background-size: 93px 130px; + border-radius: 3px; } body.York #plan_actions .lancaster { display: none } body.Lancaster #plan_actions .york { display: none } -/* BATTLE GRID WITH LORD MATS */ - -#battle_grid { - display: grid; - grid-template-columns: auto auto auto; - margin: 0 auto; - justify-content: center; - padding: 18px; -} +/* CARDS */ -#battle_grid .grid_array { - width: 375px; - height: 506px; - padding: 36px 12px 12px 12px; -} +.card.disabled { filter: brightness(80%); } +.card.action { box-shadow: 0 0 0 1px #333, 0 0 0 4px white; } +.card.selected { box-shadow: 0 0 0 1px #333, 0 0 0 4px yellow; } -.grid_array { background-repeat: no-repeat } +/* MARKERS */ -.grid_array.action { - background-image: url(images/battle_array_action.svg); - background-position: top center; -} - -#battle_grid { +.marker { + border: 2px solid transparent; + background-size: cover; + background-position: center; background-repeat: no-repeat; } -#battle_header { grid-row: 1; grid-column: 1 / 4; } - -.defender .att, -.attacker .def, -.defender .att .unit, -.attacker .def .unit, -.defender .att .asset, -.attacker .def .asset, -.defender .att .moved_fought, -.attacker .def .moved_fought, -.defender .att .feed, -.attacker .def .feed -{ - transform: rotate(180deg) +.marker.square { + border-radius: 8px; + width: 46px; + height: 46px; } -.defender .att .background, -.attacker .def .background -{ - border-color: #b1a05f #f2e19d #f2e19d #b1a05f; - box-shadow: 0 0 0 1px #584800, -1px -2px 4px #0008; +.marker.small { + width: 35px; + height: 35px; } -.defender #grid_a1 { grid-row: 1; grid-column: 1; } -.defender #grid_a2 { grid-row: 1; grid-column: 2; } -.defender #grid_a3 { grid-row: 1; grid-column: 3; } -.defender #grid_d1 { grid-row: 2; grid-column: 1; } -.defender #grid_d2 { grid-row: 2; grid-column: 2; } -.defender #grid_d3 { grid-row: 2; grid-column: 3; } - -.attacker #grid_a1 { grid-row: 2; grid-column: 3; } -.attacker #grid_a2 { grid-row: 2; grid-column: 2; } -.attacker #grid_a3 { grid-row: 2; grid-column: 1; } -.attacker #grid_d1 { grid-row: 1; grid-column: 3; } -.attacker #grid_d2 { grid-row: 1; grid-column: 2; } -.attacker #grid_d3 { grid-row: 1; grid-column: 1; } - -/* MATS */ - -.mat { - position: relative; - width: 379px; - height: 506px; - z-index: 1; +.marker.circle { + width: 50px; + height: 50px; + background-size: 50px 50px; + border-radius: 50%; } -.mat .background { +.box { + box-sizing: border-box; position: absolute; - width: 375px; - height: 375px; - border-radius: 12px; - border-width: 2px; - border-style: solid; - background-image: url(images/lord_mat_75.png); - background-color: #d1c07e; - background-size: 375px 375px; - background-repeat: no-repeat; - z-index: 4; -} - -.court_body .mat.hidden .background { - filter: grayscale(100%) + border: 3px solid transparent; + border-radius: 15px 0 50% 50% / 15px 0 20px 20px; } -.mat.command .background { - box-shadow: 0 0 0 1px #584800, 0 0 0 3px gold; +.box.box16 { + border-radius: 0 } -.mat.selected .background { - box-shadow: 0 0 0 1px #584800, 0 0 0 4px yellow; +.box.action { + border-color: white; + background-color: #fff6; } -.mat .capabilities { +.marker.rose { + border-radius: 0px; position: absolute; - width: 372px; - height: 260px; - z-index: 2; - top: 246px; - left: 2px; - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 0px; } -.mat .events { +.marker.depexh { position: absolute; border-radius: 0px; } +.marker.depleted { position: absolute; border-radius: 0px; } +.marker.exhausted { position: absolute; border-radius: 0px; } + +.locale { + box-sizing: border-box; position: absolute; - z-index: 3; - width: 372px; - height: 260px; - left: 2px; - top: -36px; - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 0px; - transition-property: top; - transition-duration: 100ms; + border: 3px solid transparent; } -.mat .events:hover { - top: -130px; -} +.locale.town { border-radius: 50% } +.locale.city { border-radius: 50% } +.locale.fortress { border-radius: 0 0 0 0 } +.locale.calais { border-radius: 0 0 0 0 } +.locale.sea { border-radius: 50% } +.locale.exile { border-radius: 0 0 50% 50% } -.mat .events:empty { - display: none; +.locale.action { + border-color: white; + z-index: 100; } -.mat .moved_fought, .mat .feed, .mat .fled { - position: absolute; - z-index: 5; +.locale.selected { + border-color: cyan; } -.mat .valour { margin-bottom: -30px; } -.valour + .valour { margin-left: 15px; } -.valour + .valour + .valour { margin-left: 30px; } -.valour + .valour + .valour + .valour { margin-left: 45px; } -.valour + .valour + .valour + .valour + .valour { margin-left: 60px; } - -.mat .feed { right: 8px; top: 135px; } -.mat .moved_fought.one { right: 72px; top: 12px; } -.mat .moved_fought.two { right: 66px; top: 6px; } -.mat .fled { right: 20px; top: 5px; } - -.mat .valour_area {left: 100px; top: 250px; width: 80px; height: 80px; } - -body.shift .capabilities, -body.shift .events, -body.shift #capabilities1, -body.shift #capabilities2 { - z-index: 200; -} -body.shift .favour, -body.shift .depleted, -body.shift .exhausted { - display:none; +.locale.tip { + background-color: #ff08; + box-shadow: 0 0 8px #ff08; } -.mat .forces, .mat .routed, .mat .assets, .mat .valour_area { +.locale_markers { position: absolute; + pointer-events: none; display: flex; flex-wrap: wrap; justify-content: center; - justify-items: center; - align-content: center; align-items: center; - gap: 4px 6px; - z-index: 5; + gap: 4px; } -.mat .lord.card { +.marker.turn, .marker.end, .marker.ip, .marker.towns, .marker.cities, .marker.fortresses, .marker.victory_check { position: absolute; } -.mat .forces { - justify-content: center; -} +/* PIECES */ -.mat .forces, .mat .routed { - gap: 2px; +.cylinder, .marker { + transition-property: top, left; + transition-duration: 700ms; + transition-timing-function: ease; } -.mat .mustered_vassals { +.cylinder { position: absolute; - z-index: 5; + width: 44px; + height: 48px; + background-size: 44px 48px; + filter: drop-shadow(0px 2px 4px #0004); } -.mat .mustered_vassals .vassal { - transition: margin 100ms; - margin-top: -24px; +.cylinder.action { + filter: + drop-shadow(2px 0px 0px white) + drop-shadow(0px 2px 0px white) + drop-shadow(0px -2px 0px white) + drop-shadow(-2px 0px 0px white); } -.mat .mustered_vassals:hover .vassal { - margin-top: 1px; +.cylinder.selected { + filter: + drop-shadow(2px 0px 0px yellow) + drop-shadow(0px 2px 0px yellow) + drop-shadow(0px -2px 0px yellow) + drop-shadow(-2px 0px 0px yellow); +} + +.cylinder.command { + filter: + drop-shadow(2px 0px 0px gold) + drop-shadow(0px 2px 0px gold) + drop-shadow(0px -2px 0px gold) + drop-shadow(-2px 0px 0px gold); } -.mat .mustered_vassals .vassal { - margin-top: -38px; +.cylinder > .exile { + position: absolute; + top: 6px; + left: 20px; + transform: rotate(45deg); +} + +.marker.seat { + border-radius: 8px; } -.mat .lord.card { top: 96px; left: 16px; } -.mat .forces { top: 5px; left: 5px; width: 365px; height: 100px; } -.mat .routed { top: 110px; right: 5px; width: 160px; height: 120px; } -.mat .assets { top: 235px; right: 15px; width: 140px; height: 125px; } /* ASSETS */ @@ -324,39 +359,6 @@ body.shift .exhausted { box-shadow: 0 0 0 1px #444, 0 0 0 4px white !important; } -.asset.selected { - box-shadow: 0 0 0 1px #444, 0 0 0 4px cyan !important; -} - -.vassal.selected { - box-shadow: 0 0 0 1px #444, 0 0 0 4px cyan !important; -} - -.marker { - border: 2px solid transparent; - border-radius: 8px; - background-size: cover; - background-position: center; - background-repeat: no-repeat; -} - -.marker.square { - width: 46px; - height: 46px; -} - -.marker.small { - width: 35px; - height: 35px; -} - -.marker.circle { - width: 50px; - height: 50px; - background-size: 50px 50px; - border-radius: 50%; -} - /* UNITS */ .unit { @@ -375,7 +377,6 @@ body.shift .exhausted { width: 46px; height: 46px; border-radius: 8px; - margin: 0 2px; } .unit.vassal { @@ -383,7 +384,6 @@ body.shift .exhausted { width: 46px; height: 46px; border-radius: 8px; - margin: 0 2px; } .unit.retinue.action { @@ -394,6 +394,10 @@ body.shift .exhausted { box-shadow: 0 0 0 1px black, 0 0 0 4px white !important; } +.unit.vassal.selected { + box-shadow: 0 0 0 1px black, 0 0 0 4px yellow !important; +} + .unit.shape.action { filter: drop-shadow(2px 0px 0px white) @@ -402,216 +406,233 @@ body.shift .exhausted { drop-shadow(-2px 0px 0px white); } -/* CARDS */ -.card.york { background-color: hsl(204,79%,96%); } -.card.lancaster { background-color: hsl(40,96%,91%); } +/* LORD MAT */ -.hand { - margin: 24px auto; - display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: center; - min-height: 260px; - max-width: 1275px; - gap: 16px; -} - -.card { - background-size: 186px 260px; - width: 186px; - height: 260px; - border-radius: 6px; - transition: 100ms; - box-shadow: 0 0 0 1px #333, 1px 1px 4px #0008; +.mat { + position: relative; + width: 379px; + height: 506px; + z-index: 1; } -#turn_info { - border-bottom: 1px solid black; - padding: 12px; - overflow: clip; +.mat .board { + position: absolute; + width: 375px; + height: 375px; + border-radius: 12px; + border-width: 2px; + border-style: solid; + background-image: url(images/lord_mat_75.png); + background-size: 375px 375px; + background-repeat: no-repeat; + z-index: 4; } -#turn_info .card { - margin: 0 auto; -} +.mat.command .board { box-shadow: 0 0 0 1px #584800, 0 0 0 4px gold; } +.mat.selected .board { box-shadow: 0 0 0 1px #584800, 0 0 0 4px yellow; } -@media (max-height: 800px) { - #turn_info { height: 95px; } - #turn_info:hover { height: auto; } +#court1 .mat.hidden .board, +#court2 .mat.hidden .board { + filter: grayscale(100%) } -@media (max-height: 600px) { - #turn_info { - display: none; - } +.mat .capabilities { + position: absolute; + width: 372px; + height: 260px; + z-index: 2; + top: 246px; + left: 3px; + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0px; } -.card.disabled { - filter: brightness(80%); +body.shift .mat .capabilities { + z-index: 200; } -.card.action { box-shadow: 0 0 0 1px #333, 0 0 0 4px white; } -.card.selected { box-shadow: 0 0 0 1px #333, 0 0 0 4px yellow; } - -/* MAP */ - -#mapwrap { - width: 1275px; - height: 1650px; - box-shadow: 0px 1px 10px #0008; - z-index: 3; +.mat .board .card { + position: absolute; + top: 96px; + left: 16px; } -#map { - background-repeat: no-repeat; - background-size: cover; - width: 1275px; - height: 1650px; - overflow: clip; +.mat .board .mask { + pointer-events: none; + position: absolute; + top: calc(96px + 135px); + left: 21px; + width: 176px; + height: 120px; } -#map { background-image: url(map75.jpg) } -@media (min-resolution: 97dpi) { - #map { background-image: url(map150.jpg) } +#court1 .mat .mask { + display: none; } -.box { - box-sizing: border-box; - position: absolute; - border: 3px solid transparent; - border-radius: 15px 0 50% 50% / 15px 0 20px 20px; +#court2 .mat .mask { + display: none; } -.box.box16 { - border-radius: 0 +.mat .board .mask.york { + background-color: #eef7fc; } -.box.action { - border-color: white; - background-color: #fff6; +.mat .board .mask.lancaster { + background-color: #fef0d3; } -.marker.rose { - border-radius: 0px; +.mat .board .retinue_vassals { position: absolute; + top: 38px; + left: 24px; + width: 170px; + height: 50px; + display: flex; + align-content: center; + flex-wrap: wrap; + gap: 5px; } -.marker.depexh { position: absolute; border-radius: 0px; } -.marker.depleted { position: absolute; border-radius: 0px; } -.marker.exhausted { position: absolute; border-radius: 0px; } - -.locale { - box-sizing: border-box; +.mat .board .routed_retinue_vassals { position: absolute; - border: 3px solid transparent; -} - -.locale.town { border-radius: 50% } -.locale.city { border-radius: 50% } -.locale.fortress { border-radius: 0 0 0 0 } -.locale.calais { border-radius: 0 0 0 0 } -.locale.sea { border-radius: 50% } -.locale.exile { border-radius: 0 0 50% 50% } - -.locale.action { - border-color: white; - z-index: 100; + top: 130px; + left: 24px; + display: flex; + flex-wrap: wrap; + gap: 5px; } -.locale.selected { - border-color: cyan; +.mat .board .troops { + position: absolute; + top: 36px; + right: 0px; + width: 172px; + display: flex; + flex-wrap: wrap; + gap: 0px; } -.locale.tip { - background-color: #ff08; - box-shadow: 0 0 8px #ff08; +.mat .board .routed_troops { + position: absolute; + bottom: 144px; + right: 0px; + width: 172px; + display: flex; + flex-wrap: wrap; + gap: 0px; } -.locale_markers { - position: absolute; +.mat .board .marker_area { pointer-events: none; + position: absolute; + top: 240px; + left: 24px; + width: 172px; display: flex; - flex-wrap: wrap; justify-content: center; align-items: center; - gap: 4px; + flex-wrap: wrap; + gap: 5px; } -.marker.turn, .marker.end, .marker.ip, .marker.towns, .marker.cities, .marker.fortresses, .marker.victory_check { +.mat .board .valour_area { + pointer-events: none; position: absolute; + top: 305px; + left: 24px; + width: 172px; + display: flex; + justify-content: center; + flex-wrap: wrap; + gap: 5px; } -/* PIECES */ +.mat .board .assets { + position: absolute; + top: 236px; -.cylinder, .marker { - transition-property: top, left; - transition-duration: 700ms; - transition-timing-function: ease; -} + //left: 210px; + //width: 162px; + left: 222px; + width: 140px; + height: 122px; -.cylinder { - position: absolute; - width: 44px; - height: 48px; - background-size: 44px 48px; - filter: drop-shadow(0px 2px 4px #0004); + display: flex; + justify-content: center; + align-content: center; + flex-direction: column; + flex-wrap: wrap; + gap: 5px; } -.cylinder.action { - filter: - drop-shadow(2px 0px 0px white) - drop-shadow(0px 2px 0px white) - drop-shadow(0px -2px 0px white) - drop-shadow(-2px 0px 0px white); -} +/* BATTLE GRID WITH LORD MATS */ -.cylinder.selected { - filter: - drop-shadow(2px 0px 0px yellow) - drop-shadow(0px 2px 0px yellow) - drop-shadow(0px -2px 0px yellow) - drop-shadow(-2px 0px 0px yellow); +#battle_grid { + display: grid; + grid-template-columns: auto auto auto; + margin: 0 auto; + justify-content: center; + padding: 18px; } -.cylinder.command { - filter: - drop-shadow(2px 0px 0px gold) - drop-shadow(0px 2px 0px gold) - drop-shadow(0px -2px 0px gold) - drop-shadow(-2px 0px 0px gold); +#battle_grid .grid_array { + width: 375px; + height: 506px; + padding: 36px 12px 12px 12px; } -.cylinder > .exile { - position: absolute; - top: 6px; - left: 20px; - transform: rotate(45deg); +.grid_array { background-repeat: no-repeat } + +.grid_array.action { + background-image: url(images/battle_array_action.svg); + background-position: top center; } -/* BACKGROUND COLORS AND BORDERS */ +#battle_grid { + background-repeat: no-repeat; +} -/* ULTRA-WIDE SCREEN LAYOUTS */ +#battle_header { grid-row: 1; grid-column: 1 / 4; } -@media (min-width: 2800px) { - main { display: grid; gap: 0 12px; } - main { grid-template-columns: 0 1275px auto 0; } - #sec_map { grid-row: 1; grid-column: 2 } - #sec_battle { grid-row: 2; grid-column: 2 } - #sec_lords { grid-row: 1 / 3; grid-column: 3 } +.defender .att, +.attacker .def, +.defender .att .unit, +.attacker .def .unit, +.defender .att .asset, +.attacker .def .asset, +.defender .att .moved_fought, +.attacker .def .moved_fought, +.defender .att .feed, +.attacker .def .feed +{ + transform: rotate(180deg) } -@media (min-width: 3200px) { - main { grid-template-columns: 36px 1275px auto 0; } +.defender .att .background, +.attacker .def .background +{ + border-color: #b1a05f #f2e19d #f2e19d #b1a05f; + box-shadow: 0 0 0 1px #584800, -1px -2px 4px #0008; } -@media (min-width: 4100px) { - main { grid-template-columns: 0 1275px 1fr 1275px 0; } - #sec_map { grid-row: 1; grid-column: 2 } - #sec_lords { grid-row: 1; grid-column: 3 } - #sec_battle { grid-row: 1; grid-column: 4 } -} +.defender #grid_a1 { grid-row: 1; grid-column: 1; } +.defender #grid_a2 { grid-row: 1; grid-column: 2; } +.defender #grid_a3 { grid-row: 1; grid-column: 3; } +.defender #grid_d1 { grid-row: 2; grid-column: 1; } +.defender #grid_d2 { grid-row: 2; grid-column: 2; } +.defender #grid_d3 { grid-row: 2; grid-column: 3; } + +.attacker #grid_a1 { grid-row: 2; grid-column: 3; } +.attacker #grid_a2 { grid-row: 2; grid-column: 2; } +.attacker #grid_a3 { grid-row: 2; grid-column: 1; } +.attacker #grid_d1 { grid-row: 1; grid-column: 3; } +.attacker #grid_d2 { grid-row: 1; grid-column: 2; } +.attacker #grid_d3 { grid-row: 1; grid-column: 1; } + /* IMAGES */ @@ -767,79 +788,9 @@ body.shift .exhausted { .vassal.back.vassal_thomas_stanley { background-image: url(images/vassal_thomas_stanley_b.png) } .vassal.back.vassal_trollope { background-image: url(images/vassal_trollope_b.png) } -.card.lord.york.back { background-image: url(cards.1x/lord_york_back.jpg) } -.card.lord.lord_devon { background-image: url(cards.1x/lord_york_devon.jpg) } -.card.lord.lord_edward_iv { background-image: url(cards.1x/lord_york_edward_iv.jpg) } -.card.lord.lord_gloucester_1 { background-image: url(cards.1x/lord_york_gloucester_1.jpg) } -.card.lord.lord_gloucester_2 { background-image: url(cards.1x/lord_york_gloucester_2.jpg) } -.card.lord.lord_march { background-image: url(cards.1x/lord_york_march.jpg) } -.card.lord.lord_norfolk { background-image: url(cards.1x/lord_york_norfolk.jpg) } -.card.lord.lord_northumberland_y1 { background-image: url(cards.1x/lord_york_northumberland_y1.jpg) } -.card.lord.lord_northumberland_y2 { background-image: url(cards.1x/lord_york_northumberland_y2.jpg) } -.card.lord.lord_pembroke { background-image: url(cards.1x/lord_york_pembroke.jpg) } -.card.lord.lord_richard_iii { background-image: url(cards.1x/lord_york_richard_iii.jpg) } -.card.lord.lord_rutland { background-image: url(cards.1x/lord_york_rutland.jpg) } -.card.lord.lord_salisbury { background-image: url(cards.1x/lord_york_salisbury.jpg) } -.card.lord.lord_warwick_y { background-image: url(cards.1x/lord_york_warwick_y.jpg) } -.card.lord.lord_york { background-image: url(cards.1x/lord_york_york.jpg) } - -.card.lord.lancaster.back { background-image: url(cards.1x/lord_lancaster_back.jpg) } -.card.lord.lord_buckingham { background-image: url(cards.1x/lord_lancaster_buckingham.jpg) } -.card.lord.lord_clarence { background-image: url(cards.1x/lord_lancaster_clarence.jpg) } -.card.lord.lord_exeter_1 { background-image: url(cards.1x/lord_lancaster_exeter_1.jpg) } -.card.lord.lord_exeter_2 { background-image: url(cards.1x/lord_lancaster_exeter_2.jpg) } -.card.lord.lord_henry_tudor { background-image: url(cards.1x/lord_lancaster_henry_tudor.jpg) } -.card.lord.lord_henry_vi { background-image: url(cards.1x/lord_lancaster_henry_vi.jpg) } -.card.lord.lord_jasper_tudor_1 { background-image: url(cards.1x/lord_lancaster_jasper_tudor_1.jpg) } -.card.lord.lord_jasper_tudor_2 { background-image: url(cards.1x/lord_lancaster_jasper_tudor_2.jpg) } -.card.lord.lord_margaret { background-image: url(cards.1x/lord_lancaster_margaret.jpg) } -.card.lord.lord_northumberland_l { background-image: url(cards.1x/lord_lancaster_northumberland_l.jpg) } -.card.lord.lord_oxford { background-image: url(cards.1x/lord_lancaster_oxford.jpg) } -.card.lord.lord_somerset_1 { background-image: url(cards.1x/lord_lancaster_somerset_1.jpg) } -.card.lord.lord_somerset_2 { background-image: url(cards.1x/lord_lancaster_somerset_2.jpg) } -.card.lord.lord_warwick_l { background-image: url(cards.1x/lord_lancaster_warwick_l.jpg) } - -.card.cc.york.back { background-image: url(cards.1x/cc_york_back.jpg) } -.card.cc.york.pass { background-image: url(cards.1x/cc_york_pass.jpg) } -.card.cc.lord_devon { background-image: url(cards.1x/cc_york_devon.jpg) } -.card.cc.lord_edward_iv { background-image: url(cards.1x/cc_york_edward_iv.jpg) } -.card.cc.lord_gloucester_1 { background-image: url(cards.1x/cc_york_gloucester.jpg) } -.card.cc.lord_gloucester_2 { background-image: url(cards.1x/cc_york_gloucester.jpg) } -.card.cc.lord_march { background-image: url(cards.1x/cc_york_march.jpg) } -.card.cc.lord_norfolk { background-image: url(cards.1x/cc_york_norfolk.jpg) } -.card.cc.lord_northumberland_y1 { background-image: url(cards.1x/cc_york_northumberland.jpg) } -.card.cc.lord_northumberland_y2 { background-image: url(cards.1x/cc_york_northumberland.jpg) } -.card.cc.lord_pembroke { background-image: url(cards.1x/cc_york_pembroke.jpg) } -.card.cc.lord_richard_iii { background-image: url(cards.1x/cc_york_richard_iii.jpg) } -.card.cc.lord_rutland { background-image: url(cards.1x/cc_york_rutland.jpg) } -.card.cc.lord_salisbury { background-image: url(cards.1x/cc_york_salisbury.jpg) } -.card.cc.lord_warwick_y { background-image: url(cards.1x/cc_york_warwick.jpg) } -.card.cc.lord_york { background-image: url(cards.1x/cc_york_york.jpg) } - -.card.cc.lancaster.back { background-image: url(cards.1x/cc_lancaster_back.jpg) } -.card.cc.lancaster.pass { background-image: url(cards.1x/cc_lancaster_pass.jpg) } -.card.cc.lord_buckingham { background-image: url(cards.1x/cc_lancaster_buckingham.jpg) } -.card.cc.lord_clarence { background-image: url(cards.1x/cc_lancaster_clarence.jpg) } -.card.cc.lord_exeter_1 { background-image: url(cards.1x/cc_lancaster_exeter.jpg) } -.card.cc.lord_exeter_2 { background-image: url(cards.1x/cc_lancaster_exeter.jpg) } -.card.cc.lord_henry_tudor { background-image: url(cards.1x/cc_lancaster_henry_tudor.jpg) } -.card.cc.lord_henry_vi { background-image: url(cards.1x/cc_lancaster_henry_vi.jpg) } -.card.cc.lord_jasper_tudor_1 { background-image: url(cards.1x/cc_lancaster_jasper_tudor.jpg) } -.card.cc.lord_jasper_tudor_2 { background-image: url(cards.1x/cc_lancaster_jasper_tudor.jpg) } -.card.cc.lord_margaret { background-image: url(cards.1x/cc_lancaster_margaret.jpg) } -.card.cc.lord_northumberland_l { background-image: url(cards.1x/cc_lancaster_northumberland.jpg) } -.card.cc.lord_oxford { background-image: url(cards.1x/cc_lancaster_oxford.jpg) } -.card.cc.lord_somerset_1 { background-image: url(cards.1x/cc_lancaster_somerset.jpg) } -.card.cc.lord_somerset_2 { background-image: url(cards.1x/cc_lancaster_somerset.jpg) } -.card.cc.lord_warwick_l { background-image: url(cards.1x/cc_lancaster_warwick.jpg) } - -.card.aow.york.back { background-image: url(cards.1x/aow_york_back.jpg) } - -.card.aow.lancaster.back { background-image: url(cards.1x/aow_lancaster_back.jpg) } - -/* BACKGROUND AND BORDER COLORS */ - -.mat .background { background-color: hsl(37,28%,56%); border-color: hsl(37,28%,66%) hsl(37,28%,46%) hsl(37,28%,46%) hsl(37,28%,66%); box-shadow: 0 0 0 1px hsl(37,28%,19%), 0px 1px 4px #0008; } +/* COLORS */ + +.mat .board { background-color: hsl(37,28%,56%); border-color: hsl(37,28%,66%) hsl(37,28%,46%) hsl(37,28%,46%) hsl(37,28%,66%); box-shadow: 0 0 0 1px hsl(37,28%,19%), 0px 1px 4px #0008; } .marker.battle { background-color: hsl(34,16%,49%); border-color: hsl(34,16%,59%) hsl(34,16%,39%) hsl(34,16%,39%) hsl(34,16%,59%); box-shadow: 0 0 0 1px hsl(34,16%,16%), 0px 1px 4px #0008; } .marker.campaign { background-color: hsl(198,33%,38%); border-color: hsl(198,33%,48%) hsl(198,33%,28%) hsl(198,33%,28%) hsl(198,33%,48%); box-shadow: 0 0 0 1px hsl(198,33%,12%), 0px 1px 4px #0008; } .marker.levy { background-color: hsl(33,35%,44%); border-color: hsl(33,35%,54%) hsl(33,35%,34%) hsl(33,35%,34%) hsl(33,35%,54%); box-shadow: 0 0 0 1px hsl(33,35%,14%), 0px 1px 4px #0008; } @@ -903,3 +854,24 @@ body.shift .exhausted { .unit.vassal.vassal_montagu { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); box-shadow: 0 0 0 1px hsl(358,83%,30%), 0px 1px 4px #0008; } .unit.vassal.vassal_thomas_stanley { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); box-shadow: 0 0 0 1px hsl(358,83%,30%), 0px 1px 4px #0008; } .unit.vassal.vassal_trollope { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); box-shadow: 0 0 0 1px hsl(358,83%,30%), 0px 1px 4px #0008; } + +/* ULTRA-WIDE SCREEN LAYOUTS */ + +@media (min-width: 2800px) { + main { display: grid; gap: 0 12px; } + main { grid-template-columns: 0 1275px auto 0; } + #sec_map { grid-row: 1; grid-column: 2 } + #sec_battle { grid-row: 2; grid-column: 2 } + #sec_lords { grid-row: 1 / 3; grid-column: 3 } +} + +@media (min-width: 3200px) { + main { grid-template-columns: 36px 1275px auto 0; } +} + +@media (min-width: 4100px) { + main { grid-template-columns: 0 1275px 1fr 1275px 0; } + #sec_map { grid-row: 1; grid-column: 2 } + #sec_lords { grid-row: 1; grid-column: 3 } + #sec_battle { grid-row: 1; grid-column: 4 } +} @@ -55,7 +55,7 @@ <main> -<!-- MAP, TUCKED, EVENTS --> +<!-- MAP, EVENTS --> <section id="sec_map"> <div id="mapwrap"> @@ -86,12 +86,8 @@ </section> <!-- BATTLE / ARTS OF WAR --> -<section id="sec_battle"> -<div id="arts_of_war_panel" class="panel hide"> -<div id="arts_of_war_header" class="panel_header">Arts of War</div> -<div id="arts_of_war" class="panel_body"></div> -</div> +<section id="sec_battle"> <div id="battle_panel" class="panel hide"> <div id="battle_header" class="panel_header">Battle</div> @@ -105,19 +101,25 @@ </div> </div> +<div id="reserves_panel" class="panel hide"> +<div id="reserves_header" class="panel_header">Reserves</div> +<div id="reserves" class="panel_body court_body"></div> +</div> + <div id="routed_panel" class="panel hide"> <div id="routed_header" class="panel_header">Routed / Fled</div> <div id="routed" class="panel_body court_body"></div> </div> -<div id="reserves_panel" class="panel hide"> -<div id="reserves_header" class="panel_header">Reserves</div> -<div id="reserves" class="panel_body court_body"></div> +<div id="arts_of_war_panel" class="panel hide"> +<div id="arts_of_war_header" class="panel_header">Arts of War</div> +<div id="arts_of_war" class="panel_body"></div> </div> </section> <!-- LORD MATS, HAND, PLAN --> + <section id="sec_lords"> <div class="panel court_panel"> @@ -6,105 +6,13 @@ function toggle_pieces() { document.getElementById("pieces").classList.toggle("hide") } -// === COMMON LIBRARY === - -function map_get(map, key, missing) { - let a = 0 - let b = (map.length >> 1) - 1 - while (a <= b) { - let m = (a + b) >> 1 - let x = map[m << 1] - if (key < x) - b = m - 1 - else if (key > x) - a = m + 1 - else - return map[(m << 1) + 1] - } - return missing -} - -function map_get_pack4(map, lord, k) { - return pack4_get(map_get(map, lord, 0), k) -} - -function map2_get(map, x, y, v) { - return map_get(map, (x << 1) + y, v) -} - -function set_has(set, item) { - if (!set) - return false - let a = 0 - let b = set.length - 1 - while (a <= b) { - let m = (a + b) >> 1 - let x = set[m] - if (item < x) - b = m - 1 - else if (item > x) - a = m + 1 - else - return true - } - return false -} - -function pack1_get(word, n) { - return (word >>> n) & 1 -} - -function pack2_get(word, n) { - n = n << 1 - return (word >>> n) & 3 -} - -function pack4_get(word, n) { - n = n << 2 - return (word >>> n) & 15 -} - // === CONSTANTS (matching those in rules.js) === function find_lord(name) { return data.lords.findIndex((x) => x.name === name) } function find_card(name) { return data.cards.findIndex((x) => x.name === name) } function find_locale(name) { return data.locales.findIndex(x => x.name === name) } -const LORD_YORK = find_lord("York") -const LORD_MARCH = find_lord("March") -const LORD_EDWARD_IV = find_lord("Edward IV") -const LORD_SALISBURY = find_lord("Salisbury") -const LORD_RUTLAND = find_lord("Rutland") -const LORD_PEMBROKE = find_lord("Pembroke") -const LORD_DEVON = find_lord("Devon") -const LORD_NORTHUMBERLAND_Y1 = find_lord("Northumberland Y1") -const LORD_NORTHUMBERLAND_Y2 = find_lord("Northumberland Y2") - -const LORD_GLOUCESTER_1 = find_lord("Gloucester 1") -const LORD_GLOUCESTER_2 = find_lord("Gloucester 2") -const LORD_RICHARD_III = find_lord("Richard III") -const LORD_NORFOLK = find_lord("Norfolk") -const LORD_WARWICK_Y = find_lord("Warwick Y") - const LORD_HENRY_VI = find_lord("Henry VI") -const LORD_MARGARET = find_lord("Margaret") -const LORD_SOMERSET_1 = find_lord("Somerset 1") -const LORD_SOMERSET_2 = find_lord("Somerset 2") - -const LORD_EXETER_1 = find_lord("Exeter 1") -const LORD_EXETER_2 = find_lord("Exeter 2") - -const LORD_BUCKINGHAM = find_lord("Buckingham") -const LORD_CLARENCE = find_lord("Clarence") -const LORD_NORTHUMBERLAND_L = find_lord("Northumberland L") - -const LORD_JASPER_TUDOR_1 = find_lord("Jasper Tudor 1") -const LORD_JASPER_TUDOR_2 = find_lord("Jasper Tudor 2") - -const LORD_HENRY_TUDOR = find_lord("Henry Tudor") -const LORD_OXFORD = find_lord("Oxford") -const LORD_WARWICK_L = find_lord("Warwick L") - const LOC_LONDON = find_locale("London") const first_york_lord = 0 @@ -124,84 +32,6 @@ const last_locale = data.locales.length - 1 const first_vassal = 0 const last_vassal = data.vassals.length - 1 -const Y1 = find_card("Y1") -const Y2 = find_card("Y2") -const Y3 = find_card("Y3") -const Y4 = find_card("Y4") -const Y5 = find_card("Y5") -const Y6 = find_card("Y6") -const Y7 = find_card("Y7") -const Y8 = find_card("Y8") -const Y9 = find_card("Y9") -const Y10 = find_card("Y10") -const Y11 = find_card("Y11") -const Y12 = find_card("Y12") -const Y13 = find_card("Y13") -const Y14 = find_card("Y14") -const Y15 = find_card("Y15") -const Y16 = find_card("Y16") -const Y17 = find_card("Y17") -const Y18 = find_card("Y18") -const Y19 = find_card("Y19") -const Y20 = find_card("Y20") -const Y21 = find_card("Y21") -const Y22 = find_card("Y22") -const Y23 = find_card("Y23") -const Y24 = find_card("Y24") -const Y25 = find_card("Y25") -const Y26 = find_card("Y26") -const Y27 = find_card("Y27") -const Y28 = find_card("Y28") -const Y29 = find_card("Y29") -const Y30 = find_card("Y30") -const Y31 = find_card("Y31") -const Y32 = find_card("Y32") -const Y33 = find_card("Y33") -const Y34 = find_card("Y34") -const Y35 = find_card("Y35") -const Y36 = find_card("Y36") -const Y37 = find_card("Y37") - -const L1 = find_card("L1") -const L2 = find_card("L2") -const L3 = find_card("L3") -const L4 = find_card("L4") -const L5 = find_card("L5") -const L6 = find_card("L6") -const L7 = find_card("L7") -const L8 = find_card("L8") -const L9 = find_card("L9") -const L10 = find_card("L10") -const L11 = find_card("L11") -const L12 = find_card("L12") -const L13 = find_card("L13") -const L14 = find_card("L14") -const L15 = find_card("L15") -const L16 = find_card("L16") -const L17 = find_card("L17") -const L18 = find_card("L18") -const L19 = find_card("L19") -const L20 = find_card("L20") -const L21 = find_card("L21") -const L22 = find_card("L22") -const L23 = find_card("L23") -const L24 = find_card("L24") -const L25 = find_card("L25") -const L26 = find_card("L26") -const L27 = find_card("L27") -const L28 = find_card("L28") -const L29 = find_card("L29") -const L30 = find_card("L30") -const L31 = find_card("L31") -const L32 = find_card("L32") -const L33 = find_card("L33") -const L34 = find_card("L34") -const L35 = find_card("L35") -const L36 = find_card("L36") -const L37 = find_card("L37") - -const A1 = 0, A2 = 1, A3 = 2, D1 = 3, D2 = 4, D3 = 5 - const RETINUE = 0 const VASSAL = 1 const MEN_AT_ARMS = 2 @@ -354,14 +184,6 @@ function is_lancaster_lord(lord) { return lord >= first_lancaster_lord && lord <= last_lancaster_lord } -function is_lord_on_left_or_right(lord) { - if (view.battle.array[A1] === lord) return true - if (view.battle.array[A3] === lord) return true - if (view.battle.array[D1] === lord) return true - if (view.battle.array[D3] === lord) return true - return false -} - function get_lord_locale(lord) { return map_get(view.pieces.locale, lord, -1) } @@ -583,21 +405,26 @@ const ui = { locale_markers: [], locale_markers_rose: [], lord_cylinder: [], - lord_mat: [], + mat: [], + mat_card: [], + mat_caps: [], + retinue: [], + routed_retinue: [], + troops: [], + routed_troops: [], + assets: [], + lord_exile: [], - lord_buttons: [], vassal_cal: [], // token on calendar vassal_map: [], // token on map - forces: [], - routed: [], - assets: [], - lord_capabilities: [], - lord_events: [], + valour_area: [], + marker_area: [], + lord_moved1: [], lord_moved2: [], lord_fled: [], - lord_valour: [], lord_feed: [], + cards: [], cards2: [], calendar: [], @@ -672,20 +499,25 @@ function build_div(parent, className) { function build_lord_mat(lord, ix, side, name) { let mat = build_div(null, `mat ${side} ${name}`) - let bg = build_div(mat, "background") - ui.forces[ix] = build_div(bg, "forces") - ui.routed[ix] = build_div(bg, "routed") - ui.assets[ix] = build_div(bg, "assets") - ui.lord_buttons[ix] = build_div(bg, "card lord " + side + " " + name) - ui.lord_capabilities[ix] = build_div(mat, "capabilities") - ui.lord_events[ix] = build_div(mat, "events") - ui.lord_moved1[ix] = build_div(mat, "marker square moved_fought one hide") - ui.lord_moved2[ix] = build_div(mat, "marker square moved_fought two hide") - ui.lord_fled[ix] = build_div(mat, "marker square fled hide") - ui.lord_valour[ix] = build_div(mat, "valour_area") - ui.lord_feed[ix] = build_div(mat, "marker small feed x2") - ui.lord_mat[ix] = mat - register_action(ui.lord_buttons[ix], "lord", ix) + let board = build_div(mat, "board") + ui.mat_card[ix] = build_div(board, "card lord " + side + " " + name) + build_div(board, "mask " + side) + ui.retinue[ix] = build_div(board, "retinue_vassals") + ui.routed_retinue[ix] = build_div(board, "routed_retinue_vassals") + ui.troops[ix] = build_div(board, "troops") + ui.routed_troops[ix] = build_div(board, "routed_troops") + ui.assets[ix] = build_div(board, "assets") + ui.mat_caps[ix] = build_div(mat, "capabilities") + ui.valour_area[ix] = build_div(board, "valour_area") + ui.marker_area[ix] = build_div(board, "marker_area") + + ui.lord_fled[ix] = build_div(ui.marker_area[ix], "marker square fled hide") + ui.lord_feed[ix] = build_div(ui.marker_area[ix], "marker small feed x2") + ui.lord_moved1[ix] = build_div(ui.marker_area[ix], "marker square moved_fought one hide") + ui.lord_moved2[ix] = build_div(ui.marker_area[ix], "marker square moved_fought two hide") + + ui.mat[ix] = mat + register_action(ui.mat_card[ix], "lord", ix) } function build_card(side, c, id) { @@ -1137,9 +969,9 @@ function add_asset(parent, type, n, lord) { parent.appendChild(elt) } -function update_forces(parent, forces, lord_ix, routed) { +function update_forces(parent, a, b, forces, lord_ix, routed) { parent.replaceChildren() - for (let i = 0; i < force_type_count; ++i) { + for (let i = a; i <= b; ++i) { if (i === VASSAL) { for_each_vassal_with_lord(lord_ix, v => { if (view.battle) { @@ -1204,19 +1036,23 @@ function update_valour(lord, parent, battle) { function update_lord_mat(ix) { if (view.reveal & (1 << ix)) { - ui.lord_mat[ix].classList.remove("hidden") + ui.mat[ix].classList.remove("hidden") update_assets(ui.assets[ix], view.pieces.assets, ix) - update_forces(ui.forces[ix], view.pieces.forces, ix, false) - update_forces(ui.routed[ix], view.pieces.routed, ix, true) + update_forces(ui.retinue[ix], 0, 1, view.pieces.forces, ix, false) + update_forces(ui.routed_retinue[ix], 0, 1, view.pieces.routed, ix, true) + update_forces(ui.troops[ix], 2, 6, view.pieces.forces, ix, false) + update_forces(ui.routed_troops[ix], 2, 6, view.pieces.routed, ix, true) ui.lord_feed[ix].classList.toggle("hide", count_lord_all_forces(ix) <= 6) if (get_lord_locale(LORD_HENRY_VI) === CAPTURE_OF_THE_KING + ix) ui.assets[ix].appendChild(ui.captured_king) } else { - ui.lord_mat[ix].classList.add("hidden") + ui.mat[ix].classList.add("hidden") ui.assets[ix].replaceChildren() - ui.forces[ix].replaceChildren() - ui.routed[ix].replaceChildren() + ui.retinue[ix].replaceChildren() + ui.routed_retinue[ix].replaceChildren() + ui.troops[ix].replaceChildren() + ui.routed_troops[ix].replaceChildren() ui.lord_moved1[ix].classList.add("hide") ui.lord_moved2[ix].classList.add("hide") ui.lord_feed[ix].classList.add("hide") @@ -1225,14 +1061,14 @@ function update_lord_mat(ix) { ui.lord_moved1[ix].classList.toggle("hide", is_levy_phase() || (m !== 1 && m !== 2)) ui.lord_moved2[ix].classList.toggle("hide", is_levy_phase() || (m !== 2)) ui.lord_fled[ix].classList.toggle("hide", view.battle === undefined || !set_has(view.battle.fled, ix)) - update_valour(ix, ui.lord_valour[ix], view.battle) + update_valour(ix, ui.valour_area[ix], view.battle) } function update_lord(ix) { let locale = get_lord_locale(ix) if (locale < 0 || locale > CALENDAR_EXILE + 16) { ui.lord_cylinder[ix].classList.add("hide") - ui.lord_mat[ix].classList.remove("action") + ui.mat[ix].classList.remove("action") return } if (locale < CALENDAR) { @@ -1246,14 +1082,14 @@ function update_lord(ix) { ui.lord_cylinder[ix].classList.remove("hide") ui.lord_exile[ix].classList.toggle("hide", !is_lord_in_exile(ix)) } - ui.lord_buttons[ix].classList.toggle("action", is_action("lord", ix)) + ui.mat_card[ix].classList.toggle("action", is_action("lord", ix)) ui.lord_cylinder[ix].classList.toggle("action", is_action("lord", ix)) ui.lord_cylinder[ix].classList.toggle("selected", is_lord_selected(ix)) - ui.lord_mat[ix].classList.toggle("selected", is_lord_selected(ix)) + ui.mat[ix].classList.toggle("selected", is_lord_selected(ix)) ui.lord_cylinder[ix].classList.toggle("command", is_lord_command(ix)) - ui.lord_mat[ix].classList.toggle("command", is_lord_command(ix)) + ui.mat[ix].classList.toggle("command", is_lord_command(ix)) ui.seat[ix].classList.toggle("hide", !is_lord_in_game(ix)) } @@ -1434,21 +1270,14 @@ function update_cards() { } for (let ix = 0; ix < data.lords.length; ++ix) { - ui.lord_capabilities[ix].replaceChildren() - ui.lord_events[ix].replaceChildren() + ui.mat_caps[ix].replaceChildren() if (view.reveal & (1 << ix)) { let c = get_lord_capability(ix, 0) if (c >= 0) - ui.lord_capabilities[ix].appendChild(ui.cards[c]) + ui.mat_caps[ix].appendChild(ui.cards[c]) c = get_lord_capability(ix, 1) if (c >= 0) - ui.lord_capabilities[ix].appendChild(ui.cards[c]) - if (view.battle && view.battle.field_organ === ix) - ui.lord_events[ix].appendChild(ui.cards[EVENT_TEUTONIC_FIELD_ORGAN]) - if (view.battle && view.battle.bridge && view.battle.bridge.lord1 === ix) - ui.lord_events[ix].appendChild(ui.cards[EVENT_RUSSIAN_BRIDGE]) - if (view.battle && view.battle.bridge && view.battle.bridge.lord2 === ix) - ui.lord_events[ix].appendChild(ui.cards[EVENT_TEUTONIC_BRIDGE]) + ui.mat_caps[ix].appendChild(ui.cards[c]) } } } @@ -1460,17 +1289,17 @@ function update_battle() { let lord = array[i] ui.battle_grid_array[i].replaceChildren() if (lord >= 0) - ui.battle_grid_array[i].appendChild(ui.lord_mat[lord]) + ui.battle_grid_array[i].appendChild(ui.mat[lord]) ui.battle_grid_array[i].classList.toggle("action", is_action("array", i)) } ui.reserves.replaceChildren() for (let lord of view.battle.reserves) - ui.reserves.appendChild(ui.lord_mat[lord]) + ui.reserves.appendChild(ui.mat[lord]) ui.routed.replaceChildren() for (let lord of view.battle.routed) - ui.routed.appendChild(ui.lord_mat[lord]) + ui.routed.appendChild(ui.mat[lord]) } function update_court() { @@ -1484,10 +1313,10 @@ function update_court() { lcourt.replaceChildren() for (let lord = first_york_lord; lord <= last_york_lord; ++lord) if (!is_lord_in_battle(lord) && is_lord_on_map(lord)) - ycourt.appendChild(ui.lord_mat[lord]) + ycourt.appendChild(ui.mat[lord]) for (let lord = first_lancaster_lord; lord <= last_lancaster_lord; ++lord) if (!is_lord_in_battle(lord) && is_lord_on_map(lord)) - lcourt.appendChild(ui.lord_mat[lord]) + lcourt.appendChild(ui.mat[lord]) } function update_vassals() { @@ -1620,7 +1449,7 @@ function on_update() { if (view.battle) { ui.reserves_panel.classList.toggle("hide", view.battle.reserves.length === 0) - ui.routed_panel.classList.remove("hide") + ui.routed_panel.classList.toggle("hide", view.battle.routed.length === 0) ui.battle_panel.classList.remove("hide") ui.battle_header.textContent = "Battle at " + data.locales[view.battle.where].name if (view.battle.attacker === player) { @@ -1740,6 +1569,7 @@ function on_update() { // REMOVE INFLUENCE action_button("influence", "Influence") action_button("favour", "Favour") + action_button("valour", "Valour") action_button("pass", "Pass") action_button("done", "Done") @@ -1783,7 +1613,7 @@ function on_click_locale_tip(loc) { } function on_click_lord_tip(lord) { - ui.lord_mat[lord].scrollIntoView({ block: "center", inline: "center", behavior: "smooth" }) + ui.mat[lord].scrollIntoView({ block: "center", inline: "center", behavior: "smooth" }) } function sub_locale_name(match, p1) { @@ -1803,6 +1633,61 @@ function sub_vassal_name(match, x) { return `<span class="vassal_tip" >${n}</span>` } +const ICONS_SVG = { + B0: '<span class="black d0"></span>', + B1: '<span class="black d1"></span>', + B2: '<span class="black d2"></span>', + B3: '<span class="black d3"></span>', + B4: '<span class="black d4"></span>', + B5: '<span class="black d5"></span>', + B6: '<span class="black d6"></span>', + W0: '<span class="white d0"></span>', + W1: '<span class="white d1"></span>', + W2: '<span class="white d2"></span>', + W3: '<span class="white d3"></span>', + W4: '<span class="white d4"></span>', + W5: '<span class="white d5"></span>', + W6: '<span class="white d6"></span>', +} + +const ICONS_HTM = { + B0: '<span class="black d0">0</span>', + B1: '<span class="black d1">1</span>', + B2: '<span class="black d2">2</span>', + B3: '<span class="black d3">3</span>', + B4: '<span class="black d4">4</span>', + B5: '<span class="black d5">5</span>', + B6: '<span class="black d6">6</span>', + W0: '<span class="white d0">0</span>', + W1: '<span class="white d1">1</span>', + W2: '<span class="white d2">2</span>', + W3: '<span class="white d3">3</span>', + W4: '<span class="white d4">4</span>', + W5: '<span class="white d5">5</span>', + W6: '<span class="white d6">6</span>', +} + +const ICONS_TXT = { + B0: "\u25cf", + B1: "\u2776", + B2: "\u2777", + B3: "\u2778", + B4: "\u2779", + B5: "\u277A", + B6: "\u277B", + W0: "\u25cb", + W1: "\u2460", + W2: "\u2461", + W3: "\u2462", + W4: "\u2463", + W5: "\u2464", + W6: "\u2465", +} + +function sub_icon(match) { + return ICONS_TXT[match] +} + function on_log(text) { let p = document.createElement("div") @@ -1826,6 +1711,8 @@ function on_log(text) { text = text.replace(/%(\d+)/g, sub_locale_name) text = text.replace(/V(\d+)/g, sub_vassal_name) + text = text.replace(/\b[BW]\d\b/g, sub_icon) + if (text.match(/^\.h1/)) { text = text.substring(4) p.className = "h1" @@ -1861,3 +1748,61 @@ function on_log(text) { build_map() scroll_with_middle_mouse("main") +// === COMMON LIBRARY === + +function map_get(map, key, missing) { + let a = 0 + let b = (map.length >> 1) - 1 + while (a <= b) { + let m = (a + b) >> 1 + let x = map[m << 1] + if (key < x) + b = m - 1 + else if (key > x) + a = m + 1 + else + return map[(m << 1) + 1] + } + return missing +} + +function map_get_pack4(map, lord, k) { + return pack4_get(map_get(map, lord, 0), k) +} + +function map2_get(map, x, y, v) { + return map_get(map, (x << 1) + y, v) +} + +function set_has(set, item) { + if (!set) + return false + let a = 0 + let b = set.length - 1 + while (a <= b) { + let m = (a + b) >> 1 + let x = set[m] + if (item < x) + b = m - 1 + else if (item > x) + a = m + 1 + else + return true + } + return false +} + +function pack1_get(word, n) { + return (word >>> n) & 1 +} + +function pack2_get(word, n) { + n = n << 1 + return (word >>> n) & 3 +} + +function pack4_get(word, n) { + n = n << 2 + return (word >>> n) & 15 +} + @@ -175,7 +175,6 @@ interface State { coin?(lord: Lord): void, cart?(lord: Lord): void, ship?(lord: Lord): void, - valour?(lord: Lord): void, burgundians?(lord: Lord): void, retinue?(lord: Lord): void, @@ -193,6 +192,7 @@ interface State { vassal?(vassal: Vassal): void, + valour?(): void, add_men_at_arms?(): void, add_militia2?(): void, add_militia?(): void, @@ -371,9 +371,6 @@ const INFLUENCE_TURNS = [ 1, 4, 6, 9, 11, 14 ] const GROW_TURNS = [ 4, 9, 14 ] const WASTE_TURNS = [ 5, 10 ] -const HIT = [ "0", "\u2776", "\u2777", "\u2778", "\u2779", "\u277A", "\u277B" ] -const MISS = [ "0", "\u2460", "\u2461", "\u2462", "\u2463", "\u2464", "\u2465" ] - // unit types const RETINUE = 0 as Force const VASSAL = 1 as Force @@ -2091,10 +2088,10 @@ function roll_influence_check(lord: Lord, spend: number, calc=common_ic) { let die = roll_die() if (die <= rating) { - log(`Influence 1-${rating}: ${HIT[die]}`) + log(`Influence 1-${rating}: B${die}`) return true } else { - log(`Influence 1-${rating}: ${MISS[die]}`) + log(`Influence 1-${rating}: W${die}`) return false } } @@ -4302,19 +4299,19 @@ function goto_forage() { let die = roll_die() if (die <= 4) { add_lord_assets(game.command, PROV, 1) - log(`${HIT[die]}, Foraged at %${here}`) + log(`B${die}, Foraged at %${here}`) deplete_locale(here) } else { - log(`${MISS[die]}, Forage Failure`) + log(`W${die}, Forage Failure`) } } else if (has_adjacent_enemy(here) || is_enemy_locale(here)) { let die = roll_die() if (die <= 3) { add_lord_assets(game.command, PROV, 1) - log(`${HIT[die]}, Foraged at %${here}`) + log(`B${die}, Foraged at %${here}`) deplete_locale(here) } else { - log(`${MISS[die]}, Forage Failure`) + log(`W${die}, Forage Failure`) } } else { add_lord_assets(game.command, PROV, 1) @@ -5122,7 +5119,10 @@ states.intercept = { else { let roll = roll_die() success = roll <= valour - log(`Intercept ${range(valour)}: ${success ? HIT[roll] : MISS[roll]}`) + if (success) + log(`Intercept ${range(valour)}: B${roll}`) + else + log(`Intercept ${range(valour)}: W${roll}`) } if (success) { goto_intercept_march() @@ -6303,11 +6303,11 @@ function action_regroup(lord: Lord, type: Force) { let die = roll_die() if (die <= protection) { - logi(`${get_force_name(lord, type)} ${range(protection)}: ${MISS[die]}`) + logi(`${get_force_name(lord, type)} ${range(protection)}: W${die}`) add_lord_routed_forces(lord, type, -1) add_lord_forces(lord, type, 1) } else { - logi(`${get_force_name(lord, type)} ${range(protection)}: ${HIT[die]}`) + logi(`${get_force_name(lord, type)} ${range(protection)}: B${die}`) } game.event_regroup[type]-- @@ -7309,10 +7309,10 @@ function rout_unit(lord: Lord, type: Force, v: Vassal = NOVASSAL) { function assign_hit_roll(what, prot, extra) { let die = roll_die() if (die <= prot) { - logi(`${what} ${range(prot)}: ${MISS[die]}${extra}`) + logi(`${what} ${range(prot)}: W${die}${extra}`) return false } else { - logi(`${what} ${range(prot)}: ${HIT[die]}${extra}`) + logi(`${what} ${range(prot)}: B${die}${extra}`) return true } } @@ -7423,13 +7423,13 @@ states.spend_valour = { }, prompt() { view.prompt = `Spend Valour: Reroll hit on ${get_force_name(game.who, game.battle.force, game.vassal)}?` - gen_action_valour(game.who) + view.actions.valour = 1 view.actions.pass = 1 }, pass() { rout_unit(game.who, game.battle.force, game.vassal) }, - valour(_) { + valour() { let protection = get_modified_protection(game.who, game.battle.force) spend_valour(game.who) @@ -7649,11 +7649,11 @@ function roll_losses(lord: Lord, type: Force) { let die = roll_die() if (die <= protection) { - logi(`${get_force_name(lord, type)} ${range(protection)}: ${MISS[die]}`) + logi(`${get_force_name(lord, type)} ${range(protection)}: W${die}`) add_lord_routed_forces(lord, type, -1) add_lord_forces(lord, type, 1) } else { - logi(`${get_force_name(lord, type)} ${range(protection)}: ${HIT[die]}`) + logi(`${get_force_name(lord, type)} ${range(protection)}: B${die}`) add_lord_routed_forces(lord, type, -1) } } @@ -7925,18 +7925,18 @@ states.death_check = { let die = roll_die() if (set_has(game.battle.fled, game.who)) { if (die >= 5) { - logi("L" + game.who + " 5-6 " + HIT[die]) + logi("L" + game.who + " 5-6 B" + die) remove_lord(game.who) } else { - logi("L" + game.who + " 5-6 " + MISS[die]) + logi("L" + game.who + " 5-6 W" + die) disband_lord(game.who) } } else { if (die >= 3) { - logi("L" + game.who + " 3-6 " + HIT[die]) + logi("L" + game.who + " 3-6 B" + die) remove_lord(game.who) } else { - logi("L" + game.who + " 3-6 " + MISS[die]) + logi("L" + game.who + " 3-6 W" + die) disband_lord(game.who) } } @@ -8889,10 +8889,10 @@ function end_disembark() { function roll_disembark() { let die = roll_die() if (die <= 4) { - log(`Shipwreck 1-4: ${HIT[die]}.`) + log(`Shipwreck 1-4: B${die}.`) return false } else { - log(`Shipwreck 1-4: ${MISS[die]}.`) + log(`Shipwreck 1-4: W${die}.`) return true } } @@ -10666,10 +10666,10 @@ function can_naval_blockade(here: Locale) { function roll_blockade() { let roll = roll_die() if (roll <= 2) { - log("Naval Blockade " + HIT[roll]) + log("Naval Blockade B" + roll) return true } else { - log("Naval Blockade " + MISS[roll]) + log("Naval Blockade W" + roll) return false } } @@ -12493,6 +12493,8 @@ exports.view = function (state, current) { if (lord !== NOBODY) view.reveal |= 1 << lord } + for (let lord of game.battle.routed) + view.reveal |= 1 << lord for (let lord of game.battle.reserves) view.reveal |= 1 << lord } |