diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-01 01:28:41 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-01 01:28:41 +0200 |
commit | 519c213119eff9c187f56a0eadd9980bb5c72ef0 (patch) | |
tree | 222e255fad62b9b22b98daa1d959d695a045c788 | |
parent | 9baa67c5e4d7c80b864bc4b680c765f58f64b391 (diff) | |
download | plantagenet-519c213119eff9c187f56a0eadd9980bb5c72ef0.tar.gz |
same colored piece outlines
-rw-r--r-- | play.css | 217 | ||||
-rw-r--r-- | play.js | 103 |
2 files changed, 141 insertions, 179 deletions
@@ -65,7 +65,6 @@ body.Lancaster header.your_turn { background-color: hsl(355, 83%, 72%); } width: 12px; height: 12px; border-radius: 0px; - box-shadow: none; border: none; background-size: 600% 100%; background-repeat: no-repeat; @@ -196,6 +195,7 @@ body.Lancaster #plan_actions .york { display: none } /* CARDS */ .card.disabled { filter: brightness(80%); } +.card { box-shadow: 0 0 0 1px #333; } .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; } @@ -206,6 +206,7 @@ body.Lancaster #plan_actions .york { display: none } background-size: cover; background-position: center; background-repeat: no-repeat; + box-shadow: 0 0 0 1px #333; } .marker.square { @@ -307,7 +308,6 @@ body.Lancaster #plan_actions .york { display: none } .locale.tip { background-color: #ff08; - box-shadow: 0 0 8px #ff08; } .locale_markers { @@ -382,12 +382,12 @@ body.Lancaster #plan_actions .york { display: none } background-size: cover; border: 2px solid transparent; border-radius: 8px; - box-shadow: 0 0 0 1px #444, 0 1px 4px #0008; + box-shadow: 0 0 0 1px #333; margin: 3px; } .asset.action { - box-shadow: 0 0 0 1px #444, 0 0 0 4px white !important; + box-shadow: 0 0 0 1px #333, 0 0 0 4px white !important; } .prov + .prov { margin-bottom: -30px; } @@ -413,24 +413,12 @@ body.Lancaster #plan_actions .york { display: none } .unit.mercenaries { background-image: url(images/unit_mercenaries.svg) } .unit.burgundians { background-image: url(images/unit_handgunners.svg) } -/* -.men_at_arms + .longbowmen { margin-right: 0; } -.men_at_arms + .militia { margin-right: 0; } -.men_at_arms + .mercenaries { margin-right: 0; } -.men_at_arms + .burgundians { margin-right: 0; } -.longbowmen + .militia { margin-right: 0; } -.longbowmen + .mercenaries { margin-right: 0; } -.longbowmen + .burgundians { margin-right: 0; } -.militia + .mercenaries { margin-right: 0; } -.militia + .burgundians { margin-right: 0; } -.mercenaries + .burgundians { margin-right: 0; } -*/ - .unit.retinue { border: 2px solid gray; width: 46px; height: 46px; border-radius: 8px; + box-shadow: 0 0 0 1px #333; } .unit.vassal { @@ -438,18 +426,19 @@ body.Lancaster #plan_actions .york { display: none } width: 46px; height: 46px; border-radius: 8px; + box-shadow: 0 0 0 1px #333; } .unit.retinue.action { - box-shadow: 0 0 0 1px black, 0 0 0 4px white !important; + box-shadow: 0 0 0 1px #333, 0 0 0 4px white !important; } .unit.vassal.action { - box-shadow: 0 0 0 1px black, 0 0 0 4px white !important; + box-shadow: 0 0 0 1px #333, 0 0 0 4px white !important; } .unit.vassal.selected { - box-shadow: 0 0 0 1px black, 0 0 0 4px yellow !important; + box-shadow: 0 0 0 1px #333, 0 0 0 4px yellow !important; } .unit.shape.action { @@ -460,7 +449,6 @@ body.Lancaster #plan_actions .york { display: none } drop-shadow(-2px 0px 0px white); } - /* LORD MAT */ .mat { @@ -487,8 +475,8 @@ body.Lancaster #plan_actions .york { display: none } .mat .board { background-image: url(images/lord_mat_150.jpg); } } -.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; } +.mat.command .board { box-shadow: 0 0 0 1px #333, 0 0 0 4px gold; } +.mat.selected .board { box-shadow: 0 0 0 1px #333, 0 0 0 4px yellow; } #court1 .mat.hidden .board, #court2 .mat.hidden .board { @@ -547,7 +535,6 @@ body.shift .mat .capabilities { position: absolute; top: 38px; left: 24px; - width: 170px; height: 50px; display: flex; align-content: center; @@ -559,8 +546,7 @@ body.shift .mat .capabilities { position: absolute; top: 240px; left: 24px; - width: 170px; - height: 0px; + height: 50px; display: flex; align-content: center; flex-wrap: wrap; @@ -601,22 +587,6 @@ body.shift .mat .capabilities { gap: 0px; } -.defender .att .troops, -.attacker .def .troops, -.defender .att .routed_troops, -.attacker .def .routed_troops -{ - flex-direction: column; - justify-content: start; -} - -.defender .att .troops .shape, -.attacker .def .troops .shape, -.defender .att .routed_troops .shape, -.attacker .def .routed_troops .shape { - margin: 0 0 -26px 0; -} - .mat .board .marker_area { pointer-events: none; position: absolute; @@ -656,11 +626,17 @@ body.shift .mat .capabilities { } .defender .att .assets, -.attacker .def .assets -{ +.attacker .def .assets { justify-content: start; } +.defender .att .retinue_vassals, +.attacker .def .retinue_vassals, +.defender .att .routed_retinue_vassals, +.attacker .def .routed_retinue_vassals { + flex-direction: row-reverse; +} + /* BATTLE GRID WITH LORD MATS */ #battle_grid { @@ -692,10 +668,16 @@ body.shift .mat .capabilities { .defender .att, .attacker .def, -.defender .att .unit, -.attacker .def .unit, +.defender .att .retinue_vassals, +.attacker .def .retinue_vassals, +.defender .att .routed_retinue_vassals, +.attacker .def .routed_retinue_vassals, .defender .att .assets, .attacker .def .assets, +.defender .att .troops, +.attacker .def .troops, +.defender .att .routed_troops, +.attacker .def .routed_troops, .defender .att .valour, .attacker .def .valour, .defender .att .fled, @@ -708,13 +690,6 @@ body.shift .mat .capabilities { transform: rotate(180deg) } -.defender .att .background, -.attacker .def .background -{ - border-color: #b1a05f #f2e19d #f2e19d #b1a05f; - box-shadow: 0 0 0 1px #584800, -1px -2px 4px #0008; -} - .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; } @@ -729,7 +704,6 @@ body.shift .mat .capabilities { .attacker #grid_d2 { grid-row: 1; grid-column: 2; } .attacker #grid_d3 { grid-row: 1; grid-column: 1; } - /* IMAGES */ .marker.levy { background-image: url(images/levy.png) } @@ -753,7 +727,6 @@ body.shift .mat .capabilities { .marker.exhausted { background-image: url(images/exhausted.png) } .marker.end { background-image: url(images/end.png) } .marker.depleted { background-image: url(images/depleted.png) } -.marker.depleted { background-image: url(images/depleted.png) } .marker.victory_check { background-image: url(images/victory_check.png) } .marker.valour { background-image: url(images/valour.png) } .marker.rose.york { background-image: url(images/rose_york.png) } @@ -886,76 +859,80 @@ body.shift .mat .capabilities { /* 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 #333, 0px 0px 4px #0008; +} + .defender .att .mat .board, .attacker .def .mat .board { border-color: hsl(37,28%,46%) hsl(37,28%,66%) hsl(37,28%,66%) hsl(37,28%,46%); } -.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 0px 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%); } -.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%); } -.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%); } -.asset.cart.x1 { background-color: hsl(36,52%,70%); border-color: hsl(36,52%,80%) hsl(36,52%,60%) hsl(36,52%,60%) hsl(36,52%,80%); box-shadow: 0 0 0 1px hsl(36,52%,23%); } -.asset.cart.x2 { background-color: hsl(34,51%,64%); border-color: hsl(34,51%,74%) hsl(34,51%,54%) hsl(34,51%,54%) hsl(34,51%,74%); box-shadow: 0 0 0 1px hsl(34,51%,21%); } -.asset.cart.x3 { background-color: hsl(34,47%,56%); border-color: hsl(34,47%,66%) hsl(34,47%,46%) hsl(34,47%,46%) hsl(34,47%,66%); box-shadow: 0 0 0 1px hsl(34,47%,19%); } -.asset.cart.x4 { background-color: hsl(26,32%,50%); border-color: hsl(26,32%,60%) hsl(26,32%,40%) hsl(26,32%,40%) hsl(26,32%,60%); box-shadow: 0 0 0 1px hsl(26,32%,16%); } -.asset.coin.x1 { background-color: hsl(160,3%,83%); border-color: hsl(160,3%,93%) hsl(160,3%,73%) hsl(160,3%,73%) hsl(160,3%,93%); box-shadow: 0 0 0 1px hsl(160,3%,27%); } -.asset.coin.x2 { background-color: hsl(120,1%,74%); border-color: hsl(120,1%,84%) hsl(120,1%,64%) hsl(120,1%,64%) hsl(120,1%,84%); box-shadow: 0 0 0 1px hsl(120,1%,24%); } -.asset.coin.x3 { background-color: hsl(300,1%,65%); border-color: hsl(300,1%,75%) hsl(300,1%,55%) hsl(300,1%,55%) hsl(300,1%,75%); box-shadow: 0 0 0 1px hsl(300,1%,21%); } -.asset.coin.x4 { background-color: hsl(0,0%,56%); border-color: hsl(0,0%,66%) hsl(0,0%,46%) hsl(0,0%,46%) hsl(0,0%,66%); box-shadow: 0 0 0 1px hsl(0,0%,19%); } -.asset.prov.x1 { background-color: hsl(44,100%,79%); border-color: hsl(44,100%,89%) hsl(44,100%,69%) hsl(44,100%,69%) hsl(44,100%,89%); box-shadow: 0 0 0 1px hsl(44,100%,26%); } -.asset.prov.x2 { background-color: hsl(42,100%,75%); border-color: hsl(42,100%,85%) hsl(42,100%,65%) hsl(42,100%,65%) hsl(42,100%,85%); box-shadow: 0 0 0 1px hsl(42,100%,25%); } -.asset.prov.x3 { background-color: hsl(40,100%,70%); border-color: hsl(40,100%,80%) hsl(40,100%,60%) hsl(40,100%,60%) hsl(40,100%,80%); box-shadow: 0 0 0 1px hsl(40,100%,23%); } -.asset.prov.x4 { background-color: hsl(39,82%,63%); border-color: hsl(39,82%,73%) hsl(39,82%,53%) hsl(39,82%,53%) hsl(39,82%,73%); box-shadow: 0 0 0 1px hsl(39,82%,21%); } -.asset.ship.x1 { background-color: hsl(209,61%,74%); border-color: hsl(209,61%,84%) hsl(209,61%,64%) hsl(209,61%,64%) hsl(209,61%,84%); box-shadow: 0 0 0 1px hsl(209,61%,24%); } -.asset.ship.x2 { background-color: hsl(205,52%,60%); border-color: hsl(205,52%,70%) hsl(205,52%,50%) hsl(205,52%,50%) hsl(205,52%,70%); box-shadow: 0 0 0 1px hsl(205,52%,20%); } -.unit.retinue { background-color: hsl(0,0%,67%); border-color: hsl(0,0%,77%) hsl(0,0%,57%) hsl(0,0%,57%) hsl(0,0%,77%); box-shadow: 0 0 0 1px hsl(0,0%,22%); } -.marker.cities.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); box-shadow: 0 0 0 1px hsl(0,0%,32%); } -.marker.fortresses.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); box-shadow: 0 0 0 1px hsl(0,0%,32%); } -.marker.ip.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); box-shadow: 0 0 0 1px hsl(0,0%,32%); } -.marker.towns.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); box-shadow: 0 0 0 1px hsl(0,0%,32%); } -.marker.cities.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); box-shadow: 0 0 0 1px hsl(359,85%,17%); } -.marker.fortresses.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); box-shadow: 0 0 0 1px hsl(359,85%,17%); } -.marker.ip.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); box-shadow: 0 0 0 1px hsl(359,85%,17%); } -.marker.towns.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); box-shadow: 0 0 0 1px hsl(359,85%,17%); } -.marker.depleted { background-color: hsl(204,6%,85%); border-color: hsl(204,6%,95%) hsl(204,6%,75%) hsl(204,6%,75%) hsl(204,6%,95%); box-shadow: 0 0 0 1px hsl(204,6%,28%); } -.marker.end { 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%); } -.marker.exhausted { background-color: hsl(283,4%,31%); border-color: hsl(283,4%,41%) hsl(283,4%,21%) hsl(283,4%,21%) hsl(283,4%,41%); box-shadow: 0 0 0 1px hsl(283,4%,10%); } -.marker.exile { background-color: hsl(86,41%,39%); border-color: hsl(86,41%,49%) hsl(86,41%,29%) hsl(86,41%,29%) hsl(86,41%,49%); box-shadow: 0 0 0 1px hsl(86,41%,13%); } -.marker.exile_rose.lancaster { 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%); } -.marker.exile_rose.york { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); box-shadow: 0 0 0 1px hsl(217,53%,29%); } -.marker.feed.x2 { background-color: hsl(204,100%,37%); border-color: hsl(204,100%,47%) hsl(204,100%,27%) hsl(204,100%,27%) hsl(204,100%,47%); box-shadow: 0 0 0 1px hsl(204,100%,12%); } -.marker.feed.x3 { background-color: hsl(200,100%,29%); border-color: hsl(200,100%,39%) hsl(200,100%,19%) hsl(200,100%,19%) hsl(200,100%,39%); box-shadow: 0 0 0 1px hsl(200,100%,9%); } -.marker.fled { background-color: hsl(347,47%,4%); border-color: hsl(347,47%,14%) hsl(347,47%,0%) hsl(347,47%,0%) hsl(347,47%,14%); box-shadow: 0 0 0 1px hsl(347,47%,1%); } -.marker.hits.lancaster { 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%); } -.marker.hits.york { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); box-shadow: 0 0 0 1px hsl(217,53%,29%); } -.marker.rose.lancaster { 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%); } -.marker.rose.york { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); box-shadow: 0 0 0 1px hsl(217,53%,29%); } -.marker.source { background-color: hsl(41,30%,71%); border-color: hsl(41,30%,81%) hsl(41,30%,61%) hsl(41,30%,61%) hsl(41,30%,81%); box-shadow: 0 0 0 1px hsl(41,30%,23%); } -.marker.valour { background-color: hsl(288,29%,51%); border-color: hsl(288,29%,61%) hsl(288,29%,41%) hsl(288,29%,41%) hsl(288,29%,61%); box-shadow: 0 0 0 1px hsl(288,29%,17%); } -.marker.victory_check { background-color: hsl(51,97%,53%); border-color: hsl(51,97%,63%) hsl(51,97%,43%) hsl(51,97%,43%) hsl(51,97%,63%); box-shadow: 0 0 0 1px hsl(51,97%,18%); } -.marker.moved_fought { background-color: hsl(204,100%,37%); border-color: hsl(204,100%,47%) hsl(204,100%,27%) hsl(204,100%,27%) hsl(204,100%,47%); box-shadow: 0 0 0 1px hsl(204,100%,12%); } -.marker.number.lancaster { 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%); } -.marker.number.york { background-color: hsl(0,0%,100%); border-color: hsl(0,0%,100%) hsl(0,0%,90%) hsl(0,0%,90%) hsl(0,0%,100%); box-shadow: 0 0 0 1px hsl(0,0%,33%); } -.marker.seat.lancaster { background-color: hsl(358,76%,50%); border-color: hsl(358,76%,60%) hsl(358,76%,40%) hsl(358,76%,40%) hsl(358,76%,60%); box-shadow: 0 0 0 1px hsl(358,76%,17%); } -.marker.seat.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); box-shadow: 0 0 0 1px hsl(0,0%,32%); } -.marker.vassal { background-color: hsl(58,34%,73%); border-color: hsl(58,34%,83%) hsl(58,34%,63%) hsl(58,34%,63%) hsl(58,34%,83%); box-shadow: 0 0 0 1px hsl(58,34%,24%); } -.marker.vassal.back { background-color: hsl(57,48%,75%); border-color: hsl(57,48%,85%) hsl(57,48%,65%) hsl(57,48%,65%) hsl(57,48%,85%); box-shadow: 0 0 0 1px hsl(57,48%,25%); } -.marker.vassal.vassal_hastings { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); box-shadow: 0 0 0 1px hsl(217,53%,29%); } -.marker.vassal.vassal_clifford { 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%); } -.marker.vassal.vassal_edward { 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%); } -.marker.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%); } -.marker.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%); } -.marker.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%); } -.unit.vassal { background-color: hsl(58,34%,73%); border-color: hsl(58,34%,83%) hsl(58,34%,63%) hsl(58,34%,63%) hsl(58,34%,83%); box-shadow: 0 0 0 1px hsl(58,34%,24%); } -.unit.vassal.back { background-color: hsl(57,48%,75%); border-color: hsl(57,48%,85%) hsl(57,48%,65%) hsl(57,48%,65%) hsl(57,48%,85%); box-shadow: 0 0 0 1px hsl(57,48%,25%); } -.unit.vassal.vassal_hastings { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); box-shadow: 0 0 0 1px hsl(217,53%,29%); } -.unit.vassal.vassal_clifford { 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%); } -.unit.vassal.vassal_edward { 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%); } -.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%); } -.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%); } -.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%); } +.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%); } +.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%); } +.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%); } +.asset.cart.x1 { background-color: hsl(36,52%,70%); border-color: hsl(36,52%,80%) hsl(36,52%,60%) hsl(36,52%,60%) hsl(36,52%,80%); } +.asset.cart.x2 { background-color: hsl(34,51%,64%); border-color: hsl(34,51%,74%) hsl(34,51%,54%) hsl(34,51%,54%) hsl(34,51%,74%); } +.asset.cart.x3 { background-color: hsl(34,47%,56%); border-color: hsl(34,47%,66%) hsl(34,47%,46%) hsl(34,47%,46%) hsl(34,47%,66%); } +.asset.cart.x4 { background-color: hsl(26,32%,50%); border-color: hsl(26,32%,60%) hsl(26,32%,40%) hsl(26,32%,40%) hsl(26,32%,60%); } +.asset.coin.x1 { background-color: hsl(160,3%,83%); border-color: hsl(160,3%,93%) hsl(160,3%,73%) hsl(160,3%,73%) hsl(160,3%,93%); } +.asset.coin.x2 { background-color: hsl(120,1%,74%); border-color: hsl(120,1%,84%) hsl(120,1%,64%) hsl(120,1%,64%) hsl(120,1%,84%); } +.asset.coin.x3 { background-color: hsl(300,1%,65%); border-color: hsl(300,1%,75%) hsl(300,1%,55%) hsl(300,1%,55%) hsl(300,1%,75%); } +.asset.coin.x4 { background-color: hsl(0,0%,56%); border-color: hsl(0,0%,66%) hsl(0,0%,46%) hsl(0,0%,46%) hsl(0,0%,66%); } +.asset.prov.x1 { background-color: hsl(44,100%,79%); border-color: hsl(44,100%,89%) hsl(44,100%,69%) hsl(44,100%,69%) hsl(44,100%,89%); } +.asset.prov.x2 { background-color: hsl(42,100%,75%); border-color: hsl(42,100%,85%) hsl(42,100%,65%) hsl(42,100%,65%) hsl(42,100%,85%); } +.asset.prov.x3 { background-color: hsl(40,100%,70%); border-color: hsl(40,100%,80%) hsl(40,100%,60%) hsl(40,100%,60%) hsl(40,100%,80%); } +.asset.prov.x4 { background-color: hsl(39,82%,63%); border-color: hsl(39,82%,73%) hsl(39,82%,53%) hsl(39,82%,53%) hsl(39,82%,73%); } +.asset.ship.x1 { background-color: hsl(209,61%,74%); border-color: hsl(209,61%,84%) hsl(209,61%,64%) hsl(209,61%,64%) hsl(209,61%,84%); } +.asset.ship.x2 { background-color: hsl(205,52%,60%); border-color: hsl(205,52%,70%) hsl(205,52%,50%) hsl(205,52%,50%) hsl(205,52%,70%); } +.unit.retinue { background-color: hsl(0,0%,67%); border-color: hsl(0,0%,77%) hsl(0,0%,57%) hsl(0,0%,57%) hsl(0,0%,77%); } +.marker.cities.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); } +.marker.fortresses.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); } +.marker.ip.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); } +.marker.towns.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); } +.marker.cities.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); } +.marker.fortresses.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); } +.marker.ip.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); } +.marker.towns.lancaster { background-color: hsl(359,85%,53%); border-color: hsl(359,85%,63%) hsl(359,85%,43%) hsl(359,85%,43%) hsl(359,85%,63%); } +.marker.depleted { background-color: hsl(204,6%,85%); border-color: hsl(204,6%,95%) hsl(204,6%,75%) hsl(204,6%,75%) hsl(204,6%,95%); } +.marker.end { background-color: hsl(33,35%,44%); border-color: hsl(33,35%,54%) hsl(33,35%,34%) hsl(33,35%,34%) hsl(33,35%,54%); } +.marker.exhausted { background-color: hsl(283,4%,31%); border-color: hsl(283,4%,41%) hsl(283,4%,21%) hsl(283,4%,21%) hsl(283,4%,41%); } +.marker.exile { background-color: hsl(86,41%,39%); border-color: hsl(86,41%,49%) hsl(86,41%,29%) hsl(86,41%,29%) hsl(86,41%,49%); } +.marker.exile_rose.lancaster { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.marker.exile_rose.york { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); } +.marker.feed.x2 { background-color: hsl(204,100%,37%); border-color: hsl(204,100%,47%) hsl(204,100%,27%) hsl(204,100%,27%) hsl(204,100%,47%); } +.marker.feed.x3 { background-color: hsl(200,100%,29%); border-color: hsl(200,100%,39%) hsl(200,100%,19%) hsl(200,100%,19%) hsl(200,100%,39%); } +.marker.fled { background-color: hsl(347,47%,4%); border-color: hsl(347,47%,14%) hsl(347,47%,0%) hsl(347,47%,0%) hsl(347,47%,14%); } +.marker.hits.lancaster { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.marker.hits.york { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); } +.marker.rose.lancaster { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.marker.rose.york { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); } +.marker.source { background-color: hsl(41,30%,71%); border-color: hsl(41,30%,81%) hsl(41,30%,61%) hsl(41,30%,61%) hsl(41,30%,81%); } +.marker.valour { background-color: hsl(288,29%,51%); border-color: hsl(288,29%,61%) hsl(288,29%,41%) hsl(288,29%,41%) hsl(288,29%,61%); } +.marker.victory_check { background-color: hsl(51,97%,53%); border-color: hsl(51,97%,63%) hsl(51,97%,43%) hsl(51,97%,43%) hsl(51,97%,63%); } +.marker.moved_fought { background-color: hsl(204,100%,37%); border-color: hsl(204,100%,47%) hsl(204,100%,27%) hsl(204,100%,27%) hsl(204,100%,47%); } +.marker.number.lancaster { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.marker.number.york { background-color: hsl(0,0%,100%); border-color: hsl(0,0%,100%) hsl(0,0%,90%) hsl(0,0%,90%) hsl(0,0%,100%); } +.marker.seat.lancaster { background-color: hsl(358,76%,50%); border-color: hsl(358,76%,60%) hsl(358,76%,40%) hsl(358,76%,40%) hsl(358,76%,60%); } +.marker.seat.york { background-color: hsl(0,0%,96%); border-color: hsl(0,0%,100%) hsl(0,0%,86%) hsl(0,0%,86%) hsl(0,0%,100%); } +.marker.vassal { background-color: hsl(58,34%,73%); border-color: hsl(58,34%,83%) hsl(58,34%,63%) hsl(58,34%,63%) hsl(58,34%,83%); } +.marker.vassal.back { background-color: hsl(57,48%,75%); border-color: hsl(57,48%,85%) hsl(57,48%,65%) hsl(57,48%,65%) hsl(57,48%,85%); } +.marker.vassal.vassal_hastings { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); } +.marker.vassal.vassal_clifford { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.marker.vassal.vassal_edward { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.marker.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%); } +.marker.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%); } +.marker.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%); } +.unit.vassal { background-color: hsl(58,34%,73%); border-color: hsl(58,34%,83%) hsl(58,34%,63%) hsl(58,34%,63%) hsl(58,34%,83%); } +.unit.vassal.back { background-color: hsl(57,48%,75%); border-color: hsl(57,48%,85%) hsl(57,48%,65%) hsl(57,48%,65%) hsl(57,48%,85%); } +.unit.vassal.vassal_hastings { background-color: hsl(217,53%,88%); border-color: hsl(217,53%,98%) hsl(217,53%,78%) hsl(217,53%,78%) hsl(217,53%,98%); } +.unit.vassal.vassal_clifford { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.unit.vassal.vassal_edward { background-color: hsl(358,83%,91%); border-color: hsl(358,83%,100%) hsl(358,83%,81%) hsl(358,83%,81%) hsl(358,83%,100%); } +.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%); } +.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%); } +.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%); } /* ULTRA-WIDE SCREEN LAYOUTS */ @@ -341,7 +341,7 @@ const ui = { favicon: document.getElementById("favicon"), locale: [], locale_name: [], - locale_markers: [], + depleted: [], locale_markers_rose: [], lord_cylinder: [], mat: [], @@ -548,30 +548,40 @@ function build_map() { register_tooltip(e, get_locale_tip(ix)) document.getElementById("locales").appendChild(e) + // London for York + if (ix === LOC_LONDON) { + e = ui.london_for_york = document.createElement("div") + e.className = "hide" + e.style.top = yc - 20 - 13 + "px" + //e.style.top = y + h - 43 - 13 + "px" + e.style.left = xc - 20 - 13 + "px" + e.style.pointerEvents = "none" + document.getElementById("pieces").appendChild(e) + } + // Favour if (locale.type === "exile_box") { e = ui.locale_markers_rose[ix] = document.createElement("div") - e.className = "marker circle exile_rose " - //e.style.top = (y - 8) + "px" - //e.style.left = (x + w - 54 + 8) + "px" + e.className = "hide" e.style.top = (y + h - 50) + "px" e.style.left = (xc - 27) + "px" e.style.pointerEvents = "none" document.getElementById("pieces").appendChild(e) } else { e = ui.locale_markers_rose[ix] = document.createElement("div") - e.className = "marker small rose" - //e.style.top = y + h - 41 + "px" + e.className = "hide" e.style.top = yc - 20 + "px" + //e.style.top = y + h - 43 + "px" e.style.left = xc - 20 + "px" e.style.pointerEvents = "none" document.getElementById("pieces").appendChild(e) } // Depleted/Exhausted - e = ui.locale_markers[ix] = document.createElement("div") - e.className = "marker small depexh " + locale.name + e = ui.depleted[ix] = document.createElement("div") + e.className = "hide marker small depexh " + locale.name e.style.top = yc - 20 - 13 + "px" + //e.style.top = y + h - 43 - 13 + "px" e.style.left = xc - 20 + 13 + "px" e.style.pointerEvents = "none" document.getElementById("pieces").appendChild(e) @@ -1044,67 +1054,42 @@ function update_locale(loc) { ui.locale_name[loc].classList.toggle("action", is_action("locale", loc) || is_action("laden_march", loc)) } - ui.locale_markers[loc].replaceChildren() - +/* TODO: BATTLE marker if (view.battle && view.battle.where === loc) if (view.battle.storm) ui.locale_markers[loc].appendChild(get_cached_element("marker circle storm")) else ui.locale_markers[loc].appendChild(get_cached_element("marker circle battle")) +*/ - //DEPLETED/EXHAUSTED - if (!set_has(view.pieces.depleted, loc) && !set_has(view.pieces.exhausted, loc)) { - let cn - cn = "depleted" - ui.locale_markers[loc].classList.remove(cn) - cn = "exhausted" - ui.locale_markers[loc].classList.remove(cn) - } - - if (set_has(view.pieces.depleted, loc)) { - let cn - cn = "depleted" - ui.locale_markers[loc].classList.add(cn) - cn = "exhausted" - ui.locale_markers[loc].classList.remove(cn) - } - if (set_has(view.pieces.exhausted, loc)) { - let cn - cn = "exhausted" - ui.locale_markers[loc].classList.add(cn) - cn = "depleted" - ui.locale_markers[loc].classList.remove(cn) - } - - // FAVOUR MARKERS - if (!set_has(view.pieces.favourl, loc) && !set_has(view.pieces.favoury, loc)) { - let cn - cn = "lancaster" - ui.locale_markers_rose[loc].classList.remove(cn) - cn = "york" - ui.locale_markers_rose[loc].classList.remove(cn) - } - - if (set_has(view.pieces.favourl, loc)) { - let cn - cn = "lancaster" - ui.locale_markers_rose[loc].classList.add(cn) - cn = "york" - ui.locale_markers_rose[loc].classList.remove(cn) - } + if (set_has(view.pieces.exhausted, loc)) + ui.depleted[loc].className = "marker small exhausted" + else if (set_has(view.pieces.depleted, loc)) + ui.depleted[loc].className = "marker small depleted" + else + ui.depleted[loc].className = "hide" - if (set_has(view.pieces.favoury, loc)) { - let cn - cn = "york" - ui.locale_markers_rose[loc].classList.add(cn) - cn = "lancaster" - ui.locale_markers_rose[loc].classList.remove(cn) + if (data.locales[loc].type === "exile_box") { + if (set_has(view.pieces.favourl, loc)) + ui.locale_markers_rose[loc].className = "marker circle exile_rose lancaster" + else if (set_has(view.pieces.favoury, loc)) + ui.locale_markers_rose[loc].className = "marker circle exile_rose york" + else + ui.locale_markers_rose[loc].className = "hide" + } else { + if (set_has(view.pieces.favourl, loc)) + ui.locale_markers_rose[loc].className = "marker small rose lancaster" + else if (set_has(view.pieces.favoury, loc)) + ui.locale_markers_rose[loc].className = "marker small rose york" + else + ui.locale_markers_rose[loc].className = "hide" } if (loc === LOC_LONDON) { - if (set_has(view.pieces.favoury, LONDON_FOR_YORK)) { - // TODO: extra rose marker - } + if (set_has(view.pieces.favoury, LONDON_FOR_YORK)) + ui.london_for_york.className = "marker small rose york" + else + ui.london_for_york.className = "hide" } } |