summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-04-19 09:42:17 +0200
committerTor Andersson <tor@ccxvii.net>2024-04-19 09:43:13 +0200
commit8e7f2ebb45b201deccaf3a1e6c159f11b22b696c (patch)
tree1245bd6321822dbf33e32f252f778977c6a4dfc9
parent2fbbb08f7e5afd8196d6d9b690f166aa2b1521fc (diff)
downloadplantagenet-8e7f2ebb45b201deccaf3a1e6c159f11b22b696c.tar.gz
Fix "valour" action.
-rw-r--r--rules.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/rules.ts b/rules.ts
index 4f3b244..93737d9 100644
--- a/rules.ts
+++ b/rules.ts
@@ -207,6 +207,7 @@ interface State {
coin?(lord: Lord): void,
cart?(lord: Lord): void,
ship?(lord: Lord): void,
+ valour?(lord: Lord): void,
burgundians?(lord: Lord): void,
retinue?(lord: Lord): void,
@@ -273,7 +274,6 @@ interface State {
take_prov?(): void,
take_ship?(): void,
tax?(): void,
- valour?(): void,
final_charge?(): void,
commission_of_array?(): void,
@@ -6890,14 +6890,14 @@ states.spend_valour = {
inactive: "Spend Valour",
prompt() {
view.prompt = `Spend Valour: Reroll Hit on ${get_force_name(game.who, game.battle.force, game.vassal)}?`
- view.actions.valour = 1
+ gen_action_valour(game.who)
view.actions.pass = 1
},
pass() {
rout_unit(game.who, game.battle.force, game.vassal)
finish_action_assign_hits(game.who)
},
- valour() {
+ valour(_) {
let protection = check_protection_capabilities(FORCE_PROTECTION[game.battle.force])
spend_valour(game.who)
@@ -11729,6 +11729,10 @@ function gen_action_cart(lord: Lord) {
gen_action("cart", lord)
}
+function gen_action_valour(lord: Lord) {
+ gen_action("valour", lord)
+}
+
function gen_action_mercenaries(lord: Lord) {
gen_action("mercenaries", lord)
}