summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--events.txt2
-rw-r--r--rules.js2
-rw-r--r--tools/gencode.js3
3 files changed, 5 insertions, 2 deletions
diff --git a/events.txt b/events.txt
index b383483..1ea74ca 100644
--- a/events.txt
+++ b/events.txt
@@ -872,7 +872,7 @@ EVENT 53
endspace
endif
prompt "Move Guerrillas between Departments."
- piece 2 is_piece(p, game.current, GUERRILLA) && (s === game.vm.m[0] || s === game.vm.m[1])
+ piece_range 1 2 is_piece(p, game.current, GUERRILLA) && (s === game.vm.m[0] || s === game.vm.m[1])
if piece_space(game.vm.p) === game.vm.m[0]
set_space (game.vm.m[1])
else
diff --git a/rules.js b/rules.js
index 29d8da9..0984f9d 100644
--- a/rules.js
+++ b/rules.js
@@ -9147,7 +9147,7 @@ CODE[53 * 2 + 0] = [
[ vm_endspace ],
[ vm_endif ],
[ vm_prompt, "Move Guerrillas between Departments." ],
- [ vm_piece, false, 2, 2, (p,s)=>is_piece(p, game.current, GUERRILLA) && (s === game.vm.m[0] || s === game.vm.m[1]) ],
+ [ vm_piece, false, 1, 2, (p,s)=>is_piece(p, game.current, GUERRILLA) && (s === game.vm.m[0] || s === game.vm.m[1]) ],
[ vm_if, ()=>piece_space(game.vm.p) === game.vm.m[0] ],
[ vm_set_space, ()=>(game.vm.m[1]) ],
[ vm_else ],
diff --git a/tools/gencode.js b/tools/gencode.js
index c0e1cc9..d4d8d23 100644
--- a/tools/gencode.js
+++ b/tools/gencode.js
@@ -81,6 +81,9 @@ for (let line of fs.readFileSync("events.txt", "utf-8").split("\n")) {
case "piece_undo":
emit([ "piece", true, line[1], line[1], "(p,s)=>" + line.slice(2).join(" ") ])
break
+ case "piece_range":
+ emit([ "piece", false, line[1], line[2], "(p,s)=>" + line.slice(3).join(" ") ])
+ break
case "piece_opt":
emit([ "piece", false, 0, line[1], "(p,s)=>" + line.slice(2).join(" ") ])
break