summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 0973f0d..4fac33b 100644
--- a/rules.js
+++ b/rules.js
@@ -3255,6 +3255,30 @@ function vm_endif() {
vm_next()
}
+function event_prompt(str) {
+ if (typeof str === "undefined")
+ str = CODE[game.vm.fp][game.vm.prompt][1]
+ if (typeof str === "function")
+ str = str()
+ view.prompt = data.card_title[this_card()] + ": " + str
+}
+
+function vm_prompt() {
+ if (game.vm.prompt)
+ game.vm._prompt = game.vm.prompt
+ game.vm.prompt = game.vm.ip
+ vm_next()
+}
+
+function pop_vm_prompt() {
+ if (game.vm._prompt) {
+ game.vm.prompt = game.vm._prompt
+ delete game.vm._prompt
+ } else {
+ game.vm.prompt = 0
+ }
+}
+
function vm_return() {
/* let return_vm = game.vm.return_vm;
console.log('in vm_return')