From 7e28dc3a7c6ba2bfe2c2bd87bb69c78e047334e9 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Wed, 16 Apr 2025 12:43:53 -0700 Subject: [PATCH] Switch random choices to not clash with colors Fix a few bugs while I'm at it. --- commands/wizards.py | 2 +- typeclasses/consumables.py | 36 +++++++++--------- typeclasses/drinkables.py | 35 ++++++++---------- typeclasses/fishing.py | 14 +++---- typeclasses/pets.py | 11 +++--- typeclasses/readables.py | 19 +++++----- typeclasses/things.py | 76 +++++++++++++++++++------------------- typeclasses/tutorial.py | 36 +++++++++--------- utils/word_list.py | 36 ++++++++++++------ world/version1.ev | 44 +++++++++++----------- 10 files changed, 159 insertions(+), 150 deletions(-) diff --git a/commands/wizards.py b/commands/wizards.py index f9df857..b2cb7ec 100755 --- a/commands/wizards.py +++ b/commands/wizards.py @@ -10,7 +10,7 @@ class CmdFly(Command): Make sure you set the following properties, for instance: @set self/disappear_msg = "The wizard disappears in a puff of smoke." - @set self/reappear_msg = "A plume of [white|light blue|gray|] smoke appears... ;; When the smoke clears, a wizard [emerges|materializes]." + @set self/reappear_msg = "A plume of {{white ^ light blue ^ gray ^ }} smoke appears... ;; When the smoke clears, a wizard {{emerges ^ materializes}}." @set self/appear_delay = 3 The last setting is the number of seconds between message segments diff --git a/typeclasses/consumables.py b/typeclasses/consumables.py index 7f7730a..855e655 100755 --- a/typeclasses/consumables.py +++ b/typeclasses/consumables.py @@ -23,8 +23,8 @@ class Consumable(Object): @set berries/amount = 10 # How many berries do you eat at a time: @set berries/eat_amount = 3 - @set berries/eat_msg = "Sweet and slightly tart. [Delicious|Tangy|Mmmm]." - @set berries/finish_msg = "Those were [delicious|great]." + @set berries/eat_msg = "Sweet and slightly tart. {{Delicious ^ Tangy ^ Mmmm}}." + @set berries/finish_msg = "Those were {{delicious ^ great}}." """ amount = 4 eat_amount = 1 @@ -73,7 +73,7 @@ class Producer(Object): @set bush/make_verb = "pick some" # This one is optional as it defaults to Consumable: @set bush/make_class = "typeclasses.consumables.Consumable" - @set bush/make_desc = "Bright red berry with flecks of [purple|violet|orange]." + @set bush/make_desc = "Bright red berry with flecks of {{purple ^ violet ^ orange}}." # How many berries are there when you pick them? @set bush/make_amount = 10 @@ -81,12 +81,12 @@ class Producer(Object): @set bush/make_eat_amount = 3 # Either a single msg: - @set bush/make_eat_msg = "Sweet and slightly tart. [Delicious|Tangy|Mmmm]." + @set bush/make_eat_msg = "Sweet and slightly tart. {{Delicious ^ Tangy ^ Mmmm}}." # Or many: - @set bush/make_eat_msgs = [ "Sweet and slightly tart.", "[Delicious|Tangy|Mmmm].", + @set bush/make_eat_msgs = {{ "Sweet and slightly tart.", "[Delicious ^ Tangy ^ Mmmm}}.", "Ooo...that one was sour.", "That was a bit ripe, but still good.", - "So sweet with a hint of [orange|maple]." ] - @set bush/make_finish_msg = "Those were [delicious|great]." + "So sweet with a hint of {{orange ^ maple}}." ] + @set bush/make_finish_msg = "Those were {{delicious ^ great}}." """ def at_object_creation(self): self.cmdset.add_default(CmdSetMakeConsumable) @@ -121,7 +121,7 @@ class Producer(Object): # ---------------------------------------------------------------------- TEACUP_DESCS = [ - "A rustic, clay teacup carefully crafted on a wheel. Beautiful [dark red|olive green|navy blue] glaze.", + "A rustic, clay teacup carefully crafted on a wheel. Beautiful [dark red ^ olive green ^ navy blue}} glaze.", "A fine example of Royal Albert teacup, sporting a design of violet azaleas. Perfect for a black tea.", "A Wings of Grace style teacup with blue butterflies. Perfect for some Earl Grey.", "A dark brown Yixing clay teacup. Perfect for an Oolong tea.", @@ -211,9 +211,9 @@ class Trolley(Producer): "aliases": ["wood", "kindling", "logs"], })[0] wood.location = caller - caller.msg(routput("You [get|pick up|grab] " - "[some wood|couple logs|a log|a few pieces of wood] " - "[from the woodbox|from the box on the hearth|for the fireplace|].")) + caller.msg(routput("You {{get ^ pick up ^ grab}} " + "{{some wood ^ couple logs ^ a log ^ a few pieces of wood}} " + "{{from the woodbox ^ from the box on the hearth ^ for the fireplace ^ }}.")) def do_bake(self): """ @@ -224,22 +224,22 @@ class Trolley(Producer): self.db.make_name = name self.db.make_aliases = ["scone", "scones"] - self.db.make_desc = routput(f"A [tasty|yummy|delicious]-looking {name}") + self.db.make_desc = routput("A {{tasty ^ yummy ^ delicious}}-looking {0}", name) self.db.make_amount = 3 self.db.make_eat_amount = 1 msgs = [ - "[Delicious|Mmmm|So good|Really good].", + "{{ Delicious ^ Mmmm ^ So good ^ Really good}}.", ] if todays_scone.get('taste'): - msgs += [f"You [can|] [really|] [notice|taste] the {todays_scone.get('taste')}."] + msgs += [f"You {{can ^ }} {{really ^ }} {{notice ^ taste}} the {todays_scone.get('taste')}."] if todays_scone.get('tastes'): for taste in todays_scone.get('tastes'): - msgs += [f"You [can|] [really|] [notice|taste] the {taste}."] + msgs += [f"You {{can ^ }} {{really ^ }} {{notice ^ taste}} the {taste}."] if todays_scone.get('expression'): - msgs += [f"[Really|So] {todays_scone.get('expression')}."] + msgs += [f"{{Really ^ So}} {todays_scone.get('expression')}."] self.db.make_eat_msgs = msgs - self.db.make_finish_msg = "That was [delicious|great|really good]." + self.db.make_finish_msg = "That was {{delicious ^ great ^ really good}}." - self.location.msg_contents(routput("[New|Aromatic|Fresh|Freshly baked] scones [magically|suddenly|mystically|enchantingly|] appear [on a plate|on plates|] on the trolley.")) + self.location.msg_contents(routput("{{New ^ Aromatic ^ Fresh ^ Freshly baked}} scones {{magically ^ suddenly ^ mystically ^ enchantingly ^ }} appear {{on a plate ^ on plates ^ }} on the trolley.")) diff --git a/typeclasses/drinkables.py b/typeclasses/drinkables.py index d226675..037acdb 100755 --- a/typeclasses/drinkables.py +++ b/typeclasses/drinkables.py @@ -2,46 +2,46 @@ from typeclasses.objects import Object from commands.consumables import CmdSetTeapot, CmdSetTeacup -from utils.word_list import routput +from utils.word_list import routput, choices import random TEA_TYPES = { - "black": "a rich, bold and [malty|fragrant|almost spicy] black tea", - "green": "a green tea with [grassy|floral|vanilla|vegetal] notes", - "oolong": "a complex and [earthy|floral] oolong", + "black": "a rich, bold and {{malty ^ fragrant ^ almost spicy}} black tea", + "green": "a green tea with {{grassy ^ floral ^ vanilla ^ vegetal}} notes", + "oolong": "a complex and {{earthy ^ floral}} oolong", "matcha": "a frothy and aromatic matcha of the most vibrant green", - "white": "a subtle tea with notes of [rose|berries|chamomile flowers]", + "white": "a subtle tea with notes of {{rose ^ berries ^ chamomile flowers}}", "pu-erh": "an earthy, almost mushroom flavored, pu-erh tea", "puerh": "an earthy, almost mushroom flavored, pu-erh tea", "barley": "a nutty herbal infusion of barley with just a hint of smokiness", "chaga": "an earthy, mushroomy chaga infusion", "hibiscus": "a dark red, tart herbal infusion of roselle flowers", "chai": "a spicy chai tea, tempered with milk and sweetness", - "herbal": "an herbal infusion of [chamomile|mint|chicory root|lavender]", + "herbal": "an herbal infusion of {{chamomile ^ mint ^ chicory root ^ lavender}}", "earl": "a flowery Earl Grey tea", "chamomile": "a relaxing, yet subtle infusion of chamomile flowers that makes you want to go to sleep", "mint": "a blend of peppermint and spearmint to create the ultimate minty herbal infusion", "chrysanthemum": "a lovely, floral infusion of chrysanthemum flowers", "dandelion": "a roasted herbal infusion of dandelions that tastes a bit like coffee", - "rooibos": "an almost [sweet and|] [woody|nutty|vanilla-y] rooibos herbal infusion", + "rooibos": "an almost {{sweet and ^ }} {{woody ^ nutty ^ vanilla-y}} rooibos herbal infusion", # Why limit to teas ... sure, this tea pot could make coffee ... } FILL_MSGS = [ - "You fill your [teacup|cup] with {1}.", - "You pour [some|] {0} tea into your [teacup|cup].", + "You fill your {{teacup ^ cup}} with {1}.", + "You pour {{some ^ }} {0} tea into your {{teacup ^ cup}}.", ] DRINK_MSGS = [ "You take a sip of {0} tea.", - "You take a sip of {0} tea [in|from] your [teacup|cup].", - "You [sip|sample|drink] from your [teacup|cup].", - "You savor {1} in your [teacup|cup].", + "You take a sip of {0} tea {{in ^ from}} your {{teacup ^ cup}}.", + "You {{sip ^ sample ^ drink}} from your {{teacup ^ cup}}.", + "You savor {1} in your {{teacup ^ cup}}.", ] EMPTY_MSGS = [ - "Your [teacup|cup] is empty. Perhaps you can |gmake|n some |gtea|n?", + "Your {{teacup ^ cup}} is empty. Perhaps you can |gmake|n some |gtea|n?", "Your cup certainly doesn't runneth over, as it be quite empty.", "Alas, you find your cup devoid of any sort of watery infusion.", "You notice your cup is empty.", @@ -63,19 +63,16 @@ class TeaCup(Object): if amount > 0: self.db.amount = self.db.amount - self.sip_amount - drinker.msg(routput(random.choice(DRINK_MSGS).format(tea_type, tea_details))) + drinker.msg(choices(DRINK_MSGS, tea_type, tea_details)) else: - drinker.msg(routput(random.choice(EMPTY_MSGS).format(tea_type, tea_details))) + drinker.msg(choices(EMPTY_MSGS, tea_type, tea_details)) def do_fill(self, drinker, tea_type, tea_details): self.db.tea_type = tea_type self.db.tea_details = tea_details self.db.amount = self.fill_amount - drinker.msg(routput(random.choice(FILL_MSGS).format(tea_type, tea_details))) - # Spam the room? Maybe not. - # self.location.msg_contents(f"{drinker.name} refills a {self.key}.", - # exclude=drinker) + drinker.msg(choices(FILL_MSGS, tea_type, tea_details)) class Teapot(Object): diff --git a/typeclasses/fishing.py b/typeclasses/fishing.py index ec49362..3b0db0b 100755 --- a/typeclasses/fishing.py +++ b/typeclasses/fishing.py @@ -151,10 +151,10 @@ class Fish(CarriableNPC): A visual way to delete the fish. """ if fisher.location == fisher.search("mp06"): - fisher.msg(routput("You [toss|heave|throw] the fish back into the [water|pond].")) + fisher.msg(routput("You {{toss ^ heave ^ throw}} the fish back into the {{water ^ pond}}.")) fisher.msg(routput("The fish says, \"Bye for now. If you want to talk again, just drop me a line!\"")) else: - fisher.msg(routput("You [toss|heave|throw] the fish, and an eagle swoops down and snatches it. I'm sure it will carry the fish back to the pond for you.")) + fisher.msg(routput("You {{toss ^ heave ^ throw}} the fish, and an {{ eagle ^ hawk }} swoops {{ down ^ }} and snatches it. I'm sure it will carry the fish back to the pond for you.")) self.delete() def get_name(): @@ -166,8 +166,8 @@ class Fish(CarriableNPC): return routput(random.choice([ "A walleye with big bulbous eyes that clearly doesn't get no respect.", "A bass with amazing neck confidence giving it a most excellent head bob." - "A rainbow trout missing the [red|yellow|green|blue] from its iridescent stripe.", - "A brown trout colored [red|blue|purple|orange].", + "A rainbow trout missing the {{red ^ yellow ^ green ^ blue}} from its iridescent stripe.", + "A brown trout colored {{red ^ blue ^ purple ^ orange}}.", # "A spiny perch", # "A salmon", # "A pike", @@ -205,9 +205,9 @@ class FishingPole(Object): else: fisher.db.fishing = Fishing.CAST fisher.msg(routput(random.choice([ - "You cast out far into the [water|pond].", - "You cast close to the [dock|shore].", - "You cast off to the [right|left] where you [think you|] see a dark pocket.", + "You cast out far into the {{water ^ pond}}.", + "You cast close to the {{dock ^ shore}}.", + "You cast off to the {{right ^ left}} where you {{think you ^ }} see a dark pocket.", ]))) def do_reel(self, fisher): diff --git a/typeclasses/pets.py b/typeclasses/pets.py index 1428581..c875ffd 100755 --- a/typeclasses/pets.py +++ b/typeclasses/pets.py @@ -535,17 +535,16 @@ class BHB(Friendly): case Reaction.INTERESTED: msg = choices(""" - The beast [runs|hurries] at the stick, then looks at , [wondering|curious as to|pondering] what to do with a stick the flies back to its owner. ;; - The beast [rushes|runs at] the stick, and then veers off, thundering around the [field|meadow]. The stick returns to your hand. + The beast {{runs ^ hurries}} at the stick, then looks at , {{wondering ^ curious as to ^ pondering}} what to do with a stick the flies back to its owner. ;; + The beast {{rushes ^ runs at}} the stick, and then veers off, thundering around the {{field ^ meadow}}. The stick returns to your hand. """) self.adjust_character(thrower, 30) case _: msg = choices(""" - The [big hairy|] beast [dashes|runs|jumps|leaps into the air|leaps] and [catches|snags|grabs] the stick in midair, and drops it in front of . ;; - The [big hairy|] beast [gallops|trumbles|trots] over to the stick and [dances|prances|hops] around the stick before bringing it back to . ;; - The [big hairy|] beast [gallops|trumbles|trots] over to the stick and [dances|prances|hops] around the stick before bringing it back to . ;; - """) + The {{big hairy ^ }} beast {{dashes ^ runs ^ jumps ^ leaps into the air ^ leaps}} and {{catches ^ snags ^ grabs}} the stick in midair, and drops it in front of . ;; + The {{big hairy ^ }} beast {{gallops ^ trumbles ^ trots}} over to the stick and {{dances ^ prances ^ hops}} around the stick before bringing it back to . ;; + The {{big hairy ^ }} beast {{gallops ^ trumbles ^ trots}} over to the stick and {{dances ^ prances ^ hops}} around the stick before bringing it back to .""") self.adjust_character(thrower, 10) if msg: split_party_msg(thrower, msg) diff --git a/typeclasses/readables.py b/typeclasses/readables.py index 72a9b55..efc4634 100755 --- a/typeclasses/readables.py +++ b/typeclasses/readables.py @@ -223,19 +223,18 @@ class Books(Object): title = random.choice(list(BOOKS.keys())) return ( title, - routput("""a [worn|barely read|pristine copy of a|] - [leather-bound|] book, titled, |w{0}|n - """.format(title)), + routput("""a {{worn ^ barely read ^ pristine copy of a ^ }} + {{leather-bound ^ vellum-bound ^ }} book, titled, |w{0}|n + """, title), routput( """ - You [open|open up|crack open] your book, entitled, + You {{open ^ open up ^ crack open}} your book, entitled, |w{0}|n, and read the {1} {2} of {3}. - """.format( - title, - random.choice(BOOK_EMOTIONS), - random.choice(BOOK_TYPES), - BOOKS[title] - ) + """, + title, + random.choice(BOOK_EMOTIONS), + random.choice(BOOK_TYPES), + BOOKS[title] ) ) diff --git a/typeclasses/things.py b/typeclasses/things.py index 330c180..d87e3ae 100755 --- a/typeclasses/things.py +++ b/typeclasses/things.py @@ -7,7 +7,7 @@ from evennia import create_script from evennia.utils import logger, delay from commands.misc import CmdSetPuddle, CmdSetStick, CmdSetKnock -from utils.word_list import routput +from utils.word_list import routput, choices from .scripts import KnockScript from .objects import Object @@ -20,9 +20,9 @@ class Trinket(Object): """ msgs = [ - "You see a crystal ball. When the swirling vortex stops, It reads, '[Why not?|Don't even think about it|Maybe, maybe not|Sure, just don't tell]'.", + "You see a crystal ball. When the swirling vortex stops, It reads, '{{Why not? ^ Don't even think about it ^ Maybe, maybe not ^ Sure, just don't tell}}'.", "You find a deck of Tarot cards, but the card of Death has been replaced by a worker in an office cubical that reads, 'Mostly Death'.", - "You see a statue of a [black|red|yellow] dragon in the shape of a question mark. You have to ask yourself, Why?", + "You see a statue of a {{black ^ red ^ yellow}} dragon in the shape of a question mark. You have to ask yourself, Why?", "A Venus fly trap in a shell surrounded by chubby cherubs.", "You see a statue of a large rat. Did it just blink? Wow, after it ran away you think that was a rat of unusual size.", "An ancient Colombian grave owl holding a sign that reads, 'Cannibals don't eat clowns? They taste funny.'", @@ -31,7 +31,7 @@ class Trinket(Object): "A troll doll with an outie belly button. Everyone knows that trolls are not placental mammals, but reproduce through a complex series of... wait, you haven't had this talk with your parents, yet?", "A small statue of a flexing giant. When you push its belly, it says, 'Its not my fault I'm the biggest and the strongest. I don't even exercise.'", "You see a license plate from the State of Utah that reads HEATHEN, and think, what is the significance of hens in heat? Oh, and you also think, what is a license plate doing in a fantasy game about escaping the clamors of last stage capitalism?", - "You find a brilliant [blue|green|iridescent] scarf around a book, but as soon as you remove it, the book tries to bite you. After it chases you around the room, you double back, jump on it, breaking its spine (which is lets out a sad yelp), and wrap the scarf back around it. Maybe you've seen enough stuff on these shelves for a while.", + "You find a brilliant {{blue ^ green ^ iridescent}} scarf around a book, but as soon as you remove it, the book tries to bite you. After it chases you around the room, you double back, jump on it, breaking its spine (which is lets out a sad yelp), and wrap the scarf back around it. Maybe you've seen enough stuff on these shelves for a while.", ] def at_object_creation(self): @@ -69,7 +69,7 @@ class Wood(Object): self.db.plural = "some logs" self.db.desc = routput(choice([ "Its log, its log, it's big, it's heavy, it's wood.", - "Some [logs|wood] for the fireplace.", + "Some {{logs ^ wood}} for the fireplace.", ])) @@ -87,12 +87,12 @@ class Stick(Object): if thrower.db.thrown_times == 1: thrower.msg("The stick flies through the air, and just as you thought, it comes back to you!") else: - thrower.msg(routput(choice([ - f"Yer a wizard, {thrower.name.capitalize()}!", - "[Did you see that?|] It clipped the leaf on that tree before returning.", - "This is a [fun|pleasant|nice] [past-time|game].", - "Maybe we should get a pet [or beast|beastie] in here who would love to play.", - ]))) + thrower.msg(choices([ + "Yer a wizard, {0}!", + "{{Did you see that? ^ }} It clipped the leaf on that tree before returning.", + "This is a {{fun ^ pleasant ^ nice}} {{past-time ^ game}}.", + "Maybe we should get a pet {{or beast ^ beastie ^ }} in here who would love to play.", + ], thrower.name.capitalize())) self.location.msg_contents(f"{thrower.name} throws a stick.", exclude=thrower) else: @@ -110,13 +110,13 @@ class Puddle(Object): "This is great fun. You feel childish.") else: player.msg(routput(choice([ - "You don't care [how muddy|who notices], you jump in again!", - "Mud? Whatever. You [splash|jump] in[| again].", + "You don't care {{how muddy ^ who notices}}, you jump in again!", + "Mud? Whatever. You {{splash ^ jump}} in {{^ again}}.", "You splash around in the puddle.", "You jump in the puddle again.", "This time you dance a little as you kick up your heels.", ]) + " You feel " + choice([ - "[so much|] better.", + "{{so much ^ }} better.", "carefree.", "child-like and free.", "irresponsible.", @@ -184,7 +184,7 @@ class Knocker(Object): "Well, I suppose I could give you a |mhint|n.", ] hint_responses = [ - "A hint does sound fair. [Should I|I should] come up with a |mriddle|n[|, huh]?" + "A hint does sound fair. [Should I|I should] come up with a |mriddle|n{{, huh ^ }}?" ] riddle_responses = [ "Aged in barrels, smooth and neat, in a glass by the fire, I'm a treat.", @@ -220,9 +220,9 @@ class Knocker(Object): # A _sequence_ of responses, from what is this password business, to give me a hint, to give me the riddle ... [question_msg, Knocker_Convo.RIDDLE, [ - "Nope. Would [ya|you] like another riddle?", - "You [really|] think that is the answer?", - "Personally, [|I think] that riddle could not [be|have been] more clear." + "Nope. Would {{ya ^ you}} like another riddle?", + "You {{really ^ }} think that is the answer?", + "Personally, {{I think ^}} that riddle could not {{be ^ have been}} more clear." ], None], [yes_msg, Knocker_Convo.HINT, riddle_responses, Knocker_Convo.RIDDLE], ["riddle", Knocker_Convo.ANY, riddle_responses, Knocker_Convo.RIDDLE], @@ -249,8 +249,8 @@ class Knocker(Object): "I'm hanging on a door? Really? Let's see, can I roll my eyes?", "Just to let you know, the door is locked.", """ - I shouldn['t|be quiet, and not] be telling you this, - but I like the cut of your [suit|cloak|jib]. + I shouldn't be telling you this, + but I like the cut of your {{suit ^ cloak ^ jib}}. So, you see, if you speak the |mpassword|n, wait, I've said too much. """ ], Knocker_Convo.DOOR], @@ -273,7 +273,7 @@ class Knocker(Object): ], None], [r"thanks|thank you", Knocker_Convo.ANY, [ - "You're [very|] welcome.", + "You're {{very ^ }} welcome.", "Glad to be of service." ], None], @@ -282,43 +282,43 @@ class Knocker(Object): "Excellent.", ], None], [no_msg, Knocker_Convo.ANY, [ - "Well, it's true. Just ask the [raven|trees|gnome].", + "Well, it's true. Just ask the {{raven ^ trees ^ gnome}}.", ], None], [question_msg, Knocker_Convo.ANY, [ - "What about [me|it|'im]?", + "What about {{me ^ it ^ 'im}}?", "I dunno...", ], None], ] after_unlocked_responses = [ """ - We could [feign|pretend|play make-believe] and - [carry on|continue|persist] this [conversation|charade], - but we both know that |wyou|n know the [password|secret|secret word|magic], + We could {{feign ^ pretend ^ play make-believe}} and + {{carry on ^ continue ^ persist}} this {{conversation ^ charade}}, + but we both know that |wyou|n know the {{password ^ secret ^ secret word ^ magic}}, and can go through the |gdoor|n now. """, """ - [Sure|Why not|Why yes], let's [feign|pretend|play make-believe that] you - don't know the [password|secret|secret word|magic], and - [carry on|continue|persist] this conversation. + {{Sure ^ Why not ^ Why yes}}, let's {{feign ^ pretend ^ play make-believe that}} you + don't know the {{password ^ secret ^ secret word ^ magic}}, and + {{carry on ^ continue ^ persist}} this conversation. """, ] cant_hear_responses = [ - "[Sorry.|What was that?|Did you say something?] I'm hard of hearing on account of the brass ears.", + "{{Sorry. ^ What was that? ^ Did you say something?}} I'm hard of hearing on account of the brass ears.", "Brass ears. Yeah, not the best at hearing.", - "Yeah, These brass ears don't hear much except for the |m[secret|magic|] password|n.", + "Yeah, These brass ears don't hear much except for the |m{{secret ^ magic ^ }} password|n.", ] unknown_responses = [ - "Are you talking to me or the goblin [in the bushes|up the tree|behind the rock]?", + "Are you talking to me or the goblin {{in the bushes ^ up the tree ^ behind the rock}}?", "Knock, knock.", "What do you mean?", - "Of course I like [hard candy|squirrels|apples]. Who [doesn't|wouldn't|do you know that doesn't]?", - "No thank you, I can't eat [apples|kumquats|figs], what with the brass teeth and a lack of guts.", - "Tea? While that would be [nice|sweet] of you, I can't really hold a cup.", + "Of course I like {{hard candy ^ squirrels ^ apples}}. Who {{doesn't ^ wouldn't ^ do you know that doesn't}}?", + "No thank you, I can't eat {{apples ^ kumquats ^ figs}}, what with the brass teeth and a lack of guts.", + "Tea? While that would be {{nice ^ sweet}} of you, I can't really hold a cup.", "I'm fine, thanks. How are you?", - "I'll say, [we have had|that is] a spell of weather.", + "I'll say, {{we have had ^ that is}} a spell of weather.", ] def at_object_creation(self): @@ -414,9 +414,9 @@ class Knocker(Object): response = "In a shape of a bald goblin, the brass door knocker in the center of the red door" if self.has("brass ring"): response += " holds a ring in its mouth. " - response += "[You think it|You are sure it|You could've sworn it|It] [just|] winked at you." + response += "{{You think it ^ You are sure it ^ You could've sworn it ^ It}} {{just ^ }} winked at you." else: - response += " [smiles|looks] at you expectantly. " + response += " {{smiles ^ looks}} at you expectantly. " return routput(response) diff --git a/typeclasses/tutorial.py b/typeclasses/tutorial.py index fb5d953..80ce77d 100755 --- a/typeclasses/tutorial.py +++ b/typeclasses/tutorial.py @@ -19,7 +19,7 @@ import random MSGS = { "START": [ - "A small bird flies over to you, and perches on your shoulder. \"Hello,\" it says in your ear. \"I’m the Tutorial Bird,\" it chirps, \"and I’m here to break the fourth wall, and help you figure out this game. Feel free to |gshoo|n me away, and I’ll leave you alone to explore.\"", + "A small bird flies over to you, and perches on your shoulder. \"Hello,\" it says in your ear. \"I'm the Tutorial Bird,\" it chirps, \"and I'm here to break the fourth wall, and help you figure out this game. Feel free to |gshoo|n me away, and I'll leave you alone to explore.\"", "The bird says, \"In this story game, you type commands (verbs) to do things. For instance, type the word |glook|n, and press the |wReturn|n key to look around at your surroundings and to see where you are, what you can do, and where you can go.\"", "The bird perched on your shoulder looks at you expectantly.", "\"Go ahead,\" says the bird, \"Type |glook|n. If you are on the web site, you may need to click in the box in the lower part of the screen.\"", @@ -28,55 +28,55 @@ MSGS = { "\"If so,\" says the bird, \"type |glook|n to look around at your surroundings.\"", ], "LOOK": [ - "\"That’s great,\" says the little blue bird. \"From that, you know you are standing in a grove of trees near a puddle. You can now type |glook puddle|n to examine it.\"", + "\"That's great,\" says the little blue bird. \"From that, you know you are standing in a grove of trees near a puddle. You can now type |glook puddle|n to examine it.\"", "\"You can also |glook trees|n, |glook moss|n, or … well, you get the idea,\" it says.", ], "LOOKAT": [ "\"You seem to be getting the hang of this game,\" chirps the bird. \"When you typed |glook|n before, you noticed exits. These are directions or places you can go. For instance, if you type |gsouth|n (or just |gs|n as a shortcut), you can check out our pond where you can catch obnoxious fish.\"", - "\"The path to the |geast|n is the meadow of the BHB, the Big Hairy Beast,\" the little bird on your shoulder says. \"It's adorable if you can find it. The path to the |gwest|n leads to Dabbler’s place.\"", - "\"Yes, I could fly myself,\" warbles the little bird, \"but I’m trying to help you get around.\"", + "\"The path to the |geast|n is the meadow of the BHB, the Big Hairy Beast,\" the little bird on your shoulder says. \"It's adorable if you can find it. The path to the |gwest|n leads to Dabbler's place.\"", + "\"Yes, I could fly myself,\" warbles the little bird, \"but I'm trying to help you get around.\"", "The bird looks at you expectantly.", "\"Shall we explore other places?\" asks the bird on your shoulder.", - "\"I hope I’m not rushing you,\" the bird mentions, \"as you can always come back to explore more.\"", + "\"I hope I'm not rushing you,\" the bird mentions, \"as you can always come back to explore more.\"", ], "MOVE": [ - "\"Thanks for lift. This is a nice place,\" says the bird on your shoulder. \"When you come to a new area, the game shows you what you are seeing, so you don’t have to type |glook|n … even though you still can.\"", + "\"Thanks for lift. This is a nice place,\" says the bird on your shoulder. \"When you come to a new area, the game shows you what you are seeing, so you don't have to type |glook|n … even though you still can.\"", "\"Another interesting command,\" it chirps, \"is the |gsay|n command, that lets you talk to anyone in the area. Usually, we use this command for talking to other players in the game, but some creatures listen to what you say.\"", "\"Go ahead, just typing |gsay Hello.|n\"", ], "SAY": [ - "\"How’s it going?\" the bird asks, \"Are you enjoying this game so far?\"", + "\"How's it going?\" the bird asks, \"Are you enjoying this game so far?\"", "The bird says, \"This place has been a respite from the outside turbulence.\"", "\"A shortcut to |gsay|n is to type either a double or single quote, and then your message.\"", "\"You can also use |gpose|n to state something about yourself, \" it says. \" For instance, type |gpose smiles.|n\"", # POSE: "The bird stands on one leg.", - "\"See,\" says the bird, \"I s’pose I can pose too.\"", + "\"See,\" says the bird, \"I s'pose I can pose too.\"", "\"A shortcut to that command is typing |g:|n (a colon character).\"", - "The bird says, \"The game has more commands. Typing |ghelp|n gives you a list of commands. That list changes depending on where you are and what you are carrying. For instance, you could type |gshoo|n for me to fly away, and then that command wouldn’t be available again.\"", + "The bird says, \"The game has more commands. Typing |ghelp|n gives you a list of commands. That list changes depending on where you are and what you are carrying. For instance, you could type |gshoo|n for me to fly away, and then that command wouldn't be available again.\"", # ], # "HELP": [ "The bird chirps, \"You can learn more about the individual commands. For instance, type |ghelp say|n and you would see about the shortcuts I told you about. You can also see new commands, like |ghelp get|n.\"", - "\"Type |ghelp start|n for a repeat of much of what we’ve talked about,\" says the bird.", + "\"Type |ghelp start|n for a repeat of much of what we've talked about,\" says the bird.", "The bird says, \"The |ginv|n shows you what you are carrying. I see you picked up a letter. You can also type |gread letter|n.\"", "\"Since this game hosts many users,\" says the bird, \"you can show them what they see when they look at you, using the |g@setdesc|n command. Check out the help, |ghelp @setdesc|n, or just type: |w@setdesc A pixie with a shock of blue hair and a gold chain.|n\"", - "\"I’m guessing your last question,\" chirps the little bird on your shoulder, \"is the goal of this game.\"", - "\"That is a good question,\" says the bird, \"and I’m not sure what to say. This game has no goal, nor point. I guess you could look at it as a philosophical metaphor for existential existence in a post-modern world in the death throes of capitalism, but…\"", - "The bird says, \"This is a cozy little game about role playing a storybook character and maybe exploring and looking for eggs… no, that’s not right. Something about eggs. Easter eggs? Something like that.\"", + "\"I'm guessing your last question,\" chirps the little bird on your shoulder, \"is the goal of this game.\"", + "\"That is a good question,\" says the bird, \"and I'm not sure what to say. This game has no goal, nor point. I guess you could look at it as a philosophical metaphor for existential existence in a post-modern world in the death throes of capitalism, but…\"", + "The bird says, \"This is a cozy little game about role playing a storybook character and maybe exploring and looking for eggs… no, that's not right. Something about eggs. Easter eggs? Something like that.\"", "\"Wander and look around. Find a cozy place to chat with others who have logged in,\" says the bird.", - "\"If you’re interested in |wbuilding|n and expanding this world,\" chirps the bird, \"talk to Dabbler... Oh, see if you can find Dabbler, the guy that made most of this. That is a great goal.\"", + "\"If you're interested in |wbuilding|n and expanding this world,\" chirps the bird, \"talk to Dabbler... Oh, see if you can find Dabbler, the guy that made most of this. That is a great goal.\"", "\"What do you say?\" says the bird. \"Think you got the hang of playing this?\"", ] } MSGS_WAITING = [ - "The [little|blue|] bird [on your shoulder|] preens itself.", - "The [little|blue|] bird [on your shoulder|] [looks|stares] at you [expectantly|waiting|patiently].", + "The {{little ^ blue ^ }} bird {{on your shoulder ^ }} preens itself.", + "The {{little ^ blue ^ }} bird {{on your shoulder ^ }} {{looks ^ stares}} at you {{expectantly ^ waiting ^ patiently}}.", "The bird looks up at the sky. \"It rains here often,\" it says.", "The bird looks up at the sky. \"Looks like rain is coming,\" it says.", "\"I like the rain,\" the bird says, \"as it keeps the moss green and the puddles full.\"", - "\"They say if you don’t like the weather,\" tweets the bird, \"just wait.\"", + "\"They say if you don't like the weather,\" tweets the bird, \"just wait.\"", ] class TutorialState(Enum): @@ -142,7 +142,7 @@ class TutorBird(CarriableNPC): """ A visual way to stop the tutorial """ - character.msg("\"Have fun, and I’ll leave you here,\" chirps the bird, \"and remember to check out the letter you picked up!\" It flies away.") + character.msg("\"Have fun, and I'll leave you here,\" chirps the bird, \"and remember to check out the letter you picked up!\" It flies away.") self.delete() def get_msg_level(self, character, level): diff --git a/utils/word_list.py b/utils/word_list.py index 64c221d..3630c48 100755 --- a/utils/word_list.py +++ b/utils/word_list.py @@ -8,13 +8,12 @@ def squish(text): "Remove series of spaces from the text." return re.sub('[ \n\t]+', ' ', text).strip() - -def routput(text, substitution=None): +def routput(text, *substitutions): """ Return string with internal word choices replaced randomly. For instance, the string: - 'This feels [|very|quite] [nice|cozy|comfortable].' + 'This feels {{^ very ^ quite}} {{nice^cozy^comfortable}}.' Could return any of the following strings: @@ -24,21 +23,36 @@ def routput(text, substitution=None): """ if text: acc = [] - for s in text.split("["): - selections, *rest = s.split("]") - choice = random.choice(selections.split('|')) + for s in text.split("{{"): + selections, *rest = s.split("}}") + choice = random.choice(re.split(r"\s*\^\s*", selections)) acc = acc + [choice] + rest - return squish(''.join(acc).format(substitution or "")) + proposal = squish(''.join(acc).format(*substitutions)) + + # If a choice is at the end of a sentence, and we could have + # "no choice", as in: + # "He searches {{thoroughly ^ quickly ^}}." + # We don't want a version that looks like: + # "He searches # ." + # with a space before the punctuation: + + return re.sub(r"\s+([!?.,])", "\\1", proposal) -def choices(text, substitution=None): +def choices(text, *substitutions): """ Returns a section of 'text' based on separating semicolons. + + Note that text can already be separated as a list or tuple. """ - if text: - selections = text.split(';;') - return routput(random.choice(selections), substitution) + if isinstance(text, str): + selections = re.split(r"\s*;;\s*", text) + elif isinstance(text, (tuple, list)): + selections = text + + if selections: + return routput(random.choice(selections), *substitutions) def split_party_msg(viewer, msg): diff --git a/world/version1.ev b/world/version1.ev index 310a47d..2b48874 100644 --- a/world/version1.ev +++ b/world/version1.ev @@ -51,7 +51,7 @@ Spectacles perched precariously on the end of his hooked nose, wobble with his h # [[file:../../../Dropbox/org/projects/mud.org::*Character: Dabble][Character: Dabble:6]] @set self/disappear_msg = "After a raspberry sound, the gnome, Dabbler, disappears in a wisp of smoke." # -@set self/reappear_msg = "[White|Light blue|Gray] mist appears...along with the smell of sulphur... ;; When the smoke clears, an old gnome [emerges|materializes|shows up, looking a bit confused]." +@set self/reappear_msg = "{{White ^ Light blue ^ Gray}} mist appears...along with the smell of sulphur... ;; When the smoke clears, an old gnome {{emerges ^ materializes ^ shows up, looking a bit confused}}." # Character: Dabble:6 ends here @@ -123,7 +123,7 @@ Spectacles perched precariously on the end of his hooked nose, wobble with his h # [[file:../../../Dropbox/org/projects/mud.org::*Puddles][Puddles:3]] @lock puddle = get:false() # -@set puddle/get_err_msg = "As the water slips through your fingers, you realize the apt metaphor of attempting to grasp at your youth. +@set puddle/get_err_msg = "As the water slips through your fingers, you realize the apt metaphor of attempting to grasp at your youth." # Puddles:3 ends here @@ -202,7 +202,7 @@ Wait! You notice a foot hold, and then another. You can |gclimb|n this boulder! # To take advantage of our [[Hidden Things]], we put the right tag on it: # [[file:../../../Dropbox/org/projects/mud.org::*Boulder][Boulder:7]] -@set boulder/hidden_tag = hidden_boulder +@set boulder/hidden_tag = "hidden_boulder" # @lock boulder = view:tag(hidden_boulder) # Boulder:7 ends here @@ -291,7 +291,7 @@ Wait! You notice a foot hold, and then another. You can |gclimb|n this boulder! # And a lovely message about why you can’t steal moss: # [[file:../../../Dropbox/org/projects/mud.org::*Top of Boulder][Top of Boulder:10]] -@set moss/get_err_msg = The moss is a bryophyte, and as such, has attached itself to boulder by rhizoids, which are one cell thick root structures. While this helps with water absorption, you didn't think you were going to get a biology lesson, did you? tl;dr You can't get it. +@set moss/get_err_msg = "The moss is a bryophyte, and as such, has attached itself to boulder by rhizoids, which are one cell thick root structures. While this helps with water absorption, you didn't think you were going to get a biology lesson, did you? tl;dr You can't get it." # Top of Boulder:10 ends here @@ -440,7 +440,7 @@ Wait! Is there a large cave entrance hidden behind the water? # And we make it hidden: # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:3]] -@set lair/hidden_tag = hidden_cave +@set lair/hidden_tag = "hidden_cave" # @lock lair = view:tag(hidden_cave) # The Lair of the Beast:3 ends here @@ -530,7 +530,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:13]] -@set beast/hidden_tag = hidden_beast +@set beast/hidden_tag = "hidden_beast" # @lock beast = view:tag(hidden_beast) # The Lair of the Beast:13 ends here @@ -614,7 +614,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:22]] -@set beast/scared_msg = "It seems [skiddish|afraid|skiddish and afraid] as it tries to hide behind a tall clump of grass. Yeah, it doesn't do a good job of hiding." +@set beast/scared_msg = "It seems {{skiddish ^ afraid ^ skiddish and afraid}} as it tries to hide behind a tall clump of grass. Yeah, it doesn't do a good job of hiding." # The Lair of the Beast:22 ends here @@ -632,7 +632,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:24]] -@set beast/interested_msg = "It seems [curious|interested] in what you are doing [here|]. ;; Its [|large,|big,] yellow eyes watch your every move." +@set beast/interested_msg = "It seems {{curious ^ interested}} in what you are doing {{here ^ }}. ;; Its {{ ^ large, ^ big,}} yellow eyes watch your every move." # The Lair of the Beast:24 ends here @@ -641,7 +641,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:25]] -@set beast/friendly_msg = "It sits next to you, as its big, friendly eyes gaze as you. ;; It [leaps over|runs up|bounces up|] to you, wagging its tail-less behind. ;; It lays down next to you." +@set beast/friendly_msg = "It sits next to you, as its big, friendly eyes gaze as you. ;; It {{leaps over ^ runs up ^ bounces up ^ }} to you, wagging its tail-less behind. ;; It lays down next to you." # The Lair of the Beast:25 ends here @@ -650,7 +650,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:26]] -@set beast/sleeping_actions = "The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] lets loose a [big,|huge,|large,|tremendous,|] snore. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] growls in its sleep. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] twitches its [leg|legs|paw|nose]. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [shifts|rolls] on its [big,|huge,|large,|tremendous,|] mattress." +@set beast/sleeping_actions = "The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} lets loose a {{big, ^ huge, ^ large, ^ tremendous, ^ }} snore. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} growls in its sleep. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} twitches its {{leg ^ legs ^ paw ^ nose}}. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{shifts ^ rolls}} on its {{big, ^ huge, ^ large, ^ tremendous, ^ }} mattress." # The Lair of the Beast:26 ends here @@ -671,7 +671,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:28]] -@set beast/concerned_actions = "The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [is|seems] concerned by your presence in the [meadow|field]. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] seems concerned. Maybe it's hungry.. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] seems concerned and keeps its distance.." +@set beast/concerned_actions = "The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{is ^ seems}} concerned by your presence in the {{meadow ^ field}}. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} seems concerned. Maybe it's hungry.. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} seems concerned and keeps its distance.." # The Lair of the Beast:28 ends here @@ -680,7 +680,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:29]] -@set beast/interested_actions = "The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] seems [curious|interested] in what you are doing [here|]. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] seems curious about you. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] stands on its hind legs. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [stares at|watches|follows] you with its [large,|big,|] yellow eyes." +@set beast/interested_actions = "The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} seems {{curious ^ interested}} in what you are doing {{here ^ }}. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} seems curious about you. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} stands on its hind legs. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{stares at ^ watches ^ follows}} you with its {{large, ^ big, ^ }} yellow eyes." # The Lair of the Beast:29 ends here @@ -689,7 +689,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:30]] -@set beast/friendly_actions = "The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] wagging its backend[,| as it seems] happy to see . ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] hoping to play with . ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] flops over in front of wriggling [its back|] on the ground. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] next to you. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] chases butterflies around the [field|meadow|grass|flowers]." +@set beast/friendly_actions = "The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} wagging its backend{{, ^ as it seems}} happy to see . ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} hoping to play with . ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} flops over in front of wriggling {{its back ^ }} on the ground. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} next to you. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} chases butterflies around the {{field ^ meadow ^ grass ^ flowers}}." # The Lair of the Beast:30 ends here @@ -698,7 +698,7 @@ lair # [[file:../../../Dropbox/org/projects/mud.org::*The Lair of the Beast][The Lair of the Beast:31]] -@set beast/ecstatic_actions = "The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] to give a sloppy [kiss|lick]. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] wagging its backend as it seems [|very] excited to see . ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] hoping to play with . ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] flops over in front of happily wriggling on the ground. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] excitedly [thunders|stomps|tramps|clomps|rumbles|rolls] [across the field|across the meadow|over] next to you. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] [happily|joyfully] leaps into air. ;; The [big,|huge,|large,|tremendous,|] [hairy|slobbery|horned|clawed|] [brute|beast|monster] chases butterflies around the [field|meadow|grass|flowers]." +@set beast/ecstatic_actions = "The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} to give a sloppy {{kiss ^ lick}}. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} wagging its backend as it seems {{very ^ }} excited to see . ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} hoping to play with . ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} flops over in front of happily wriggling on the ground. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} excitedly {{thunders ^ stomps ^ tramps ^ clomps ^ rumbles ^ rolls}} {{across the field ^ across the meadow ^ over}} next to you. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} {{happily ^ joyfully}} leaps into air. ;; The {{big, ^ huge, ^ large, ^ tremendous, ^ }} {{hairy ^ slobbery ^ horned ^ clawed ^ }} {{brute ^ beast ^ monster}} chases butterflies around the {{field ^ meadow ^ grass ^ flowers}}." # The Lair of the Beast:31 ends here @@ -1000,7 +1000,7 @@ west # And the bush needs to know the /description/ of the Consumable, so that it can attach that: # [[file:../../../Dropbox/org/projects/mud.org::*Berry Bush][Berry Bush:7]] -@set bush/make_desc = "Bright red berry with flecks of [purple|violet|orange]." +@set bush/make_desc = "Bright red berry with flecks of {{purple ^ violet ^ orange}}." # Berry Bush:7 ends here @@ -1023,7 +1023,7 @@ west # We can either have a single /eat/ message: # [[file:../../../Dropbox/org/projects/mud.org::*Berry Bush][Berry Bush:10]] -@set bush/make_eat_msg = "Sweet and slightly tart. [Delicious|Tangy|Mmmm]." +@set bush/make_eat_msg = "Sweet and slightly tart. {{Delicious ^ Tangy ^ Mmmm}}." # Berry Bush:10 ends here @@ -1031,7 +1031,7 @@ west # Or many messages that can be randomly selected: # [[file:../../../Dropbox/org/projects/mud.org::*Berry Bush][Berry Bush:11]] -@set bush/make_eat_msgs = [ "Sweet and slightly tart.", "[Delicious|Tangy|Mmmm].", "Ooo...that one was sour.", "That was a bit ripe, but still good.", "So sweet with a hint of [orange|maple]." ] +@set bush/make_eat_msgs = [ "Sweet and slightly tart.", "{{Delicious ^ Tangy ^ Mmmm}}.", "Ooo...that one was sour.", "That was a bit ripe, but still good.", "So sweet with a hint of {{orange ^ maple}}." ] # Berry Bush:11 ends here @@ -1039,7 +1039,7 @@ west # Let the user know when they consumed them all. # [[file:../../../Dropbox/org/projects/mud.org::*Berry Bush][Berry Bush:12]] -@set bush/make_finish_msg = "Those were [delicious|great]." +@set bush/make_finish_msg = "Those were {{delicious ^ great}}." # Berry Bush:12 ends here @@ -1097,7 +1097,7 @@ west # Although we can interact with it, let’s not make it obvious that it is an object: # [[file:../../../Dropbox/org/projects/mud.org::*Knocker][Knocker:7]] -@set ring/hidden_tag = hidden_ring +@set ring/hidden_tag = "hidden_ring" # @lock ring = view:tag(hidden_ring) # Knocker:7 ends here @@ -1119,7 +1119,7 @@ west # [[file:../../../Dropbox/org/projects/mud.org::*Knocker][Knocker:9]] @lock ring = tethered:id(#27) # -@set ring/tethered_msg = You put the ring back in the knocker's mouth. "Mmmuufffmm," says the door knocker. +@set ring/tethered_msg = "You put the ring back in the knocker's mouth. \"Mmmuufffmm,\" says the door knocker." # Knocker:9 ends here @@ -1144,7 +1144,7 @@ west # [[file:../../../Dropbox/org/projects/mud.org::*Knocker][Knocker:12]] -@set knocker/room_to_msg = mp03 +@set knocker/room_to_msg = "mp03" # Knocker:12 ends here @@ -1519,7 +1519,7 @@ py here.search("trolley").do_bake() # @set chairs/singular = "an overstuffed chair" # -@set chairs/extra = "This feels [|very|quite] [nice|cozy|comfortable].|n" +@set chairs/extra = "This feels {{ ^ very ^ quite}} {{nice ^ cozy ^ comfortable}}.|n" # Chairs:5 ends here