From 8e7f2ebb45b201deccaf3a1e6c159f11b22b696c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 19 Apr 2024 09:42:17 +0200 Subject: Fix "valour" action. --- rules.ts | 10 +++++++--- 1 file 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) } -- cgit v1.2.3