summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js81
1 files changed, 44 insertions, 37 deletions
diff --git a/play.js b/play.js
index 6a00a29..b6aa855 100644
--- a/play.js
+++ b/play.js
@@ -180,7 +180,7 @@ const BOXES = {
"Mare Orientale XY": [ 1480, 1160, 60, 60 ],
"Mare Occidentale XY": [ 720, 900, 60, 60 ],
"Oceanus Atlanticus XY": [ 180, 500, 60, 60 ],
- "Nomads XY": [ 520, 1480, 60, 60 ],
+ "Nomads XY": [ 520, 1460, 60, 60 ],
"Sassanids XY": [ 2440, 820, 60, 60 ],
"Goths XY": [ 2020, 360, 60, 60 ],
"Alamanni XY": [ 1540, 280, 60, 60 ],
@@ -239,6 +239,14 @@ const LAYOUT_HOMELAND = [
[ 0, -1 ],
]
+const LAYOUT_ALAMANNI = [
+ [ 0, 0 ],
+ [ -1, 0 ],
+ [ -2, 0 ],
+ [ -2, 1 ],
+ [ -2, -1 ],
+]
+
const LAYOUT_SASSANIDS = [
[ 0, 0 ],
[ -1, 0 ],
@@ -257,10 +265,13 @@ const LAYOUT_SASSANIDS = [
const LAYOUT_NOMADS = [
[ 0, 0 ],
[ 1, 0 ],
- [ 2, 0 ],
- [ 3, 0 ],
[ 4, 0 ],
[ 5, 0 ],
+ [ -1, -1 ],
+ [ 2, 0 ],
+ [ 3, 0 ],
+ [ -2, -1 ],
+ [ -3, -1 ],
[ 0, 1 ],
]
@@ -281,8 +292,8 @@ const LAYOUT_ITALIA = [
const LAYOUT_ASIA = [
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
[ -1, -1 ],
+ [ 0, -1 ],
[ 1, -1 ],
[ 1, -2 ],
[ 0, -2 ],
@@ -293,14 +304,14 @@ const LAYOUT_ASIA = [
const LAYOUT_GALLIA = [
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
- [ -1, -1 ],
- [ 1, -1 ],
- [ -2, 0 ],
[ 2, 0 ],
[ 2, -1 ],
- [ 0, -2 ],
+ [ 2, -2 ],
+ [ -2, 0 ],
+ [ 1, -1 ],
[ 1, -2 ],
+ [ 0, -1 ],
+ [ 0, -2 ],
[ -1, 3 ],
]
@@ -315,31 +326,25 @@ const LAYOUT_MACEDONIA = [
]
const LAYOUT_PANNONIA = [
- [ 0, -1 ],
- [ -1, -1 ],
- [ -2, -1 ],
- [ -3, -1 ],
- [ -4, -1 ],
- [ 1, -1 ],
- [ -1, -2 ],
- [ -2, -2 ],
- [ -3, -2 ],
- [ -4, -2 ],
- [ -5, -2 ],
+ [ -3.5, -1.4 ],
+ [ -2.5, -1.4 ],
+ [ -1.5, -1.4 ],
+ [ -0.5, -1.4 ],
+ [ +0.5, -1.4 ],
+ [ -4.5, -1.4 ],
[ -1, 0 ],
[ 1, 0 ],
]
const LAYOUT_THRACIA = [
+ [ -2, -1 ],
+ [ -2, -2 ],
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
- [ -1, -1 ],
[ 1, -1 ],
- [ -2, -1 ],
- [ -2, -2 ],
- [ -3, -2 ],
[ -2, -3 ],
+ [ 0, -1 ],
+ [ -1, -1 ],
[ -1, -2 ],
]
@@ -378,16 +383,17 @@ const LAYOUT_AFRICA = [
const LAYOUT_HISPANIA = [
[ -1, 0 ],
[ 1, 0 ],
- [ 0, -1 ],
- [ -1, -1 ],
- [ 1, -1 ],
- [ -2, 0 ],
[ 2, 0 ],
- [ -2, -1 ],
+ [ 3, -1 ],
+ [ -2, 0 ],
[ 2, -1 ],
- [ 0, -2 ],
+ [ 1, -1 ],
+ [ 0, -1 ],
+ [ -1, -1 ],
[ -1, -2 ],
+ [ 0, -2 ],
[ 1, -2 ],
+ [ -1, 3 ],
]
const LAYOUT_BRITANNIA = [
@@ -406,9 +412,9 @@ const LAYOUT_BRITANNIA = [
const LAYOUT_GALATIA = [
[ -1, 0 ],
[ 1, 0 ],
+ [ 1, -1 ],
[ 0, -1 ],
[ -1, -1 ],
- [ 1, -1 ],
[ 1, -2 ],
[ 0, -2 ],
[ -1, -2 ],
@@ -418,9 +424,9 @@ const LAYOUT_GALATIA = [
const LAYOUT_SYRIA = [
[ -1, 0 ],
[ 1, 0 ],
+ [ 1, -1 ],
[ 0, -1 ],
[ -1, -1 ],
- [ 1, -1 ],
[ -2, 0 ],
[ 2, 0 ],
[ -2, -1 ],
@@ -446,7 +452,7 @@ const LAYOUT_PATTERN = [
LAYOUT_GALATIA,
LAYOUT_SYRIA,
- LAYOUT_HOMELAND,
+ LAYOUT_ALAMANNI,
LAYOUT_HOMELAND,
LAYOUT_HOMELAND,
LAYOUT_NOMADS,
@@ -730,13 +736,14 @@ function layout_stack(id, list, region, in_capital) {
y -= 30
if (!in_capital) {
+ let step = (region < 12) ? 80 : 100
let sc = stack_count[region]
if (sc >= LAYOUT_PATTERN[region].length)
sc = LAYOUT_PATTERN[region].length - 1
- let xo = LAYOUT_PATTERN[region][sc][0] * 80
- let yo = LAYOUT_PATTERN[region][sc][1] * 80
+ let xo = LAYOUT_PATTERN[region][sc][0] * step
+ let yo = LAYOUT_PATTERN[region][sc][1] * step
if (stack_count[region] > sc)
- xo += (stack_count[region] - sc) * 80
+ xo += (stack_count[region] - sc) * step
x += xo
y += yo
stack_count[region] += 1