Enhanced the Trippy Potion

Fixed spelling mistakes (oh boy)
This commit is contained in:
Howard Abrams 2026-04-28 22:44:06 -07:00
parent c7683deac3
commit cbdae3a702
5 changed files with 94 additions and 35 deletions

View file

@ -27,8 +27,9 @@ an active, not passive voice, You never refer to yourself using the
words "I" or "me", and instead refer to yourself as "Sebastian". words "I" or "me", and instead refer to yourself as "Sebastian".
Its knowledge: Land-walkers (what it calls humans and most other Its knowledge: Land-walkers (what it calls humans and most other
fantasy creatures that can't fly) sail across the sea on a boat. To fantasy creatures that can't fly) sail across the sea on a boat.
call the boat, one needs to blow into a horn. It isn't sure The boat looks like a giant leaf.
To call the boat, one needs to blow into a horn. It isn't sure
where they get the horns, but maybe the wise woman that flies may where they get the horns, but maybe the wise woman that flies may
know. The wise woman lives in a tall nest in a land where there are lots of know. The wise woman lives in a tall nest in a land where there are lots of
juicy insects. Her nest (what others would call a home) is large enough to sit on three dead trees. juicy insects. Her nest (what others would call a home) is large enough to sit on three dead trees.

View file

@ -171,6 +171,7 @@ class Cauldron(Object):
Also randomly return a funny emptying message. Also randomly return a funny emptying message.
""" """
if self.contents == []: if self.contents == []:
if maker:
maker.msg(f"The {self.name} is already empty.") maker.msg(f"The {self.name} is already empty.")
return return
@ -268,10 +269,12 @@ class Cauldron(Object):
If the contents are viable, let's create a vial. If the contents are viable, let's create a vial.
""" """
potion = self.has_potion() potion = self.has_potion()
if not potion: if potion:
self.do_make(maker, potion)
else:
maker.msg("The cauldron doesn't have a potion to bottle. Perhaps, you need to |gcreate|n one first?") maker.msg("The cauldron doesn't have a potion to bottle. Perhaps, you need to |gcreate|n one first?")
return
def do_make(self, maker, potion):
vial = spawn({ vial = spawn({
"typeclass": "typeclasses.alchemy.Vial", "typeclass": "typeclasses.alchemy.Vial",
"key": potion.name, "key": potion.name,
@ -394,7 +397,10 @@ class LaughterSpell(Spell):
self.repeats = 15 # repeat only a certain number of times self.repeats = 15 # repeat only a certain number of times
self.start_delay = True # wait self.interval until first call self.start_delay = True # wait self.interval until first call
def at_repeat(self): def at_stop(self, **kwargs):
self.delete()
def at_repeat(self, **kwargs):
""" """
This gets called every self.interval seconds. We make This gets called every self.interval seconds. We make
a random check here so as to only return 33% of the time. a random check here so as to only return 33% of the time.
@ -414,10 +420,10 @@ class LaughterSpell(Spell):
"$You() $conj(let) out a series of high-pitched giggles, each one bubbling up like a fizzy drink, light and infectious.", "$You() $conj(let) out a series of high-pitched giggles, each one bubbling up like a fizzy drink, light and infectious.",
"$You() $conj(burst) into cackling laughter, the sharp, gleeful sound that echo off the walls.", "$You() $conj(burst) into cackling laughter, the sharp, gleeful sound that echo off the walls.",
"$You() $conj(find) yourself wheezing with laughter, gasping for air as the hilarity overwhelms you, tears streaming down your cheeks.", "$You() $conj(find) yourself wheezing with laughter, gasping for air as the hilarity overwhelms you, tears streaming down your cheeks.",
"$You() $conj(break) into a fit of snorting giggles; you try to surpress them to no avail.", "$You() $conj(break) into a fit of snorting giggles; $pron(you) $conj(try) to suppress them to no avail.",
"$You() $conj(let) out a tinkling laugh, a melodic sound that dances through the air, bringing a sense of whimsy to the moment.", "$You() $conj(let) out a tinkling laugh, a melodic sound that dances through the air, bringing a sense of whimsy to the moment.",
"$You() $conj(roar) with laughter, a booming sound that resonates with joy.", "$You() $conj(roar) with laughter, a booming sound that resonates with joy.",
"$You() $conj(chuckle) softly, a warm and genuine sound that reflects your delight.", "$You() $conj(chuckle) softly, a warm and genuine sound that reflects $pron(your) delight.",
"$You() $conj(giggle) uncontrollably, making it hard for $pron(you) to catch $pron(your) breath.", "$You() $conj(giggle) uncontrollably, making it hard for $pron(you) to catch $pron(your) breath.",
"$You() $conj(let) a stifled chuckle, unsure what became so humorous.", "$You() $conj(let) a stifled chuckle, unsure what became so humorous.",
])) ]))
@ -433,7 +439,10 @@ class DrugtripSpell(Spell):
self.repeats = 4 # repeat only a certain number of times self.repeats = 4 # repeat only a certain number of times
self.start_delay = True # wait self.interval until first call self.start_delay = True # wait self.interval until first call
def at_repeat(self): def at_stop(self):
self.delete()
def at_repeat(self, **kwargs):
""" """
This gets called every self.interval seconds. We make This gets called every self.interval seconds. We make
a random check here so as to only return 33% of the time. a random check here so as to only return 33% of the time.
@ -447,20 +456,45 @@ class DrugtripSpell(Spell):
and another message to the other people in the room. and another message to the other people in the room.
""" """
you_msg, other_msg = choice([ you_msg, other_msg = choice([
("You feel your bones turn into hollow reeds. A warm breeze blows through your ribs, playing a hauntingly beautiful flute melody that tastes like honey.", (
"""You catch a glimpse of a monstrous creature hovering ominously into view, its spherical body covered in a mottled, iridescent skin that shifts colors like a living kaleidoscope! Its eyestalks, each ending in a glimmering orb, swivel independently, scan the surroundings with a predatory gaze, while its central eyes stares at you... ;;
It unleashes its disintegration ray, a brilliant beam of energy erupting from one of its eyes, slicing through the air with a crackling intensity that seems to warp reality itself, leaving a trail of shimmering particles in its wake! ;;
The ray engulfs you in a radiant light, dissolving the boundaries of individuality and merging your essence with the cosmos, revealing a profound interconnectedness that transcends existence itself.
""",
"""$You() suddenly $conj(crouch) down, staring wide-eyed. ;; $You() screams and falls to the ground! ;; Pitiful whimpering sounds $conj(escape) from $you(), as $pron(you) $conj(lay) in a fetal ball."""
),
("""
The suddenly find the air thick with the scent of blooming flowers, as a soft, melodic whisper beckons you. You want to follow, but not sure where the whispers come from... ;;
You see a luminescent creature flit by...a butterfly with wings like stained glass!
The colorful butterfly lands near your feet and grows as large as you. It then removes its mask revealing the face of an old man. \"Vezof is jēda, se vestri est vestri,\" it says before flying off.
""",
"""$You() $conj(spin) around in circles as if looking for something. ;;
Following an invisible trail through the air, $you() $conj(stare) wide eye.;;
The look of confusion and horror on $pron(your) face, as $you() stare straight ahead...unblinking.
"""),
("""You hear a languid, sleepy voice say, \"Skoros nūm?\" Turning around, you see a large caterpillar smoking a hookah on a mushroom cap. ;;
The caterpillar shakes its head and continues smoking, blowing large smoke rings into the air. ;;
The caterpillar yawns, and then asks, \"Vezof?\" ;;
As the caterpillar crawls off, it says, \"Er haer indóme care-tye alta. Bo haer indóme care-tye ince.\"
""",
"""$You() quickly $conj(turn) around to stare at empty space. ;; Trying to catch invisible eddies in the air, $you() $conj(jump) around. ;; $You() $conj(stretch) and $conj(yawn). ;; $You() $conj(say) to nothing in particular, "Er haer indóme care-tye alta. Bo haer indóme care-tye ince." """
),
("You feel your bones turn to hollow reeds. A warm breeze blows through your ribs, playing a hauntingly beautiful flute melody that tastes like honey.",
"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 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 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\" 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.\""), "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.\"", ("Your shadow stretches and detaches itself. It seems to stare at you with its hands on its hips. ;; It grows a mouth, and begins whispering to you, \"The trees once had names, but they've forgotten them. Now they desperately want to steal your name, so never use your real name in 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.\""), "You see the $you() staring intently at the floor...$pron(your,sp) mouth agape. ;; 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.\""),
("You feel yourself stretch and grow, breaking out of the area you knew to reach for the sky. You are a gargantuan giant! Every step feels like it should crush a mountain; you move slowly to avoid destroying the trees.", ("You feel yourself stretch and grow, breaking out of the area you knew to reach for the sky. You are a gargantuan giant! Every step feels like it should crush a mountain; you move slowly to avoid destroying the trees.",
"You see the $you() moving in extreme slow-motion, lifting $pron(your,sp) feet two feet high for every step and looking down at something on the ground with intense pity."), "You see the $you() moving in extreme slow-motion, lifting $pron(your,sp) feet two feet high for every step and looking down at something on the ground with intense pity."),
("With loud squawk, you see your hands turn into a pair of bickering, multicolored pheasants! $pron(You,Sp) painfully start to fly away in opposite directions.", ("With loud squawk, you see your hands turn into a pair of bickering, multicolored pheasants! They painfully start to fly away in opposite directions.",
"You see the $you() shove $pron(your,sp) hands deep into $pron(your,sp) armpits, hunched over and making muffled, frantic clucking noises while $pron(your,sp) elbows flap wildly."), "You see the $you() shove $pron(your) hands deep into $pron(your) armpits, hunched over and making muffled, frantic clucking noises while $pron(your) elbows flap wildly."),
("Thousands of tiny, glowing yellow spiders start weaving a suit of |wGlimmer-Silk|n onto your body. You feel the itch of a thousand needles. Ah, but this silk suit will be wonderful when they are done.", ("Thousands of tiny, glowing yellow spiders start weaving a suit of |wGlimmer-Silk|n onto your body. You feel the itch of a thousand needles. Ah, but this silk suit will be wonderful when they are done.",
"You see the $you() begin frantically stripping off $pron(your,sp) clothes, shouting that $pron(your,sp) clothes are \"smothering the velvet.\""), "You see the $you() begin frantically stripping off $pron(your,sp) clothes, shouting that $pron(your,sp) clothes are \"smothering the velvet.\""),
@ -471,8 +505,11 @@ class DrugtripSpell(Spell):
("Your mind is clear, as you realize you've been playing a character in some play this whole time...wearing green tights and a tunic. You also know the |waudience|n has been watching you from behind the trees, and you feel the need to give them a performance of a lifetime. ", ("Your mind is clear, as you realize you've been playing a character in some play this whole time...wearing green tights and a tunic. You also know the |waudience|n has been watching you from behind the trees, and you feel the need to give them a performance of a lifetime. ",
"You see the $you() break into a booming, theatrical monologue, \"If we shadows have offended, think but this, and all is mended! That you have but slumbered here while these visions did appear. And this weak and idle theme, no more yielding but a dream! Gentles, do not reprehend: if you pardon, we will mend!\" $pron(You,sp) then takes a big bow."), "You see the $you() break into a booming, theatrical monologue, \"If we shadows have offended, think but this, and all is mended! That you have but slumbered here while these visions did appear. And this weak and idle theme, no more yielding but a dream! Gentles, do not reprehend: if you pardon, we will mend!\" $pron(You,sp) then takes a big bow."),
]) ])
self.obj.msg(you_msg) you_msg += ";;" + choice([
self.obj.announce_action(other_msg, self.obj) "Your << world ^ reality ^ clarity >> returns, and you feel << back to ^ >> normal.",
delay(10, self.obj.msg, "You << snap back ^ re-fade back >> to your << old ^ original >> << self ^ mind >>."
choices("""Your << world ^ reality ^ clarity >> returns, and you feel << back to ^ >> normal. ;; You << snap back ^ re-fade back >> to your << old ^ original >> << self ^ mind >>.""" ])
)) other_msg += ";; $You() << $conj(blink) ^ $conj(snap) back ^ $conj(come) to >>."
self.obj.priv_sequence(you_msg, 15)
self.obj.spell_sequence(None, other_msg, 15, self.obj)

