summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-03-10 13:48:23 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-03-10 13:48:23 -0400
commit9436b56542c0c80549835be0dae3b5c4d3280f40 (patch)
treeda8c8b646969574182ec1120b69ea6e50fb607a2 /tools
parentd8b3ff3d5a616615c947252741d00cb0964b9a7a (diff)
downloadvijayanagara-9436b56542c0c80549835be0dae3b5c4d3280f40.tar.gz
Basic Succession.
Diffstat (limited to 'tools')
-rw-r--r--tools/gencode.js21
1 files changed, 14 insertions, 7 deletions
diff --git a/tools/gencode.js b/tools/gencode.js
index fb111bc..1cf119c 100644
--- a/tools/gencode.js
+++ b/tools/gencode.js
@@ -53,6 +53,16 @@ for (let line of fs.readFileSync("events.txt", "utf-8").split("\n")) {
console.log("// SHADED " + line[1])
console.log("CODE[" + line[1] + " * 2 + 1] = [")
break
+ case "SUCC":
+ if (first++) {
+ emit(["return"])
+ console.log("]")
+ }
+ SCODE[line[1]] = pc
+ console.log("")
+ console.log("// SUCC " + line[1])
+ console.log("CODE[" + line[1] + " * 2 + 72] = [")
+ break
case "if_space":
emit([ "if", "()=>can_vm_space(1,(s)=>" + line.slice(1).join(" ") + ")" ])
@@ -92,17 +102,14 @@ for (let line of fs.readFileSync("events.txt", "utf-8").split("\n")) {
break
case "resources":
- emit(["resources", false, line[1], line[2]])
+ emit(["resources", false, line[1], line.slice(2).join(" ")])
break
case "resources_opt":
- emit(["resources", true, line[1], line[2]])
+ emit(["resources", true, line[1], line.slice(2).join(" ")])
break
- case "shipment":
- emit([ "shipment", false, line[1], line[1], "(p,s)=>" + line.slice(2).join(" ") ])
- break
- case "shipment_opt":
- emit([ "shipment", false, 0, line[1], "(p,s)=>" + line.slice(2).join(" ") ])
+ case "gain_cavalry":
+ emit(["gain_cavalry", "()=>" + line.slice(1).join(" ")])
break
case "move_to":