Created
September 26, 2018 16:47
-
-
Save vilmibm/0e1d38c064d45b38ae05371e33483784 to your computer and use it in GitHub Desktop.
This is a proposal for WITCH in a beta release of tildemush. It's based on the experience so far with our current WITCH PoC and what I know I can accomplish with Hy+asteval. I'd love feedback on 1) is it intuitive? 2) what could be simplified? 3) what's missing? 4) what's exciting?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(incantation by vilmibm | |
"This script defines a silly, kind of evil book. It is intended to | |
illustrate every feature that WITCH offers." | |
(has {"name" "the necronomicon" | |
"description" "a book bound in flesh seething with undead energy." | |
"pronouns" ["it" "it" "its"] | |
"souls" [] | |
"log" []}) | |
(allows {"read" "world" | |
"write" "world" | |
"carry" "world" | |
"execute" "world"}) | |
(every 24 hours | |
(unless (empty? (get-data "souls")) | |
(does "exhales souls into the air around it") | |
(set-data "souls" []))) | |
(every 12 hours | |
(unless (empty? (get-data "log")) | |
(room-says "you hear a ghostly echo from the dead past..." (pick-random (get-data "log"))) | |
(set-data "log" []))) | |
(idling | |
(if (< 5 (random-number 10)) | |
(does "glows odiously"))) | |
(hears "*" (append-data "log" heard)) | |
(hears "fire" (does "seems to clench its pages more tightly")) | |
(provides "fear" (room-says "the aura about the necronomicon seems more vibrant")) | |
(provides "read $this" | |
(room-says (sender-data "name") "opens the" (get-data "name") "and begins to read!") | |
(says "i now have" (+ (sender-data "name") "'s") "soul.") | |
(does "laughs wickedly") | |
(append-data "souls" sender-name) | |
(says "i shall now predict the present~") | |
(says (calls "/home/vilmibm/bin/get_random_headline"))) | |
(provides "touch $this" | |
(tell-sender "you stroke the" (+ (get-data "name") "'s") "covers.") | |
(tell-sender "the souls of" (join-and (get-data "souls")) "all call out to you from the void.")) | |
(provides "lick $this" | |
(tell-sender "you lick the cover of the necronomicon. it is bittersweet.") | |
(teleport-sender "vilmibm/void")) | |
(provides "punch $this" | |
(room-says (sender-data "name") "punches" (get-data "name")) | |
(room-says "the necronomicon punches back, sending" (sender-data "name") "flying!") | |
(move-sender (random-direction))) | |
(provides "kiss $this" | |
(room-says (sender-data "name") "kisses" (get-data "name")) | |
(does "blushes violently") | |
(if (carried?) | |
(tell-sender "the book squirms and tries to throw itself at the floor"))) | |
(provides "throw $this at $object" | |
(target (args 1)) | |
(room-says "the necronomicon flaps like a bird, dives at" | |
(target-data "name") | |
"and flaps noisily around" | |
(get (target-data "pronouns") 2) | |
"head")) | |
(provides "rip $this" | |
(creates {"name" "yellowed page" | |
"description" "a page, seemingly quite ancient, ripped from" (get-data "name")}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks simple and descriptive! thumbs up!
cpb/dozens