From 8092b87fac1bbc74ea47afc484f1db4bb2991775 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Wed, 22 Apr 2026 22:18:10 -0700 Subject: [PATCH] Minor bugs --- typeclasses/alchemy.py | 6 +++--- typeclasses/chatbots.py | 2 +- typeclasses/scripts.py | 3 +++ typeclasses/sittables.py | 18 +++++++++--------- world/hints.yaml | 4 ++-- world/test-run.exp | 19 ++++++++++++++----- world/version1.ev | 17 +++++++++++++---- 7 files changed, 45 insertions(+), 24 deletions(-) diff --git a/typeclasses/alchemy.py b/typeclasses/alchemy.py index 816c804..d1c2795 100755 --- a/typeclasses/alchemy.py +++ b/typeclasses/alchemy.py @@ -382,7 +382,7 @@ class Potion(Object): # Scripts that emulate the effects of Potions # ---------------------------------------------------------------------- -class LaughterSpell(Script): +class LaughterSpell(Spell): """ This class defines the script itself """ @@ -419,7 +419,7 @@ class LaughterSpell(Script): "$You() $conj(let) a stifled chuckle, unsure what became so humorous.", ])) -class DrugtripSpell(Script): +class DrugtripSpell(Spell): """ This class defines the script itself """ @@ -448,7 +448,7 @@ class DrugtripSpell(Script): "You see the $you() stand perfectly still, emitting a loud, melodic whistling sound from $pron(your,sp) nostrils that may attract a confused songbird."), ("You are standing on the ceiling of the sky. The fluffy clouds are surprisingly firm, like soft islands, you must hop across to avoid falling. \"Be quiet,\" you whisper to yourself, \"Don't wake the cloud people.\"", - "You see the $you() frantically \"climbing\" a nearby tree, though $pron(you,sp) is doing it upside down and backward with terrifying, twitchy agility. \"Be quiet,\" $pron(you,sp) say, \"Don't wake the cloud people.\""), + "You see the $you() frantically \"climbing\" on everything around...though $pron(you,sp) is doing it upside down and backward with terrifying, twitchy agility. \"Be quiet,\" $pron(you,sp) says, \"Don't wake the cloud people.\""), ("Your shadow stretches and detaches itself, grows a mouth, and begins whispering to you, \"The trees once had names, but $pron(you,sp)'ve forgotten them. Now $pron(you,sp) desperately want to steal your name, so never use your real name to the woods.\"", "You see the $you() engaged in a heated, whispered argument with the ground at $pron(your,sp) feet, eventually pointing a finger and ordering $pron(your,sp) own shadow to \"stay.\""), diff --git a/typeclasses/chatbots.py b/typeclasses/chatbots.py index 6479ef0..cba268a 100755 --- a/typeclasses/chatbots.py +++ b/typeclasses/chatbots.py @@ -152,7 +152,7 @@ class Witch(ChatBot): dest = self.search("mp04", global_search=True) delay(2, self.move_to, dest) delay(4, dest.msg_contents, - "The old lady hops on her broomstick and flies away.\"") + "The old lady hops on her broomstick and flies away.") hut = self.search("mp09", global_search=True) delay(5, self.move_to, hut, quiet=True) diff --git a/typeclasses/scripts.py b/typeclasses/scripts.py index d351f88..f3f062c 100644 --- a/typeclasses/scripts.py +++ b/typeclasses/scripts.py @@ -155,6 +155,9 @@ class CreateHorns(Script): """ Script to create calling horns. """ + def at_start(self, **kwargs): + self.at_repeat() + def at_repeat(self, **kwargs): hut = self.attributes.get("destination") results = hut.search('horn', location=hut, quiet=True) diff --git a/typeclasses/sittables.py b/typeclasses/sittables.py index 10d36b4..5242e37 100755 --- a/typeclasses/sittables.py +++ b/typeclasses/sittables.py @@ -18,12 +18,12 @@ class Sittable(Object): extra = self.db.extra or "" if self.multiple: - return routput(f"You sit {adjective} one of {article} {self.key}. {extra}") + return routput(f"$You() $conj(sit) {adjective} one of {article} {self.key}. {extra}") else: - return routput(f"You sit {adjective} {article} {self.key}. {extra}") + return routput(f"$You() $conj(sit) {adjective} {article} {self.key}. {extra}") def stand_msg(self): - return f"You stand up from {self.key}." + return f"$You() $conj(stand) up from {self.key}." def do_sit(self, sitter): """ @@ -55,10 +55,10 @@ class Sittable(Object): self.db.sitter = sitter sitter.db.is_sitting = self sitter.score(Scores.moss_sit) - if self.multiple: - sitter.announce_action(f"$You() $conj(sit) {adjective} one of {article} {self.key}.") + if self.db.response: + sitter.announce_action(self.db.response) else: - sitter.announce_action(f"$You() $conj(sit) {adjective} {article} {self.key}.") + sitter.announce_action(self.sit_msg()) sitter.location.other_sit(sitter) for puppet in sitter.puppets_here("other_sit"): @@ -79,7 +79,7 @@ class Sittable(Object): else: self.db.sitter = None del stander.db.is_sitting - stander.msg(self.stand_msg()) + stander.announce_action(self.stand_msg()) stander.location.other_stand(stander) for puppet in stander.puppets_here(): @@ -98,10 +98,10 @@ class Sittables(Sittable): singular = self.db.singular or default extra = self.db.extra or "" - return routput(f"You sit {adjective} {singular}. {extra}") + return routput(f"$You() $conj(sit) {adjective} {singular}. {extra}") def stand_msg(self): article = self.db.article or "the" default = f"{article} {self.db.name}" singular = self.db.singular or default - return f"You stand up from {singular}." + return f"$You() $conj(stand) up from {singular}." diff --git a/world/hints.yaml b/world/hints.yaml index 5c915fd..d605171 100644 --- a/world/hints.yaml +++ b/world/hints.yaml @@ -77,7 +77,7 @@ glittering_glade: A << yellow ^ orange ^ large ^ >> butterfly lands on your shoulder. "You look like you << could use some ^ need ^ would like some >> help," it says, "{0}" As it flies away, it says, "Good - luck!" ;; + luck!" hints: default: >- To get through that |Ydoor|n, you'll need to figure out the |Ypassword|n. @@ -154,7 +154,7 @@ lazy_dock: default: >- Docks are good for |Yfishing|n and traveling by |Yboat|n. fishing: >- - If you dare catch a |Yfish|n, use repeat the commands |gcast|n + If you dare catch a |Yfish|n, repeat the commands |gcast|n and |greel|n. fish: You can get rid of obnoxious fish using the |gthrow|n command. boat: A magical boat appears here, but only if you |Ycall|n it. diff --git a/world/test-run.exp b/world/test-run.exp index 100df0b..4bbe5d6 100755 --- a/world/test-run.exp +++ b/world/test-run.exp @@ -71,10 +71,16 @@ if {$create eq "true"} { send "A short, skinny goblin wearing a dirty tunic cinched with an elaborate belt bejeweled with gems and gold filigree. Unclear whether his green ears or nose are longer, but surely it must be the few hairs he combs over on top of his head.\n" expectit "Enter a name here to check if it's available." - send "Poach\n" + send "Speedy Gonzoblin\n" expectit "Shall I create your character" send "y\n" +} else { + send "sdesc spry goblin\n" + expectit "sdesc was set" + + send "pose zipping about\n" + expectit "Pose will read" } if {[string match "tutor*" $tutorial]} { @@ -415,7 +421,10 @@ send "get table\n" expectit "too big" send "hint\n" -expectit "So try to talk to it." +expectit "To get through that" + +send "hint password\n" +expectit "Don't abandon hope." send "blue door\n" expectit "The door seems locked" @@ -665,7 +674,7 @@ send "look waves\n" expectit "Despite the inclement weather, the waves ripple gently against the shore." send "look lavender sea\n" -expectit "you see sailing in the distance?" +expectit "you see sailing" send "look boat\n" expectit "The mastless ship looks like a giant leaf. Wonder if it comes to shore?" @@ -1015,7 +1024,7 @@ expectit "gives you a pipe" set timeout 20 send "sit\n" -expectit "You sit on the long log" +expectit "You sit on the log" send "copse\n" expectit "Bedroom" @@ -1036,7 +1045,7 @@ send "climb boulder\n" expectit "Boulder Top" # Elixir Risorium ... Laughing Potion ... -send "look mshrooms\n" +send "look mushrooms\n" expectit "A vibrant patch of mushrooms bursts forth like a painter's palette, each cap shimmering with iridescent hues of violet, emerald, and gold" diff --git a/world/version1.ev b/world/version1.ev index d4b319b..86b2d1f 100644 --- a/world/version1.ev +++ b/world/version1.ev @@ -835,14 +835,23 @@ py me.search("squirrel").backstory("squirrel") -# And a trim on the things to see: +# And a better description when sitting down: # [[file:../../../projects/mud.org::*Mattress][Mattress:6]] +@set mattress/response = "$You() $conj(sit) on the large mattress." +# Mattress:6 ends here + + + +# And a trim on the things to see: + + +# [[file:../../../projects/mud.org::*Mattress][Mattress:7]] @lock mattress = view:tag(hidden_mattress) # @set mattress/hidden_tag = "hidden_mattress" -# Mattress:6 ends here +# Mattress:7 ends here # Part of the [[Potions and their Ingredients][Alchemist Path]], we use /dream mushrooms/ to create a [[Trippy Potion]]. @@ -1979,7 +1988,7 @@ py me.search("heron").backstory("heron") # [[file:../../../projects/mud.org::*Reed Sculpture][Reed Sculpture:3]] py timed_script = evennia.create_script(key="Create Horns", typeclass='typeclasses.scripts.CreateHorns', - interval=14400, + interval=600, start_delay=False, autostart=True, attributes=[("destination", here)] ) @@ -3710,7 +3719,7 @@ py here.search("cabinet").do_bake() # [[file:../../../projects/mud.org::*Secret Room][Secret Room:1]] @teleport/quiet mp03 # -@dig Secret Room;mp12:typeclasses.rooms_dark.DarkRoom = stairs behind bookcase;down;down stairs;secret passage;bookcase,up the stairs;stairs;leave;up +@dig Secret Room;mp12:typeclasses.rooms_dark.DarkRoom = stairs behind bookcase;down;down stairs;secret passage;bookcase;passage,up the stairs;stairs;leave;up # Secret Room:1 ends here