From ac8128e029378c5f66f52062262a83b919a17030 Mon Sep 17 00:00:00 2001 From: mekolat Date: Wed, 9 Jul 2014 23:00:02 -0400 Subject: Split magic files --- world/map/conf/magic-debug.sex | 408 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 408 insertions(+) create mode 100644 world/map/conf/magic-debug.sex (limited to 'world/map/conf/magic-debug.sex') diff --git a/world/map/conf/magic-debug.sex b/world/map/conf/magic-debug.sex new file mode 100644 index 00000000..3cefd3b9 --- /dev/null +++ b/world/map/conf/magic-debug.sex @@ -0,0 +1,408 @@ +"--------------------------------------------------------------------------------" +"Debug keywords" +"--------------------------------------------------------------------------------" +(SPELL () debug "debug" () + (=> + (REQUIRE DEBUG) + (EFFECT + (message caster + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ "FLAGS: " "drank=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 1) + 0)) + ", ") + "Kmseed=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 2) + 0)) + ", ") + "touched-mseed=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 4) + 0)) + ", ") + "mseed-max=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 8) + 0)) + ", ") + "Kauldsbel=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 16) + 0)) + ", ") + "Kwyara=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 32) + 0)) + ", ") + "Ksagatha=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 64) + 0)) + ", ") + "Kmpotion=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 128) + 0)) + ", ") + "mseed-rumour=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 256) + 0)) + ", ") + "Kcuttree=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 512) + 0)) + ", ") + "cut=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 1024) + 0)) + ", ") + "Kdruidtree=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 2048) + 0)) + ", ") + "Kimp=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 4096) + 0)) + ", ") + "Koldwiz=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 8192) + 0)) + ", ") + "made-conc=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 16384) + 0)) + ", ") + "elanore-omar=") + (> + (& + (script_int caster "MAGIC_FLAGS") + 32768) + 0))) + (message caster + (+ + (+ + (+ + (+ + (+ "EXP: " + (& + (script_int caster "MAGIC_EXPERIENCE") + 0xffff)) + ", lastspell=") + (& + (>> + (script_int caster "MAGIC_EXPERIENCE") + 16) + 0xff)) + ", healexp=") + (& + (>> + (script_int caster "MAGIC_EXPERIENCE") + 24) + 0xff))) + (message caster + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ + (+ "STATUS: " "auldsbel:") + (& + (script_int caster "QUEST_MAGIC") + 0x1f)) + ",") + (& + (>> + (script_int caster "QUEST_MAGIC") + 5) + 0x7)) + ", ") + "dt/mb:") + (& + (>> + (script_int caster "QUEST_MAGIC") + 8) + 0xf)) + ", ") + "s-unhappy:") + (& + (>> + (script_int caster "QUEST_MAGIC") + 12) + 0xf)) + ", ") + "sagatha:") + (& + (>> + (script_int caster "QUEST_MAGIC") + 16) + 0xff)) + ", ") + "swords:") + (& + (>> + (script_int caster "QUEST_MAGIC") + 24) + 0xff)) + ", ") + "imp:") + (& + (>> + (script_int caster "QUEST_MAGIC2") + 0) + 0xf)) + ", ") + "elanore:") + (& + (>> + (script_int caster "QUEST_MAGIC2") + 4) + 0xf)) + ", ") + "elanore-sub:") + (& + (>> + (script_int caster "QUEST_MAGIC2") + 12) + 0xf)) + ", ") + "wyara:") + (& + (>> + (script_int caster "QUEST_MAGIC2") + 8) + 0xf)))))) +(PROCEDURE debug_xmod (name mask shift gain) + (SET value + (+ + (& + (>> + (script_int caster name) + shift) + mask) + gain)) + (IF (< value 0) + (SET value 0)) + (IF (> value mask) + (SET value mask)) + (CALL set_var name mask shift value)) +(PROCEDURE debug_mod (name delta) + (IF (== name "mexp") + (CALL debug_xmod "MAGIC_EXPERIENCE" 0xffff 0 delta) + (IF (== name "lastspell") + (CALL debug_xmod "MAGIC_EXPERIENCE" 0xff 16 delta) + (IF (== name "healexp") + (CALL debug_xmod "MAGIC_EXPERIENCE" 0xff 24 delta) + (IF (== name "drank") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 0 delta) + (IF (== name "Kmseed") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 1 delta) + (IF (== name "touched-mseed") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 2 delta) + (IF (== name "mseed-max") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 3 delta) + (IF (== name "Kauldsbel") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 4 delta) + (IF (== name "Kwyara") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 5 delta) + (IF (== name "Ksagatha") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 6 delta) + (IF (== name "Kmpotion") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 7 delta) + (IF (== name "mseed-rumour") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 8 delta) + (IF (== name "Kcuttree") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 9 delta) + (IF (== name "cut") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 10 delta) + (IF (== name "Kdruidtree") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 11 delta) + (IF (== name "Kimp") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 12 delta) + (IF (== name "oldwiz") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 13 delta) + (IF (== name "made-conc") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 14 delta) + (IF (== name "elanore-omar") + (CALL debug_xmod "MAGIC_FLAGS" 0x1 15 delta) + (IF (== name "auldsbel") + (CALL debug_xmod "QUEST_MAGIC" 0x1f 0 delta) + (IF (== name "Qauldsbel") + (CALL debug_xmod "QUEST_MAGIC" 0x7 5 delta) + (IF (== name "dt") + (CALL debug_xmod "QUEST_MAGIC" 0x3 10 delta) + (IF (== name "mb") + (CALL debug_xmod "QUEST_MAGIC" 0x3 8 delta) + (IF (== name "s-unhappy") + (CALL debug_xmod "QUEST_MAGIC" 0xff 12 delta) + (IF (== name "sagatha") + (CALL debug_xmod "QUEST_MAGIC" 0xff 16 delta) + (IF (== name "swords") + (CALL debug_xmod "QUEST_MAGIC" 0xff 24 delta) + (IF (== name "imp") + (CALL debug_xmod "QUEST_MAGIC2" 0xf 0 delta) + (IF (== name "elanore") + (CALL debug_xmod "QUEST_MAGIC2" 0xf 4 delta) + (IF (== name "wyara") + (CALL debug_xmod "QUEST_MAGIC2" 0xf 8 delta) + (IF (== name "elanore-sub") + (CALL debug_xmod "QUEST_MAGIC2" 0xf 12 delta) + (message caster "Unknown")))))))))))))))))))))))))))))))) + +(SPELL () debug-up1 "debug+1" (STRING name) + (=> + (REQUIRE DEBUG) + (EFFECT + (CALL debug_mod name 1)))) + +(SPELL () debug-down1 "debug-1" (STRING name) + (=> + (REQUIRE DEBUG) + (EFFECT + (CALL debug_mod name + (- 0 1))))) + +(SPELL () debug-up16 "debug+16" (STRING name) + (=> + (REQUIRE DEBUG) + (EFFECT + (CALL debug_mod name 16)))) + +(SPELL () debug-down16 "debug-16" (STRING name) + (=> + (REQUIRE DEBUG) + (EFFECT + (CALL debug_mod name + (- 0 16))))) + +(SPELL () debug-up256 "debug+256" (STRING name) + (=> + (REQUIRE DEBUG) + (EFFECT + + (CALL debug_mod name 256)))) +(SPELL () debug-down256 "debug-256" (STRING name) + (=> + (REQUIRE DEBUG) + (EFFECT + (CALL debug_mod name + (- 0 256))))) + +(SPELL () debug-reset "debug-reset" () + (=> + (REQUIRE DEBUG) + (EFFECT + (set_script_variable caster "QUEST_MAGIC" + 0) + (set_script_variable caster "QUEST_MAGIC2" + 0) + (set_script_variable caster "MAGIC_FLAGS" + 0) + (set_script_variable caster "MAGIC_EXP" + 0)))) -- cgit v1.2.3-70-g09d2