Fix vial potion bug

Plus some minor enhancements.
This commit is contained in:
Howard Abrams 2025-08-19 16:32:51 -07:00
parent 4c348e0fb6
commit d717e7c852
5 changed files with 58 additions and 105 deletions

View file

@ -322,7 +322,7 @@ class Vial(Container):
""" """
self.db.amount = 0 self.db.amount = 0
self.db.empty_name = "empty vial" self.db.empty_name = "empty vial"
vial.db.empty_desc = "Small crystal vial. May have contained a potion." self.db.empty_desc = "Small crystal vial. May have contained a potion."
def do_drink(self, drinker): def do_drink(self, drinker):
""" """

View file

@ -30,7 +30,8 @@ MSGS = {
"\"You can also |glook trees|n, |glook moss|n, or … well, you get the idea,\" it says.", "\"You can also |glook trees|n, |glook moss|n, or … well, you get the idea,\" it says.",
], ],
"LOOKAT": [ "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 the sea where you can catch obnoxious fish.\"", '"You seem to be getting the hang of this game," chirps the bird. "The game highlights some words, like |Yboulder|n, in yellow. This hints that you should look more closely at them. Also, you can |winteract|n with objects following the line: "You notice"',
"The bird continues, \"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 the sea 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.\"", "\"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.\"", "\"Yes, I could fly myself,\" warbles the little bird, \"but I'm trying to help you get around.\"",
"The bird looks at you expectantly.", "The bird looks at you expectantly.",
@ -39,13 +40,12 @@ MSGS = {
], ],
"MOVE": [ "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.\"", "\"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 also listen to what you say.\"",
"\"Go ahead, just typing |gsay Hello.|n\"", "\"Go ahead, just typing |gsay Hello.|n\"",
'"When you say something," the bird says, "anyone nearby can here it, not just me.'
], ],
"SAY": [ "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.\"", "\"A shortcut to |gsay|n is to type either a double or single quote, and then your message.\"",
"\"You can also use |gemote|n to state something about yourself, \" it says. \" For instance, type |gemote smiles.|n\"", "\"You can also use |gemote|n to state something about yourself, \" it says. \" For instance, type |gemote smiles.|n\"",
"The bird stands on one leg.", "The bird stands on one leg.",

View file

@ -1,84 +1,27 @@
# The Mist Horn # The Mist Horn
# The mist horn calls the boat to the character, no matter where they are. We create one regularly in the witchs hut:
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:1]] # [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:1]]
@create Mist Horn:typeclasses.sailing.CallingHorn @teleport/quiet mp09
# The Mist Horn:1 ends here #
# And a description if someone looks at:
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:2]]
@desc horn = While physical, this curved horn made from the sea mist, has an amorphous quality. Wonder what would happen if you |gblow|n this horn?
# The Mist Horn:2 ends here
# And we will create them regularly in the Homey Hut
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:3]]
py timed_script = evennia.create_script(key="Create Horns", py timed_script = evennia.create_script(key="Create Horns",
typeclass='typeclasses.scripts.CreateHorns', typeclass='typeclasses.scripts.CreateHorns',
interval=14400, # 4 hours? interval=14400, # 4 hours?
start_delay=False, # wait interval before first call start_delay=False, # wait interval before first call
autostart=True, autostart=True,
attributes=[("destination", here)] ) attributes=[("destination", here)] )
# The Mist Horn:3 ends here # The Mist Horn:1 ends here
# The horn will come and go, and this is controlled by a StoryCube: # When a character arrives at the Lazy Dock and wait, the room gives a hint about the horn and the boat occurring.
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:4]] # [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:2]]
@teleport mp06 @set mp06/arrive = "30 ;; gm Did you hear that? Sounds like a distant horn ... Perhaps the wind. ;; gm You think you saw a boat out on the sea ... but maybe not. "
# # The Mist Horn:2 ends here
@create/drop mp06ctl:typeclasses.puzzles.StoryCube
#
@desc mp06ctl = Moves horn to room when character arrives.
#
# To make it invisible, we lock the view:
@lock mp06ctl = view:false()
# The Mist Horn:4 ends here
# When a character arrives at the Lazy Dock and wait, the horn will appear.
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:6]]
# @set mp06ctl/arrive = "25 ;; gm The mists gather over the sea. ;; 5 ;; gm The swirling mists coalesce into a shape of a curved horn. ;; 2 ;; teleport mist horn = Lazy Dock ;; gm The curved horn, now physical, drops to the dock."
#
@set mp06ctl/arrive = "30 ;; gm Did you hear that? Sounds like a distant horn ... Perhaps the wind. ;; gm You think you saw a boat out on the sea ... but maybe not. "
# The Mist Horn:6 ends here
# And lets put the horn /in/ the StoryCube:
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:7]]
@teleport/quiet mist horn = mp06ctl
# The Mist Horn:7 ends here
# And a cleanup command to remove the horn from wherever it is:
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:8]]
@set mp06ctl/cleanup = "@teleport mist horn = me"
# The Mist Horn:8 ends here
# And cleanup:
# [[file:../../../projects/mud-adventure.org::*The Mist Horn][The Mist Horn:9]]
py me.search('mp06ctl').cleanup()
# The Mist Horn:9 ends here
# The Boat # The Boat
# When the boat is docked, we should have a special /state/ to describe it: # When the boat is docked, we should have a special /state/ to describe it:
@ -214,7 +157,7 @@ desc dock = A lazy dock with a comfortable-looking chair and a forest of colossa
# [[file:../../../projects/mud-adventure.org::*The Boat][The Boat:15]] # [[file:../../../projects/mud-adventure.org::*The Boat][The Boat:15]]
py timed_script = evennia.create_script(key="Reset Boat", py timed_script = evennia.create_script(key="boat reset",
typeclass='typeclasses.sailing.ResetBoat', typeclass='typeclasses.sailing.ResetBoat',
interval=14400, interval=14400,
start_delay=False, start_delay=False,
@ -526,7 +469,7 @@ light torch
# [[file:../../../projects/mud-adventure.org::*Puzzle Three][Puzzle Three:6]] # [[file:../../../projects/mud-adventure.org::*Puzzle Three][Puzzle Three:6]]
@set obelisk/say = { r".*\b[Ww]ater\b": "gm Upon uttering that phrase, sparks of octarine magic and mist appear on the opening on the obelisk. ;; gm A blue medal materializes in the opening. You snatch it, claiming your prize. ;; gift_all blue ;; gm You also notice a secret door! ;; tag_all hidden_antechamber_door" } @set obelisk/say = { r".*\b[Ww]ater\b": "gm Upon uttering that phrase, sparks of octarine magic and mist appear on the opening on the obelisk. ;; gm A blue medal materializes in the opening. You inspect it, wondering if this is the great prize you've heard about. ;; gift_all blue ;; gm You also notice a secret door! ;; tag_all hidden_antechamber_door" }
# Puzzle Three:6 ends here # Puzzle Three:6 ends here
# Puzzle Four # Puzzle Four
@ -579,45 +522,54 @@ light torch
# We need another door in order to escape. # Lets reward our players again:
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:6]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:6]]
@set gr04/arrive = "4 ;; gm ... You hear a distant dice roll ... ;; gm With your excellent perception, you notice some gold coins hidden in the floor's dust. ;; gm You don't hesitate to relocate those to your pouch. ;; coin_all 10 "
# Puzzle Four:6 ends here
# We need another door in order to escape.
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:7]]
@detail plaque = Through the green patina, you can barely make out the text:|/ @detail plaque = Through the green patina, you can barely make out the text:|/
A spoken word unseals me. A spoken word unseals me.
It starts with a T. It starts with a T.
Halfway between twins. Halfway between twins.
The next character lies. The next character lies.
# Puzzle Four:6 ends here # Puzzle Four:7 ends here
# The door leads back out. # The door leads back out.
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:7]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:8]]
@open ornate door;door = Lonely Island @open ornate door;door = Lonely Island
# Puzzle Four:7 ends here # Puzzle Four:8 ends here
# The dock is locked: # The dock is locked:
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:8]]
@lock ornate door = traverse:tag(open_ornate_door)
# Puzzle Four:8 ends here
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:9]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:9]]
@set ornate door/err_traverse = "The door is locked." @lock ornate door = traverse:tag(open_ornate_door)
# Puzzle Four:9 ends here # Puzzle Four:9 ends here
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:10]]
@set ornate door/err_traverse = "The door is locked."
# Puzzle Four:10 ends here
# Look at the grid to find the two Ts: # Look at the grid to find the two Ts:
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:10]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:11]]
@desc ornate door = The grid of letters look like:|/ @desc ornate door = The grid of letters look like:|/
| Y | B | Q | X | D | Q | | Y | B | Q | X | D | Q |
| Y | A | K | D | X | B | | Y | A | K | D | X | B |
@ -628,35 +580,35 @@ light torch
| H | X | R | G | R | X | | H | X | R | G | R | X |
| K | S | M | U | T | N | | K | S | M | U | T | N |
| W | X | M | W | Z | Z | | W | X | M | W | Z | Z |
# Puzzle Four:10 ends here # Puzzle Four:11 ends here
# We use a =StoryCube= to lock the door until the password is said: # We use a =StoryCube= to lock the door until the password is said:
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:11]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:12]]
@create/drop gr04ctl:typeclasses.puzzles.StoryCube @create/drop gr04ctl:typeclasses.puzzles.StoryCube
# #
@desc gr04ctl = Opens the door when someone says Tidal Surge @desc gr04ctl = Opens the door when someone says Tidal Surge
# #
@lock gr04ctl = view:false() @lock gr04ctl = view:false()
# Puzzle Four:11 ends here # Puzzle Four:12 ends here
# If they say, /Tidal Surge/, the *Locker* unlocks the door, and they can go through. # If they say, /Tidal Surge/, the *Locker* unlocks the door, and they can go through.
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:12]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:13]]
@set gr04ctl/say = {r"^tidal ?surge.*": "gm You hear an audible click from the ornate door! ;; tag_all open_ornate_door"} @set gr04ctl/say = {r"^tidal ?surge.*": "gm You hear an audible click from the ornate door! ;; tag_all open_ornate_door"}
# Puzzle Four:12 ends here # Puzzle Four:13 ends here
# And the description of passing through: # And the description of passing through:
# [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:13]] # [[file:../../../projects/mud-adventure.org::*Puzzle Four][Puzzle Four:14]]
@set ornate door/traverse_msg = "You open the door, and see that the door exits next to the statue..." @set ornate door/traverse_msg = "You open the door, and see that the door exits next to the statue..."
# Puzzle Four:13 ends here # Puzzle Four:14 ends here