View file

@ -533,28 +533,40 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
newmsg = sub(r"\$pron\(([^\)]*?),([^\)]*?)\)", newmsg = sub(r"\$pron\(([^\)]*?),([^\)]*?)\)",
f"$pron(\\1,\\2 {self.db.gender})", f"$pron(\\1,\\2 {self.db.gender})",
message, flags=IGNORECASE) message, flags=IGNORECASE)
logger.info(f"Start with {newmsg}")
# While $pron(you) will render "you" and "he": # While $pron(you) will render "you" and "he":
newmsg = sub(r"\$pron\(([^,\)]*?)\)", newmsg = sub(r"\$pron\(([^,\)]*?)\)",
f"$pron(\\1, {self.db.gender})", f"$pron(\\1, {self.db.gender})",
newmsg, flags=IGNORECASE) newmsg, flags=IGNORECASE)
# logger.info(f"Start with '{message}' to '{newmsg}'")
choose = choices(newmsg) choose = choices(newmsg)
logger.info(choose) self.location.msg_contents(choose, from_obj=self, exclude=exclude)
self.location.msg_contents(f"{choose}", from_obj=self, exclude=exclude)
def spell_sequence(self, location, messages, time_delay=1): def priv_sequence(self, messages, time_delay=2):
"""
Send messages (separated by ';;')
to this character in a delayed sequence.
"""
for idx, msg in enumerate(messages.split(';;')):
delay(time_delay * idx, self.msg, routput(msg))
def spell_sequence(self, location, messages, time_delay=1,
exclude=None):
""" """
Send one or more messages to 'location' with a delay. Send one or more messages to 'location' with a delay.
If the 'location' is None, then send it to the room the If the 'location' is None, then send it to the room the
character is in. character is in.
""" """
if isinstance(messages, str):
messages = messages.split(";;")
for idx, msg in enumerate(messages): for idx, msg in enumerate(messages):
if location: if location:
delay(time_delay * idx, location.msg_contents, routput(msg)) delay(time_delay * idx, location.msg_contents, routput(msg))
else: else:
delay(time_delay * idx, self.announce_action, msg) delay(time_delay * idx, self.announce_action, msg, exclude)
def do_fly(self, location): def do_fly(self, location):
""" """

