summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-07-05 12:27:59 +0200
committerTor Andersson <tor@ccxvii.net>2024-07-05 12:27:59 +0200
commit596272f6fd44691ed1c893dcaf19c5498e389699 (patch)
treebc170a2f4e9111ef372dd255c1eb0b1445fb0bff
parent69fbfe3f0d79a374cc5bc2366358a19a4656db5c (diff)
downloadplantagenet-596272f6fd44691ed1c893dcaf19c5498e389699.tar.gz
add undo step when ending a lord's muster with done
-rw-r--r--rules.js1
-rw-r--r--rules.ts3
2 files changed, 4 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 26530c2..d85a09f 100644
--- a/rules.js
+++ b/rules.js
@@ -2700,6 +2700,7 @@ states.muster_lord = {
game.levy_flags.loyalty_and_trust = 0;
},
done() {
+ push_undo();
set_lord_moved(game.command, 1);
game.command = NOBODY;
game.state = "muster";
diff --git a/rules.ts b/rules.ts
index db155d1..538d12c 100644
--- a/rules.ts
+++ b/rules.ts
@@ -1,5 +1,7 @@
"use strict"
+// TODO: manually trigger percy's power (make it optional)
+
// === TYPES ===
declare function require(name: string): any
@@ -3328,6 +3330,7 @@ states.muster_lord = {
},
done() {
+ push_undo()
set_lord_moved(game.command, 1)
game.command = NOBODY
game.state = "muster"