summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.js32
-rw-r--r--play.html42
-rw-r--r--play.js81
-rw-r--r--rules.js77
-rw-r--r--tools/build_counters3.sh4
-rw-r--r--tools/gendata.js16
6 files changed, 140 insertions, 112 deletions
diff --git a/data.js b/data.js
index 3f0da88..295f99a 100644
--- a/data.js
+++ b/data.js
@@ -146,36 +146,36 @@ lords:[
{"side":"Russian","name":"Vladislav","full_name":"Vladislav","title":"Bailiff of Ladoga","seats":[25],"marshal":0,"fealty":5,"service":3,"lordship":2,"command":3,"forces":{"sergeants":1,"light_horse":1,"men_at_arms":2},"assets":{"transport":1,"prov":1},"ships":1,"vassals":[30,31,32,33],"image":5},
],
vassals:[
-{"lord":0,"name":"Lettgallian Auxiliaries","service":1,"forces":{"light_horse":1,"militia":1},"image":0},
-{"lord":0,"name":"Summer Crusaders","service":2,"forces":{"knights":3},"capability":"Crusade","image":1},
-{"lord":0,"name":"Teutonic Vassals","service":3,"forces":{"knights":1,"men_at_arms":2},"image":2},
+{"lord":0,"name":"Teutonic Vassals","service":3,"forces":{"knights":1,"men_at_arms":2},"image":0},
+{"lord":0,"name":"Lettgallian Auxiliaries","service":1,"forces":{"light_horse":1,"militia":1},"image":1},
+{"lord":0,"name":"Summer Crusaders","service":2,"forces":{"knights":3},"capability":"Crusade","image":2},
{"lord":1,"name":"Heinrich von Lode","service":2,"forces":{"knights":1,"men_at_arms":1},"image":3},
{"lord":1,"name":"Odward von Lode","service":2,"forces":{"knights":1,"men_at_arms":1},"image":4},
{"lord":2,"name":"Helmond von Lüneburg","service":2,"forces":{"knights":1,"men_at_arms":1},"image":5},
{"lord":2,"name":"Johannes von Dolen","service":2,"forces":{"knights":1,"men_at_arms":1},"image":6},
{"lord":2,"name":"Ugaunian Auxiliaries","service":1,"forces":{"light_horse":1,"militia":1},"image":7},
{"lord":3,"name":"Dietrich von Kivel","service":2,"forces":{"knights":1,"men_at_arms":1},"image":8},
-{"lord":3,"name":"Estonian Auxiliaries","service":1,"forces":{"light_horse":1,"militia":1},"image":9},
-{"lord":3,"name":"Otto von Lüneburg","service":2,"forces":{"knights":1,"men_at_arms":1},"image":10},
+{"lord":3,"name":"Otto von Lüneburg","service":2,"forces":{"knights":1,"men_at_arms":1},"image":9},
+{"lord":3,"name":"Estonian Auxiliaries","service":1,"forces":{"light_horse":1,"militia":1},"image":10},
{"lord":4,"name":"Ex-Sword Brethren","service":2,"forces":{"knights":1,"sergeants":1},"image":11},
{"lord":4,"name":"Jerwen Teutonic Vassals","service":2,"forces":{"knights":1,"men_at_arms":1},"image":12},
{"lord":4,"name":"Summer Crusaders","service":2,"forces":{"knights":2},"capability":"Crusade","image":13},
{"lord":5,"name":"Mstislavich Partisans","service":1,"forces":{"militia":2},"image":14},
-{"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":0},
-{"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":0},
-{"lord":6,"name":"Pereyaslavl","service":4,"forces":{"men_at_arms":1},"image":1},
-{"lord":6,"name":"Rostov","service":3,"forces":{"men_at_arms":1},"image":2},
-{"lord":6,"name":"Yaroslavl","service":3,"forces":{"men_at_arms":1},"image":3},
-{"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":4},
-{"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":4},
-{"lord":7,"name":"Suzdal","service":4,"forces":{"men_at_arms":1},"image":5},
-{"lord":7,"name":"Vladimir","service":4,"forces":{"men_at_arms":1},"image":6},
+{"lord":6,"name":"Pereyaslavl","service":4,"forces":{"men_at_arms":1},"image":0},
+{"lord":6,"name":"Rostov","service":3,"forces":{"men_at_arms":1},"image":1},
+{"lord":6,"name":"Yaroslavl","service":3,"forces":{"men_at_arms":1},"image":2},
+{"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":3},
+{"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":3},
+{"lord":7,"name":"Suzdal","service":4,"forces":{"men_at_arms":1},"image":4},
+{"lord":7,"name":"Vladimir","service":4,"forces":{"men_at_arms":1},"image":5},
+{"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":6},
+{"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":6},
{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":7},
{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":7},
{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":7},
-{"lord":9,"name":"Borderland Russians","service":1,"forces":{"light_horse":1,"militia":1},"image":8},
+{"lord":9,"name":"Pskov","service":4,"forces":{"men_at_arms":1},"image":8},
{"lord":9,"name":"Pskov Militia","service":2,"forces":{"militia":2},"image":9},
-{"lord":9,"name":"Pskov","service":4,"forces":{"men_at_arms":1},"image":10},
+{"lord":9,"name":"Borderland Russians","service":1,"forces":{"light_horse":1,"militia":1},"image":10},
{"lord":11,"name":"Izhoran Auxiliaries","service":1,"forces":{"militia":1},"image":11},
{"lord":11,"name":"Ingrian Auxiliaries","service":1,"forces":{"militia":1},"image":12},
{"lord":11,"name":"Vepsian Auxiliaries","service":1,"forces":{"militia":1},"image":13},
diff --git a/play.html b/play.html
index 1991f3e..24dee4a 100644
--- a/play.html
+++ b/play.html
@@ -33,6 +33,7 @@ header.your_turn { background-color: orange; }
#log .card_tip { font-style: italic; }
#log .card_tip:hover { text-decoration: underline; }
#log .locale_tip:hover { cursor: pointer; text-decoration: underline; }
+#log .lord_tip:hover { cursor: pointer; text-decoration: underline; }
.action {
cursor: pointer;
@@ -235,7 +236,7 @@ body.shift .mustered_vassals {
}
.mat .ready_vassals:hover .service_marker {
- margin-top: 6px;
+ margin-top: 1px;
}
.mat .mustered_vassals .service_marker {
@@ -263,24 +264,31 @@ body.shift .mustered_vassals {
.mat .ready_vassals { bottom: 22px; right: 22px; width: 94px; }
.mat .mustered_vassals { bottom: 138px; right: 8px; width: 94px; }
-.mat.teutonic.andreas .background { background-image:url(images/mat_teutonic_andreas.opt.png) }
-.mat.teutonic.heinrich .background { background-image:url(images/mat_teutonic_heinrich.opt.png) }
-.mat.teutonic.hermann .background { background-image:url(images/mat_teutonic_hermann.opt.png) }
-.mat.teutonic.knud_and_abel .background { background-image:url(images/mat_teutonic_knud_and_abel.opt.png) }
-.mat.teutonic.rudolf .background { background-image:url(images/mat_teutonic_rudolf.opt.png) }
-.mat.teutonic.yaroslav .background { background-image:url(images/mat_teutonic_yaroslav.opt.png) }
+.mat.teutonic.andreas .background { background-image:url(images/mat_teutonic_andreas.png) }
+.mat.teutonic.heinrich .background { background-image:url(images/mat_teutonic_heinrich.png) }
+.mat.teutonic.hermann .background { background-image:url(images/mat_teutonic_hermann.png) }
+.mat.teutonic.knud_and_abel .background { background-image:url(images/mat_teutonic_knud_and_abel.png) }
+.mat.teutonic.rudolf .background { background-image:url(images/mat_teutonic_rudolf.png) }
+.mat.teutonic.yaroslav .background { background-image:url(images/mat_teutonic_yaroslav.png) }
-.mat.russian.aleksandr .background { background-image:url(images/mat_russian_aleksandr.opt.png) }
-.mat.russian.andrey .background { background-image:url(images/mat_russian_andrey.opt.png) }
-.mat.russian.domash .background { background-image:url(images/mat_russian_domash.opt.png) }
-.mat.russian.gavrilo .background { background-image:url(images/mat_russian_gavrilo.opt.png) }
-.mat.russian.karelians .background { background-image:url(images/mat_russian_karelians.opt.png) }
-.mat.russian.vladislav .background { background-image:url(images/mat_russian_vladislav.opt.png) }
+.mat.russian.aleksandr .background { background-image:url(images/mat_russian_aleksandr.png) }
+.mat.russian.andrey .background { background-image:url(images/mat_russian_andrey.png) }
+.mat.russian.domash .background { background-image:url(images/mat_russian_domash.png) }
+.mat.russian.gavrilo .background { background-image:url(images/mat_russian_gavrilo.png) }
+.mat.russian.karelians .background { background-image:url(images/mat_russian_karelians.png) }
+.mat.russian.vladislav .background { background-image:url(images/mat_russian_vladislav.png) }
.conquered + .conquered { margin-left: -44px; margin-bottom: 13px; }
.conquered + .conquered + .conquered { margin-bottom: 26px; }
.conquered + .conquered + .conquered + .conquered { margin-bottom: 39px; }
+/*
+.service_marker + .service_marker { margin-left: 4px; }
+.service_marker + .service_marker + .service_marker { margin-left: 8px; }
+.service_marker + .service_marker + .service_marker + .service_marker { margin-left: 12px; }
+.service_marker + .service_marker + .service_marker + .service_marker + .service_marker { margin-left: 16px; }
+*/
+
/* TUCKED CARDS */
.tuck_under_map {
@@ -809,10 +817,10 @@ body.shift .mustered_vassals {
.service_marker.lord { background-size: 90px 252px }
.service_marker.vassal { background-size: 270px 210px }
-.service_marker.lord.teutonic { background-image:url(images/service_lords_teutonic.opt.png) }
-.service_marker.lord.russian { background-image:url(images/service_lords_russian.opt.png) }
-.service_marker.vassal.teutonic { background-image:url(images/service_vassals_teutonic.opt.png) }
-.service_marker.vassal.russian { background-image:url(images/service_vassals_russian.opt.png) }
+.service_marker.lord.teutonic { background-image:url(images/service_lords_teutonic.png) }
+.service_marker.lord.russian { background-image:url(images/service_lords_russian.png) }
+.service_marker.vassal.teutonic { background-image:url(images/service_vassals_teutonic.png) }
+.service_marker.vassal.russian { background-image:url(images/service_vassals_russian.png) }
.service_marker.lord.image0{background-position:0 -0px}
.service_marker.lord.image1{background-position:0 -42px}
diff --git a/play.js b/play.js
index 2f9764d..e0510c7 100644
--- a/play.js
+++ b/play.js
@@ -400,16 +400,49 @@ function on_blur(evt) {
document.getElementById("status").textContent = ""
}
+function update_current_card_display() {
+ if (typeof view.what === "number" && view.what >= 0) {
+ if (view.what <= first_p1_card)
+ ui.command.className = `card teutonic aow_${view.what}`
+ else
+ ui.command.className = `card russian aow_${view.what}`
+ } else if ((view.turn & 1) === 0) {
+ if (player === "Russians")
+ ui.command.className = `card russian aow_back`
+ else
+ ui.command.className = `card teutonic aow_back`
+ } else if (view.command < 0) {
+ if (player === "Russians")
+ ui.command.className = `card russian cc_back`
+ else
+ ui.command.className = `card teutonic cc_back`
+ } else {
+ if (view.command < 6)
+ ui.command.className = `card russian cc_lord_${view.command}`
+ else
+ ui.command.className = `card teutonic cc_lord_${view.command}`
+ }
+}
+
function on_focus_card_tip(c) {
+ if (c <= first_p1_card)
+ ui.command.className = `card teutonic aow_${c}`
+ else
+ ui.command.className = `card russian aow_${c}`
}
function on_blur_card_tip(c) {
+ update_current_card_display()
}
-function sub_card_name(match, p1) {
+function sub_card_capability(match, p1) {
let x = p1 | 0
- let n = data.cards[x].name
- return `<span class="card_tip" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip(${x})">${n}</span>`
+ return `<span class="card_tip" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip(${x})">${data.cards[x].capability}</span>`
+}
+
+function sub_card_event(match, p1) {
+ let x = p1 | 0
+ return `<span class="card_tip" onmouseenter="on_focus_card_tip(${x})" onmouseleave="on_blur_card_tip(${x})">${data.cards[x].event}</span>`
}
function on_focus_locale_tip(loc) {
@@ -426,12 +459,28 @@ function on_click_locale_tip(loc) {
ui.locale[loc].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
}
+function on_focus_lord_tip(lord) {
+}
+
+function on_blur_lord_tip(lord) {
+}
+
+function on_click_lord_tip(lord) {
+ ui.lord_mat[lord].scrollIntoView({ block:"center", inline:"center", behavior:"smooth" })
+}
+
function sub_locale_name(match, p1) {
let x = p1 | 0
let n = data.locales[x].name
return `<span class="locale_tip" onmouseenter="on_focus_locale_tip(${x})" onmouseleave="on_blur_locale_tip(${x})" onclick="on_click_locale_tip(${x})">${n}</span>`
}
+function sub_lord_name(match, p1) {
+ let x = p1 | 0
+ let n = data.lords[x].name
+ return `<span class="lord_tip" onmouseenter="on_focus_lord_tip(${x})" onmouseleave="on_blur_lord_tip(${x})" onclick="on_click_lord_tip(${x})">${n}</span>`
+}
+
function on_log(text) {
let p = document.createElement("div")
@@ -449,7 +498,9 @@ function on_log(text) {
text = text.replace(/</g, "&lt;")
text = text.replace(/>/g, "&gt;")
- text = text.replace(/#(\d+)/g, sub_card_name)
+ text = text.replace(/%C(\d+)/g, sub_card_capability)
+ text = text.replace(/%E(\d+)/g, sub_card_event)
+ text = text.replace(/%L(\d+)/g, sub_lord_name)
text = text.replace(/%(\d+)/g, sub_locale_name)
if (text.match(/^\.h1/)) {
@@ -798,27 +849,7 @@ function on_update() {
update_veche()
- if (typeof view.what === "number" && view.what >= 0) {
- if (view.what <= first_p1_card)
- ui.command.className = `card teutonic aow_${view.what}`
- else
- ui.command.className = `card russian aow_${view.what}`
- } else if ((view.turn & 1) === 0) {
- if (player === "Russians")
- ui.command.className = `card russian aow_back`
- else
- ui.command.className = `card teutonic aow_back`
- } else if (view.command < 0) {
- if (player === "Russians")
- ui.command.className = `card russian cc_back`
- else
- ui.command.className = `card teutonic cc_back`
- } else {
- if (view.command < 6)
- ui.command.className = `card russian cc_lord_${view.command}`
- else
- ui.command.className = `card teutonic cc_lord_${view.command}`
- }
+ update_current_card_display()
if (view.turn & 1)
ui.turn.className = `marker circle turn campaign t${view.turn>>1}`
diff --git a/rules.js b/rules.js
index 7d243f2..f8b94fb 100644
--- a/rules.js
+++ b/rules.js
@@ -511,7 +511,6 @@ function for_each_friendly_arts_of_war(fn) {
}
function can_add_transport(who, what) {
- // TODO: limit to transports usable in current season?
return get_lord_assets(who, what) < 8
}
@@ -859,48 +858,29 @@ function setup_pleskau_quickstart() {
log_h1("Levy " + current_turn_name())
- log_h2("Teutons Muster")
+ log(`Quickstart...`)
- log_h3("Knud & Abel")
- logi(`Rudolf at %${LOC_WENDEN}`)
muster_lord(LORD_RUDOLF, LOC_WENDEN)
- logii("Cart")
add_lord_assets(LORD_RUDOLF, CART, 1)
- logi("Boat")
add_lord_assets(LORD_KNUD_ABEL, BOAT, 1)
- log_h3("Hermann")
muster_vassal(LORD_HERMANN, data.lords[LORD_HERMANN].vassals[0])
- logi("Capability T4")
set_lord_capability(LORD_HERMANN, 0, find_arts_of_war("T4"))
- logi("Capability T14")
set_lord_capability(LORD_HERMANN, 1, find_arts_of_war("T14"))
- log_h3("Yaroslav")
- logi("Capability T3")
set_lord_capability(LORD_YAROSLAV, 0, find_arts_of_war("T3"))
set_add(game.capabilities, find_arts_of_war("T13"))
game.legate = LOC_DORPAT
- log_h2("Russians Muster")
-
- log_h3("Vladislav")
- logi("Capability R8")
set_add(game.capabilities, find_arts_of_war("R8"))
- logi(`Domash at %${LOC_NOVGOROD}`)
muster_lord(LORD_DOMASH, LOC_NOVGOROD)
- logii("Boat")
add_lord_assets(LORD_DOMASH, BOAT, 2)
- logii("Cart")
add_lord_assets(LORD_DOMASH, CART, 2)
- log_h3("Gavrilo")
muster_vassal(LORD_GAVRILO, data.lords[LORD_GAVRILO].vassals[0])
- logi("Capability R2")
set_lord_capability(LORD_GAVRILO, 0, find_arts_of_war("R2"))
- logi("Capability R6")
set_lord_capability(LORD_GAVRILO, 1, find_arts_of_war("R6"))
game.veche_coin += 1
@@ -933,7 +913,7 @@ states.setup_lords = {
},
lord(lord) {
push_undo()
- log(`${lord_name[lord]} at %${get_lord_locale(lord)}`)
+ log(`%L${lord} at %${get_lord_locale(lord)}`)
push_state('muster_lord_transport')
set_lord_moved(lord, 1)
game.who = lord
@@ -948,8 +928,11 @@ states.setup_lords = {
function end_setup_lords() {
game.lords.moved = 0
set_active_enemy()
- if (game.active === P1)
+ if (game.active === P1) {
+ log_h1("Levy " + current_turn_name())
+ log_h2("Arts of War")
goto_levy_arts_of_war_first()
+ }
}
// === LEVY: ARTS OF WAR (FIRST TURN) ===
@@ -966,6 +949,7 @@ function draw_two_arts_of_war_cards() {
if (!is_card_in_use(c))
deck.push(c)
}
+ console.log("deck", deck)
let result = []
let i = random(deck.length)
@@ -979,7 +963,8 @@ function draw_two_arts_of_war_cards() {
}
function goto_levy_arts_of_war_first() {
- log_h1("Levy " + current_turn_name())
+ log_br()
+ log(game.active)
game.state = 'levy_arts_of_war_first'
game.what = draw_two_arts_of_war_cards()
}
@@ -1014,19 +999,19 @@ states.levy_arts_of_war_first = {
},
lord(lord) {
let c = game.what.shift()
- log(`${lord_name[lord]} capability #${c}`)
+ logi(`%C${c} - %L${lord}`)
add_lord_capability(lord, c)
resume_levy_arts_of_war_first()
},
deploy() {
let c = game.what.shift()
- log(`Global capability #${c}`)
+ logi(`%C${c}`)
set_add(game.capabilities, c)
resume_levy_arts_of_war_first()
},
discard() {
let c = game.what.shift()
- log(`Discarded #${c}`)
+ logi(`%C${c} - discarded`)
resume_levy_arts_of_war_first()
},
}
@@ -1043,7 +1028,8 @@ function end_levy_arts_of_war_first() {
// === LEVY: ARTS OF WAR ===
function goto_levy_arts_of_war() {
- log_h1("Levy " + current_turn_name())
+ log_br()
+ log(game.active)
game.state = 'levy_arts_of_war'
game.what = draw_two_arts_of_war_cards()
}
@@ -1076,7 +1062,7 @@ states.levy_arts_of_war = {
},
play() {
let c = game.what.shift()
- log(`Played #${c} ${data.cards[c].event}.`)
+ log(`Played %E${c}`)
if (data.cards[c].when === 'this_levy' || data.cards[c].when === 'this_campaign')
set_add(game.events, c)
log(`TODO implement event`)
@@ -1093,7 +1079,7 @@ states.levy_arts_of_war = {
},
discard() {
let c = game.what.shift()
- log(`Discarded #${c}`)
+ log(`Discarded %E${c}`)
resume_levy_arts_of_war()
},
}
@@ -1140,7 +1126,7 @@ states.levy_muster = {
},
lord(lord) {
push_undo()
- log_h3(`${lord_name[lord]} at %${get_lord_locale(lord)}`)
+ log_h3(`%L${lord} at %${get_lord_locale(lord)}`)
push_state('levy_muster_lord')
game.who = lord
game.count = data.lords[lord].lordship
@@ -1209,11 +1195,11 @@ states.levy_muster_lord = {
let die = roll_die()
let fealty = data.lords[other].fealty
if (die <= fealty) {
- logi(`${lord_name[other]} rolled ${die} <= ${fealty}`)
+ logi(`%L${other} rolled ${die} <= ${fealty}`)
push_state('muster_lord_at_seat')
game.who = other
} else {
- logi(`${lord_name[other]} rolled ${die} > ${fealty}`)
+ logi(`%L${other} rolled ${die} > ${fealty}`)
logii(`failed`)
resume_levy_muster_lord()
}
@@ -1388,7 +1374,7 @@ states.muster_capability = {
},
arts_of_war(c) {
push_undo()
- logi(`Capability #${c}`)
+ logi(`Capability %C${c}`)
if (data.cards[c].this_lord) {
if (can_add_lord_capability(game.who, c)) {
add_lord_capability(game.who, c)
@@ -1413,7 +1399,7 @@ states.muster_capability_discard = {
},
arts_of_war(c) {
push_undo()
- logi(`Discarded #${c}`)
+ logi(`Discarded %C${c}`)
discard_lord_capability(game.who, c)
add_lord_capability(game.who, game.what)
game.what = NOTHING
@@ -1570,7 +1556,7 @@ function end_campaign_plan() {
for (let i = 0; i < game.lords.lieutenants.length; i += 2) {
let upper = game.lords.lieutenants[i]
let lower = game.lords.lieutenants[i+1]
- log(`>${lord_name[upper]} over ${lord_name[lower]}`)
+ log(`>%L${upper} over %L${lower}`)
}
}
@@ -1606,13 +1592,15 @@ function goto_command_activation() {
function goto_end_campaign() {
// TODO: end game check
game.turn++
+ log_h1("Levy " + current_turn_name())
+ log_h2("Arts of War")
goto_levy_arts_of_war()
}
// === CAMPAIGN: ACTIONS ===
function goto_actions() {
- log_h2(lord_name[game.command])
+ log_h2(`%L${game.command}`)
game.state = 'actions'
game.who = game.command
@@ -1680,19 +1668,19 @@ states.feed_lord = {
view.actions.unfed = 1
},
loot(lord) {
- logi(`Fed ${lord_name[game.who]} with Loot from ${lord_name[lord]}.`)
+ logi(`Fed %L${game.who} with Loot from %L${lord}.`)
add_lord_assets(lord, LOOT, -1)
if (--game.count === 0)
game.state = 'feed'
},
prov(lord) {
- logi(`Fed ${lord_name[game.who]} with Provender from ${lord_name[lord]}.`)
+ logi(`Fed %L${game.who} with Provender from %L${lord}.`)
add_lord_assets(lord, PROV, -1)
if (--game.count === 0)
game.state = 'feed'
},
unfed() {
- logi(`Did not feed ${lord_name[game.who]}.`)
+ logi(`Did not feed %L${game.who}.`)
add_lord_service(game.who, -1)
game.state = 'feed'
},
@@ -1745,19 +1733,19 @@ states.pay_lord = {
}
},
loot(lord) {
- logi(`Paid ${lord_name[game.who]} with Loot from ${lord_name[lord]}.`)
+ logi(`Paid %L${game.who} with Loot from %L${lord}.`)
add_lord_assets(lord, LOOT, -1)
add_lord_service(game.who, 1)
pop_state()
},
coin(lord) {
- logi(`Paid ${lord_name[game.who]} with Coin from ${lord_name[lord]}.`)
+ logi(`Paid %L${game.who} with Coin from %L${lord}.`)
add_lord_assets(lord, COIN, -1)
add_lord_service(game.who, 1)
pop_state()
},
veche_coin() {
- logi(`Paid ${lord_name[game.who]} with Coin from Veche.`)
+ logi(`Paid %L${game.who} with Coin from Veche.`)
game.veche_coin --
add_lord_service(game.who, 1)
pop_state()
@@ -1773,7 +1761,8 @@ function end_pay() {
function goto_disband() {
game.state = 'disband'
- // TODO
+ if (TODO)
+ end_disband()
}
states.disband = {
diff --git a/tools/build_counters3.sh b/tools/build_counters3.sh
index a4681f2..cc7081f 100644
--- a/tools/build_counters3.sh
+++ b/tools/build_counters3.sh
@@ -1,5 +1,5 @@
mkdir -p service300
montage -mode concatenate -tile 1x counters300/lord_teutonic_andreas.a.png counters300/lord_teutonic_heinrich.a.png counters300/lord_teutonic_hermann.a.png counters300/lord_teutonic_knud_and_abel.a.png counters300/lord_teutonic_rudolf.a.png counters300/lord_teutonic_yaroslav.a.png service300/service_lords_teutonic.png
montage -mode concatenate -tile 1x counters300/lord_russian_aleksandr.a.png counters300/lord_russian_andrey.a.png counters300/lord_russian_domash.a.png counters300/lord_russian_gavrilo.a.png counters300/lord_russian_karelians.a.png counters300/lord_russian_vladislav.a.png service300/service_lords_russian.png
-montage -mode concatenate -tile 3x counters300/vassal_teutonic_andreas_lettgallian_auxiliaries.a.png counters300/vassal_teutonic_andreas_summer_crusaders.a.png counters300/vassal_teutonic_andreas_teutonic_vassals.a.png counters300/vassal_teutonic_heinrich_heinrich_von_lode.a.png counters300/vassal_teutonic_heinrich_odward_von_lode.a.png counters300/vassal_teutonic_hermann_helmond_von_luneburg.a.png counters300/vassal_teutonic_hermann_johannes_von_dolen.a.png counters300/vassal_teutonic_hermann_ugaunian_auxiliaries.a.png counters300/vassal_teutonic_knud_and_abel_dietrich_von_kivel.a.png counters300/vassal_teutonic_knud_and_abel_estonian_auxiliaries.a.png counters300/vassal_teutonic_knud_and_abel_otto_von_luneburg.a.png counters300/vassal_teutonic_rudolf_ex_sword_brethren.a.png counters300/vassal_teutonic_rudolf_jerwen_teutonic_vassals.a.png counters300/vassal_teutonic_rudolf_summer_crusaders.a.png counters300/vassal_teutonic_yaroslav_mstislavich_partisans.a.png service300/service_vassals_teutonic.png
-montage -mode concatenate -tile 3x counters300/vassal_russian_aleksandr_mongols.a.png counters300/vassal_russian_aleksandr_pereyaslavl.a.png counters300/vassal_russian_aleksandr_rostov.a.png counters300/vassal_russian_aleksandr_yaroslavl.a.png counters300/vassal_russian_andrey_kipchaqs.a.png counters300/vassal_russian_andrey_suzdal.a.png counters300/vassal_russian_andrey_vladimir.a.png counters300/vassal_russian_domash_novgorod.a.png counters300/vassal_russian_gavrilo_borderland_russians.a.png counters300/vassal_russian_gavrilo_pskov_militia.a.png counters300/vassal_russian_gavrilo_pskov.a.png counters300/vassal_russian_vladislav_izhoran_auxiliaries.a.png counters300/vassal_russian_vladislav_ingrian_auxiliaries.a.png counters300/vassal_russian_vladislav_vepsian_auxiliaries.a.png counters300/vassal_russian_vladislav_vodian_auxiliaries.a.png service300/service_vassals_russian.png
+montage -mode concatenate -tile 3x counters300/vassal_teutonic_andreas_teutonic_vassals.a.png counters300/vassal_teutonic_andreas_lettgallian_auxiliaries.a.png counters300/vassal_teutonic_andreas_summer_crusaders.a.png counters300/vassal_teutonic_heinrich_heinrich_von_lode.a.png counters300/vassal_teutonic_heinrich_odward_von_lode.a.png counters300/vassal_teutonic_hermann_helmond_von_luneburg.a.png counters300/vassal_teutonic_hermann_johannes_von_dolen.a.png counters300/vassal_teutonic_hermann_ugaunian_auxiliaries.a.png counters300/vassal_teutonic_knud_and_abel_dietrich_von_kivel.a.png counters300/vassal_teutonic_knud_and_abel_otto_von_luneburg.a.png counters300/vassal_teutonic_knud_and_abel_estonian_auxiliaries.a.png counters300/vassal_teutonic_rudolf_ex_sword_brethren.a.png counters300/vassal_teutonic_rudolf_jerwen_teutonic_vassals.a.png counters300/vassal_teutonic_rudolf_summer_crusaders.a.png counters300/vassal_teutonic_yaroslav_mstislavich_partisans.a.png service300/service_vassals_teutonic.png
+montage -mode concatenate -tile 3x counters300/vassal_russian_aleksandr_pereyaslavl.a.png counters300/vassal_russian_aleksandr_rostov.a.png counters300/vassal_russian_aleksandr_yaroslavl.a.png counters300/vassal_russian_aleksandr_mongols.a.png counters300/vassal_russian_andrey_suzdal.a.png counters300/vassal_russian_andrey_vladimir.a.png counters300/vassal_russian_andrey_kipchaqs.a.png counters300/vassal_russian_domash_novgorod.a.png counters300/vassal_russian_gavrilo_pskov.a.png counters300/vassal_russian_gavrilo_pskov_militia.a.png counters300/vassal_russian_gavrilo_borderland_russians.a.png counters300/vassal_russian_vladislav_izhoran_auxiliaries.a.png counters300/vassal_russian_vladislav_ingrian_auxiliaries.a.png counters300/vassal_russian_vladislav_vepsian_auxiliaries.a.png counters300/vassal_russian_vladislav_vodian_auxiliaries.a.png service300/service_vassals_russian.png
diff --git a/tools/gendata.js b/tools/gendata.js
index ef29c5d..8cb238c 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -711,9 +711,9 @@ function vassal(lord, service, name, forces, capability) {
vassals.push({ lord: lord_id, name, service, forces, capability })
}
+vassal("Andreas", 3, "Teutonic Vassals", { knights: 1, men_at_arms: 2 })
vassal("Andreas", 1, "Lettgallian Auxiliaries", { light_horse: 1, militia: 1 })
vassal("Andreas", 2, "Summer Crusaders", { knights: 3 }, "Crusade")
-vassal("Andreas", 3, "Teutonic Vassals", { knights: 1, men_at_arms: 2 })
vassal("Heinrich", 2, "Heinrich von Lode", { knights: 1, men_at_arms: 1 })
vassal("Heinrich", 2, "Odward von Lode", { knights: 1, men_at_arms: 1 })
@@ -723,8 +723,8 @@ vassal("Hermann", 2, "Johannes von Dolen", { knights: 1, men_at_arms: 1 })
vassal("Hermann", 1, "Ugaunian Auxiliaries", { light_horse: 1, militia: 1 })
vassal("Knud & Abel", 2, "Dietrich von Kivel", { knights: 1, men_at_arms: 1 })
-vassal("Knud & Abel", 1, "Estonian Auxiliaries", { light_horse: 1, militia: 1 })
vassal("Knud & Abel", 2, "Otto von Lüneburg", { knights: 1, men_at_arms: 1 })
+vassal("Knud & Abel", 1, "Estonian Auxiliaries", { light_horse: 1, militia: 1 })
vassal("Rudolf", 2, "Ex-Sword Brethren", { knights: 1, sergeants: 1 })
vassal("Rudolf", 2, "Jerwen Teutonic Vassals", { knights: 1, men_at_arms: 1 })
@@ -732,24 +732,24 @@ vassal("Rudolf", 2, "Summer Crusaders", { knights: 2 }, "Crusade")
vassal("Yaroslav", 1, "Mstislavich Partisans", { militia: 2 })
-vassal("Aleksandr", 3, "Mongols", { asiatic_horse: 2 }, "Steppe Warriors")
-vassal("Aleksandr", 3, "Mongols", { asiatic_horse: 2 }, "Steppe Warriors")
vassal("Aleksandr", 4, "Pereyaslavl", { men_at_arms: 1 })
vassal("Aleksandr", 3, "Rostov", { men_at_arms: 1 })
vassal("Aleksandr", 3, "Yaroslavl", { men_at_arms: 1 })
+vassal("Aleksandr", 3, "Mongols", { asiatic_horse: 2 }, "Steppe Warriors")
+vassal("Aleksandr", 3, "Mongols", { asiatic_horse: 2 }, "Steppe Warriors")
-vassal("Andrey", 3, "Kipchaqs", { asiatic_horse: 3 }, "Steppe Warriors")
-vassal("Andrey", 3, "Kipchaqs", { asiatic_horse: 3 }, "Steppe Warriors")
vassal("Andrey", 4, "Suzdal", { men_at_arms: 1 })
vassal("Andrey", 4, "Vladimir", { men_at_arms: 1 })
+vassal("Andrey", 3, "Kipchaqs", { asiatic_horse: 3 }, "Steppe Warriors")
+vassal("Andrey", 3, "Kipchaqs", { asiatic_horse: 3 }, "Steppe Warriors")
vassal("Domash", 2, "Novgorod", { militia: 2 })
vassal("Domash", 2, "Novgorod", { militia: 2 })
vassal("Domash", 2, "Novgorod", { militia: 2 })
-vassal("Gavrilo", 1, "Borderland Russians", { light_horse: 1, militia: 1 })
-vassal("Gavrilo", 2, "Pskov Militia", { militia: 2 })
vassal("Gavrilo", 4, "Pskov", { men_at_arms: 1 })
+vassal("Gavrilo", 2, "Pskov Militia", { militia: 2 })
+vassal("Gavrilo", 1, "Borderland Russians", { light_horse: 1, militia: 1 })
vassal("Vladislav", 1, "Izhoran Auxiliaries", { militia: 1 })
vassal("Vladislav", 1, "Ingrian Auxiliaries", { militia: 1 })