summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-14 19:02:13 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-14 19:02:13 +0200
commitbb5cb5094637ba28260cffde5cbb0f5e3fe2ae53 (patch)
tree9e70c50e8b5cbf2535943b289b2f9cd96bce3c82
parent12101527abf0fe4a1c8470c19aa9d9fe11da16db (diff)
downloadplantagenet-bb5cb5094637ba28260cffde5cbb0f5e3fe2ae53.tar.gz
tweak yeomen of the crown
always spend valour to reroll before using capability
-rw-r--r--rules.js15
-rw-r--r--rules.ts16
2 files changed, 21 insertions, 10 deletions
diff --git a/rules.js b/rules.js
index 6a1957d..a0399ff 100644
--- a/rules.js
+++ b/rules.js
@@ -6579,16 +6579,21 @@ states.assign_hits = {
function action_spend_valour(lord, force, vassal = NOVASSAL) {
game.state = "assign_hits";
game.battle.reroll = 0;
+ // always true, unless Yeomen are triggered
+ if (get_lord_remaining_valour(lord) > 0) {
+ let protection = get_modified_protection(lord, force);
+ spend_valour(lord);
+ if (!assign_hit_roll("Reroll", protection, ">>")) {
+ unrout_unit(lord, force, vassal);
+ game.vassal = NOVASSAL;
+ return;
+ }
+ }
if (is_yeomen_of_the_crown_triggered(lord, force)) {
logcap(AOW_LANCASTER_YEOMEN_OF_THE_CROWN);
unrout_unit(lord, RETINUE);
rout_unit(lord, MEN_AT_ARMS);
- return;
}
- let protection = get_modified_protection(lord, force);
- spend_valour(lord);
- if (!assign_hit_roll("Reroll", protection, ">>"))
- unrout_unit(lord, force, vassal);
game.vassal = NOVASSAL;
}
function rout_unit(lord, type, v = NOVASSAL) {
diff --git a/rules.ts b/rules.ts
index 6209241..f296362 100644
--- a/rules.ts
+++ b/rules.ts
@@ -7729,17 +7729,23 @@ function action_spend_valour(lord: Lord, force: Force, vassal: Vassal = NOVASSAL
game.state = "assign_hits"
game.battle.reroll = 0
+ // always true, unless Yeomen are triggered
+ if (get_lord_remaining_valour(lord) > 0) {
+ let protection = get_modified_protection(lord, force)
+ spend_valour(lord)
+ if (!assign_hit_roll("Reroll", protection, ">>")) {
+ unrout_unit(lord, force, vassal)
+ game.vassal = NOVASSAL
+ return
+ }
+ }
+
if (is_yeomen_of_the_crown_triggered(lord, force)) {
logcap(AOW_LANCASTER_YEOMEN_OF_THE_CROWN)
unrout_unit(lord, RETINUE)
rout_unit(lord, MEN_AT_ARMS)
- return
}
- let protection = get_modified_protection(lord, force)
- spend_valour(lord)
- if (!assign_hit_roll("Reroll", protection, ">>"))
- unrout_unit(lord, force, vassal)
game.vassal = NOVASSAL
}