summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-04-27 22:15:13 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-07 18:39:23 +0200
commit18de9c65450661610d29f151e6ef31ab05905ac3 (patch)
tree1c029c5a21122d441e616b204a961431a6f6b319
parent390c2cda3e78be50b20d227348cce355e599db35 (diff)
downloadtime-of-crisis-18de9c65450661610d29f151e6ef31ab05905ac3.tar.gz
UI and piece layout.
-rw-r--r--play.css168
-rw-r--r--play.html342
-rw-r--r--play.js674
-rw-r--r--rules.js213
4 files changed, 1134 insertions, 263 deletions
diff --git a/play.css b/play.css
index b2f7a25..b78fbb3 100644
--- a/play.css
+++ b/play.css
@@ -3,12 +3,16 @@ main { background-color: dimgray; }
header { background-color: silver; }
header.your_turn { background-color: orange; }
#role_Red .role_name { background-color: salmon; }
-#role_Blue .role_name { background-color: #a0caec; }
-#role_Yellow .role_name { background-color: #ffe175; }
-#role_Green .role_name { background-color: #80b563; }
+#role_Blue .role_name { background-color: skyblue; }
+#role_Yellow .role_name { background-color: khaki; }
+#role_Green .role_name { background-color: darkseagreen; }
#turn_info { background-color: gainsboro; }
.role_vp { float: right; }
+.action {
+ cursor: pointer;
+}
+
#mapwrap {
width: 2550px;
height: 1650px;
@@ -34,23 +38,47 @@ header.your_turn { background-color: orange; }
right: 93px;
}
-#crisis_table.p2 {
+body.p2 #crisis_table {
display: block;
background-image: url(overlay_2p_75.jpg);
}
-#crisis_table.p3 {
+
+body.p3 #crisis_table {
display: block;
background-image: url(overlay_3p_75.jpg);
}
-#pieces div {
+svg {
position: absolute;
}
-#pieces .no_place_governor {
- margin-top: 6px;
- margin-left: 6px;
- border-radius: 0;
+svg .region, svg .sea {
+ fill: transparent;
+ stroke: transparent;
+ stroke-width: 3px;
+}
+
+svg .region.action {
+ fill: gold;
+ fill-opacity: 0.2;
+ stroke: yellow;
+ stroke-opacity: 0.8;
+ stroke-width: 3px;
+}
+
+svg .sea.action {
+ fill: blue;
+ fill-opacity: 0.2;
+ stroke: blue;
+ stroke-opacity: 0.8;
+ stroke-width: 3px;
+}
+
+#pieces div {
+ position: absolute;
+ transition-property: top, left, transform;
+ transition-duration: 200ms;
+ transition-timing-function: ease;
}
.dice {
@@ -83,6 +111,49 @@ header.your_turn { background-color: orange; }
.dice.black { border-color: #595959 #303030 #303030 #595959; box-shadow: 0 0 0 1px #0c0c0c, 1px 2px 4px #0008; }
.dice.white { border-color: #ffffff #b1b1b1 #b1b1b1 #ffffff; box-shadow: 0 0 0 1px #424242, 1px 2px 4px #0008; }
+/* MAGIC TRACKS */
+
+.governor.s1 { transform: translateX(52px) }
+.governor.s2 { transform: translateX(104px) }
+.governor.s3 { transform: translateX(156px) }
+.governor.s4 { transform: translateX(208px) }
+.governor.s5 { transform: translate(26px, 52px) }
+.governor.s6 { transform: translate(78px, 52px) }
+.governor.s7 { transform: translate(129px, 52px) }
+.governor.s8 { transform: translate(181px, 52px) }
+
+.capital {
+ width: 60px;
+ height: 60px;
+}
+
+.capital.action {
+ border: 6px solid white;
+ box-shadow: 0px 0px 8px white;
+}
+
+body.p3 #Hispania_NPG { display: block }
+body.p3 #Africa_NPG { display: block }
+body.p3 #Aegyptus_NPG { display: block }
+
+body.p2 #Britannia_NPG { display: block }
+body.p2 #Hispania_NPG { display: block }
+body.p2 #Africa_NPG { display: block }
+body.p2 #Aegyptus_NPG { display: block }
+body.p2 #Syria_NPG { display: block }
+body.p2 #Galatia_NPG { display: block }
+
+body.p3 #Hispania_Governor { display: none }
+body.p3 #Africa_Governor { display: none }
+body.p3 #Aegyptus_Governor { display: none }
+
+body.p2 #Britannia_Governor { display: none }
+body.p2 #Hispania_Governor { display: none }
+body.p2 #Africa_Governor { display: none }
+body.p2 #Aegyptus_Governor { display: none }
+body.p2 #Syria_Governor { display: none }
+body.p2 #Galatia_Governor { display: none }
+
/* COUNTERS */
.amphitheater, .basilica, .limes { background-color: #efebea; }
@@ -98,6 +169,7 @@ header.your_turn { background-color: orange; }
.rival { background-color: #b8b996; }
.militia, .legion { background-color: #ffffff; }
.neutral { background-color: #e3dedc; }
+.no_place_governor { background-color: #6e6e6e; }
/* :r !node tools/gencolors.js */
.amphitheater, .basilica, .limes { border-color: #fffefd #b2aead #b2aead #fffefd; box-shadow: 0 0 0 1px #444140, 1px 2px 4px #0008; }
@@ -116,39 +188,39 @@ header.your_turn { background-color: orange; }
.legion { border-color: #ffffff #b2b2b2 #b2b2b2 #ffffff; box-shadow: 0 0 0 1px #434343, 1px 2px 4px #0008; }
.no_place_governor { border-color: #8e8e8e #505050 #505050 #8e8e8e; box-shadow: 0 0 0 1px #191919, 1px 2px 4px #0008; }
-#legion_1 { background-position: 0px 0px }
-#legion_2 { background-position: -55px 0px }
-#legion_3 { background-position: -110px 0px }
-#legion_4 { background-position: -165px 0px }
-#legion_5 { background-position: -220px 0px }
-#legion_6 { background-position: -275px 0px }
-#legion_7 { background-position: -330px 0px }
-#legion_8 { background-position: -385px 0px }
-#legion_9 { background-position: -440px 0px }
-#legion_10 { background-position: 0px -55px }
-#legion_11 { background-position: -55px -55px }
-#legion_12 { background-position: -110px -55px }
-#legion_13 { background-position: -165px -55px }
-#legion_14 { background-position: -220px -55px }
-#legion_15 { background-position: -275px -55px }
-#legion_16 { background-position: -330px -55px }
-#legion_17 { background-position: -385px -55px }
-#legion_18 { background-position: -440px -55px }
-#legion_19 { background-position: 0px -110px }
-#legion_20 { background-position: -55px -110px }
-#legion_21 { background-position: -110px -110px }
-#legion_22 { background-position: -165px -110px }
-#legion_23 { background-position: -220px -110px }
-#legion_24 { background-position: -275px -110px }
-#legion_25 { background-position: -330px -110px }
-#legion_26 { background-position: -385px -110px }
-#legion_27 { background-position: -440px -110px }
-#legion_28 { background-position: 0px -165px }
-#legion_29 { background-position: -55px -165px }
-#legion_30 { background-position: -110px -165px }
-#legion_31 { background-position: -165px -165px }
-#legion_32 { background-position: -220px -165px }
-#legion_33 { background-position: -275px -165px }
+#legion_0 { background-position: 0px 0px }
+#legion_1 { background-position: -55px 0px }
+#legion_2 { background-position: -110px 0px }
+#legion_3 { background-position: -165px 0px }
+#legion_4 { background-position: -220px 0px }
+#legion_5 { background-position: -275px 0px }
+#legion_6 { background-position: -330px 0px }
+#legion_7 { background-position: -385px 0px }
+#legion_8 { background-position: -440px 0px }
+#legion_9 { background-position: 0px -55px }
+#legion_10 { background-position: -55px -55px }
+#legion_11 { background-position: -110px -55px }
+#legion_12 { background-position: -165px -55px }
+#legion_13 { background-position: -220px -55px }
+#legion_14 { background-position: -275px -55px }
+#legion_15 { background-position: -330px -55px }
+#legion_16 { background-position: -385px -55px }
+#legion_17 { background-position: -440px -55px }
+#legion_18 { background-position: 0px -110px }
+#legion_19 { background-position: -55px -110px }
+#legion_20 { background-position: -110px -110px }
+#legion_21 { background-position: -165px -110px }
+#legion_22 { background-position: -220px -110px }
+#legion_23 { background-position: -275px -110px }
+#legion_24 { background-position: -330px -110px }
+#legion_25 { background-position: -385px -110px }
+#legion_26 { background-position: -440px -110px }
+#legion_27 { background-position: 0px -165px }
+#legion_28 { background-position: -55px -165px }
+#legion_29 { background-position: -110px -165px }
+#legion_30 { background-position: -165px -165px }
+#legion_31 { background-position: -220px -165px }
+#legion_32 { background-position: -275px -165px }
.amphitheater, .basilica, .limes {
width: 92px;
@@ -165,11 +237,21 @@ header.your_turn { background-color: orange; }
width: 55px;
height: 55px;
background-size: 55px 55px;
+ background-repeat: no-repeat;
border-radius: 8px;
border-width: 2px;
border-style: solid;
}
+.no_place_governor {
+ display: none;
+ margin: 4px 0 0 4px;
+ width: 58px;
+ height: 58px;
+ background-position: center;
+ border-radius: 0;
+}
+
.governor, .legacy, .legacy_40 {
width: 50px;
height: 50px;
diff --git a/play.html b/play.html
index a6969d8..5d8b337 100644
--- a/play.html
+++ b/play.html
@@ -12,7 +12,7 @@
<script defer src="/common/play.js"></script>
<script defer src="play.js"></script>
</head>
-<body>
+<body class="p4">
<header>
<div id="toolbar">
@@ -29,6 +29,7 @@
</div>
</div>
<div class="icon_button" onclick="toggle_pieces()"><img src="/images/earth-africa-europe.svg"></div>
+ <div class="icon_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div>
<div class="icon_button" onclick="toggle_log()"><img src="/images/scroll-quill.svg"></div>
</div>
<div id="prompt"></div>
@@ -49,200 +50,94 @@
<div id="mapwrap">
<div id="map">
-<div id="crisis_table" class="p4"></div>
-
-<div style="position:relative;display:flex;flex-wrap:wrap;gap:8px;top:200px;left:600px;width:1000px;">
-<div class="amphitheater"></div>
-<div class="basilica"></div>
-<div class="limes"></div>
-<div class="militia"></div>
-<div class="alamanni"></div>
-<div class="alamanni inactive"></div>
-<div class="franks"></div>
-<div class="franks inactive"></div>
-<div class="goths"></div>
-<div class="goths inactive"></div>
-<div class="nomads"></div>
-<div class="nomads inactive"></div>
-<div class="sassanids"></div>
-<div class="sassanids inactive"></div>
-<div class="goths" id="cniva"></div>
-<div class="sassanids" id="ardashir"></div>
-<div class="sassanids" id="shapur"></div>
-<div class="rival" id="postumus"></div>
-<div class="rival" id="priest_king"></div>
-<div class="rival" id="zenobia"></div>
-<div class="red governor"></div>
-<div class="blue governor"></div>
-<div class="yellow governor"></div>
-<div class="green governor"></div>
-<div class="red general"></div>
-<div class="blue general"></div>
-<div class="yellow general"></div>
-<div class="green general"></div>
-<div class="red emperor_turns"></div>
-<div class="blue emperor_turns"></div>
-<div class="yellow emperor_turns"></div>
-<div class="green emperor_turns"></div>
-<div class="red legacy"></div>
-<div class="blue legacy"></div>
-<div class="yellow legacy"></div>
-<div class="green legacy"></div>
-<div class="red legacy_40"></div>
-<div class="blue legacy_40"></div>
-<div class="yellow legacy_40"></div>
-<div class="green legacy_40"></div>
-<div class="red seat_of_power"></div>
-<div class="blue seat_of_power"></div>
-<div class="yellow seat_of_power"></div>
-<div class="green seat_of_power"></div>
-<div class="red breakaway"></div>
-<div class="blue breakaway"></div>
-<div class="yellow breakaway"></div>
-<div class="green breakaway"></div>
-<div class="castra"></div>
-<div class="quaestor"></div>
-<div class="mob"></div>
-<div class="mob_x2"></div>
-<div class="legion" id="legion_1"></div>
-<div class="legion" id="legion_2"></div>
-<div class="legion" id="legion_3"></div>
-<div class="legion" id="legion_4"></div>
-<div class="legion" id="legion_5"></div>
-<div class="legion" id="legion_6"></div>
-<div class="legion" id="legion_7"></div>
-<div class="legion" id="legion_8"></div>
-<div class="legion" id="legion_9"></div>
-<div class="legion" id="legion_10"></div>
-<div class="legion" id="legion_11"></div>
-<div class="legion" id="legion_12"></div>
-<div class="legion" id="legion_13"></div>
-<div class="legion" id="legion_14"></div>
-<div class="legion" id="legion_15"></div>
-<div class="legion" id="legion_16"></div>
-<div class="legion" id="legion_17"></div>
-<div class="legion" id="legion_18"></div>
-<div class="legion" id="legion_19"></div>
-<div class="legion" id="legion_20"></div>
-<div class="legion" id="legion_21"></div>
-<div class="legion" id="legion_22"></div>
-<div class="legion" id="legion_23"></div>
-<div class="legion" id="legion_24"></div>
-<div class="legion" id="legion_25"></div>
-<div class="legion" id="legion_26"></div>
-<div class="legion" id="legion_27"></div>
-<div class="legion" id="legion_28"></div>
-<div class="legion" id="legion_29"></div>
-<div class="legion" id="legion_30"></div>
-<div class="legion" id="legion_31"></div>
-<div class="legion" id="legion_32"></div>
-<div class="legion reduced" id="legion_33"></div>
-<div class="dice white d1"></div>
-<div class="dice white d2"></div>
-<div class="dice white d3"></div>
-<div class="dice white d4"></div>
-<div class="dice white d5"></div>
-<div class="dice white d6"></div>
-<div class="dice black"></div>
+<div id="crisis_table"></div>
-</div>
+<svg id="mapsvg" width="2550" height="1650" viewBox="0 0 2550 1650">
+<g class="region" id="region_aegyptus"><path d="M1499 1309c-1 0-3 2-6 4-4 3-12 6-18 6-4 0-21 10-29 17-7 7-15 17-17 24-4 11-2 25 7 39 3 6 4 14 2 21-3 9-14 26-19 30-8 6-16 12-19 13-5 1-6 2-3 18 6 33 6 45 3 64-3 15-6 55-4 60l1 2h662v-4c-1-3-2-5-4-7-2-3-8-11-11-19-1-3-2-6-2-11v-7l-6-5c-4-3-10-10-13-15s-8-11-9-12c-2-1-4-4-4-7-1-2-4-6-5-9-6-7-7-10-6-15 1-6-2-13-9-20-5-6-5-6-5-11 0-3 1-7 2-9 0-1 2-6 3-11 0-5 2-10 3-12l15-15c8-6 14-12 16-15 5-8 8-19 5-19-1 0-3 0-5 1s-3 1-5 0-4-1-10 1c-9 3-15 2-20-2-3-2-5-3-7 0-1 1-4 2-6 3-4 1-5 1-7 0-1-1-2-2-2-3s-1-2-3-3c-6-2-10-7-10-10s0-3-5-3c-3 0-7-1-11-3-3-1-7-2-7-2-1 0-3 2-6 3-5 5-17 8-23 6-2-1-4-1-5 0-1 0-2 2-4 5-2 6-5 7-8 6-5-2-6-1-14 7-20 19-33 23-46 15-8-5-16-8-22-8-6 1-19-1-22-3-1-2-3-2-6-2-6 1-14-2-18-5-3-3-5-4-14-6-7-1-16-3-22-3-6-1-13-3-16-3-9-3-15-2-26 1-5 2-10 4-12 4-5 0-10-4-12-8 0-2-3-7-5-11-4-8-7-9-19-7-4 1-11 1-15 1-7-1-9-1-14-5-6-3-7-3-17-4-12-1-16-2-21-7-4-4-4-4-4-9 1-7 0-9-8-12-3-1-8-2-10-3-3 0-6-1-8-2-3-1-7-3-9-3-5-1-24-2-26-1z"/></g>
+<g class="region" id="region_africa"><path d="M935 1094c-12 5-14 5-19 11-5 5-7 6-14 8-7 3-10 3-14 3-5-1-6-1-11 1-7 4-13 4-17 0-3-2-13-6-16-6-2 0-4 1-5 3-2 3-11 6-15 6-9-2-16-4-19-6-5-3-6-3-9 2-2 5-9 9-19 11-6 1-9 2-12 5-10 8-18 8-27 0-6-5-10-6-28-6-8 1-17 1-21 1s-7 1-9 3c-7 5-12 6-29 6-6 0-7 1-11 5-8 6-11 7-19 7-5-1-7-1-10 0-2 1-8 2-13 3-26 3-35 5-41 10-3 2-8 5-11 6s-9 5-13 8c-6 5-8 7-11 13-4 7-9 11-13 11-1 0-4-1-7-2l-4-2-5 5c-5 4-5 4-9 4-8-2-15 4-20 14-3 5-8 11-11 11 0 0-4 2-7 5-8 7-14 9-24 9h-12c-21 0-23 0-27-7l-2-3-6 4c-7 3-11 4-19 2-4-1-5-1-7 0s-5 1-8 1c-3-1-6 0-13 2l-8 3-8-1c-10-2-12-4-21-10-10-7-15-13-18-21l-3-6-3 1c-1 1-5 2-8 3-6 1-8 3-9 9-1 3-3 11-5 17-2 7-4 16-5 20-3 9-9 24-17 41-3 7-6 13-6 14 0 2 10 6 20 8 11 1 10 1 54-4 31-3 54 0 81 9 5 3 22 10 37 18 33 15 45 20 78 28 72 19 113 27 152 31 21 3 33 2 76 0 56-4 95-5 122-4 37 2 45 3 74 14 10 4 29 10 42 14 125 41 146 48 184 66 77 36 142 56 204 64 10 1 44 2 45 1 1 0 2-6 4-13 3-18 3-29-1-55-2-12-4-22-5-23s-5-4-9-6c-5-3-9-6-10-7-1 0-3-3-6-4-2-2-7-5-9-8-3-2-7-4-10-5s-7-3-8-4c-3-2-22-8-37-12-8-3-12-3-23-3-8 0-16-1-20-2-9-2-19-7-24-13-8-8-15-24-15-32 0-6-4-14-7-15-1-1-6-2-10-2-13-2-21-4-28-10-7-5-15-7-28-8-5-1-10-2-14-4l-6-2-8 4c-8 3-9 3-20 3-14 1-18-1-29-8-4-2-8-4-11-4-2-1-7-2-9-4-3-1-7-2-9-2-10 0-14-4-15-14-1-3-2-5-2-6-1 0-3 1-6 2-6 5-10 3-13-3-1-3-1-3-5-3-11 0-26-17-26-29 0-3 1-6 2-8 1-4 3-5 14-15 14-11 20-19 27-38 1-3 1-4 0-8-1-3-2-7-2-9 0-5-1-6-8-10s-12-9-16-16c-3-5-3-7-3-12 0-9 2-14 9-18 4-2 6-4 8-10 2-3 5-8 6-10 2-3 3-6 1-7-1 0-3 2-6 4-2 2-5 4-5 4-1 0-3 1-5 3-3 4-8 6-11 5-2 0-4-1-6-3-3-2-3-3-3-5 1-2 0-5-2-8-1-2-2-5-2-6 0-4-3-4-7-2-2 2-4 3-4 3-2 0-6-4-7-7 0-1-1-2-1-2-1 0-6 2-11 4z"/></g>
+<g class="region" id="region_alamanni"><path d="M1118 126c0 1 1 3 2 5 3 4 3 7 4 16 1 18 2 18 29 24 24 5 33 9 50 23 10 9 16 12 28 15 5 1 12 3 15 5 7 3 15 12 23 27 3 6 10 17 15 24 10 16 11 18 12 24 1 8-1 12-8 18-8 7-13 14-21 33-4 8-10 20-13 25-7 10-8 13-8 26s0 14 7 17c4 2 10 6 14 10 9 8 9 8 35 8 17 0 18 0 22 2 8 5 10 13 6 30-1 6-1 8 0 10 1 4 12 9 21 11 4 0 10 2 12 3 8 3 9 3 9-2 2-11 6-17 14-24 4-3 6-5 8-10 6-14 16-26 38-44 20-17 36-20 51-10 3 3 11 8 19 13 15 11 22 17 26 25 1 3 3 5 4 6l6-2c5-2 6-2 23-2 10 0 19 0 21-1 5-1 12-6 18-15 14-16 16-24 13-40-2-14-1-26 2-35 3-7 9-16 21-31 5-6 10-14 11-17 5-9 8-30 8-61 0-19 1-27 6-43 6-17 7-29 7-46 0-7-1-14-1-15-1-2-15-2-275-2h-274z"/></g>
+<g class="region" id="region_asia"><path d="M1955 760c-3 2-7 5-9 7-3 3-8 6-11 8-4 2-7 4-7 5-1 0-4 2-7 5-6 3-7 4-8 7-1 5-7 11-12 12-7 2-19 2-25 1-9-3-17-5-19-3-4 2-14 3-25 2-20-3-21-3-23-1-3 3-3 5 4 10l5 4h24l3 3c4 4 4 5 1 8-2 3-4 4-17 6-9 1-17 3-18 4s-1 2 0 3c3 4 2 7-2 11l-4 4-19-1h-20l-9 3c-5 2-11 3-17 4-8 0-9 0-14-3-5-2-6-3-8-2-1 1-5 1-8 2-5 0-6 1-10 5-2 2-6 7-7 10-2 3-5 6-7 8l-4 3-1 10v11c0 1 4 0 8-2 5-2 20-5 23-5 2 0 5 4 5 6s-2 5-4 9c-3 3-5 6-5 6 0 1 1 3 3 5 2 3 4 6 4 9 0 4 1 5 3 5 1 0 3 1 4 3 2 2 2 2 0 5-1 2-3 5-5 7l-4 4 2 3c1 2 3 4 4 5 2 0 4 2 6 2 6 3 3 7-7 11-4 1-8 2-8 3-1 0 8 8 10 8 0 0 3 1 4 2 2 1 5 2 6 3 5 1 7 4 7 11 0 4-1 8-1 9-1 2-2 4-1 8 0 7 1 9 4 8 2 0 4 1 7 3 2 2 5 4 5 4 2 0 3 4 1 9 0 2-1 5-1 5 0 1 2 1 5 1 2-1 10-1 16-2 9-1 11-1 13 0 2 2 1 3-2 7-2 3-2 4-1 4 1 1 3 1 4 0 3-2 10 0 14 5 4 3 6 4 9 1 5-3 14 3 14 9 0 1 1 5 2 8 2 6 5 9 16 12l9 3 8-4c5-2 9-4 9-5 1 0 4-1 7-1 5 0 5 0 5-2s1-4 1-6c1-1 2-7 2-12 1-9 2-13 5-15 1 0 5 0 10-1 12 0 22 2 36 9 9 5 13 6 14 5 2-1 6-11 7-19 1-6 1-9 0-18-2-11-7-25-11-34-5-10-12-28-14-38-1-6-2-13-2-23 0-23 5-42 16-60 12-21 13-27 10-40-4-15-2-32 3-43 1-3 5-8 8-12 6-9 7-13 5-18-1-2-5-6-7-6-1 0-3 1-7 3z"/><path d="M1678 924c-3 2-6 3-6 4s16 8 19 8c4 0 4-2-1-7-1-2-4-5-4-6-1-2-1-2-8 1z"/></g>
+<g class="region" id="region_britannia"><path d="M43 127c-1 0-1 6-1 14v13h6c7-1 9 0 11 4 1 5 0 8-4 9-5 1-10 2-12 3-1 1-1 4-1 12 0 10 0 10 2 10 1 0 4-2 6-4l4-4c1 0 4 1 8 3s6 4 6 5c0 3-1 3-20 9-2 1-4 2-5 3-1 0-1 11-1 28l1 27 2 1c2 0 4-1 6-2s5-2 7-2c4 0 10-2 20-7 6-3 7-5 8-7 0-4 5-7 7-6 6 1 7 1 10-2 2-2 6-4 8-4 2-1 4-3 6-5 2-4 5-6 16-8 6-1 11-3 12-3 2-2 9-3 13-3 10 1 9 1 10-3 0-2 3-6 5-9 3-5 4-7 4-10s3-12 5-17c2-4 1-14-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4 5-3 11-8 11-11 0-1 1-6 3-10 4-13 3-20-8-26l-7-5h-16c-16 0-16 1-18 3-1 1-3 4-4 5-3 3-3 3-7 3-6-1-15-7-15-10 0-2 2-5 6-9 5-6 6-8 5-10 0-3-2-7-5-10l-2-2H324v3z"/></g>
+<g class="region" id="region_franks"><path d="M708 128c-3 3-3 5-2 10 1 4 2 5 4 6 7 1 7 2 7 7s0 5 3 6c9 3 11 14 3 19-1 1-5 4-8 6-4 4-6 5-9 5-4 0-17-3-20-6-2-1-2-2-2-6 1-2 0-6 0-9-1-4-1-4 1-6 2-3 3-4 0-8-1-3-1-3-5-2-3 0-5 1-5 1-1 0-2 4-2 9-2 15-7 27-14 36-6 7-8 9-6 10 3 2 23 4 29 4 3-1 13-2 21-4 14-3 17-3 31-3h15l7 4c14 7 21 17 24 34 2 12 5 18 18 33 7 8 13 16 15 19 9 14 12 16 25 18 8 0 12 3 15 8 2 3 3 5 3 23v19l3 3c2 3 6 4 11 5 3 1 10 4 15 6 7 4 8 5 16 14 10 13 17 16 29 14 7-2 11-4 23-12 12-7 18-10 29-11 9-1 16-3 23-7 12-8 22-8 40-1 6 3 17 7 23 9 15 4 15 4 29 12 13 7 25 10 33 10 2-1 8-3 13-5 16-6 22-8 32-8s16 2 25 8c10 6 13 7 24 7 4-1 9-1 10-1 3-1 3-4 3-17 0-14 1-17 9-29 3-5 8-14 11-22 9-20 12-24 21-33 6-6 8-9 8-11 0-4-3-10-9-19-5-7-18-28-18-29 0-2-6-12-9-14-5-6-11-9-21-11-12-3-22-7-30-15-19-15-25-18-53-24-26-6-30-9-31-27-1-14-2-16-9-22l-6-5H905c-185 0-196 0-197 2z"/></g>
+<g class="region" id="region_galatia"><path d="M2063 741c-4 3-8 4-41 3h-30l-6 3c-10 5-10 5-8 10s3 14 1 19c-1 1-4 6-6 9-7 9-11 18-12 26-1 6-1 8 1 18 2 13 3 24 0 30 0 3-4 10-9 17-8 16-13 29-16 45-3 23 1 42 14 71 10 21 13 35 13 53-1 11-1 14-4 21l-3 8 5 7c6 9 10 13 17 17 6 2 6 2 10 1 4-2 17-6 24-7 8-1 13-3 17-7 2-1 5-3 7-4 2 0 3-1 4-2 1-4 10-16 17-23 7-6 7-6 13-7 5 0 6 0 17 6 6 3 12 6 13 6 4 0 7-2 8-6 1-3 3-4 6-6 2-1 6-4 9-6 6-5 8-5 14 0 4 5 5 8 5 14 0 4-1 6-8 13-7 6-9 9-7 12 0 2 2 3 3 3 3 0 13-7 27-20 7-6 17-15 23-19 11-9 20-18 23-24 2-2 5-10 7-16 7-16 11-22 23-27 5-2 10-6 13-8 7-6 10-18 8-32-1-6-2-8-5-11l-3-3-16 1c-17 0-21 0-23-5-3-3-2-9 1-16 4-10 4-12-5-25-2-4-5-10-7-15-3-8-3-9-3-21v-13l5-12c3-8 5-15 6-18v-6h-3c-2-1-5-2-7-3-3-2-3-2-5-1-3 3-5 2-11 0-3-2-8-3-11-4-5-1-6-2-10-6-4-5-5-5-9-5-3 0-4 1-6 2-1 2-3 3-5 4-4 2-7 0-16-8-5-6-6-7-6-11 0-2-1-4-2-6-2-1-2-1-9 1-15 5-28 0-35-15-2-5-3-5-7-2zm-32 337v1c-1 0-1 0-1-1-1-1-1-1 0-1s1 0 1 1z"/></g>
+<g class="region" id="region_gallia"><path d="M719 213c-3 1-12 2-19 4-13 2-21 2-44 1-3 0-3 0-3 4-1 4 0 4 2 6 2 1 3 2 4 4s0 11-1 12c-2 1-28 2-33 1s-16 3-28 10c-14 9-19 11-33 15-23 6-23 5-22 25 0 12 0 16 2 19 1 3 1 3 0 5-1 1-3 2-3 2-1 0-4 3-8 7-8 8-10 9-25 14-13 3-25 9-27 14-3 4-2 5 5 6 4 0 6 1 6 2 0 3-3 6-6 7-2 0-6 2-10 4-8 5-13 6-16 6-3-1-26-3-35-3l-8-1-4-5c-2-2-4-6-5-8-1-5-1-5-4-3-2 0-5 1-8 1-4 0-5 0-5 2-1 2 0 6 4 11 2 2 4 5 5 6 3 4 5 14 5 22 1 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-20-25-21-26-27-51-5-26-4-34 9-58 9-16 19-26 46-42 6-4 12-8 14-9 4-2 20-6 31-7 11-2 12-2 13-8 1-3 3-6 10-14 10-10 13-13 14-20 0-3 0-4-3-8-6-8-16-12-26-10-3 0-11 2-20 5-18 6-24 6-32 3-6-3-15-12-18-18-2-6-3-16 0-23 1-6 8-20 12-26 2-2 5-8 8-13 5-12 9-17 14-22l4-4v-18c0-12 0-18-1-20-1-3-5-5-13-5-11-2-16-5-25-18-3-5-10-13-15-20-16-19-20-26-21-38-2-14-10-24-22-29-6-3-22-4-30-2z"/></g>
+<g class="region" id="region_goths"><path d="M1678 127c-1 0-1 9-1 20 0 21-1 29-7 46-5 16-5 18-6 51-1 31-2 41-6 50-2 5-7 14-20 29-10 14-13 20-16 30-1 6-1 7 1 17 1 7 1 13 1 20-1 8-1 10-4 16-4 8-18 24-24 29-9 6-10 6-29 7-24 0-23 0-26 2l-3 2 4 9c6 11 6 16 3 26-6 15-6 28-2 37 1 3 4 6 9 10l12 12c8 10 12 11 23 11h19c9-1 11-1 25 2 23 5 25 4 39-10 13-15 18-18 35-21s29-2 37 3c2 1 5 5 7 8 6 8 14 16 20 17 2 1 8 3 13 3 10 2 18 6 24 13 3 3 6 5 7 5v-9c1-6 1-10 2-12 2-3 2-3-3-10-2-3-3-16 0-20 2-4 3-4 8-3 1 1 3 0 6-2 2-2 6-4 8-5 5-1 6-2 16-16 3-4 10-17 10-20 0-4 2-6 10-10 5-2 8-3 13-3 3 0 6-1 7-1 1-1 6-1 10-1l9-1v-6c1-11 5-15 10-10 2 2 2 5 1 8-1 2-1 4 0 6 2 3 5 5 12 6 8 1 12 6 7 11-2 2-3 2-8 2-6-1-6-1-7 2s-1 5 4 7c3 1 6 3 7 4 3 2 8 3 13 1 2-1 7-1 11-2 3-1 9-1 11-2 4-1 5 0 9 1 5 2 6 2 10 0 2-1 2-1 5 1 1 1 3 3 3 5 1 1 2 4 3 5s2 3 2 4c0 3-4 7-9 8-3 1-7 3-10 5-2 1-6 3-7 4-4 1-14 7-14 8-1 1-3 3-6 4-3 2-5 3-5 4 0 0 3 1 7 1 7 0 10 1 18 7 3 2 4 2 7 2 10-2 21 14 16 24-1 1-2 6-2 10l-1 7 4 3c5 3 12 3 18-1 6-5 9-7 11-12 4-6 10-10 22-13 10-2 14-5 23-14 6-6 6-6 11-6l9 3c3 3 4 3 10 2 4 0 8-1 10-1 3-1 3-1 5-10 1-8 1-7-4-8-4 0-5 0-8 3-5 3-6 3-10 2-2-1-3-1-4 1-2 1-5 3-7 4-10 3-16-1-31-23-7-9-12-22-12-30 0-4 3-8 9-10 4-2 7-5 7-9s3-6 7-3c2 1 3 2 4 2s12-8 15-12c4-3 8-5 17-6 6 0 12-3 13-6 1 0 0-5-2-11-5-17-6-23-6-36 0-15 1-21 8-34 4-9 4-10 4-16 0-8-2-16-7-30-11-28-12-33-13-43 0-15 2-20 15-28 5-4 8-6 10-9 5-9 5-12 5-39 0-26 0-29 6-48 2-6 4-13 4-15 1-2 1-4 1-5-1-1-34-1-231-1-127 0-231 0-231 1z"/></g>
+<g class="region" id="region_hispania"><path d="M135 737c-3 1-8 3-10 5l-4 4 1 3c4 6 2 10-6 10-2 0-6 1-7 2-2 1-6 1-10 2-7 0-7 0-17 10-4 4-4 5 3 14 1 0 2 1 4 1 3 0 4 1 4 5 0 2 1 3 3 5 3 1 4 2 4 6s1 5 2 6c3 2 5 10 4 13 0 1-2 3-4 5-4 5-5 8-3 13 1 2 1 6 1 8s0 5 1 6 2 6 2 9c1 9 4 21 7 25 1 2 2 5 2 13 0 6 0 10 1 11 2 2 1 4-2 9-3 3-3 6-5 14 0 5-1 12-1 15 0 4-1 9-4 20-6 19-8 22-12 28-2 2-3 5-3 9-2 14-3 20-4 24 0 5 0 5 3 6s5-1 7-5c1-6 3-7 6-7 4 0 6 3 6 8 0 4-2 7-7 10-3 2-4 4-2 6 2 1 2 1 5 0 1-1 5-2 7-2 5-1 5-1 7 2 3 4 4 7 2 9-2 1-2 3-2 8 0 4 0 10-1 12-1 4-1 6 0 7s2 8 2 15c1 11 1 15 0 20-1 4-2 8-2 9 0 3 0 3 3 3 6-1 27 0 30 2 8 2 11 2 17-4 6-5 11-6 26-9l10-1 3 3c2 2 5 5 8 6 9 5 17 15 17 22 0 3 1 4 3 7 4 2 4 4 6 13 1 4 7 9 14 14 5 3 12 5 12 3 0 0 2-3 3-5 2-2 5-6 6-8 1-3 3-6 4-7 3-4 13-8 19-9 5 0 5-1 11-7 4-5 6-6 9-6 3-1 8-2 11-3 5-1 10-1 19-1h14c3-2 18-3 24-2 5 1 5 1 8-2 2-2 5-3 9-4 5-1 6-1 10 1l4 2 4-6c2-4 4-8 5-12 2-8 6-14 14-22 9-9 12-11 18-11 2 0 6 0 8-1 4 0 4 0 3-3 0-2 1-5 3-11 2-5 4-10 4-12 0-4 1-7 4-11 1-1 2-3 2-4 2-5 7-12 12-15 7-4 17-13 17-15l-4-2c-1-1-4-3-6-4-3-4-9-14-9-17 0-1-1-5-3-8-4-10-3-14 6-32 4-8 9-16 10-17 5-7 10-14 15-24s6-12 10-14 4-2 2-5c-1-3-1-3 1-7 1-2 4-6 7-9 6-6 16-11 38-17 15-5 16-6 20-13 1-2 6-5 16-11 15-10 25-17 26-21 0-1-1-4-2-7-2-5-2-7 0-14 0-3 0-3-4-3-2 1-8 1-12 2-17 2-45-2-68-8-14-5-16-5-35-3-34 2-43 1-56-7-7-5-12-7-36-16-6-2-11-5-13-7-4-4-9-5-12-4-5 2-15 1-19-1-6-2-16-5-18-4-1 0-3 1-5 3-3 2-4 2-16 0-4-1-8-3-9-3-2-2-4-2-8-1-1 1-5 2-7 2-3 0-9 1-14 2-8 3-11 3-18 3-5-1-11-1-13-2-10-2-21-4-29-5-5 0-10-1-12-2-3-2-3-2-7-1-6 2-16 4-32 5-6 0-13 1-15 2h-9c-5-1-7-2-10-5-4-3-5-4-11-4-4-1-7 0-11 1z"/></g>
+<g class="region" id="region_italia"><path d="M1004 504c-2 1-7 2-10 4-7 3-16 5-27 7-13 2-18 3-31 9-7 2-15 6-18 6-6 2-20 3-25 1-8-3-28-1-43 4-13 5-37 20-50 32-7 8-9 9-14 21-4 8-8 16-8 20-2 6-2 7 2 24 5 24 6 27 21 44 6 9 13 16 14 17s2 0 6-1c2-2 7-3 10-4 6-1 15-4 17-7 1-1 3-4 5-7s4-6 5-8c1-1 3-3 4-5 2-4 9-11 12-12 4-1 14-1 19 1 3 0 7 2 9 2 3 1 7 2 9 3 9 6 16 10 22 11 7 2 12 4 15 8 4 6 5 7 7 17 0 6 2 10 3 12 5 7 9 15 10 22 1 6 1 7 5 8 3 1 4 3 6 6 1 2 4 5 5 6 5 3 14 12 15 16 1 1 2 2 4 3 1 0 6 2 9 4 6 3 8 4 11 10 3 3 5 6 6 7 5 1 14 8 16 12 2 3 6 7 9 9 3 3 7 6 8 8 2 4 6 6 11 7 3 0 6 2 8 4 3 2 5 4 6 3 5-2 10-2 13-1 1 1 4 2 8 2 6 0 7 0 11 3 1 2 4 5 6 8 3 5 7 11 8 12s3 1 4 0c4 0 11 4 14 8 2 3 3 3 8 2 7 0 9 1 14 11 4 6 4 8 3 11v5l5 3c3 2 7 4 8 5 3 2 3 2 6 1 5-3 8-2 12 1 4 4 6 7 7 15 2 8 4 11 9 18 2 4 3 8 5 15 1 6 4 12 6 16 2 3 3 7 3 9 0 5-4 10-8 11-6 2-6 3-5 7 0 6-2 15-7 20-2 3-3 5-3 8 0 6 1 7 7 7 5 0 6-1 7-6 2-5 7-14 11-17 8-6 7-5 7-15-1-11 0-14 4-18 4-3 14-8 18-8 3 0 3 0 2-3 0-1-1-6-1-11-1-8-1-8-4-11-5-4-11-8-15-8-5-2-8-4-10-8s-1-8 1-12c1-2 2-6 2-8 0-3 2-7 6-15 9-17 12-20 21-20 7 0 10 2 10 6s3 5 12 5c4 0 9 1 11 1 4 2 8 9 10 17 3 7 9 12 11 7 0-1 1-4 2-7l2-5-3-5c-3-6-5-8-12-12-2-2-5-5-6-7-2-3-11-8-19-10-2-1-8-4-12-7-9-8-9-8-24-13-7-2-15-5-18-7-4-1-10-5-15-7-9-4-12-7-12-14 0-3 1-4 5-9 3-3 5-5 5-6-1-3-2-3-18-1-15 2-23 2-28-1-3-1-7-3-10-5-3-1-7-4-9-6-3-3-6-6-8-7-16-14-19-17-24-23-3-5-6-11-8-18-2-6-6-16-9-24l-6-13-6-2c-3-1-10-6-16-10-5-4-11-7-13-8s-7-4-11-7c-10-8-13-12-15-24-5-21-5-23 1-28l4-4-2-3c-2-2-5-5-10-14-2-3-2-3 0-8 2-8 4-10 9-12 4-2 6-3 9-2 3 0 5 0 11-4 4-2 8-6 9-7 3-5 7-7 13-5 5 1 6 1 9 0 4-3 9-1 12 3 5 7 5 11-2 17l-3 3 2 8c2 8 3 10 7 15 2 3 5 5 5 5 3 0 10-13 11-20 1-3 2-5 5-8s3-3 3-10 0-8-3-15c-14-24-32-41-52-47-9-3-14-4-21-2-6 2-19 2-30 1-13-3-14-3-19-2zM1194 1017c-8 5-8 5-14 4-4-1-5-1-8 1-10 6-16 8-27 9-7 0-13 1-14 2-3 2-11 1-15-2-2-2-5-3-6-3-1-1-4-2-5-3-3-3-4-3-9 2-5 6-8 7-13 4-4-2-4-2-7-1-2 2-3 5-4 11-1 5-1 5 3 9s5 4 9 4c8 0 18 4 24 9 2 2 6 5 9 6 3 2 7 4 10 6 3 3 5 3 12 4 12 1 15 3 25 16 2 3 10 6 17 6h5v-4c1-2 2-6 4-8 4-6 4-6 1-9-1-1-2-3-2-4s-1-3-2-5c-3-5-4-9-3-14 4-16 6-22 11-30 3-5 5-9 5-10s-3-1-6 0z"/></g>
+<g class="region" id="region_macedonia"><path d="M1511 801c-11 1-26 5-36 10-15 6-27 14-39 27-10 10-14 16-21 30-4 7-8 15-10 19-4 6-5 9-3 12 1 1 2 3 2 5s1 4 4 6c3 3 6 9 9 17 1 2 3 4 4 5 8 4 20 20 20 26 0 1 1 2 3 4 3 3 11 15 14 21 1 3 3 4 5 2 0-1 6-1 8 1 3 1 9 1 15-2 4-2 9-2 18 0 2 0 4 0 6-2 3-2 6-3 8 0 2 0 4 1 5 1 2 0 5 2 7 4 4 2 7 3 11 4 3 1 7 2 8 3 3 1 4 2 4 6s1 5 6 2c6-2 8-1 15 5 8 8 11 9 9 4v-10c-1-4-1-8-2-8-1-1-4-3-7-3-4-2-6-3-8-6s-4-4-7-4c-4-1-6-2-8-5s-4-4-5-3c-1 0-3-1-5-2-4-4-6-4-15-7-7-2-9-3-10-5-1-3-1-3 1-5s3-3 6-3c6 0 9-2 9-5 0-1-2-4-3-7-2-2-4-5-4-6 0-2 8-10 11-10s2-1-2-5c-4-3-5-5-7-9-1-4-3-8-6-11-10-11-12-18-9-27 1-1 1-4 1-7-1-5 0-7 7-14 8-6 11-6 14-1 1 3 1 4 0 7-1 4-1 4 1 6 5 4 9 5 18 4 7 0 8 0 10-3 4-3 4-9 1-14-6-7-2-14 7-14 2 0 4 0 4-1 1-1-6-10-12-15-18-14-35-19-52-17z"/><path d="m1548 950-1 1c0 1 7 6 8 6 0-1-3-7-4-7s-2-1-3 0zM1566 968c3 2 5 6 5 7 1 2 2 2 10 2 7 0 8 0 8-2 0-1-1-3-2-4-2-3-3-3-7-3-3 0-6-1-8-2-1-1-5-2-7-3h-3l4 5zM1488 996c-7 8-8 9-12 9s-5 0-6 3c-1 2-3 5-4 7l-3 3 3 4c4 5 8 9 13 13 4 3 9 12 9 16 0 2-1 5-2 7-3 4-2 7 2 14l4 5v-3c1-5 5-8 10-8s6 1 10 7c2 3 7 11 8 12l3-3c3-3 4-4 8-4 5 0 8 2 10 6 1 2 3 1 3-2s-3-11-6-19c-11-22-13-27-9-30 1-2 3-2 6-2 5 1 13 5 15 7 1 2 4 3 4 1 1 0-1-2-3-3-3-2-6-7-6-11 0-3-8-11-11-11-1 0-4-2-6-3-3-2-10-5-15-7s-12-5-16-7c-3-1-6-3-6-3-1 0-2 1-3 2z"/></g>
+<g class="region" id="region_nomads"><path d="M201 1326c-5 3-10 6-12 8-1 1-10 6-20 11-9 4-18 9-19 11-2 2-5 4-7 4-2 1-4 4-5 6-3 6-8 13-16 22-4 5-8 9-9 10 0 2-1 7-1 12 0 12-2 18-9 28-3 4-7 11-9 16-3 9-4 11-3 40 1 11 1 11 4 14 1 2 4 6 5 8 2 4 2 5 2 13-1 14-6 24-19 41l-8 12-6 12c-4 5-7 10-7 12 0 1 200 1 661 1 630 0 661 0 662-2s2-36 1-37c-1 0-11-1-23-1-23-1-27-1-52-6-46-7-109-28-166-55-42-19-77-32-138-51-66-22-88-29-102-35-29-11-42-13-99-12-37 0-49 0-83 2-69 5-96 4-161-10-15-3-76-18-93-23-20-5-43-15-67-27-50-24-73-29-116-23-9 1-23 2-31 3-18 0-27-1-38-6l-7-4-9 6z"/></g>
+<g class="region" id="region_pannonia"><path d="M847 377c-2 2-6 8-9 13-2 5-7 13-10 18-8 14-11 21-12 29 0 7 0 8 3 12 5 8 10 11 17 12 5 0 8-1 19-4 29-10 42-9 54 5 9 9 10 16 5 28-3 6-6 9-12 15-8 8-11 12-9 15 1 0 4 1 7 2 8 2 14 0 40-11 5-2 11-4 21-5 17-3 19-3 29-7 13-6 14-6 34-3 18 2 18 2 24 0 14-3 24-2 40 6 17 8 27 17 41 39 9 14 10 17 10 29v11l5 4c2 3 6 5 7 6 2 1 4 4 6 7 2 4 2 5 2 10-1 7 1 12 6 19 3 3 4 5 4 9 1 4 2 8 3 10 3 7 17 20 28 26 4 2 9 7 9 10 0 4 2 4 10 3 8-2 12-2 17 1 1 1 5 3 8 3 6 1 7 2 14 8 4 4 7 7 8 7 2 0 16 12 18 15 3 4 5 6 7 6 4 0 19 9 26 15 6 4 7 5 12 5s6 1 7 4c2 2 3 4 5 4 2 1 15 14 17 18 1 2 3 4 5 5 1 0 5 2 7 2 7 3 9 6 9 14 0 4-2 10-3 13l-2 6 2 3c2 3 2 4 1 6-1 4-1 11 0 15 1 3 1 4-1 8-4 7-4 10-1 17 3 5 3 7 3 12l-1 6 5 2c7 4 11 6 12 4 1 0 6-9 10-18 11-19 16-26 28-39 11-10 20-17 30-22 4-2 7-4 8-4 0-2-4-20-8-32-5-14-4-17 9-29l11-11c3-7 1-19-7-32-2-4-6-11-9-18-3-6-8-13-11-17-9-10-13-20-14-36-1-15-2-16-24-18-15-2-19-4-26-13-7-8-10-14-11-27-1-6-3-17-5-24-3-13-4-20-1-36 1-9-7-16-24-19-11-3-22-8-27-12-4-5-5-11-3-21 3-10 3-16 0-18-2-3-9-4-22-3-14 1-23 1-28-2-2-1-7-5-11-8-11-10-11-11-32-11-20 0-20 0-31-7-8-6-18-9-24-8-3 1-11 4-19 7l-14 5h-13c-12 0-13 0-21-3-4-2-11-6-16-8-10-6-11-7-24-10-6-2-16-5-22-8-8-3-12-4-17-5-7 0-8 0-18 5-10 6-12 6-21 7-12 1-16 3-31 13-13 8-21 11-32 11-13 0-21-5-31-18-7-8-11-11-23-15-6-2-12-4-14-5s-4-2-5-2l-4 4z"/></g>
+<g class="region" id="region_sassanids"><path d="M2401 724c-9 1-20 2-21 3-1 0-2 2-3 5s-3 8-5 11c-3 4-6 9-8 12-3 5-5 7-11 11-4 2-7 5-8 6-1 0-4 2-7 3s-7 3-8 5c-4 3-11 7-13 7 0 0-3 1-6 3-7 4-9 4-19 2-4-1-9-2-11-2-2-1-6-2-7-3-3-2-4-2-6-1s-4 1-6 1c-3 0-11 2-18 5-10 4-17 6-22 6h-6l-1 4c-2 9-3 13-7 22-6 13-6 18-4 27 2 11 4 17 10 25 9 13 10 19 5 31-2 5-3 8-2 8 1 2 7 2 21 1 14-2 19 1 24 12 2 4 3 6 3 19 0 14-1 16-3 20-3 8-9 13-20 19-10 5-14 8-18 15-3 8-9 23-8 24 0 1 2 2 5 3 7 4 13 10 15 16 1 2 2 9 3 15 0 14 2 23 6 26 2 2 3 2 18 0 14-2 26 0 44 10 12 6 21 14 28 26 3 5 5 9 6 10s18 1 83 1l83-1V940c0-153 0-192-1-193-1 0-15-5-30-10-20-7-33-10-39-11-11-2-30-3-36-2zm64 174c2 2 2 3 1 4-1 2-4 4-6 6-10 7-10 7-10 10 0 2 1 4 3 5 3 4 3 8-2 13-3 4-8 7-10 7-1 0-4-2-6-4-3-3-5-4-8-4-4 0-16-2-18-3-3-1-3-3-1-7 1-2 2-5 2-6 0-5 8-10 21-11 7 0 7 0 8-3 0-4 2-5 9-8 8-3 15-2 17 1z"/></g>
+<g class="region" id="region_syria"><path d="M2204 1039c-3 3-10 9-17 15-7 5-16 13-20 17-9 8-20 17-27 22-3 2-5 4-5 5s-1 4-2 6-2 7-3 11l-2 7 4 4c4 5 6 15 4 21s-1 11 1 19c2 5 3 10 3 13s-1 4-6 10c-7 7-8 8-7 14 0 4-2 12-4 16-2 2-4 8-5 12-2 5-4 10-4 11-1 2-2 6-3 10s-3 9-4 10c-1 2-2 6-2 9 0 4-2 8-3 10-2 3-3 6-4 10-1 15-4 30-7 40-10 27-23 43-42 49-3 1-7 3-7 3-1 0-1 3-2 6-3 14-9 24-25 37s-16 14-11 26c1 4 3 10 4 12 2 7 7 15 15 25 5 5 8 9 8 10 0 4 3 19 4 22 1 1 5 6 9 10 4 3 9 9 11 12 5 6 17 16 20 16 1 0 3-1 4-4 3-3 3-4 3-15s0-12 3-21c3-6 4-11 4-18 1-15 4-25 7-31 2-3 5-8 7-12 4-8 8-12 15-15 5-3 7-3 17-4 12 0 20 1 58 10 17 3 32-1 52-15 11-7 14-10 37-30 7-6 16-14 20-16 4-3 8-5 8-5s1-56 1-123l1-123 2-2c1-2 3-2 8-3 4 0 6-1 6-2 0-2-8-14-13-18-4-4-23-14-32-16-7-2-15-2-24 0-4 0-9 1-11 1-6 0-11-4-14-10-3-4-3-7-5-21-1-17-1-18-5-23-2-3-11-8-14-8l-6 4zm-77 297c2 2 2 3 2 12 0 7 0 10-2 13-1 3-2 5-1 8 1 4 1 4-1 6-3 3-4 2-7 0l-3-2v-15c1-15 2-21 6-23 2-1 4-1 6 1z"/></g>
+<g class="region" id="region_thracia"><path d="M1459 397c-8 2-26 15-41 32-8 8-10 11-14 19-4 9-6 11-11 16-8 7-10 10-11 21-1 8-1 10 0 14 2 6 2 10 0 18-1 7-1 9 3 26 2 7 3 16 4 21 1 12 3 16 10 25 5 6 5 6 12 7 4 1 12 2 17 3 16 2 21 6 22 22 2 17 4 22 13 35 4 5 9 14 12 19 2 5 6 12 8 16 7 11 9 17 10 28 0 8 0 10-2 14-1 2-4 6-7 8-14 13-15 14-15 16s1 6 2 10c2 3 4 11 5 17 2 6 4 11 4 12 1 1 3 1 12-2 10-2 13-2 27-2 13 0 15 0 22 2 8 3 13 5 21 11 8 5 9 5 18 15l7 8 4-3c3-3 5-4 9-4 3 0 5 1 7 2 1 2 2 3 3 3 0 0 3-2 5-3 3-2 6-5 8-6s3-1 6 0c6 3 18 6 28 7 12 0 15 2 16 7 0 2 1 5 2 6s4 1 19-2c3-1 7-1 10-1 4 1 5 1 10-2 4-3 6-5 10-11 2-4 5-9 7-10 4-3 5-3 13-4 6 0 9-1 12-3s5-2 9-2c6 0 16 2 21 4 4 2 7 1 9-1 4-4 2-5-11-10-8-3-15-6-16-7-6-3-10-8-15-15-4-7-4-8-4-13 1-6 0-9-6-14-2-2-4-6-6-9-1-3-3-5-3-5-1-1-3-1-4-1-2-1-4-2-5-4-2-3 0-7 9-15l7-7v-7c0-10 2-18 4-21 1-2 3-5 4-7 3-5 6-7 14-8l7-1v-10c0-6 0-12 1-15 1-2 1-8 0-15 0-10 0-11 2-14 1-2 2-6 2-11 1-6 1-9 3-12s3-4 2-9c0-4 0-5 2-6 2-2 3-5 2-5s-5-1-9-2c-15-2-23-8-32-20-7-10-10-12-21-12-10 0-25 3-30 6-3 2-9 8-15 14-7 7-13 12-15 13-7 3-19 3-37-1l-14-3-10 1c-12 2-17 2-25 0s-14-6-20-13c-3-4-7-8-9-10-6-5-10-8-13-14-2-4-2-5-2-20 0-14 0-16 2-22 5-12 4-15-5-29-3-5-7-12-9-16-5-8-11-15-24-22-4-3-11-8-15-10-3-3-7-5-8-6-2-1-10-2-14-1z"/></g>
+<g class="sea" id="region_mare_occidentale"><path d="M378 306c-1 1-1 1 0 1s2 0 3-1c0-1-1-1-3 0zM1075 565c-1 3-4 5-8 7-2 0-4 2-6 3-6 4-14 7-18 7s-5 1-6 5-1 4 1 7c2 1 3 4 4 5 0 2 2 4 4 6l5 5c0 4-2 8-7 12-3 1-4 3-4 4 0 4 4 19 6 24s10 13 20 18c5 2 12 7 16 10 5 4 9 6 12 8 3 0 7 2 8 4 3 3 13 24 15 31 3 15 8 24 16 32 10 9 17 15 20 17 2 1 5 3 5 5 2 2 16 10 22 11 4 0 15-1 29-3 8-2 12 0 15 4 3 5 3 8-4 15-5 5-6 6-5 8s22 13 32 16c2 0 5 2 8 3 2 1 7 1 15 2 15 0 18 2 19 12l1 5 10 4c8 4 10 6 12 8 1 2 4 5 6 6 6 4 11 9 14 15 3 7 4 11 2 15-1 1-2 4-2 6-2 10-4 11-11 8-7-2-12-6-14-12-2-9-6-14-9-14-6 0-9 0-12 3s-5 4-14 4c-4 1-7 1-7 2-1 1-1 8-1 17 0 16 1 16 3 18 1 1 4 3 6 4 3 3 3 4 3 13 1 5 2 11 2 12 3 6-2 12-9 12-5 0-13 4-15 8-1 2-2 5-1 11 0 8 0 10-2 13-1 2-2 3-2 3-1 0-3 2-6 5-4 4-5 6-7 12-3 8-5 10-13 11-7 1-10 0-14-4-3-3-3-3-5-2-4 6-8 15-9 21-1 4-2 7-3 8-2 4-1 8 2 12 2 2 3 4 3 6 0 1 1 4 2 5 3 4 3 8-1 13-4 4-4 5-4 10 0 7-2 10-8 9-2-1-6-1-8-2-2 0-7-1-11-2-5-2-7-3-8-6-6-10-13-15-19-13-4 0-12-2-18-7-2-1-7-4-9-5-3-1-7-4-9-6-5-4-12-7-21-8-6 0-7-1-11-4-7-6-8-9-7-17s3-12 8-16c7-5 8-5 11-2 2 2 3 3 4 3l4-4c5-5 11-7 16-4s11 7 14 9c3 1 4 1 8 0 2-1 9-2 15-2 10-1 15-2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 12-3 6-8 14-11 18-7 10-15 23-15 24s-1 4-3 8c-4 7-4 10 0 19 1 3 2 7 3 10 1 5 7 11 12 13s8 6 8 9-14 16-19 19c-5 2-10 8-13 14-1 2-2 5-3 6s-2 4-2 6-1 7-3 11l-3 8 2 2c7 8-2 12-25 13-2 0-13 11-17 16-1 3-3 8-4 12-2 6-7 16-11 20-3 4-5 4-9 2-7-4-10-4-15 1-4 4-4 4-9 3-9-1-22-1-26 1-3 2-4 2-8 1-5-2-18-1-29 2-7 1-8 1-12 6-6 6-8 8-15 8-3 1-7 2-9 3-4 2-9 7-9 9 0 1-2 4-4 7-1 3-3 5-3 6 0 2-5 6-8 6-4 0-13-3-15-5s-11-7-13-7-4 8-4 15c0 5 1 8 3 12 3 6 7 10 9 9 0-1 1-3 2-6 1-7 4-9 12-12 3 0 7-2 9-4 6-4 13-2 13 5 0 10 18 28 34 31l7 2 9-3c6-2 10-3 13-3 2 1 4 0 5-1 3-1 5-1 12 1s11 1 18-6c4-3 6-5 7-4 1 0 3 3 5 7 1 3 3 6 4 6 1 1 4 1 7 1h18c14 0 16 0 24-7 2-2 6-5 9-6 4-2 5-4 8-9 5-11 15-18 24-18 4 0 5 0 7-3 2-2 4-4 6-5 3-1 4-1 8 1 7 4 9 3 13-6 3-6 4-8 11-13 5-3 12-8 16-10l10-5c4-5 10-6 37-10 8-1 17-3 21-4 5-2 7-2 10-1 5 2 8 1 15-6 7-6 7-6 12-6 2 1 5 1 6 1 14-1 17-2 21-4 5-4 8-5 15-5 3 0 13 0 22-1 14 0 16 0 21 2 3 1 8 4 11 6 6 5 11 5 17-1 2-3 8-6 14-6 6-1 13-5 15-8 0-2 2-4 4-5 4-4 9-4 13 0 3 2 6 3 8 4 2 0 5 1 7 1 4 2 10-1 11-5 1-2 2-3 4-4 3 0 11 1 15 2 2 1 5 2 6 2 2 1 4 2 5 4 3 3 6 3 12-1 5-2 6-2 11-1 6 0 8 0 15-3 6-2 9-4 11-7 3-5 8-7 22-13 13-4 18-5 22-2 1 1 3 2 5 2 4 0 9 2 10 4 1 1 1 4 1 6 0 3 1 5 3 8 2 2 3 5 4 6 0 4 2 4 4 1 1-2 4-4 6-5s6-4 8-6c8-8 12-8 15 2 2 5 2 8-2 12-1 2-4 6-6 10-2 5-4 9-6 10-8 7-10 8-11 13 0 3 0 5 3 10 3 6 6 10 8 10 1 0 4 1 6 3s5 4 6 5c3 2 5 9 5 14 0 1 1 5 2 7l2 4-3 7c-1 3-2 7-3 8 0 1-2 4-3 7-4 7-12 18-17 22-9 7-17 13-19 16-2 5 0 12 7 20 5 5 9 7 12 7s7-4 7-7c0-4 3-6 8-6 8 0 13 5 10 11-1 2-1 2 2 5s4 5 4 8c0 2 1 6 2 8l3 4 6 1c4 1 8 2 9 2 1 1 5 3 9 3 4 1 9 3 12 6 11 7 13 7 26 7 10 0 11 0 17-3 8-4 14-4 21-1 3 2 7 2 13 3 11 0 8 2 33-18 34-29 41-35 48-40 3-3 14-12 22-19 9-7 27-22 41-33 32-27 52-43 66-55 6-5 16-13 23-18 6-6 16-14 22-19 38-32 49-40 59-48 14-12 19-17 22-22 2-4 2-4 1-9-3-6-6-8-12-7-5 0-5 0-8-3-1-2-3-3-4-3 0 0-2 1-3 3-2 3-3 3-8 3-4 0-6 0-7-2-2-2-5-3-7-1 0 1-2 1-4 1-2-1-4 0-6 1-4 2-8 0-8-3 0-4 3-21 4-23 2-3 5-2 8 1 2 2 3 4 3 4 0 2 3 1 5-2 2-4 2-6-1-6-2 0-5-1-7-3l-5-3v-5c0-7 0-7-19-7-21 0-21 0-21-29 0-22 1-25 6-28 1-1 5-2 7-2l5-1-3-3c-2-2-3-4-3-4 0-1-1-2-2-3-3-3-7-9-7-12s3-6 8-7c3 0 3-1 3-3-1-5-3-6-13-12-9-4-12-8-14-14-1-3-1-4 0-6 2-2 2-3 0-7s-2-5-1-11c1-4 2-8 2-9 2-3 2-22 0-25 0-1-1-3-1-4 0-3 2-11 4-16 2-3 2-7 0-9-1 0-4-2-7-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17l-4-8c-1-3-2-6-5-8-5-4-7-10-5-16s4-7 11-6c5 1 6 1 12-2 4-3 7-5 7-5 0-1 4-5 9-10 7-7 9-9 11-8 1 0 3 1 5 1zm-226 84c6 4 9 12 5 16-3 3-3 3-11-1-3-2-7-3-9-3-6 0-8-10-3-13 4-2 14-1 18 1zm-48 11c1 1 2 3 2 4 1 2 2 2 6 2 5 0 8 3 8 8 0 1-2 7-5 12-6 14-12 19-18 15-1-1-3-2-6-3-4-1-6-3-9-8-1-1-1-1-3 0-3 2-7 1-10-2-5-4-4-6 6-16 6-5 12-10 14-11 6-4 12-4 15-1zm-68 52c5 4 3 10-4 16-5 5-8 5-12 2-3-3-4-5-1-10 2-4 4-6 9-8s5-2 8 0z"/><path d="M1007 1292c0 1 0 1 1 1s1 0 1-1 0-1-1-1-1 0-1 1z"/></g>
+<g class="sea" id="region_mare_orientale"><path d="M378 306c-1 1-1 1 0 1s2 0 3-1c0-1-1-1-3 0zM1624 826c-1 0-3 2-6 4-5 4-10 4-15 1l-4-2c-1 0-3 2-5 5-6 8-8 9-21 8-4-1-5 1-1 5 1 2 2 4 2 5 0 3 2 5 5 5 6 0 20 11 20 16 0 6-6 7-11 1-4-4-12-8-16-8-3 1-2 3 3 5 3 1 5 3 6 6 3 6 2 8 0 10s-5 2-9 0c-1 0-2 0-2 1s-1 2-2 3c-2 2-3 2-11 0-4-1-4-1-5 1 0 2-1 9-1 17 0 14 0 15 2 18 2 4 4 5 13 5 6 0 8 0 10-3l3-2 3 3c3 4 7 5 11 4 2-1 11-1 24-1h22l3 4 3 3v45l-3 4c-4 3-4 3-13 3-5 0-11 0-13 1-3 0-3 0-2 3 1 2 1 4 2 5 0 1 1 1 3 1 2-1 4 0 8 3s5 5 6 9c2 5 2 6 5 7 4 0 8 4 8 7 0 1 1 2 3 2 4 1 6 4 5 7-2 4-8 3-9-1-1-3-3-3-5 1-2 3-10 7-12 6-1-1-3-2-3-4-2-3-2-3-4-1-1 1-3 2-5 2s-4 1-5 3c-2 2-4 4-5 4 0 0-2-2-3-5-2-5-3-6-6-4-3 1-5 1-10-4l-4-3-1 3c0 6-6 8-9 4-3-3-4-3-5 1 0 3-3 5-7 7-2 0-4 1-5 3-3 3-7 3-10-1s-6-7-8-7c-1 0-2 0-2 1s2 6 5 12c9 17 11 25 10 30 0 4 0 6 2 9s3 6 3 7c0 2-3 5-5 5s-10-8-14-14l-6-6c-2 1-4 6-5 13 0 8-2 9-5 8-4-1-6-5-7-11 0-3-1-7-2-9-3-4-10-12-11-11-1 0-1 2-1 5 0 8-4 11-10 7-5-3-7-5-7-8 0-2-1-4-2-5-2-2-2-2-5-1-1 1-5 4-8 7-3 2-7 5-8 6s-5 4-9 8c-8 7-16 14-43 35-8 7-15 13-27 22-3 3-8 7-11 10-4 2-8 6-11 8-2 2-8 7-13 11s-15 12-22 18c-8 7-21 17-29 24s-18 14-20 17c-3 2-9 6-13 10-13 10-53 43-80 66-10 8-18 15-18 16 0 0 3 3 6 5 7 5 16 9 29 10 5 1 11 2 12 3 4 2 9 11 9 19 1 5 2 9 5 16 6 13 10 16 18 20 10 5 19 6 30 6 8-1 10-1 23 2 8 2 16 4 18 5 1 1 6 2 11 4 4 1 9 3 11 5 2 1 6 3 9 3 3 1 7 4 8 5 6 6 20 17 27 20 7 4 13 4 19 1 13-7 20-13 28-28 3-7 4-9 5-15 0-6 0-7-3-11-9-13-11-31-6-44s19-28 35-38c10-5 12-6 19-7 6-1 9-2 11-5 7-5 10-6 17-5 4 0 8 0 10-1 4-1 11 0 20 4 2 2 6 3 8 3 8 2 20 6 21 8 2 2 5 12 4 15-1 4 7 8 18 8 8 0 16 2 21 6 3 2 2 2 33 2 10 0 12 1 18 13 3 6 6 11 7 12 2 1 5 1 15-3 8-3 17-4 26-1 2 0 12 2 22 4 28 4 30 4 34 9l3 3h8c7 0 9 1 11 3 4 2 5 2 6-4 1-7-1-7 38-7h35l3 3 3 2 4-3c4-4 5-4 9-4l4 1 3-6 3-6h5c3 0 8-1 10-2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 4-3 9-4l6-1 1-4c1-2 2-4 2-5 1 0 7-1 15-1 17 0 21-1 44-14 2-1 6-3 7-4 3-1 8-1 9 1zm-484 26c3 4 5 4 10 1 4-2 4-2 6-1s3 3 4 4c1 7 6 8 14 6 3-1 8-2 12-2 6-1 8-1 11 1 5 2 17 3 25 2 4-1 5-1 7 2 1 1 2 3 2 4 0 2 0 2 5 1 16-6 15-5 17-3 4 5 1 16-4 17-1 1-5 1-8 1-16 2-28 3-35 5-10 2-19 3-22 2-1 0-2-2-3-4-2-4-7-6-31-9-5-1-11-1-14-1-10 0-13-4-10-16 0-2 2-4 3-6l4-4c3-4 4-4 7 0zM1007 1292c0 1 0 1 1 1s1 0 1-1 0-1-1-1-1 0-1 1z"/></g>
+<g class="sea" id="region_oceanus_atlanticus"><path d="M187 127c-2 0-2 1-1 2 1 3 1 7 0 12-1 4-1 5 2 10 1 3 3 8 3 13 1 7 1 8-1 11-4 8-5 12-5 16 0 3-1 6-4 10-3 5-3 6-2 9 3 7 0 9-13 9-6 0-10 1-14 3-4 1-8 2-10 2-9 0-13 2-18 7-2 2-6 5-8 6-3 1-6 3-8 5-2 1-6 3-9 4-2 1-5 2-7 3-6 6-26 15-32 15-1 0-4 1-6 2s-5 2-7 2c-2 1-3 2-4 4s-1 1327 0 1332c0 3 1 3 4 3s5-1 6-2c4-4 15-22 18-27 1-3 6-10 10-16 11-14 14-22 15-33v-8l-5-7-4-7-1-13c-2-28-2-31 1-39 2-4 3-7 3-8l6-10c9-14 10-16 10-28s0-13 15-30c5-6 10-13 12-16 2-4 4-7 6-8s5-3 7-5c3-2 12-7 31-17 3-1 7-4 10-6 2-1 7-5 11-7 3-2 8-6 10-8 3-4 18-32 18-34 0-1 1-4 3-8 2-3 4-12 6-19 6-20 6-18 0-24-3-3-6-7-8-11-3-6-3-7-3-18 0-10 0-11 3-17 4-5 4-6 3-10s-3-6-6-9c-4-4-4-4-4-8 1-5-2-11-9-15-14-9-13-9-22-9-10 1-14 2-21 8-3 2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1-8 3l-4 4-1 11c0 12 0 12-3 15-2 2-5 3-6 4h-23c-10-1-21-1-23-1H336c-3 0-9 0-13 1-8 0-8 0-9 3-1 1-3 5-6 8-4 4-5 5-8 5-1 0-5-1-7-2s-7-2-12-3c-11-2-22 0-26 4-1 2-4 4-6 5-4 2-4 2-5 7-1 3-6 7-9 7 0 0-2-1-4-3-4-3-7-4-10-1-5 3-11 0-11-5s5-9 13-10c4-1 14-11 14-14 0-1-1-2-3-3-5-3-6-8-6-28s1-23 5-26c2-2 7-2 32-2 17 0 31 0 31-1 1 0 0-2-2-4l-4-4-6 2c-4 1-7 2-9 2s-6-4-6-6c0-1-1-2-2-3-2-3-8-2-11 1-3 2-12 6-15 6-2 0-5-2-7-4-4-4-5-5-5-8 0-1-1-3-2-5-1 0-2-2-2-3 0-3 9-10 14-11 2 0 5-2 8-4l8-4c4 0 15-7 17-10s2-4 2-9v-10c0-4-2-10-4-11-1-1-6 1-9 4-5 4-15 2-15-3 0-2 2-5 11-12l4-3-7-6-7-7 3-4c4-6 6-7 12-7 2 1 8 1 12 2 4 0 8 1 10 2 1 1 2 1 5 0 2-2 6-2 13-2 9 0 10 0 13-3 2-3 2-3 1-5-2-1-7-2-65-2-34 0-63 0-64 1zM1007 1292c0 1 0 1 1 1s1 0 1-1 0-1-1-1-1 0-1 1z"/></g>
+<g class="sea" id="region_pontus_euxinus"><path d="M378 306c-1 1-1 1 0 1s2 0 3-1c0-1-1-1-3 0zM1885 468c-4 1-10 2-13 3-4 3-5 3-5 6 0 4-9 21-15 28-3 3-6 6-7 8-2 3-4 4-8 6-6 1-11 5-11 8 0 1-4 4-7 4-1 0-2 0-2 1s2 5 5 7c2 4 2 7 0 21-1 4-2 9-2 12 0 7-5 11-18 12-6 0-9 1-10 2 0 1-2 1-4 1-4 0-4 0-3 12 0 1-1 4-3 8l-4 6v12c0 7 0 15-1 18 0 4-1 7 0 11 1 6 0 11-4 14-2 2-3 2-7 2-7 0-9 1-12 6-1 2-3 5-4 7-1 3-1 6-1 16s-1 12-2 14c-2 2-2 3 2 3 2 0 5 1 8 2 6 3 7 6 7 27 0 12 0 21-1 23-1 5-1 5 1 8s9 7 23 13c10 4 13 4 22 5 7 1 16 2 22 2 14 2 16 2 23-1 5-2 5-2 9-1 13 5 28 6 36 3 4-1 5-2 6-6 2-6 2-6 10-11 16-10 20-13 25-18 6-5 21-13 27-14 3-1 9-3 14-6l10-5h21c11 1 26 1 33 0h12l5-4c6-6 10-4 14 6 2 7 6 11 11 13 6 3 9 2 17-1l7-3 4 2c5 2 8 7 8 12 0 3 1 4 5 8 3 3 6 5 7 5 0 0 2-1 4-3 3-3 4-3 9-3 7 0 13 3 16 7 1 3 3 4 6 5 2 0 6 1 9 2 5 2 5 2 8 1 4-3 7-2 11 1 3 3 5 3 13 4 12 2 17 2 25-1 11-5 18-7 24-8 3-1 7-1 9-2 2 0 4 0 7 2s6 3 20 5c7 1 7 1 12-2 3-1 7-3 9-4s6-3 8-5c3-2 7-5 9-5 6-2 21-13 23-17 2-2 4-6 7-10 6-9 6-13 2-23-3-8-6-16-9-28-3-9-5-12-10-13-8-2-9-3-11-7-1-2-3-4-4-4-1-1-3-2-5-4s-5-2-10-3c-9-1-16-4-19-9-2-2-4-4-8-6-5-2-15-10-32-26-11-11-16-15-24-21-3-2-7-4-8-5s-7-3-11-4c-11-1-14-3-17-7-1-2-4-4-6-6-4-3-5-3-13-3-7-1-8-1-12-4-2-1-5-5-6-7-2-3-4-6-5-7-3-3-14-7-20-8-3 0-6-1-7-3-4-2-4-3 0-7l2-3-2 1c-3 1-4 2-4 7 0 2 0 5-1 6-2 3-7 5-14 6-4 1-9 1-11 2-2 0-4 0-8-3-2-2-5-3-6-3-2 0-4 2-7 4-2 3-6 7-9 10-5 5-6 5-12 5-10 1-19 5-21 10-4 6-15 16-20 17-9 3-18 1-28-7-4-3-4-5 0-9 1-2 2-4 2-6s1-6 2-8c1-3 1-4 0-7-2-6-5-8-11-8-4 0-6-1-12-5-7-4-7-4-18-2-3 0-4 0-7-2-5-5-2-12 6-16 1-1 4-3 7-5 2-2 8-6 12-8s9-4 10-5c1 0 5-2 8-4 3-1 5-2 5-3 0-3-1-4-5-4-2 0-5-1-8-2-4-2-5-2-14-1-6 1-13 2-17 3-7 1-13 1-18-3-5-3-11-6-16-7-5-2-6-2-6-4s1-3 2-4c2-2 2-2 1-3s-3-1-5 0c-4 0-7-2-7-6-1-3-3-3-14-2zM1007 1292c0 1 0 1 1 1s1 0 1-1 0-1-1-1-1 0-1 1z"/></g>
+</svg>
<div id="pieces">
-<div id="crisis_die_2" class="dice black d1" style="right:230px;top:525px"></div>
-<div id="crisis_die_1" class="dice white d6" style="right:182px;top:525px"></div>
-
-<div id="red_emperor_turns" class="red emperor_turns" style="top:10px;left:47px;"></div>
-<div id="blue_emperor_turns" class="blue emperor_turns" style="top:30px;left:41px;"></div>
-<div id="green_emperor_turns" class="green emperor_turns" style="top:50px;left:38px;"></div>
-<div id="yellow_emperor_turns" class="yellow emperor_turns" style="top:70px;left:35px;"></div>
-<div id="red_legacy" class="red legacy" style="top:12px;left:50px;"></div>
-<div id="blue_legacy" class="blue legacy" style="top:32px;left:47px;"></div>
-<div id="green_legacy" class="green legacy" style="top:52px;left:44px;"></div>
-<div id="yellow_legacy" class="yellow legacy" style="top:72px;left:41px;"></div>
-
-<div id=""Aegyptus_Support" class="neutral governor" style="left:1700px;top:1468px"></div>
-<div id=""Africa_Support" class="neutral governor" style="left:647px;top:1290px"></div>
-<div id=""Asia_Support" class="neutral governor" style="left:1679px;top:1000px"></div>
-<div id=""Britannia_Support" class="neutral governor" style="left:231px;top:260px"></div>
-<div id=""Galatia_Support" class="neutral governor" style="left:1954px;top:931px"></div>
-<div id=""Gallia_Support" class="neutral governor" style="left:460px;top:507px"></div>
-<div id=""Hispania_Support" class="neutral governor" style="left:154px;top:980px"></div>
-<div id=""Italia_Support" class="neutral governor" style="left:1028px;top:835px"></div>
-<div id=""Macedonia_Support" class="neutral governor" style="left:1384px;top:936px"></div>
-<div id=""Pannonia_Support" class="neutral governor" style="left:1154px;top:626px"></div>
-<div id=""Syria_Support" class="neutral governor" style="left:2034px;top:1280px"></div>
-<div id=""Thracia_Support" class="neutral governor" style="left:1502px;top:720px"></div>
+<div id="crisis_die_1" class="hide" style="right:175px;top:525px"></div>
+<div id="crisis_die_2" class="hide" style="right:125px;top:525px"></div>
+<div id="barbarian_die_1" class="hide" style="right:175px;top:605px"></div>
+<div id="barbarian_die_2" class="hide" style="right:125px;top:605px"></div>
+
+<div id="red_emperor_turns" class="red emperor_turns hide" style="top:30px;left:41px;"></div>
+<div id="blue_emperor_turns" class="blue emperor_turns hide" style="top:50px;left:41px;"></div>
+<div id="yellow_emperor_turns" class="yellow emperor_turns hide" style="top:70px;left:41px;"></div>
+<div id="green_emperor_turns" class="green emperor_turns hide" style="top:90px;left:41px;"></div>
+
+<div id="red_legacy" class="red legacy hide" style="top:32px;left:43px;"></div>
+<div id="blue_legacy" class="blue legacy hide" style="top:52px;left:43px;"></div>
+<div id="yellow_legacy" class="yellow legacy hide" style="top:72px;left:43px;"></div>
+<div id="green_legacy" class="green legacy hide" style="top:92px;left:43px;"></div>
+
+<div id="Italia_Capital" class="capital" style="left:1037px;top:742px"></div>
+<div id="Aegyptus_Capital" class="capital" style="left:1792px;top:1379px"></div>
+<div id="Africa_Capital" class="capital" style="left:740px;top:1203px"></div>
+<div id="Asia_Capital" class="capital" style="left:1789px;top:907px"></div>
+<div id="Britannia_Capital" class="capital" style="left:324px;top:176px"></div>
+<div id="Galatia_Capital" class="capital" style="left:2047px;top:841px"></div>
+<div id="Gallia_Capital" class="capital" style="left:553px;top:417px"></div>
+<div id="Hispania_Capital" class="capital" style="left:248px;top:891px"></div>
+<div id="Macedonia_Capital" class="capital" style="left:1476px;top:849px"></div>
+<div id="Pannonia_Capital" class="capital" style="left:1213px;top:535px"></div>
+<div id="Syria_Capital" class="capital" style="left:2173px;top:1192px"></div>
+<div id="Thracia_Capital" class="capital" style="left:1593px;top:630px"></div>
+
+<div id="Italia_Quaestor" class="quaestor hide" style="left:971px;top:829px"></div>
+<div id="Aegyptus_Quaestor" class="quaestor hide" style="left:1643px;top:1462px"></div>
+<div id="Africa_Quaestor" class="quaestor hide" style="left:590px;top:1284px"></div>
+<div id="Asia_Quaestor" class="quaestor hide" style="left:1622px;top:994px"></div>
+<div id="Britannia_Quaestor" class="quaestor hide" style="left:174px;top:254px"></div>
+<div id="Galatia_Quaestor" class="quaestor hide" style="left:1897px;top:925px"></div>
+<div id="Gallia_Quaestor" class="quaestor hide" style="left:403px;top:501px"></div>
+<div id="Hispania_Quaestor" class="quaestor hide" style="left:97px;top:974px"></div>
+<div id="Macedonia_Quaestor" class="quaestor hide" style="left:1327px;top:930px"></div>
+<div id="Pannonia_Quaestor" class="quaestor hide" style="left:1097px;top:620px"></div>
+<div id="Syria_Quaestor" class="quaestor hide" style="left:1977px;top:1274px"></div>
+<div id="Thracia_Quaestor" class="quaestor hide" style="left:1445px;top:714px"></div>
+
+<div id="Italia_Governor" class="neutral governor s8" style="left:1026px;top:834px"></div>
+<div id="Aegyptus_Governor" class="neutral governor s1" style="left:1698px;top:1467px"></div>
+<div id="Africa_Governor" class="neutral governor s1" style="left:646px;top:1289px"></div>
+<div id="Asia_Governor" class="neutral governor s1" style="left:1677px;top:999px"></div>
+<div id="Britannia_Governor" class="neutral governor s1" style="left:229px;top:259px"></div>
+<div id="Galatia_Governor" class="neutral governor s1" style="left:1952px;top:930px"></div>
+<div id="Gallia_Governor" class="neutral governor s1" style="left:459px;top:506px"></div>
+<div id="Hispania_Governor" class="neutral governor s1" style="left:153px;top:979px"></div>
+<div id="Macedonia_Governor" class="neutral governor s1" style="left:1382px;top:935px"></div>
+<div id="Pannonia_Governor" class="neutral governor s1" style="left:1152px;top:625px"></div>
+<div id="Syria_Governor" class="neutral governor s1" style="left:2032px;top:1279px"></div>
+<div id="Thracia_Governor" class="neutral governor s1" style="left:1501px;top:719px"></div>
<div id="Aegyptus_NPG" class="no_place_governor" style="left:1793px;top:1380px"></div>
<div id="Africa_NPG" class="no_place_governor" style="left:741px;top:1204px"></div>
-<div id="Asia_NPG" class="no_place_governor" style="left:1790px;top:908px"></div>
<div id="Britannia_NPG" class="no_place_governor" style="left:325px;top:177px"></div>
<div id="Galatia_NPG" class="no_place_governor" style="left:2048px;top:842px"></div>
-<div id="Gallia_NPG" class="no_place_governor" style="left:554px;top:418px"></div>
-<div id="Hispania_NPG" class="no_place_governor" style="left:249px;top:892px"></div>
-<div id="Italia_NPG" class="no_place_governor" style="left:1038px;top:743px"></div>
-<div id="Macedonia_NPG" class="no_place_governor" style="left:1477px;top:850px"></div>
-<div id="Pannonia_NPG" class="no_place_governor" style="left:1214px;top:536px"></div>
+<div id="Hispania_NPG" class="no_place_governor" style="left:249px;top:891px"></div>
<div id="Syria_NPG" class="no_place_governor" style="left:2174px;top:1193px"></div>
-<div id="Thracia_NPG" class="no_place_governor" style="left:1594px;top:631px"></div>
-
-<!--
-<div id="Aegyptus_Militia" class="militia" style="left:1793px;top:1380px"></div>
-<div id="Africa_Militia" class="militia" style="left:741px;top:1204px"></div>
-<div id="Asia_Militia" class="militia" style="left:1790px;top:908px"></div>
-<div id="Britannia_Militia" class="militia" style="left:325px;top:177px"></div>
-<div id="Galatia_Militia" class="militia" style="left:2048px;top:842px"></div>
-<div id="Gallia_Militia" class="militia" style="left:554px;top:418px"></div>
-<div id="Hispania_Militia" class="militia" style="left:249px;top:892px"></div>
-<div id="Italia_Militia" class="militia" style="left:1038px;top:743px"></div>
-<div id="Macedonia_Militia" class="militia" style="left:1477px;top:850px"></div>
-<div id="Pannonia_Militia" class="militia" style="left:1214px;top:536px"></div>
-<div id="Syria_Militia" class="militia" style="left:2174px;top:1193px"></div>
-<div id="Thracia_Militia" class="militia" style="left:1594px;top:631px"></div>
--->
-
-<div class="neutral governor" style="top:259px;left:230px;"></div>
-<div class="quaestor" style="top:220px;left:258px;"></div>
-<div class="militia" style="top:192px;left:320px;"></div>
-<div class="blue general" style="top:172px;left:340px;"></div>
-<div class="castra" style="top:172px;left:344px;"></div>
-<div class="franks inactive" style="top:172px;left:420px;"></div>
-<div class="limes" style="top:320px;left:260px;"></div>
-
-<div class="legion hide" id="legion_1"></div>
-<div class="legion hide" id="legion_2"></div>
-<div class="legion hide" id="legion_3"></div>
-<div class="legion hide" id="legion_4"></div>
-<div class="legion hide" id="legion_5"></div>
-<div class="legion hide" id="legion_6"></div>
-<div class="legion hide" id="legion_7"></div>
-<div class="legion hide" id="legion_8"></div>
-<div class="legion hide" id="legion_9"></div>
-<div class="legion hide" id="legion_10"></div>
-<div class="legion hide" id="legion_11"></div>
-<div class="legion hide" id="legion_12"></div>
-<div class="legion hide" id="legion_13"></div>
-<div class="legion hide" id="legion_14"></div>
-<div class="legion hide" id="legion_15"></div>
-<div class="legion hide" id="legion_16"></div>
-<div class="legion hide" id="legion_17"></div>
-<div class="legion hide" id="legion_18"></div>
-<div class="legion hide" id="legion_19"></div>
-<div class="legion hide" id="legion_20"></div>
-<div class="legion hide" id="legion_21"></div>
-<div class="legion hide" id="legion_22"></div>
-<div class="legion hide" id="legion_23"></div>
-<div class="legion hide" id="legion_24"></div>
-<div class="legion hide" id="legion_25"></div>
-<div class="legion hide" id="legion_26"></div>
-<div class="legion hide" id="legion_27"></div>
-<div class="legion hide" id="legion_28"></div>
-<div class="legion hide" id="legion_29"></div>
-<div class="legion hide" id="legion_30"></div>
-<div class="legion hide" id="legion_31"></div>
-<div class="legion hide" id="legion_32"></div>
-<div class="legion hide" id="legion_33"></div>
</div>
@@ -250,18 +145,73 @@
</div>
</div>
+<div id="available_panel" class="panel">
+<div id="available_header" class="panel_header">Available Leaders</div>
+<div id="available_body" class="panel_body">
+
+<div id="available_generals" class="action_row" style="gap:6px">
+<div id="red_general_0" class="red general"></div>
+<div id="red_general_1" class="red general"></div>
+<div id="red_general_2" class="red general"></div>
+<div id="red_general_3" class="red general"></div>
+<div id="red_general_4" class="red general"></div>
+<div id="red_general_5" class="red general"></div>
+<div id="blue_general_0" class="blue general"></div>
+<div id="blue_general_1" class="blue general"></div>
+<div id="blue_general_2" class="blue general"></div>
+<div id="blue_general_3" class="blue general"></div>
+<div id="blue_general_4" class="blue general"></div>
+<div id="blue_general_5" class="blue general"></div>
+<div id="yellow_general_0" class="yellow general"></div>
+<div id="yellow_general_1" class="yellow general"></div>
+<div id="yellow_general_2" class="yellow general"></div>
+<div id="yellow_general_3" class="yellow general"></div>
+<div id="yellow_general_4" class="yellow general"></div>
+<div id="yellow_general_5" class="yellow general"></div>
+<div id="green_general_0" class="green general"></div>
+<div id="green_general_1" class="green general"></div>
+<div id="green_general_2" class="green general"></div>
+<div id="green_general_3" class="green general"></div>
+<div id="green_general_4" class="green general"></div>
+<div id="green_general_5" class="green general"></div>
+</div>
+
+<div id="available_governors" class="action_row" style="gap:11px;padding-left:2px">
+<div id="red_governor_0" class="red governor"></div>
+<div id="red_governor_1" class="red governor"></div>
+<div id="red_governor_2" class="red governor"></div>
+<div id="red_governor_3" class="red governor"></div>
+<div id="red_governor_4" class="red governor"></div>
+<div id="red_governor_5" class="red governor"></div>
+<div id="blue_governor_0" class="blue governor"></div>
+<div id="blue_governor_1" class="blue governor"></div>
+<div id="blue_governor_2" class="blue governor"></div>
+<div id="blue_governor_3" class="blue governor"></div>
+<div id="blue_governor_4" class="blue governor"></div>
+<div id="blue_governor_5" class="blue governor"></div>
+<div id="yellow_governor_0" class="yellow governor"></div>
+<div id="yellow_governor_1" class="yellow governor"></div>
+<div id="yellow_governor_2" class="yellow governor"></div>
+<div id="yellow_governor_3" class="yellow governor"></div>
+<div id="yellow_governor_4" class="yellow governor"></div>
+<div id="yellow_governor_5" class="yellow governor"></div>
+<div id="green_governor_0" class="green governor"></div>
+<div id="green_governor_1" class="green governor"></div>
+<div id="green_governor_2" class="green governor"></div>
+<div id="green_governor_3" class="green governor"></div>
+<div id="green_governor_4" class="green governor"></div>
+<div id="green_governor_5" class="green governor"></div>
+</div>
+
+</div>
+</div>
+
<div id="action_panel" class="panel">
<div id="action_header" class="panel_header">Actions</div>
<div id="action_body" class="panel_body">
<div class="action_row">
-<button>Recruit General 1</button>
-<button>Recruit General 2</button>
-<button>Recruit General 3</button>
-<button>Recruit General 4</button>
-<button>Recruit General 5</button>
-</div>
-<div class="action_row">
+<button>Recruit General</button>
<button>Add Legion to Army</button>
<button>Create Army</button>
<button>Train Legions</button>
@@ -271,13 +221,7 @@
</div>
<div class="action_row">
-<button>Recruit Governor 1</button>
-<button>Recruit Governor 2</button>
-<button>Recruit Governor 3</button>
-<button>Recruit Governor 4</button>
-<button>Recruit Governor 5</button>
-</div>
-<div class="action_row">
+<button>Recruit Governor</button>
<button>Place Governor</button>
<button>Recall Governor</button>
</div>
diff --git a/play.js b/play.js
index eeeab9d..3d0782f 100644
--- a/play.js
+++ b/play.js
@@ -1,2 +1,676 @@
+"use strict"
+function set_has(set, item) {
+ 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
+}
+
+const REGION_LAYOUT = [
+ [1038,743,70,70],
+ [1793,1380,70,70],
+ [741,1204,70,70],
+ [1790,908,70,70],
+ [325,177,70,70],
+ [2048,842,70,70],
+ [554,418,70,70],
+ [249,892,70,70],
+ [1477,850,70,70],
+ [1214,536,70,70],
+ [2174,1193,70,70],
+ [1594,631,70,70],
+ [1370,200,195,15],
+ [900,200,135,15],
+ [1840,235,130,15],
+ [705,1495,165,25],
+ [2295,980,190,25],
+ [720,890,90,60],
+ [1770,1170,100,60],
+ [130,495,80,50],
+ [1970,620,130,60],
+]
+
+const REGION_LAYOUT2 = [
+ [1054,887,258,52],
+ [1700,1468,258,53],
+ [647,1290,258,53],
+ [1679,1000,258,52],
+ [231,260,258,52],
+ [1954,931,258,53],
+ [460,507,258,53],
+ [154,980,258,53],
+ [1384,936,258,53],
+ [1154,626,258,53],
+ [2034,1280,258,52],
+ [1502,720,258,52],
+]
+
+const REGION_NAME = [
+ "Italia",
+ "Aegyptus",
+ "Africa",
+ "Asia",
+ "Britannia",
+ "Galatia",
+ "Gallia",
+ "Hispania",
+ "Macedonia",
+ "Pannonia",
+ "Syria",
+ "Thracia",
+ "Alamanni",
+ "Franks",
+ "Goths",
+ "Nomads",
+ "Sassanids",
+ "Mare Occidentale",
+ "Mare Orientale",
+ "Oceanus Atlanticus",
+ "Pontus Euxinus",
+]
+
+let ui = {
+ cards: [],
+ barbarians: [],
+ legions: [],
+ militia: [],
+ barbarian_leaders: [],
+ rival_emperors: [],
+ body: document.querySelector("body"),
+ available_generals: document.getElementById("available_generals"),
+ available_governors: document.getElementById("available_governors"),
+ hand: document.getElementById("hand"),
+ draw: document.getElementById("draw"),
+ discard: document.getElementById("discard"),
+ market: document.getElementById("market"),
+ pieces: document.getElementById("pieces"),
+ legacy: [
+ document.getElementById("red_legacy"),
+ document.getElementById("blue_legacy"),
+ document.getElementById("yellow_legacy"),
+ document.getElementById("green_legacy"),
+ ],
+ emperor_turns: [
+ document.getElementById("red_emperor_turns"),
+ document.getElementById("blue_emperor_turns"),
+ document.getElementById("yellow_emperor_turns"),
+ document.getElementById("green_emperor_turns"),
+ ],
+ regions: [
+ document.getElementById("mapsvg").getElementById("region_italia"),
+ document.getElementById("mapsvg").getElementById("region_aegyptus"),
+ document.getElementById("mapsvg").getElementById("region_africa"),
+ document.getElementById("mapsvg").getElementById("region_asia"),
+ document.getElementById("mapsvg").getElementById("region_britannia"),
+ document.getElementById("mapsvg").getElementById("region_galatia"),
+ document.getElementById("mapsvg").getElementById("region_gallia"),
+ document.getElementById("mapsvg").getElementById("region_hispania"),
+ document.getElementById("mapsvg").getElementById("region_macedonia"),
+ document.getElementById("mapsvg").getElementById("region_pannonia"),
+ document.getElementById("mapsvg").getElementById("region_syria"),
+ document.getElementById("mapsvg").getElementById("region_thracia"),
+ document.getElementById("mapsvg").getElementById("region_alamanni"),
+ document.getElementById("mapsvg").getElementById("region_franks"),
+ document.getElementById("mapsvg").getElementById("region_goths"),
+ document.getElementById("mapsvg").getElementById("region_nomads"),
+ document.getElementById("mapsvg").getElementById("region_sassanids"),
+ document.getElementById("mapsvg").getElementById("region_mare_occidentale"),
+ document.getElementById("mapsvg").getElementById("region_mare_orientale"),
+ document.getElementById("mapsvg").getElementById("region_oceanus_atlanticus"),
+ document.getElementById("mapsvg").getElementById("region_pontus_euxinus"),
+ ],
+ capital: [],
+ province_governor: [],
+ quaestor: [],
+ amphitheater: [],
+ basilica: [],
+ limes: [],
+ dice: [
+ document.getElementById("crisis_die_1"),
+ document.getElementById("crisis_die_2"),
+ document.getElementById("barbarian_die_1"),
+ document.getElementById("barbarian_die_2"),
+ ],
+ generals: [
+ [
+ document.getElementById("red_general_0"),
+ document.getElementById("red_general_1"),
+ document.getElementById("red_general_2"),
+ document.getElementById("red_general_3"),
+ document.getElementById("red_general_4"),
+ document.getElementById("red_general_5"),
+ ],
+ [
+ document.getElementById("blue_general_0"),
+ document.getElementById("blue_general_1"),
+ document.getElementById("blue_general_2"),
+ document.getElementById("blue_general_3"),
+ document.getElementById("blue_general_4"),
+ document.getElementById("blue_general_5"),
+ ],
+ [
+ document.getElementById("yellow_general_0"),
+ document.getElementById("yellow_general_1"),
+ document.getElementById("yellow_general_2"),
+ document.getElementById("yellow_general_3"),
+ document.getElementById("yellow_general_4"),
+ document.getElementById("yellow_general_5"),
+ ],
+ [
+ document.getElementById("green_general_0"),
+ document.getElementById("green_general_1"),
+ document.getElementById("green_general_2"),
+ document.getElementById("green_general_3"),
+ document.getElementById("green_general_4"),
+ document.getElementById("green_general_5"),
+ ],
+ ],
+ governors: [
+ [
+ document.getElementById("red_governor_0"),
+ document.getElementById("red_governor_1"),
+ document.getElementById("red_governor_2"),
+ document.getElementById("red_governor_3"),
+ document.getElementById("red_governor_4"),
+ document.getElementById("red_governor_5"),
+ ],
+ [
+ document.getElementById("blue_governor_0"),
+ document.getElementById("blue_governor_1"),
+ document.getElementById("blue_governor_2"),
+ document.getElementById("blue_governor_3"),
+ document.getElementById("blue_governor_4"),
+ document.getElementById("blue_governor_5"),
+ ],
+ [
+ document.getElementById("yellow_governor_0"),
+ document.getElementById("yellow_governor_1"),
+ document.getElementById("yellow_governor_2"),
+ document.getElementById("yellow_governor_3"),
+ document.getElementById("yellow_governor_4"),
+ document.getElementById("yellow_governor_5"),
+ ],
+ [
+ document.getElementById("green_governor_0"),
+ document.getElementById("green_governor_1"),
+ document.getElementById("green_governor_2"),
+ document.getElementById("green_governor_3"),
+ document.getElementById("green_governor_4"),
+ document.getElementById("green_governor_5"),
+ ],
+ ],
+ castra: [ [], [], [], [] ],
+}
+
+function show(elt) {
+ elt.classList.remove("hide")
+}
+
+function hide(elt) {
+ elt.classList.add("hide")
+}
+
+function toggle_pieces() {
+ ui.pieces.classList.toggle("hide")
+}
+
+function create(t, p, ...c) {
+ let e = document.createElement(t)
+ Object.assign(e, p)
+ e.append(c)
+ if (p.my_action)
+ register_action(e, p.my_action, p.my_id)
+ return e
+}
+
+function create_piece(p) {
+ let e = create("div", p)
+ ui.pieces.appendChild(e)
+ return e
+}
+
+let action_register = []
+
+function register_action(e, action, id) {
+ e.my_action = action
+ e.my_id = id
+ e.onmousedown = on_click_action
+ action_register.push(e)
+}
+
+function on_click_action(evt) {
+ if (evt.button === 0) {
+ if (evt.target.my_stack) {
+ evt.stopPropagation()
+ if (focus_stack(evt.target.my_stack))
+ if (!send_action(evt.target.my_action, evt.target.my_id))
+ blur_stack()
+ } else {
+ if (send_action(evt.target.my_action, evt.target.my_id))
+ evt.stopPropagation()
+ }
+ }
+}
+
+document.getElementById("map").addEventListener("mousedown", function (evt) {
+ if (evt.button === 0)
+ blur_stack()
+})
+
+function create_building(region, className, xoff, yoff) {
+ let [ x, y, w, h ] = REGION_LAYOUT2[region]
+ let e = create_piece({ className })
+ e.style.left = x + (w>>1) + xoff - 46 + "px"
+ e.style.top = y + h + yoff + "px"
+ return e
+}
+
+function is_action(action, arg) {
+ if (arg === undefined)
+ return !!(view.actions && view.actions[action] === 1)
+ return !!(view.actions && view.actions[action] && set_has(view.actions[action], arg))
+}
+
+function on_init() {
+ let c = 1
+ function init_cards(n, className) {
+ for (let i = 0; i < n; ++i)
+ ui.cards[c + i] = create("div", { className, my_action: "card", my_id: c + i })
+ c += n
+ }
+
+ function init_barbarians(b, n, className) {
+ for (let i = 0; i < n; ++i)
+ ui.barbarians[b + i] = create_piece({ className, my_action: "barbarian", my_id: b + i })
+ }
+
+ init_cards(12, "card influence_m1")
+ init_cards(12, "card influence_s1")
+ init_cards(12, "card influence_p1")
+ init_cards(9, "card influence_m2")
+ init_cards(9, "card influence_s2")
+ init_cards(9, "card influence_p2")
+ init_cards(8, "card influence_m3")
+ init_cards(8, "card influence_s3")
+ init_cards(8, "card influence_p3")
+ init_cards(6, "card influence_m4")
+ init_cards(6, "card influence_s4")
+ init_cards(6, "card influence_p4")
+
+ init_barbarians(0, 10, "alamanni hide")
+ init_barbarians(10, 10, "franks hide")
+ init_barbarians(20, 10, "goths hide")
+ init_barbarians(30, 10, "nomads hide")
+ init_barbarians(40, 10, "sassanids hide")
+
+ for (let i = 0; i < 33; ++i)
+ ui.legions[i] = create_piece({ className: "legion hide", id: "legion_" + i, my_action: "legion", my_id: i })
+
+ for (let region = 0; region < 12; ++region) {
+ ui.militia[region] = create_piece({ className: "militia hide", my_action: "militia", my_id: region })
+ ui.capital[region] = document.getElementById(REGION_NAME[region] + "_Capital")
+ ui.quaestor[region] = document.getElementById(REGION_NAME[region] + "_Quaestor")
+ ui.province_governor[region] = document.getElementById(REGION_NAME[region] + "_Governor")
+
+ if (true) {
+ ui.amphitheater[region] = create_building(region, "amphitheater hide", -48 - 3, 6)
+ ui.basilica[region] = create_building(region, "basilica hide", 48 + 3, 6)
+ ui.limes[region] = create_building(region, "limes hide", 0, 6+25)
+ } else {
+ ui.amphitheater[region] = create_building(region, "amphitheater hide", -96 - 5, 6)
+ ui.basilica[region] = create_building(region, "basilica hide", 0, 6)
+ ui.limes[region] = create_building(region, "limes hide", 96 + 5, 6)
+ }
+ }
+
+ for (let region = 0; region < 12; ++region)
+ register_action(ui.capital[region], "capital", region)
+ for (let region = 0; region < 12 + 5 + 4; ++region)
+ register_action(ui.regions[region], "region", region)
+
+ for (let pi = 0; pi < 4; ++pi) {
+ for (let ai = 0; ai < 6; ++ai) {
+ ui.castra[pi][ai] = create_piece({ className: "castra hide" })
+ register_action(ui.generals[pi][ai], "general", 100 + 100 * pi + ai)
+ register_action(ui.governors[pi][ai], "governor", 100 + 100 * pi + ai)
+ }
+ }
+
+ ui.barbarian_leaders[0] = create_piece({ id: "cniva", className: "goths hide", my_action: "barbarian_leader", my_id: 0 })
+ ui.barbarian_leaders[1] = create_piece({ id: "ardashir", className: "goths hide", my_action: "barbarian_leader", my_id: 1 })
+ ui.barbarian_leaders[2] = create_piece({ id: "shapur", className: "goths hide", my_action: "barbarian_leader", my_id: 2 })
+
+ ui.rival_emperors[0] = create_piece({ id: "postumus", className: "rival hide", my_action: "rival_emperor", my_id: 0 })
+ ui.rival_emperors[1] = create_piece({ id: "priest_king", className: "rival hide", my_action: "rival_emperor", my_id: 1 })
+ ui.rival_emperors[2] = create_piece({ id: "zenobia", className: "rival hide", my_action: "rival_emperor", my_id: 2 })
+}
+
+let stack_count = new Array(12 + 5).fill(0)
+let stack_focus = 0
+let stack_cache = {}
+
+function focus_stack(id) {
+ if (stack_focus !== id) {
+ stack_focus = id
+ on_update()
+ let stack = stack_cache[id]
+ return stack && stack.length <= 1
+ }
+ return true
+}
+
+function blur_stack() {
+ if (stack_focus !== 0) {
+ stack_focus = 0
+ on_update()
+ }
+}
+
+function layout_stack(id, list, region, in_capital) {
+ let [ x, y, w, h ] = REGION_LAYOUT[region]
+ let dx = 8
+ let dy = 8
+ let z = 1
+
+ stack_cache[id] = list
+
+ if (in_capital) {
+ x += 5
+ y += 5
+ } else {
+ x += stack_count[region] * 80
+ stack_count[region] += 1
+ }
+
+ if (list.length > 5) {
+ dx = 5
+ dy = 5
+ }
+
+ if (stack_focus === id) {
+ dx = 24
+ dy = 16
+ }
+
+ for (let item of list) {
+ item.style.left = x + "px"
+ item.style.top = y + "px"
+ item.style.zIndex = z
+ item.my_stack = id
+ x -= dx
+ y -= dy
+ z += 1
+ }
+}
+
+function on_update() {
+ stack_cache = {}
+
+ ui.body.classList.toggle("p2", view.players.length === 2)
+ ui.body.classList.toggle("p3", view.players.length === 3)
+
+ if (view.players.length < 4)
+ hide(document.getElementById("role_Green"))
+ else
+ show(document.getElementById("role_Green"))
+
+ if (view.players.length < 3)
+ hide(document.getElementById("role_Yellow"))
+ else
+ show(document.getElementById("role_Yellow"))
+
+ ui.hand.replaceChildren()
+ ui.draw.replaceChildren()
+ ui.discard.replaceChildren()
+ ui.market.replaceChildren()
+
+ for (let i = 0; i < view.players.length; ++i) {
+ let legacy = view.players[i].legacy
+ let turns = view.players[i].emperor_turns
+
+ if (legacy > 40) {
+ legacy -= 40
+ ui.legacy[i].classList.toggle("legacy_40", true)
+ } else {
+ ui.legacy[i].classList.toggle("legacy_40", false)
+ }
+
+ let y = 30
+ for (let k = 0; k < i; ++k) {
+ let k_legacy = view.players[k].legacy
+ if (k_legacy > 40)
+ k_legacy -= 40
+ if (legacy === k_legacy)
+ y += 20
+ }
+
+ show(ui.legacy[i])
+ ui.legacy[i].style.left = Math.round(43 + legacy * 60.2) + "px"
+ ui.legacy[i].style.top = (2 + y) + "px"
+
+ y = 30
+ for (let k = 0; k < i; ++k) {
+ let k_turns = view.players[k].emperor_turns
+ if (turns === k_turns)
+ y += 20
+ }
+
+ show(ui.emperor_turns[i])
+ ui.emperor_turns[i].style.left = Math.round(41 + turns * 60.2) + "px"
+ ui.emperor_turns[i].style.top = (0 + y) + "px"
+ }
+
+ for (let pi = view.players.length; pi < 4; ++pi) {
+ hide(ui.legacy[pi])
+ hide(ui.emperor_turns[pi])
+ for (let ai = 0; ai < 6; ++ai) {
+ ui.generals[pi][ai].remove()
+ ui.governors[pi][ai].remove()
+ }
+ }
+
+ for (let region = 0; region < 12; ++region) {
+ let who = -1
+ for (let pi = 0; pi < view.players.length; ++pi)
+ for (let ai = 0; ai < 6; ++ai)
+ if (view.players[pi].governors[ai] === region)
+ who = pi
+ if (who < 0)
+ ui.province_governor[region].classList = "neutral governor s" + view.support[region]
+ else if (who === 0)
+ ui.province_governor[region].classList = "red governor s" + view.support[region]
+ else if (who === 1)
+ ui.province_governor[region].classList = "blue governor s" + view.support[region]
+ else if (who === 2)
+ ui.province_governor[region].classList = "yellow governor s" + view.support[region]
+ else if (who === 3)
+ ui.province_governor[region].classList = "green governor s" + view.support[region]
+
+ if (view.quaestor & (1 << region))
+ show(ui.quaestor[region])
+ else
+ hide(ui.quaestor[region])
+
+ if (view.amphitheater & (1 << region))
+ show(ui.amphitheater[region])
+ else
+ hide(ui.amphitheater[region])
+
+ if (view.basilica & (1 << region))
+ show(ui.basilica[region])
+ else
+ hide(ui.basilica[region])
+
+ if (view.limes & (1 << region))
+ show(ui.limes[region])
+ else
+ hide(ui.limes[region])
+
+ if (view.militia & (1 << region))
+ show(ui.militia[region])
+ else
+ hide(ui.militia[region])
+ }
+
+ for (let i = 0; i < 33; ++i) {
+ if (view.legions[i] >= 0) {
+ show(ui.legions[i])
+ if (view.is_legion_reduced[i])
+ ui.legions[i].classList.toggle("reduced", true)
+ else
+ ui.legions[i].classList.toggle("reduced", false)
+ } else {
+ hide(ui.legions[i])
+ }
+ }
+
+ for (let i = 0; i < 50; ++i) {
+ if (view.barbarians[i] >= 0) {
+ show(ui.barbarians[i])
+ if (view.is_barbarian_inactive[i])
+ ui.barbarians[i].classList.toggle("inactive", true)
+ else
+ ui.barbarians[i].classList.toggle("inactive", false)
+ } else {
+ hide(ui.barbarians[i])
+ }
+ }
+
+ stack_count.fill(1)
+
+ for (let region = 0; region < 12 + 5; ++region) {
+ for (let tribe = 0; tribe < 5; ++tribe) {
+ let active_barbarians = []
+ let inactive_barbarians = []
+ for (let i = tribe * 10; i < tribe * 10 + 10; ++i) {
+ // TODO: Cniva, Ardashir, and Shapur
+ if (view.barbarians[i] === region) {
+ if (view.is_barbarian_inactive[i])
+ inactive_barbarians.push(ui.barbarians[i])
+ else
+ active_barbarians.push(ui.barbarians[i])
+ }
+ }
+ if (active_barbarians.length > 0)
+ layout_stack(region * 10 + tribe * 2 + 0, active_barbarians, region, false)
+ if (inactive_barbarians.length > 0)
+ layout_stack(region * 10 + tribe * 2 + 1, inactive_barbarians, region, false)
+ }
+ }
+
+ for (let region = 0; region < 12; ++region) {
+ if (view.militia & (1 << region)) {
+ let lone_militia = true
+ for (let pi = 0; pi < view.players.length; ++pi) {
+ for (let ai = 0; ai < 6; ++ai) {
+ if (view.players[pi].generals[ai] === region)
+ if (view.players[pi].capital & (1 << ai))
+ lone_militia = false
+ }
+ }
+ if (lone_militia)
+ layout_stack(0, [ ui.militia[region] ], region, true)
+ }
+ }
+
+ for (let pi = 0; pi < view.players.length; ++pi) {
+ let p = view.players[pi]
+ for (let ai = 0; ai < 6; ++ai) {
+ let id = 100 + 100 * pi + ai
+
+ let r = p.generals[ai]
+ let e = ui.generals[pi][ai]
+ if (r >= 0) {
+ let stack = []
+ if (e.parentNode !== ui.pieces)
+ ui.pieces.appendChild(e)
+
+ if ((view.militia & (1 << r)) && (p.capital & (1 << ai)))
+ stack.push(ui.militia[r])
+
+ for (let i = 0; i < 33; ++i) {
+ if (view.legions[i] === id) {
+ stack.push(ui.legions[i])
+ }
+ }
+
+ for (let i = 0; i < 50; ++i)
+ if (view.barbarians[i] === id)
+ stack.push(ui.barbarians[i])
+
+ stack.push(e)
+
+ if (p.castra & (1 << ai)) {
+ show(ui.castra[pi][ai])
+ stack.push(ui.castra[pi][ai])
+ } else {
+ hide(ui.castra[pi][ai])
+ }
+
+ if (p.capital & (1 << ai))
+ layout_stack(id, stack, r, true)
+ else
+ layout_stack(id, stack, r, false)
+ } else {
+ if (e.parentNode !== ui.available_generals)
+ ui.available_generals.appendChild(e)
+ }
+
+ if (p.governors[ai] < 0)
+ show(ui.governors[pi][ai])
+ else
+ hide(ui.governors[pi][ai])
+ }
+ }
+
+ if (view.dice[0] > 0) {
+ ui.dice[0].className = "dice black d" + view.dice[0]
+ ui.dice[1].className = "dice white d" + view.dice[1]
+ } else {
+ ui.dice[0].className = "dice hide"
+ ui.dice[1].className = "dice hide"
+ }
+ if (view.dice[2] > 0) {
+ ui.dice[2].className = "dice black d" + view.dice[0]
+ ui.dice[3].className = "dice white d" + view.dice[1]
+ } else {
+ ui.dice[2].className = "dice hide"
+ ui.dice[3].className = "dice hide"
+ }
+
+ if (view.hand) {
+ for (let c of view.hand)
+ ui.hand.appendChild(ui.cards[c])
+ }
+
+ if (view.draw) {
+ for (let c of view.draw)
+ ui.draw.appendChild(ui.cards[c])
+ }
+
+ if (view.discard) {
+ for (let c of view.discard)
+ ui.discard.appendChild(ui.cards[c])
+ }
+
+ for (let pile of view.market) {
+ if (pile.length > 0)
+ ui.market.appendChild(ui.cards[pile[0]])
+ }
+
+ for (let e of action_register)
+ e.classList.toggle("action", is_action(e.my_action, e.my_id))
+}
+
+on_init()
scroll_with_middle_mouse("main")
diff --git a/rules.js b/rules.js
index 3562286..2ed6982 100644
--- a/rules.js
+++ b/rules.js
@@ -2,6 +2,67 @@
// === CONSTANTS AND DATA ===
+// Barbarian possible locations:
+/*
+FRANKS
+ BRITANNIA
+ GALLIA
+ HISPANIA
+ PANNONIA
+ ITALIA
+
+ALAMANNI
+ PANNONIA
+ ITALIA
+ THRACIA
+ MACEDONIA
+
+GOTHS
+ THRACIA
+ MACEDONIA
+ ASIA
+ GALATIA
+ SYRIA
+
+
+SASSANIDS
+ GALATIA
+ ASIA
+ SYRIA
+ AEGYPTUS
+
+NOMADS
+ AFRCIA
+ HISPANIA
+ AEGYPTUS
+ SYRIA
+
+NOMAD STACKS in PROVINCES
+ AEGYPTUS NOMADS
+ AEGYPTUS SASSANIDS
+ AFRICA NOMADS
+ ASIA GOTHS
+ ASIA SASSANIDS
+ BRITANNIA FRANKS
+ GALATIA GOTHS
+ GALATIA SASSANIDS
+ GALLIA FRANKS
+ HISPANIA FRANKS
+ HISPANIA NOMADS
+ ITALIA ALAMANNI
+ ITALIA FRANKS
+ MACEDONIA ALAMANNI
+ MACEDONIA GOTHS
+ PANNONIA ALAMANNI
+ PANNONIA FRANKS
+ SYRIA GOTHS
+ SYRIA NOMADS
+ SYRIA SASSANIDS
+ THRACIA ALAMANNI
+ THRACIA GOTHS
+*/
+
+
const P1 = "Red"
const P2 = "Blue"
const P3 = "Yellow"
@@ -39,6 +100,10 @@ const FRANKS_HOMELAND = 13
const GOTHS_HOMELAND = 14
const NOMADS_HOMELAND = 15
const SASSANIDS_HOMELAND = 16
+const MARE_OCCIDENTALE = 17
+const MARE_ORIENTALE = 18
+const OCEANUS_ATLANTICUS = 19
+const PONTUS_EUXINUS = 20
const ARMY = [
[ 100, 101, 102, 103, 104, 105 ],
@@ -230,12 +295,12 @@ function setup_market_pile(cards) {
}
function setup_barbarians(tribe) {
- for (let i = BARBARIAN_UNITS[0]; i <= BARBARIAN_UNITS[1]; ++i)
- game.barbarians[i] = BARBARIAN_HOMELAND[i]
+ for (let i = BARBARIAN_UNITS[tribe][0]; i <= BARBARIAN_UNITS[tribe][1]; ++i)
+ game.barbarians[i] = BARBARIAN_HOMELAND[tribe]
}
function remove_barbarians(tribe) {
- for (let i = BARBARIAN_UNITS[0]; i <= BARBARIAN_UNITS[1]; ++i)
+ for (let i = BARBARIAN_UNITS[tribe][0]; i <= BARBARIAN_UNITS[tribe][1]; ++i)
game.barbarians[i] = OFF_MAP
}
@@ -247,31 +312,41 @@ exports.setup = function (seed, scenario, options) {
log: [],
undo: [],
active: 0,
- state: "none",
- players: [],
- events: setup_events(),
+ state: "setup",
+ first: 0,
+ events: null,
active_events: [],
- has_militia: new Array(12).fill(0),
support: new Array(12).fill(1),
+ mobs: 0,
+ militia: 0,
+ quaestor: 0,
legions: new Array(33).fill(OFF_MAP),
is_legion_reduced: new Array(33).fill(0),
barbarians: new Array(50).fill(OFF_MAP),
- is_barbarian_inactive: new Array(50).fill(0),
+ is_barbarian_inactive: new Array(50).fill(1),
barbarian_leaders: [ OFF_MAP, OFF_MAP, OFF_MAP ],
rival_emperors: [ OFF_MAP, OFF_MAP, OFF_MAP ],
- market: [
- setup_market_pile(CARD_M2),
- setup_market_pile(CARD_S2),
- setup_market_pile(CARD_P2),
- setup_market_pile(CARD_M3),
- setup_market_pile(CARD_S3),
- setup_market_pile(CARD_P3),
- setup_market_pile(CARD_M4),
- setup_market_pile(CARD_S4),
- setup_market_pile(CARD_P4),
- ],
+ amphitheater: 0,
+ basilica: 0,
+ limes: 0,
+ dice: [ 0, 0, 0, 0 ], // first two are crisis table dice, second two are barbarian homeland dice
+ market: null,
+ players: [],
}
+ game.events = setup_events()
+ game.market = [
+ setup_market_pile(CARD_M2),
+ setup_market_pile(CARD_S2),
+ setup_market_pile(CARD_P2),
+ setup_market_pile(CARD_M3),
+ setup_market_pile(CARD_S3),
+ setup_market_pile(CARD_P3),
+ setup_market_pile(CARD_M4),
+ setup_market_pile(CARD_S4),
+ setup_market_pile(CARD_P4),
+ ]
+
setup_barbarians(ALAMANNI)
setup_barbarians(FRANKS)
setup_barbarians(GOTHS)
@@ -287,6 +362,8 @@ exports.setup = function (seed, scenario, options) {
discard: [],
generals: [ AVAILABLE, UNAVAILABLE, UNAVAILABLE, UNAVAILABLE, UNAVAILABLE, UNAVAILABLE ],
governors: [ AVAILABLE, UNAVAILABLE, UNAVAILABLE, UNAVAILABLE, UNAVAILABLE, UNAVAILABLE ],
+ capital: 0,
+ castra: 0,
}
}
@@ -314,6 +391,9 @@ exports.setup = function (seed, scenario, options) {
remove_barbarians(SASSANIDS)
}
+ game.first = game.active = random(player_count)
+ log(PLAYER_NAMES[game.first] + " is First Player!")
+
return save_game()
}
@@ -350,6 +430,34 @@ exports.view = function (state, player_name) {
log: game.log,
active: PLAYER_NAMES[game.active],
prompt: null,
+
+ militia: game.militia,
+ support: game.support,
+ quaestor: game.quaestor,
+ mobs: game.mobs,
+ legions: game.legions,
+ is_legion_reduced: game.is_legion_reduced,
+ barbarians: game.barbarians,
+ is_barbarian_inactive: game.is_barbarian_inactive,
+ barbarian_leaders: game.barbarian_leaders,
+ rival_emperors: game.rival_emperors,
+ amphitheater: game.amphitheater,
+ basilica: game.basilica,
+ limes: game.limes,
+ dice: game.dice,
+ market: game.market,
+ players: [],
+ }
+
+ for (let i = 0; i < game.players.length; ++i) {
+ view.players[i] = {
+ legacy: game.players[i].legacy,
+ emperor_turns: game.players[i].emperor_turns,
+ generals: game.players[i].generals,
+ governors: game.players[i].governors,
+ capital: game.players[i].capital,
+ castra: game.players[i].castra,
+ }
}
if (game.state === "game_over") {
@@ -358,6 +466,10 @@ exports.view = function (state, player_name) {
let inactive = states[game.state].inactive || game.state
view.prompt = `Waiting for ${PLAYER_NAMES[game.active]} \u2014 ${inactive}...`
} else {
+ view.hand = game.players[player].hand
+ view.draw = game.players[player].draw
+ view.discard = game.players[player].discard
+
view.actions = {}
states[game.state].prompt()
view.prompt = PLAYER_NAMES[game.active] + ": " + view.prompt
@@ -379,12 +491,71 @@ function log(msg) {
// === STATES ===
-states.none = {
- prompt() {}
+function get_governor(r) {
+ for (let p = 0; p < game.players.length; ++p) {
+ for (let i = 0; i < 6; ++i)
+ if (game.players[p].governors[i] === r)
+ return p
+ }
+ return -1
+}
+
+function is_neutral_province(r) {
+ return (game.support[r] !== NO_PLACE_GOVERNOR) && (get_governor(r) < 0)
+}
+
+function find_legion() {
+ for (let i = 0; i < 33; ++i)
+ if (game.legions[i] < 0)
+ return i
+ return -1
+}
+
+function add_militia(r) {
+ game.militia |= (1 << r)
+}
+
+function remove_militia(r) {
+ game.militia &= ~(1 << r)
+}
+
+function get_support(r) {
+ return game.support[r]
+}
+
+function set_support(r, level) {
+ game.support[r] = level
+}
+
+states.setup = {
+ prompt() {
+ view.prompt = "Select a starting Province."
+ for (let r = 1; r < 12; ++r)
+ if (is_neutral_province(r))
+ gen_action("capital", r)
+ },
+ capital(r) {
+ let p = game.active
+ game.players[p].generals[0] = r
+ game.players[p].governors[0] = r
+ game.players[p].capital = 1
+ game.legions[find_legion()] = ARMY[p][0]
+ add_militia(r)
+
+ game.active = (game.active + 1) % game.players.length
+ if (game.active === game.first)
+ goto_start_turn()
+ },
}
// === COMMON LIBRARY ===
+function gen_action(action, argument) {
+ if (!(action in view.actions))
+ view.actions[action] = []
+ set_add(view.actions[action], argument)
+}
+
function clear_undo() {
if (game.undo.length > 0)
game.undo = []