View file

@ -403,9 +403,13 @@ class Witch(ChatBot):
self.leave() self.leave()
else: else:
# Let's go out for a bit ... # Let's go out for a bit ...
r = randint(100)
if r < 3:
destination = "Cozy House"
elif r < 12:
destination = "Wyldwood Bar",
else:
destination = choice([ destination = choice([
"Cozy House",
"Wyldwood Bar",
"mp15", # Shore "mp15", # Shore
"Frog Meadow", "Frog Meadow",
"Boulder Top", "Boulder Top",

View file

@ -174,7 +174,7 @@ class Fire(Pet):
if self.db.hunger_level < 5: if self.db.hunger_level < 5:
giver.announce_action(f"$You() {get_up} $conj(start) a fire.") giver.announce_action(f"$You() {get_up} $conj(start) a fire.")
else: else:
giver.announce_action(f"$You() {get_up} << $conj(feed) ^ put {adj} wood on >> the fire << in the fireplace ^ >>.") giver.announce_action(f"$You() {get_up} << $conj(feed) ^ $conj(put) {adj} wood on >> the fire << in the fireplace ^ >>.")
def feed(self, giver, obj=None): def feed(self, giver, obj=None):
""" """
@ -500,7 +500,7 @@ class WeeBeastie(Friendly, Familiar, Listener, AI):
delay(4, self.location.msg_contents, delay(4, self.location.msg_contents,
choices(""" choices("""
The << wee ^ >> beastie << jumps ^ leaps ^ hops >> << up ^ >> on the back of << an overstuffed ^ a >> chair, and << bobs it head ^ purrs >>. ;; The << wee ^ >> beastie << jumps ^ leaps ^ hops >> << up ^ >> on the back of << an overstuffed ^ a >> chair, and << bobs it head ^ purrs >>. ;;
A << white ^ >> ball of furr << jumps ^ leaps ^ hops >> down from a chair and climbs up the << old ^ >> gnome to get close<< to his face ^ >>.""")) A << white ^ >> ball of fur << jumps ^ leaps ^ hops >> down from a chair and climbs up the << old ^ >> gnome to get close<< to his face ^ >>."""))
else: else:
delay(4, self.location.msg_contents, delay(4, self.location.msg_contents,
choices(f""" choices(f"""
@ -564,13 +564,18 @@ class WeeBeastie(Friendly, Familiar, Listener, AI):
feeder.msg(msg) feeder.msg(msg)
class BHB(Friendly): class BHB(Friendly, Listener, AI):
def return_appearance(self, looker): def return_appearance(self, looker):
if self.db.is_awake: if self.db.is_awake:
return super().return_appearance(looker) return super().return_appearance(looker)
else: else:
return "It currently slumbers on its huge mattress." return "It currently slumbers on its huge mattress."
def other_sayto(self, speaker, speech):
"Override to return a string in response to message."
reply = self.think(speaker, speech)
self.process_thoughts(reply)
def update_state(self, *args, **kwargs): def update_state(self, *args, **kwargs):
msg = None msg = None
wake_hour = self.db.wake_hour or 8 wake_hour = self.db.wake_hour or 8