summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--about.html20
-rw-r--r--cover.1x.jpgbin0 -> 21435 bytes
-rw-r--r--cover.2x.jpgbin0 -> 70140 bytes
-rw-r--r--cover.jpgbin0 -> 1778197 bytes
-rw-r--r--data.js401
-rw-r--r--icons/README2
-rw-r--r--icons/Red_Rose_Badge_of_Lancaster.pngbin0 -> 18461 bytes
-rw-r--r--icons/Red_Rose_Badge_of_Lancaster.svg1
-rw-r--r--icons/White_Rose_Badge_of_York.pngbin0 -> 14664 bytes
-rw-r--r--icons/White_Rose_Badge_of_York.svg1
-rw-r--r--play.html1577
-rw-r--r--rules.js3431
-rw-r--r--thumbnail.jpgbin0 -> 12730 bytes
-rw-r--r--ui.js755
14 files changed, 6188 insertions, 0 deletions
diff --git a/about.html b/about.html
new file mode 100644
index 0000000..e44ad9f
--- /dev/null
+++ b/about.html
@@ -0,0 +1,20 @@
+<p>
+Richard the Third is an epic two-player wargame that recreates the 15th
+century, bloody dynastic struggle between the royal houses of Lancaster and
+York for the throne of England. Will the mad-king Henry VI and his Queen
+Margaret keep the throne or will the Duke of York recover it for the
+Plantagenets. Also strutting across the game's stage are Edward IV, Richard
+III, Henry VII, and Warwick, the notorious "Kingmaker".
+
+<p>
+The object of play is to eliminate all five enemy heirs and/or win control of
+the powerful nobles of England. The Lancastrians start the game holding the
+throne, and the Yorkists are in exile ready to invade. Kingship can be won or
+lost several times during the game. Will Richard III emerge triumphant, or will
+he perish in battle as he did historically?
+
+<p>
+Designer: Jerry Taylor.
+
+<p>
+Copyright &copy; 2009 <a href="https://columbiagames.com/cgi-bin/query/cfg/zoom.cfg?product_id=3171">Columbia Games</a> and Jerry Taylor.
diff --git a/cover.1x.jpg b/cover.1x.jpg
new file mode 100644
index 0000000..9525ada
--- /dev/null
+++ b/cover.1x.jpg
Binary files differ
diff --git a/cover.2x.jpg b/cover.2x.jpg
new file mode 100644
index 0000000..323839c
--- /dev/null
+++ b/cover.2x.jpg
Binary files differ
diff --git a/cover.jpg b/cover.jpg
new file mode 100644
index 0000000..b536b36
--- /dev/null
+++ b/cover.jpg
Binary files differ
diff --git a/data.js b/data.js
new file mode 100644
index 0000000..66823b9
--- /dev/null
+++ b/data.js
@@ -0,0 +1,401 @@
+let AREAS = {
+ "Ireland":{"x":120,"y":475},
+ "Isle of Man":{"x":360,"y":525},
+ "Scotland":{"x":635,"y":180},
+ "Northumbria":{"x":885,"y":280},
+ "Cumbria":{"x":680,"y":405},
+ "North Yorks":{"x":890,"y":535},
+ "East Yorks":{"x":1120,"y":545},
+ "South Yorks":{"x":985,"y":710},
+ "Lancaster":{"x":750,"y":690},
+ "Caernarvon":{"x":480,"y":890},
+ "Chester":{"x":720,"y":900},
+ "Derby":{"x":960,"y":880},
+ "Lincoln":{"x":1210,"y":820},
+ "Pembroke":{"x":340,"y":1220},
+ "Powys":{"x":565,"y":1100},
+ "Hereford":{"x":715,"y":1125},
+ "Warwick":{"x":890,"y":1090},
+ "Leicester":{"x":1080,"y":1055},
+ "Rutland":{"x":1265,"y":1060},
+ "East Anglia":{"x":1505,"y":1040},
+ "Glamorgan":{"x":570,"y":1330},
+ "Gloucester":{"x":840,"y":1300},
+ "Oxford":{"x":1035,"y":1290},
+ "Middlesex":{"x":1235,"y":1305},
+ "Essex":{"x":1440,"y":1255},
+ "Somerset":{"x":750,"y":1510},
+ "Wilts":{"x":920,"y":1460},
+ "Sussex":{"x":1140,"y":1550},
+ "Kent":{"x":1415,"y":1490},
+ "Cornwall":{"x":400,"y":1660},
+ "Dorset":{"x":810,"y":1640},
+ "France":{"x":225,"y":160},
+ "Calais":{"x":1465,"y":1795},
+ "Irish Sea":{"x":280,"y":685},
+ "North Sea":{"x":1425,"y":460},
+ "English Channel":{"x":915,"y":1820},
+ "Pool":{x:1688-87,y:87},
+ "Minor":{x:1688-87-66-10,y:87},
+}
+
+let BORDERS = {};
+let BLOCKS = {};
+
+const CARDS = {
+ 1: { name: "Force March", event: "force_march", actions: 1, image: "card_force_march" },
+ 2: { name: "Muster", event: "muster", actions: 0, image: "card_muster" },
+ 3: { name: "Piracy", event: "piracy", actions: 2, image: "card_piracy" },
+ 4: { name: "Plague", event: "plague", actions: 0, image: "card_plague" },
+ 5: { name: "Surprise", event: "surprise", actions: 1, image: "card_surprise" },
+ 6: { name: "Treason", event: "treason", actions: 1, image: "card_treason" },
+ 7: { name: "4", actions: 4, image: "card_4" },
+ 8: { name: "4", actions: 4, image: "card_4" },
+ 9: { name: "4", actions: 4, image: "card_4" },
+ 10: { name: "4", actions: 4, image: "card_4" },
+ 11: { name: "4", actions: 4, image: "card_4" },
+ 12: { name: "4", actions: 4, image: "card_4" },
+ 13: { name: "3", actions: 3, image: "card_3" },
+ 14: { name: "3", actions: 3, image: "card_3" },
+ 15: { name: "3", actions: 3, image: "card_3" },
+ 16: { name: "3", actions: 3, image: "card_3" },
+ 17: { name: "3", actions: 3, image: "card_3" },
+ 18: { name: "3", actions: 3, image: "card_3" },
+ 19: { name: "3", actions: 3, image: "card_3" },
+ 20: { name: "2", actions: 2, image: "card_2" },
+ 21: { name: "2", actions: 2, image: "card_2" },
+ 22: { name: "2", actions: 2, image: "card_2" },
+ 23: { name: "2", actions: 2, image: "card_2" },
+ 24: { name: "2", actions: 2, image: "card_2" },
+ 25: { name: "2", actions: 2, image: "card_2" },
+};
+
+(function () {
+ for (let a in AREAS) {
+ AREAS[a].exits = [];
+ AREAS[a].shields = [];
+ AREAS[a].wrap = 3;
+ AREAS[a].layout_axis = 'X';
+ AREAS[a].layout_major = 0.5;
+ AREAS[a].layout_minor = 0.5;
+ }
+
+ function border(a, b, type) {
+ if (a > b) [a, b] = [b, a];
+ let id = a + "/" + b;
+ BORDERS[id] = type;
+ AREAS[a].exits.push(b);
+ AREAS[b].exits.push(a);
+ }
+
+ function yellow(A,B) { border(A,B,"major"); }
+ function blue(A,B) { border(A,B,"river"); }
+ function red(A,B) { border(A,B,"minor"); }
+ function sea(A,B,major) { border(A,B,"sea"); if (major) AREAS[B].major_port = true; }
+
+ function layout(a, wrap, axis, major, minor) {
+ AREAS[a].wrap = wrap;
+ AREAS[a].layout_axis = axis;
+ AREAS[a].layout_major = (1 - major) / 2;
+ AREAS[a].layout_minor = (1 - minor) / 2;
+ }
+
+ layout("Pool", 50, 'Y', 1, 0);
+ layout("Minor", 10, 'Y', 1, 0);
+ layout("France", 4, 'X', 0, 0);
+ layout("Calais", 4, 'X', 0, 0);
+
+ layout("Ireland", 3, 'Y', -1, -1);
+ layout("Scotland", 3, 'X', -1, -1);
+ layout("Northumbria", 4, 'Y', 0, 0);
+ layout("Rutland", 4, 'Y', 0, 0);
+ layout("Leicester", 4, 'Y', 0, 0);
+
+ layout("North Sea", 10, 'Y', 1, 0);
+ layout("Irish Sea", 10, 'Y', 1, 0);
+ layout("English Channel", 10, 'X', 0, 0);
+
+ layout("Cornwall", 4, 'X', 0, 0);
+ layout("Dorset", 4, 'X', 0, 0);
+ layout("Sussex", 4, 'X', 0, 0);
+ layout("Kent", 4, 'X', 0, 0);
+ layout("Somerset", 4, 'X', -1, -1);
+
+ layout("East Anglia", 4, 'X', 0, 0);
+ layout("Powys", 4, 'Y', 0, 0);
+ layout("Hereford", 4, 'Y', 0, 0);
+ layout("Oxford", 3, 'Y', 0, 0);
+
+ layout("Derby", 4, 'X', 0, 0);
+ layout("Caernarvon", 4, 'X', 0, 0);
+ layout("Essex", 3, 'X', 0, 0);
+ layout("Cumbria", 4, 'X', 0, 0);
+ layout("Glamorgan", 4, 'X', 0, 0);
+ layout("Pembroke", 4, 'X', 0, -1);
+
+ red("Scotland", "Cumbria");
+ red("Scotland", "Northumbria");
+ red("Cumbria", "Northumbria");
+ red("Cumbria", "North Yorks");
+ red("Cumbria", "Lancaster");
+ blue("Northumbria", "North Yorks");
+ blue("Northumbria", "East Yorks");
+
+ yellow("North Yorks", "East Yorks");
+ yellow("North Yorks", "South Yorks");
+ red("North Yorks", "Lancaster");
+ blue("East Yorks", "South Yorks");
+ red("Lancaster", "South Yorks");
+ blue("Lancaster", "Chester");
+ red("Lancaster", "Derby");
+ yellow("South Yorks", "Derby");
+ blue("South Yorks", "Lincoln");
+
+ blue("Caernarvon", "Chester");
+ red("Caernarvon", "Powys");
+ red("Caernarvon", "Pembroke");
+ yellow("Chester", "Powys");
+ yellow("Chester", "Derby");
+ blue("Chester", "Hereford");
+ yellow("Chester", "Warwick");
+ blue("Derby", "Warwick");
+ blue("Derby", "Leicester");
+ blue("Derby", "Lincoln");
+ yellow("Lincoln", "Leicester");
+ blue("Lincoln", "Rutland");
+
+ red("Pembroke", "Powys");
+ yellow("Pembroke", "Glamorgan");
+ red("Powys", "Hereford");
+ blue("Powys", "Glamorgan");
+ blue("Hereford", "Warwick");
+ blue("Hereford", "Gloucester");
+ blue("Hereford", "Glamorgan");
+ yellow("Warwick", "Leicester");
+ blue("Warwick", "Oxford");
+ blue("Warwick", "Gloucester");
+ yellow("Leicester", "Rutland");
+ blue("Leicester", "Essex");
+ yellow("Leicester", "Middlesex");
+ yellow("Leicester", "Oxford");
+ blue("Rutland", "East Anglia");
+ blue("Rutland", "Essex");
+ yellow("East Anglia", "Essex");
+
+ yellow("Gloucester", "Oxford");
+ blue("Gloucester", "Wilts");
+ yellow("Gloucester", "Somerset");
+ yellow("Oxford", "Middlesex");
+ blue("Oxford", "Wilts");
+ blue("Oxford", "Sussex");
+ blue("Middlesex", "Sussex");
+ blue("Middlesex", "Kent");
+ yellow("Middlesex", "Essex");
+
+ yellow("Cornwall", "Somerset");
+ yellow("Cornwall", "Dorset");
+ yellow("Somerset", "Wilts");
+ yellow("Somerset", "Dorset");
+ yellow("Wilts", "Dorset");
+ yellow("Wilts", "Sussex");
+ blue("Sussex", "Dorset");
+ yellow("Sussex", "Kent");
+
+ sea("Irish Sea", "Ireland", true);
+ sea("Irish Sea", "Isle of Man");
+ sea("Irish Sea", "Scotland", true);
+ sea("Irish Sea", "Cumbria");
+ sea("Irish Sea", "Lancaster");
+ sea("Irish Sea", "Chester", true);
+ sea("Irish Sea", "Caernarvon");
+ sea("Irish Sea", "Pembroke");
+ sea("Irish Sea", "Glamorgan", true);
+ sea("Irish Sea", "Somerset", true);
+ sea("Irish Sea", "Cornwall", true);
+
+ sea("North Sea", "Scotland", true);
+ sea("North Sea", "Northumbria", true);
+ sea("North Sea", "East Yorks", true);
+ sea("North Sea", "Lincoln");
+ sea("North Sea", "Rutland");
+ sea("North Sea", "East Anglia", true);
+ sea("North Sea", "Essex");
+ sea("North Sea", "Middlesex", true);
+ sea("North Sea", "Kent", true);
+
+ sea("English Channel", "Cornwall", true);
+ sea("English Channel", "Dorset");
+ sea("English Channel", "Sussex", true);
+ sea("English Channel", "Kent", true);
+
+ sea("English Channel", "Calais", true);
+ sea("North Sea", "Calais", true);
+
+ sea("English Channel", "France", true);
+ sea("Irish Sea", "France", true);
+
+ AREAS["Somerset"].city = "Bristol";
+ AREAS["Warwick"].city = "Coventry";
+ AREAS["Middlesex"].city = "London";
+ AREAS["Northumbria"].city = "Newcastle";
+ AREAS["East Anglia"].city = "Norwich";
+ AREAS["Wilts"].city = "Salisbury";
+ AREAS["South Yorks"].city = "York";
+
+ AREAS["Kent"].cathedral = "Canterbury";
+ AREAS["South Yorks"].cathedral = "York";
+
+ AREAS["Cumbria"].crown = true;
+ AREAS["South Yorks"].crown = true;
+ AREAS["Caernarvon"].crown = true;
+ AREAS["Chester"].crown = true;
+ AREAS["Derby"].crown = true;
+ AREAS["Pembroke"].crown = true;
+ AREAS["Warwick"].crown = true;
+ AREAS["Gloucester"].crown = true;
+ AREAS["Middlesex"].crown = true;
+ AREAS["Sussex"].crown = true;
+ AREAS["Cornwall"].crown = true;
+
+ function block(image, owner, type, name, steps, combat, loyalty, extra, extra2) {
+ let id = name;
+ let enemy = null;
+ if (name == "Bombard")
+ id = name + "/" + owner[0];
+ if (loyalty) {
+ id = name + "/" + owner[0];
+ if (owner == "York")
+ enemy = name + "/L";
+ else
+ enemy = name + "/Y";
+ }
+ if (id in BLOCKS)
+ throw new Error("Duplicate block: " + id);
+ BLOCKS[id] = {
+ type: type,
+ owner: owner,
+ name: name,
+ shield: name,
+ steps: steps,
+ combat: combat,
+ image: image,
+ };
+ if (loyalty)
+ BLOCKS[id].loyalty = loyalty;
+ if (enemy)
+ BLOCKS[id].enemy = enemy;
+ if (extra) {
+ if (type == 'heir') {
+ BLOCKS[id].heir = extra;
+ BLOCKS[id].shield = extra2;
+ }
+ if (type == 'church' || type == 'levies')
+ BLOCKS[id].home = extra;
+ if (type == 'nobles')
+ BLOCKS[id].shield = extra;
+ }
+ }
+
+ block(11, "York", "heir", "York", 4, "B3", 0, 1);
+ block(12, "York", "heir", "March", 3, "A3", 0, 2);
+ block(13, "York", "heir", "Rutland", 3, "B1", 0, 3);
+ block(14, "York", "heir", "Clarence", 3, "B2", 1, 4);
+ block(15, "York", "heir", "Gloucester", 3, "B3", 0, 5);
+
+ block(16, "York", "nobles", "Essex", 3, "B1", 0);
+ block(17, "York", "nobles", "Hastings", 3, "B2", 0);
+ block(21, "York", "nobles", "Herbert", 3, "A2", 0);
+ block(22, "York", "nobles", "Worcester", 2, "B2", 0);
+ block(23, "York", "nobles", "Suffolk", 3, "B2", 0);
+ block(24, "York", "nobles", "Norfolk", 4, "B2", 0);
+ block(25, "York", "nobles", "Buckingham", 4, "B2", 1);
+ block(26, "York", "nobles", "Exeter", 3, "A1", 1);
+ block(27, "York", "nobles", "Rivers", 2, "B2", 2);
+ block(31, "York", "nobles", "Northumberland", 4, "B3", 1);
+ block(32, "York", "nobles", "Shrewsbury", 3, "A1", 1);
+ block(33, "York", "nobles", "Stanley", 4, "B2", 1);
+ block(34, "York", "nobles", "Arundel", 3, "B2", 0);
+ block(35, "York", "nobles", "Warwick", 4, "B3", 3);
+ block(36, "York", "nobles", "Kent", 3, "A2", 2);
+ block(37, "York", "nobles", "Salisbury", 3, "B2", 2);
+ block(41, "York", "nobles", "Westmoreland", 3, "B2", 2);
+
+ block(51, "York", "mercenaries", "Irish Mercenary", 4, "B2", 0);
+ block(52, "York", "mercenaries", "Burgundian Mercenary", 3, "A3", 0);
+ block(53, "York", "mercenaries", "Calais Mercenary", 3, "B4", 0);
+ block(46, "York", "church", "Canterbury (church)", 3, "C1", 2, "Canterbury");
+ block(47, "York", "church", "York (church)", 3, "C2", 1, "York");
+ block(42, "York", "levies", "London (levy)", 4, "C3", 0, "London");
+ block(43, "York", "levies", "Norwich (levy)", 4, "C2", 0, "Norwich");
+ block(44, "York", "levies", "Salisbury (levy)", 4, "C2", 0, "Salisbury");
+ block(45, "York", "bombard", "Bombard", 3, "D3", 0);
+
+ block(91, "Lancaster", "heir", "Henry VI", 4, "B2", 0, 1);
+ block(92, "Lancaster", "heir", "Prince Edward", 3, "B1", 0, 2);
+ block(93, "Lancaster", "heir", "Exeter", 3, "A1", 2, 3, "Exeter");
+ block(94, "Lancaster", "heir", "Somerset", 3, "A2", 0, 4, "Somerset");
+ block(95, "Lancaster", "heir", "Richmond", 3, "B2", 0, 5, "Richmond");
+
+ block(67, "Lancaster", "nobles", "Westmoreland", 3, "B2", 2);
+ block(71, "Lancaster", "nobles", "Northumberland", 4, "B3", 2);
+ block(72, "Lancaster", "nobles", "Shrewsbury", 3, "A1", 2);
+ block(73, "Lancaster", "nobles", "Stanley", 4, "B2", 1);
+ block(75, "Lancaster", "nobles", "Warwick", 4, "B3", 3);
+ block(76, "Lancaster", "nobles", "Kent", 3, "A2", 2);
+ block(77, "Lancaster", "nobles", "Salisbury", 3, "B2", 2);
+ block(81, "Lancaster", "nobles", "Oxford", 3, "A2", 0);
+ block(82, "Lancaster", "nobles", "Pembroke", 3, "B2", 0);
+ block(83, "Lancaster", "nobles", "Devon", 2, "B2", 0);
+ block(84, "Lancaster", "nobles", "Beaumont", 3, "B2", 0);
+ block(85, "Lancaster", "nobles", "Buckingham", 4, "B2", 1);
+ block(86, "Lancaster", "nobles", "Clarence", 3, "B2", 1);
+ block(87, "Lancaster", "nobles", "Rivers", 2, "B2", 1);
+ block(96, "Lancaster", "nobles", "Clifford", 3, "A2", 0);
+ block(97, "Lancaster", "nobles", "Wiltshire", 3, "B2", 0);
+
+ block(55, "Lancaster", "mercenaries", "Scots Mercenary", 4, "B3");
+ block(56, "Lancaster", "mercenaries", "Welsh Mercenary", 3, "A2");
+ block(57, "Lancaster", "mercenaries", "French Mercenary", 4, "B3");
+ block(61, "Lancaster", "church", "Canterbury (church)", 3, "C1", 1, "Canterbury");
+ block(62, "Lancaster", "church", "York (church)", 3, "C2", 2, "York");
+ block(63, "Lancaster", "bombard", "Bombard", 3, "D3");
+ block(64, "Lancaster", "levies", "Coventry (levy)", 4, "C2", 0, "Coventry");
+ block(65, "Lancaster", "levies", "Bristol (levy)", 4, "C2", 0, "Bristol");
+ block(66, "Lancaster", "levies", "Newcastle (levy)", 4, "C3", 0, "Newcastle");
+ block(74, "Lancaster", "levies", "York (levy)", 4, "C3", 0, "York");
+
+ block(54, "Rebel", "rebel", "Rebel", 4, "A2");
+
+ function shields(area, list) {
+ AREAS[area].shields = list;
+ }
+
+ shields("Isle of Man", ["Stanley"]);
+ shields("Northumbria", ["Northumberland", "Westmoreland"]);
+ shields("Cumbria", ["Northumberland", "Clifford"]);
+ shields("North Yorks", ["Salisbury", "Clifford"]);
+ shields("East Yorks", ["Kent", "Salisbury", "Northumberland"]);
+ shields("South Yorks", ["York", "Shrewsbury"]);
+ shields("Lancaster", ["Lancaster", "Stanley"]);
+ shields("Caernarvon", ["Norfolk"]);
+ shields("Lincoln", ["Lancaster", "Beaumont"]);
+ shields("Pembroke", ["Richmond", "Pembroke"]);
+ shields("Hereford", ["York"]);
+ shields("Warwick", ["Buckingham", "Warwick"]);
+ shields("Leicester", ["Hastings", "Rivers"]);
+ shields("Rutland", ["York", "Worcester"]);
+ shields("East Anglia", ["Norfolk", "Suffolk"]);
+ shields("Glamorgan", ["Buckingham", "Norfolk", "Herbert", "Warwick"]);
+ shields("Oxford", ["Suffolk"]);
+ shields("Essex", ["Oxford", "Essex"]);
+ shields("Wilts", ["Wiltshire"]);
+ shields("Sussex", ["Arundel"]);
+ shields("Kent", ["Buckingham"]);
+ shields("Cornwall", ["Devon", "Exeter"]);
+ shields("Dorset", ["Somerset"]);
+ shields("Calais", ["Warwick"]);
+
+})();
+
+if (typeof module != 'undefined')
+ module.exports = { CARDS, BLOCKS, AREAS, BORDERS }
diff --git a/icons/README b/icons/README
new file mode 100644
index 0000000..b2b38e8
--- /dev/null
+++ b/icons/README
@@ -0,0 +1,2 @@
+https://commons.wikimedia.org/wiki/File:White_Rose_Badge_of_York.svg
+https://commons.wikimedia.org/wiki/File:Red_Rose_Badge_of_Lancaster.svg
diff --git a/icons/Red_Rose_Badge_of_Lancaster.png b/icons/Red_Rose_Badge_of_Lancaster.png
new file mode 100644
index 0000000..ad4e7c7
--- /dev/null
+++ b/icons/Red_Rose_Badge_of_Lancaster.png
Binary files differ
diff --git a/icons/Red_Rose_Badge_of_Lancaster.svg b/icons/Red_Rose_Badge_of_Lancaster.svg
new file mode 100644
index 0000000..4640e59
--- /dev/null
+++ b/icons/Red_Rose_Badge_of_Lancaster.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250"><g stroke-width="1.1"><path d="M125 93.5C105 80 99 45.6 105.8 17.2c4.5.4 6.1 1.7 8.2 4.4-.7-6.5 3.3-8.5 11-16.3 7.7 7.8 11.7 9.8 11 16.3 2-2.7 3.7-4 8.2-4.4 6.9 28.4.8 62.8-19.2 76.3z" fill="#529423" stroke="#2d5016" stroke-width="1.5338180000000001"/><path d="M125 88.5c-15.7-12.3-21.1-41.9-16.1-66.8 4.6 1 4.5 3.9 7.5 7.2-.2-12.7 2.6-8.2 8.6-19.2 5.1 8.2 8.7 4.9 8.8 19.5 2.6-3.7 3.5-6.4 7.4-7.4 5 24.9-.5 54.4-16.2 66.7z" fill="#4b8820"/><path d="M125 83.8c-11.8-11-16.6-36-13.4-57 2.2 2.1 0 6.6 6.9 7.9-.2-5.3 1.8-13.6 6.5-18 3.3 3.8 7.7 9.3 5.6 18 6.4-.1 5.7-5.8 7.8-8 3.2 21-1.6 46-13.4 57z" fill="#447821"/><path d="M125 88.1s-1-5.5-1-8.3c-.1-19.6-.7-39 0-57.2 0-4.7 1-14 1-14s1 9.3 1 14c-.3 19.6 1 39 0 57.2-.2 2.8-1 8.3-1 8.3z" style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" color="#000" font-weight="400" font-family="Sans" overflow="visible" fill="#2d5016"/><g><path d="M149.5 168.9c24.1-.9 49.2 23.4 60.4 50.4-4 2.3-6 2.2-9.3 1.2 4.4 4.9 2.3 8.9.7 19.7-10.8-1.8-15.2-1-18.4-6.8-.2 3.5-.7 5.5-4.1 8.5-22.3-19-37.6-50.4-29.3-73z" fill="#529423" stroke="#2d5016" stroke-width="1.5338180000000001"/><path d="M152.4 172.9c20 .7 41.7 21.4 52.3 44.5-4.3 2-5.9-.4-10.3-1.4 7.6 10.2 2.8 8.2 4.4 20.7-9-3.7-10 1-18.6-10.7 0 4.6.8 7.3-1.7 10.3-18.6-17.2-31.5-44.3-26-63.4z" fill="#4b8820"/><path d="M155.2 176.7c16 2 34.6 19.4 44.4 38.3-3-.6-4-5.4-10.3-2.4 3.2 4.2 6.5 12 5.3 18.3-4.9-1.1-11.7-3-15-11.2-5.2 3.8-1.3 8-1.7 11-15-15.1-25.8-38.2-22.7-54z" fill="#447821"/><path style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" d="M152.7 173.1s4 4 5.7 6.2c11.6 15.8 23.4 31.1 33.6 46.2 2.6 4 7.4 12 7.4 12s-6.4-7-9-10.7c-11.4-16-23.8-31-33.7-46.3-1.5-2.3-4-7.4-4-7.4z" color="#000" font-weight="400" font-family="Sans" overflow="visible" fill="#2d5016"/><g><path d="M100.5 168.9c8.3 22.6-7 54-29.3 73-3.4-3-4-5-4-8.5-3.3 5.7-7.7 5-18.5 6.8-1.6-10.8-3.7-14.8.7-19.7-3.3 1-5.4 1.1-9.3-1.2 11.2-27 36.3-51.3 60.4-50.4z" fill="#529423" stroke="#2d5016" stroke-width="1.5338180000000001"/><path d="M97.6 172.9C103 192 90 219 71.4 236.4c-3.3-3.5-1.4-5.8-1.8-10.3-7.4 10.4-7 5.2-18.4 10.6.7-9.8-4-9.1 4.4-21-4.3 1.5-6.6 3-10.3 1.6 10.6-23 32.4-43.7 52.3-44.4z" fill="#4b8820"/><path d="M94.8 176.7c3.1 15.8-7.8 38.9-22.7 54-.4-3 4-5.4-.8-10.4-3 4.3-9.6 9.9-16 10.6-.3-5-.6-12 6.1-17.8-5.2-3.7-8 1.3-11 1.9 9.8-19 28.4-36.4 44.4-38.3z" fill="#447821"/><path d="M97.4 173.2s-2.4 5.1-4 7.4c-11.6 15.9-22.4 31.9-33.7 46.2-2.8 3.7-9 10.7-9 10.7s4.5-8.2 7.3-11.9c11.8-15.7 22.1-32.2 33.6-46.3 1.8-2.1 5.8-6.1 5.8-6.1z" style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" color="#000" font-weight="400" font-family="Sans" overflow="visible" fill="#2d5016"/></g></g><g><path d="M164.6 122.3c6.7-23.2 37.5-39.6 66.7-41.9 1 4.4.2 6.4-1.7 9.2 6-2.7 9 .5 18.9 5.4-5 9.7-5.7 14.2-12.1 15.5 3.2 1.2 5 2.3 6.7 6.5-24.9 15.3-59.4 20.1-78.5 5.3z" fill="#529423" stroke="#2d5016" stroke-width="1.5338180000000001"/><path d="M169.4 120.7c6.8-18.7 33.2-33 58.5-36 .6 4.8-2.3 5.5-4.6 9.4 12.1-4 8.7 0 21 2.3-6.2 7.4-2 9.7-15.8 14.3 4.3 1.4 7.1 1.5 9.3 4.8-22.1 12.4-51.9 16.3-68.4 5.2z" fill="#4b8820"/><path d="M173.8 119.3c6.8-14.7 29.2-27 50.2-30.4-1.5 2.7-6.4 2-5.5 9 5-1.8 13.6-2.5 19.1.6-2.6 4.3-6.5 10.2-15.3 11 2 6 7.2 3.6 10 4.9-19 9.5-44.3 12.7-58.5 4.9z" fill="#447821"/><path d="M169.7 120.6s5-2.7 7.6-3.6c18.7-6.1 36.9-12.7 54.4-17.7 4.5-1.3 13.6-3.3 13.6-3.3s-8.5 4-13 5.3c-18.7 5.8-36.7 13-54.3 17.7-2.7.7-8.3 1.6-8.3 1.6z" style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" color="#000" font-weight="400" font-family="Sans" overflow="visible" fill="#2d5016"/><g><path d="M85.4 122.3c-19 14.8-53.6 10-78.5-5.3 1.8-4.2 3.5-5.3 6.7-6.5-6.4-1.3-7-5.8-12-15.5 9.7-4.9 12.9-8.1 18.8-5.4-1.9-2.8-2.7-4.8-1.7-9.2 29.2 2.3 60 18.7 66.7 41.9z" fill="#529423" stroke="#2d5016" stroke-width="1.5338180000000001"/><path d="M80.6 120.7c-16.5 11.1-46.3 7.2-68.4-5.3 2.3-4.1 5-3 9.1-4.9-12.2-3.8-7-5-15.6-14.1C15 94 13 89.6 26.9 94c-2.7-3.6-5-5.3-4.7-9.3 25.2 3 51.6 17.3 58.4 36z" fill="#4b8820"/><path d="M76.2 119.3c-14.1 7.8-39.4 4.6-58.5-5 2.8-1.3 6.4 2.2 9.7-4-5-1.5-12.3-6-15-11.8 4.6-1.9 11.2-4.4 18.8.3 1.9-6.1-3.7-7.2-5.2-10 21 3.6 43.4 15.8 50.2 30.5z" fill="#447821"/><path style="line-height:normal;-inkscape-font-specification:Sans;text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" d="M80.3 120.7s-5.6-.8-8.3-1.6c-18.7-6-37.2-11.5-54.4-17.7-4.3-1.6-13-5.3-13-5.3s9.3 1.8 13.7 3.3c18.5 6.3 37.4 11 54.3 17.7 2.7 1 7.7 3.6 7.7 3.6z" color="#000" font-weight="400" font-family="Sans" overflow="visible" fill="#2d5016"/></g></g></g><g stroke="#000"><path d="M-70.6-842.1c11.5-7.9 5-25.4.7-38.5-4.2-13-9.2-31-23.2-30.6-14.3.4-7.8 21-21.2 19.8-5.2-12.4 16.4-12.6 12.3-26.3-4-13.4-22.6-12.6-36.3-12.6-13.8 0-32.4-.8-36.4 12.6-4 13.7 17.6 14 12.4 26.3-13.4 1.1-7-19.4-21.3-19.8-14-.4-19 17.5-23.2 30.6-4.2 13.1-10.8 30.6.8 38.5 11.8 8.1 18.7-12.4 28.8-3.6-3 13-20.6.5-25.4 14-4.7 13.2 10.8 23.5 22 31.6 11.1 8.1 25.7 19.7 36.8 11.2 11.3-8.8-6-21.6 5.5-28.6 11.5 7-5.9 19.8 5.5 28.6 11 8.5 25.7-3.1 36.8-11.2 11.1-8 26.7-18.4 22-31.5-4.8-13.6-22.4-1-25.5-14.1 10.2-8.8 17 11.7 28.9 3.6z" fill="#ea5858" stroke="maroon" transform="matrix(-1.46737 0 0 -1.50797 -78 -1158.2)"/><path d="M125 239.4c10.2 0 21.8.2 31-1.8s15.2-5.5 17.5-13.5c1-4 .5-5.7-.8-8-1.4-2.1-4-4.5-7.2-7-3-2.4-6.7-5-9.2-9.2a18 18 0 01-.8-16 5.1 5.3 0 014.3-3.2c6.2-.5 11.5 2 14.5 5.7 3 3.8 4.5 8 5.8 11.9a34 34 0 004.3 9.1c1.6 2 3.1 3.1 7.1 3.3 8 .2 13.1-4.6 17.9-13 4.7-8.3 8-19.7 11.2-29.6 3.1-10 7-21.3 8-31 .9-9.5-.5-16.4-7.1-21.1-3.4-2.4-5.2-2.4-7.7-1.7-2.4.6-5.4 2.5-8.7 4.8-3.2 2.2-6.8 4.9-11.4 6-4.6 1.2-10.4.1-15-4a5.1 5.3 0 01-1.7-5.3 17.4 17.4 0 019.8-12.4c4.5-1.8 8.8-1.8 12.7-2 4 0 7.5-.3 9.8-1.3 2.4-.9 3.9-2 5.2-6 2.7-7.7-.1-14.2-6.4-21.4-6.3-7.2-15.8-14-24-20.2-8.3-6.1-17.6-13.3-26.1-17.2-8.6-4-15.4-4.8-21.8.3-3.2 2.5-3.8 4.4-4 7-.1 2.6.7 6 1.8 10 1.1 3.8 2.5 8.1 2.1 13a17.6 17.6 0 01-8.5 13.4 5.1 5.3 0 01-5.3 0 17.6 17.6 0 01-8.5-13.4c-.3-4.9 1.1-9.2 2.2-13 1-4 2-7.4 1.8-10-.2-2.6-.8-4.5-4-7-6.3-5-13.1-4.3-21.7-.3-8.6 3.9-17.9 11-26.1 17.2-8.3 6.2-17.8 13-24.1 20.2-6.3 7.2-9.2 13.7-6.5 21.5 1.4 3.9 2.9 5 5.3 6 2.3.9 5.8 1.1 9.7 1.3 4 .1 8.4.1 12.8 2 4.4 1.8 8.4 6.1 9.8 12.3a5.1 5.3 0 01-1.6 5.3 16.7 16.7 0 01-15 4c-4.7-1.1-8.3-3.8-11.5-6a32.3 32.3 0 00-8.7-4.8c-2.4-.7-4.3-.7-7.6 1.7-6.7 4.7-8 11.6-7.1 21.2 1 9.6 4.8 20.9 8 30.9 3 10 6.4 21.3 11.2 29.7 4.7 8.3 9.7 13 17.8 12.9 4-.2 5.5-1.3 7.1-3.3 1.7-2 3-5.3 4.3-9.1 1.4-3.8 2.7-8.1 5.7-11.9 3.1-3.7 8.4-6.2 14.6-5.7a5.1 5.3 0 014.3 3.2 18 18 0 01-.8 16c-2.5 4.1-6.1 6.8-9.2 9.2a33.2 33.2 0 00-7.2 7c-1.3 2.3-1.9 4-.7 8 2.2 8 8.2 11.5 17.4 13.5s20.8 1.8 31 1.8z" fill="#e94d4d" stroke="none"/><path style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" d="M155.3 237.4h2.1c5-.4 9-2.5 13-5.4a20 20 0 004.5-5.5c-3.5.3-6 7.3-17.6 7.7-5 .3-10.1-.3-15.4-2.7a40.1 40.1 0 00-16.6-3.3c-5.7 0-11.3 1-16.6 3.3-5.3 2.4-10.3 3-15.4 2.7-11.7-.4-14-7.4-17.5-7.7 0 0 1.8 3.5 4.5 5.5 3.9 3 7.9 5 12.9 5.3a30 30 0 0015.5-3.1 44.6 44.6 0 0116.6-3.9c5 0 11.3 1.5 16.6 3.9 4.7 2 8.5 3.2 13.4 3.2zm-98.6-24.6c-1.3-3.3-8.5-3.5-12.5-14.8-1.8-4.9-2.8-10-2.3-16 .6-5.8-.3-11.5-2-17.1a42.7 42.7 0 00-8.2-15.2 35.4 35.4 0 01-7.3-14.2c-3.1-11.6 2.5-16 1.7-19.6 0 0-2.7 3-3.7 6.1a25.4 25.4 0 00-.9 14.3c1.5 6 3.9 9.7 7.7 14.2a46.9 46.9 0 018.7 15 48 48 0 011.6 17.5c-.6 5.9-.3 10.4 1.9 16.1 1.8 4.7 5 8 8.8 11 2.7 2 6.5 2.7 6.5 2.7zm136.8-.6s3.8-.8 6.4-2.7c4-3 7-6.2 9-11a32.6 32.6 0 001.8-16.2c-.5-5.9 0-12.6 1.6-17.4a46.9 46.9 0 018.7-15 32 32 0 007.7-14.3c1.2-5 .6-9.5-1-14.2-1-3.2-3.6-6.1-3.6-6.1-.8 3.5 4.8 8 1.7 19.6-1.4 5-3.5 9.8-7.3 14.2a42.7 42.7 0 00-8.2 15.2 43.2 43.2 0 00-2 17.2c.5 5.9-.5 11-2.3 15.9-4 11.3-11.2 11.5-12.5 14.8zM33 93.2c2.6-2.5.6-9.5 9.8-17 4-3.2 8.4-5.8 14-7A40.6 40.6 0 0072 61.7c4.6-3.4 8.5-7.6 11.5-12.7 3-5 6.7-8.6 11-11.5 9.7-6.7 15.5-2.6 18.5-4.4 0 0-3.5-1.7-6.8-1.7-4.8 0-9.2.8-13.4 3.5-5 3.3-7.9 6.8-10.8 12-3 5-7.3 10.1-11.2 13-4 3-10 5.7-15.7 7-5.6 1.3-9.7 3-14.3 6.9-3.8 3.2-6 7.3-7.4 12A20 20 0 0033 93zm183.6-.4s.5-4-.5-7.3a24.8 24.8 0 00-7.5-12c-4.6-4-8.7-5.6-14.3-7-5.7-1.2-11.7-3.8-15.7-6.8s-8.2-8-11.2-13.2c-3-5.1-5.7-8.6-10.8-11.8a23.4 23.4 0 00-13.4-3.6c-3.3 0-6.8 1.7-6.8 1.7 3 1.9 8.9-2.2 18.6 4.4 4.2 3 8 6.4 11 11.5 2.9 5.1 6.8 9.2 11.4 12.7 4.7 3.5 9.7 6 15.3 7.3 5.7 1.3 10 4 14 7.2 9.2 7.4 7.2 14.5 9.9 16.9z" color="#000" font-weight="400" font-family="Bitstream Vera Sans" overflow="visible" fill="#faa" stroke="none"/><g stroke="none"><path d="M138.6 78.2c6.5-12.3-1.5-36.8-1.5-36.8 14.4 0 15 6.6 18.3 17 1.8 5.6 1.8 13.5 10.5 19.4 8 6.7 15.4 4.2 21 4.2 10.7 0 17-1.5 21.5 12.6 0 0-25-.2-34.5 10-7.8 8.3-8.1 17.6-8.1 17.6s6 7.3 17 9.3c13.4 2.5 33.6-12.8 33.6-12.8 4.4 14.1-1.5 16.7-10.2 23.2-4.5 3.4-11.9 5.8-14.6 16.1-3.7 10 .9 16.4 2.6 22 3.3 10.4 6.6 16-5 24.8 0 0-7.6-24.6-19.9-30.7-10.1-5-18.8-2.4-18.8-2.4s-5 8-3.4 19.5C149 205 169.3 220 169.3 220c-11.6 8.7-15.9 3.8-24.5-2.7-4.6-3.4-9.1-9.8-19.5-9.3-10.4-.5-14.9 5.9-19.5 9.3-8.6 6.5-12.9 11.4-24.5 2.7 0 0 20.4-15 22.2-28.8A30 30 0 00100 172s-9-2.3-19.1 2.7C68.6 180.8 61 205.4 61 205.4c-11.6-8.7-8.3-14.4-5-24.9 1.7-5.5 6.3-11.9 2.6-21.9-2.7-10.3-10-12.7-14.6-16.1-8.7-6.5-14.6-9.1-10.2-23.2 0 0 20.2 15.3 33.6 12.8 11-2 16.7-9.4 16.7-9.4s-.7-9.4-8.5-17.8c-9.4-10.1-34.5-10-34.5-10C45.6 81 52 82.5 62.6 82.5c5.6 0 13 2.4 21-4.3 8.7-5.8 8.7-13.7 10.5-19.2 3.3-10.5 3.9-17 18.3-17.1 0 0-8 24.4-1.5 36.8A28.8 28.8 0 00124.8 92s8.5-3.6 13.8-13.8z" fill="#e43636"/><path d="M158.6 220.2c.8 0 1.9-.2 3.2-.7-1.9-1.6-3.8-3.3-6-5.6-5.6-5.7-11.9-13.2-13-22.1-1.8-13 4-22.5 4-22.5a4.4 4.5 0 012.4-2s10.5-3 22 2.8c8 3.9 13 12.3 16.6 19.6 1.3 2.8 2.2 5.1 3.1 7.3 1.3-1.6 2-3 2-4.3.2-2.3-1.1-6-2.8-11.4-1.4-4.2-6.8-13-2.7-24.5v-.2l.1-.2c3.3-11.7 12.6-15.6 16.2-18.2 4.5-3.3 7.6-5.5 8.8-7.5.7-1 1-2.6.8-4.7-2 1.3-4 2.7-6.7 4-7 3.8-16 7.6-24.6 6a35.2 35.2 0 01-19.5-10.9 4.4 4.5 0 01-1-3s.3-11.1 9.2-20.6c6-6.5 15.5-8.8 23.3-10.1 3-.5 5.4-.7 7.7-.9-1-1.7-2-2.8-3.3-3.3-2.1-.8-6-.7-11.5-.7-4.3 0-14 2.5-23.4-5l-.4-.3c-9.8-6.8-10.5-17-11.8-21.3-1.7-5.5-2.8-9.2-4.2-11-.8-1-2.2-1.8-4-2.3a92 92 0 011.5 7.9c1.2 8 2 18-2.1 25.9a36 36 0 01-16 15.7 4.4 4.5 0 01-3.3.1s-10-3.9-16.1-15.5c-4.2-8-3.4-17.8-2.2-25.8.5-3.1 1-5.6 1.6-8-2 .6-3.3 1.3-4 2.4-1.5 1.7-2.5 5.5-4.2 11-1.4 4.2-2 14.5-12 21.3v.1l-.3.2c-9.4 7.5-19 5-23.4 5-5.6 0-9.4-.1-11.5.7-1.2.5-2.3 1.5-3.3 3.3 2.3.1 4.7.3 7.7.8 7.9 1.3 17.2 3.6 23.3 10 8.8 9.6 9.6 20.7 9.6 20.7a4.4 4.5 0 01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 2.8 4.4 2.8 4.4zm163.4-.4s2-2 2.8-4.3c2.3-7-1.6-11.9-8.1-14.2a30.4 30.4 0 00-13.7-.9c-4.4.5-9.3 1.7-13.5.8-2.6-.5-5.7-2.4-7.6-3.8a22 22 0 01-5.9-6.2c-2-4-2.4-9-3.4-13.5s-2-9-5-13c-4.2-5.7-10-8-15.7-3.7-1.9 1.5-3.1 4.2-3.1 4.2l6.8-2c2.3-.6 6.9 2.2 8.5 4.4 2.6 3.5 4.6 6.5 5.6 11 1 4.4 1.9 9.1 4.2 13.5 1.6 3 4.5 5.5 6.7 7.1 2.2 1.6 5.4 3.7 8.7 4.4 4.8 1 9.4.3 13.8-.1s7.9.7 12 2.1c2.5 1 6.5 4.5 6.6 7l.3 7.2z" style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" color="#000" font-weight="400" font-family="Bitstream Vera Sans" overflow="visible" stroke="none" fill="maroon" stroke-width=".5"/></g><g stroke="#000" stroke-width="1.9"><path d="M-70.6-842.1c11.5-7.9 5-25.4.7-38.5-4.2-13-9.2-31-23.2-30.6-14.3.4-7.8 21-21.2 19.8-5.2-12.4 16.4-12.6 12.3-26.3-4-13.4-22.6-12.6-36.3-12.6-13.8 0-32.4-.8-36.4 12.6-4 13.7 17.6 14 12.4 26.3-13.4 1.1-7-19.4-21.3-19.8-14-.4-19 17.5-23.2 30.6-4.2 13.1-10.8 30.6.8 38.5 11.8 8.1 18.7-12.4 28.8-3.6-3 13-20.6.5-25.4 14-4.7 13.2 10.8 23.5 22 31.6 11.1 8.1 25.7 19.7 36.8 11.2 11.3-8.8-6-21.6 5.5-28.6 11.5 7-5.9 19.8 5.5 28.6 11 8.5 25.7-3.1 36.8-11.2 11.1-8 26.7-18.4 22-31.5-4.8-13.6-22.4-1-25.5-14.1 10.2-8.8 17 11.7 28.9 3.6z" fill="#ea5858" stroke="maroon" transform="matrix(-.7826 0 0 .80425 16.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s-1.4-6.1-1-9.3c.2-3.1-.4-5.9-1.3-8.5-2.2-6-6-6-6.7-7.8zm-85.7 63.5c1.4 1.2.4 5 5.2 9a18 18 0 007.5 3.8c3 .7 5.7 2 8.2 3.9 2.5 1.8 4.5 4 6.1 6.7 1.6 2.7 3.6 4.6 5.9 6.2 5.1 3.5 8.3 1.3 9.9 2.3 0 0-2 .9-3.7 1-2.5 0-4.9-.5-7.1-2a16.8 16.8 0 01-5.8-6.3 24.6 24.6 0 00-6-7 24 24 0 00-8.3-3.7c-3-.7-5.2-1.6-7.7-3.7-2-1.7-3.1-3.9-4-6.4-.5-1.7-.2-3.8-.2-3.8zm98 .2s.2 2.1-.3 3.8c-.8 2.5-2 4.7-4 6.4-2.5 2.1-4.6 3-7.6 3.7-3 .7-6.3 2.1-8.4 3.7a24.7 24.7 0 00-6 7c-1.5 2.8-3 4.6-5.7 6.3a12.5 12.5 0 01-7.2 2 10 10 0 01-3.6-1c1.6-1 4.7 1.2 9.9-2.3 2.2-1.6 4.3-3.4 5.8-6.2 1.6-2.7 3.7-4.9 6.2-6.7 2.4-1.9 5.1-3.2 8.1-4 3-.6 5.4-2 7.5-3.7 4.9-4 3.8-7.8 5.2-9z" style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" color="#000" font-weight="400" font-family="Bitstream Vera Sans" overflow="visible" fill="#faa" stroke="none"/><g stroke="none"><path d="M132.3 166.5c3.4 6.6-.8 19.6-.8 19.6 7.7 0 8-3.5 9.7-9 1-3 1-7.2 5.6-10.3 4.3-3.6 8.2-2.3 11.2-2.3 5.7 0 9 .8 11.5-6.7 0 0-13.4 0-18.4-5.3a16 16 0 01-4.3-9.5s3.1-3.8 9-5c7.2-1.2 18 7 18 7 2.3-7.6-.8-9-5.5-12.4-2.4-1.9-6.3-3.2-7.8-8.7-2-5.3.5-8.7 1.4-11.6 1.8-5.6 3.5-8.6-2.7-13.3 0 0-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3 11.4-.9 2.9-1.5 5-2.2 5.9-.5.5-1.2.9-2.2 1.2l.9-4.2c.6-4.3 1-9.6-1.2-13.8-3.2-6.2-8.5-8.4-8.5-8.4a2.3 2.4 0 00-1.7-.1s-5.4 2-8.7 8.3c-2.2 4.2-1.8 9.5-1.1 13.8.2 1.6.5 3 .8 4.2-1-.3-1.7-.7-2.1-1.2-.8-1-1.4-3-2.3-5.9-.7-2.3-1-7.8-6.3-11.4l-.2-.2c-5-4-10.2-2.6-12.5-2.6-3 0-5 0-6.1-.4-.6-.3-1.2-.8-1.8-1.7 1.3-.1 2.6-.2 4.1-.5 4.2-.7 9.2-1.9 12.5-5.4 4.7-5 5.1-11 5.1-11a2.3 2.4 0 00-.5-1.6s-3.6-4.7-10.3-6c-4.6-.8-9.3 1.3-13.1 3.2l-3.6 2.2c0-1.1 0-2 .4-2.5.7-1 2.4-2.2 4.8-4 1.8-1.4 6.8-3.5 8.5-9.7l.1-.2c2.2-6.2-.7-10.8-1.4-13.1-.9-2.9-1.6-4.9-1.5-6.1 0-.7.4-1.4 1-2.3l1.7 4c2 3.8 4.6 8.3 8.8 10.4 6.2 3 11.8 1.7 11.8 1.7a2.3 2.4 0 001.4-1s3.2-5 2.3-12c-.7-4.7-4-8.7-7-11.8-1.1-1.2-2.2-2-3.1-2.8 1-.5 1.8-.6 2.4-.4 1.2.3 2.8 1.6 5.2 3.4 1.9 1.4 5.3 5.6 11.6 5.4h.3c6.3.2 9.7-4 11.6-5.4 1.5-1.1 2.7-2.1 3.7-2.7 1-.6 1.6-.8 2.3-.8z" fill="#d90707"/></g><path style="line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;block-progression:tb;marker:none" d="M144 86.8c2.3 0 4.3 1.2 5.2 4 .4 1.2.1 2.8.1 2.8l-2.4-3c-.8-1.1-3.6-1.4-5-1-2.1.8-4 1.4-5.7 3-1.8 1.6-3.6 3.4-6 4.5a12 12 0 01-5 .9 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2-4.5-1.7-5.3-4.5-5.1-7.6-3.2-3-3.8-6.1-1.9-9.3-2-3.7-2.2-7 1.9-9.4 0-4.5 1.8-6.9 5.1-7.6 1.3-2.7 1.8-5.8 7.6-5 2-2 4-4.1 9.2-2z" fill="#e6e6e6" stroke="#999" stroke-width="1.46624"/><path d="M128.5 117.5c4-1.1 5.6.6 6.8 2.9 2.4.6 4.9.7 5 5 3.2 1.5 4.2 3.7 2.8 6.6 2 2.1 2.5 4.5 0 7.4 1 4.5-1.3 5.8-2.9 6.9 0 2.7-1.2 4.7-5 5-1.7 3.5-4.1 3.3-6.6 2.8-2 1.6-4.4 2-7.4 0-3.3.8-5.4-.4-6.8-2.8-3.4 0-4.6-2.3-5-5.1-3.2-2-3.4-4.2-2.7-6.6-2-2.8-2-5.3 0-7.4-1-3.2-.6-5.8 2.8-6.9.7-3.5 2.5-5 5.1-5 1.4-1.9 2.2-4.2 6.6-2.7 1.9-1.3 3.6-2.5 7.3 0z" fill="#f2f2f2"/><path d="M127.6 122.3c2.9-.9 4.2.4 5 2 1.8.5 3.6.6 3.7 3.8 2.4 1.1 3.2 2.8 2 4.9 1.7 1.5 2 3.3 0 5.5.9 3.3-.8 4.3-2 5 0 2-1 3.6-3.8 3.8-1.2 2.6-3 2.4-4.8 2-1.6 1.2-3.3 1.6-5.5 0-2.4.7-4-.2-5-2-2.6 0-3.4-1.7-3.7-3.8-2.4-1.5-2.6-3.1-2-4.9-1.5-2-1.5-3.9 0-5.5-.7-2.3-.5-4.2 2-5 .5-2.6 1.9-3.8 3.8-3.8 1-1.4 1.6-3 4.9-2 1.4-1 2.7-1.9 5.4 0z" fill="#fff"/></svg> \ No newline at end of file
diff --git a/icons/White_Rose_Badge_of_York.png b/icons/White_Rose_Badge_of_York.png
new file mode 100644
index 0000000..82ee615
--- /dev/null
+++ b/icons/White_Rose_Badge_of_York.png
Binary files differ
diff --git a/icons/White_Rose_Badge_of_York.svg b/icons/White_Rose_Badge_of_York.svg
new file mode 100644
index 0000000..80f44f7
--- /dev/null
+++ b/icons/White_Rose_Badge_of_York.svg
@@ -0,0 +1 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 200 200" xml:space="preserve"><style>.st0{fill:#529423}.st1{fill:none;stroke:#2d5016;stroke-width:1.2}.st2{fill:#4b8820}.st3{fill:#447821}.st4{fill:#2d5016}.st5{fill:#fff}.st6{fill:none;stroke:#999;stroke-width:1.2}.st7{fill:#f9f9f9}.st8{fill:#f2f2f2}.st9{fill:#e6e6e6}.st10{fill:#b9b9b9}</style><path class="st0" d="M100 125.2c16 10.8 20.8 38.3 15.4 61-3.6-.3-4.9-1.4-6.6-3.6.6 5.2-2.6 6.8-8.8 13-6.1-6.2-9.4-7.8-8.8-13-1.7 2.2-3 3.2-6.6 3.6-5.4-22.7-.6-50.2 15.4-61z"/><path class="st1" d="M100 125.2c16 10.8 20.8 38.3 15.4 61-3.6-.3-4.9-1.4-6.6-3.6.6 5.2-2.6 6.8-8.8 13-6.1-6.2-9.4-7.8-8.8-13-1.7 2.2-3 3.2-6.6 3.6-5.4-22.7-.6-50.2 15.4-61z"/><path class="st2" d="M100 129.2c12.5 9.8 16.9 33.5 12.9 53.4-3.7-.7-3.6-3.1-6-5.8.1 10.2-2.1 6.6-6.9 15.4-4.1-6.6-6.9-3.9-7-15.6-2.1 3-2.8 5.1-5.9 5.9-4-19.8.4-43.4 12.9-53.3z"/><path class="st3" d="M100 133c9.4 8.8 13.2 28.8 10.7 45.7-1.7-1.8 0-5.4-5.5-6.4.1 4.2-1.5 10.9-5.2 14.4-2.6-3.1-6.1-7.4-4.5-14.4-5.1.1-4.6 4.6-6.3 6.4-2.5-16.9 1.3-36.9 10.8-45.7z"/><path class="st4" d="M100 129.5s.8 4.4.8 6.7c0 15.7.5 31.2 0 45.7-.1 3.7-.8 11.2-.8 11.2s-.9-7.4-.8-11.2c.2-15.7-.8-31.2 0-45.7.1-2.3.8-6.7.8-6.7z"/><path class="st0" d="M80.4 64.9c-19.3.7-39.4-18.7-48.3-40.3 3.1-1.9 4.8-1.8 7.4-1-3.5-3.9-1.8-7.1-.5-15.7 8.6 1.4 12.2.8 14.7 5.4.1-2.8.5-4.4 3.3-6.8 17.8 15.2 30 40.3 23.4 58.4z"/><path class="st1" d="M80.4 64.9c-19.3.7-39.4-18.7-48.3-40.3 3.1-1.9 4.8-1.8 7.4-1-3.5-3.9-1.8-7.1-.5-15.7 8.6 1.4 12.2.8 14.7 5.4.1-2.8.5-4.4 3.3-6.8 17.8 15.2 30 40.3 23.4 58.4z"/><path class="st2" d="M78.1 61.7c-15.9-.6-33.3-17.2-41.8-35.6 3.4-1.6 4.7.4 8.2 1.1-6.1-8.2-2.2-6.6-3.5-16.5 7.2 2.9 7.9-.9 14.8 8.5 0-3.6-.7-5.8 1.3-8.2 15 13.7 25.3 35.4 21 50.7z"/><path class="st3" d="M75.8 58.6C63 57.1 48.2 43.1 40.4 28c2.4.4 3.1 4.4 8.2 1.9-2.6-3.4-5.2-9.7-4.2-14.7 3.9.9 9.3 2.4 12.1 9 4.1-3.1 1-6.4 1.3-8.8 11.8 12.1 20.5 30.6 18 43.2z"/><path class="st4" d="M77.9 61.5s-3.3-3.1-4.6-4.9c-9.2-12.7-18.7-24.9-26.9-37-2.1-3.1-5.9-9.5-5.9-9.5s5.1 5.5 7.2 8.5c9 12.8 19 24.8 26.9 37 1.2 1.9 3.3 5.9 3.3 5.9z"/><path class="st0" d="M119.6 64.9C113 46.8 125.2 21.7 143 6.5c2.7 2.4 3.2 4 3.3 6.8 2.6-4.6 6.1-4 14.7-5.4 1.3 8.6 3 11.8-.6 15.7 2.7-.7 4.3-.8 7.4 1-8.8 21.6-28.9 41-48.2 40.3z"/><path class="st1" d="M119.6 64.9C113 46.8 125.2 21.7 143 6.5c2.7 2.4 3.2 4 3.3 6.8 2.6-4.6 6.1-4 14.7-5.4 1.3 8.6 3 11.8-.6 15.7 2.7-.7 4.3-.8 7.4 1-8.8 21.6-28.9 41-48.2 40.3z"/><path class="st2" d="M121.9 61.7c-4.4-15.3 6-37 20.9-50.8 2.6 2.8 1.1 4.6 1.5 8.2 5.9-8.3 5.6-4.1 14.7-8.4-.6 7.8 3.3 7.3-3.5 16.7 3.5-1.1 5.3-2.4 8.2-1.3-8.4 18.5-25.8 35-41.8 35.6z"/><path class="st3" d="M124.2 58.6c-2.5-12.7 6.2-31.1 18.2-43.2.3 2.4-3.2 4.3.7 8.4 2.4-3.5 7.6-7.9 12.7-8.6.3 4 .6 9.6-4.8 14.3 4.2 2.9 6.4-1 8.8-1.5-8 15.1-22.8 29.1-35.6 30.6z"/><path class="st4" d="M122.1 61.4s1.9-4.1 3.3-5.9c9.2-12.7 17.9-25.5 26.9-37 2.3-2.9 7.2-8.5 7.2-8.5s-3.6 6.5-5.9 9.5c-9.4 12.6-17.7 25.7-26.9 37a66.7 66.7 0 01-4.6 4.9z"/><path class="st0" d="M68.3 102.2c-5.3 18.5-30 31.7-53.3 33.5-.8-3.5-.2-5.1 1.3-7.4-4.8 2.2-7.3-.4-15.1-4.3 4-7.8 4.5-11.3 9.7-12.4-2.6-1-4-1.9-5.4-5.2 19.9-12.2 47.6-16.1 62.8-4.2z"/><path class="st1" d="M68.3 102.2c-5.3 18.5-30 31.7-53.3 33.5-.8-3.5-.2-5.1 1.3-7.4-4.8 2.2-7.3-.4-15.1-4.3 4-7.8 4.5-11.3 9.7-12.4-2.6-1-4-1.9-5.4-5.2 19.9-12.2 47.6-16.1 62.8-4.2z"/><path class="st2" d="M64.5 103.4c-5.5 15-26.6 26.4-46.8 28.8-.5-3.8 1.8-4.4 3.6-7.5-9.7 3.2-6.9.1-16.8-1.8 5-6 1.6-7.8 12.7-11.5-3.5-1.1-5.7-1.1-7.4-3.8 17.7-9.9 41.5-13.1 54.7-4.2z"/><path class="st3" d="M60.9 104.6c-5.4 11.7-23.3 21.5-40.1 24.3 1.2-2.2 5.1-1.6 4.4-7.2-4 1.4-10.8 1.9-15.3-.5 2.1-3.4 5.2-8.1 12.3-8.7-1.7-4.9-5.8-2.9-8-4 15.2-7.6 35.4-10.2 46.7-3.9z"/><path class="st4" d="M64.2 103.5s-4 2.2-6.1 2.9c-14.9 4.9-29.5 10.1-43.5 14.1-3.6 1-10.9 2.7-10.9 2.7s6.8-3.1 10.4-4.2c15-4.6 29.4-10.5 43.5-14.1 2.2-.7 6.6-1.4 6.6-1.4z"/><path class="st0" d="M131.7 102.2c15.2-11.9 42.8-8 62.8 4.2-1.4 3.3-2.8 4.2-5.4 5.2 5.1 1 5.7 4.6 9.7 12.4-7.8 3.9-10.3 6.5-15.1 4.3 1.5 2.3 2.1 3.8 1.3 7.4-23.3-1.9-48-15-53.3-33.5z"/><path class="st1" d="M131.7 102.2c15.2-11.9 42.8-8 62.8 4.2-1.4 3.3-2.8 4.2-5.4 5.2 5.1 1 5.7 4.6 9.7 12.4-7.8 3.9-10.3 6.5-15.1 4.3 1.5 2.3 2.1 3.8 1.3 7.4-23.3-1.9-48-15-53.3-33.5z"/><path class="st2" d="M135.5 103.4c13.2-8.9 37.1-5.7 54.8 4.2-1.8 3.3-4 2.5-7.3 3.9 9.7 3.1 5.6 4 12.5 11.3-7.6 1.9-5.9 5.4-17 1.9 2.2 2.9 3.9 4.3 3.8 7.4-20.2-2.3-41.3-13.7-46.8-28.7z"/><path class="st3" d="M139.1 104.6c11.3-6.3 31.5-3.7 46.7 3.9-2.2 1.1-5.1-1.7-7.8 3.2a21 21 0 0112.1 9.4c-3.7 1.5-9 3.5-15.1-.2-1.5 4.9 3 5.8 4.1 7.9-16.7-2.7-34.6-12.5-40-24.2z"/><path class="st4" d="M135.8 103.5s4.5.6 6.6 1.3c14.9 4.8 29.8 9.1 43.5 14.1 3.5 1.3 10.4 4.2 10.4 4.2s-7.3-1.4-10.9-2.7c-14.8-5.1-29.9-8.8-43.5-14.1-2.1-.8-6.1-2.8-6.1-2.8z"/><path class="st5" d="M179.5 110.7c13.6-9.5 5.9-30.6.9-46.4-5-15.8-10.8-37.5-27.3-37-16.8.5-9.2 25.3-24.9 24-6.1-15 19.3-15.2 14.5-31.8C138 3.3 116.2 4.3 100 4.3c-16.2 0-38-1-42.7 15.2-4.8 16.6 20.6 16.8 14.5 31.8-15.7 1.3-8.1-23.5-24.9-24-16.4-.5-22.3 21.2-27.3 37s-12.6 36.8.9 46.4c13.9 9.8 21.9-14.9 33.9-4.4-3.6 15.8-24.3.7-29.9 17-5.5 15.9 12.8 28.3 25.8 38.1 13.1 9.8 30.2 23.8 43.2 13.5 13.3-10.6-7-26.1 6.4-34.5 13.5 8.4-6.9 23.9 6.4 34.5 13 10.3 30.1-3.7 43.2-13.5 13.1-9.8 31.3-22.2 25.8-38.1-5.6-16.3-26.3-1.2-29.9-17 12.1-10.5 20.2 14.2 34.1 4.4z"/><path class="st6" d="M179.5 110.7c13.6-9.5 5.9-30.6.9-46.4-5-15.8-10.8-37.5-27.3-37-16.8.5-9.2 25.3-24.9 24-6.1-15 19.3-15.2 14.5-31.8C138 3.3 116.2 4.3 100 4.3c-16.2 0-38-1-42.7 15.2-4.8 16.6 20.6 16.8 14.5 31.8-15.7 1.3-8.1-23.5-24.9-24-16.4-.5-22.3 21.2-27.3 37s-12.6 36.8.9 46.4c13.9 9.8 21.9-14.9 33.9-4.4-3.6 15.8-24.3.7-29.9 17-5.5 15.9 12.8 28.3 25.8 38.1 13.1 9.8 30.2 23.8 43.2 13.5 13.3-10.6-7-26.1 6.4-34.5 13.5 8.4-6.9 23.9 6.4 34.5 13 10.3 30.1-3.7 43.2-13.5 13.1-9.8 31.3-22.2 25.8-38.1-5.6-16.3-26.3-1.2-29.9-17 12.1-10.5 20.2 14.2 34.1 4.4z"/><path class="st7" d="M100 8.5c-8.2 0-17.4-.2-24.8 1.4-7.4 1.6-12.2 4.4-14 10.8-.9 3.2-.5 4.6.6 6.4 1.1 1.8 3.2 3.6 5.7 5.6 2.5 2 5.4 4.1 7.4 7.4 2 3.3 2.6 8.1.7 12.8a4.4 4.4 0 01-3.4 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6a27.8 27.8 0 00-3.4 7.3c-1.1 3-2.1 6.5-4.6 9.5-2.4 3-6.7 5-11.6 4.6a3.9 3.9 0 01-3.4-2.6c-1.9-4.7-1.4-9.5.7-12.8 2-3.3 4.9-5.4 7.3-7.4 2.5-2 4.6-3.9 5.7-5.6 1.1-1.8 1.5-3.2.6-6.4-1.8-6.4-6.6-9.2-13.9-10.8-7.7-1.6-17-1.4-25.2-1.4z"/><path class="st8" d="M26.8 125.8s-.4 3.2.4 5.8a20 20 0 005.9 9.6c3.7 3.1 6.9 4.5 11.5 5.5a34 34 0 0112.5 5.5c3.2 2.4 6.6 6.5 8.9 10.6 2.4 4.1 4.6 6.9 8.6 9.5 3.4 2.2 6.9 2.8 10.7 2.8 2.6 0 5.5-1.4 5.5-1.4-2.4-1.5-7.1 1.8-14.9-3.5a27.8 27.8 0 01-8.8-9.2 34.6 34.6 0 00-21.4-16.1c-4.5-1-8-3.1-11.2-5.7-7.2-5.9-5.6-11.5-7.7-13.4zm146.8-.3c-2.1 1.9-.5 7.5-7.8 13.5a26.5 26.5 0 01-11.2 5.7 34.6 34.6 0 00-21.4 16 27.8 27.8 0 01-8.8 9.2c-7.8 5.3-12.5 2-14.9 3.5 0 0 2.8 1.3 5.5 1.3 3.8 0 7.4-.6 10.7-2.8 4-2.6 6.3-5.4 8.6-9.5 2.4-4.1 5.8-8.2 8.9-10.5 3.2-2.4 8-4.5 12.5-5.5s7.8-2.4 11.5-5.5a19 19 0 005.9-9.6c.9-2.6.5-5.8.5-5.8zM45.2 30.2s-3 .6-5.2 2.2c-3.1 2.3-5.6 5-7.1 8.8a25 25 0 00-1.5 12.9A39 39 0 0130.2 68a37.2 37.2 0 01-7 12c-3.1 3.6-5 6.6-6.2 11.4-1 4-.5 7.6.7 11.4.8 2.6 3 4.9 3 4.9.6-2.8-3.9-6.4-1.4-15.7 1.1-4 2.7-7.8 5.8-11.4a36.6 36.6 0 008.2-25.8A30 30 0 0135.1 42c3.3-8.9 9-9.1 10.1-11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7.4 8.3.4 11.9-4.7 15.6-7.4C122.2 21 125.6 17 135 24c0 0-16.3 12-17.8 23.1-1.2 9.2 2.9 15.3 2.9 15.3s7.2 1.8 15.3-2.2c9.8-4.9 15.9-24.5 15.9-24.5 9.3 7 6.7 11.5 4 19.9-1.4 4.4-5 9.5-2.1 17.5 2.2 8.2 8 10.2 11.7 12.9 6.9 5.2 11.7 7.3 8.1 18.5 0 0-16.1-12.2-26.9-10.2-8.8 1.6-13.3 7.5-13.3 7.5s.5 7.6 6.8 14.2c7.6 8.1 27.6 8 27.6 8-3.6 11.3-8.6 10.1-17.1 10.1-4.5 0-10.4-2-16.9 3.4-7 4.7-7 11-8.4 15.4-2.6 8.4-3.1 13.6-14.6 13.6 0 0 6.3-19.6 1.2-29.4-4.2-8.1-11.1-10.7-11.1-10.7s-6.9 2.9-11.2 11z"/><path class="st9" d="M73.1 23.8c-.6 0-1.5.2-2.5.6 1.5 1.3 3 2.6 4.8 4.4a33.6 33.6 0 0110.5 17.8c1.4 10.4-3.2 18-3.2 18-.5.8-1.2 1.3-2 1.5 0 0-8.4 2.4-17.6-2.2-6.3-3.1-10.3-9.9-13.2-15.7-1.1-2.2-1.8-4.1-2.5-5.9-1 1.3-1.6 2.4-1.6 3.4-.1 1.8.9 4.8 2.3 9.1 1.1 3.4 5.4 10.4 2.1 19.6l-.1.2v.2C47.5 84.2 40 87.2 37.2 89.4c-3.6 2.7-6.1 4.4-7.1 6-.6.9-.8 2.1-.7 3.8 1.6-1 3.2-2.1 5.4-3.2 5.7-3 12.8-6 19.7-4.7 10 1.9 15.6 8.7 15.6 8.7.5.7.8 1.5.8 2.4 0 0-.3 8.9-7.4 16.5-4.9 5.2-12.4 7-18.6 8.1-2.4.4-4.3.5-6.2.7.9 1.4 1.7 2.3 2.7 2.6 1.7.7 4.7.6 9.2.6 3.5 0 11.2-2 18.7 4l.3.2c7.9 5.5 8.4 13.7 9.5 17.1 1.4 4.3 2.2 7.4 3.3 8.8a6 6 0 003.3 1.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-8.1-2.5-8.8 11-9 7.7-17-8.4-.7-4.3 12.5-13.3 12.8-8.8.2-11.9-11.3-14.5-19.7-2.7-8.4-6.8-19.7.5-24.8 7.4-5.2 11.7 8 18.1 2.3-1.9-8.4-12.9-.4-16-9-2.9-8.5 6.8-15.1 13.8-20.3 7-5.2 16.1-12.7 23.1-7.2 7.1 5.6-3.7 13.9 3.4 18.4 7.2-4.5-3.7-12.8 3.4-18.4 6.9-5.5 16.1 2 23.1 7.2s16.7 11.8 13.8 20.3c-3 8.7-14 .6-16 9 6.4 5.6 10.7-7.6 18.1-2.3z"/><path class="st6" d="M142.4 81.1c7.2 5.1 3.1 16.3.5 24.8-2.7 8.4-5.8 20-14.5 19.7-9-.3-4.9-13.5-13.3-12.8-3.2 8 10.3 8.1 7.7 17-2.5 8.6-14.1 8.1-22.8 8.1-8.6 0-20.3.5-22.8-8.1-2.5-8.8 11-9 7.7-17-8.4-.7-4.3 12.5-13.3 12.8-8.8.2-11.9-11.3-14.5-19.7-2.7-8.4-6.8-19.7.5-24.8 7.4-5.2 11.7 8 18.1 2.3-1.9-8.4-12.9-.4-16-9-2.9-8.5 6.8-15.1 13.8-20.3 7-5.2 16.1-12.7 23.1-7.2 7.1 5.6-3.7 13.9 3.4 18.4 7.2-4.5-3.7-12.8 3.4-18.4 6.9-5.5 16.1 2 23.1 7.2s16.7 11.8 13.8 20.3c-3 8.7-14 .6-16 9 6.4 5.6 10.7-7.6 18.1-2.3z"/><path class="st7" d="M100 135.6c-4.4 0-9.3.1-13.2-.8-3.9-.9-6.5-2.4-7.5-5.8-.5-1.7-.2-2.5.3-3.4.6-.9 1.7-1.9 3.1-3 1.3-1.1 2.9-2.2 3.9-4a7.6 7.6 0 00.4-6.8c-.3-.8-1-1.3-1.8-1.4-2.6-.2-4.9.9-6.2 2.5-1.3 1.6-1.9 3.4-2.5 5-.6 1.6-1.1 3-1.8 3.9-.7.9-1.3 1.3-3.1 1.4-3.4.1-5.6-1.9-7.6-5.5s-3.4-8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" stroke-width="1.2"/><path d="M97.2 106c-3.1.9-4.5-.4-5.4-2.3-1.9-.5-3.9-.5-4-4-2.6-1.2-3.4-3-2.2-5.3-1.7-1.7-2-3.6 0-5.9-.8-3.6 1-4.7 2.3-5.5.1-2.2 1-3.8 4.1-4 1.3-2.8 3.2-2.6 5.3-2.2 1.6-1.3 3.5-1.7 5.9 0 2.6-.6 4.4.3 5.4 2.3 2.7 0 3.7 1.8 4 4.1 2.6 1.6 2.7 3.4 2.2 5.3 1.6 2.2 1.6 4.2 0 5.9.7 2.5.5 4.6-2.3 5.5-.5 2.8-2 4-4.1 4-1.1 1.5-1.8 3.3-5.3 2.2-1.6.8-2.9 1.8-5.9-.1z" fill="#f5d858"/><path d="M97.9 102.2c-2.3.7-3.3-.3-4-1.7-1.4-.4-2.9-.4-3-3-1.9-.9-2.5-2.2-1.6-3.9-1.3-1.2-1.5-2.7 0-4.4-.6-2.7.7-3.5 1.7-4.1.1-1.6.8-2.8 3-3 1-2.1 2.4-1.9 3.9-1.6 1.2-.9 2.6-1.2 4.4 0 2-.5 3.2.2 4 1.7 2 0 2.7 1.3 3 3 1.9 1.2 2 2.5 1.6 3.9 1.2 1.6 1.2 3.1 0 4.4.5 1.8.4 3.4-1.7 4.1-.4 2.1-1.4 3-3 3-.8 1.1-1.3 2.5-3.9 1.6-1.2.7-2.2 1.4-4.4 0z" fill="#f8e58f"/></svg> \ No newline at end of file
diff --git a/play.html b/play.html
new file mode 100644
index 0000000..ca5c76c
--- /dev/null
+++ b/play.html
@@ -0,0 +1,1577 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
+<meta charset="UTF-8">
+<title>RICHARD III</title>
+<link rel="icon" href="icons/Red_Rose_Badge_of_Lancaster.png">
+<link rel="stylesheet" href="/fonts/fonts.css">
+<link rel="stylesheet" href="/common/grid.css">
+<link rel="stylesheet" href="/common/battle_abc.css">
+<script defer src="/socket.io/socket.io.min.js"></script>
+<script defer src="/common/client.js"></script>
+<script defer src="data.js"></script>
+<script defer src="ui.js"></script>
+<style>
+
+.grid_center { background-color: #9aa; }
+.grid_role { background-color: ghostwhite; }
+.grid_log { background-color: ghostwhite; }
+.grid_top { background-color: silver; }
+.grid_top.your_turn { background-color: orange; }
+.grid_top.disconnected { background-color: red; }
+.role_info { background-color: silver; }
+.one .role_name { background-color: salmon; }
+.two .role_name { background-color: ghostwhite; }
+.battle_header { background-color: silver; }
+.battle_message { background-color: silver; }
+.battle_separator { background-color: silver; }
+
+#turn {
+ padding: 8px 0px 8px 8px;
+ border-bottom: 1px solid black;
+ white-space: pre-wrap;
+ font-style: italic;
+ font-size: 12px;
+ line-height: 18px;
+ font-family: "Source Serif SmText";
+}
+
+.hand {
+ min-height: 300px;
+}
+
+.card {
+ width: 180px;
+ height: 280px;
+ border-radius: 12px;
+}
+
+.small_card {
+ width: 90px;
+ height: 140px;
+ border-radius: 6px;
+}
+
+.role_info {
+ display: flex;
+ justify-content: center;
+}
+
+/* MAP */
+
+.map {
+ position: relative;
+ display: block;
+ width: 1688px;
+ height: 1950px;
+}
+
+.map svg {
+ position: absolute;
+}
+
+.map svg image {
+ pointer-events: none;
+}
+
+.map svg path.area {
+ fill: green;
+ stroke: green;
+ stroke-width: 20px;
+ fill-opacity: 0.4;
+ stroke-opacity: 0.8;
+ opacity: 0;
+}
+
+.map svg #area_France { fill: white; stroke: white; }
+.map svg #area_Calais { fill: dodgerblue; stroke: dodgerblue; }
+.map svg #area_English_Channel { fill: dodgerblue; stroke: dodgerblue; }
+.map svg #area_Irish_Sea { fill: dodgerblue; stroke: dodgerblue; }
+.map svg #area_North_Sea { fill: dodgerblue; stroke: dodgerblue; }
+
+.map svg path.area.highlight {
+ cursor: pointer;
+ opacity: 1;
+}
+.map svg path.area.where {
+ opacity: 1;
+ fill: darkslategray;
+ stroke: darkslategray;
+}
+.map svg path.area.where.highlight {
+ stroke: white;
+}
+
+X.map svg path.area.highlight:hover {
+ stroke: white;
+ fill: white;
+}
+
+.map.hide_blocks div.blocks {
+ visibility: hidden;
+}
+
+/* BLOCKS */
+
+.map div.block {
+ position: absolute;
+}
+
+div.block {
+ border-radius: 6px;
+ width: 60px;
+ height: 60px;
+}
+
+div.block { background-size: cover; background-repeat: no-repeat; }
+
+div.block { box-shadow: 0px 0px 3px 0px black; }
+
+div.block.Lancaster { border: 3px solid brown; background-color: brown; }
+div.block.York { border: 3px solid gainsboro; background-color: gainsboro; }
+div.block.Rebel { border: 3px solid dimgray; background-color: dimgray; }
+
+div.block.Lancaster.highlight { border-color: white; }
+div.block.York.highlight { border-color: white; }
+div.block.Rebel.highlight { border-color: white; }
+
+div.block.Lancaster.selected { border-color: yellow; }
+div.block.York.selected { border-color: yellow; }
+div.block.Rebel.selected { border-color: yellow; }
+
+div.block.highlight { cursor: pointer; box-shadow: 0 0 4px 1px white; }
+div.block.selected { box-shadow: 0 0 4px 1px yellow; }
+div.block.moved { filter: grayscale(50%) brightness(85%); }
+div.block.highlight.moved { filter: grayscale(60%) brightness(95%); }
+
+div.block:hover { z-index: 1; }
+
+div.block.r1 { transform: rotate(-90deg); }
+div.block.r2 { transform: rotate(-180deg); }
+div.block.r3 { transform: rotate(-270deg); }
+
+div.block {
+ transition-property: top, left, transform;
+ transition-duration: 700ms, 700ms, 200ms;
+ transition-timing-function: ease;
+}
+
+/* BATTLE BOARD */
+
+.battle { background-color: silver; }
+.battle .battle_message { background-color: lightsteelblue; }
+.battle .battle_header { background-color: steelblue; color: white; font-weight: bold; }
+.battle .battle_separator { background-color: steelblue; }
+
+.battle_reserves > td > div { height: 75px; padding: 5px; }
+.battle_a_cell > div { min-width: 180px; padding: 5px 10px; }
+.battle_b_cell > div { min-width: 180px; padding: 5px 10px; }
+.battle_c_cell > div { min-width: 180px; padding: 5px 10px; }
+.battle_d_cell > div { min-width: 90px; padding: 5px 10px; }
+
+/* CARD AND BLOCK IMAGES */
+
+.card_back{background-image:url('cards/card_back.jpg')}
+.card_force_march{background-image:url('cards/card_force_march.jpg')}
+.card_muster{background-image:url('cards/card_muster.jpg')}
+.card_piracy{background-image:url('cards/card_piracy.jpg')}
+.card_plague{background-image:url('cards/card_plague.jpg')}
+.card_surprise{background-image:url('cards/card_surprise.jpg')}
+.card_treason{background-image:url('cards/card_treason.jpg')}
+.card_2{background-image:url('cards/card_2.jpg')}
+.card_3{background-image:url('cards/card_3.jpg')}
+.card_4{background-image:url('cards/card_4.jpg')}
+
+.known.block_11{background-image:url(blocks/block_11.jpg)}
+.known.block_12{background-image:url(blocks/block_12.jpg)}
+.known.block_13{background-image:url(blocks/block_13.jpg)}
+.known.block_14{background-image:url(blocks/block_14.jpg)}
+.known.block_15{background-image:url(blocks/block_15.jpg)}
+.known.block_16{background-image:url(blocks/block_16.jpg)}
+.known.block_17{background-image:url(blocks/block_17.jpg)}
+.known.block_21{background-image:url(blocks/block_21.jpg)}
+.known.block_22{background-image:url(blocks/block_22.jpg)}
+.known.block_23{background-image:url(blocks/block_23.jpg)}
+.known.block_24{background-image:url(blocks/block_24.jpg)}
+.known.block_25{background-image:url(blocks/block_25.jpg)}
+.known.block_26{background-image:url(blocks/block_26.jpg)}
+.known.block_27{background-image:url(blocks/block_27.jpg)}
+.known.block_31{background-image:url(blocks/block_31.jpg)}
+.known.block_32{background-image:url(blocks/block_32.jpg)}
+.known.block_33{background-image:url(blocks/block_33.jpg)}
+.known.block_34{background-image:url(blocks/block_34.jpg)}
+.known.block_35{background-image:url(blocks/block_35.jpg)}
+.known.block_36{background-image:url(blocks/block_36.jpg)}
+.known.block_37{background-image:url(blocks/block_37.jpg)}
+.known.block_41{background-image:url(blocks/block_41.jpg)}
+.known.block_42{background-image:url(blocks/block_42.jpg)}
+.known.block_43{background-image:url(blocks/block_43.jpg)}
+.known.block_44{background-image:url(blocks/block_44.jpg)}
+.known.block_45{background-image:url(blocks/block_45.jpg)}
+.known.block_46{background-image:url(blocks/block_46.jpg)}
+.known.block_47{background-image:url(blocks/block_47.jpg)}
+.known.block_51{background-image:url(blocks/block_51.jpg)}
+.known.block_52{background-image:url(blocks/block_52.jpg)}
+.known.block_53{background-image:url(blocks/block_53.jpg)}
+.known.block_54{background-image:url(blocks/block_54.jpg)}
+.known.block_55{background-image:url(blocks/block_55.jpg)}
+.known.block_56{background-image:url(blocks/block_56.jpg)}
+.known.block_57{background-image:url(blocks/block_57.jpg)}
+.known.block_61{background-image:url(blocks/block_61.jpg)}
+.known.block_62{background-image:url(blocks/block_62.jpg)}
+.known.block_63{background-image:url(blocks/block_63.jpg)}
+.known.block_64{background-image:url(blocks/block_64.jpg)}
+.known.block_65{background-image:url(blocks/block_65.jpg)}
+.known.block_66{background-image:url(blocks/block_66.jpg)}
+.known.block_67{background-image:url(blocks/block_67.jpg)}
+.known.block_71{background-image:url(blocks/block_71.jpg)}
+.known.block_72{background-image:url(blocks/block_72.jpg)}
+.known.block_73{background-image:url(blocks/block_73.jpg)}
+.known.block_74{background-image:url(blocks/block_74.jpg)}
+.known.block_75{background-image:url(blocks/block_75.jpg)}
+.known.block_76{background-image:url(blocks/block_76.jpg)}
+.known.block_77{background-image:url(blocks/block_77.jpg)}
+.known.block_81{background-image:url(blocks/block_81.jpg)}
+.known.block_82{background-image:url(blocks/block_82.jpg)}
+.known.block_83{background-image:url(blocks/block_83.jpg)}
+.known.block_84{background-image:url(blocks/block_84.jpg)}
+.known.block_85{background-image:url(blocks/block_85.jpg)}
+.known.block_86{background-image:url(blocks/block_86.jpg)}
+.known.block_87{background-image:url(blocks/block_87.jpg)}
+.known.block_91{background-image:url(blocks/block_91.jpg)}
+.known.block_92{background-image:url(blocks/block_92.jpg)}
+.known.block_93{background-image:url(blocks/block_93.jpg)}
+.known.block_94{background-image:url(blocks/block_94.jpg)}
+.known.block_95{background-image:url(blocks/block_95.jpg)}
+.known.block_96{background-image:url(blocks/block_96.jpg)}
+.known.block_97{background-image:url(blocks/block_97.jpg)}
+
+</style>
+</head>
+<body>
+
+<div class="status" id="status"></div>
+
+<div class="chat_window">
+<div class="chat_header">Chat</div>
+<div class="chat_text"></div>
+<form class="chat_form" action=""><input id="chat_input" autocomplete="off"></form>
+</div>
+
+<table class="battle">
+<tr>
+<th class="battle_header" colspan=4></th>
+<tr class="battle_reserves enemy">
+<td colspan=4><div id="ER"></div></td>
+<tr class="battle_line enemy">
+<td class="battle_a_cell"><div id="EA"></div></td>
+<td class="battle_b_cell"><div id="EB"></div></td>
+<td class="battle_c_cell"><div id="EC"></div></td>
+<td class="battle_d_cell"><div id="ED"></div></td>
+<tr class="battle_separator">
+<td colspan=4>
+<tr class="battle_line friendly">
+<td class="battle_a_cell"><div id="FA"></div></td>
+<td class="battle_b_cell"><div id="FB"></div></td>
+<td class="battle_c_cell"><div id="FC"></div></td>
+<td class="battle_d_cell"><div id="FD"></div></td>
+<tr class="battle_reserves friendly">
+<td colspan=4><div id="FR"></div></td>
+<tr>
+<th class="battle_message" colspan=4></th>
+</table>
+
+<div class="grid_window">
+
+ <div class="grid_top">
+
+ <div class="menu">
+ <div class="menu_title"><img src="/images/cog.svg"></div>
+ <div class="menu_popup">
+ <div class="menu_item" onclick="toggle_fullscreen()">Fullscreen</div>
+ <div class="menu_separator"></div>
+ <div class="menu_item" onclick="window.open('info/notes.html', '_blank')">Notes</div>
+ <div class="menu_item" onclick="window.open('info/rules.html', '_blank')">Rules</div>
+ <div class="menu_item" onclick="window.open('info/cards.html', '_blank')">Cards</div>
+ <div class="menu_item" onclick="window.open('info/blocks.html', '_blank')">Blocks</div>
+ <div class="menu_separator"></div>
+ <div class="menu_item" onclick="confirm_resign()">Resign</div>
+ <div class="menu_separator"></div>
+ <div class="menu_item" onclick="send_save()">&#x1F41E; Save</div>
+ <div class="menu_item" onclick="send_restore()">&#x1F41E; Restore</div>
+ <div class="menu_separator"></div>
+ <div class="menu_item" onclick="send_restart('Wars of the Roses')">&#x26a0; Restart 1460</div>
+ <div class="menu_item" onclick="send_restart('Kingmaker')">&#x26a0; Restart 1470</div>
+ <div class="menu_item" onclick="send_restart('Richard III')">&#x26a0; Restart 1483</div>
+ </div>
+ </div>
+
+ <div class="image_button" onclick="toggle_blocks()"><img src="/images/earth-africa-europe.svg"></div>
+ <div class="image_button" onclick="toggle_log()"><img src="/images/scroll-quill.svg"></div>
+ <div class="image_button chat_button" onclick="toggle_chat()"><img src="/images/chat-bubble.svg"></div>
+
+ <div id="prompt" class="prompt">$PROMPT</div>
+
+ <button id="execute_clarence_button" onclick="on_button_execute_clarence()" class="hide">
+ Execute Clarence
+ </button>
+ <button id="execute_exeter_button" onclick="on_button_execute_exeter()" class="hide">
+ Execute Exeter
+ </button>
+ <button id="treachery_button" onclick="on_button_treachery()" class="hide">
+ Treachery
+ </button>
+ <button id="eliminate_button" onclick="on_button_eliminate()" class="hide">
+ Eliminate
+ </button>
+ <button id="end_retreat_button" onclick="on_button_end_retreat()" class="hide">
+ End retreat
+ </button>
+ <button id="end_regroup_button" onclick="on_button_end_regroup()" class="hide">
+ End regroup
+ </button>
+ <button id="end_political_turn_button" onclick="on_button_end_political_turn()" class="hide">
+ End political turn
+ </button>
+ <button id="end_supply_phase_button" onclick="on_button_end_supply_phase()" class="hide">
+ End supply phase
+ </button>
+ <button id="end_action_phase_button" onclick="on_button_end_action_phase()" class="hide">
+ End action phase
+ </button>
+ <button id="end_exile_limits_button" onclick="on_button_end_exile_limits()" class="hide">
+ End exile limits
+ </button>
+ <button id="pass_button" onclick="on_button_pass()" class="hide">
+ Pass
+ </button>
+ <button id="undo_button" onclick="on_button_undo()" class="hide">
+ Undo
+ </button>
+
+ </div>
+
+ <div class="grid_role">
+
+ <div class="role one">
+ <div class="role_vp" id="lancaster_vp"></div>
+ <div class="role_name">Lancaster (<span class="role_user">$USER</span>)</div>
+ <div class="role_info"><div class="small_card card_back" id="lancaster_card"></div></div>
+ </div>
+
+ <div class="role two">
+ <div class="role_vp" id="york_vp"></div>
+ <div class="role_name">York (<span class="role_user">$USER</span>)</div>
+ <div class="role_info"><div class="small_card card_back" id="york_card"></div></div>
+ </div>
+
+ <div id="turn">$TURN</div>
+
+ </div>
+
+ <div class="grid_log">
+ <div class="log" id="log"></div>
+ </div>
+
+ <div class="grid_center">
+
+<div class="map" id="map">
+
+<svg id="svgmap" viewBox="0 0 1688 1950">
+<image href="map.jpg" x="0" y="0" width="1688" height="1950" />
+<g transform="translate(0,1950) scale(0.1,-0.1)">
+<path id="area_Scotland" class="area"
+ d="M3100 19454 c31 -71 27 -146 -11 -219 -17 -33 -40 -67 -50 -75 -17
+-14 -17 -20 -6 -62 9 -34 29 -66 76 -117 35 -38 72 -84 82 -100 10 -17 26 -31
+35 -31 16 0 96 -43 124 -66 11 -9 69 -14 197 -16 176 -3 182 -4 207 -27 14
+-13 30 -38 35 -55 6 -18 11 -345 13 -802 3 -760 3 -772 -17 -794 -46 -51 -41
+-51 -591 -57 -500 -6 -515 -7 -526 -26 -12 -24 -4 -101 17 -151 8 -19 15 -48
+15 -64 0 -16 6 -35 14 -41 18 -15 46 -95 46 -131 0 -36 -27 -70 -55 -70 -15 0
+-32 11 -47 33 -20 28 -23 42 -20 112 2 73 0 85 -30 142 -30 58 -36 63 -66 63
+-87 0 -128 -65 -138 -220 -5 -74 -3 -95 20 -164 14 -43 26 -89 26 -102 0 -13
+9 -28 21 -34 50 -27 254 -263 245 -285 -2 -7 15 -43 40 -81 45 -68 59 -133 33
+-150 -14 -8 -4 -75 16 -114 8 -15 28 -33 45 -38 16 -6 48 -25 70 -43 48 -39
+67 -31 49 19 -6 18 -9 45 -6 60 4 18 -3 41 -19 69 -14 24 -34 78 -45 120 -11
+43 -28 101 -39 130 -10 28 -22 74 -26 101 -6 46 -4 53 27 96 22 29 47 49 69
+57 19 6 58 27 86 46 28 18 57 31 65 28 8 -3 28 -28 44 -55 26 -45 72 -80 105
+-80 24 0 77 -35 127 -83 28 -28 71 -58 95 -66 36 -14 47 -24 68 -68 14 -29 39
+-67 56 -85 17 -18 41 -48 53 -66 26 -37 60 -57 125 -72 25 -5 67 -26 92 -45
+54 -42 71 -44 84 -10 5 14 20 39 32 55 19 27 21 34 10 63 -6 17 -12 70 -14
+115 -3 83 -2 84 27 108 29 23 29 25 15 51 -9 16 -37 40 -63 54 -69 37 -78 50
+-83 110 -9 140 51 182 103 72 24 -51 30 -56 109 -93 89 -43 104 -46 133 -28
+34 21 76 -20 142 -139 16 -30 132 -99 148 -88 6 3 13 27 17 53 13 89 48 93 59
+6 8 -64 19 -72 78 -57 22 6 52 7 67 3 22 -6 37 0 85 31 33 21 90 55 128 75
+l69 36 -7 44 c-7 49 7 84 33 84 10 0 23 5 29 11 9 9 18 8 36 -4 31 -20 83 -8
+117 28 27 29 80 34 100 10 9 -11 30 -14 82 -12 70 3 71 3 109 47 44 51 47 73
+18 115 -11 17 -24 39 -28 50 -10 23 3 133 17 147 5 5 30 -5 62 -27 29 -19 63
+-38 76 -41 42 -11 112 5 129 29 14 20 18 20 60 9 25 -7 55 -12 66 -12 12 0 60
+-9 108 -21 72 -17 92 -19 124 -9 28 8 52 8 85 1 147 -31 202 -31 202 3 0 19
+48 76 65 76 7 0 29 13 49 29 22 18 55 33 82 37 63 9 98 52 89 108 -3 22 -12
+48 -20 57 -8 8 -15 27 -15 41 0 40 40 68 116 81 88 16 116 35 173 121 46 71
+103 115 146 116 39 0 83 38 115 99 36 66 43 72 115 80 46 6 51 9 70 48 21 44
+100 120 152 146 17 9 52 35 78 57 26 22 69 52 96 65 41 21 55 36 89 98 28 52
+56 85 98 119 73 58 97 68 175 68 57 1 65 3 100 35 20 20 37 39 37 43 0 4 -14
+15 -30 24 -30 17 -80 110 -80 150 0 11 -14 58 -30 106 -17 47 -33 111 -37 142
+-5 57 -5 57 31 86 20 16 50 50 66 76 17 27 51 61 82 82 29 19 71 49 93 65 22
+17 63 44 90 60 43 26 53 38 69 83 10 29 29 65 43 80 25 26 25 26 9 76 -10 28
+-23 53 -30 55 -12 5 -31 34 -108 166 -15 25 -28 54 -28 64 0 16 -132 17 -2640
+17 l-2639 0 19 -46z"/>
+<path id="area_Northumbria" class="area"
+ d="M8544 19033 c-8 -21 -19 -47 -23 -59 -5 -11 -25 -33 -45 -50 -20 -16
+-62 -51 -93 -78 -32 -27 -77 -57 -100 -68 -42 -19 -83 -60 -83 -83 0 -7 -21
+-31 -47 -53 l-47 -39 26 -59 c14 -33 31 -84 38 -114 24 -113 43 -154 77 -169
+55 -24 68 -83 33 -151 -26 -51 -99 -89 -192 -101 -90 -11 -171 -67 -190 -130
+-16 -56 -96 -134 -145 -144 -23 -4 -53 -23 -87 -55 -28 -27 -63 -51 -77 -55
+-32 -8 -114 -91 -124 -125 -13 -43 -44 -69 -94 -75 -91 -13 -100 -25 -58 -83
+13 -17 29 -57 36 -89 34 -153 71 -241 114 -270 17 -12 60 -48 95 -80 49 -44
+66 -67 73 -98 11 -51 3 -171 -18 -254 -21 -80 -12 -115 56 -232 75 -126 116
+-162 242 -209 108 -41 122 -52 188 -145 31 -44 45 -88 56 -173 7 -53 8 -54 75
+-97 37 -24 77 -57 89 -74 36 -50 81 -189 81 -251 0 -77 5 -82 64 -65 59 18
+153 19 183 2 12 -7 39 -37 60 -66 33 -47 45 -56 86 -67 26 -7 59 -20 73 -29
+16 -10 36 -15 53 -11 14 3 51 10 81 17 30 6 82 20 116 30 75 23 84 23 175 1
+134 -34 176 -66 194 -150 5 -22 18 -41 43 -57 21 -14 49 -35 64 -46 l27 -22
+33 35 c25 27 44 37 80 42 39 6 50 12 67 42 11 19 36 44 55 55 36 21 44 37 66
+137 9 39 26 70 66 119 49 59 53 69 52 110 -2 46 4 56 58 89 16 10 17 15 6 30
+-36 53 -53 106 -47 145 6 37 5 40 -26 56 -38 21 -71 55 -128 133 -56 75 -70
+109 -90 214 -10 50 -25 105 -34 123 -9 17 -21 64 -27 105 -6 40 -17 91 -25
+113 -7 22 -19 59 -25 83 -10 39 -13 42 -45 42 -43 0 -46 21 -10 74 14 20 25
+41 25 45 0 26 -42 96 -78 130 -35 31 -42 44 -42 75 0 29 -7 44 -35 69 -28 26
+-37 44 -46 92 -6 33 -22 84 -37 113 -26 51 -27 53 -9 83 22 40 22 75 -3 106
+-11 14 -20 33 -20 42 0 9 -11 32 -24 52 -42 61 -51 108 -37 191 14 82 8 111
+-33 150 -24 23 -56 96 -56 131 0 10 7 29 16 42 13 19 15 40 10 92 -15 181 -18
+198 -42 230 -14 18 -24 46 -24 65 0 18 -7 42 -16 53 -10 14 -13 31 -9 58 5 26
+2 45 -9 62 -9 13 -16 31 -16 40 0 8 -17 25 -38 39 -20 13 -44 31 -51 40 -27
+32 -67 47 -95 35 -38 -18 -53 -6 -60 51 -8 57 -26 72 -56 45 -18 -16 -23 -17
+-47 -4 -34 18 -93 96 -93 123 0 12 5 27 10 32 8 8 -8 22 -50 48 -33 21 -68 48
+-76 62 -23 34 -43 30 -60 -13z"/>
+<path id="area_Ireland" class="area"
+ d="M32 17619 l-32 -10 0 -4874 0 -4875 33 0 c48 0 75 34 87 105 6 36 18
+67 31 81 27 29 19 50 -21 59 -17 4 -44 18 -60 32 -25 20 -30 32 -29 66 0 23
+-3 58 -6 77 -6 30 -2 41 24 73 25 32 28 43 20 63 -13 35 -11 83 5 135 7 24 19
+62 25 85 6 23 28 61 50 85 21 24 46 60 56 79 10 19 51 69 92 111 72 74 74 79
+74 125 1 82 -7 147 -25 197 -21 62 -20 98 3 166 11 31 22 67 25 81 3 14 26 52
+51 85 63 81 74 111 68 182 -5 56 -4 60 31 102 20 23 36 48 36 54 0 7 20 50 44
+97 29 57 47 106 51 144 6 47 15 67 49 108 95 115 98 145 20 217 -54 48 -56 53
+-51 89 21 135 39 314 33 335 -3 14 -17 39 -31 55 -13 16 -27 48 -31 70 -4 23
+-17 56 -30 74 -13 17 -24 39 -24 48 0 8 -11 36 -25 62 -31 59 -31 79 0 108 14
+13 25 35 25 50 0 33 -26 70 -49 70 -10 0 -24 7 -31 15 -7 8 -27 19 -44 23 -30
+8 -31 10 -34 70 -3 57 -1 63 20 72 13 5 36 20 51 32 25 20 39 23 103 21 66 -2
+74 0 74 17 0 10 -16 31 -36 47 -92 73 -102 86 -109 146 -7 51 -4 63 21 113 18
+36 27 68 25 90 -2 28 4 39 34 67 l37 34 -16 38 c-9 20 -16 48 -16 62 0 49 -16
+63 -74 63 -50 0 -56 3 -85 38 -17 20 -41 49 -53 65 -13 15 -24 29 -25 30 -1 1
+-9 37 -18 79 -8 42 -25 97 -36 123 -27 61 -30 234 -4 288 16 34 13 77 -5 77
+-18 0 -40 33 -40 60 0 16 8 41 17 58 9 16 14 36 10 45 -9 24 -53 49 -105 58
+-26 5 -57 19 -69 32 -33 33 -51 117 -47 217 5 111 10 134 41 171 25 30 27 30
+92 23 36 -3 83 -15 103 -25 50 -26 104 -24 145 4 53 36 39 104 -27 130 -29 11
+-46 28 -69 68 -48 85 -36 128 25 88 16 -10 38 -19 50 -19 12 0 35 -5 53 -11
+27 -10 34 -19 48 -70 13 -48 23 -64 49 -80 33 -20 33 -20 71 0 21 11 81 56
+134 100 82 68 100 89 125 143 25 54 30 79 34 174 6 128 7 130 105 196 l60 41
+128 1 c121 2 129 0 149 -21 27 -29 42 -29 61 0 8 12 34 36 58 52 24 17 45 33
+47 37 2 4 17 24 34 45 35 44 58 96 58 129 0 25 -51 159 -67 175 -7 7 -24 7
+-53 -1 -23 -6 -46 -8 -51 -3 -8 9 3 102 22 174 11 42 10 51 -9 90 -25 51 -45
+136 -36 150 3 5 -2 21 -11 36 -13 20 -15 31 -7 48 8 17 7 28 -3 42 -19 24 -19
+52 -1 59 26 10 100 -33 169 -97 l69 -64 3 -132 c4 -131 4 -133 -20 -152 -38
+-29 -33 -80 18 -175 23 -44 48 -81 54 -83 7 -3 15 8 18 24 3 15 15 46 27 69
+19 37 20 45 8 93 -12 52 -12 54 24 123 44 85 47 130 10 169 -30 31 -43 81 -44
+163 0 48 -6 70 -34 120 -19 34 -44 97 -55 140 -21 80 -45 129 -80 161 -17 15
+-29 16 -68 10 -55 -9 -63 -9 -193 -5 -91 3 -98 2 -171 -33 -49 -23 -84 -47
+-99 -67 -36 -51 -92 -62 -105 -21 -3 10 7 44 21 77 37 81 109 144 248 215 75
+38 121 69 141 94 28 34 30 43 32 132 l2 95 -46 49 c-37 40 -52 49 -79 49 -38
+0 -45 -18 -14 -38 21 -13 27 -46 11 -56 -18 -11 -67 43 -80 86 -19 66 -69 158
+-110 203 -20 22 -47 68 -60 103 -14 37 -34 70 -48 80 -14 9 -40 30 -59 46 -33
+27 -34 30 -34 102 l0 74 -32 0 c-18 0 -64 11 -103 25 l-70 24 3 38 c2 21 5
+103 8 182 l6 144 -49 49 c-26 27 -66 59 -87 70 l-39 20 -37 -21 c-29 -16 -55
+-21 -109 -21 -67 0 -73 2 -110 35 -21 19 -47 35 -57 35 -11 1 -44 9 -74 20
+-61 21 -80 23 -128 9z"/>
+<path id="area_Cumbria" class="area"
+ d="M7220 17285 c-9 -8 -47 -25 -85 -39 -65 -22 -73 -28 -110 -83 -60
+-90 -123 -140 -194 -154 -83 -16 -87 -19 -73 -67 7 -22 12 -60 12 -86 0 -39
+-6 -52 -35 -85 -24 -27 -49 -42 -80 -50 -24 -6 -48 -10 -52 -9 -5 1 -21 -6
+-38 -17 -16 -10 -50 -31 -74 -47 -25 -15 -48 -28 -53 -28 -4 0 -8 -7 -8 -15 0
+-9 12 -18 30 -22 38 -7 34 -22 -11 -46 -55 -29 -110 -18 -165 33 -51 47 -60
+47 -150 4 -57 -28 -98 -66 -92 -85 2 -6 19 -17 38 -23 37 -12 49 -38 30 -61
+-16 -20 -54 -19 -111 1 -46 17 -48 17 -123 -11 -41 -15 -80 -33 -86 -40 -6 -7
+-10 -76 -11 -161 -1 -191 -5 -208 -72 -266 -29 -25 -64 -66 -78 -90 -13 -25
+-45 -76 -70 -114 -45 -66 -47 -73 -59 -179 -14 -130 -57 -262 -100 -312 -36
+-41 -37 -53 -6 -89 66 -78 96 -117 96 -127 0 -5 26 -36 58 -67 58 -58 132
+-165 132 -191 0 -8 21 -41 47 -74 45 -57 47 -64 53 -140 7 -90 27 -137 95
+-230 43 -58 54 -77 75 -130 13 -34 35 -41 73 -22 18 8 44 20 60 26 22 9 27 17
+27 46 0 44 35 115 56 115 8 0 21 -15 29 -33 11 -28 11 -42 -1 -96 -18 -75 -38
+-109 -70 -117 -29 -8 -30 -18 -3 -79 15 -33 19 -59 15 -83 -7 -48 6 -68 52
+-76 32 -5 42 -12 52 -36 15 -36 36 -39 44 -6 3 14 26 37 56 56 43 28 52 39 65
+84 11 36 25 60 45 75 27 19 30 28 30 74 1 60 14 125 29 140 19 19 41 -12 41
+-57 0 -23 9 -55 19 -73 11 -17 21 -49 23 -70 3 -36 5 -38 36 -36 64 2 77 11
+102 63 23 50 69 90 103 90 8 0 35 15 59 33 24 18 51 36 61 40 9 3 17 11 17 18
+0 21 184 198 222 214 49 19 128 19 174 0 26 -11 40 -27 59 -67 14 -29 25 -58
+25 -64 0 -6 9 -19 20 -29 11 -10 25 -35 31 -55 11 -36 14 -38 65 -44 92 -11
+139 21 194 130 17 32 44 77 61 100 26 35 31 52 36 120 6 90 17 112 68 144 31
+19 49 22 128 21 95 -1 175 14 252 48 36 16 83 52 183 140 16 15 22 31 22 65 0
+46 -17 75 -107 180 -47 56 -93 181 -92 248 1 29 -7 77 -17 107 -19 54 -45 80
+-121 122 -53 29 -86 84 -94 153 -3 34 -19 90 -34 125 -31 67 -57 87 -145 111
+-25 6 -75 28 -112 47 -78 40 -157 127 -195 213 -14 30 -33 73 -43 95 -30 68
+-32 118 -10 204 23 93 26 171 6 209 -8 15 -40 47 -71 72 -127 100 -143 127
+-176 290 -29 143 -42 163 -79 125z"/>
+<path id="area_East_Yorks" class="area"
+ d="M10180 15526 c0 -7 7 -19 15 -26 24 -20 18 -35 -32 -79 -27 -23 -78
+-71 -114 -107 -64 -64 -67 -68 -72 -126 -6 -67 -42 -130 -89 -154 -15 -8 -28
+-21 -28 -29 0 -31 -45 -67 -100 -79 -80 -18 -90 -41 -65 -138 11 -40 20 -109
+22 -153 1 -44 5 -127 9 -185 7 -116 7 -115 4 -183 -3 -57 32 -117 86 -149 45
+-26 54 -45 54 -111 0 -75 14 -107 61 -140 26 -18 48 -45 61 -73 17 -40 18 -52
+8 -92 -14 -55 -23 -45 133 -133 62 -34 122 -72 135 -83 13 -12 47 -32 75 -46
+56 -27 73 -51 102 -145 18 -59 8 -105 -31 -130 -24 -16 -25 -17 -9 -41 10 -15
+15 -40 13 -62 -3 -31 -9 -40 -38 -53 -46 -22 -44 -40 7 -59 64 -24 85 -47 82
+-95 -5 -79 -3 -84 54 -109 28 -13 71 -29 94 -35 23 -6 63 -28 90 -49 26 -21
+61 -46 76 -55 16 -10 37 -33 48 -51 l19 -33 66 34 c53 26 78 33 125 33 48 0
+70 6 115 31 65 37 92 35 168 -14 57 -36 77 -38 251 -20 64 6 117 18 148 32 82
+38 177 63 212 57 38 -7 57 -27 78 -78 10 -23 38 -54 76 -84 33 -26 63 -55 67
+-66 3 -10 18 -26 32 -35 15 -10 43 -34 63 -55 53 -56 81 -53 242 28 41 20 72
+17 105 -11 17 -14 36 -25 43 -25 22 0 101 -57 116 -82 12 -22 12 -22 13 13 0
+57 -73 192 -145 269 -33 36 -77 90 -98 120 -64 95 -70 104 -109 147 -21 24
+-38 49 -38 58 0 8 -27 42 -60 74 -33 33 -60 62 -60 66 0 17 -48 108 -92 173
+-33 50 -55 96 -68 145 -11 40 -26 89 -35 109 -8 21 -15 48 -15 60 0 13 -7 33
+-15 45 -8 12 -18 49 -22 83 -5 53 -3 65 15 90 12 15 24 40 28 54 8 34 19 42
+115 79 49 19 85 39 87 48 5 29 -96 82 -241 124 -32 9 -73 29 -90 45 -28 25
+-33 36 -37 91 -6 69 5 58 -132 135 -36 21 -51 37 -67 75 -12 26 -21 54 -21 63
+0 8 -5 18 -10 21 -15 9 -50 81 -50 102 -1 37 -66 190 -100 231 -19 24 -49 50
+-67 57 -24 10 -34 23 -42 52 -6 21 -11 44 -11 51 0 7 -21 38 -47 68 -54 63
+-131 106 -172 98 -23 -5 -34 1 -64 37 -46 53 -84 79 -118 79 -15 0 -37 8 -50
+19 -46 36 -105 58 -191 74 -50 9 -100 25 -115 36 -16 11 -49 22 -75 25 -27 2
+-58 13 -74 25 -15 12 -37 21 -50 21 -13 0 -38 13 -56 28 -18 16 -55 34 -82 41
+-27 7 -62 19 -77 27 -35 17 -39 18 -39 0z"/>
+<path id="area_North_Yorks" class="area"
+ d="M8483 15259 c-18 -5 -35 -14 -38 -19 -3 -5 15 -31 40 -57 64 -66 87
+-115 92 -193 5 -76 -16 -120 -70 -148 -17 -9 -50 -36 -72 -58 -76 -78 -194
+-122 -330 -123 -87 -1 -140 -16 -167 -48 -6 -8 -13 -49 -15 -91 -4 -92 -15
+-131 -48 -162 -30 -28 -32 -47 -5 -55 11 -3 32 -19 47 -36 15 -16 46 -34 68
+-40 73 -20 101 -50 119 -128 20 -87 20 -132 1 -195 -22 -72 -18 -147 11 -241
+35 -112 28 -131 -87 -252 -77 -81 -89 -98 -89 -128 0 -45 20 -65 107 -105 37
+-18 88 -45 113 -60 73 -45 83 -45 121 -6 36 38 93 66 137 66 15 0 80 -12 144
+-27 l117 -26 36 31 c19 18 54 41 76 52 42 22 74 65 85 113 3 16 25 48 47 72
+55 57 104 71 197 55 38 -6 106 -13 152 -14 46 -2 109 -7 140 -11 54 -7 63 -5
+135 29 168 81 208 102 223 117 8 9 32 34 52 56 22 24 50 43 69 47 44 9 59 23
+59 58 0 41 -28 85 -62 99 -45 18 -58 46 -58 119 0 91 -7 109 -43 118 -23 6
+-43 25 -74 71 -47 69 -54 110 -32 211 9 42 8 64 -6 120 -9 38 -14 73 -11 78 3
+5 1 56 -4 112 -9 99 -38 190 -59 190 -5 0 -31 18 -56 40 -25 22 -52 40 -59 40
+-23 0 -57 46 -63 86 -3 21 -10 45 -16 52 -14 18 -65 38 -115 47 -23 4 -44 11
+-48 16 -9 15 -90 11 -104 -6 -8 -10 -30 -15 -62 -15 -27 0 -76 -9 -110 -21
+-66 -22 -96 -20 -136 12 -14 10 -42 22 -64 25 -50 9 -84 36 -109 89 -16 33
+-27 44 -51 49 -41 8 -86 6 -125 -5z"/>
+<path id="area_Isle_of_Man" class="area"
+ d="M3815 14875 c-27 -13 -54 -24 -59 -25 -36 -1 -163 -112 -171 -150 -9
+-41 -61 -98 -93 -102 -25 -3 -27 -7 -32 -59 -3 -31 -12 -64 -20 -75 -34 -45
+-103 -105 -134 -118 -46 -19 -76 -54 -76 -89 0 -16 -9 -40 -20 -54 -16 -21
+-20 -41 -20 -105 0 -85 -1 -87 -78 -145 -23 -17 -31 -33 -35 -65 -3 -24 -8
+-55 -12 -70 -7 -26 -5 -28 24 -28 38 0 71 16 89 42 18 25 36 23 75 -12 28 -24
+40 -28 69 -24 29 5 38 2 52 -17 l17 -24 20 24 c10 13 19 36 19 52 0 32 25 53
+77 64 18 3 54 24 80 46 27 22 63 45 81 51 22 8 35 21 39 38 9 39 21 49 79 66
+63 18 97 53 88 91 -4 14 -2 41 4 61 6 21 15 56 22 80 8 32 20 48 48 66 53 33
+64 50 60 93 -3 33 -8 41 -41 57 -74 35 -79 69 -42 243 15 67 16 85 5 98 -18
+21 -57 18 -115 -10z"/>
+<path id="area_Lancaster" class="area"
+ d="M7232 14402 c-26 -10 -73 -47 -121 -94 -48 -48 -86 -78 -99 -78 -14
+0 -24 -8 -28 -24 -3 -13 -21 -39 -40 -57 -19 -18 -34 -43 -34 -55 0 -26 22
+-78 50 -119 11 -16 20 -42 20 -58 0 -44 -44 -103 -97 -129 -56 -28 -93 -90
+-101 -167 -4 -49 12 -81 49 -93 11 -4 12 -10 1 -32 -10 -22 -9 -32 3 -56 14
+-28 14 -31 -5 -50 -13 -13 -33 -20 -58 -20 -44 0 -138 -26 -167 -46 -11 -8
+-36 -14 -57 -14 -21 0 -38 -1 -39 -2 0 -2 -7 -52 -15 -113 -24 -184 -27 -261
+-14 -356 12 -83 15 -91 42 -105 16 -8 33 -27 39 -41 8 -22 6 -30 -16 -53 -29
+-30 -32 -65 -14 -167 l11 -63 -40 -39 c-22 -22 -43 -50 -47 -63 -5 -12 -18
+-37 -31 -54 -30 -39 -54 -107 -54 -152 0 -25 10 -47 34 -77 21 -25 41 -65 50
+-99 8 -32 23 -68 34 -80 29 -31 42 -61 42 -94 0 -16 9 -55 19 -88 11 -32 21
+-66 23 -75 5 -24 188 -183 238 -206 25 -12 63 -23 85 -26 22 -3 49 -8 61 -12
+17 -5 22 0 32 33 15 50 31 63 84 69 24 2 61 12 83 20 24 9 79 17 135 19 52 1
+108 7 123 13 16 6 61 11 102 11 l74 0 35 44 c37 45 77 61 232 96 76 17 127 1
+160 -51 33 -52 47 -56 85 -25 35 29 84 34 127 12 15 -7 54 -16 87 -20 97 -10
+172 -47 228 -108 l47 -53 30 35 c26 30 30 41 29 91 -2 66 0 69 73 148 56 61
+56 61 112 61 47 0 56 3 56 18 0 9 9 34 20 55 11 20 20 44 20 52 0 9 7 30 16
+47 20 39 12 69 -31 117 -62 68 -94 154 -105 277 -8 90 -16 124 -46 194 -40 95
+-47 117 -65 210 -17 92 -15 103 36 165 57 70 60 106 13 135 -18 11 -40 20 -48
+20 -8 0 -35 11 -60 24 -43 22 -163 46 -234 46 -23 0 -40 -9 -62 -31 -66 -70
+-142 -77 -217 -20 -23 18 -74 47 -113 66 -131 62 -180 128 -152 206 7 20 48
+74 92 120 43 46 86 99 94 116 15 31 14 38 -6 100 -49 153 -49 154 -19 246 32
+99 34 135 8 186 -25 47 -39 59 -92 74 -30 9 -50 23 -64 44 -31 48 -49 47 -113
+-8 -59 -51 -140 -86 -170 -74 -9 4 -46 10 -82 14 l-64 6 -16 51 c-8 28 -23 59
+-32 68 -16 15 -38 75 -38 103 0 16 -49 53 -69 52 -9 0 -35 -8 -59 -17z"/>
+<path id="area_South_Yorks" class="area"
+ d="M9895 13612 c-17 -9 -52 -40 -77 -67 -39 -42 -70 -61 -194 -119 -142
+-66 -150 -69 -239 -74 -71 -3 -105 -1 -141 12 -27 9 -80 21 -118 26 -118 17
+-165 -8 -202 -108 -21 -58 -67 -109 -116 -129 -55 -22 -55 -39 2 -92 39 -36
+50 -54 50 -77 0 -51 -29 -119 -65 -154 -39 -37 -42 -60 -20 -113 8 -20 15 -48
+15 -62 0 -15 11 -45 24 -68 29 -50 59 -175 76 -312 15 -116 29 -149 100 -227
+48 -53 55 -58 94 -58 38 0 49 -6 89 -45 50 -49 147 -228 147 -273 0 -14 15
+-39 40 -63 22 -22 50 -60 61 -85 12 -25 30 -49 39 -54 10 -6 49 -9 87 -8 44 1
+77 -3 94 -13 15 -7 40 -22 57 -32 26 -14 61 -18 209 -20 194 -3 206 -6 306
+-78 33 -24 50 -29 96 -29 101 0 168 69 180 186 9 78 28 106 95 138 61 29 64
+33 86 95 29 84 120 104 185 41 27 -26 35 -29 57 -21 14 5 41 29 59 52 19 24
+55 64 80 89 25 25 48 53 52 64 5 11 -3 44 -19 85 -37 91 -47 234 -26 385 6 49
+9 92 6 97 -3 5 -28 9 -55 9 -45 0 -54 -4 -99 -46 -72 -67 -124 -61 -136 15 -7
+46 -16 56 -89 113 -42 32 -73 47 -102 51 -52 6 -146 70 -168 114 -8 17 -15 49
+-15 72 0 45 -11 55 -75 66 -51 10 -85 40 -85 77 0 45 16 65 65 83 50 20 52 23
+30 51 -26 34 -18 69 21 101 l36 29 -11 56 c-13 61 -38 91 -86 102 -16 4 -50
+27 -76 51 -25 23 -80 60 -122 80 -41 20 -93 52 -115 71 -46 39 -47 39 -87 16z"/>
+<path id="area_Lincoln" class="area"
+ d="M11810 12570 c-25 -4 -63 -14 -85 -22 -22 -8 -78 -18 -124 -21 -57
+-5 -90 -12 -102 -23 -16 -15 -24 -15 -63 -4 -32 9 -49 9 -64 1 -17 -9 -29 -5
+-72 24 -99 66 -144 40 -153 -90 -3 -44 -11 -95 -17 -112 -15 -40 3 -190 31
+-275 35 -105 26 -149 -48 -227 -138 -146 -148 -161 -137 -220 8 -44 62 -151
+105 -208 39 -52 40 -92 5 -134 -14 -17 -26 -43 -26 -58 0 -14 -16 -60 -35
+-100 -35 -72 -36 -77 -29 -156 6 -75 4 -87 -21 -142 l-27 -61 31 -59 31 -59
+55 -2 c30 -1 68 -8 84 -17 40 -20 58 -19 88 5 37 29 84 26 115 -7 32 -36 68
+-137 68 -193 0 -23 5 -71 12 -106 11 -61 10 -65 -16 -116 -16 -30 -23 -54 -17
+-56 6 -2 27 -14 46 -28 20 -13 52 -31 71 -39 32 -13 34 -17 34 -59 0 -36 -6
+-51 -28 -74 -25 -26 -30 -40 -36 -111 -5 -65 -3 -86 9 -104 8 -12 15 -28 15
+-37 0 -46 23 -93 55 -111 19 -11 37 -30 41 -42 4 -12 22 -39 40 -60 33 -36 38
+-51 34 -112 -1 -19 6 -37 18 -48 26 -23 55 -11 108 45 35 36 45 55 59 118 9
+41 24 84 34 95 10 11 24 36 30 55 11 35 64 95 175 198 64 60 83 69 171 81 34
+5 82 18 106 29 24 11 62 25 84 32 51 17 138 76 147 101 8 20 13 23 58 33 24 6
+47 44 78 126 15 39 101 148 122 155 10 3 27 21 38 39 10 18 41 50 68 72 27 21
+74 60 105 86 52 45 59 48 112 48 62 0 69 8 41 48 -13 20 -14 36 -4 136 11 108
+11 116 -9 161 -12 26 -21 59 -21 74 0 62 -62 218 -116 292 -19 26 -34 53 -34
+60 0 8 -7 27 -15 43 -8 16 -22 56 -31 89 -20 79 -37 110 -74 139 -17 14 -50
+61 -73 108 l-42 83 -53 13 c-33 9 -70 28 -95 49 -22 19 -58 40 -78 45 -21 6
+-48 23 -61 38 -70 79 -157 151 -197 162 -29 7 -61 28 -95 61 -28 28 -67 59
+-87 69 -20 10 -43 30 -52 44 -9 13 -25 27 -36 31 -19 6 -58 56 -119 152 -16
+25 -39 47 -56 53 -16 5 -29 9 -30 9 -1 -1 -21 -5 -46 -9z"/>
+<path id="area_Derby" class="area"
+ d="M9049 11920 c-17 -10 -72 -140 -84 -196 -11 -56 -63 -81 -123 -60
+-19 6 -29 1 -56 -28 -44 -48 -53 -70 -61 -136 -5 -44 -14 -67 -47 -110 -39
+-52 -40 -54 -24 -81 9 -15 16 -47 16 -71 -1 -63 -34 -200 -69 -282 -16 -39
+-37 -97 -46 -129 -23 -83 -68 -129 -181 -183 -50 -24 -95 -51 -98 -60 -11 -28
+-6 -78 9 -98 34 -46 10 -145 -51 -207 l-35 -36 17 -37 c16 -32 16 -41 5 -69
+-23 -56 -20 -68 29 -94 58 -30 75 -52 94 -117 20 -67 53 -97 141 -126 35 -12
+67 -26 70 -31 4 -5 25 -9 48 -9 23 0 62 -9 86 -20 47 -22 86 -26 96 -10 3 6
+24 10 46 10 31 0 47 -8 79 -36 38 -35 42 -36 87 -28 27 4 74 6 105 5 31 -2 72
+2 90 8 18 6 45 13 60 16 15 3 43 19 63 36 33 29 38 31 92 24 47 -5 67 -2 103
+14 53 24 104 26 144 6 16 -9 55 -15 91 -15 63 0 64 1 130 57 l67 57 68 -2 c65
+-3 69 -2 91 28 38 49 125 152 158 187 44 45 108 73 187 80 61 5 72 10 94 36
+72 86 128 137 152 137 34 0 53 19 66 66 15 53 37 72 109 94 l58 18 3 56 c3 49
+-1 61 -22 87 -33 39 -34 84 -1 153 22 46 24 64 23 151 -2 85 1 106 19 140 11
+22 26 60 33 84 6 24 22 61 36 82 30 48 30 50 -2 80 -40 38 -70 96 -100 196
+-25 85 -32 96 -76 134 -66 55 -97 52 -118 -13 -19 -59 -41 -82 -106 -112 -49
+-23 -54 -28 -68 -77 -9 -29 -16 -61 -16 -71 0 -31 -37 -93 -75 -126 -103 -91
+-159 -87 -348 22 -47 28 -50 28 -231 30 l-182 1 -45 30 c-40 27 -52 30 -126
+30 -73 0 -84 3 -108 25 -15 14 -34 42 -42 63 -8 20 -32 50 -53 67 -29 23 -41
+42 -54 91 -18 62 -66 160 -118 237 -30 43 -62 54 -99 32z"/>
+<path id="area_Caernarvon" class="area"
+ d="M3680 11704 c-14 -7 -37 -14 -52 -14 -44 0 -191 -38 -199 -52 -5 -7
+-6 -23 -3 -35 8 -32 7 -58 -5 -138 -7 -47 -7 -82 0 -108 5 -20 7 -42 4 -47
+-17 -27 -118 8 -143 49 -23 39 -132 19 -132 -24 0 -33 24 -65 48 -65 46 0 91
+-29 98 -64 3 -18 16 -46 28 -61 l23 -29 47 18 c47 18 47 18 72 -5 38 -36 74
+-104 74 -142 0 -37 25 -67 55 -67 21 0 110 -87 119 -117 7 -21 22 -26 116 -41
+41 -6 45 -9 42 -32 -2 -14 -5 -65 -6 -115 -5 -145 -41 -202 -165 -257 -36 -16
+-63 -38 -89 -73 -21 -27 -51 -59 -68 -70 -33 -23 -118 -51 -177 -60 -23 -4
+-53 -19 -75 -39 -20 -18 -45 -35 -54 -39 -9 -3 -26 -24 -37 -46 -12 -22 -45
+-61 -75 -86 -34 -30 -56 -58 -60 -75 -3 -16 -21 -50 -41 -75 -38 -50 -43 -76
+-20 -95 12 -10 20 -7 46 15 23 19 38 24 53 20 46 -15 149 5 181 35 23 22 28
+22 67 11 55 -16 96 -55 104 -98 7 -36 15 -41 34 -18 7 8 18 15 24 15 7 0 20 6
+31 13 17 13 17 15 0 61 -16 42 -16 48 -3 64 9 9 26 37 38 60 18 37 32 48 84
+72 34 16 68 36 75 44 9 11 31 16 68 16 39 0 62 6 83 21 26 20 37 21 107 15
+198 -17 250 -18 273 -6 19 10 25 9 42 -8 26 -26 16 -42 -27 -42 -19 0 -36 -4
+-39 -9 -4 -5 1 -37 10 -71 19 -74 12 -142 -17 -171 -25 -25 -24 -33 10 -82 15
+-23 38 -60 49 -83 11 -22 28 -46 37 -54 9 -7 27 -37 42 -65 l25 -53 -23 -66
+c-18 -54 -28 -70 -53 -83 -41 -21 -42 -23 -56 -110 -11 -68 -10 -76 8 -107 11
+-18 25 -49 32 -70 6 -20 23 -50 38 -67 24 -30 28 -31 81 -24 87 10 141 26 141
+41 0 36 117 58 170 31 14 -7 41 -40 60 -74 19 -33 43 -73 53 -87 9 -14 24 -37
+32 -51 10 -16 27 -26 52 -30 21 -3 61 -12 90 -21 34 -10 69 -12 107 -8 53 6
+56 8 61 38 11 54 -7 82 -55 89 -58 8 -100 48 -100 98 0 39 28 84 58 93 11 4
+26 32 41 81 19 61 21 80 12 107 -6 18 -10 47 -9 63 1 17 -1 55 -5 85 -8 59
+-12 51 59 148 14 19 17 43 15 126 -2 118 5 144 59 203 22 23 40 51 40 62 0 10
+8 28 18 39 23 27 131 59 216 65 85 6 104 22 113 96 5 46 11 56 47 85 50 41
+134 70 184 63 20 -2 71 -13 112 -23 49 -12 102 -18 153 -16 47 1 94 -3 120
+-12 23 -7 68 -17 99 -20 45 -6 67 -15 99 -42 22 -19 46 -34 53 -34 7 0 28 16
+47 36 18 19 48 42 66 49 17 7 39 28 48 45 9 18 31 47 49 64 28 28 56 91 56
+124 0 6 -26 41 -57 79 -64 75 -58 51 -65 253 -1 30 2 66 7 79 8 23 7 23 -34
+16 -47 -8 -85 10 -96 46 -4 12 -22 34 -40 50 -21 19 -35 42 -40 67 -7 39 -39
+82 -61 82 -8 0 -51 35 -98 78 -125 115 -182 164 -203 175 -59 32 -151 100
+-171 126 -21 28 -26 30 -70 25 -91 -10 -157 -28 -185 -51 -16 -13 -40 -23 -54
+-23 -14 0 -40 -9 -57 -19 -17 -11 -60 -29 -95 -41 -35 -11 -73 -27 -85 -34
+-16 -11 -36 -12 -79 -6 -32 5 -72 4 -90 -1 -50 -14 -93 4 -158 66 -56 54 -59
+55 -100 49 -33 -6 -45 -4 -54 10 -7 9 -29 20 -49 23 -30 5 -36 3 -36 -12 0
+-10 11 -28 25 -41 49 -45 18 -105 -64 -120 -42 -8 -88 -27 -226 -95 -82 -40
+-113 -50 -171 -55 -46 -3 -74 -2 -78 5 -4 6 19 42 51 80 32 38 67 86 78 106
+l19 37 -23 19 c-35 29 -112 26 -159 -6 -20 -14 -47 -25 -59 -25 -12 0 -33 -4
+-47 -10 -21 -8 -28 -5 -46 17 -11 14 -23 43 -26 65 -4 21 -14 44 -23 51 -29
+22 -53 69 -53 106 0 64 -14 86 -64 99 -24 7 -54 12 -67 12 -12 0 -31 6 -42 13
+-18 12 -116 38 -133 36 -4 -1 -18 -7 -32 -15z"/>
+<path id="area_Chester" class="area"
+ d="M6371 11690 c-24 -17 -69 -42 -100 -56 -100 -45 -106 -49 -109 -69
+-4 -26 50 -107 116 -175 81 -83 152 -192 152 -233 0 -27 8 -40 38 -64 25 -21
+43 -45 51 -74 7 -23 31 -64 54 -90 33 -38 44 -46 58 -38 10 5 31 9 48 9 44 0
+65 -35 57 -97 -4 -27 -6 -61 -6 -78 5 -161 7 -177 22 -186 24 -14 88 -106 94
+-137 8 -42 -31 -139 -76 -188 -22 -24 -40 -50 -40 -57 0 -19 -30 -44 -62 -52
+-16 -4 -28 -11 -28 -15 0 -4 -13 -22 -29 -39 -25 -27 -36 -31 -80 -31 -41 0
+-56 5 -83 29 -24 20 -48 30 -85 34 -28 3 -71 16 -94 27 -28 15 -51 20 -70 16
+-16 -3 -43 -9 -59 -12 -19 -4 -48 0 -73 10 -23 8 -69 20 -102 25 -33 6 -72 13
+-87 17 -30 7 -92 -19 -141 -58 -22 -19 -30 -36 -39 -91 -13 -82 -7 -92 70
+-107 30 -5 57 -12 62 -15 4 -3 11 -26 15 -52 9 -63 21 -83 49 -83 12 0 45 -7
+72 -15 27 -9 73 -20 103 -25 60 -11 86 -29 110 -80 20 -42 52 -60 112 -60 26
+0 70 -10 98 -22 43 -17 57 -30 77 -67 56 -102 74 -121 118 -121 23 -1 69 -7
+102 -14 93 -20 167 -7 213 38 50 49 99 58 209 40 52 -9 114 -12 152 -9 45 4
+82 1 120 -10 30 -9 78 -22 107 -29 58 -15 99 -38 125 -69 l16 -21 54 36 c29
+20 82 47 118 60 87 31 91 41 84 193 -5 111 -3 125 21 195 14 41 28 102 31 135
+6 58 5 62 -32 108 -31 40 -38 57 -38 95 l-1 46 60 16 c33 9 85 34 114 54 30
+21 68 40 83 43 15 3 48 24 73 47 51 48 56 76 29 155 -20 55 -13 127 16 164 11
+13 40 30 65 37 26 7 74 30 106 52 63 40 81 67 94 143 4 22 14 51 21 65 21 39
+72 199 83 260 9 50 7 59 -15 97 -13 23 -24 47 -24 54 0 19 -100 109 -145 130
+-22 10 -53 19 -68 19 -40 0 -118 21 -144 38 -18 11 -29 12 -57 2 -19 -6 -40
+-18 -46 -26 -7 -7 -29 -14 -48 -14 -30 0 -43 8 -82 50 -51 56 -75 61 -148 36
+-22 -8 -61 -18 -86 -21 -39 -6 -50 -14 -83 -58 -43 -58 -72 -70 -148 -61 -35
+4 -66 1 -99 -10 -31 -11 -75 -16 -120 -15 -45 1 -89 -4 -119 -14 -26 -10 -63
+-17 -82 -17 -32 0 -36 -4 -56 -50 -19 -43 -28 -53 -76 -75 -88 -40 -125 -47
+-169 -32 -30 10 -39 17 -38 35 0 15 -7 24 -22 28 -27 7 -153 144 -177 193 -9
+19 -17 45 -17 58 0 13 -14 57 -32 98 -30 70 -34 75 -63 75 -17 0 -49 -14 -74
+-30z"/>
+<path id="area_Leicester" class="area"
+ d="M11029 10563 c-9 -2 -23 -22 -32 -44 -12 -30 -25 -44 -59 -59 -24
+-11 -53 -20 -64 -20 -27 0 -40 -16 -48 -61 -8 -46 -40 -75 -94 -88 -50 -11
+-82 -37 -117 -96 -34 -60 -66 -77 -149 -83 -60 -4 -80 -10 -124 -39 -29 -19
+-64 -52 -78 -73 -14 -22 -37 -46 -50 -55 -13 -8 -24 -22 -24 -29 0 -21 -39
+-65 -73 -83 -21 -11 -53 -16 -94 -15 -59 2 -64 0 -110 -40 -90 -78 -168 -96
+-252 -58 -55 25 -87 25 -128 0 -18 -11 -33 -21 -33 -22 0 -2 7 -21 15 -43 8
+-22 14 -62 15 -90 0 -39 7 -58 30 -89 35 -46 39 -95 14 -154 -28 -67 0 -172
+46 -172 29 0 66 -37 84 -85 11 -28 24 -45 34 -46 9 0 56 -4 105 -8 100 -9 130
+-28 142 -87 3 -20 14 -38 23 -41 61 -20 101 -46 112 -74 7 -16 36 -50 64 -74
+32 -27 56 -58 65 -82 7 -21 28 -64 46 -95 19 -32 38 -73 44 -93 5 -19 19 -47
+30 -61 17 -21 21 -41 21 -95 0 -79 9 -108 50 -157 17 -20 30 -41 30 -46 0 -4
+11 -34 26 -65 l25 -57 -25 -76 c-15 -42 -26 -96 -26 -120 0 -41 2 -44 38 -56
+20 -8 48 -14 62 -13 62 1 119 -21 155 -60 41 -46 46 -91 14 -125 -26 -28 -20
+-68 20 -117 17 -22 32 -58 40 -100 l13 -66 42 21 c25 13 74 24 125 29 110 12
+158 25 171 49 9 16 5 22 -22 36 -48 24 -68 44 -68 69 0 31 28 53 80 61 27 4
+54 17 69 32 14 14 46 30 75 36 l51 11 6 55 c7 68 21 95 59 115 61 31 113 7
+133 -63 l14 -47 64 0 c81 0 122 -22 117 -63 -2 -20 -14 -33 -47 -51 l-44 -24
+23 -19 c30 -24 76 -24 90 2 16 31 49 44 126 50 57 5 81 13 122 40 28 18 54 40
+57 49 27 65 54 159 65 220 12 72 14 75 80 140 55 54 71 77 86 124 15 47 16 60
+5 66 -7 5 -54 12 -105 15 -50 4 -99 9 -109 12 -24 7 -39 39 -52 109 -11 57
+-12 60 -65 92 -45 27 -65 32 -115 33 -36 0 -69 6 -81 15 -33 22 -48 94 -38
+178 14 126 2 376 -22 450 -13 40 -14 56 -4 95 11 43 10 47 -12 64 -13 10 -25
+18 -28 18 -15 0 -40 63 -40 100 0 33 -7 51 -32 81 -18 22 -48 57 -66 78 -18
+22 -46 76 -62 120 -25 69 -30 96 -30 176 l0 95 36 40 c20 22 35 42 33 43 -59
+39 -89 56 -109 62 -65 19 -75 57 -34 132 28 51 27 47 5 228 -8 65 -36 134 -58
+142 -8 3 -32 -4 -53 -16 -47 -26 -65 -26 -115 -1 -37 19 -70 23 -106 13z"/>
+<path id="area_East_Anglia" class="area"
+ d="M13886 10294 c-16 -9 -67 -20 -115 -24 -119 -10 -198 -43 -224 -92
+-10 -21 -21 -57 -24 -80 -8 -73 -13 -88 -38 -110 -16 -14 -26 -36 -30 -67 -14
+-110 -14 -110 -53 -130 -61 -31 -68 -55 -38 -135 32 -85 66 -223 66 -268 0
+-24 8 -42 25 -58 14 -13 25 -27 25 -32 0 -5 14 -45 32 -89 28 -72 30 -83 20
+-118 -17 -54 -16 -56 21 -98 44 -49 49 -73 30 -136 -20 -67 -13 -195 18 -324
+19 -78 21 -101 13 -143 -12 -58 -16 -53 75 -101 35 -18 85 -52 111 -76 35 -31
+68 -49 126 -68 44 -13 87 -25 97 -25 29 0 175 -78 187 -99 5 -11 10 -35 10
+-54 0 -20 7 -41 18 -50 25 -23 98 -47 142 -47 73 0 192 -29 218 -52 30 -28 52
+-77 52 -116 0 -16 9 -50 20 -75 21 -47 38 -57 98 -57 18 0 55 -11 82 -25 27
+-14 65 -25 84 -25 43 0 100 37 133 85 41 61 88 72 127 30 13 -14 41 -31 62
+-39 29 -9 46 -25 65 -57 19 -34 39 -50 82 -71 50 -24 60 -34 83 -82 14 -31 32
+-60 40 -67 8 -6 14 -17 14 -23 1 -15 36 -56 48 -56 12 0 63 63 84 103 8 16 25
+34 38 40 13 7 29 29 36 50 13 37 57 96 141 189 23 25 45 59 49 75 4 15 16 38
+27 51 18 19 22 42 28 135 15 232 34 340 68 383 11 15 21 32 21 39 0 6 21 44
+47 84 45 72 46 75 54 180 5 70 16 133 33 186 25 77 27 123 6 150 -4 6 -19 48
+-34 94 -32 106 -61 149 -101 153 -19 2 -30 9 -30 18 0 11 11 15 45 14 25 0 52
+-4 61 -8 10 -4 18 -2 21 6 7 18 -19 145 -37 185 -8 17 -15 34 -15 37 0 11 -44
+70 -62 84 -10 7 -18 22 -18 33 0 30 -97 145 -153 181 -26 17 -60 46 -74 65
+-25 32 -124 104 -205 148 -21 11 -64 41 -96 66 -32 26 -76 52 -96 59 -23 7
+-45 25 -59 45 -51 78 -190 120 -442 134 -71 4 -139 12 -150 18 -81 44 -235 69
+-235 38 0 -24 -46 -37 -91 -25 -21 6 -41 15 -44 20 -3 5 -61 9 -128 9 -67 0
+-149 5 -182 11 -121 20 -178 22 -209 4z"/>
+<path id="area_Warwick" class="area"
+ d="M8086 10194 c-21 -15 -67 -39 -102 -55 -35 -16 -64 -33 -64 -38 0 -5
+18 -33 41 -62 41 -54 41 -54 35 -123 -4 -38 -20 -109 -37 -158 -27 -77 -30
+-96 -24 -156 19 -199 13 -213 -114 -264 -52 -21 -114 -55 -138 -74 l-43 -35 0
+-87 c0 -89 3 -97 54 -170 24 -35 29 -55 35 -127 6 -85 7 -85 54 -133 48 -49
+67 -91 67 -151 0 -19 17 -67 40 -114 31 -62 39 -87 34 -112 -4 -24 1 -41 21
+-71 24 -35 26 -46 22 -100 l-5 -62 39 -11 c64 -19 80 -85 34 -139 -14 -17 -25
+-39 -25 -50 0 -28 52 -66 120 -89 40 -13 61 -27 77 -52 28 -42 29 -73 2 -131
+-19 -42 -43 -177 -40 -227 0 -12 12 -43 27 -70 19 -36 24 -57 20 -84 -5 -28
+-1 -40 15 -55 12 -10 27 -31 35 -46 8 -16 19 -28 23 -28 5 0 17 22 25 48 9 27
+30 62 47 78 17 16 39 48 49 70 22 51 32 58 82 56 22 -1 49 5 61 13 34 23 63
+18 87 -15 41 -58 104 -30 129 57 6 23 27 58 45 78 28 29 40 35 75 35 22 0 58
+9 79 20 30 17 48 20 97 15 54 -6 64 -4 94 19 19 14 51 29 70 32 53 10 61 20
+61 78 0 61 12 80 62 96 20 6 51 27 68 46 28 32 30 39 24 84 -10 76 -1 96 65
+138 63 40 105 85 140 147 22 41 75 85 102 85 8 0 39 -6 69 -14 51 -14 56 -13
+75 5 25 23 114 69 134 69 8 0 30 -6 49 -12 28 -10 36 -10 39 -1 11 31 42 55
+83 64 44 10 80 33 80 51 0 5 -13 29 -30 52 -16 24 -35 62 -42 86 -9 28 -26 53
+-52 74 -21 17 -53 54 -72 83 -27 43 -40 54 -76 63 -55 15 -66 25 -74 65 -10
+53 -32 66 -117 69 -91 3 -131 24 -167 86 -16 28 -41 53 -65 66 -77 40 -100
+132 -61 240 l19 51 -38 61 c-30 50 -38 72 -40 120 -5 116 -69 167 -125 101
+-30 -36 -75 -47 -240 -56 -169 -10 -164 -10 -205 26 -37 32 -38 32 -109 26
+-53 -5 -85 -3 -126 9 -30 9 -80 24 -110 33 -77 23 -158 65 -207 107 -34 30
+-44 46 -53 91 -11 55 -36 85 -71 85 -9 0 -28 9 -43 21 -31 24 -35 72 -9 117
+16 28 16 31 0 56 -22 33 -33 33 -81 0z"/>
+<path id="area_Rutland" class="area"
+ d="M12615 9973 c-11 -3 -38 -18 -59 -34 -26 -19 -52 -29 -75 -29 -21 0
+-53 -11 -76 -25 -25 -15 -55 -24 -81 -25 -66 0 -141 -29 -174 -67 -17 -18 -46
+-45 -67 -58 -51 -35 -102 -98 -109 -134 -4 -17 -18 -43 -32 -58 -18 -19 -28
+-45 -33 -81 -9 -65 -44 -121 -101 -162 -52 -38 -53 -47 -44 -295 1 -44 6 -125
+11 -180 4 -55 7 -143 7 -196 -2 -116 7 -129 98 -140 84 -10 146 -48 171 -106
+10 -24 19 -55 19 -67 0 -45 33 -61 139 -64 84 -3 99 -7 121 -27 15 -14 49 -28
+85 -35 74 -15 128 -36 177 -68 50 -32 74 -25 128 39 55 66 94 89 148 89 38 0
+49 -6 98 -51 l54 -52 57 6 c32 3 92 20 132 38 41 17 104 35 139 39 62 8 65 10
+134 80 l70 71 -5 72 c-2 40 -12 99 -21 132 -21 70 -25 230 -8 289 12 43 2 75
+-38 111 -18 17 -21 28 -19 80 4 79 -26 190 -62 232 -28 33 -49 88 -49 131 0
+13 -7 58 -16 100 -16 82 -46 142 -88 181 -26 24 -28 25 -96 13 -106 -18 -134
+-5 -178 81 -29 56 -44 75 -96 109 -33 23 -77 48 -96 55 -35 12 -126 15 -165 6z"/>
+<path id="area_Powys" class="area"
+ d="M5423 9880 c-18 -11 -39 -35 -47 -53 -7 -19 -35 -51 -61 -72 -47 -39
+-47 -40 -41 -85 23 -157 17 -205 -34 -263 -27 -32 -27 -33 -19 -127 5 -52 11
+-110 15 -127 4 -21 0 -48 -10 -73 -9 -22 -16 -51 -16 -64 0 -17 -16 -38 -50
+-68 -27 -24 -46 -48 -42 -54 4 -5 25 -14 46 -19 27 -7 49 -22 70 -48 28 -36
+31 -45 29 -105 -2 -69 -2 -125 0 -222 1 -53 -16 -96 -75 -181 -9 -13 -7 -25 5
+-52 21 -44 21 -60 0 -119 -16 -45 -16 -48 2 -68 14 -15 19 -37 19 -88 1 -66
+-1 -71 -41 -124 -24 -30 -43 -64 -43 -74 0 -11 -15 -52 -34 -91 -41 -86 -82
+-121 -173 -148 l-68 -21 -3 -55 c-3 -50 1 -61 33 -108 20 -29 41 -66 47 -81
+11 -32 31 -40 106 -40 72 0 89 11 97 63 6 38 16 52 77 108 39 35 85 79 102 97
+21 22 45 35 71 39 22 3 50 15 62 26 26 23 85 36 167 37 55 0 60 -2 110 -46 28
+-26 66 -53 83 -60 36 -15 58 -50 68 -106 8 -43 26 -61 76 -77 25 -8 41 -21 49
+-40 9 -23 22 -32 57 -41 26 -6 55 -18 67 -26 11 -7 23 -14 26 -14 15 0 111
+100 128 135 11 22 34 50 51 62 39 30 49 77 26 135 -15 41 -15 47 0 92 10 29
+14 62 11 81 -8 38 5 77 39 117 13 16 29 47 35 69 6 21 26 55 46 74 23 23 34
+44 34 62 0 16 1 62 2 105 l3 76 -38 5 c-21 3 -46 12 -56 21 -10 9 -38 23 -62
+31 -30 10 -51 26 -63 45 -9 17 -41 48 -69 69 -29 22 -76 62 -104 89 -44 41
+-53 55 -53 83 0 19 4 39 8 45 10 16 48 34 70 34 35 0 150 41 167 60 24 26 12
+40 -25 30 -70 -20 -144 30 -155 103 -9 56 5 86 70 163 30 35 72 95 94 132 21
+37 52 77 68 88 17 13 34 39 41 63 7 23 24 48 37 57 33 22 32 34 -10 84 -19 23
+-35 46 -35 51 0 5 -17 20 -39 34 -29 20 -56 27 -112 32 -89 7 -107 15 -124 57
+-8 18 -22 39 -31 47 -18 15 -93 35 -184 48 -93 14 -97 17 -121 81 -19 52 -26
+61 -58 71 -20 7 -45 18 -56 25 -11 8 -29 14 -42 14 -12 0 -25 5 -28 10 -3 6
+-41 10 -83 10 -59 0 -85 -5 -109 -20z"/>
+<path id="area_Hereford" class="area"
+ d="M6926 9342 c-48 -50 -76 -55 -197 -41 -123 16 -188 13 -210 -7 -10
+-9 -28 -37 -40 -62 -12 -25 -33 -54 -47 -66 -13 -12 -32 -39 -42 -61 -10 -23
+-52 -80 -94 -128 -78 -90 -85 -107 -64 -153 12 -26 14 -26 78 -20 85 9 105 -4
+105 -67 0 -31 -6 -52 -20 -67 -27 -30 -96 -64 -172 -85 -35 -10 -63 -23 -63
+-29 0 -14 76 -79 136 -118 23 -14 52 -40 65 -57 12 -17 32 -34 43 -37 12 -4
+29 -14 40 -23 14 -12 40 -16 118 -16 98 0 101 -1 121 -27 l21 -28 -20 -27
+c-12 -16 -35 -37 -52 -48 -27 -17 -31 -26 -32 -62 0 -39 2 -43 23 -43 37 0 63
+-35 51 -67 -7 -21 -23 -32 -74 -50 -71 -25 -85 -39 -100 -93 -5 -20 -21 -51
+-35 -70 -20 -27 -25 -46 -25 -93 0 -32 -5 -67 -11 -79 -15 -27 -4 -65 24 -83
+13 -8 65 -21 115 -29 51 -7 105 -22 125 -33 19 -12 50 -24 68 -28 19 -4 43
+-13 54 -20 11 -7 47 -18 80 -24 56 -12 65 -18 130 -86 75 -78 104 -95 163 -95
+43 0 107 -34 134 -70 10 -14 21 -49 25 -77 6 -51 7 -52 32 -46 66 17 103 -10
+99 -71 -3 -37 -7 -43 -50 -66 -63 -34 -63 -35 -43 -67 10 -14 26 -58 36 -97
+18 -71 18 -71 -4 -116 -20 -41 -28 -47 -92 -72 -80 -30 -105 -44 -105 -58 0
+-5 15 -23 34 -40 59 -54 64 -138 12 -200 -30 -37 -30 -30 -11 -99 15 -59 10
+-81 -28 -111 -18 -15 -18 -21 -9 -66 6 -28 8 -60 5 -72 -10 -40 17 -23 36 21
+20 46 125 148 195 191 20 12 57 47 81 78 33 42 55 60 92 73 65 24 83 46 83
+105 0 52 15 72 68 91 27 9 32 16 32 44 0 37 33 71 79 81 55 12 62 16 76 45 14
+26 14 35 1 79 -21 70 7 155 62 184 15 8 55 41 89 73 89 84 103 130 56 192 -22
+29 -27 46 -28 92 0 46 -5 62 -23 82 -34 36 -41 74 -26 132 7 28 13 62 14 77 0
+15 9 52 21 83 33 89 27 104 -61 146 -59 28 -82 46 -104 79 -35 53 -37 100 -8
+140 27 36 22 50 -17 50 -44 0 -65 31 -56 82 12 69 8 106 -15 144 -15 23 -21
+45 -18 66 4 23 -5 53 -29 105 -23 47 -37 93 -40 133 -5 54 -10 65 -55 117 -60
+68 -68 87 -68 161 0 47 -6 67 -34 113 -41 68 -58 142 -54 236 2 57 -1 75 -15
+91 -27 30 -149 72 -210 72 -29 0 -83 5 -122 9 -38 5 -113 12 -165 16 l-95 7
+-39 -40z"/>
+<path id="area_Pembroke" class="area"
+ d="M4655 8880 c-11 -5 -34 -9 -51 -9 -19 -1 -39 -10 -54 -26 -29 -30
+-79 -46 -125 -38 l-35 6 0 -74 c0 -57 -5 -81 -20 -104 -11 -16 -20 -42 -20
+-57 0 -15 -9 -47 -19 -70 -11 -24 -31 -81 -46 -127 -30 -95 -58 -156 -78 -168
+-8 -4 -34 -35 -58 -69 -75 -102 -142 -175 -179 -194 -19 -10 -44 -28 -55 -40
+-11 -12 -49 -35 -85 -52 -51 -23 -74 -28 -105 -23 -39 5 -42 4 -109 -64 -43
+-44 -81 -73 -100 -77 -16 -4 -39 -17 -49 -30 -36 -46 -110 -68 -175 -53 -21 5
+-65 4 -102 -2 -36 -5 -89 -12 -117 -16 -50 -5 -53 -8 -53 -34 0 -31 -15 -40
+-49 -27 -30 11 -71 -14 -71 -43 0 -36 -38 -77 -107 -115 -41 -23 -73 -50 -85
+-70 -24 -41 -49 -50 -90 -30 -43 22 -57 20 -70 -10 -13 -28 -74 -64 -108 -64
+-14 0 -26 11 -35 34 -16 37 -42 50 -126 61 -41 6 -47 4 -62 -19 -11 -16 -17
+-46 -17 -79 0 -32 -5 -59 -13 -65 -18 -16 -151 -62 -176 -62 -12 0 -47 -18
+-79 -40 -32 -21 -92 -52 -133 -68 l-74 -28 -5 -52 c-7 -64 -22 -82 -48 -59
+-17 16 -20 16 -32 2 -10 -12 -10 -21 -2 -40 14 -30 14 -30 88 -4 97 35 139 35
+245 -1 52 -18 100 -37 106 -44 14 -13 63 -147 63 -171 0 -9 -7 -29 -15 -45
+-11 -22 -25 -31 -53 -35 -20 -4 -53 -15 -73 -26 -20 -10 -46 -19 -57 -19 -14
+0 -21 -9 -25 -30 -6 -26 -11 -30 -41 -30 -45 0 -53 -14 -20 -37 73 -51 94 -75
+94 -108 0 -56 35 -55 63 1 26 50 111 71 150 37 14 -13 36 -18 79 -18 46 0 62
+-4 69 -18 9 -15 5 -17 -24 -17 -21 0 -41 -7 -52 -20 -23 -25 -37 -25 -60 0
+-22 24 -63 23 -79 -2 -14 -23 15 -54 62 -65 44 -10 62 -41 66 -109 3 -53 12
+-60 81 -69 27 -4 70 -18 94 -32 44 -26 44 -26 78 -7 19 10 41 31 49 46 15 28
+54 54 107 69 21 6 46 3 89 -12 l59 -19 33 25 c19 14 51 29 73 32 70 11 67 6
+103 170 7 29 17 57 24 62 10 8 168 13 406 11 14 0 40 5 58 11 34 11 36 16 16
+63 -6 17 -4 18 17 12 50 -16 80 -18 94 -6 22 18 45 4 45 -26 0 -15 7 -36 17
+-46 15 -17 15 -19 -1 -37 -17 -18 -16 -22 21 -87 56 -98 71 -107 163 -94 119
+17 117 16 123 52 22 145 26 155 87 208 45 39 59 59 65 87 10 57 23 73 71 94
+59 26 78 57 80 133 2 33 3 66 3 73 2 29 43 50 108 57 36 4 82 14 102 22 20 9
+57 22 82 30 26 8 52 21 59 29 9 11 33 15 87 15 l75 0 -6 48 c-8 58 6 107 39
+142 15 15 33 52 41 82 17 66 6 106 -50 191 -47 72 -61 122 -47 173 15 58 59
+95 122 105 84 13 126 65 163 199 9 34 30 72 52 98 l36 43 -17 68 c-11 47 -15
+86 -10 123 6 46 4 56 -14 72 -15 14 -21 31 -21 62 0 36 5 47 34 71 47 39 76
+101 76 162 0 66 -14 80 -80 73 -48 -4 -105 4 -203 29 -58 15 -104 63 -152 159
+-36 71 -63 106 -78 99 -1 0 -11 -4 -22 -9z"/>
+<path id="area_Oxford" class="area"
+ d="M10265 8370 c-11 -5 -32 -9 -46 -9 -19 -1 -30 -9 -38 -30 -19 -44
+-90 -68 -119 -39 -16 16 -106 -15 -143 -48 -29 -28 -73 -31 -123 -10 -43 18
+-75 4 -89 -39 -14 -41 -83 -116 -157 -171 -57 -42 -61 -48 -54 -72 15 -50 7
+-100 -20 -133 -30 -36 -30 -36 -11 -82 8 -20 15 -57 15 -82 0 -26 9 -63 19
+-84 20 -39 32 -95 51 -256 6 -49 18 -130 27 -180 24 -145 -4 -270 -92 -408
+-48 -76 -49 -82 -13 -165 29 -69 24 -131 -13 -178 -26 -33 -30 -44 -25 -77 9
+-51 37 -105 75 -141 30 -29 31 -29 143 -27 115 2 148 12 148 49 0 8 30 45 68
+83 37 37 79 82 94 99 20 22 35 30 61 30 41 0 64 -22 79 -76 5 -21 23 -57 38
+-79 87 -128 92 -235 11 -261 -53 -17 -19 -29 84 -29 50 0 96 -4 103 -8 6 -5
+12 -24 12 -43 0 -27 7 -41 30 -61 34 -28 38 -58 16 -119 -7 -22 -17 -58 -20
+-81 -7 -38 -4 -46 43 -112 28 -39 51 -75 51 -79 0 -17 40 -45 87 -62 27 -10
+63 -24 81 -31 26 -11 36 -11 50 -1 9 7 36 21 58 32 23 11 46 25 52 32 5 7 20
+56 32 108 12 52 27 106 34 120 13 27 -14 25 327 31 35 0 53 21 78 90 12 31 39
+79 61 109 26 35 43 71 51 109 18 88 28 115 54 151 14 19 25 40 25 48 0 7 -18
+29 -39 49 -80 72 -93 167 -31 238 32 37 32 69 -1 132 -17 32 -37 90 -44 128
+-19 97 -21 100 -76 140 -28 20 -62 56 -77 80 l-27 45 -71 0 c-39 0 -91 7 -115
+15 -24 9 -71 19 -104 22 -95 9 -105 16 -105 63 0 23 -7 54 -15 70 -11 22 -13
+47 -9 102 l6 73 -36 37 c-32 33 -36 43 -36 89 0 28 5 69 12 91 11 36 10 41
+-14 65 -20 19 -38 26 -82 29 -70 5 -147 42 -164 79 -20 43 -15 152 8 201 l21
+42 -26 47 c-14 27 -25 54 -25 61 0 7 -11 26 -25 42 -39 46 -55 95 -55 165 0
+80 -15 98 -65 77z"/>
+<path id="area_Essex" class="area"
+ d="M13494 8234 c-48 -53 -51 -55 -119 -65 -38 -6 -106 -24 -150 -41 -52
+-19 -107 -32 -157 -35 l-78 -6 -54 57 c-30 31 -61 56 -69 56 -18 0 -67 -40
+-117 -94 -36 -41 -83 -66 -122 -66 -12 0 -52 18 -90 41 -51 31 -81 42 -125 46
+l-58 5 -33 -71 c-24 -53 -43 -79 -75 -102 -51 -36 -77 -81 -77 -132 0 -20 -16
+-78 -35 -127 -19 -49 -35 -93 -35 -98 0 -5 14 -21 31 -38 17 -16 49 -52 70
+-81 21 -28 56 -64 79 -80 48 -34 76 -88 85 -165 7 -64 4 -61 110 -78 122 -20
+168 -20 253 -4 97 19 174 14 212 -14 30 -23 69 -113 70 -162 0 -20 -7 -46 -17
+-59 -16 -23 -15 -25 27 -59 47 -40 70 -84 70 -136 0 -25 12 -52 45 -98 25 -35
+53 -81 64 -103 10 -22 35 -56 55 -75 35 -33 36 -37 35 -95 -2 -33 1 -70 5 -83
+9 -27 49 -49 106 -58 30 -5 52 -18 83 -49 55 -55 76 -65 134 -65 31 0 60 -7
+83 -21 19 -12 58 -29 85 -39 38 -12 54 -24 65 -48 8 -17 34 -48 58 -70 40 -37
+42 -42 42 -95 0 -53 2 -58 39 -89 37 -30 43 -32 122 -33 63 -1 104 -8 162 -28
+l78 -27 59 53 c33 29 69 65 81 81 l22 27 -32 33 c-47 48 -42 69 23 91 37 12
+44 31 15 38 -31 8 -13 27 27 27 25 0 44 9 72 34 34 31 37 39 35 82 -1 26 4 59
+11 73 8 16 10 34 5 46 -4 11 -8 46 -8 77 -1 90 -42 113 -103 59 -47 -40 -69
+-50 -132 -57 -35 -4 -62 -14 -72 -25 -36 -39 -175 -12 -143 28 9 10 25 13 53
+10 30 -3 47 1 61 14 11 9 52 25 90 35 91 23 121 50 128 115 6 52 30 82 91 115
+52 28 176 20 176 -11 0 -11 -13 -15 -52 -15 -35 0 -69 -9 -109 -27 -62 -30
+-75 -53 -37 -70 17 -7 39 -2 102 25 45 19 88 41 97 49 14 12 18 10 29 -17 22
+-54 34 -55 190 -19 32 7 68 24 85 39 17 15 41 30 55 33 14 4 52 36 85 73 33
+37 77 87 98 110 20 22 37 49 37 58 0 9 -16 24 -35 33 -45 22 -60 10 -44 -36 8
+-22 8 -36 1 -43 -17 -17 -32 1 -32 42 0 24 -5 40 -15 44 -11 4 -15 -2 -15 -24
+0 -39 -18 -48 -30 -15 -8 22 -6 32 11 56 11 16 26 29 34 29 7 0 23 20 35 44
+11 24 28 50 36 56 22 19 17 28 -23 46 -24 10 -51 13 -73 9 -45 -8 -141 -22
+-205 -30 -40 -6 -54 -4 -64 8 -29 36 9 46 211 55 76 4 142 12 148 18 12 12 -1
+57 -19 69 -18 10 -13 25 8 25 28 0 51 -27 51 -59 0 -22 9 -34 40 -55 l40 -26
+31 42 c17 24 37 47 45 51 21 12 17 51 -8 79 -23 25 -38 49 -78 120 -16 31 -29
+40 -66 49 -37 10 -52 21 -84 64 -27 36 -49 55 -68 60 -16 3 -40 17 -52 30 -25
+27 -54 21 -65 -14 -3 -11 -28 -36 -56 -55 -65 -48 -128 -49 -236 -6 -41 17
+-90 30 -109 30 -20 0 -44 5 -54 10 -19 10 -50 99 -65 181 -4 19 -10 41 -14 48
+-8 13 -101 33 -234 51 -77 11 -140 41 -155 75 -6 13 -14 39 -18 59 -4 24 -16
+43 -36 57 -33 24 -170 79 -196 79 -38 0 -94 23 -125 49 -76 68 -219 151 -257
+151 -4 0 -29 -25 -56 -56z"/>
+<path id="area_Gloucester" class="area"
+ d="M9363 7732 c-6 -4 -12 -27 -11 -50 1 -55 -35 -95 -99 -112 -25 -6
+-60 -21 -77 -34 -43 -33 -69 -39 -113 -27 -33 9 -44 7 -85 -14 -26 -14 -63
+-25 -83 -25 -39 0 -57 -20 -74 -86 -15 -58 -45 -92 -92 -104 -33 -9 -46 -8
+-86 10 -41 18 -48 19 -63 5 -20 -18 -61 -20 -79 -2 -11 10 -15 9 -19 -3 -3 -8
+-24 -35 -47 -60 -24 -25 -53 -69 -65 -98 -12 -28 -39 -66 -59 -83 -20 -17 -71
+-70 -113 -117 -43 -47 -90 -94 -106 -104 -16 -10 -37 -33 -47 -52 -17 -32 -17
+-37 -3 -83 14 -42 14 -52 1 -83 -24 -58 -43 -81 -81 -96 -63 -25 -67 -29 -64
+-66 4 -41 -9 -54 -69 -71 -35 -10 -44 -18 -51 -42 -10 -39 -80 -120 -130 -151
+-23 -15 -46 -40 -54 -59 -10 -24 -35 -49 -86 -82 -53 -35 -80 -61 -101 -98
+-16 -27 -53 -82 -83 -121 -30 -39 -54 -73 -54 -77 0 -4 13 -13 30 -22 16 -8
+37 -29 45 -45 17 -33 19 -33 159 -50 109 -13 129 -20 198 -66 55 -37 112 -50
+152 -34 57 21 164 121 214 199 33 53 39 75 22 86 -17 10 -11 60 10 82 17 19
+95 43 140 43 31 0 77 -47 84 -85 4 -19 12 -35 18 -35 14 0 140 49 153 61 20
+15 100 31 203 38 84 7 114 14 165 38 52 26 82 33 187 42 96 9 131 16 150 31
+91 70 102 75 169 76 36 1 72 2 79 3 17 1 15 26 -4 42 -8 7 -27 36 -41 63 -37
+72 -34 141 7 201 35 51 37 74 10 134 -32 69 -27 134 15 206 77 131 79 140 80
+265 0 63 -5 153 -12 200 -7 47 -17 128 -23 180 -7 57 -21 116 -36 149 -14 31
+-24 72 -24 100 0 82 -18 108 -57 83z"/>
+<path id="area_Middlesex" class="area"
+ d="M11411 7702 c-5 -9 -12 -35 -16 -57 -11 -72 -15 -83 -31 -99 -9 -10
+-33 -16 -58 -16 -31 0 -48 -6 -62 -21 -10 -12 -39 -32 -64 -45 -31 -16 -39
+-23 -25 -24 70 -1 88 -79 31 -136 -28 -28 -42 -34 -75 -34 -56 0 -186 -27
+-236 -49 -22 -10 -46 -29 -54 -44 -18 -34 -7 -75 22 -82 59 -14 170 -28 249
+-30 96 -2 107 -7 143 -69 13 -23 47 -59 75 -80 61 -47 80 -80 85 -151 3 -37
+14 -69 34 -102 56 -91 58 -159 7 -226 -43 -56 -34 -100 36 -173 55 -57 60 -99
+19 -146 -21 -24 -34 -53 -41 -89 -15 -81 -30 -119 -65 -170 -17 -26 -49 -81
+-71 -122 l-39 -76 23 -30 c12 -17 25 -44 29 -61 7 -39 41 -65 108 -85 29 -8
+72 -31 96 -50 23 -20 51 -41 63 -47 12 -6 42 -29 67 -50 51 -43 92 -58 157
+-58 57 0 77 12 95 58 18 45 62 86 109 101 255 79 349 101 448 104 70 2 80 -1
+142 -35 36 -20 69 -34 72 -31 3 4 6 19 6 34 0 80 41 108 131 89 49 -11 60 -10
+90 6 74 39 151 20 182 -45 16 -34 59 -39 113 -12 45 23 77 19 103 -13 7 -8 29
+-19 49 -22 20 -4 62 -19 94 -34 84 -40 122 -31 167 38 29 45 41 54 84 67 28 8
+69 15 92 15 22 0 46 5 52 11 8 8 21 8 46 0 37 -13 74 -8 120 16 28 14 28 15
+11 34 -9 10 -25 19 -35 19 -22 0 -69 55 -69 81 0 54 -26 112 -63 142 -21 16
+-43 41 -48 54 -5 13 -21 28 -36 34 -16 6 -53 22 -83 36 -30 14 -83 29 -118 33
+-71 9 -108 29 -125 68 -16 36 -25 42 -72 42 -84 0 -135 62 -135 165 0 53 -2
+59 -40 92 -25 23 -45 53 -55 83 -9 26 -25 56 -36 66 -41 37 -62 77 -76 142
+-12 61 -18 70 -68 115 -60 53 -66 74 -35 114 23 29 24 43 9 95 -7 26 -19 43
+-39 53 -33 17 -109 20 -159 5 -95 -27 -374 -1 -414 38 -13 14 -21 38 -24 74
+-7 89 -11 97 -86 171 -40 40 -79 86 -88 102 -8 17 -31 39 -51 49 -35 19 -35
+19 -66 -4 -25 -18 -50 -25 -112 -29 -79 -6 -82 -7 -113 -45 -27 -31 -39 -38
+-68 -38 -38 0 -86 20 -113 47 -21 21 -21 83 0 106 15 16 13 18 -32 25 -57 8
+-90 37 -99 88 -6 29 -12 36 -31 36 -13 0 -28 -8 -33 -18z"/>
+<path id="area_Glamorgan" class="area"
+ d="M5520 7558 c-19 -5 -44 -18 -55 -27 -11 -10 -35 -21 -54 -25 -18 -3
+-45 -17 -60 -31 -113 -109 -142 -135 -151 -135 -5 0 -13 -18 -16 -41 -4 -22
+-18 -54 -32 -70 -25 -30 -25 -30 -119 -27 -101 3 -112 -2 -113 -52 -1 -34 -32
+-101 -59 -124 -24 -21 -27 -64 -10 -115 21 -59 -38 -113 -93 -85 -37 19 -71
+17 -99 -5 -13 -10 -35 -22 -49 -26 -14 -4 -52 -18 -86 -31 -34 -13 -87 -26
+-118 -30 -31 -4 -58 -10 -60 -13 -3 -4 -9 -42 -15 -86 -14 -96 -29 -122 -91
+-148 -44 -18 -48 -23 -53 -61 -5 -34 -16 -50 -76 -106 -67 -62 -71 -68 -82
+-128 -6 -34 -16 -65 -20 -68 -13 -7 32 -64 63 -80 15 -8 45 -14 66 -14 45 0
+73 -23 53 -43 -20 -20 -113 -49 -171 -54 -64 -5 -110 9 -117 37 -7 28 -14 25
+-47 -20 -17 -22 -35 -40 -40 -40 -32 -1 -39 -17 -27 -63 11 -38 11 -49 -3 -75
+-16 -30 -15 -31 17 -50 17 -11 43 -23 57 -27 14 -4 37 -16 52 -27 20 -14 34
+-17 50 -11 13 4 45 8 73 8 47 0 50 1 55 30 5 28 9 30 52 33 31 2 56 -3 72 -13
+20 -14 34 -15 83 -6 32 6 75 13 96 16 36 6 37 7 31 43 -3 24 -1 43 8 53 17 21
+145 60 220 66 58 6 58 6 98 -38 23 -24 48 -57 56 -74 8 -16 21 -41 29 -55 8
+-14 15 -34 15 -46 0 -11 12 -31 26 -45 21 -20 25 -30 20 -60 -6 -38 9 -65 67
+-121 40 -39 60 -48 111 -48 42 0 48 -3 71 -38 14 -22 37 -45 51 -52 13 -8 38
+-34 54 -59 56 -88 56 -88 113 -95 29 -4 67 -14 83 -22 77 -42 434 -52 501 -16
+12 7 50 15 85 18 76 8 88 20 88 88 0 28 6 62 13 75 6 13 55 56 109 95 105 78
+183 138 239 185 35 30 37 30 53 12 37 -41 252 -35 306 9 14 11 72 43 130 71
+148 74 176 98 180 157 4 49 3 95 0 161 -2 26 5 51 19 75 19 31 21 42 14 78
+-12 56 -2 99 31 138 14 17 26 38 26 45 0 7 -18 36 -40 64 -85 107 -60 149 133
+225 28 11 37 21 37 39 0 33 -30 118 -52 146 -36 46 -16 96 53 131 21 11 39 23
+39 27 0 3 -21 3 -46 0 -64 -7 -84 14 -84 86 0 33 -6 62 -17 77 -9 14 -17 26
+-18 28 -1 1 -37 6 -81 12 l-79 9 -70 76 c-64 69 -75 77 -130 91 -33 9 -75 24
+-93 35 -18 10 -41 19 -50 19 -9 0 -45 13 -79 29 -47 22 -83 31 -151 36 -87 7
+-90 7 -97 -15 -4 -12 -22 -39 -40 -59 -18 -20 -42 -56 -54 -81 -13 -28 -34
+-53 -54 -65 -17 -10 -45 -33 -60 -52 -33 -38 -46 -40 -101 -14 -23 10 -62 26
+-89 36 -32 11 -52 26 -62 45 -8 15 -27 33 -42 38 -47 19 -64 38 -86 104 -19
+55 -28 67 -71 94 -26 18 -60 44 -75 58 -22 21 -36 26 -77 25 -27 0 -65 -5 -84
+-11z"/>
+<path id="area_Wilts" class="area"
+ d="M9986 6301 c-13 -21 -47 -58 -74 -82 -27 -24 -57 -59 -66 -76 -30
+-60 -54 -68 -205 -68 -114 -1 -140 -4 -163 -19 -22 -15 -38 -16 -91 -11 -63 7
+-65 6 -103 -27 -68 -60 -85 -68 -145 -68 -31 0 -73 -7 -94 -16 -25 -10 -50
+-13 -76 -9 -31 5 -48 2 -77 -15 -20 -12 -58 -29 -85 -37 -53 -16 -67 -33 -93
+-113 -12 -37 -31 -68 -61 -96 -32 -31 -44 -52 -49 -84 -4 -25 -19 -56 -34 -74
+-15 -17 -31 -49 -34 -71 -9 -49 -22 -67 -62 -88 -38 -19 -42 -28 -50 -110 -4
+-44 -1 -74 10 -106 23 -64 21 -114 -8 -148 -13 -15 -30 -42 -39 -58 -14 -29
+-30 -40 -86 -62 -25 -9 -57 -80 -68 -150 -5 -29 -2 -33 37 -53 l42 -21 -5 -52
+c-3 -29 -8 -66 -12 -82 -5 -24 -2 -35 14 -49 28 -25 27 -72 -2 -126 -22 -42
+-34 -50 -99 -64 -24 -6 -28 -11 -28 -43 0 -24 -10 -51 -27 -75 -17 -26 -27
+-53 -27 -80 l-1 -41 51 -12 c28 -6 70 -25 94 -41 36 -24 47 -38 58 -79 8 -28
+16 -52 18 -54 1 -2 16 7 31 19 78 61 138 91 178 88 30 -2 42 -9 51 -26 23 -46
+30 -46 75 -2 l44 43 97 -7 98 -6 20 40 c11 22 33 46 50 55 39 20 134 20 166
+-1 32 -21 119 -22 159 -2 17 8 52 18 79 22 28 3 59 15 70 25 12 10 45 27 74
+37 44 15 58 26 73 55 21 41 58 59 123 59 94 1 124 17 246 133 28 26 63 50 78
+53 34 7 55 23 70 51 16 29 18 163 3 190 -18 35 -14 81 10 93 28 15 59 69 59
+103 0 40 14 61 55 86 25 14 35 27 35 44 0 29 25 93 40 102 13 8 13 52 0 60
+-19 12 -10 44 21 80 17 19 40 35 50 35 24 0 69 43 69 66 0 9 -17 37 -38 63
+-52 62 -117 162 -125 190 -3 12 4 61 16 108 l21 85 -31 27 c-17 14 -33 35 -35
+46 -3 17 -14 21 -63 26 -109 11 -175 51 -175 104 0 39 13 51 63 60 35 7 37 9
+37 47 0 42 -23 89 -71 145 -16 18 -31 48 -35 68 -3 19 -10 35 -15 35 -5 0 -20
+-17 -33 -39z"/>
+<path id="area_Somerset" class="area"
+ d="M8170 5873 c-23 -9 -30 -25 -19 -44 5 -10 9 -28 9 -40 0 -31 -88
+-166 -135 -205 -108 -91 -141 -113 -176 -119 -50 -9 -130 15 -189 55 -65 45
+-84 51 -191 60 -110 10 -136 20 -164 62 -11 17 -32 37 -47 46 -25 15 -28 15
+-47 -2 -11 -10 -23 -31 -26 -47 -4 -16 -22 -47 -41 -70 -24 -29 -34 -51 -34
+-75 0 -45 -22 -56 -99 -48 -51 6 -62 4 -67 -10 -8 -21 -61 -49 -79 -42 -7 2
+-20 -11 -31 -32 -26 -52 -44 -72 -64 -72 -13 0 -19 -11 -24 -41 -5 -29 -19
+-54 -50 -86 -40 -43 -47 -46 -107 -52 l-64 -6 3 -35 c2 -28 -3 -41 -22 -60
+-17 -15 -26 -34 -26 -55 0 -35 -15 -55 -42 -55 -20 0 -23 -11 -7 -27 6 -6 12
+-56 14 -115 1 -57 8 -117 16 -135 11 -28 11 -36 -7 -68 -22 -43 -38 -52 -59
+-35 -12 10 -24 10 -59 0 -32 -9 -53 -9 -82 -1 -74 21 -141 13 -273 -30 -117
+-38 -131 -40 -201 -35 -62 6 -129 12 -161 15 -4 1 -31 19 -60 41 -30 22 -60
+40 -68 40 -8 0 -22 6 -30 14 -9 7 -46 23 -82 35 -63 21 -68 21 -134 6 -77 -18
+-118 -14 -255 27 -41 12 -100 22 -130 23 -50 0 -55 -2 -52 -20 2 -11 7 -51 12
+-90 5 -43 18 -89 34 -119 23 -43 26 -61 26 -142 0 -51 4 -104 10 -118 12 -32
+56 -59 136 -86 72 -24 98 -49 114 -110 17 -64 86 -140 165 -184 76 -42 83 -43
+132 -16 21 11 45 20 54 20 28 0 66 -38 84 -82 20 -52 52 -88 77 -88 11 0 25
+16 39 45 14 30 29 47 46 51 34 9 121 -4 168 -25 22 -10 74 -26 115 -36 88 -21
+136 -43 169 -79 22 -24 25 -24 52 -11 15 8 45 15 66 15 40 0 54 7 120 53 22
+15 67 33 102 40 57 12 65 17 99 62 32 41 47 52 107 73 84 29 227 40 303 23 71
+-15 180 1 252 37 40 20 63 40 86 75 18 27 42 59 54 72 32 34 109 50 189 37 35
+-5 98 -10 140 -11 42 -1 93 -6 114 -12 21 -5 65 -11 97 -12 76 -2 100 18 107
+89 3 29 14 58 26 71 12 14 22 42 25 73 5 57 6 58 70 73 38 10 51 19 66 48 l19
+35 -23 32 c-22 29 -23 35 -12 83 18 75 16 85 -19 99 -17 7 -37 19 -45 27 -18
+19 -18 83 0 109 8 12 20 43 27 70 15 63 23 72 71 85 28 7 45 19 56 41 9 17 28
+44 41 60 17 21 22 35 17 56 -22 88 -24 114 -20 177 8 104 11 113 53 139 29 18
+40 34 45 59 4 19 18 52 32 73 15 21 33 60 40 85 9 28 26 58 43 72 29 24 101
+148 101 173 0 28 -47 25 -150 -12 -58 -20 -117 -45 -132 -55 -28 -21 -79 -25
+-108 -9 -10 5 -21 22 -25 37 -15 64 -51 86 -105 66z"/>
+<path id="area_Sussex" class="area"
+ d="M11130 5604 c-15 -8 -41 -12 -65 -9 -161 18 -155 19 -155 -8 0 -14
+-7 -57 -16 -97 -19 -82 -56 -134 -114 -157 -19 -8 -45 -24 -57 -35 -28 -26
+-83 -26 -129 1 -47 28 -55 27 -82 -14 -13 -21 -42 -45 -70 -58 -42 -20 -47
+-26 -44 -52 7 -69 4 -85 -21 -114 -14 -17 -33 -56 -41 -86 -13 -44 -23 -58
+-49 -71 -43 -22 -41 -19 -42 -70 -2 -37 -8 -51 -39 -83 l-37 -37 16 -37 c12
+-30 14 -54 7 -132 -11 -113 -24 -138 -89 -159 -31 -10 -58 -28 -76 -51 -15
+-19 -34 -35 -41 -35 -7 0 -33 -22 -57 -48 -42 -47 -47 -49 -124 -62 -114 -17
+-119 -18 -131 -19 -19 -2 -23 -24 -12 -80 7 -39 6 -65 -5 -104 -8 -29 -18 -72
+-21 -97 -6 -41 -4 -49 19 -70 21 -19 25 -33 25 -76 0 -52 1 -54 66 -119 53
+-53 69 -64 80 -54 11 9 14 7 14 -14 0 -29 72 -119 117 -147 15 -10 39 -29 52
+-44 14 -14 31 -26 39 -26 43 0 101 -29 153 -77 31 -29 63 -53 70 -53 8 0 31
+-9 51 -20 33 -18 39 -18 53 -4 22 23 18 59 -11 104 -14 21 -24 47 -22 57 3 16
+13 18 78 15 41 -2 76 -5 79 -7 2 -2 -15 -26 -38 -54 -35 -41 -40 -53 -32 -73
+15 -39 34 -49 80 -42 44 7 45 7 56 95 7 58 64 121 93 103 38 -24 19 -144 -23
+-144 -19 0 -20 -16 -1 -23 27 -11 159 -20 154 -11 -52 111 -58 147 -27 167 28
+17 49 1 49 -37 0 -25 6 -38 19 -46 18 -9 20 -6 23 27 4 47 25 54 42 13 9 -22
+26 -38 56 -51 54 -24 59 -24 91 7 42 40 71 6 31 -34 -14 -14 -41 -21 -98 -26
+-74 -7 -114 -24 -114 -48 0 -5 17 -16 37 -25 21 -8 51 -26 66 -39 16 -13 35
+-24 44 -24 8 0 30 -16 48 -36 24 -26 42 -36 66 -37 32 -2 33 -1 44 53 l10 54
+80 33 c44 18 91 33 105 33 14 1 43 9 65 20 22 11 54 19 70 20 17 0 55 10 85
+22 49 20 73 23 210 24 169 0 226 11 359 65 51 22 91 31 135 32 80 1 240 -21
+291 -40 22 -9 84 -31 138 -49 53 -19 108 -41 122 -50 14 -9 32 -13 41 -10 22
+8 145 -29 177 -54 14 -11 37 -20 50 -20 14 0 61 -13 104 -30 93 -36 115 -37
+145 -7 13 13 41 37 63 54 22 17 51 50 65 74 14 24 52 69 85 101 l59 57 -30 38
+c-37 46 -68 63 -114 63 -20 0 -45 7 -57 15 -29 20 -57 97 -49 131 4 14 2 41
+-4 59 -8 25 -20 36 -55 49 -94 36 -123 78 -134 196 -7 66 -13 85 -39 118 -20
+24 -45 43 -70 50 -50 15 -68 36 -82 96 -15 66 -32 96 -80 140 l-41 37 -97 -3
+c-113 -2 -163 15 -197 69 -11 18 -29 47 -40 65 -12 19 -43 44 -80 62 -61 31
+-75 49 -106 134 -7 18 -29 50 -51 70 -25 25 -40 48 -43 70 -6 49 -19 60 -74
+60 -56 0 -75 9 -157 73 -55 44 -62 53 -67 94 -4 24 -18 62 -31 83 l-24 39 -84
+5 c-58 4 -100 13 -138 30 -51 23 -79 43 -185 131 -22 19 -71 44 -110 57 -38
+12 -78 30 -89 39 -25 22 -46 65 -46 94 0 14 -6 29 -12 35 -22 18 -81 22 -108
+6z"/>
+<path id="area_Kent" class="area"
+ d="M12930 5529 c-20 -17 -33 -20 -70 -15 -102 13 -95 15 -98 -31 -2 -31
+-10 -48 -29 -63 -37 -29 -68 -25 -158 20 -87 43 -69 42 -230 16 -16 -2 -57
+-14 -90 -26 -33 -12 -88 -26 -123 -31 -69 -10 -142 -42 -142 -62 0 -7 -9 -30
+-20 -52 -25 -49 -25 -45 4 -87 13 -19 26 -52 30 -74 8 -43 52 -96 101 -121 17
+-9 61 -22 99 -29 95 -18 116 -34 116 -85 0 -33 7 -47 44 -87 30 -32 46 -60 51
+-87 9 -49 28 -72 67 -80 43 -10 93 -58 130 -126 l33 -59 80 -1 c119 0 168 -11
+224 -50 43 -29 53 -43 76 -102 14 -38 25 -74 25 -81 0 -17 29 -42 60 -51 33
+-10 78 -52 100 -95 20 -40 40 -126 40 -174 0 -38 18 -57 75 -81 53 -21 95 -63
+95 -93 0 -35 22 -156 30 -165 4 -4 35 -11 70 -15 60 -7 66 -10 95 -48 16 -23
+35 -49 40 -59 10 -16 15 -16 46 -6 19 6 64 16 100 21 242 35 311 59 387 133
+88 85 149 217 123 265 -16 29 6 42 69 42 46 0 61 -4 78 -22 23 -25 56 -43 197
+-107 70 -32 103 -41 144 -41 l53 0 -8 48 c-35 191 37 353 190 430 37 19 73 31
+81 28 7 -2 31 1 52 9 21 7 57 18 81 25 24 6 54 24 69 41 15 17 36 29 51 29 40
+0 133 31 139 46 8 22 113 90 151 99 41 9 57 35 67 105 17 119 -11 280 -62 353
+-21 30 -28 54 -31 103 -5 79 8 103 44 79 34 -22 49 -19 78 16 39 46 37 116 -6
+176 -30 41 -35 44 -67 38 -18 -4 -45 -15 -60 -24 -14 -10 -59 -24 -99 -31 -40
+-8 -75 -17 -78 -22 -3 -4 -29 -8 -57 -8 -89 0 -221 -19 -282 -40 -32 -11 -82
+-20 -112 -20 -47 0 -58 -4 -82 -30 -20 -23 -43 -34 -92 -44 -80 -17 -96 -24
+-103 -42 -7 -19 -30 -18 -68 6 -21 13 -51 20 -83 20 -27 0 -68 7 -91 16 -38
+14 -44 14 -72 0 -31 -16 -32 -15 -48 9 -14 21 -14 28 -3 41 11 14 30 15 119
+11 61 -3 125 -12 153 -22 l48 -17 30 28 c34 32 36 57 10 99 -50 78 -63 87
+-137 95 -45 4 -93 18 -138 39 -84 40 -119 38 -126 -4 -3 -16 -10 -39 -17 -50
+-9 -16 -15 -17 -36 -8 -49 23 -111 -17 -78 -50 13 -13 80 -37 106 -37 11 0 31
+-7 43 -16 58 -40 -68 -55 -145 -16 -29 14 -35 14 -90 -5 -63 -21 -69 -20 -185
+26 -46 17 -25 38 43 43 71 5 114 32 114 71 0 42 15 50 68 35 35 -9 52 -9 71 0
+35 16 35 60 1 92 -21 20 -40 24 -132 31 -60 5 -159 7 -222 6 l-115 -2 -37 -54
+c-65 -93 -69 -96 -159 -96 -66 0 -87 4 -132 27 -29 16 -69 35 -88 43 -19 8
+-43 20 -52 27 -14 10 -23 9 -47 -5 -34 -20 -115 -22 -151 -4 -13 7 -31 26 -40
+42 -8 17 -19 33 -25 37 -18 14 -49 8 -75 -13z"/>
+<path id="area_Cornwall" class="area"
+ d="M4541 4635 c-18 -9 -69 -19 -111 -24 -43 -5 -92 -17 -109 -27 -30
+-18 -32 -18 -75 3 l-45 22 -98 -24 c-54 -14 -115 -25 -135 -25 -20 0 -43 -7
+-52 -15 -13 -14 -13 -20 1 -59 15 -41 15 -46 -1 -70 -9 -15 -30 -29 -46 -33
+-17 -3 -30 -7 -30 -9 0 -3 12 -23 27 -47 16 -26 28 -61 31 -92 5 -56 21 -75
+64 -75 20 0 28 -5 28 -17 0 -10 3 -27 5 -38 3 -11 1 -27 -5 -35 -8 -13 -14
+-10 -36 18 -50 63 -92 42 -217 -111 -30 -37 -49 -50 -93 -63 -57 -16 -87 -13
+-119 16 -11 10 -50 32 -87 49 -59 28 -77 32 -135 29 l-68 -3 -11 -95 c-6 -52
+-23 -131 -38 -174 -26 -75 -27 -83 -18 -175 6 -53 7 -138 3 -189 -7 -82 -10
+-95 -36 -122 -15 -16 -40 -32 -56 -35 -27 -6 -129 -104 -129 -124 0 -20 -63
+-82 -97 -96 -19 -8 -48 -26 -65 -40 -16 -14 -36 -25 -43 -25 -18 0 -35 -31
+-35 -65 0 -39 -23 -86 -62 -128 -33 -34 -40 -37 -92 -37 -35 0 -66 -6 -81 -16
+-17 -11 -35 -14 -57 -10 -70 14 -73 13 -76 -23 -6 -58 19 -122 56 -144 42 -25
+41 -37 -6 -37 -21 0 -43 -5 -50 -12 -13 -13 -15 -9 -12 44 2 40 -24 88 -47 88
+-8 0 -29 -12 -46 -26 -29 -25 -45 -27 -97 -13 -12 3 -14 -5 -12 -41 2 -26 -4
+-61 -13 -84 -9 -22 -14 -49 -10 -66 4 -17 -2 -54 -15 -94 -26 -79 -67 -120
+-110 -111 -21 5 -34 0 -52 -17 -13 -13 -37 -32 -53 -44 -26 -18 -29 -27 -33
+-87 l-4 -67 -51 -37 c-69 -52 -69 -52 -100 -63 -15 -5 -33 -22 -39 -37 -22
+-51 -70 -102 -110 -118 -22 -8 -66 -34 -98 -57 -54 -38 -62 -40 -104 -35 -46
+7 -46 6 -61 -31 -21 -48 -73 -102 -100 -102 -13 0 -37 17 -58 40 -33 37 -39
+40 -89 40 -65 0 -160 -44 -233 -108 -21 -19 -47 -32 -63 -32 -51 0 -70 -12
+-102 -62 -29 -45 -32 -54 -25 -96 12 -73 9 -101 -12 -125 -11 -12 -23 -27 -26
+-33 -9 -15 87 -114 109 -114 18 0 78 17 104 30 9 4 31 11 50 15 84 18 120 55
+125 130 3 55 16 69 69 84 47 12 82 0 144 -53 25 -20 55 -36 69 -36 14 0 58
+-12 98 -26 133 -47 213 -151 207 -266 -3 -48 19 -108 39 -108 5 0 25 -17 44
+-37 32 -35 34 -36 57 -21 13 9 30 34 36 55 18 62 43 78 113 75 32 -1 59 1 59
+6 0 5 18 30 40 55 34 38 40 52 40 89 -1 23 -8 61 -17 83 -23 58 -18 120 13
+160 14 19 35 37 46 41 15 4 18 11 13 27 -12 42 -12 108 2 125 12 16 14 16 28
+-2 8 -11 15 -38 15 -61 0 -53 24 -87 58 -83 20 2 33 18 65 79 42 80 71 109 90
+90 21 -21 46 -11 94 35 45 44 49 46 93 41 25 -3 55 -9 68 -12 18 -6 30 0 57
+29 31 34 35 43 35 93 0 37 5 62 15 73 9 10 18 41 22 70 6 50 8 53 47 71 23 10
+58 19 79 19 34 0 40 -4 53 -36 13 -31 18 -35 37 -28 32 11 163 12 230 2 51 -8
+61 -7 83 11 14 11 42 23 63 27 44 8 65 18 113 56 36 28 40 29 110 23 82 -8
+230 -41 268 -60 32 -17 66 -54 75 -82 8 -30 42 -30 50 0 4 12 17 32 28 45 l21
+22 -27 28 c-15 16 -27 37 -27 48 0 10 -3 29 -6 42 -6 21 -10 22 -50 16 -49 -7
+-59 6 -21 30 42 27 61 27 77 3 74 -115 75 -116 102 -117 34 0 54 -20 62 -63 4
+-19 16 -44 29 -55 12 -12 36 -34 52 -50 46 -44 63 -50 104 -40 70 17 193 18
+226 1 86 -45 115 -87 115 -169 0 -34 4 -44 20 -49 11 -4 33 -18 50 -31 37 -32
+91 -42 108 -21 16 19 56 9 100 -23 l30 -23 35 22 c19 11 48 21 65 21 39 0 45
+10 47 79 1 45 10 72 46 140 37 71 49 87 78 96 23 7 37 21 47 43 13 31 16 33
+49 26 41 -7 75 15 75 49 0 11 14 44 32 75 30 53 30 56 13 68 -11 8 -29 14 -42
+14 -27 0 -63 33 -63 58 0 30 19 85 32 94 7 4 22 8 33 8 11 0 31 7 43 16 l23
+16 -21 32 c-35 58 -20 186 29 239 79 87 128 147 144 176 13 25 22 31 35 26 42
+-17 92 -17 117 -1 15 10 45 20 68 24 39 7 44 12 74 67 17 32 39 65 49 72 10 7
+44 13 76 13 39 0 68 6 85 17 19 13 45 17 97 16 63 -1 74 1 85 19 12 20 8 26
+-47 77 -53 50 -61 63 -73 115 -15 68 -2 206 33 334 11 42 22 87 25 99 7 32
+-32 66 -102 87 -33 9 -101 31 -152 47 -127 40 -147 39 -167 -10 -18 -46 -40
+-61 -90 -61 -47 0 -90 38 -112 101 -24 66 -35 74 -73 55 -16 -9 -54 -16 -83
+-16 -60 0 -91 17 -194 106 -56 49 -70 71 -104 160 -12 33 -30 44 -142 84 -87
+32 -100 56 -113 210 -7 95 -15 133 -29 156 -14 20 -22 56 -27 119 -4 50 -8 91
+-8 92 -1 1 -31 4 -68 8 -38 3 -79 8 -93 10 -14 3 -40 -2 -59 -10z"/>
+<path id="area_Dorset" class="area"
+ d="M9540 4065 c-19 -7 -48 -20 -65 -29 -16 -9 -41 -16 -55 -16 -14 0
+-50 -9 -80 -20 -67 -24 -176 -26 -204 -5 -23 17 -73 19 -110 5 -14 -5 -37 -28
+-51 -50 -37 -58 -60 -66 -144 -50 l-70 13 -47 -42 c-60 -52 -102 -56 -144 -11
+-15 17 -33 30 -40 30 -7 0 -28 -13 -47 -30 -18 -16 -40 -30 -47 -30 -8 0 -21
+-11 -30 -25 -13 -19 -25 -25 -55 -25 -46 0 -71 24 -71 67 0 17 -9 42 -20 55
+-35 45 -92 60 -230 63 -69 2 -154 9 -190 15 -91 18 -338 13 -368 -6 -12 -8
+-32 -35 -44 -60 -24 -52 -67 -85 -153 -115 -50 -17 -87 -21 -259 -23 -224 -4
+-300 -17 -326 -58 -37 -58 -75 -86 -135 -97 -72 -14 -88 -21 -141 -61 -29 -22
+-58 -34 -97 -39 -31 -4 -63 -14 -73 -22 -47 -38 -86 -197 -86 -347 1 -56 3
+-110 6 -120 4 -9 21 -27 40 -39 24 -16 35 -32 40 -59 l7 -37 87 6 c96 6 186
+33 244 73 33 23 44 26 91 20 129 -16 345 -95 406 -149 19 -16 56 -40 83 -52
+26 -12 68 -41 92 -63 25 -23 69 -57 98 -76 29 -19 94 -73 143 -120 50 -47 93
+-86 98 -86 11 0 8 -40 -7 -100 -8 -30 -12 -57 -10 -60 3 -2 22 16 44 40 52 60
+51 84 -5 141 l-45 46 14 54 c23 89 31 92 226 85 91 -3 185 -10 210 -15 25 -6
+70 -8 102 -4 56 5 121 -11 174 -44 11 -7 46 -22 78 -33 33 -11 65 -25 73 -31
+10 -9 27 -7 69 6 30 9 64 15 74 12 11 -3 31 4 45 15 19 15 25 29 25 60 0 24 7
+49 16 59 10 11 14 27 11 42 -10 38 -69 93 -119 112 -37 13 -48 22 -48 38 0 12
+-4 28 -9 36 -8 12 -13 12 -35 -3 -29 -19 -46 -14 -46 13 0 29 35 54 65 47 14
+-3 35 -9 48 -12 18 -4 26 0 36 23 l13 28 34 -37 c41 -45 42 -53 8 -71 -15 -8
+-22 -17 -17 -20 14 -9 82 12 112 34 35 25 166 58 216 53 22 -2 64 -6 93 -10
+l52 -7 0 30 c0 26 5 31 31 37 17 3 61 6 97 6 54 0 78 -6 138 -34 91 -44 106
+-46 113 -21 3 12 24 42 46 68 29 35 48 48 75 52 19 4 50 13 68 21 18 8 44 14
+57 14 28 0 55 13 98 47 20 16 36 21 53 17 35 -9 76 12 102 52 12 20 22 39 22
+43 0 4 -35 42 -77 83 -72 69 -132 129 -175 175 -10 10 -40 44 -68 76 -46 53
+-50 62 -50 108 0 37 -5 53 -20 66 -25 22 -27 96 -5 198 8 39 15 76 15 83 0 15
+-25 14 -70 -3z"/>
+<path id="area_Calais" class="area"
+ d="M14435 2379 c-357 -3 -775 -7 -927 -8 -264 -1 -279 -2 -298 -21 -19
+-19 -20 -33 -20 -278 0 -142 3 -490 7 -772 6 -494 7 -514 26 -533 20 -20 31
+-20 811 -13 435 3 859 8 941 11 83 3 375 7 650 11 286 3 507 10 517 15 17 9
+18 50 18 782 0 683 -2 775 -16 795 l-15 22 -522 -2 c-287 -1 -814 -5 -1172 -9z"/>
+<path id="area_Calais_Land" class="area"
+ d="M16775 4140 c-16 -11 -43 -22 -60 -26 -16 -3 -44 -15 -61 -25 -34
+-21 -99 -25 -151 -10 -24 7 -38 5 -62 -10 -17 -10 -37 -19 -44 -19 -7 0 -37
+-20 -66 -45 -44 -38 -59 -45 -94 -45 -37 0 -47 -6 -103 -62 -34 -35 -70 -71
+-80 -81 -11 -9 -48 -45 -82 -80 -71 -69 -96 -86 -129 -87 -13 0 -29 -10 -38
+-23 -19 -30 -5 -123 26 -174 22 -34 22 -40 10 -112 -7 -42 -16 -100 -20 -128
+-4 -30 -16 -62 -28 -75 -28 -32 -34 -54 -22 -85 5 -15 12 -116 14 -225 2 -116
+9 -206 15 -218 6 -12 24 -23 41 -27 47 -9 98 -80 70 -97 -15 -10 -36 3 -54 34
+-22 37 -44 30 -53 -16 -11 -61 2 -67 151 -64 180 4 181 4 221 -32 l35 -33 6
+-780 c6 -718 5 -783 -11 -812 -32 -64 -5 -61 -651 -69 -627 -7 -607 -5 -675
+-55 -38 -28 -138 -59 -191 -59 -26 0 -60 -5 -76 -12 -15 -6 -64 -14 -108 -18
+-67 -6 -90 -12 -140 -42 -38 -23 -79 -39 -114 -43 -29 -4 -74 -16 -98 -27 -36
+-16 -72 -21 -179 -23 -125 -3 -137 -5 -200 -34 -37 -17 -99 -36 -138 -42 -58
+-9 -76 -16 -98 -40 -15 -16 -33 -29 -41 -29 -28 0 -133 -64 -182 -111 -65 -62
+-155 -129 -175 -129 -8 0 -33 -12 -55 -25 l-40 -25 1918 0 1917 0 0 2080 0
+2080 -37 0 c-21 0 -51 -9 -68 -20z"/>
+<path id="area_France" class="area"
+ d="M2134 18705 c-1256 -12 -1313 -13 -1339 -31 l-26 -19 6 -769 c7 -783
+8 -797 44 -811 18 -7 2831 14 2879 21 23 4 36 12 42 30 12 29 13 672 3 1194
+-8 436 8 401 -175 398 -68 0 -713 -7 -1434 -13z"/>
+<path id="area_North_Sea" class="area"
+ d="M8767 19032 c-75 -3 -84 -15 -29 -43 17 -9 38 -21 45 -28 9 -7 31 -9
+58 -5 35 5 49 2 70 -15 25 -19 27 -26 26 -93 -1 -90 12 -118 56 -118 31 0 63
+-16 103 -53 10 -10 34 -29 51 -43 40 -31 75 -107 72 -154 -2 -19 3 -45 9 -57
+7 -12 12 -35 12 -51 0 -16 10 -42 22 -58 25 -30 34 -87 44 -251 5 -73 3 -96
+-9 -114 -13 -18 -14 -26 -1 -61 8 -22 27 -56 44 -74 40 -46 45 -73 31 -168
+l-13 -80 36 -68 c20 -38 36 -74 36 -79 0 -6 11 -25 25 -43 29 -39 31 -72 8
+-121 -17 -36 -17 -37 10 -85 17 -30 27 -63 27 -88 0 -33 8 -50 40 -87 28 -33
+40 -55 40 -78 0 -39 10 -55 41 -71 31 -15 88 -121 88 -166 1 -19 12 -53 26
+-75 21 -34 24 -53 25 -123 0 -87 17 -169 50 -237 10 -22 26 -84 35 -137 14
+-79 23 -105 48 -140 18 -23 48 -64 67 -92 23 -33 52 -59 83 -75 52 -26 66 -55
+47 -91 -15 -28 -7 -61 26 -99 17 -20 35 -31 52 -31 15 0 42 -9 60 -20 18 -11
+56 -25 83 -31 30 -7 65 -24 90 -45 25 -21 52 -34 69 -34 15 0 33 -7 40 -15 8
+-9 29 -15 55 -15 32 0 52 -7 73 -25 22 -18 55 -30 118 -41 110 -20 135 -29
+181 -65 20 -16 47 -29 60 -29 36 0 95 -34 125 -73 20 -26 37 -36 65 -40 92
+-14 99 -18 169 -95 58 -64 69 -82 74 -120 4 -39 10 -48 42 -66 40 -23 108
+-100 108 -122 0 -9 13 -46 29 -83 16 -37 32 -83 36 -102 4 -19 20 -51 36 -71
+16 -20 29 -48 29 -62 0 -14 5 -36 11 -50 11 -23 88 -78 164 -116 28 -14 30
+-20 35 -83 6 -82 21 -97 125 -127 39 -11 104 -38 145 -59 142 -73 144 -123 7
+-172 -87 -30 -107 -43 -107 -69 0 -9 -11 -34 -25 -54 -30 -44 -31 -67 -5 -125
+11 -24 20 -50 20 -58 0 -8 14 -55 30 -105 17 -49 30 -96 30 -104 0 -8 24 -51
+54 -97 29 -45 63 -104 75 -131 12 -28 46 -76 76 -107 30 -32 55 -62 55 -68 0
+-5 17 -29 38 -53 20 -24 64 -84 97 -132 33 -49 88 -118 122 -155 33 -36 73
+-91 87 -121 15 -30 37 -73 51 -95 19 -30 23 -49 19 -75 -11 -75 -14 -80 -38
+-80 -26 0 -40 13 -51 50 -10 30 -27 45 -85 72 -25 12 -56 30 -71 40 -25 19
+-25 19 -105 -20 -131 -65 -175 -64 -245 6 -21 20 -45 44 -54 52 -8 8 -30 31
+-49 50 -18 19 -51 50 -74 68 -22 18 -53 54 -69 81 -20 37 -34 50 -55 53 -55 8
+-64 -24 -10 -35 21 -4 33 -16 48 -48 18 -42 67 -109 100 -139 9 -8 37 -36 63
+-62 26 -27 53 -48 60 -48 7 0 37 -23 67 -52 34 -32 74 -58 105 -69 38 -14 69
+-38 138 -108 49 -50 97 -91 108 -91 23 0 81 -35 111 -66 17 -18 34 -24 63 -24
+50 0 80 -29 106 -103 12 -36 35 -69 74 -107 48 -48 58 -64 74 -125 10 -38 24
+-82 32 -97 7 -15 13 -35 13 -46 0 -10 15 -39 34 -63 45 -58 101 -188 116 -269
+7 -36 22 -86 33 -113 23 -53 24 -76 10 -192 -9 -71 -8 -83 8 -111 37 -62 13
+-99 -57 -88 -41 6 -48 3 -100 -37 -30 -24 -71 -56 -90 -70 -42 -33 -170 -164
+-213 -218 -26 -33 -33 -51 -35 -93 -1 -41 -5 -54 -19 -56 -19 -4 -23 -17 -7
+-27 6 -3 7 -17 4 -30 -6 -24 2 -30 81 -68 17 -8 36 -21 44 -30 7 -10 19 -17
+25 -17 20 -1 63 -54 95 -117 36 -72 47 -78 141 -65 36 4 89 7 119 6 49 -3 53
+-1 48 18 -3 11 -3 17 0 14 9 -9 82 33 97 57 7 12 16 44 20 72 3 27 17 65 29
+85 13 19 29 60 35 90 7 30 25 77 40 104 26 46 31 50 112 77 47 15 101 28 121
+29 20 0 56 7 80 16 80 28 131 34 167 18 19 -8 44 -11 57 -8 13 3 37 -1 53 -10
+23 -12 61 -16 154 -15 68 0 139 -5 158 -11 46 -13 50 -13 50 5 0 27 117 25
+225 -5 44 -12 125 -25 180 -30 55 -4 129 -15 165 -23 36 -8 90 -18 120 -22 76
+-9 188 -68 221 -115 18 -25 37 -39 59 -44 31 -6 68 -32 137 -96 18 -17 38 -30
+45 -30 25 0 162 -97 214 -151 30 -31 70 -64 89 -75 33 -17 87 -83 172 -208 18
+-26 33 -51 33 -55 0 -4 13 -27 29 -52 25 -37 31 -61 42 -152 10 -88 9 -113 -1
+-132 -16 -30 -1 -109 36 -189 28 -60 30 -100 8 -170 -9 -28 -22 -71 -30 -96
+-8 -25 -13 -76 -12 -115 2 -55 -1 -78 -18 -110 -47 -90 -88 -162 -110 -195
+-16 -24 -26 -61 -34 -120 -6 -47 -15 -103 -20 -125 -5 -22 -10 -83 -10 -136 0
+-86 -2 -98 -25 -129 -14 -19 -25 -42 -25 -52 0 -10 -17 -37 -38 -61 -88 -97
+-141 -169 -157 -211 -9 -24 -27 -49 -38 -56 -12 -6 -40 -38 -61 -71 -22 -33
+-52 -67 -68 -75 -15 -8 -28 -19 -28 -24 0 -5 -17 -27 -37 -48 -21 -22 -46 -51
+-56 -66 -18 -26 -50 -35 -62 -16 -11 17 -35 11 -35 -9 0 -10 -7 -24 -16 -32
+-14 -12 -44 -61 -44 -74 0 -3 4 -5 10 -5 19 0 90 -84 90 -108 0 -14 -18 -42
+-44 -70 -150 -158 -186 -192 -200 -192 -8 0 -29 -13 -46 -30 -17 -16 -40 -32
+-53 -34 -12 -2 -57 -11 -100 -20 -100 -21 -119 -20 -150 4 -32 25 -51 25 -107
+-3 -29 -15 -44 -27 -41 -37 3 -8 3 -48 2 -88 -1 -40 3 -88 9 -108 9 -27 9 -42
+0 -63 -6 -16 -13 -57 -14 -92 -2 -57 0 -66 21 -82 38 -31 27 -73 -37 -138 -14
+-14 -34 -38 -46 -54 -16 -22 -30 -30 -53 -31 -24 -1 -37 -8 -50 -28 -20 -30
+-147 -146 -160 -146 -4 0 -45 13 -91 30 -49 18 -103 30 -132 30 -42 0 -50 -3
+-58 -25 -5 -13 -27 -36 -50 -51 -22 -15 -38 -29 -35 -32 3 -3 51 -9 107 -13
+97 -6 103 -8 128 -36 14 -16 30 -38 36 -49 9 -15 14 -17 26 -7 21 18 120 0
+183 -32 30 -17 74 -28 115 -32 60 -6 68 -9 103 -47 67 -71 82 -128 46 -174
+-18 -24 -19 -27 -5 -30 10 -2 31 1 48 7 17 6 42 11 55 11 13 0 34 11 46 23 32
+35 60 47 110 47 24 0 70 9 103 20 64 22 194 40 314 44 49 1 95 9 132 24 78 30
+194 31 231 2 88 -69 36 -270 -67 -258 -31 3 -35 1 -40 -24 -7 -34 0 -53 32
+-96 41 -56 83 -291 61 -344 -16 -38 -2 -83 34 -114 32 -26 42 -38 151 -178 32
+-42 73 -85 91 -96 18 -11 38 -34 45 -50 7 -16 27 -39 44 -50 18 -10 51 -42 75
+-70 47 -56 59 -60 87 -29 10 12 39 33 64 47 25 14 48 31 52 37 4 5 8 3366 8
+7467 0 5955 -3 7458 -12 7465 -12 7 -7467 12 -7631 5z"/>
+<path id="area_Irish_Sea" class="area"
+ d="M968 16999 c-14 -8 -18 -23 -18 -69 0 -52 3 -61 26 -77 71 -50 83
+-65 104 -129 14 -42 37 -83 64 -113 22 -26 54 -72 71 -103 l29 -56 58 -6 c56
+-7 59 -9 113 -74 54 -64 56 -69 51 -111 -3 -24 -6 -69 -6 -101 0 -47 -5 -65
+-32 -105 -27 -40 -44 -54 -107 -82 -146 -66 -178 -84 -218 -126 -23 -23 -44
+-53 -48 -67 -4 -14 -14 -33 -23 -42 -14 -16 -14 -18 1 -18 9 0 24 12 34 26 18
+27 139 90 202 105 22 5 69 4 118 -3 78 -10 85 -10 126 12 32 17 51 21 72 16
+50 -13 117 -97 136 -171 25 -102 39 -139 64 -175 24 -35 30 -55 36 -138 5 -53
+8 -98 9 -99 0 -1 14 -18 31 -38 52 -59 49 -141 -7 -225 -27 -39 -29 -65 -12
+-122 10 -35 9 -45 -10 -81 -11 -23 -23 -53 -26 -67 -7 -35 -42 -70 -70 -70
+-25 0 -36 -16 -36 -53 -1 -50 -79 -154 -147 -197 -29 -18 -53 -36 -53 -41 0
+-14 -31 -39 -50 -39 -10 0 -33 12 -50 26 -31 27 -32 27 -150 21 -128 -7 -162
+-16 -195 -50 -37 -38 -46 -65 -52 -160 -9 -171 -47 -249 -161 -333 -42 -32
+-93 -73 -113 -91 -35 -33 -39 -34 -104 -31 l-68 3 -9 -33 c-6 -22 -22 -41 -51
+-59 -23 -16 -45 -32 -49 -38 -4 -5 -8 -261 -8 -567 l0 -556 23 -29 c13 -15 30
+-41 38 -58 14 -28 18 -30 63 -27 35 2 53 -2 68 -15 24 -22 48 -77 48 -111 0
+-13 5 -43 12 -65 12 -39 12 -40 -25 -71 -32 -27 -38 -37 -36 -66 3 -42 -7 -76
+-32 -112 -31 -43 -25 -90 16 -132 19 -20 41 -36 48 -36 20 0 67 -71 67 -102 0
+-38 -18 -47 -100 -51 -99 -5 -150 -33 -150 -82 0 -30 5 -36 43 -53 23 -11 50
+-23 60 -26 20 -6 46 -61 54 -113 5 -28 1 -39 -22 -63 l-29 -30 22 -39 c12 -21
+22 -45 22 -53 0 -7 11 -30 25 -50 14 -20 25 -49 25 -64 0 -15 13 -48 30 -73
+55 -86 61 -111 44 -172 -8 -30 -18 -103 -23 -164 l-8 -110 48 -45 c48 -45 49
+-47 49 -106 0 -64 -6 -77 -72 -153 -32 -37 -38 -51 -38 -88 0 -35 -14 -74 -65
+-176 -35 -73 -73 -140 -85 -149 -16 -15 -20 -30 -20 -83 0 -78 -31 -167 -72
+-208 l-28 -29 0 -4172 c0 -3232 3 -4175 12 -4184 7 -7 31 -12 55 -12 52 0 88
+29 79 63 -22 75 -19 113 13 169 34 59 62 78 117 78 26 0 44 8 66 30 17 17 44
+38 62 46 17 8 51 26 76 40 76 42 220 28 220 -20 0 -8 6 -19 14 -25 24 -20 53
+4 86 69 31 61 56 78 89 61 32 -18 45 -13 116 39 37 28 74 50 81 50 21 0 71 48
+84 82 19 48 39 67 82 78 21 6 38 15 38 19 0 5 15 18 33 29 30 17 35 26 46 92
+8 41 20 78 30 86 9 8 36 31 61 53 36 31 51 38 75 34 22 -3 35 1 51 19 27 30
+54 115 47 151 -3 15 2 52 12 82 13 44 15 62 6 87 -9 26 -8 35 4 47 12 12 22
+13 55 5 34 -10 43 -8 72 11 18 12 45 29 61 39 15 9 27 25 27 35 0 10 9 26 20
+36 19 17 26 18 66 7 41 -11 48 -10 72 9 22 17 36 20 77 15 27 -3 55 -3 61 1
+32 24 66 86 74 138 10 63 23 85 51 85 10 0 31 12 46 26 15 14 41 32 58 39 16
+7 42 25 57 41 46 49 118 137 118 145 0 4 23 18 51 30 75 34 82 54 79 218 -5
+246 -5 243 19 296 15 32 27 87 33 154 14 134 21 141 120 137 60 -3 86 -11 148
+-42 41 -20 86 -45 100 -55 48 -35 136 3 177 77 12 21 47 59 77 84 55 45 55 45
+56 101 0 48 -5 62 -35 105 -19 27 -35 54 -35 60 0 17 26 35 55 39 43 4 51 20
+32 60 -22 46 -21 57 3 87 16 21 31 26 87 32 37 3 103 15 146 26 71 18 81 18
+121 5 41 -14 47 -14 91 5 26 11 64 20 85 20 22 0 61 5 87 10 26 6 104 13 173
+16 239 10 271 8 340 -16 65 -24 91 -25 290 -19 46 2 133 -24 161 -48 8 -7 23
+-13 32 -13 8 0 28 -10 44 -23 52 -43 79 -55 133 -62 133 -16 303 -3 337 27 38
+32 81 41 166 34 106 -9 122 -9 182 -1 63 9 80 27 60 66 -10 19 -15 59 -15 124
+0 82 -3 100 -22 125 -25 34 -15 54 32 64 25 5 30 10 30 36 0 18 9 39 22 52 15
+15 21 32 20 56 -4 50 11 62 78 62 56 0 60 2 99 42 34 36 41 50 41 84 0 44 14
+64 43 64 10 0 47 29 81 65 73 74 95 85 177 85 56 0 59 1 59 25 0 14 14 41 34
+62 18 21 40 57 47 81 7 24 34 67 61 98 26 30 48 59 48 65 0 5 -26 -11 -57 -36
+-32 -24 -69 -53 -83 -63 -40 -29 -176 -102 -191 -102 -8 0 -33 -15 -56 -34
+-35 -27 -57 -36 -120 -45 -69 -10 -175 -6 -219 10 -17 6 -93 -41 -133 -83 -20
+-20 -61 -51 -91 -69 -94 -56 -140 -98 -140 -128 0 -40 -35 -123 -60 -143 -12
+-10 -39 -18 -59 -18 -20 0 -56 -9 -80 -20 -85 -39 -436 -29 -520 15 -16 8 -54
+18 -85 23 -60 10 -86 27 -121 82 -12 19 -52 65 -88 102 -48 49 -70 65 -84 62
+-11 -3 -39 0 -62 6 -38 10 -48 20 -92 88 -27 42 -49 87 -49 100 0 12 -9 30
+-20 39 -11 9 -24 40 -30 69 -6 29 -18 58 -26 64 -7 7 -14 18 -14 24 -1 6 -19
+31 -41 55 -39 43 -40 44 -92 38 -28 -3 -83 -15 -120 -28 l-68 -22 7 -44 c8
+-56 -6 -73 -59 -73 -22 0 -67 -5 -100 -12 -52 -11 -62 -10 -89 5 -46 27 -77
+22 -89 -13 -12 -33 -34 -43 -87 -39 -20 2 -50 0 -67 -4 -24 -6 -48 1 -125 40
+-63 32 -100 57 -110 75 -14 25 -13 29 8 49 15 13 21 27 17 38 -4 9 -9 32 -12
+52 -5 33 -2 39 23 55 16 10 43 33 61 52 35 37 55 37 102 1 15 -12 40 -19 67
+-19 88 0 97 23 27 71 l-46 32 -121 -2 c-111 -2 -124 0 -149 19 -34 27 -99 154
+-96 189 4 54 1 61 -33 61 -23 0 -38 -8 -54 -27 l-22 -28 -226 0 c-262 0 -252
+3 -266 -97 -5 -36 -14 -77 -19 -90 -8 -22 -5 -28 20 -47 20 -15 29 -30 29 -50
+0 -60 -49 -64 -96 -8 -21 25 -33 31 -58 28 -17 -1 -38 -9 -46 -16 -33 -29 -69
+-36 -108 -19 -73 30 -162 11 -182 -40 -4 -13 -30 -36 -56 -51 l-48 -28 -50 26
+c-28 14 -69 28 -91 32 -103 16 -117 30 -130 127 -6 45 -8 48 -45 58 -39 10
+-80 50 -80 76 0 19 -7 18 -37 -6 -14 -11 -34 -20 -44 -20 -30 0 -59 36 -59 74
+0 29 -6 37 -57 69 -62 38 -77 41 -44 8 31 -31 26 -57 -15 -79 -16 -9 -26 -8
+-44 5 -19 13 -21 22 -16 54 5 33 3 39 -11 39 -40 1 -83 60 -62 86 13 16 65 19
+101 5 39 -14 107 1 121 27 13 25 114 72 157 72 58 1 70 39 39 123 -26 74 -36
+87 -59 87 -10 0 -38 9 -63 20 -90 40 -170 35 -270 -17 -35 -18 -58 -11 -80 26
+-36 60 -5 138 48 125 23 -6 25 -3 25 28 0 43 18 60 94 89 67 25 118 52 159 86
+16 13 41 23 56 23 34 0 152 45 163 63 4 6 8 33 8 60 0 39 5 53 33 83 l32 35
+80 -21 c44 -11 87 -23 96 -26 9 -2 21 -16 27 -29 19 -41 43 -31 100 39 14 18
+67 22 77 6 13 -20 55 -11 65 14 8 22 108 96 129 96 15 0 61 60 61 80 0 27 56
+70 91 70 22 0 29 5 29 18 0 30 35 56 57 43 13 -6 34 -6 64 1 24 5 96 10 159
+10 122 -1 145 6 182 54 10 12 31 24 47 27 20 4 55 32 101 78 l70 72 49 -7 c28
+-4 52 -2 55 3 4 5 23 15 44 21 20 7 48 23 62 35 14 13 41 31 61 41 35 18 106
+96 199 217 25 33 53 69 63 81 22 27 107 266 114 321 3 22 14 51 25 64 16 21
+18 39 16 105 -2 74 -5 85 -34 121 -17 22 -37 58 -44 79 -7 22 -22 55 -33 73
+-18 31 -19 41 -9 118 13 95 21 114 65 135 44 22 66 93 46 152 -7 23 -22 50
+-34 60 -11 10 -31 40 -45 67 -14 26 -40 69 -57 96 -18 27 -33 54 -33 61 0 7
+12 27 28 45 23 28 27 41 25 88 -2 57 -23 124 -44 137 -14 8 -167 27 -224 28
+-27 0 -50 -7 -73 -24 -24 -18 -45 -24 -75 -23 -23 0 -49 -5 -57 -12 -8 -7 -41
+-25 -72 -40 -44 -22 -63 -39 -88 -78 -29 -47 -31 -54 -20 -87 23 -69 7 -92
+-95 -139 -24 -11 -55 12 -55 41 0 36 -29 76 -64 88 -30 10 -38 8 -71 -15 -22
+-14 -52 -25 -71 -25 -18 0 -45 -5 -59 -10 -18 -7 -33 -7 -46 1 -16 8 -26 5
+-50 -15 -38 -32 -53 -32 -84 -1 -35 34 -32 69 10 120 21 25 39 60 43 84 6 34
+16 48 57 79 28 21 60 56 73 79 12 23 46 59 74 80 28 21 58 43 67 50 9 7 43 16
+77 22 86 13 149 46 182 93 51 75 70 93 108 107 59 21 90 46 118 97 36 64 46
+110 38 174 l-7 54 -58 20 c-38 12 -64 28 -75 45 -30 46 -86 98 -115 105 -44
+11 -67 40 -67 86 0 44 -17 85 -46 112 -16 14 -25 15 -60 6 -22 -6 -51 -8 -65
+-5 -24 6 -69 72 -69 101 0 24 -30 46 -63 46 -42 0 -50 7 -76 58 l-22 43 21 35
+c12 19 33 37 46 40 38 10 110 -5 129 -26 10 -11 32 -28 50 -38 l32 -19 0 91
+c1 50 5 102 10 115 6 15 6 41 0 67 -9 37 -8 47 7 63 16 18 165 61 211 61 10 0
+38 7 61 16 38 15 48 15 106 1 34 -8 77 -20 93 -25 66 -22 102 -32 118 -32 25
+0 57 -59 57 -103 0 -43 11 -70 45 -107 12 -14 25 -41 29 -61 4 -21 12 -42 19
+-47 17 -15 89 1 126 27 34 25 41 26 124 15 45 -5 62 -13 77 -32 11 -13 20 -30
+20 -36 0 -6 -23 -46 -51 -88 -28 -43 -47 -83 -44 -88 10 -17 61 -2 146 41 41
+22 80 39 86 39 6 0 40 14 76 30 37 17 75 30 85 30 10 0 27 9 36 19 16 18 16
+20 -9 47 -20 21 -25 36 -23 63 l3 36 59 -2 c37 -1 65 -8 76 -18 11 -10 26 -14
+43 -10 34 9 73 -13 123 -68 l41 -45 99 -1 c55 -1 106 -1 114 -2 20 -1 191 69
+210 86 8 7 29 17 45 21 17 4 35 11 42 16 23 18 139 50 196 54 61 4 110 -12
+120 -40 7 -19 100 -87 157 -116 25 -12 61 -38 80 -59 87 -89 181 -172 189
+-166 19 11 -2 81 -41 139 -22 32 -71 90 -109 128 -122 122 -148 213 -71 245
+47 19 150 81 180 107 17 15 39 21 80 23 70 2 76 15 34 75 -17 24 -33 60 -36
+80 -4 21 -23 58 -42 84 -55 71 -59 86 -44 148 7 30 23 72 36 93 13 21 35 60
+50 88 14 27 39 61 55 76 25 23 27 29 19 65 -17 70 -12 159 9 185 19 24 19 24
+-13 55 -28 27 -33 41 -45 123 -14 95 -12 167 13 373 14 124 31 154 79 144 16
+-3 37 0 50 8 27 17 138 46 177 46 16 0 31 4 34 9 6 9 -10 63 -31 104 -8 16
+-17 54 -20 85 -4 46 0 68 20 113 24 54 87 119 114 119 20 0 53 51 53 81 0 16
+-14 55 -31 88 -21 40 -31 73 -31 100 1 47 -10 51 -63 25 -25 -12 -39 -30 -58
+-74 -23 -52 -30 -60 -64 -69 -92 -26 -151 1 -139 62 7 33 -17 82 -34 72 -6 -4
+-10 -23 -10 -44 0 -35 -10 -52 -55 -89 -8 -7 -15 -24 -15 -38 0 -36 -27 -71
+-77 -101 -43 -25 -44 -26 -41 -72 3 -39 0 -47 -19 -56 -17 -7 -23 -18 -23 -42
+0 -36 -28 -58 -61 -48 -22 7 -99 104 -99 126 0 8 -9 29 -20 47 -11 18 -20 43
+-20 55 0 12 -8 38 -19 57 -32 60 -36 101 -13 119 13 11 21 32 25 64 5 52 1 55
+-45 31 -45 -23 -85 -4 -111 55 -20 47 -67 122 -109 175 -37 48 -58 115 -58
+187 0 49 -4 70 -16 80 -25 20 -75 97 -84 129 -10 35 -61 106 -118 167 -24 25
+-54 62 -68 82 -42 62 -68 95 -97 123 -37 37 -35 74 6 134 18 27 39 65 46 84 7
+19 18 46 25 60 7 14 19 80 26 148 14 129 25 156 97 245 12 15 31 47 41 71 11
+24 40 60 67 82 70 59 73 67 71 248 -1 132 1 163 15 179 27 34 136 71 206 70
+57 0 61 1 53 18 -17 31 -11 57 20 89 17 17 30 35 30 40 0 5 -17 12 -37 15 -21
+4 -51 11 -67 16 -16 5 -46 9 -66 9 -20 0 -51 5 -68 11 -27 9 -35 8 -58 -10
+-41 -32 -143 -30 -201 5 -24 14 -48 22 -53 19 -19 -12 -10 -79 15 -120 35 -57
+32 -93 -12 -153 -21 -29 -45 -54 -53 -58 -8 -3 -46 -8 -83 -10 -57 -4 -73 -1
+-97 16 -31 22 -45 19 -67 -11 -12 -16 -97 -47 -135 -49 -71 -4 -69 -3 -63 -41
+8 -47 -23 -85 -98 -122 -30 -15 -77 -43 -103 -63 -47 -36 -51 -37 -146 -41
+-57 -2 -106 1 -117 7 -14 7 -27 7 -44 -1 -19 -9 -33 -7 -70 10 -25 12 -49 21
+-52 21 -21 0 -77 59 -104 110 -45 84 -53 91 -96 77 -31 -9 -43 -6 -117 28 -95
+44 -122 65 -149 118 -11 20 -24 37 -29 37 -12 0 -13 -119 -2 -137 4 -6 26 -19
+50 -28 87 -35 117 -113 67 -174 -24 -27 -25 -36 -21 -96 3 -36 10 -74 16 -85
+16 -30 12 -59 -12 -93 -13 -18 -30 -45 -38 -62 -22 -44 -59 -45 -118 -2 -26
+19 -76 43 -111 53 -47 13 -73 27 -100 55 -71 74 -111 127 -131 172 -16 37 -27
+48 -58 57 -20 7 -62 36 -92 65 -56 54 -121 95 -151 95 -24 0 -67 37 -95 81
+-27 44 -43 48 -69 19 -9 -10 -38 -26 -64 -35 -48 -16 -111 -81 -111 -114 0 -9
+12 -47 25 -86 14 -38 32 -99 41 -135 8 -36 29 -89 45 -119 23 -41 30 -63 26
+-90 -2 -20 3 -55 11 -78 13 -34 13 -44 3 -57 -20 -24 -57 -19 -93 13 -18 15
+-54 37 -79 49 -42 18 -49 26 -69 78 -16 44 -20 69 -15 99 13 71 9 90 -33 155
+-23 35 -42 73 -42 84 0 23 -182 230 -224 255 -24 15 -50 64 -39 74 2 3 -7 39
+-21 80 -30 88 -34 174 -11 281 21 101 71 146 159 146 35 0 48 -5 64 -25 11
+-13 21 -23 23 -20 3 2 2 30 -1 62 l-5 58 -820 2 c-545 2 -826 -1 -837 -8z
+m2988 -2094 c19 -29 14 -115 -12 -186 -26 -74 -12 -139 30 -139 7 0 25 -12 40
+-26 21 -22 26 -36 26 -79 0 -58 -24 -99 -66 -116 -14 -5 -28 -19 -33 -31 -16
+-43 -31 -118 -31 -157 0 -51 -52 -111 -96 -111 -37 0 -74 -25 -74 -50 0 -11
+-12 -27 -27 -36 -16 -9 -58 -36 -94 -60 -36 -24 -81 -49 -100 -55 -48 -17 -59
+-28 -59 -59 0 -64 -70 -103 -107 -60 -13 15 -25 19 -49 14 -26 -5 -36 -1 -57
+22 l-25 27 -26 -21 c-15 -11 -48 -25 -76 -32 -32 -8 -54 -20 -65 -36 -27 -41
+-115 -22 -115 26 0 20 44 60 66 60 18 0 44 63 44 105 0 27 9 41 45 73 54 47
+65 74 62 150 -2 47 2 63 21 86 12 16 22 42 22 59 0 22 11 40 40 69 23 21 50
+38 60 38 11 0 27 11 36 25 9 13 25 27 36 31 25 7 57 77 58 123 0 36 32 81 56
+81 19 0 54 39 74 85 27 59 127 136 208 161 23 7 52 20 64 29 13 8 42 15 65 15
+34 0 46 -5 59 -25z m-3166 -2815 c30 -16 43 -46 30 -70 -25 -46 -77 -48 -106
+-5 -13 19 -13 28 -3 47 20 39 44 47 79 28z m2178 -2442 c21 -21 13 -58 -18
+-90 -32 -31 -47 -33 -64 -5 -8 12 -5 28 12 62 22 46 46 57 70 33z m41 -5037
+c20 -20 41 -80 41 -116 0 -27 -18 -45 -46 -45 -40 0 -54 25 -54 99 0 37 3 71
+7 74 12 12 33 7 52 -12z"/>
+<path id="area_English_Channel" class="area"
+ d="M15600 4404 c-19 -14 -46 -36 -60 -49 -32 -31 -91 -55 -133 -55 -25
+0 -43 -9 -70 -35 -19 -19 -48 -37 -64 -40 -15 -3 -48 -12 -73 -20 -25 -8 -57
+-15 -71 -15 -39 0 -137 -63 -187 -120 -66 -76 -94 -209 -63 -303 36 -107 -68
+-124 -237 -37 -44 22 -85 40 -91 40 -16 0 -101 50 -123 72 -21 21 -67 24 -72
+6 -2 -7 -9 -42 -16 -78 -14 -79 -47 -138 -114 -208 -64 -67 -133 -99 -254
+-117 -51 -8 -96 -16 -101 -19 -4 -3 -33 -7 -65 -10 -100 -8 -224 -85 -280
+-175 -35 -56 -137 -154 -181 -175 -41 -20 -58 -20 -94 -1 -47 24 -114 45 -146
+45 -16 0 -50 14 -74 30 -50 34 -99 50 -153 50 -21 0 -59 11 -85 24 -102 51
+-268 98 -405 116 -111 14 -144 10 -232 -30 -36 -16 -86 -32 -113 -36 -26 -3
+-54 -11 -61 -17 -9 -7 -52 -9 -115 -7 -177 7 -199 6 -272 -21 -38 -14 -90 -32
+-115 -38 -149 -41 -182 -52 -226 -73 -46 -22 -49 -26 -52 -65 -7 -89 -110 -98
+-168 -14 -8 11 -21 21 -28 21 -7 0 -30 14 -51 30 -21 17 -43 30 -49 30 -7 0
+-30 9 -51 21 -56 29 -243 54 -264 35 -23 -19 -128 -31 -146 -16 -12 10 -22 9
+-50 -4 -37 -18 -65 -15 -85 9 -7 8 -21 15 -31 15 -29 0 -66 20 -79 44 -21 38
+-80 76 -120 76 -36 0 -39 -3 -65 -56 -32 -66 -72 -94 -132 -94 -23 0 -45 -5
+-48 -10 -11 -18 -83 -50 -112 -50 -15 -1 -39 -7 -53 -15 -14 -8 -38 -14 -53
+-15 -31 0 -107 -72 -107 -102 0 -22 13 -23 31 -2 10 12 26 15 66 12 37 -3 57
+-1 64 9 16 18 96 53 123 53 12 0 31 6 42 14 11 8 33 16 48 18 22 2 34 13 52
+48 30 56 69 72 140 59 32 -6 59 -19 80 -40 38 -37 125 -79 165 -79 60 0 143
+-29 169 -59 87 -101 89 -115 21 -182 -36 -36 -57 -49 -78 -49 -40 0 -73 -37
+-73 -81 0 -64 -18 -105 -53 -122 -58 -29 -141 -64 -180 -77 -48 -15 -89 -2
+-137 45 -60 58 -142 115 -218 151 -40 19 -86 47 -102 63 -28 27 -33 28 -110
+23 -84 -5 -110 4 -110 38 0 20 27 77 41 85 15 10 10 25 -7 25 -26 0 -136 42
+-165 63 -21 15 -37 17 -85 13 -32 -2 -69 -5 -82 -5 -15 -1 -26 -10 -32 -26
+-14 -36 -32 -40 -111 -25 -80 15 -148 5 -236 -36 -28 -13 -58 -24 -65 -24 -8
+0 -22 -6 -32 -13 -18 -13 -17 -17 18 -66 38 -57 45 -95 21 -127 -8 -10 -15
+-33 -15 -49 0 -29 -22 -72 -44 -87 -6 -4 -30 -8 -54 -8 -24 0 -66 -10 -93 -21
+-50 -22 -50 -22 -77 -2 -26 18 -146 79 -208 104 -16 7 -68 11 -119 10 -50 -1
+-102 2 -116 7 -14 6 -93 13 -176 17 -144 7 -151 7 -171 -13 -12 -12 -24 -37
+-28 -58 -6 -33 -4 -39 29 -68 39 -34 57 -64 57 -94 0 -29 -92 -146 -118 -150
+-33 -5 -48 35 -34 90 28 107 33 94 -79 188 -56 47 -131 104 -166 128 -34 23
+-70 53 -78 66 -9 13 -36 31 -61 41 -25 9 -65 34 -89 55 -24 21 -61 44 -82 50
+-21 7 -60 24 -87 37 -58 29 -134 50 -211 59 -47 5 -62 2 -98 -19 -53 -30 -181
+-65 -269 -73 -55 -4 -69 -9 -82 -29 -14 -21 -25 -24 -98 -29 -118 -7 -232 -21
+-247 -31 -8 -4 -26 -36 -42 -70 -29 -65 -41 -75 -90 -75 -16 0 -46 -9 -67 -20
+-29 -16 -48 -19 -87 -14 -48 5 -52 4 -63 -21 -11 -24 -80 -109 -137 -170 -23
+-25 -45 -88 -45 -131 0 -16 12 -47 26 -68 35 -52 23 -80 -43 -99 -36 -11 -49
+-20 -56 -41 -13 -38 -4 -53 37 -60 72 -14 84 -60 36 -141 -16 -27 -30 -59 -30
+-71 0 -30 -41 -64 -78 -64 -22 0 -36 -7 -44 -21 -7 -12 -31 -29 -54 -39 -35
+-16 -46 -29 -83 -100 -39 -76 -42 -87 -36 -135 6 -47 5 -54 -16 -69 -13 -9
+-34 -16 -47 -16 -13 0 -44 -12 -68 -26 l-45 -27 -27 25 c-37 34 -59 40 -97 27
+-40 -15 -66 -8 -135 35 -89 55 -92 59 -84 116 6 49 5 51 -32 87 -57 54 -85 62
+-174 50 -140 -18 -165 -16 -202 19 -18 17 -45 38 -60 47 -15 10 -33 35 -44 64
+-9 26 -20 51 -24 56 -8 9 -64 -60 -74 -91 -10 -32 -50 -56 -81 -48 -17 4 -32
+21 -47 53 -34 70 -92 93 -273 112 -85 9 -99 5 -156 -40 -15 -12 -48 -25 -75
+-30 -26 -5 -58 -18 -70 -30 -21 -20 -26 -20 -153 -9 -97 8 -137 8 -152 -1 -31
+-16 -66 -3 -84 31 -17 32 -36 37 -82 19 -34 -13 -43 -26 -43 -63 0 -16 -9 -44
+-21 -63 -17 -27 -20 -43 -15 -76 8 -51 -19 -99 -72 -130 -29 -17 -39 -18 -71
+-8 -66 19 -84 14 -131 -35 -41 -44 -46 -46 -86 -41 l-43 4 -27 -51 c-15 -28
+-34 -63 -41 -78 -16 -31 -36 -38 -105 -35 -34 1 -54 -4 -75 -19 -34 -25 -52
+-83 -35 -116 14 -30 23 -71 29 -135 4 -45 2 -54 -17 -70 -32 -26 -39 -34 -60
+-70 -19 -32 -22 -33 -84 -33 -70 0 -77 -5 -95 -62 -13 -41 -53 -78 -82 -78
+-24 0 -119 83 -142 124 -10 19 -17 52 -17 87 0 75 -29 137 -84 183 -24 20 -49
+36 -56 36 -6 0 -33 11 -60 25 -28 14 -66 25 -89 25 -33 0 -47 7 -76 35 -19 20
+-46 40 -60 45 -47 18 -95 -17 -95 -69 0 -11 -7 -39 -16 -61 -17 -43 -45 -63
+-110 -79 -22 -5 -64 -19 -94 -30 -86 -33 -113 -29 -165 25 -36 39 -51 47 -89
+51 -78 9 -76 17 -76 -291 0 -198 3 -275 12 -284 16 -16 13301 -17 13363 -1 22
+6 96 12 165 13 90 2 133 7 155 19 17 8 60 21 95 27 36 6 85 24 110 39 62 38
+104 51 165 51 29 0 70 7 90 16 23 9 51 13 69 10 55 -10 222 52 200 74 -5 5
+-375 4 -822 -2 -895 -11 -838 -14 -879 49 -17 25 -19 86 -25 806 -8 850 -10
+816 48 854 29 18 -128 15 1672 32 492 5 897 13 902 17 13 13 12 98 0 254 -6
+74 -13 176 -15 225 -2 50 -6 111 -10 136 -6 42 -4 49 24 81 20 23 31 46 31 66
+0 16 7 62 16 102 16 69 16 73 -4 118 -23 52 -35 108 -36 166 0 44 17 61 76 76
+27 8 69 42 159 130 140 138 141 140 50 205 -28 20 -53 45 -56 56 -4 10 -24 33
+-46 51 -22 17 -65 65 -97 106 -31 40 -68 88 -82 106 -38 49 -95 96 -116 95
+-11 0 -35 -12 -54 -25z"/>
+</g>
+</svg>
+
+<div id="blocks" class="blocks"></div>
+<div id="offmap" class="offmap" style="visibility:hidden"></div>
+
+</div>
+
+<div class="hand">
+<div id="card+1" class="card card_force_march"></div>
+<div id="card+2" class="card card_muster"></div>
+<div id="card+3" class="card card_piracy"></div>
+<div id="card+4" class="card card_plague"></div>
+<div id="card+5" class="card card_surprise"></div>
+<div id="card+6" class="card card_treason"></div>
+<div id="card+7" class="card card_4"></div>
+<div id="card+8" class="card card_4"></div>
+<div id="card+9" class="card card_4"></div>
+<div id="card+10" class="card card_4"></div>
+<div id="card+11" class="card card_4"></div>
+<div id="card+12" class="card card_4"></div>
+<div id="card+13" class="card card_3"></div>
+<div id="card+14" class="card card_3"></div>
+<div id="card+15" class="card card_3"></div>
+<div id="card+16" class="card card_3"></div>
+<div id="card+17" class="card card_3"></div>
+<div id="card+18" class="card card_3"></div>
+<div id="card+19" class="card card_3"></div>
+<div id="card+20" class="card card_2"></div>
+<div id="card+21" class="card card_2"></div>
+<div id="card+22" class="card card_2"></div>
+<div id="card+23" class="card card_2"></div>
+<div id="card+24" class="card card_2"></div>
+<div id="card+25" class="card card_2"></div>
+</div>
+
+ </div>
+
+</div>
+</body>
diff --git a/rules.js b/rules.js
new file mode 100644
index 0000000..3f6dd9d
--- /dev/null
+++ b/rules.js
@@ -0,0 +1,3431 @@
+"use strict";
+
+// TODO: execute enemy heirs during supply phase
+// TODO: reuse supply and goes-home states for pretender and king
+
+// TODO: tweak block layout and positioning
+
+exports.scenarios = [
+ "Wars of the Roses",
+ "Kingmaker",
+ "Richard III",
+];
+
+const { CARDS, BLOCKS, AREAS, BORDERS } = require('./data');
+
+const LANCASTER = "Lancaster";
+const YORK = "York";
+const REBEL = "Rebel";
+const ENEMY = { Lancaster: "York", York: "Lancaster" }
+const OBSERVER = "Observer";
+const BOTH = "Both";
+const POOL = "Pool";
+const MINOR = "Minor";
+
+// serif cirled numbers
+const DIE_HIT = [ 0, '\u2776', '\u2777', '\u2778', '\u2779', '\u277A', '\u277B' ];
+const DIE_MISS = [ 0, '\u2460', '\u2461', '\u2462', '\u2463', '\u2464', '\u2465' ];
+
+const ATTACK_MARK = " *";
+const RESERVE_MARK = "";
+
+let states = {};
+
+let game = null;
+
+function log(...args) {
+ let s = Array.from(args).join("");
+ game.log.push(s);
+}
+
+function logp(...args) {
+ let s = game.active + " " + Array.from(args).join("");
+ game.log.push(s);
+}
+
+function log_move_start(from) {
+ game.turn_buf = [ from ];
+}
+
+function log_move_continue(to, mark) {
+ if (mark)
+ game.turn_buf.push(to + mark);
+ else
+ game.turn_buf.push(to);
+}
+
+function log_move_end() {
+ if (game.turn_buf) {
+ game.turn_log.push(game.turn_buf);
+ delete game.turn_buf;
+ }
+}
+
+function print_turn_log_no_count(text) {
+ function print_move(last) {
+ return "\n" + last.join(" \u2192 ");
+ }
+ if (game.turn_log.length > 0) {
+ game.turn_log.sort();
+ for (let entry of game.turn_log)
+ text += print_move(entry);
+ } else {
+ text += "\nnothing.";
+ }
+ log(text);
+ delete game.turn_log;
+}
+
+function print_turn_log(text) {
+ function print_move(last) {
+ return "\n" + n + " " + last.join(" \u2192 ");
+ }
+ game.turn_log.sort();
+ let last = game.turn_log[0];
+ let n = 0;
+ for (let entry of game.turn_log) {
+ if (entry.toString() != last.toString()) {
+ text += print_move(last);
+ n = 0;
+ }
+ ++n;
+ last = entry;
+ }
+ if (n > 0)
+ text += print_move(last);
+ else
+ text += "\nnothing.";
+ log(text);
+ delete game.turn_log;
+}
+
+function is_active_player(current) {
+ return (current == game.active) || (game.active == BOTH && current != OBSERVER);
+}
+
+function is_inactive_player(current) {
+ return current == OBSERVER || (game.active != current && game.active != BOTH);
+}
+
+function remove_from_array(array, item) {
+ let i = array.indexOf(item);
+ if (i >= 0)
+ array.splice(i, 1);
+}
+
+function clear_undo() {
+ game.undo = [];
+}
+
+function push_undo() {
+ game.undo.push(JSON.stringify(game, (k,v) => {
+ if (k === 'undo') return undefined;
+ if (k === 'log') return v.length;
+ return v;
+ }));
+}
+
+function pop_undo() {
+ let undo = game.undo;
+ let log = game.log;
+ Object.assign(game, JSON.parse(undo.pop()));
+ game.undo = undo;
+ log.length = game.log;
+ game.log = log;
+}
+
+function gen_action_undo(view) {
+ if (!view.actions)
+ view.actions = {}
+ if (game.undo && game.undo.length > 0)
+ view.actions.undo = 1;
+ else
+ view.actions.undo = 0;
+}
+
+function gen_action(view, action, argument) {
+ if (!view.actions)
+ view.actions = {}
+ if (argument != undefined) {
+ if (!(action in view.actions)) {
+ view.actions[action] = [ argument ];
+ } else {
+ if (!view.actions[action].includes(argument))
+ view.actions[action].push(argument);
+ }
+ } else {
+ view.actions[action] = 1;
+ }
+}
+
+function roll_d6() {
+ return Math.floor(Math.random() * 6) + 1;
+}
+
+function shuffle_deck() {
+ let deck = [];
+ for (let c = 1; c <= 25; ++c)
+ deck.push(c);
+ return deck;
+}
+
+function deal_cards(deck, n) {
+ let hand = [];
+ for (let i = 0; i < n; ++i) {
+ let k = Math.floor(Math.random() * deck.length);
+ hand.push(deck[k]);
+ deck.splice(k, 1);
+ }
+ return hand;
+}
+
+function count_ap(hand) {
+ let count = 0;
+ for (let c of hand)
+ count += CARDS[c].actions;
+ return count;
+}
+
+function is_pretender_heir(who) {
+ return (block_owner(who) == block_owner(game.pretender) && block_type(who) == 'heir');
+}
+
+function is_royal_heir(who) {
+ return (block_owner(who) == block_owner(game.king) && block_type(who) == 'heir');
+}
+
+function is_dead(who) {
+ if (who in BLOCKS)
+ return !game.location[who];
+ return !game.location[who+"/L"] && !game.location[who+"/Y"];
+}
+
+function is_shield_area_for(where, who, combat) {
+ let haystack = AREAS[where].shields;
+ let needle = BLOCKS[who].shield;
+
+ // Nevilles going to exile in Calais
+ if (where == "Calais") {
+ if (who == "Warwick/L" || who == "Kent/L" || who == "Salisbury/L")
+ return false;
+ if (count_blocks_exclude_mercenaries("Calais") < 4) {
+ if (who == "Kent/Y")
+ return is_area_friendly_to("East Yorks", LANCASTER);
+ if (who == "Salisbury/Y")
+ return is_area_friendly_to("North Yorks", LANCASTER);
+ }
+ }
+
+ // Exeter and Clarence as enemy nobles
+ if (who == "Exeter/Y")
+ return where == "Cornwall";
+ if (who == "Clarence/L")
+ return (where == "South Yorks" || where == "Rutland" || where == "Hereford");
+
+ // Everyone can always use their own shield
+ if (haystack && haystack.includes(needle))
+ return true;
+
+ // Nevilles can use each other's shields if their owner is dead
+ if (is_neville(who)) {
+ if (is_dead("Warwick") && haystack.includes("Warwick"))
+ return true;
+ if (is_dead("Kent") && haystack.includes("Kent"))
+ return true;
+ if (is_dead("Salisbury") && haystack.includes("Salisbury"))
+ return true;
+ }
+
+ // York heirs can use any York shield
+ if (is_heir(who) && block_owner(who) == YORK) {
+ if (haystack.includes("York"))
+ return !combat || find_senior_heir_in_area(YORK, where) == who;
+ }
+
+ // Lancaster heirs can use each other's specific shields if their owner is dead
+ if (is_heir(who) && block_owner(who) == LANCASTER) {
+ let available = false;
+ if (haystack.includes("Lancaster"))
+ available = true;
+ if (is_dead("Exeter") && haystack.includes("Exeter"))
+ available = true;
+ if (is_dead("Somerset") && haystack.includes("Somerset"))
+ available = true;
+ if (is_dead("Richmond") && haystack.includes("Richmond"))
+ available = true;
+ if (available)
+ return !combat || find_senior_heir_in_area(LANCASTER, where) == who;
+ }
+
+ return false;
+}
+
+function is_at_home(who) {
+ let where = game.location[who];
+ if (!where || where == MINOR || where == POOL)
+ return true;
+ if (is_pretender_heir(who))
+ return is_exile_area(where);
+ if (is_royal_heir(who))
+ return is_shield_area_for(where, who, false) || is_crown_area(where);
+ if (block_type(who) == 'nobles')
+ return is_shield_area_for(where, who, false);
+ if (block_type(who) == 'church')
+ return has_cathedral(where) == block_home(who);
+ return true;
+}
+
+function is_in_exile(who) {
+ return is_exile_area(game.location[who]);
+}
+
+function is_home_for(where, who) {
+ if (is_pretender_heir(who))
+ return is_shield_area_for(where, who, false);
+ if (is_royal_heir(who))
+ return is_crown_area(where) || is_shield_area_for(where, who, false);
+ if (block_type(who) == 'nobles')
+ return is_shield_area_for(where, who, false);
+ if (block_type(who) == 'church')
+ return block_home(who) == has_cathedral(where);
+ return false;
+}
+
+function is_available_home_for(where, who) {
+ if (who == "Clarence/L")
+ return is_home_for(where, who) && is_vacant_area(where);
+ return is_home_for(where, who) && is_friendly_or_vacant_area(where);
+}
+
+function count_available_homes(who) {
+ let count = 0;
+ for (let where in AREAS)
+ if (is_available_home_for(where, who))
+ ++count;
+ return count;
+}
+
+function available_home(who) {
+ for (let where in AREAS)
+ if (is_available_home_for(where, who))
+ return where;
+}
+
+function go_home_if_possible(who) {
+ if (!is_in_exile(who)) {
+ let n = count_available_homes(who);
+ if (n == 0) {
+ game.turn_log.push([block_name(who), "Pool"]);
+ disband(who);
+ } else if (n == 1) {
+ let home = available_home(who);
+ if (game.location[who] != home) {
+ game.location[who] = home;
+ game.turn_log.push([block_name(who), game.location[who]]); // TODO: "Home"?
+ }
+ } else {
+ return true;
+ }
+ }
+ return false;
+}
+
+function is_on_map_not_in_exile_or_man(who) {
+ let where = game.location[who];
+ return where && where != MINOR &&
+ where != POOL &&
+ where != "Isle of Man" &&
+ !is_exile_area(where);
+}
+
+function is_land_area(where) {
+ return where && where != MINOR && where != POOL && !is_sea_area(where);
+}
+
+function is_area_friendly_to(where, owner) {
+ let save_active = game.active;
+ game.active = owner;
+ let result = is_friendly_area(where);
+ game.active = save_active;
+ return result;
+}
+
+function is_london_friendly_to(owner) {
+ return is_area_friendly_to("Middlesex", owner);
+}
+
+function count_lancaster_nobles() {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (block_owner(b) == LANCASTER &&
+ (block_type(b) == 'nobles' || block_type(b) == 'church'))
+ if (is_on_map_not_in_exile_or_man(b))
+ ++count;
+ if (is_london_friendly_to(LANCASTER))
+ ++count;
+ return count;
+}
+
+function count_york_nobles() {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (block_owner(b) == YORK &&
+ (block_type(b) == 'nobles' || block_type(b) == 'church'))
+ if (is_on_map_not_in_exile_or_man(b))
+ ++count;
+ if (is_london_friendly_to(YORK))
+ ++count;
+ return count;
+}
+
+function block_name(who) {
+ return BLOCKS[who].name;
+}
+
+function block_type(who) {
+ return BLOCKS[who].type;
+}
+
+function block_home(who) {
+ return BLOCKS[who].home;
+}
+
+function block_owner(who) {
+ if (who == REBEL)
+ return block_owner(game.pretender);
+ return BLOCKS[who].owner;
+}
+
+function block_initiative(who) {
+ if (block_type(who) == 'bombard')
+ return game.battle_round == 1 ? 'A' : 'D';
+ return BLOCKS[who].combat[0];
+}
+
+function block_printed_fire_power(who) {
+ return BLOCKS[who].combat[1] | 0;
+}
+
+function block_fire_power(who, where) {
+ let combat = block_printed_fire_power(who);
+ if (is_defender(who)) {
+ if (is_heir(who) && is_shield_area_for(where, who, true))
+ ++combat;
+ if (is_crown_area(where) && is_senior_royal_heir_in(who, where))
+ ++combat;
+ if (is_noble(who) && is_shield_area_for(where, who, true))
+ ++combat;
+ if (is_church(who) && block_home(who) == has_cathedral(where))
+ ++combat;
+ if (is_levy(who) && block_home(who) == has_city(where))
+ ++combat;
+ if (who == "Welsh Mercenary" && is_wales(where))
+ ++combat;
+ }
+ return combat;
+}
+
+function is_mercenary(who) {
+ return BLOCKS[who].type == 'mercenaries';
+}
+
+function is_heir(who) {
+ return BLOCKS[who].type == 'heir';
+}
+
+function is_noble(who) {
+ return BLOCKS[who].type == 'nobles';
+}
+
+function is_church(who) {
+ return BLOCKS[who].type == 'church';
+}
+
+function is_levy(who) {
+ return BLOCKS[who].type == 'levies';
+}
+
+function is_rose_noble(who) {
+ return BLOCKS[who].type == 'nobles' && !BLOCKS[who].loyalty;
+}
+
+function is_neville(who) {
+ let name = block_name(who);
+ return name == "Warwick" || name == "Kent" || name == "Salisbury";
+}
+
+function block_loyalty(source, target) {
+ let source_name = source ? block_name(source) : "Event";
+ if (source_name == "Warwick") {
+ let target_name = block_name(target);
+ if (target_name == "Kent" || target_name == "Salisbury")
+ return 1;
+ if (target_name == "Northumberland" || target_name == "Westmoreland")
+ return 0;
+ }
+ return BLOCKS[target].loyalty | 0;
+}
+
+function can_defect(source, target) {
+ // Clarence and Exeter can't defect if they are the king or pretender
+ if (target == game.king || target == game.pretender)
+ return false;
+ return block_loyalty(source, target) > 0 && !game.defected[target];
+}
+
+function can_attempt_treason_event() {
+ for (let b in BLOCKS) {
+ if (game.active == game.attacker[game.where]) {
+ if (is_defender(b) && can_defect(null, b))
+ return true;
+ } else {
+ if (is_attacker(b) && can_defect(null, b))
+ return true;
+ }
+ }
+ return false;
+}
+
+function treachery_tag(who) {
+ if (who == game.king) return 'King';
+ if (who == game.pretender) return 'Pretender';
+ if (who == "Warwick/L" || who == "Warwick/Y") return 'Warwick';
+ return game.active;
+}
+
+function can_attempt_treachery(who) {
+ let once = treachery_tag(who);
+ if (game.battle_list.includes(who) && !game.treachery[once]) {
+ for (let b in BLOCKS) {
+ if (game.active == game.attacker[game.where]) {
+ if (is_defender(b) && can_defect(who, b))
+ return true;
+ } else {
+ if (is_attacker(b) && can_defect(who, b))
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+function block_max_steps(who) {
+ return BLOCKS[who].steps;
+}
+
+function can_activate(who) {
+ return block_owner(who) == game.active && !game.moved[who] && !game.dead[who];
+}
+
+function is_area_on_map(location) {
+ return location && location != MINOR && location != POOL;
+}
+
+function is_block_on_map(b) {
+ return is_area_on_map(game.location[b]);
+}
+
+function is_block_alive(b) {
+ return is_area_on_map(game.location[b]) && !game.dead[b];
+}
+
+function border_id(a, b) {
+ return (a < b) ? a + "/" + b : b + "/" + a;
+}
+
+function border_was_last_used_by_enemy(from, to) {
+ return game.last_used[border_id(from, to)] == ENEMY[game.active];
+}
+
+function border_was_last_used_by_active(from, to) {
+ return game.last_used[border_id(from, to)] == game.active;
+}
+
+function border_type(a, b) {
+ return BORDERS[border_id(a,b)];
+}
+
+function border_limit(a, b) {
+ return game.border_limit[border_id(a,b)] || 0;
+}
+
+function reset_border_limits() {
+ game.border_limit = {};
+}
+
+function count_friendly(where) {
+ let p = game.active;
+ let count = 0;
+ for (let b in BLOCKS)
+ if (game.location[b] == where && block_owner(b) == p && !game.dead[b])
+ ++count;
+ return count;
+}
+
+function count_enemy(where) {
+ let p = ENEMY[game.active];
+ let count = 0;
+ for (let b in BLOCKS)
+ if (game.location[b] == where && block_owner(b) == p && !game.dead[b])
+ ++count;
+ return count;
+}
+
+function count_enemy_excluding_reserves(where) {
+ let p = ENEMY[game.active];
+ let count = 0;
+ for (let b in BLOCKS)
+ if (game.location[b] == where && block_owner(b) == p)
+ if (!game.reserves.includes(b))
+ ++count;
+ return count;
+}
+
+function is_friendly_area(where) { return is_land_area(where) && count_friendly(where) > 0 && count_enemy(where) == 0; }
+function is_enemy_area(where) { return is_land_area(where) && count_friendly(where) == 0 && count_enemy(where) > 0; }
+function is_vacant_area(where) { return is_land_area(where) && count_friendly(where) == 0 && count_enemy(where) == 0; }
+function is_contested_area(where) { return is_land_area(where) && count_friendly(where) > 0 && count_enemy(where) > 0; }
+function is_friendly_or_vacant_area(where) { return is_friendly_area(where) || is_vacant_area(where); }
+
+function has_city(where) {
+ return AREAS[where].city;
+}
+
+function has_cathedral(where) {
+ return AREAS[where].cathedral;
+}
+
+function is_crown_area(where) {
+ return AREAS[where].crown;
+}
+
+function is_major_port(where) {
+ return AREAS[where].major_port;
+}
+
+function is_sea_area(where) {
+ return where == 'Irish Sea' || where == 'North Sea' || where == 'English Channel';
+}
+
+function is_wales(where) {
+ return where == "Caernarvon" || where == "Pembroke" || where == "Powys" || where == "Glamorgan";
+}
+
+function is_lancaster_exile_area(where) {
+ return where == "France" || where == "Scotland";
+}
+
+function is_york_exile_area(where) {
+ return where == "Calais" || where == "Ireland";
+}
+
+function is_exile_area(where) {
+ return is_lancaster_exile_area(where) || is_york_exile_area(where);
+}
+
+function is_friendly_exile_area(where) {
+ return (game.active == LANCASTER) ? is_lancaster_exile_area(where) : is_york_exile_area(where);
+}
+
+function is_enemy_exile_area(where) {
+ return (game.active == YORK) ? is_lancaster_exile_area(where) : is_york_exile_area(where);
+}
+
+function is_pretender_exile_area(where) {
+ return (game.pretender == LANCASTER) ? is_lancaster_exile_area(where) : is_york_exile_area(where);
+}
+
+function can_recruit_to(who, to) {
+ if (who == "Welsh Mercenary")
+ return is_wales(to) && is_friendly_or_vacant_area(to);
+ switch (block_type(who)) {
+ case 'heir':
+ // Not in rulebook, but they can be disbanded to the pool during exile limit check...
+ // Use same rules as entering a minor noble.
+ if (block_owner(who) == block_owner(game.king))
+ return is_crown_area(to) && is_friendly_or_vacant_area(to);
+ else
+ return is_pretender_exile_area(to);
+ case 'nobles':
+ return is_shield_area_for(to, who, false) && is_friendly_or_vacant_area(to);
+ case 'church':
+ return block_home(who) == has_cathedral(to) && is_friendly_or_vacant_area(to);
+ case 'levies':
+ return block_home(who) == has_city(to) && is_friendly_or_vacant_area(to);
+ case 'bombard':
+ return has_city(to) && is_friendly_area(to);
+ case 'rebel':
+ return !is_exile_area(to) && is_vacant_area(to);
+ }
+ return false;
+}
+
+function can_recruit(who) {
+ // Move one group events:
+ if (game.active == game.force_march) return false;
+ if (game.active == game.surprise) return false;
+ if (game.active == game.treason) return false;
+
+ // Must use AP for sea moves:
+ if (game.active == game.piracy) return false;
+
+ if (can_activate(who) && game.location[who] == POOL)
+ for (let to in AREAS)
+ if (can_recruit_to(who, to))
+ return true;
+ return false;
+}
+
+function have_contested_areas() {
+ for (let where in AREAS)
+ if (is_area_on_map(where) && is_contested_area(where))
+ return true;
+ return false;
+}
+
+function count_pinning(where) {
+ return count_enemy_excluding_reserves(where);
+}
+
+function count_pinned(where) {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (game.location[b] == where && block_owner(b) == game.active)
+ if (!game.reserves.includes(b))
+ ++count;
+ return count;
+}
+
+function is_pinned(who, from) {
+ if (game.active == game.p2) {
+ if (count_pinned(from) <= count_pinning(from))
+ return true;
+ }
+ return false;
+}
+
+function can_block_sea_move_to(who, from, to) {
+ if (is_enemy_exile_area(to))
+ return false;
+ if (game.active == game.force_march)
+ return false;
+ if (who == REBEL || who == "Scots Mercenary" || who == "Welsh Mercenary")
+ return false;
+ if (block_type(who) == 'bombard' || block_type(who) == 'levies')
+ return false;
+ if (border_type(from, to) == 'sea')
+ return true;
+ return false;
+}
+
+function can_block_sea_move(who) {
+ if (can_activate(who)) {
+ let from = game.location[who];
+ if (from) {
+ if (is_pinned(who, from))
+ return false;
+ for (let to of AREAS[from].exits)
+ if (can_block_sea_move_to(who, from, to))
+ return true;
+ }
+ }
+ return false;
+}
+
+function can_block_use_border(who, from, to) {
+ if (game.active == game.surprise) {
+ switch (border_type(from, to)) {
+ case 'major': return border_limit(from, to) < 5;
+ case 'river': return border_limit(from, to) < 4;
+ case 'minor': return border_limit(from, to) < 3;
+ case 'sea': return false;
+ }
+ } else {
+ switch (border_type(from, to)) {
+ case 'major': return border_limit(from, to) < 4;
+ case 'river': return border_limit(from, to) < 3;
+ case 'minor': return border_limit(from, to) < 2;
+ case 'sea': return false;
+ }
+ }
+}
+
+function count_borders_crossed(to) {
+ let count = 0;
+ for (let from of AREAS[to].exits)
+ if (border_was_last_used_by_active(from, to))
+ ++count;
+ return count;
+}
+
+function can_block_land_move_to(who, from, to) {
+ if (is_enemy_exile_area(to))
+ return false;
+ if (game.active == game.piracy)
+ return false;
+ if (can_block_use_border(who, from, to)) {
+ // limit number of borders used to attack/reinforce
+ let contested = is_contested_area(to);
+ if (contested && !border_was_last_used_by_active(from, to)) {
+ // p1 or p2 attacking
+ if (game.attacker[to] == game.active) {
+ if (count_borders_crossed(to) >= 3)
+ return false;
+ }
+ if (game.active == game.p2) {
+ // p2 reinforcing battle started by p1
+ if (game.attacker[to] == game.p1) {
+ if (count_borders_crossed(to) >= 2)
+ return false;
+ }
+ }
+ }
+ if (count_pinning(from) > 0)
+ if (border_was_last_used_by_enemy(from, to))
+ return false;
+ return true;
+ }
+ return false;
+}
+
+function can_block_land_move(who) {
+ if (can_activate(who)) {
+ let from = game.location[who];
+ if (from) {
+ if (is_pinned(who, from))
+ return false;
+ for (let to of AREAS[from].exits)
+ if (can_block_land_move_to(who, from, to))
+ return true;
+ }
+ }
+ return false;
+}
+
+function can_block_continue(who, from, to) {
+ if (is_contested_area(to))
+ return false;
+ if (border_type(from, to) == 'minor')
+ return false;
+ if (game.active == game.force_march) {
+ if (game.distance >= 3)
+ return false;
+ } else {
+ if (game.distance >= 2)
+ return false;
+ }
+ if (to == game.last_from)
+ return false;
+ return true;
+}
+
+function can_block_retreat_to(who, to) {
+ if (is_friendly_area(to) || is_vacant_area(to)) {
+ let from = game.location[who];
+ if (can_block_use_border(who, from, to)) {
+ if (border_was_last_used_by_enemy(from, to))
+ return false;
+ return true;
+ }
+ }
+ return false;
+}
+
+function can_block_regroup_to(who, to) {
+ if (is_friendly_area(to) || is_vacant_area(to)) {
+ let from = game.location[who];
+ if (can_block_use_border(who, from, to))
+ return true;
+ }
+ return false;
+}
+
+function can_block_regroup(who) {
+ if (block_owner(who) == game.active) {
+ let from = game.location[who];
+ for (let to of AREAS[from].exits)
+ if (can_block_regroup_to(who, to))
+ return true;
+ }
+ return false;
+}
+
+function can_block_muster_via(who, from, next, muster) {
+ if (can_block_land_move_to(who, from, next) && is_friendly_or_vacant_area(next)) {
+ if (next == muster)
+ return true;
+ if (border_type(from, next) != 'minor') {
+ if (AREAS[next].exits.includes(muster))
+ if (can_block_land_move_to(who, next, muster))
+ return true;
+ }
+ }
+}
+
+function can_block_muster(who, muster) {
+ let from = game.location[who];
+ if (from == muster)
+ return false;
+ if (can_activate(who) && is_block_on_map(who)) {
+ if (is_pinned(who, from))
+ return false;
+ for (let next of AREAS[from].exits)
+ if (can_block_muster_via(who, from, next, muster))
+ return true;
+ }
+ return false;
+}
+
+function can_muster_to(muster) {
+ for (let b in BLOCKS)
+ if (can_block_muster(b, muster))
+ return true;
+ return false;
+}
+
+function is_battle_reserve(who) {
+ return game.reserves.includes(who);
+}
+
+function is_attacker(who) {
+ if (game.location[who] == game.where && block_owner(who) == game.attacker[game.where] && !game.dead[who])
+ return !game.reserves.includes(who);
+ return false;
+}
+
+function is_defender(who) {
+ if (game.location[who] == game.where && block_owner(who) != game.attacker[game.where] && !game.dead[who])
+ return !game.reserves.includes(who);
+ return false;
+}
+
+function swap_blocks(a) {
+ let b = BLOCKS[a].enemy;
+ game.location[b] = game.location[a];
+ game.steps[b] = game.steps[a];
+ game.location[a] = null;
+ game.steps[a] = block_max_steps(a);
+ return b;
+}
+
+function disband(who) {
+ game.location[who] = POOL;
+ game.steps[who] = block_max_steps(who);
+}
+
+function check_instant_victory() {
+ if (is_dead("York") && is_dead("March") && is_dead("Rutland") && is_dead("Clarence") && is_dead("Gloucester")) {
+ log("All York heirs are dead!");
+ game.victory = "Lancaster wins by eliminating all enemy heirs!";
+ game.result = LANCASTER;
+ }
+ if (is_dead("Henry VI") && is_dead("Prince Edward") && is_dead("Exeter") && is_dead("Somerset") && is_dead("Richmond")) {
+ log("All Lancaster heirs are dead!");
+ game.victory = "York wins by eliminating all enemy heirs!";
+ game.result = YORK;
+ }
+}
+
+function eliminate_block(who) {
+ log(block_name(who) + " is eliminated.");
+ game.flash += " " + block_name(who) + " is eliminated.";
+ if (who == "Exeter/Y") {
+ game.location[who] = null;
+ ++game.killed_heirs[LANCASTER];
+ return check_instant_victory();
+ }
+ if (who == "Clarence/L") {
+ game.location[who] = null;
+ ++game.killed_heirs[YORK];
+ return check_instant_victory();
+ }
+ if (is_heir(who)) {
+ game.location[who] = null;
+ ++game.killed_heirs[block_owner(who)];
+ if (who == game.pretender)
+ game.pretender = find_senior_heir(block_owner(game.pretender));
+ // A new King is only crowned in the supply phase.
+ return check_instant_victory();
+ }
+ if (is_rose_noble(who) || is_neville(who)) {
+ game.location[who] = null;
+ return;
+ }
+ if (is_mercenary(who)) {
+ switch (who) {
+ case "Welsh Mercenary": game.location[who] = POOL; break;
+ case "Irish Mercenary": game.location[who] = "Ireland"; break;
+ case "Burgundian Mercenary": game.location[who] = "Calais"; break;
+ case "Calais Mercenary": game.location[who] = "Calais"; break;
+ case "Scots Mercenary": game.location[who] = "Scotland"; break;
+ case "French Mercenary": game.location[who] = "France"; break;
+ }
+ game.steps[who] = block_max_steps(who);
+ game.dead[who] = true;
+ return;
+ }
+ game.location[who] = POOL;
+ game.steps[who] = block_max_steps(who);
+ game.dead[who] = true;
+}
+
+function reduce_block(who) {
+ if (game.steps[who] == 1) {
+ eliminate_block(who);
+ } else {
+ --game.steps[who];
+ }
+}
+
+function count_attackers() {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (is_attacker(b))
+ ++count;
+ return count;
+}
+
+function count_defenders() {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (is_defender(b))
+ ++count;
+ return count;
+}
+
+function count_blocks_exclude_mercenaries(where) {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (!(game.reduced && game.reduced[b]) && game.location[b] == where && !is_mercenary(b))
+ ++count;
+ return count;
+}
+
+function count_blocks(where) {
+ let count = 0;
+ for (let b in BLOCKS)
+ if (!(game.reduced && game.reduced[b]) && game.location[b] == where)
+ ++count;
+ return count;
+}
+
+function add_blocks_exclude_mercenaries(list, where) {
+ for (let b in BLOCKS)
+ if (!(game.reduced && game.reduced[b]) && game.location[b] == where && !is_mercenary(b))
+ list.push(b);
+}
+
+function add_blocks(list, where) {
+ for (let b in BLOCKS)
+ if (!(game.reduced && game.reduced[b]) && game.location[b] == where)
+ list.push(b);
+}
+
+function check_supply_penalty() {
+ game.supply = [];
+ for (let where in AREAS) {
+ if (is_friendly_area(where)) {
+ if (where == "Calais" || where == "France") {
+ if (count_blocks_exclude_mercenaries(where) > 4)
+ add_blocks_exclude_mercenaries(game.supply, where);
+ } else if (where == "Ireland" || where == "Scotland") {
+ if (count_blocks_exclude_mercenaries(where) > 2)
+ add_blocks_exclude_mercenaries(game.supply, where);
+ } else if (has_city(where)) {
+ if (count_blocks(where) > 5)
+ add_blocks(game.supply, where);
+ } else {
+ if (count_blocks(where) > 4)
+ add_blocks(game.supply, where);
+ }
+ }
+ }
+ return game.supply.length > 0;
+}
+
+function check_exile_limits() {
+ game.exiles = [];
+ for (let where in AREAS) {
+ if (is_friendly_area(where)) {
+ if (where == "Calais" || where == "France") {
+ if (count_blocks_exclude_mercenaries(where) > 4)
+ add_blocks_exclude_mercenaries(game.exiles, where);
+ } else if (where == "Ireland" || where == "Scotland") {
+ if (count_blocks_exclude_mercenaries(where) > 2)
+ add_blocks_exclude_mercenaries(game.exiles, where);
+ }
+ }
+ }
+ if (game.exiles.length > 0)
+ return true;
+ delete game.exiles;
+ return false;
+}
+
+// SETUP
+
+function find_block(owner, name) {
+ if (name in BLOCKS)
+ return name;
+ name = name + "/" + owner[0];
+ if (name in BLOCKS)
+ return name;
+ throw new Error("Block not found: " + name);
+}
+
+function deploy(who, where) {
+ if (where == "Enemy")
+ return;
+ if (!(where in AREAS))
+ throw new Error("Area not found: " + where);
+ game.location[who] = where;
+ game.steps[who] = BLOCKS[who].steps;
+}
+
+function deploy_lancaster(name, where) {
+ deploy(find_block(LANCASTER, name), where);
+}
+
+function deploy_york(name, where) {
+ deploy(find_block(YORK, name), where);
+}
+
+function reset_blocks() {
+ for (let b in BLOCKS) {
+ game.location[b] = null;
+ game.steps[b] = block_max_steps(b);
+ }
+}
+
+function setup_game() {
+ reset_blocks();
+
+ game.campaign = 1;
+ game.end_campaign = 3;
+ game.pretender = "York";
+ game.king = "Henry VI";
+
+ deploy_lancaster("Henry VI", "Middlesex");
+ deploy_lancaster("Somerset", "Dorset");
+ deploy_lancaster("Exeter", "Cornwall");
+ deploy_lancaster("Devon", "Cornwall");
+ deploy_lancaster("Pembroke", "Pembroke");
+ deploy_lancaster("Wiltshire", "Wilts");
+ deploy_lancaster("Oxford", "Essex");
+ deploy_lancaster("Beaumont", "Lincoln");
+ deploy_lancaster("Clifford", "North Yorks");
+ deploy_lancaster("French Mercenary", "France");
+ deploy_lancaster("Scots Mercenary", "Scotland");
+ deploy_lancaster("Buckingham", "Pool");
+ deploy_lancaster("Northumberland", "Pool");
+ deploy_lancaster("Shrewsbury", "Pool");
+ deploy_lancaster("Westmoreland", "Pool");
+ deploy_lancaster("Rivers", "Pool");
+ deploy_lancaster("Stanley", "Pool");
+ deploy_lancaster("Bristol (levy)", "Pool");
+ deploy_lancaster("Coventry (levy)", "Pool");
+ deploy_lancaster("Newcastle (levy)", "Pool");
+ deploy_lancaster("York (levy)", "Pool");
+ deploy_lancaster("York (church)", "Pool");
+ deploy_lancaster("Bombard", "Pool");
+ deploy_lancaster("Welsh Mercenary", "Pool");
+ deploy_lancaster("Prince Edward", "Minor");
+ deploy_lancaster("Richmond", "Minor");
+ deploy_lancaster("Canterbury (church)", "Enemy");
+ deploy_lancaster("Clarence", "Enemy");
+ deploy_lancaster("Warwick", "Enemy");
+ deploy_lancaster("Salisbury", "Enemy");
+ deploy_lancaster("Kent", "Enemy");
+
+ deploy_york("York", "Ireland");
+ deploy_york("Rutland", "Ireland");
+ deploy_york("Irish Mercenary", "Ireland");
+ deploy_york("March", "Calais");
+ deploy_york("Warwick", "Calais");
+ deploy_york("Salisbury", "Calais");
+ deploy_york("Kent", "Calais");
+ deploy_york("Calais Mercenary", "Calais");
+ deploy_york("Burgundian Mercenary", "Calais");
+ deploy_york("Norfolk", "Pool");
+ deploy_york("Suffolk", "Pool");
+ deploy_york("Arundel", "Pool");
+ deploy_york("Essex", "Pool");
+ deploy_york("Worcester", "Pool");
+ deploy_york("Hastings", "Pool");
+ deploy_york("Herbert", "Pool");
+ deploy_york("Canterbury (church)", "Pool");
+ deploy_york("London (levy)", "Pool");
+ deploy_york("Norwich (levy)", "Pool");
+ deploy_york("Salisbury (levy)", "Pool");
+ deploy_york("Bombard", "Pool");
+ deploy_york("Rebel", "Pool");
+ deploy_york("Clarence", "Minor");
+ deploy_york("Gloucester", "Minor");
+ deploy_york("Exeter", "Enemy");
+ deploy_york("Buckingham", "Enemy");
+ deploy_york("Northumberland", "Enemy");
+ deploy_york("Westmoreland", "Enemy");
+ deploy_york("Shrewsbury", "Enemy");
+ deploy_york("Rivers", "Enemy");
+ deploy_york("Stanley", "Enemy");
+ deploy_york("York (church)", "Enemy");
+}
+
+function setup_kingmaker() {
+ reset_blocks();
+
+ game.campaign = 2;
+ game.end_campaign = 2;
+ game.pretender = "Henry VI";
+ game.king = "March";
+
+ deploy_york("March", "Middlesex");
+ deploy_york("Gloucester", "South Yorks");
+ deploy_york("Buckingham", "Warwick");
+ deploy_york("Norfolk", "East Anglia");
+ deploy_york("Suffolk", "East Anglia");
+ deploy_york("Arundel", "Sussex");
+ deploy_york("Essex", "Essex");
+ deploy_york("Hastings", "Leicester");
+ deploy_york("Rivers", "Leicester");
+ deploy_york("Stanley", "Lancaster");
+ deploy_york("Irish Mercenary", "Ireland");
+ deploy_york("Calais Mercenary", "Calais");
+ deploy_york("Burgundian Mercenary", "Calais");
+ deploy_york("Northumberland", "Pool");
+ deploy_york("Westmoreland", "Pool");
+ deploy_york("Canterbury (church)", "Pool");
+ deploy_york("Bombard", "Pool");
+ deploy_york("London (levy)", "Pool");
+ deploy_york("Norwich (levy)", "Pool");
+ deploy_york("Salisbury (levy)", "Pool");
+ deploy_york("Warwick", "Enemy");
+ deploy_york("Clarence", "Enemy");
+ deploy_york("Shrewsbury", "Enemy");
+ deploy_york("York (church)", "Enemy");
+ deploy_york("Exeter", "Enemy");
+
+ deploy_lancaster("Henry VI", "Middlesex");
+ deploy_lancaster("Prince Edward", "France");
+ deploy_lancaster("Exeter", "France");
+ deploy_lancaster("Warwick", "France");
+ deploy_lancaster("Clarence", "France");
+ deploy_lancaster("Oxford", "France");
+ deploy_lancaster("French Mercenary", "France");
+ deploy_lancaster("Scots Mercenary", "Scotland");
+ deploy_lancaster("Pembroke", "Pool");
+ deploy_lancaster("Shrewsbury", "Pool");
+ deploy_lancaster("York (church)", "Pool");
+ deploy_lancaster("Welsh Mercenary", "Pool");
+ deploy_lancaster("Bombard", "Pool");
+ deploy_lancaster("Bristol (levy)", "Pool");
+ deploy_lancaster("Coventry (levy)", "Pool");
+ deploy_lancaster("Newcastle (levy)", "Pool");
+ deploy_lancaster("York (levy)", "Pool");
+ deploy_lancaster("Rebel", "Pool");
+ deploy_lancaster("Richmond", "Minor");
+ deploy_lancaster("Buckingham", "Enemy");
+ deploy_lancaster("Northumberland", "Enemy");
+ deploy_lancaster("Rivers", "Enemy");
+ deploy_lancaster("Westmoreland", "Enemy");
+ deploy_lancaster("Stanley", "Enemy");
+ deploy_lancaster("Canterbury (church)", "Enemy");
+
+ // Prisoner!
+ game.dead["Henry VI"] = true;
+}
+
+function setup_richard_iii() {
+ reset_blocks();
+
+ game.campaign = 3;
+ game.end_campaign = 3;
+ game.pretender = "Richmond";
+ game.king = "Gloucester";
+
+ deploy_york("Gloucester", "Middlesex");
+ deploy_york("Norfolk", "East Anglia");
+ deploy_york("Suffolk", "East Anglia");
+ deploy_york("Arundel", "Sussex");
+ deploy_york("Essex", "Essex");
+ deploy_york("Northumberland", "Northumbria");
+ deploy_york("Stanley", "Lancaster");
+ deploy_york("Irish Mercenary", "Ireland");
+ deploy_york("Calais Mercenary", "Calais");
+ deploy_york("Burgundian Mercenary", "Calais");
+ deploy_york("Westmoreland", "Pool");
+ deploy_york("Canterbury (church)", "Pool");
+ deploy_york("York (church)", "Pool");
+ deploy_york("Bombard", "Pool");
+ deploy_york("London (levy)", "Pool");
+ deploy_york("Norwich (levy)", "Pool");
+ deploy_york("Salisbury (levy)", "Pool");
+ deploy_york("Buckingham", "Enemy");
+ deploy_york("Shrewsbury", "Enemy");
+ deploy_york("Rivers", "Enemy");
+
+ deploy_lancaster("Richmond", "France");
+ deploy_lancaster("Oxford", "France");
+ deploy_lancaster("Pembroke", "France");
+ deploy_lancaster("French Mercenary", "France");
+ deploy_lancaster("Scots Mercenary", "Scotland");
+ deploy_lancaster("Buckingham", "Glamorgan");
+ deploy_lancaster("Rivers", "Leicester");
+ deploy_lancaster("Shrewsbury", "Pool");
+ deploy_lancaster("Welsh Mercenary", "Pool");
+ deploy_lancaster("Bombard", "Pool");
+ deploy_lancaster("Bristol (levy)", "Pool");
+ deploy_lancaster("Coventry (levy)", "Pool");
+ deploy_lancaster("Newcastle (levy)", "Pool");
+ deploy_lancaster("York (levy)", "Pool");
+ deploy_lancaster("Rebel", "Pool");
+ deploy_lancaster("Northumberland", "Enemy");
+ deploy_lancaster("Westmoreland", "Enemy");
+ deploy_lancaster("Stanley", "Enemy");
+ deploy_lancaster("Canterbury (church)", "Enemy");
+ deploy_lancaster("York (church)", "Enemy");
+}
+
+// Kingmaker scenario special rule
+function free_henry_vi() {
+ if (game.dead["Henry VI"]) {
+ if ((game.active == LANCASTER && is_friendly_area("Middlesex")) ||
+ (game.active == YORK && is_enemy_area("Middlesex"))) {
+ log("Henry VI is rescued!");
+ delete game.dead["Henry VI"];
+ }
+ }
+}
+
+// GAME TURN
+
+function start_campaign() {
+ log("");
+ log("Start Campaign " + game.campaign + ".");
+
+ // TODO: Use board game mulligan rules instead of automatically redealing?
+ do {
+ let deck = shuffle_deck();
+ game.l_hand = deal_cards(deck, 7);
+ game.y_hand = deal_cards(deck, 7);
+ } while (count_ap(game.l_hand) <= 13 || count_ap(game.y_hand) <= 13);
+
+ start_game_turn();
+}
+
+function start_game_turn() {
+ log("");
+ log("Start Turn " + (8-game.l_hand.length) + " of campaign " + game.campaign + ".");
+
+ // Reset movement and attack tracking state
+ reset_border_limits();
+ game.last_used = {};
+ game.attacker = {};
+ game.reserves = [];
+ game.moved = {};
+
+ goto_card_phase();
+}
+
+function end_game_turn() {
+ delete game.force_march;
+ delete game.piracy;
+ delete game.is_pirate;
+ delete game.surprise;
+ delete game.treason;
+
+ if (game.l_hand.length > 0)
+ start_game_turn()
+ else
+ goto_political_turn();
+}
+
+// CARD PHASE
+
+function goto_card_phase() {
+ game.l_card = 0;
+ game.y_card = 0;
+ game.show_cards = false;
+ game.state = 'play_card';
+ game.active = BOTH;
+}
+
+function resume_play_card() {
+ if (game.l_card > 0 && game.y_card > 0)
+ reveal_cards();
+ else if (game.l_card > 0)
+ game.active = YORK;
+ else if (game.y_card > 0)
+ game.active = LANCASTER;
+ else
+ game.active = BOTH;
+}
+
+states.play_card = {
+ prompt: function (view, current) {
+ if (current == OBSERVER)
+ return view.prompt = "Waiting for players to play a card.";
+ if (current == LANCASTER) {
+ if (game.l_card) {
+ view.prompt = "Waiting for York to play a card.";
+ gen_action(view, 'undo');
+ } else {
+ view.prompt = "Play a card.";
+ for (let c of game.l_hand)
+ gen_action(view, 'play', c);
+ }
+ }
+ if (current == YORK) {
+ if (game.y_card) {
+ view.prompt = "Waiting for Lancaster to play a card.";
+ gen_action(view, 'undo');
+ } else {
+ view.prompt = "Play a card.";
+ for (let c of game.y_hand)
+ gen_action(view, 'play', c);
+ }
+ }
+ },
+ play: function (card, current) {
+ if (current == LANCASTER) {
+ remove_from_array(game.l_hand, card);
+ game.l_card = card;
+ }
+ if (current == YORK) {
+ remove_from_array(game.y_hand, card);
+ game.y_card = card;
+ }
+ resume_play_card();
+ },
+ undo: function (_, current) {
+ if (current == LANCASTER) {
+ game.l_hand.push(game.l_card);
+ game.l_card = 0;
+ }
+ if (current == YORK) {
+ game.y_hand.push(game.y_card);
+ game.y_card = 0;
+ }
+ resume_play_card();
+ }
+}
+
+function reveal_cards() {
+ log("Lancaster plays " + CARDS[game.l_card].name + ".");
+ log("York plays " + CARDS[game.y_card].name + ".");
+ game.show_cards = true;
+
+ let pretender = block_owner(game.pretender);
+
+ let lc = CARDS[game.l_card];
+ let yc = CARDS[game.y_card];
+
+ let lp = (lc.event ? 10 : 0) + lc.actions * 2 + (pretender == LANCASTER ? 1 : 0);
+ let yp = (yc.event ? 10 : 0) + yc.actions * 2 + (pretender == YORK ? 1 : 0);
+
+ if (lp > yp) {
+ game.p1 = LANCASTER;
+ game.p2 = YORK;
+ } else {
+ game.p1 = YORK;
+ game.p2 = LANCASTER;
+ }
+
+ game.active = game.p1;
+ start_player_turn();
+}
+
+function start_player_turn() {
+ log("");
+ log("Start " + game.active + " turn.");
+ reset_border_limits();
+ let lc = CARDS[game.l_card];
+ let yc = CARDS[game.y_card];
+ if (game.active == LANCASTER && lc.event)
+ goto_event_card(lc.event);
+ else if (game.active == YORK && yc.event)
+ goto_event_card(yc.event);
+ else if (game.active == LANCASTER)
+ goto_action_phase(lc.actions);
+ else if (game.active == YORK)
+ goto_action_phase(yc.actions);
+}
+
+function end_player_turn() {
+ game.moves = 0;
+ game.activated = null;
+ game.move_port = null;
+ game.main_border = null;
+
+ // Remove "Surprise" road limit bonus for retreats and regroups.
+ delete game.surprise;
+
+ if (game.active == game.p2) {
+ goto_battle_phase();
+ } else {
+ game.active = game.p2;
+ start_player_turn();
+ }
+}
+
+// EVENTS
+
+function goto_event_card(event) {
+ switch (event) {
+ case 'force_march':
+ game.force_march = game.active;
+ goto_action_phase(1);
+ break;
+ case 'muster':
+ goto_muster_event();
+ break;
+ case 'piracy':
+ game.piracy = game.active;
+ game.is_pirate = {};
+ goto_action_phase(2);
+ break;
+ case 'plague':
+ game.state = 'plague_event';
+ break;
+ case 'surprise':
+ game.surprise = game.active;
+ goto_action_phase(1);
+ break;
+ case 'treason':
+ game.treason = game.active;
+ goto_action_phase(1);
+ break;
+ }
+}
+
+states.plague_event = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Plague: Waiting for " + game.active + " to choose a city.";
+ view.prompt = "Plague: Choose an enemy city area.";
+ gen_action(view, 'pass');
+ for (let where in AREAS)
+ if (is_enemy_area(where) && has_city(where))
+ gen_action(view, 'area', where);
+ },
+ area: function (where) {
+ log("Plague ravages " + has_city(where) + "!");
+ for (let b in BLOCKS) {
+ if (game.location[b] == where)
+ reduce_block(b);
+ }
+ end_player_turn();
+ },
+ pass: function () {
+ end_player_turn();
+ }
+}
+
+function goto_muster_event() {
+ game.state = 'muster_event';
+ game.turn_log = [];
+ clear_undo();
+}
+
+states.muster_event = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Muster: Waiting for " + game.active + " to muster.";
+ view.prompt = "Muster: Choose one friendly or vacant muster area.";
+ gen_action_undo(view);
+ gen_action(view, 'end_action_phase');
+ for (let where in AREAS) {
+ if (is_friendly_or_vacant_area(where))
+ if (can_muster_to(where))
+ gen_action(view, 'area', where);
+ }
+ },
+ area: function (where) {
+ game.where = where;
+ game.state = 'muster_who';
+ },
+ end_action_phase: function () {
+ clear_undo();
+ print_turn_log(game.active + " musters:");
+ end_player_turn();
+ },
+ undo: pop_undo,
+}
+
+states.muster_who = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Muster: Waiting for " + game.active + " to muster.";
+ view.prompt = "Muster: Move blocks to the designated muster area.";
+ gen_action_undo(view);
+ gen_action(view, 'end_action_phase');
+ for (let b in BLOCKS)
+ if (can_block_muster(b, game.where))
+ gen_action(view, 'block', b);
+ },
+ block: function (who) {
+ game.who = who;
+ game.state = 'muster_move_1';
+ },
+ end_action_phase: function () {
+ game.where = null;
+ clear_undo();
+ print_turn_log(game.active + " musters:");
+ end_player_turn();
+ },
+ undo: pop_undo,
+}
+
+states.muster_move_1 = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Muster: Waiting for " + game.active + " to muster.";
+ view.prompt = "Muster: Move " + block_name(game.who) + " to the designated muster area.";
+ gen_action_undo(view);
+ gen_action(view, 'block', game.who);
+ let from = game.location[game.who];
+ for (let to of AREAS[from].exits) {
+ if (can_block_muster_via(game.who, from, to, game.where))
+ gen_action(view, 'area', to);
+ }
+ },
+ block: function () {
+ game.who = null;
+ game.state = 'muster_who';
+ },
+ area: function (to) {
+ let from = game.location[game.who];
+ log_move_start(from);
+ log_move_continue(to);
+ move_block(game.who, from, to);
+ if (to == game.where) {
+ log_move_end();
+ game.moved[game.who] = true;
+ game.who = null;
+ game.state = 'muster_who';
+ } else {
+ game.state = 'muster_move_2';
+ }
+ },
+ undo: pop_undo,
+}
+
+states.muster_move_2 = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Muster: Waiting for " + game.active + " to muster.";
+ view.prompt = "Muster: Move " + block_name(game.who) + " to the designated muster area.";
+ gen_action_undo(view);
+ gen_action(view, 'area', game.where);
+ },
+ area: function (to) {
+ log_move_continue(to);
+ log_move_end();
+ move_block(game.who, game.location[game.who], to);
+ game.moved[game.who] = true;
+ game.who = null;
+ game.state = 'muster_who';
+ },
+ undo: pop_undo,
+}
+
+// ACTION PHASE
+
+function use_border(from, to) {
+ game.border_limit[border_id(from, to)] = border_limit(from, to) + 1;
+}
+
+function move_block(who, from, to) {
+ game.location[who] = to;
+ use_border(from, to);
+ game.distance ++;
+ if (is_contested_area(to)) {
+ game.last_used[border_id(from, to)] = game.active;
+ if (!game.attacker[to]) {
+ game.attacker[to] = game.active;
+ game.main_border[to] = from;
+ } else {
+ if (game.attacker[to] != game.active || game.main_border[to] != from) {
+ game.reserves.push(who);
+ return RESERVE_MARK;
+ }
+ }
+ return ATTACK_MARK;
+ }
+ return "";
+}
+
+function goto_action_phase(moves) {
+ game.state = 'action_phase';
+ game.moves = moves;
+ game.activated = [];
+ game.move_port = {};
+ game.main_border = {};
+ game.turn_log = [];
+ game.recruit_log = [];
+ clear_undo();
+}
+
+states.action_phase = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current)) {
+ if (game.active == game.piracy)
+ return view.prompt = "Piracy: Waiting for " + game.active + ".";
+ if (game.active == game.force_march)
+ return view.prompt = "Force March: Waiting for " + game.active + ".";
+ if (game.active == game.surprise)
+ return view.prompt = "Surprise: Waiting for " + game.active + ".";
+ if (game.active == game.treason)
+ return view.prompt = "Treason: Waiting for " + game.active + ".";
+ else
+ return view.prompt = "Action Phase: Waiting for " + game.active + ".";
+ }
+
+ if (game.active == game.piracy) {
+ view.prompt = "Piracy: Choose an army to sea move. Attacking is allowed. " + game.moves + "AP left.";
+ } else if (game.active == game.force_march) {
+ view.prompt = "Force March: Move one group. Blocks can move up to 3 areas and may attack.";
+ } else if (game.active == game.surprise) {
+ view.prompt = "Surprise: Move one group. Border limit is +1 to cross all borders.";
+ } else if (game.active == game.treason) {
+ view.prompt = "Treason: Move one group.";
+ } else {
+ view.prompt = "Action Phase: Choose an army to move or recruit. " + game.moves + "AP left.";
+ }
+
+ gen_action_undo(view);
+ gen_action(view, 'end_action_phase');
+ for (let b in BLOCKS) {
+ let from = game.location[b];
+ if (can_recruit(b)) {
+ if (game.moves > 0)
+ gen_action(view, 'block', b);
+ }
+ if (can_block_land_move(b)) {
+ if (game.moves == 0) {
+ if (game.activated.includes(from))
+ gen_action(view, 'block', b);
+ } else {
+ gen_action(view, 'block', b);
+ }
+ }
+ if (can_block_sea_move(b)) {
+ if (game.moves == 0) {
+ if (game.move_port[game.location[b]])
+ gen_action(view, 'block', b);
+ } else {
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ },
+ block: function (who) {
+ push_undo();
+ game.who = who;
+ game.origin = game.location[who];
+ if (game.origin == POOL) {
+ game.state = 'recruit_where';
+ } else {
+ game.distance = 0;
+ game.last_from = null;
+ game.state = 'move_to';
+ }
+ },
+ end_action_phase: function () {
+ if (game.turn_log.length > 0)
+ print_turn_log(game.active + " moves:");
+ game.turn_log = game.recruit_log;
+ if (game.turn_log.length > 0)
+ print_turn_log(game.active + " recruits:");
+ game.turn_log = null;
+ game.recruit_log = null;
+
+ clear_undo();
+ game.moves = 0;
+ end_player_turn();
+ },
+ undo: pop_undo,
+}
+
+states.recruit_where = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to recruit.";
+ view.prompt = "Recruit " + block_name(game.who) + " where?";
+ gen_action_undo(view);
+ gen_action(view, 'block', game.who);
+ for (let to in AREAS)
+ if (can_recruit_to(game.who, to))
+ gen_action(view, 'area', to);
+ },
+ area: function (to) {
+ game.recruit_log.push([to]);
+ --game.moves;
+ game.location[game.who] = to;
+ game.moved[game.who] = true;
+ end_action();
+ },
+ block: pop_undo,
+ undo: pop_undo,
+}
+
+states.move_to = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to move.";
+ view.prompt = "Move " + block_name(game.who) + ".";
+ gen_action_undo(view);
+ gen_action(view, 'block', game.who);
+ let from = game.location[game.who];
+ if (game.distance > 0)
+ gen_action(view, 'area', from);
+ for (let to of AREAS[from].exits) {
+ if (to != game.last_from && can_block_land_move_to(game.who, from, to))
+ gen_action(view, 'area', to);
+ else if (game.distance == 0 && can_block_sea_move_to(game.who, from, to)) {
+ let has_destination_port = false;
+ if (game.moves == 0) {
+ for (let port of AREAS[to].exits)
+ if (game.move_port[game.origin] == port)
+ has_destination_port = true;
+ } else {
+ if (game.active == game.piracy)
+ has_destination_port = true;
+ else
+ for (let port of AREAS[to].exits)
+ if (port != game.origin && is_friendly_or_vacant_area(port))
+ has_destination_port = true;
+ }
+ if (has_destination_port)
+ gen_action(view, 'area', to);
+ }
+ }
+ },
+ block: function () {
+ if (game.distance == 0)
+ pop_undo();
+ else
+ end_move();
+ },
+ area: function (to) {
+ let from = game.location[game.who];
+ if (to == from) {
+ end_move();
+ return;
+ }
+ if (game.distance == 0)
+ log_move_start(from);
+ game.last_from = from;
+ if (is_sea_area(to)) {
+ log_move_continue(to);
+ game.location[game.who] = to;
+ game.state = 'sea_move_to';
+ } else {
+ let mark = move_block(game.who, from, to);
+ log_move_continue(to, mark);
+ if (!can_block_continue(game.who, from, to))
+ end_move();
+ }
+ },
+ undo: pop_undo,
+}
+
+states.sea_move_to = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to move.";
+ if (game.active == game.piracy) {
+ view.prompt = "Piracy: Sea Move " + block_name(game.who) + " to a coastal area.";
+ } else {
+ view.prompt = "Sea Move " + block_name(game.who) + " to a friendly or vacant coastal area.";
+ }
+ gen_action_undo(view);
+ for (let to of AREAS[game.location[game.who]].exits) {
+ if (to == game.last_from)
+ continue;
+ if (is_friendly_or_vacant_area(to)) {
+ if (game.moves == 0) {
+ if (game.move_port[game.origin] == to)
+ gen_action(view, 'area', to);
+ } else {
+ gen_action(view, 'area', to);
+ }
+ } else if (game.active == game.piracy && game.moves > 0) {
+ // Can attack with piracy, but no port-to-port bonus.
+ gen_action(view, 'area', to);
+ }
+ }
+ },
+ area: function (to) {
+ game.location[game.who] = to;
+ game.moved[game.who] = true;
+
+ if (game.active == game.piracy && is_contested_area(to)) {
+ // Can attack with piracy, but no port-to-port bonus.
+ log_move_continue(to, ATTACK_MARK);
+ game.is_pirate[game.who] = true;
+ if (!game.attacker[to])
+ game.attacker[to] = game.active;
+ logp("sea moves.");
+ --game.moves;
+ } else {
+ // Can sea move two blocks between same major ports for 1 AP.
+ log_move_continue(to);
+ if (game.move_port[game.origin] == to) {
+ delete game.move_port[game.origin];
+ } else {
+ logp("sea moves.");
+ --game.moves;
+ if (is_major_port(game.origin) && is_major_port(to))
+ game.move_port[game.origin] = to;
+ }
+ }
+
+ log_move_end();
+ end_action();
+ },
+ undo: pop_undo,
+}
+
+function end_move() {
+ if (game.distance > 0) {
+ log_move_end();
+ if (!game.activated.includes(game.origin)) {
+ logp("activates " + game.origin + ".");
+ game.activated.push(game.origin);
+ game.moves --;
+ }
+ game.moved[game.who] = true;
+ }
+ game.last_from = null;
+ end_action();
+}
+
+function end_action() {
+ free_henry_vi();
+ game.who = null;
+ game.distance = 0;
+ game.origin = null;
+ game.state = 'action_phase';
+}
+
+// BATTLE PHASE
+
+function goto_battle_phase() {
+ if (have_contested_areas()) {
+ game.active = game.p1;
+ game.state = 'battle_phase';
+ } else {
+ goto_supply_phase();
+ }
+}
+
+states.battle_phase = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to choose a battle.";
+ view.prompt = "Choose the next battle to fight!";
+ for (let where in AREAS)
+ if (is_area_on_map(where) && is_contested_area(where))
+ gen_action(view, 'area', where);
+ },
+ area: function (where) {
+ start_battle(where);
+ },
+}
+
+function start_battle(where) {
+ game.flash = "";
+ log("");
+ log("Battle in " + where + ".");
+ game.where = where;
+ game.battle_round = 0;
+ game.defected = {};
+ game.treachery = {};
+
+ if (game.treason && can_attempt_treason_event()) {
+ game.active = game.treason;
+ game.state = 'treason_event';
+ } else {
+ game.state = 'battle_round';
+ start_battle_round();
+ }
+}
+
+function resume_battle() {
+ if (game.result)
+ return goto_game_over();
+ game.who = null;
+ game.state = 'battle_round';
+ pump_battle_round();
+}
+
+function end_battle() {
+ free_henry_vi();
+ game.flash = "";
+ game.battle_round = 0;
+ reset_border_limits();
+ game.moved = {};
+ game.defected = {};
+ game.treachery = {};
+ goto_regroup();
+}
+
+states.treason_event = {
+ show_battle: true,
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Treason: Waiting for " + game.active + " to choose a target.";
+ view.prompt = "Treason: Choose a target or pass.";
+ gen_action(view, 'pass');
+ for (let b in BLOCKS) {
+ if (game.active == game.attacker[game.where]) {
+ if (is_defender(b) && can_defect(null, b)) {
+ gen_action(view, 'battle_treachery', b);
+ gen_action(view, 'block', b);
+ }
+ } else {
+ if (is_attacker(b) && can_defect(null, b)) {
+ gen_action(view, 'battle_treachery', b);
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ },
+ battle_treachery: function (target) {
+ delete game.treason;
+ attempt_treachery(null, target);
+ game.state = 'battle_round';
+ start_battle_round();
+ },
+ block: function (target) {
+ delete game.treason;
+ attempt_treachery(null, target);
+ game.state = 'battle_round';
+ start_battle_round();
+ },
+ pass: function () {
+ game.state = 'battle_round';
+ start_battle_round();
+ }
+}
+
+function bring_on_reserves(owner, moved) {
+ for (let b in BLOCKS) {
+ if (block_owner(b) == owner && game.location[b] == game.where) {
+ remove_from_array(game.reserves, b);
+ game.moved[b] = moved;
+ }
+ }
+}
+
+function start_battle_round() {
+ if (++game.battle_round <= 4) {
+ log("~ Battle round " + game.battle_round + " ~");
+
+ reset_border_limits();
+ game.moved = {};
+
+ if (game.battle_round > 1) {
+ bring_on_reserves(LANCASTER, false);
+ bring_on_reserves(YORK, false);
+ }
+
+ pump_battle_round();
+ } else {
+ end_battle();
+ }
+}
+
+function pump_battle_round() {
+ if (is_friendly_area(game.where) || is_enemy_area(game.where)) {
+ end_battle();
+ return;
+ }
+
+ if (count_attackers() == 0 || count_defenders() == 0) {
+ // Deploy reserves immediately if all blocks on one side are eliminated.
+ if (count_attackers() == 0) {
+ log("Attacking main force eliminated.");
+ bring_on_reserves(game.attacker[game.where], true);
+ } else if (count_defenders() == 0) {
+ log("Defending main force was eliminated.");
+ bring_on_reserves(ENEMY[game.attacker[game.where]], true);
+ if (game.battle_round == 1) {
+ log("The attacker is now the defender.");
+ game.attacker[game.where] = ENEMY[game.attacker[game.where]];
+ }
+ }
+ }
+
+ function filter_battle_blocks(ci, is_candidate) {
+ let output = null;
+ for (let b in BLOCKS) {
+ if (is_candidate(b) && !game.moved[b] && !game.dead[b]) {
+ if (block_initiative(b) == ci) {
+ if (!output)
+ output = [];
+ output.push(b);
+ }
+ }
+ }
+ return output;
+ }
+
+ function battle_step(active, initiative, candidate) {
+ game.battle_list = filter_battle_blocks(initiative, candidate);
+ if (game.battle_list) {
+ game.active = active;
+ return true;
+ }
+ return false;
+ }
+
+ let attacker = game.attacker[game.where];
+ let defender = ENEMY[attacker];
+
+ if (battle_step(defender, 'A', is_defender)) return;
+ if (battle_step(attacker, 'A', is_attacker)) return;
+ if (battle_step(defender, 'B', is_defender)) return;
+ if (battle_step(attacker, 'B', is_attacker)) return;
+ if (battle_step(defender, 'C', is_defender)) return;
+ if (battle_step(attacker, 'C', is_attacker)) return;
+ if (battle_step(defender, 'D', is_defender)) return;
+ if (battle_step(attacker, 'D', is_attacker)) return;
+
+ start_battle_round();
+}
+
+function pass_with_block(b) {
+ game.flash = block_name(b) + " passes.";
+ log(game.flash);
+ game.moved[b] = true;
+ resume_battle();
+}
+
+function can_retreat_with_block(who) {
+ if (game.location[who] == game.where) {
+ if (game.battle_round > 1) {
+ if (game.active == game.piracy && game.is_pirate[who]) {
+ return true;
+ } else {
+ for (let to of AREAS[game.where].exits)
+ if (can_block_retreat_to(who, to))
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
+function must_retreat_with_block(who) {
+ if (game.location[who] == game.where)
+ if (game.battle_round == 4)
+ return (block_owner(who) == game.attacker[game.where]);
+ return false;
+}
+
+function retreat_with_block(who) {
+ if (can_retreat_with_block(who)) {
+ game.who = who;
+ game.state = 'retreat_in_battle';
+ } else {
+ eliminate_block(who);
+ resume_battle();
+ }
+}
+
+function roll_attack(b, verb) {
+ game.hits = 0;
+ let fire = block_fire_power(b, game.where);
+ let printed_fire = block_printed_fire_power(b);
+ let rolls = [];
+ let steps = game.steps[b];
+ for (let i = 0; i < steps; ++i) {
+ let die = roll_d6();
+ if (die <= fire) {
+ rolls.push(DIE_HIT[die]);
+ ++game.hits;
+ } else {
+ rolls.push(DIE_MISS[die]);
+ }
+ }
+
+ game.flash += block_name(b) + " " + BLOCKS[b].combat;
+ if (fire > printed_fire)
+ game.flash += "+" + (fire - printed_fire);
+ game.flash += "\n" + verb + " " + rolls.join(" ") + "\n";
+ if (game.hits == 0)
+ game.flash += "and misses.";
+ else if (game.hits == 1)
+ game.flash += "and scores 1 hit.";
+ else
+ game.flash += "and scores " + game.hits + " hits.";
+}
+
+function fire_with_block(b) {
+ game.moved[b] = true;
+ game.flash = "";
+ roll_attack(b, "fires");
+ log(game.flash);
+ if (game.hits > 0) {
+ game.active = ENEMY[game.active];
+ goto_battle_hits();
+ } else {
+ resume_battle();
+ }
+}
+
+function attempt_treachery(source, target) {
+ if (source) {
+ let once = treachery_tag(source);
+ game.treachery[once] = true;
+ game.moved[source] = true;
+ }
+ let n = block_loyalty(source, target);
+ let rolls = [];
+ let result = true;
+ for (let i = 0; i < n; ++i) {
+ let die = roll_d6();
+ if ((die & 1) == 1) {
+ rolls.push(DIE_MISS[die]);
+ result = false;
+ } else {
+ rolls.push(DIE_HIT[die]);
+ }
+ }
+ if (source)
+ game.flash = block_name(source) + " treachery " + rolls.join(" ");
+ else
+ game.flash = "Treason event " + rolls.join(" ");
+ if (result) {
+ game.flash += " converts " + block_name(target) + "!";
+ target = swap_blocks(target);
+ game.defected[target] = true;
+ game.reserves.push(target);
+ } else {
+ game.flash += " fails to convert " + block_name(target) + ".";
+ }
+ log(game.flash);
+}
+
+function charge_with_block(heir, target) {
+ let n;
+ game.moved[heir] = true;
+ game.flash = "";
+ roll_attack(heir, "charges " + block_name(target));
+ log(game.flash);
+ n = Math.min(game.hits, game.steps[target]);
+ if (n == game.steps[target]) {
+ eliminate_block(target);
+ } else {
+ while (n-- > 0)
+ reduce_block(target);
+ let charge_flash = game.flash;
+ game.flash = "";
+ roll_attack(target, "counter-attacks");
+ log(game.flash);
+ n = Math.min(game.hits, game.steps[heir]);
+ while (n-- > 0)
+ reduce_block(heir);
+ game.flash = charge_flash + "\n" + game.flash;
+ }
+ resume_battle();
+}
+
+function can_block_fire(who) {
+ if (is_attacker(who))
+ return game.battle_round < 4;
+ if (is_defender(who))
+ return true;
+ return false;
+}
+
+function can_block_retreat(who) {
+ if (game.location[who] == game.where)
+ return game.battle_round > 1;
+ return false;
+}
+
+function find_minor_heir(owner) {
+ let candidate = null;
+ for (let b in BLOCKS) {
+ if (block_owner(b) == owner && block_type(b) == 'heir' && game.location[b] == MINOR)
+ if (!candidate || BLOCKS[b].heir < BLOCKS[candidate].heir)
+ candidate = b;
+ }
+ return candidate;
+}
+
+function find_senior_heir(owner) {
+ let candidate = null;
+ for (let b in BLOCKS)
+ if (block_owner(b) == owner && block_type(b) == 'heir' && is_block_on_map(b))
+ if (!candidate || BLOCKS[b].heir < BLOCKS[candidate].heir)
+ candidate = b;
+ return candidate;
+}
+
+function find_next_king(owner) {
+ let candidate = null;
+ for (let b in BLOCKS)
+ if (block_owner(b) == owner && block_type(b) == 'heir' && game.location[b])
+ if (!candidate || BLOCKS[b].heir < BLOCKS[candidate].heir)
+ candidate = b;
+ return candidate;
+}
+
+function find_senior_heir_in_area(owner, where) {
+ let candidate = null;
+ for (let b in BLOCKS) {
+ if (block_owner(b) == owner && block_type(b) == 'heir' && game.location[b] == where) {
+ if (is_battle_reserve(b))
+ continue;
+ if (!candidate || BLOCKS[b].heir < BLOCKS[candidate].heir)
+ candidate = b;
+ }
+ }
+ return candidate;
+}
+
+function is_senior_royal_heir_in(who, where) {
+ return find_senior_heir_in_area(block_owner(game.king), where) == who;
+}
+
+function can_heir_charge() {
+ let heir = find_senior_heir_in_area(game.active, game.where);
+ if (heir && !game.moved[heir]) {
+ if (is_attacker(heir))
+ return game.battle_round < 4 ? heir : null;
+ if (is_defender(heir))
+ return heir;
+ }
+ return null;
+}
+
+states.battle_round = {
+ show_battle: true,
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to choose a combat action.";
+ view.prompt = "Battle: Choose a combat action with an army.";
+
+ let can_fire = false;
+ let can_retreat = false;
+ let must_retreat = false;
+ let can_pass = false;
+ if (game.active == game.attacker[game.where]) {
+ if (game.battle_round < 4) can_fire = true;
+ if (game.battle_round > 1) can_retreat = true;
+ if (game.battle_round < 4) can_pass = true;
+ if (game.battle_round == 4) must_retreat = true;
+ } else {
+ can_fire = true;
+ if (game.battle_round > 1) can_retreat = true;
+ can_pass = true;
+ }
+ for (let b of game.battle_list) {
+ if (can_fire) gen_action(view, 'battle_fire', b);
+ if (must_retreat || (can_retreat && can_retreat_with_block(b)))
+ gen_action(view, 'battle_retreat', b);
+ if (can_pass) gen_action(view, 'battle_pass', b);
+ gen_action(view, 'block', b);
+ }
+
+ let heir = can_heir_charge();
+ if (heir && game.battle_list.includes(heir)) {
+ gen_action(view, 'battle_charge', heir);
+ }
+ if (can_attempt_treachery(game.king))
+ gen_action(view, 'battle_treachery', game.king);
+ if (can_attempt_treachery(game.pretender))
+ gen_action(view, 'battle_treachery', game.pretender);
+ if (can_attempt_treachery("Warwick/L"))
+ gen_action(view, 'battle_treachery', "Warwick/L");
+ if (can_attempt_treachery("Warwick/Y"))
+ gen_action(view, 'battle_treachery', "Warwick/Y");
+ },
+ battle_fire: function (who) {
+ fire_with_block(who);
+ },
+ battle_retreat: function (who) {
+ retreat_with_block(who);
+ },
+ battle_pass: function (who) {
+ pass_with_block(who);
+ },
+ battle_charge: function (who) {
+ game.who = who;
+ game.state = 'battle_charge';
+ },
+ battle_treachery: function (who) {
+ game.who = who;
+ game.state = 'battle_treachery';
+ },
+ block: function (who) {
+ if (can_block_fire(who))
+ fire_with_block(who);
+ else if (can_retreat_with_block(who))
+ retreat_with_block(who);
+ else if (must_retreat_with_block(who))
+ eliminate_block(who);
+ else
+ pass_with_block(who);
+ },
+}
+
+states.battle_charge = {
+ show_battle: true,
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Heir Charge: Waiting for " + game.active + " to choose a target.";
+ view.prompt = "Heir Charge: Choose a target.";
+ gen_action(view, 'undo');
+ for (let b in BLOCKS) {
+ if (game.active == game.attacker[game.where]) {
+ if (is_defender(b)) {
+ gen_action(view, 'battle_charge', b);
+ gen_action(view, 'block', b);
+ }
+ } else {
+ if (is_attacker(b)) {
+ gen_action(view, 'battle_charge', b);
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ },
+ battle_charge: function (target) {
+ charge_with_block(game.who, target);
+ },
+ block: function (target) {
+ charge_with_block(game.who, target);
+ },
+ undo: function () {
+ resume_battle();
+ }
+}
+
+states.battle_treachery = {
+ show_battle: true,
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Treachery: Waiting for " + game.active + " to choose a target.";
+ view.prompt = "Treachery: Choose a target.";
+ gen_action(view, 'undo');
+ for (let b in BLOCKS) {
+ if (game.active == game.attacker[game.where]) {
+ if (is_defender(b) && can_defect(game.who, b)) {
+ gen_action(view, 'battle_treachery', b);
+ gen_action(view, 'block', b);
+ }
+ } else {
+ if (is_attacker(b) && can_defect(game.who, b)) {
+ gen_action(view, 'battle_treachery', b);
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ },
+ battle_treachery: function (target) {
+ attempt_treachery(game.who, target);
+ resume_battle();
+ },
+ block: function (target) {
+ attempt_treachery(game.who, target);
+ resume_battle();
+ },
+ undo: function () {
+ resume_battle();
+ }
+}
+
+function goto_battle_hits() {
+ game.battle_list = list_victims(game.active);
+ if (game.battle_list.length == 0)
+ resume_battle();
+ else
+ game.state = 'battle_hits';
+}
+
+function apply_hit(who) {
+ let n = Math.min(game.hits, game.steps[who]);
+ if (n == 1)
+ game.flash = block_name(who) + " takes " + n + " hit.";
+ else
+ game.flash = block_name(who) + " takes " + n + " hits.";
+ while (n-- > 0) {
+ reduce_block(who);
+ game.hits--;
+ }
+ game.battle_list = list_victims(game.active);
+ if (game.battle_list.length > 0) {
+ if (game.hits == 1)
+ game.flash += " 1 hit left.";
+ else if (game.hits > 1)
+ game.flash += " " + game.hits + " hits left.";
+ }
+ if (game.hits == 0)
+ resume_battle();
+ else
+ goto_battle_hits();
+}
+
+function list_victims(p) {
+ let is_candidate = (p == game.attacker[game.where]) ? is_attacker : is_defender;
+ let max = 0;
+ for (let b in BLOCKS)
+ if (is_candidate(b) && game.steps[b] > max)
+ max = game.steps[b];
+ let list = [];
+ for (let b in BLOCKS)
+ if (is_candidate(b) && game.steps[b] == max)
+ list.push(b);
+ return list;
+}
+
+states.battle_hits = {
+ show_battle: true,
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to assign hits.";
+ view.prompt = "Assign " + game.hits + (game.hits != 1 ? " hits" : " hit") + " to your armies.";
+ for (let b of game.battle_list) {
+ gen_action(view, 'battle_hit', b);
+ gen_action(view, 'block', b);
+ }
+ },
+ battle_hit: function (who) {
+ apply_hit(who);
+ },
+ block: function (who) {
+ apply_hit(who);
+ },
+}
+
+states.retreat_in_battle = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to retreat.";
+ gen_action(view, 'undo');
+ if (game.active == game.piracy && game.is_pirate[game.who]) {
+ view.prompt = "Retreat: Move the army to a friendly or vacant areas in the same sea zone.";
+ for (let to of AREAS[game.where].exits)
+ if (is_sea_area(to))
+ gen_action(view, 'area', to);
+ } else {
+ view.prompt = "Retreat: Move the army to a friendly or vacant area.";
+ for (let to of AREAS[game.where].exits)
+ if (can_block_retreat_to(game.who, to))
+ gen_action(view, 'area', to);
+ }
+ },
+ area: function (to) {
+ if (is_sea_area(to)) {
+ game.location[game.who] = to;
+ game.state = 'sea_retreat_to';
+ } else {
+ game.flash = block_name(game.who) + " retreats.";
+ logp("retreats to " + to + ".");
+ use_border(game.where, to);
+ game.location[game.who] = to;
+ resume_battle();
+ }
+ },
+ eliminate: function () {
+ game.flash = "";
+ eliminate_block(game.who);
+ resume_battle();
+ },
+ undo: function () {
+ resume_battle();
+ }
+}
+
+states.sea_retreat_to = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to retreat.";
+ view.prompt = "Retreat: Move the army to a friendly or vacant area in the same sea zone.";
+ // TODO: only eliminate if no retreat is possible
+ gen_action(view, 'eliminate');
+ let from = game.location[game.who];
+ for (let to of AREAS[from].exits)
+ if (is_friendly_or_vacant_area(to))
+ gen_action(view, 'area', to);
+ },
+ area: function (to) {
+ game.flash = block_name(game.who) + " retreats by sea.";
+ logp("sea retreats to " + to + ".");
+ game.location[game.who] = to;
+ resume_battle();
+ },
+ eliminate: function () {
+ game.flash = "";
+ eliminate_block(game.who);
+ resume_battle();
+ },
+ undo: function () {
+ game.location[game.who] = game.where;
+ resume_battle();
+ }
+}
+
+function goto_regroup() {
+ game.active = game.attacker[game.where];
+ if (is_enemy_area(game.where))
+ game.active = ENEMY[game.active];
+ log("~ " + game.active + " wins the battle ~");
+ game.state = 'regroup';
+ game.turn_log = [];
+ clear_undo();
+}
+
+states.regroup = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to regroup.";
+ view.prompt = "Regroup: Choose an army to move.";
+ gen_action_undo(view);
+ gen_action(view, 'end_regroup');
+ for (let b in BLOCKS) {
+ if (game.location[b] == game.where) {
+ if (game.active == game.piracy) {
+ if (game.is_pirate[b])
+ gen_action(view, 'block', b);
+ } else {
+ if (can_block_regroup(b))
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ },
+ block: function (who) {
+ push_undo();
+ game.who = who;
+ game.state = 'regroup_to';
+ },
+ end_regroup: function () {
+ game.where = null;
+ clear_undo();
+ print_turn_log(game.active + " regroups:");
+ goto_battle_phase();
+ },
+ undo: pop_undo,
+}
+
+states.regroup_to = {
+ prompt: function (view, current) {
+ if (game.active == game.piracy && game.is_pirate[game.who]) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to regroup.";
+ view.prompt = "Regroup: Move the army to a friendly or vacant area in the same sea zone.";
+ gen_action_undo(view);
+ gen_action(view, 'block', game.who);
+ for (let to of AREAS[game.where].exits)
+ if (is_sea_area(to))
+ gen_action(view, 'area', to);
+ } else {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to regroup.";
+ view.prompt = "Regroup: Move the army to a friendly or vacant area.";
+ gen_action_undo(view);
+ gen_action(view, 'block', game.who);
+ for (let to of AREAS[game.where].exits)
+ if (can_block_regroup_to(game.who, to))
+ gen_action(view, 'area', to);
+ }
+ },
+ area: function (to) {
+ if (is_sea_area(to)) {
+ game.location[game.who] = to;
+ game.state = 'sea_regroup_to';
+ } else {
+ game.turn_log.push([game.where, to]);
+ move_block(game.who, game.where, to);
+ game.who = null;
+ game.state = 'regroup';
+ }
+ },
+ block: pop_undo,
+ undo: pop_undo,
+}
+
+states.sea_regroup_to = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to regroup.";
+ view.prompt = "Regroup: Move the army to a friendly or vacant area in the same sea zone.";
+ gen_action_undo(view);
+ let from = game.location[game.who];
+ for (let to of AREAS[from].exits)
+ if (is_friendly_or_vacant_area(to))
+ gen_action(view, 'area', to);
+ },
+ area: function (to) {
+ logp("sea regroups to " + to + ".");
+ game.location[game.who] = to;
+ game.who = null;
+ game.state = 'regroup'
+ },
+ undo: pop_undo,
+}
+
+// SUPPLY PHASE
+
+function goto_supply_phase() {
+ game.moved = {};
+
+ if (!game.location[game.king]) {
+ game.king = find_next_king(block_owner(game.king));
+ log("The King is dead; long live the king!");
+ if (game.location[game.king] == MINOR)
+ log("The new King is a minor.");
+ else
+ log("The new King is in " + game.location[game.king] + ".");
+ }
+
+ goto_execute_clarence();
+}
+
+function goto_execute_clarence() {
+ if (is_block_alive("Clarence/L")) {
+ game.active = LANCASTER;
+ game.state = 'execute_clarence';
+ game.who = "Clarence/L";
+ } else {
+ goto_execute_exeter();
+ }
+}
+
+states.execute_clarence = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to execute Clarence.";
+ view.prompt = "Supply Phase: Execute enemy heir Clarence?";
+ gen_action(view, 'execute_clarence');
+ gen_action(view, 'pass');
+ },
+ execute_clarence: function () {
+ logp("executes Clarence.");
+ eliminate_block("Clarence/L");
+ game.who = null;
+ if (game.result)
+ return goto_game_over();
+ goto_execute_exeter();
+ },
+ pass: function () {
+ game.who = null;
+ goto_execute_exeter();
+ }
+}
+
+function goto_execute_exeter() {
+ if (is_block_alive("Exeter/Y")) {
+ game.active = YORK;
+ game.state = 'execute_exeter';
+ game.who = "Exeter/Y";
+ } else {
+ goto_enter_pretender_heir();
+ }
+}
+
+states.execute_exeter = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to execute Exeter.";
+ view.prompt = "Supply Phase: Execute enemy heir Exeter?";
+ gen_action(view, 'execute_exeter');
+ gen_action(view, 'pass');
+ },
+ execute_exeter: function () {
+ logp("executes Exeter.");
+ eliminate_block("Exeter/Y");
+ game.who = null;
+ if (game.result)
+ return goto_game_over();
+ goto_enter_pretender_heir();
+ },
+ pass: function () {
+ game.who = null;
+ goto_enter_pretender_heir();
+ }
+}
+
+// PRETENDER SUPPLY PHASE
+
+function goto_enter_pretender_heir() {
+ game.active = block_owner(game.pretender);
+ let n = game.killed_heirs[game.active];
+ if (n > 0 && (game.who = find_minor_heir(game.active)))
+ game.state = 'enter_pretender_heir';
+ else
+ goto_supply_limits_pretender();
+}
+
+states.enter_pretender_heir = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to enter pretender heirs.";
+ view.prompt = "Death of an Heir: Enter " + block_name(game.who) + " in an exile area.";
+ for (let where in AREAS)
+ if (is_pretender_exile_area(where))
+ gen_action(view, 'area', where);
+ },
+ block: function () {
+ game.who = null;
+ },
+ area: function (to) {
+ log(block_name(game.who) + " comes of age in " + to + ".");
+ --game.killed_heirs[game.active];
+ game.location[game.who] = to;
+ game.who = null;
+ goto_enter_pretender_heir();
+ },
+}
+
+function goto_supply_limits_pretender() {
+ game.reduced = {};
+ game.active = block_owner(game.pretender);
+ if (check_supply_penalty()) {
+ game.state = 'supply_limits_pretender';
+ game.turn_log = [];
+ clear_undo();
+ } else {
+ delete game.supply;
+ delete game.reduced;
+ goto_enter_royal_heir();
+ }
+}
+
+states.supply_limits_pretender = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to check supply limits.";
+ view.prompt = "Supply Phase: Reduce blocks in over-stacked areas.";
+ gen_action_undo(view);
+ if (game.supply.length == 0)
+ gen_action(view, 'end_supply_phase');
+ for (let b of game.supply)
+ gen_action(view, 'block', b);
+ },
+ block: function (who) {
+ push_undo();
+ game.turn_log.push([game.location[who]]);
+ game.reduced[who] = true;
+ reduce_block(who);
+ check_supply_penalty();
+ },
+ end_supply_phase: function () {
+ delete game.supply;
+ delete game.reduced;
+ clear_undo();
+ print_turn_log(game.active + " reduces:");
+ if (game.result)
+ return goto_game_over();
+ goto_enter_royal_heir();
+ },
+ undo: pop_undo,
+}
+
+// KING SUPPLY PHASE
+
+function goto_enter_royal_heir() {
+ game.active = block_owner(game.king);
+ let n = game.killed_heirs[game.active];
+ if (n > 0 && (game.who = find_minor_heir(game.active)))
+ game.state = 'enter_royal_heir';
+ else
+ goto_supply_limits_king();
+}
+
+states.enter_royal_heir = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to enter royal heirs.";
+ view.prompt = "Death of an Heir: Enter " + block_name(game.who) + " in a Crown area.";
+ let can_enter = false;
+ for (let where in AREAS) {
+ if (is_crown_area(where) && is_friendly_or_vacant_area(where)) {
+ gen_action(view, 'area', where);
+ can_enter = true;
+ }
+ }
+ if (!can_enter)
+ gen_action(view, 'pass');
+ },
+ block: function () {
+ game.who = null;
+ },
+ area: function (to) {
+ log(block_name(game.who) + " comes of age in " + to + ".");
+ --game.killed_heirs[game.active];
+ game.location[game.who] = to;
+ game.who = null;
+ goto_enter_royal_heir();
+ },
+ pass: function () {
+ game.who = null;
+ goto_supply_limits_king();
+ }
+}
+
+function goto_supply_limits_king() {
+ game.reduced = {};
+ game.active = block_owner(game.king);
+ if (check_supply_penalty()) {
+ game.state = 'supply_limits_king';
+ game.turn_log = [];
+ clear_undo();
+ } else {
+ delete game.supply;
+ delete game.reduced;
+ end_game_turn();
+ }
+}
+
+states.supply_limits_king = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to check supply limits.";
+ view.prompt = "Supply Phase: Reduce blocks in over-stacked areas.";
+ gen_action_undo(view);
+ if (game.supply.length == 0)
+ gen_action(view, 'end_supply_phase');
+ for (let b of game.supply)
+ gen_action(view, 'block', b);
+ },
+ block: function (who) {
+ push_undo();
+ game.turn_log.push([game.location[who]]);
+ game.reduced[who] = true;
+ reduce_block(who);
+ check_supply_penalty();
+ },
+ end_supply_phase: function () {
+ delete game.supply;
+ delete game.reduced;
+ clear_undo();
+ print_turn_log(game.active + " reduces:");
+ if (game.result)
+ return goto_game_over();
+ end_game_turn();
+ },
+ undo: pop_undo,
+}
+
+// POLITICAL TURN
+
+function goto_political_turn() {
+ log("");
+ log("Start Political Turn.");
+
+ game.turn_log = [];
+
+ // Levies disband
+ for (let b in BLOCKS) {
+ if (!is_land_area(game.location[b]))
+ continue;
+ switch (block_type(b)) {
+ case 'bombard':
+ case 'levies':
+ case 'rebel':
+ game.turn_log.push([game.location[b]]);
+ disband(b);
+ break;
+ case 'mercenaries':
+ switch (b) {
+ case "Welsh Mercenary":
+ game.turn_log.push([game.location[b]]);
+ disband(b);
+ break;
+ case "Irish Mercenary":
+ if (game.location[b] != "Ireland") {
+ game.turn_log.push([game.location[b], "Ireland"]);
+ game.location[b] = "Ireland";
+ }
+ break;
+ case "Burgundian Mercenary":
+ case "Calais Mercenary":
+ if (game.location[b] != "Calais") {
+ game.turn_log.push([game.location[b], "Calais"]);
+ game.location[b] = "Calais";
+ }
+ break;
+ case "Scots Mercenary":
+ if (game.location[b] != "Scotland") {
+ game.turn_log.push([game.location[b], "Scotland"]);
+ game.location[b] = "Scotland";
+ }
+ break;
+ case "French Mercenary":
+ if (game.location[b] != "France") {
+ game.turn_log.push([game.location[b], "France"]);
+ game.location[b] = "France";
+ }
+ break;
+ }
+ break;
+ }
+ }
+
+ print_turn_log("Levies disband:");
+
+ // Usurpation
+ let l_count = count_lancaster_nobles();
+ let y_count = count_york_nobles();
+ log("");
+ log("Lancaster controls " + l_count + " nobles.");
+ log("York controls " + y_count + " nobles.");
+ if (l_count > y_count && block_owner(game.king) == YORK) {
+ game.king = find_senior_heir(LANCASTER);
+ game.pretender = find_senior_heir(YORK);
+ log(game.king + " usurps the throne!");
+ } else if (y_count > l_count && block_owner(game.king) == LANCASTER) {
+ game.king = find_senior_heir(YORK);
+ game.pretender = find_senior_heir(LANCASTER);
+ log(game.king + " usurps the throne!");
+ } else {
+ log(game.king + " remains king.");
+ }
+
+ // Game ends after last Usurpation check
+ if (game.campaign == game.end_campaign)
+ return goto_game_over();
+
+ log("");
+ goto_pretender_goes_home();
+}
+
+// PRETENDER GOES HOME
+
+function goto_pretender_goes_home() {
+ game.active = block_owner(game.pretender);
+ game.state = 'pretender_goes_home';
+ game.turn_log = [];
+ let choices = false;
+ for (let b in BLOCKS)
+ if (block_owner(b) == game.active && is_block_on_map(b))
+ if (go_home_if_possible(b))
+ choices = true;
+ if (!choices) {
+ print_turn_log_no_count("Pretender goes home:");
+ goto_exile_limits_pretender();
+ } else {
+ clear_undo();
+ }
+}
+
+states.pretender_goes_home = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for the Pretender to go to exile.";
+ gen_action_undo(view);
+ let done = true;
+ for (let b in BLOCKS) {
+ if (block_owner(b) == game.active && is_block_on_map(b) && !game.moved[b]) {
+ if (!is_in_exile(b)) {
+ if (is_heir(b)) {
+ done = false;
+ gen_action(view, 'block', b);
+ } else if (!is_at_home(b)) {
+ done = false;
+ let n = count_available_homes(b);
+ if (n > 1)
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ }
+ if (done) {
+ view.prompt = "Pretender Goes Home: You may move nobles to another home.";
+ for (let b in BLOCKS) {
+ if (block_owner(b) == game.active && is_block_on_map(b) && !game.moved[b]) {
+ if (!is_in_exile(b)) {
+ if (is_at_home(b)) {
+ let n = count_available_homes(b);
+ if (n > 1)
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ }
+ gen_action(view, 'end_political_turn');
+ } else {
+ view.prompt = "Pretender Goes Home: Move the pretender and his heirs to exile, and nobles to home.";
+ }
+ },
+ block: function (who) {
+ push_undo();
+ game.who = who;
+ game.state = 'pretender_goes_home_to';
+ },
+ end_political_turn: function () {
+ clear_undo();
+ print_turn_log_no_count("Pretender goes home:");
+ goto_exile_limits_pretender();
+ },
+ undo: pop_undo,
+}
+
+states.pretender_goes_home_to = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for the Pretender to go to exile.";
+ if (is_heir(game.who))
+ view.prompt = "Pretender Goes Home: Move " + block_name(game.who) + " to exile.";
+ else
+ view.prompt = "Pretender Goes Home: Move " + block_name(game.who) + " to home.";
+ gen_action(view, 'block', game.who);
+ for (let where in AREAS) {
+ if (where != game.location[game.who]) {
+ if (is_heir(game.who)) {
+ if (is_friendly_exile_area(where))
+ gen_action(view, 'area', where);
+ } else if (is_available_home_for(where, game.who)) {
+ gen_action(view, 'area', where);
+ }
+ }
+ }
+ },
+ area: function (to) {
+ if (is_exile_area(to))
+ game.turn_log.push([block_name(game.who), to]); // TODO: "Exile"?
+ else
+ game.turn_log.push([block_name(game.who), to]); // TODO: "Home"?
+ game.moved[game.who] = true;
+ game.location[game.who] = to;
+ game.who = null;
+ game.state = 'pretender_goes_home';
+ },
+ block: pop_undo,
+ undo: pop_undo,
+}
+
+function goto_exile_limits_pretender() {
+ game.moved = {};
+ game.active = block_owner(game.pretender);
+ if (check_exile_limits()) {
+ game.state = 'exile_limits_pretender';
+ clear_undo();
+ } else {
+ goto_king_goes_home();
+ }
+}
+
+states.exile_limits_pretender = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to check exile limits.";
+ view.prompt = "Campaign Reset: Disband one block in each over-stacked exile area.";
+ gen_action_undo(view);
+ if (game.exiles.length == 0)
+ gen_action(view, 'end_exile_limits');
+ for (let b of game.exiles)
+ gen_action(view, 'block', b);
+ },
+ block: function (who) {
+ push_undo();
+ let where = game.location[who];
+ logp("disbands in " + where + ".");
+ game.exiles = game.exiles.filter(b => game.location[b] != where);
+ disband(who);
+ },
+ end_exile_limits: function () {
+ goto_king_goes_home();
+ },
+ undo: pop_undo,
+}
+
+// KING GOES HOME
+
+function goto_king_goes_home() {
+ game.active = block_owner(game.king);
+ game.state = 'king_goes_home';
+ game.turn_log = [];
+ let choices = false;
+ for (let b in BLOCKS)
+ if (block_owner(b) == game.active && is_block_on_map(b))
+ if (go_home_if_possible(b))
+ choices = true;
+ if (!choices) {
+ print_turn_log_no_count("King goes home:");
+ goto_exile_limits_king();
+ } else {
+ clear_undo();
+ }
+}
+
+states.king_goes_home = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for the King to go home.";
+ gen_action_undo(view);
+ let done = true;
+ for (let b in BLOCKS) {
+ if (block_owner(b) == game.active && is_block_on_map(b) && !game.moved[b]) {
+ if (!is_in_exile(b)) {
+ if (!is_at_home(b)) {
+ done = false;
+ let n = count_available_homes(b);
+ if (n > 1)
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ }
+ if (done) {
+ view.prompt = "King Goes Home: You may move nobles and heirs to another home.";
+ for (let b in BLOCKS) {
+ if (block_owner(b) == game.active && is_block_on_map(b) && !game.moved[b]) {
+ if (!is_in_exile(b)) {
+ if (is_at_home(b)) {
+ let n = count_available_homes(b);
+ if (n > 1)
+ gen_action(view, 'block', b);
+ }
+ }
+ }
+ }
+ gen_action(view, 'end_political_turn');
+ } else {
+ view.prompt = "King Goes Home: Move the King, the royal heirs, and nobles to home.";
+ }
+ },
+ block: function (who) {
+ push_undo();
+ game.who = who;
+ game.state = 'king_goes_home_to';
+ },
+ end_political_turn: function () {
+ clear_undo();
+ print_turn_log_no_count("King goes home:");
+ goto_exile_limits_king();
+ },
+ undo: pop_undo,
+}
+
+states.king_goes_home_to = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for the King to go home.";
+ view.prompt = "King Goes Home: Move " + block_name(game.who) + " to home.";
+ gen_action(view, 'block', game.who);
+ for (let where in AREAS)
+ if (where != game.location[game.who])
+ if (is_available_home_for(where, game.who))
+ gen_action(view, 'area', where);
+ },
+ area: function (to) {
+ game.turn_log.push([block_name(game.who), to]); // TODO: "Home"?
+ game.moved[game.who] = true;
+ game.location[game.who] = to;
+ game.who = null;
+ game.state = 'king_goes_home';
+ },
+ block: pop_undo,
+ undo: pop_undo,
+}
+
+function goto_exile_limits_king() {
+ game.moved = {};
+ game.active = block_owner(game.king);
+ if (check_exile_limits()) {
+ game.state = 'exile_limits_king';
+ clear_undo();
+ } else {
+ end_political_turn();
+ }
+}
+
+states.exile_limits_king = {
+ prompt: function (view, current) {
+ if (is_inactive_player(current))
+ return view.prompt = "Waiting for " + game.active + " to check exile limits.";
+ view.prompt = "Campaign Reset: Disband one block in each over-stacked exile area.";
+ gen_action_undo(view);
+ if (game.exiles.length == 0)
+ gen_action(view, 'end_exile_limits');
+ for (let b of game.exiles)
+ gen_action(view, 'block', b);
+ },
+ block: function (who) {
+ push_undo();
+ let where = game.location[who];
+ logp("disbands in " + where + ".");
+ game.exiles = game.exiles.filter(b => game.location[b] != where);
+ disband(who);
+ },
+ end_exile_limits: function () {
+ end_political_turn();
+ },
+ undo: pop_undo,
+}
+
+function end_political_turn() {
+ // Campaign reset
+ game.dead = {};
+ for (let b in BLOCKS)
+ game.steps[b] = block_max_steps(b);
+
+ ++game.campaign;
+ start_campaign();
+}
+
+// GAME OVER
+
+function goto_game_over() {
+ game.active = "None";
+ game.state = 'game_over';
+ if (!game.result) {
+ game.result = block_owner(game.king);
+ game.victory = game.result + " wins!";
+ }
+ log("");
+ log(game.victory);
+}
+
+states.game_over = {
+ prompt: function (view, current) {
+ view.prompt = game.victory;
+ }
+}
+
+function make_battle_view() {
+ let battle = {
+ LA: [], LB: [], LC: [], LD: [], LR: [],
+ YA: [], YB: [], YC: [], YD: [], YR: [],
+ flash: game.flash
+ };
+
+ battle.title = game.attacker[game.where] + " attacks " + game.where;
+ battle.title += " \u2014 round " + game.battle_round + " of 4";
+
+ function fill_cell(cell, owner, fn) {
+ for (let b in BLOCKS)
+ if (game.location[b] == game.where & block_owner(b) == owner && !game.dead[b] && fn(b))
+ cell.push([b, game.steps[b], game.moved[b]?1:0])
+ }
+
+ fill_cell(battle.LR, LANCASTER, b => is_battle_reserve(b));
+ fill_cell(battle.LA, LANCASTER, b => !is_battle_reserve(b) && block_initiative(b) == 'A');
+ fill_cell(battle.LB, LANCASTER, b => !is_battle_reserve(b) && block_initiative(b) == 'B');
+ fill_cell(battle.LC, LANCASTER, b => !is_battle_reserve(b) && block_initiative(b) == 'C');
+ fill_cell(battle.LD, LANCASTER, b => !is_battle_reserve(b) && block_initiative(b) == 'D');
+
+ fill_cell(battle.YR, YORK, b => is_battle_reserve(b));
+ fill_cell(battle.YA, YORK, b => !is_battle_reserve(b) && block_initiative(b) == 'A');
+ fill_cell(battle.YB, YORK, b => !is_battle_reserve(b) && block_initiative(b) == 'B');
+ fill_cell(battle.YC, YORK, b => !is_battle_reserve(b) && block_initiative(b) == 'C');
+ fill_cell(battle.YD, YORK, b => !is_battle_reserve(b) && block_initiative(b) == 'D');
+
+ return battle;
+}
+
+exports.setup = function (scenario, players) {
+ if (players.length != 2)
+ throw new Error("Invalid player count: " + players.length);
+ game = {
+ attacker: {},
+ border_limit: {},
+ last_used: {},
+ location: {},
+ log: [],
+ main_border: {},
+ moved: {},
+ dead: {},
+ moves: 0,
+ prompt: null,
+ reserves: [],
+ show_cards: false,
+ steps: {},
+ who: null,
+ where: null,
+ killed_heirs: { Lancaster: 0, York: 0 },
+ }
+ if (scenario == "Wars of the Roses")
+ setup_game();
+ else if (scenario == "Kingmaker")
+ setup_kingmaker();
+ else if (scenario == "Richard III")
+ setup_richard_iii();
+ else
+ throw new Error("Unknown scenario:", scenario);
+ start_campaign();
+ return game;
+}
+
+exports.action = function (state, current, action, arg) {
+ game = state;
+ // TODO: check current, action and argument against action list
+ if (true) {
+ let S = states[game.state];
+ if (action in S)
+ S[action](arg, current);
+ else
+ throw new Error("Invalid action: " + action);
+ }
+ return state;
+}
+
+exports.resign = function (state, current) {
+ game = state;
+ if (game.state != 'game_over') {
+ log("");
+ log(current + " resigned.");
+ game.active = "None";
+ game.state = 'game_over';
+ game.victory = current + " resigned.";
+ game.result = ENEMY[current];
+ }
+}
+
+exports.view = function(state, current) {
+ game = state;
+
+ let view = {
+ log: game.log,
+ campaign: game.campaign + " of " + game.end_campaign,
+ active: game.active,
+ king: game.king,
+ pretender: game.pretender,
+ l_card: (game.show_cards || current == LANCASTER) ? game.l_card : 0,
+ y_card: (game.show_cards || current == YORK) ? game.y_card : 0,
+ hand: (current == LANCASTER) ? game.l_hand : (current == YORK) ? game.y_hand : [],
+ who: (game.active == current) ? game.who : null,
+ where: game.where,
+ known: {},
+ secret: { York: {}, Lancaster: {}, Rebel: {} },
+ battle: null,
+ prompt: null,
+ actions: null,
+ };
+
+ states[game.state].prompt(view, current);
+
+ if (states[game.state].show_battle)
+ view.battle = make_battle_view();
+
+ for (let b in BLOCKS) {
+ let a = game.location[b];
+ if (!a)
+ continue;
+
+ let is_known = false;
+ if (current == block_owner(b) || (game.dead[b] && is_block_on_map(b)) || game.state == 'game_over')
+ is_known = true;
+
+ if (is_known) {
+ view.known[b] = [a, game.steps[b], (game.moved[b] || game.dead[b]) ? 1 : 0];
+ } else if (a != POOL && a != MINOR) {
+ let list = view.secret[BLOCKS[b].owner];
+ if (!(a in list))
+ list[a] = [0, 0];
+ list[a][0]++;
+ if (game.moved[b] || game.dead[b])
+ list[a][1]++;
+ }
+ }
+
+ return view;
+}
diff --git a/thumbnail.jpg b/thumbnail.jpg
new file mode 100644
index 0000000..ff60fb1
--- /dev/null
+++ b/thumbnail.jpg
Binary files differ
diff --git a/ui.js b/ui.js
new file mode 100644
index 0000000..1433f0f
--- /dev/null
+++ b/ui.js
@@ -0,0 +1,755 @@
+"use strict";
+
+const LANCASTER = "Lancaster";
+const YORK = "York";
+const REBEL = "Rebel";
+const ENEMY = { York: "Lancaster", Lancaster: "York" }
+
+const POOL = "Pool";
+const MINOR = "Minor";
+
+const KING_TEXT = "\u2756";
+const PRETENDER_TEXT = "";
+
+const LONG_NAME = {
+ "Somerset": "Duke of Somerset",
+ "Exeter": "Duke of Exeter",
+ "Devon": "Earl of Devon",
+ "Pembroke": "Earl of Pembroke",
+ "Wiltshire": "Earl of Wiltshire",
+ "Oxford": "Earl of Oxford",
+ "Beaumont": "Viscount Beaumont",
+ "Clifford": "Lord Clifford",
+ "Buckingham": "Duke of Buckingham",
+ "Northumberland": "Earl of Northumberland",
+ "Shrewsbury": "Earl of Shrewsbury",
+ "Westmoreland": "Earl of Westmoreland",
+ "Rivers": "Lord Rivers",
+ "Stanley": "Lord Stanley",
+ "Richmond": "Earl of Richmond",
+ "York": "Duke of York",
+ "Rutland": "Earl of Rutland",
+ "March": "Earl of March",
+ "Warwick": "Earl of Warwick",
+ "Salisbury": "Earl of Salisbury",
+ "Kent": "Earl of Kent",
+ "Norfolk": "Duke of Norfolk",
+ "Suffolk": "Duke of Suffolk",
+ "Arundel": "Earl of Arundel",
+ "Essex": "Earl of Essex",
+ "Worcester": "Earl of Worcester",
+ "Hastings": "Lord Hastings",
+ "Herbert": "Lord Herbert",
+ "Clarence": "Duke of Clarence",
+ "Gloucester": "Duke of Gloucester",
+}
+
+function toggle_blocks() {
+ document.getElementById("map").classList.toggle("hide_blocks");
+}
+
+let game = null;
+
+let ui = {
+ cards: {},
+ areas: {},
+ known: {},
+ secret: { Lancaster: {}, York: {}, Rebel: {} },
+ battle_menu: {},
+ battle_block: {},
+ present: new Set(),
+}
+
+function on_focus_area(evt) {
+ let where = evt.target.area;
+ let text = where;
+ if (AREAS[where].city)
+ text += " (" + AREAS[where].city + ")";
+ if (AREAS[where].crown)
+ text += " - Crown"; // " \u2655";
+ if (where == "South Yorks" || where == "Kent")
+ text += " - Church"; // " -" \u2657";
+ if (AREAS[where].major_port)
+ text += " - Port";
+ if (AREAS[where].shields.length > 0)
+ text += " - " + AREAS[where].shields.join(", ");
+ document.getElementById("status").textContent = text;
+}
+
+function on_blur_area(evt) {
+ document.getElementById("status").textContent = "";
+}
+
+function on_click_area(evt) {
+ let where = evt.target.area;
+ send_action('area', where);
+}
+
+const STEP_TEXT = [ 0, "I", "II", "III", "IIII" ];
+const HEIR_TEXT = [ 0, '\u00b9', '\u00b2', '\u00b3', '\u2074', '\u2075' ];
+
+function block_name(who) {
+ let name = BLOCKS[who].name;
+ let long_name = LONG_NAME[name];
+ return long_name ? long_name : name;
+}
+
+function block_owner(who) {
+ if (who == REBEL)
+ return BLOCKS[game.pretender].owner;
+ return BLOCKS[who].owner;
+}
+
+function on_focus_secret_block(evt) {
+ let owner = evt.target.owner;
+ let text = owner;
+ document.getElementById("status").textContent = text;
+}
+
+function on_blur_secret_block(evt) {
+ document.getElementById("status").textContent = "";
+}
+
+function on_click_secret_block(evt) {
+}
+
+function on_focus_map_block(evt) {
+ let b = evt.target.block;
+ let s = game.known[b][1];
+ let text = block_name(b) + " ";
+ if (BLOCKS[b].type == 'heir')
+ text += "H" + HEIR_TEXT[BLOCKS[b].heir] + "-";
+ if (BLOCKS[b].loyalty)
+ text += BLOCKS[b].loyalty + "-";
+ else if (BLOCKS[b].type == 'nobles')
+ text += "\u2740-";
+ text += STEP_TEXT[s] + "-" + BLOCKS[b].combat;
+ document.getElementById("status").textContent = text;
+}
+
+function on_blur_map_block(evt) {
+ document.getElementById("status").textContent = "";
+}
+
+function on_click_map_block(evt) {
+ let b = evt.target.block;
+ send_action('block', b);
+}
+
+function is_battle_reserve(who, list) {
+ for (let [b, s, m] of list)
+ if (who == b)
+ return true;
+ return false;
+}
+
+function on_focus_battle_block(evt) {
+ let b = evt.target.block;
+ let msg = block_name(b);
+ if (is_battle_reserve(b, game.battle.LR))
+ msg = "Lancaster Reserve";
+ if (is_battle_reserve(b, game.battle.YR))
+ msg = "York Reserve";
+
+ if (game.actions && game.actions.battle_fire && game.actions.battle_fire.includes(b))
+ msg = "Fire with " + msg;
+ else if (game.actions && game.actions.battle_retreat && game.actions.battle_retreat.includes(b))
+ msg = "Retreat with " + msg;
+ else if (game.actions && game.actions.battle_charge && game.actions.battle_charge.includes(b))
+ msg = "Charge " + msg;
+ else if (game.actions && game.actions.battle_treachery && game.actions.battle_treachery.includes(b))
+ msg = "Attempt treachery on " + msg;
+ else if (game.actions && game.actions.battle_hit && game.actions.battle_hit.includes(b))
+ msg = "Take hit on " + msg;
+
+ document.getElementById("status").textContent = msg;
+}
+
+function on_blur_battle_block(evt) {
+ document.getElementById("status").textContent = "";
+}
+
+function on_click_battle_block(evt) {
+ let b = evt.target.block;
+ send_action('block', b);
+}
+
+function on_focus_battle_fire(evt) {
+ document.getElementById("status").textContent =
+ "Fire with " + block_name(evt.target.block);
+}
+
+function on_focus_battle_retreat(evt) {
+ document.getElementById("status").textContent =
+ "Retreat with " + block_name(evt.target.block);
+}
+
+function on_focus_battle_pass(evt) {
+ document.getElementById("status").textContent =
+ "Pass with " + block_name(evt.target.block);
+}
+
+function on_focus_battle_hit(evt) {
+ document.getElementById("status").textContent =
+ "Take hit on " + block_name(evt.target.block);
+}
+
+function on_focus_battle_charge(evt) {
+ if (block_owner(evt.target.block) == game.active)
+ document.getElementById("status").textContent =
+ "Charge with " + block_name(evt.target.block);
+ else
+ document.getElementById("status").textContent =
+ "Charge " + block_name(evt.target.block);
+}
+
+function on_focus_battle_treachery(evt) {
+ if (block_owner(evt.target.block) == game.active)
+ document.getElementById("status").textContent =
+ "Attempt treachery with " + block_name(evt.target.block);
+ else
+ document.getElementById("status").textContent =
+ "Attempt treachery on " + block_name(evt.target.block);
+}
+
+function on_blur_battle_button(evt) {
+ document.getElementById("status").textContent = "";
+}
+
+function on_click_battle_hit(evt) { send_action('battle_hit', evt.target.block); }
+function on_click_battle_fire(evt) { send_action('battle_fire', evt.target.block); }
+function on_click_battle_retreat(evt) { send_action('battle_retreat', evt.target.block); }
+function on_click_battle_pass(evt) { send_action('battle_pass', evt.target.block); }
+function on_click_battle_charge(evt) { send_action('battle_charge', evt.target.block); }
+function on_click_battle_treachery(evt) { send_action('battle_treachery', evt.target.block); }
+
+function on_click_card(evt) {
+ let c = evt.target.id.split("+")[1] | 0;
+ send_action('play', c);
+}
+
+function on_button_undo(evt) {
+ send_action('undo');
+}
+
+function on_button_pass(evt) {
+ send_action('pass');
+}
+
+function on_button_end_action_phase(evt) {
+ send_action('end_action_phase');
+}
+
+function on_button_end_supply_phase(evt) {
+ send_action('end_supply_phase');
+}
+
+function on_button_end_political_turn(evt) {
+ send_action('end_political_turn');
+}
+
+function on_button_end_exile_limits(evt) {
+ send_action('end_exile_limits');
+}
+
+function on_button_end_regroup(evt) {
+ send_action('end_regroup');
+}
+
+function on_button_end_retreat(evt) {
+ send_action('end_retreat');
+}
+
+function on_button_eliminate(evt) {
+ send_action('eliminate');
+}
+
+function on_button_treachery(evt) {
+ send_action('treachery');
+}
+
+function on_button_execute_clarence(evt) {
+ send_action('execute_clarence');
+}
+
+function on_button_execute_exeter(evt) {
+ send_action('execute_exeter');
+}
+
+function build_battle_button(menu, b, c, click, enter, img_src) {
+ let img = new Image();
+ img.draggable = false;
+ img.classList.add("action");
+ img.classList.add(c);
+ img.setAttribute("src", img_src);
+ img.addEventListener("click", click);
+ img.addEventListener("mouseenter", enter);
+ img.addEventListener("mouseleave", on_blur_battle_button);
+ img.block = b;
+ menu.appendChild(img);
+}
+
+function build_battle_block(b, block) {
+ let element = document.createElement("div");
+ element.classList.add("block");
+ element.classList.add("known");
+ element.classList.add(BLOCKS[b].owner);
+ element.classList.add("block_" + block.image);
+ element.addEventListener("mouseenter", on_focus_battle_block);
+ element.addEventListener("mouseleave", on_blur_battle_block);
+ element.addEventListener("click", on_click_battle_block);
+ element.block = b;
+ ui.battle_block[b] = element;
+
+ let menu_list = document.createElement("div");
+ menu_list.classList.add("battle_menu_list");
+
+ build_battle_button(menu_list, b, "treachery",
+ on_click_battle_treachery, on_focus_battle_treachery,
+ "/images/rose.svg");
+ build_battle_button(menu_list, b, "charge",
+ on_click_battle_charge, on_focus_battle_charge,
+ "/images/mounted-knight.svg");
+ build_battle_button(menu_list, b, "hit",
+ on_click_battle_hit, on_focus_battle_hit,
+ "/images/cross-mark.svg");
+
+ // menu_list.appendChild(document.createElement("br"));
+
+ build_battle_button(menu_list, b, "fire",
+ on_click_battle_fire, on_focus_battle_fire,
+ "/images/pointy-sword.svg");
+ build_battle_button(menu_list, b, "retreat",
+ on_click_battle_retreat, on_focus_battle_retreat,
+ "/images/flying-flag.svg");
+ build_battle_button(menu_list, b, "pass",
+ on_click_battle_pass, on_focus_battle_pass,
+ "/images/sands-of-time.svg");
+
+ let menu = document.createElement("div");
+ menu.classList.add("battle_menu");
+ menu.appendChild(element);
+ menu.appendChild(menu_list);
+ ui.battle_menu[b] = menu;
+}
+
+function build_known_block(b, block) {
+ let element = document.createElement("div");
+ element.classList.add("block");
+ element.classList.add("known");
+ element.classList.add(BLOCKS[b].owner);
+ element.classList.add("block_" + block.image);
+ element.addEventListener("mouseenter", on_focus_map_block);
+ element.addEventListener("mouseleave", on_blur_map_block);
+ element.addEventListener("click", on_click_map_block);
+ element.block = b;
+ return element;
+}
+
+function build_secret_block(b, block) {
+ let element = document.createElement("div");
+ element.classList.add("block");
+ element.classList.add("secret");
+ element.classList.add(BLOCKS[b].owner);
+ element.addEventListener("mouseenter", on_focus_secret_block);
+ element.addEventListener("mouseleave", on_blur_secret_block);
+ element.addEventListener("click", on_click_secret_block);
+ element.owner = BLOCKS[b].owner;
+ return element;
+}
+
+function build_map() {
+ let element;
+
+ ui.blocks_element = document.getElementById("blocks");
+ ui.offmap_element = document.getElementById("offmap");
+
+ for (let c = 1; c <= 25; ++c) {
+ ui.cards[c] = document.getElementById("card+"+c);
+ ui.cards[c].addEventListener("click", on_click_card);
+ }
+
+ for (let name in AREAS) {
+ let area = AREAS[name];
+ element = document.getElementById("svgmap").getElementById("area_"+name.replace(/ /g, "_"));
+ if (element) {
+ element.area = name;
+ element.addEventListener("mouseenter", on_focus_area);
+ element.addEventListener("mouseleave", on_blur_area);
+ element.addEventListener("click", on_click_area);
+ ui.areas[name] = element;
+ }
+ ui.secret.Lancaster[name] = [];
+ ui.secret.York[name] = [];
+ ui.secret.Rebel[name] = [];
+ }
+ ui.secret.Lancaster.offmap = [];
+ ui.secret.York.offmap = [];
+ ui.secret.Rebel.offmap = [];
+
+ for (let b in BLOCKS) {
+ let block = BLOCKS[b];
+ build_battle_block(b, block);
+ ui.known[b] = build_known_block(b, block);
+ ui.secret[BLOCKS[b].owner].offmap.push(build_secret_block(b, block));
+ }
+}
+
+function update_steps(b, steps, element) {
+ element.classList.remove("r1");
+ element.classList.remove("r2");
+ element.classList.remove("r3");
+ element.classList.add("r"+(BLOCKS[b].steps - steps));
+}
+
+function layout_blocks(area, secret, known) {
+ let wrap = AREAS[area].wrap;
+ let s = secret.length;
+ let k = known.length;
+ let n = s + k;
+ let row, rows = [];
+ let i = 0;
+
+ function new_line() {
+ rows.push(row = []);
+ i = 0;
+ }
+
+ new_line();
+
+ while (secret.length > 0) {
+ if (i == wrap)
+ new_line();
+ row.push(secret.shift());
+ ++i;
+ }
+
+ // Break early if secret and known fit in exactly two rows, and more than three blocks total
+ if (s > 0 && s <= wrap && k > 0 && k <= wrap && n > 3)
+ new_line();
+
+ while (known.length > 0) {
+ if (i == wrap)
+ new_line();
+ row.push(known.shift());
+ ++i;
+ }
+
+ if (AREAS[area].layout_minor > 0.5)
+ rows.reverse();
+
+ for (let j = 0; j < rows.length; ++j)
+ for (i = 0; i < rows[j].length; ++i)
+ position_block(area, j, rows.length, i, rows[j].length, rows[j][i]);
+}
+
+function position_block(area, row, n_rows, col, n_cols, element) {
+ let space = AREAS[area];
+ let block_size = 60+6;
+ let padding = 4;
+ let offset = block_size + padding;
+ let row_size = (n_rows-1) * offset;
+ let col_size = (n_cols-1) * offset;
+ let x = space.x - block_size/2;
+ let y = space.y - block_size/2;
+
+ if (space.layout_axis == 'X') {
+ x -= col_size * space.layout_major;
+ y -= row_size * space.layout_minor;
+ x += col * offset;
+ y += row * offset;
+ } else {
+ y -= col_size * space.layout_major;
+ x -= row_size * space.layout_minor;
+ y += col * offset;
+ x += row * offset;
+ }
+
+ element.style.left = (x|0)+"px";
+ element.style.top = (y|0)+"px";
+}
+
+function show_block(element) {
+ if (element.parentElement != ui.blocks_element)
+ ui.blocks_element.appendChild(element);
+}
+
+function hide_block(element) {
+ if (element.parentElement != ui.offmap_element)
+ ui.offmap_element.appendChild(element);
+}
+
+function update_map() {
+ let overflow = { Lancaster: [], York: [], Rebel: [] };
+ let layout = {};
+
+ document.getElementById("turn").textContent =
+ "Campaign " + game.campaign +
+ "\nKing: " + block_name(game.king) +
+ "\nPretender: " + block_name(game.pretender);
+
+ for (let area in AREAS)
+ layout[area] = { secret: [], known: [] };
+
+ // Move secret blocks to overflow queue if there are too many in a area
+ for (let area in AREAS) {
+ for (let color of [LANCASTER, YORK, REBEL]) {
+ if (game.secret[color]) {
+ let max = game.secret[color][area] ? game.secret[color][area][0] : 0;
+ while (ui.secret[color][area].length > max) {
+ overflow[color].push(ui.secret[color][area].pop());
+ }
+ }
+ }
+ }
+
+ // Add secret blocks if there are too few in a location
+ for (let area in AREAS) {
+ for (let color of [LANCASTER, YORK, REBEL]) {
+ if (game.secret[color]) {
+ let max = game.secret[color][area] ? game.secret[color][area][0] : 0;
+ while (ui.secret[color][area].length < max) {
+ if (overflow[color].length > 0) {
+ ui.secret[color][area].push(overflow[color].pop());
+ } else {
+ let element = ui.secret[color].offmap.pop();
+ show_block(element);
+ ui.secret[color][area].push(element);
+ }
+ }
+ }
+ }
+ }
+
+ // Remove any blocks left in the overflow queue
+ for (let color of [LANCASTER, YORK, REBEL]) {
+ while (overflow[color].length > 0) {
+ let element = overflow[color].pop();
+ hide_block(element);
+ ui.secret[color].offmap.push(element);
+ }
+ }
+
+ // Hide formerly known blocks
+ for (let b in BLOCKS) {
+ if (!(b in game.known)) {
+ hide_block(ui.known[b]);
+ }
+ }
+
+ // Add secret blocks to layout
+ for (let area in AREAS) {
+ for (let color of [LANCASTER, YORK, REBEL]) {
+ let i = 0, n = 0, m = 0;
+ if (game.secret[color] && game.secret[color][area]) {
+ n = game.secret[color][area][0];
+ m = game.secret[color][area][1];
+ }
+ for (let element of ui.secret[color][area]) {
+ if (i++ < n - m)
+ element.classList.remove("moved");
+ else
+ element.classList.add("moved");
+ layout[area].secret.push(element);
+ }
+ }
+ }
+
+ // Add known blocks to layout
+ for (let b in game.known) {
+ let area = game.known[b][0];
+ if (area) {
+ let steps = game.known[b][1];
+ let moved = game.known[b][2];
+ let element = ui.known[b];
+
+ show_block(element);
+ layout[area].known.push(element);
+ update_steps(b, steps, element);
+
+ if (moved)
+ element.classList.add("moved");
+ else
+ element.classList.remove("moved");
+ }
+ }
+
+ // Layout blocks on map
+ for (let area in AREAS)
+ layout_blocks(area, layout[area].secret, layout[area].known);
+
+ for (let where in AREAS) {
+ if (ui.areas[where]) {
+ ui.areas[where].classList.remove('highlight');
+ ui.areas[where].classList.remove('where');
+ }
+ }
+ if (game.actions && game.actions.area)
+ for (let where of game.actions.area)
+ ui.areas[where].classList.add('highlight');
+ if (game.where)
+ ui.areas[game.where].classList.add('where');
+
+ for (let b in BLOCKS) {
+ ui.known[b].classList.remove('highlight');
+ ui.known[b].classList.remove('selected');
+ }
+ if (!game.battle) {
+ if (game.actions && game.actions.block)
+ for (let b of game.actions.block)
+ ui.known[b].classList.add('highlight');
+ if (game.who)
+ ui.known[game.who].classList.add('selected');
+ }
+}
+
+function update_cards() {
+ let cards = game.hand;
+ for (let c = 1; c <= 25; ++c) {
+ ui.cards[c].classList.remove('enabled');
+ if (cards && cards.includes(c))
+ ui.cards[c].classList.add('show');
+ else
+ ui.cards[c].classList.remove('show');
+ }
+
+ if (game.actions && game.actions.play) {
+ for (let c of game.actions.play)
+ ui.cards[c].classList.add('enabled');
+ }
+
+ if (!game.l_card)
+ document.querySelector("#lancaster_card").className = "small_card card_back";
+ else
+ document.querySelector("#lancaster_card").className = "small_card " + CARDS[game.l_card].image;
+ if (!game.y_card)
+ document.querySelector("#york_card").className = "small_card card_back";
+ else
+ document.querySelector("#york_card").className = "small_card " + CARDS[game.y_card].image;
+}
+
+function update_battle(player) {
+ function fill_cell(name, list, reserve) {
+ let cell = window[name];
+
+ ui.present.clear();
+
+ for (let [block, steps, moved] of list) {
+ ui.present.add(block);
+
+ if (block == game.who)
+ ui.battle_block[block].classList.add("selected");
+ else
+ ui.battle_block[block].classList.remove("selected");
+
+ ui.battle_block[block].classList.remove("highlight");
+ ui.battle_menu[block].classList.remove('hit');
+ ui.battle_menu[block].classList.remove('fire');
+ ui.battle_menu[block].classList.remove('retreat');
+ ui.battle_menu[block].classList.remove('pass');
+ ui.battle_menu[block].classList.remove('charge');
+ ui.battle_menu[block].classList.remove('treachery');
+
+ if (game.actions && game.actions.block && game.actions.block.includes(block))
+ ui.battle_block[block].classList.add("highlight");
+ if (game.actions && game.actions.battle_fire && game.actions.battle_fire.includes(block))
+ ui.battle_menu[block].classList.add('fire');
+ if (game.actions && game.actions.battle_retreat && game.actions.battle_retreat.includes(block))
+ ui.battle_menu[block].classList.add('retreat');
+ if (game.actions && game.actions.battle_pass && game.actions.battle_pass.includes(block))
+ ui.battle_menu[block].classList.add('pass');
+ if (game.actions && game.actions.battle_hit && game.actions.battle_hit.includes(block))
+ ui.battle_menu[block].classList.add('hit');
+ if (game.actions && game.actions.battle_charge && game.actions.battle_charge.includes(block))
+ ui.battle_menu[block].classList.add('charge');
+ if (game.actions && game.actions.battle_treachery && game.actions.battle_treachery.includes(block))
+ ui.battle_menu[block].classList.add('treachery');
+
+ update_steps(block, steps, ui.battle_block[block], false);
+ if (reserve)
+ ui.battle_block[block].classList.add("secret");
+ else
+ ui.battle_block[block].classList.remove("secret");
+ if (moved)
+ ui.battle_block[block].classList.add("moved");
+ else
+ ui.battle_block[block].classList.remove("moved");
+ if (reserve)
+ ui.battle_block[block].classList.remove("known");
+ else
+ ui.battle_block[block].classList.add("known");
+ }
+
+ for (let b in BLOCKS) {
+ if (ui.present.has(b)) {
+ if (!cell.contains(ui.battle_menu[b]))
+ cell.appendChild(ui.battle_menu[b]);
+ } else {
+ if (cell.contains(ui.battle_menu[b]))
+ cell.removeChild(ui.battle_menu[b]);
+ }
+ }
+ }
+
+ if (player == LANCASTER) {
+ fill_cell("FR", game.battle.LR, true);
+ fill_cell("FA", game.battle.LA, false);
+ fill_cell("FB", game.battle.LB, false);
+ fill_cell("FC", game.battle.LC, false);
+ fill_cell("FD", game.battle.LD, false);
+ fill_cell("EA", game.battle.YA, false);
+ fill_cell("EB", game.battle.YB, false);
+ fill_cell("EC", game.battle.YC, false);
+ fill_cell("ED", game.battle.YD, false);
+ fill_cell("ER", game.battle.YR, true);
+ } else {
+ fill_cell("ER", game.battle.LR, true);
+ fill_cell("EA", game.battle.LA, false);
+ fill_cell("EB", game.battle.LB, false);
+ fill_cell("EC", game.battle.LC, false);
+ fill_cell("ED", game.battle.LD, false);
+ fill_cell("FA", game.battle.YA, false);
+ fill_cell("FB", game.battle.YB, false);
+ fill_cell("FC", game.battle.YC, false);
+ fill_cell("FD", game.battle.YD, false);
+ fill_cell("FR", game.battle.YR, true);
+ }
+}
+
+function on_update(state, player) {
+ game = state;
+
+ show_action_button("#undo_button", "undo");
+ show_action_button("#pass_button", "pass");
+ show_action_button("#end_action_phase_button", "end_action_phase");
+ show_action_button("#end_supply_phase_button", "end_supply_phase");
+ show_action_button("#end_political_turn_button", "end_political_turn");
+ show_action_button("#end_exile_limits_button", "end_exile_limits");
+ show_action_button("#end_regroup_button", "end_regroup");
+ show_action_button("#end_retreat_button", "end_retreat");
+ show_action_button("#eliminate_button", "eliminate");
+ show_action_button("#execute_clarence_button", "execute_clarence");
+ show_action_button("#execute_exeter_button", "execute_exeter");
+
+ let king = block_owner(game.king);
+ document.getElementById("lancaster_vp").textContent = (king == LANCASTER ? KING_TEXT : PRETENDER_TEXT);
+ document.getElementById("york_vp").textContent = (king == YORK ? KING_TEXT : PRETENDER_TEXT);
+
+ update_cards();
+ update_map();
+
+ if (game.battle) {
+ document.querySelector(".battle_header").textContent = game.battle.title;
+ document.querySelector(".battle_message").textContent = game.battle.flash;
+ document.querySelector(".battle").classList.add("show");
+ update_battle(player);
+ } else {
+ document.querySelector(".battle").classList.remove("show");
+ }
+}
+
+build_map();
+
+drag_element_with_mouse(".battle", ".battle_header");
+scroll_with_middle_mouse(".grid_center", 2);
+init_client(["Lancaster", "York"]);