Fixed the potions when emptied
This commit is contained in:
parent
ec011949ef
commit
4c348e0fb6
2 changed files with 5 additions and 5 deletions
|
|
@ -507,7 +507,7 @@ class CmdRead(Command):
|
||||||
else:
|
else:
|
||||||
tidied = md_to_evennia(buf, reader.is_utf(), width)
|
tidied = md_to_evennia(buf, reader.is_utf(), width)
|
||||||
if prefix:
|
if prefix:
|
||||||
tidied = prefix + "|/" + tidied
|
tidied = prefix + "\n\n" + tidied
|
||||||
EvMore(reader, tidied, session=session,
|
EvMore(reader, tidied, session=session,
|
||||||
justify=True, justify_kwargs={"width": width})
|
justify=True, justify_kwargs={"width": width})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -274,8 +274,6 @@ class Cauldron(Object):
|
||||||
})[0]
|
})[0]
|
||||||
vial.db.amount = 1
|
vial.db.amount = 1
|
||||||
vial.db.spell = potion.db.spell
|
vial.db.spell = potion.db.spell
|
||||||
vial.db.empty_name = "empty vial"
|
|
||||||
vial.db.empty_desc = "Small crystal vial. May have contained a potion."
|
|
||||||
vial.location = maker
|
vial.location = maker
|
||||||
maker.announce_action(f"$You() $conj(fill) a small vial with $pron(your) << stew ^ elixir ^ potion ^ concoction >>.")
|
maker.announce_action(f"$You() $conj(fill) a small vial with $pron(your) << stew ^ elixir ^ potion ^ concoction >>.")
|
||||||
|
|
||||||
|
|
@ -305,8 +303,8 @@ class Cauldron(Object):
|
||||||
"""
|
"""
|
||||||
potion = spawn({
|
potion = spawn({
|
||||||
"typeclass": "typeclasses.alchemy.Potion",
|
"typeclass": "typeclasses.alchemy.Potion",
|
||||||
"key": "laughing potion",
|
"key": "potion",
|
||||||
"desc": "A purple elixir guaranteed to elicit a chuckle or two."
|
"desc": "Small glass vial containing a purple liquid, labeled: |mElixir Risorium|n"
|
||||||
})[0]
|
})[0]
|
||||||
potion.location = self
|
potion.location = self
|
||||||
potion.db.spell = LaughterSpell
|
potion.db.spell = LaughterSpell
|
||||||
|
|
@ -324,6 +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."
|
||||||
|
|
||||||
def do_drink(self, drinker):
|
def do_drink(self, drinker):
|
||||||
"""
|
"""
|
||||||
|
|
@ -333,6 +332,7 @@ class Vial(Container):
|
||||||
drinker.msg("The vial is empty.")
|
drinker.msg("The vial is empty.")
|
||||||
else:
|
else:
|
||||||
drinker.announce_action("$You() $conj(<< down ^ quaff ^ imbibe >>) a small vial.")
|
drinker.announce_action("$You() $conj(<< down ^ quaff ^ imbibe >>) a small vial.")
|
||||||
|
self.do_empty()
|
||||||
drinker.scripts.add(self.db.spell, autostart=True)
|
drinker.scripts.add(self.db.spell, autostart=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue