summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-05-15 13:00:12 +0200
committerTor Andersson <tor@ccxvii.net>2024-05-15 13:00:12 +0200
commit183ba1599a65e06bc607704ae3db58165f4d1533 (patch)
treef4d8c3c480c9badc191a8d8914a5dd7aa0fe1c3a
parenta4d2ec9f722f39aa911744d93a8b1e997a76ac5b (diff)
downloadplantagenet-183ba1599a65e06bc607704ae3db58165f4d1533.tar.gz
x
-rw-r--r--rules.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/rules.ts b/rules.ts
index 71e8de1..5165c73 100644
--- a/rules.ts
+++ b/rules.ts
@@ -5967,10 +5967,10 @@ function set_active_attacker() {
}
function set_active_defender() {
- if (game.battle.attacker === P1)
- set_active(P2)
+ if (game.battle.attacker === YORK)
+ set_active(LANCASTER)
else
- set_active(P1)
+ set_active(YORK)
}
function filled(pos) {
@@ -6022,6 +6022,11 @@ function total_lord_hits(lord: Lord) {
hits += count_missile_hits(lord)
else
hits += count_melee_hits(lord)
+
+ log_hits(hits / 2, "L" + lord)
+
+ hits += use_culverins(lord)
+
return hits
}
@@ -7461,8 +7466,6 @@ function goto_total_hits() {
let lord = game.battle.array[pos]
if (lord !== NOBODY) {
let hits = total_lord_hits(lord)
- log_hits(hits / 2, "L" + lord)
- hits += use_culverins(lord)
if (pos === A1 || pos === A2 || pos === A3)
ahits += hits
else