View file

@ -210,25 +210,23 @@ cramped_kitchen:
secret_room: secret_room:
narrative: >- narrative: >-
The << wee ^ small >> << demon ^ imp ^ helper >> The << wee ^ small ^ tiny >> << demon ^ imp ^ helper >>
<< perched ^ roosting ^ poised >> on its iron stand looks << perched ^ roosting ^ poised >> on its iron stand looks
<< curiously ^ quizically ^ inquisitively >> at you. |/|/ << curiously ^ quizically ^ inquisitively >> at you. |/|/
You << then ^ >> hear a voice in your head. The creature raises an eyebrow as you << then ^ >> hear a voice in your head...
"<< Wondering I see. ^ Curious? ^ Overwhelmed? >> {0}" "<< Wondering I see. ^ Curious? ^ Overwhelmed? ^ Confused ^ >> {0}"
hints: hints:
default: >- default: >-
Can't figure out how to use the |Ycauldron|n and the |Ytools|n Can't figure out how to use the |Ycauldron|n and the |Ytools|n
in this secret alchemical lab to creation |Ypotions|n? in this secret alchemical lab to creation |Ypotions|n?
Here you can learn to bewitch the mind and ensnare the senses, Here you can learn to bewitch the mind and ensnare the senses,
bottle fame, brew glory and even put a stopper in death. bottle fame, brew glory and even put a stopper in |Ydeath|n.
death: death:
WHAT DID YOU SAY? You see, to stop death, you simply need to..."|/|/
Wʜᴀᴛ ᴅɪᴅ Y ꜱᴀʏ?|/|/
The small imp squeaks, and attempts to be small. The small imp squeaks, and attempts to be small.|/|/
Rᴇᴍᴇᴍʙᴇʀ WHO ʜᴀꜱ ᴛʜᴇ Uʟᴛɪᴍᴀᴛᴇ Sᴀʏ ᴀʀᴏᴜɴᴅ ʜᴇʀᴇ|/|/
REMEMBER WHO HAS THE ULTIMATE SAY AROUND HERE. The perched imp nods emphatically, "Yes, sir.
The perched imp nods emphatically.
potions: >- potions: >-
Find the potions and their |Yingredients|n in the grimoire... er, Find the potions and their |Yingredients|n in the grimoire... er,
large brown |Ybook|n there. I suggest, making the potions |win order|n. large brown |Ybook|n there. I suggest, making the potions |win order|n.

View file

@ -777,7 +777,7 @@ send "pet beastie\n"
expectit "beastie" expectit "beastie"
send "feed beastie\n" send "feed beastie\n"
expectit "Wee beastie doesn't appear interested in anything you have." expectit "beastie doesn't appear interested in anything you have."
send "kitchen\n" send "kitchen\n"
expectit "Cramped Kitchen" expectit "Cramped Kitchen"
@ -1042,6 +1042,9 @@ expectit "making it ready"
send "bottle\n" send "bottle\n"
expectit "You fill a small vial" expectit "You fill a small vial"
send "inventory\n"
expectit "vial"
send "empty\n" send "empty\n"
# Since almost anything can be written, we look for a period # Since almost anything can be written, we look for a period
expectit "." expectit "."
@ -1052,8 +1055,8 @@ expectit "The black cauldron is already empty."
send "up\n" send "up\n"
expectit "Cozy House" expectit "Cozy House"
send "give laughing potion to gnome\n" send "give potion to gnome\n"
expectit "You give a laughing potion" expectit "You give a potion"
# Close the log file # Close the log file
log_file log_file