Expand and fix the cocktails
This commit is contained in:
parent
4bee4036a9
commit
428fa8334b
1 changed files with 88 additions and 24 deletions
|
|
@ -128,6 +128,7 @@ class Teapot(Object):
|
||||||
COCKTAILS = [
|
COCKTAILS = [
|
||||||
{
|
{
|
||||||
"title": "Moonlit Mirage",
|
"title": "Moonlit Mirage",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A shimmering, colorful drink, garnished with glitter and a twist of tart, almost sour fruit.",
|
"desc": "A shimmering, colorful drink, garnished with glitter and a twist of tart, almost sour fruit.",
|
||||||
"flavors": ["lemon", "tartness", "sweetness"],
|
"flavors": ["lemon", "tartness", "sweetness"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -137,6 +138,7 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Puck's Revenge",
|
"title": "Puck's Revenge",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A vibrant concoction of fruit juices and sparkling fairy dust, served in a glass shaped like a flower.",
|
"desc": "A vibrant concoction of fruit juices and sparkling fairy dust, served in a glass shaped like a flower.",
|
||||||
"flavors": ["fruity", "... fairy dust?"],
|
"flavors": ["fruity", "... fairy dust?"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -146,12 +148,14 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Glimmering Gossamer",
|
"title": "Glimmering Gossamer",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A delicate blend of elderflower liqueur and sparkling wine, adorned with a butterfly-shaped ice cube.",
|
"desc": "A delicate blend of elderflower liqueur and sparkling wine, adorned with a butterfly-shaped ice cube.",
|
||||||
"flavors": ["elderflower"],
|
"flavors": ["elderflower"],
|
||||||
"effects": ["The butterfly shaped ice cube just started fluttering, and flew away."]
|
"effects": ["The butterfly shaped ice cube just started fluttering, and flew away."]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Whimsical Willow",
|
"title": "Whimsical Willow",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A herbal infusion of gin, rosemary, and elderberry, served with a sprig of fresh mint and a splash of tonic.",
|
"desc": "A herbal infusion of gin, rosemary, and elderberry, served with a sprig of fresh mint and a splash of tonic.",
|
||||||
"flavors": ["fresh mint", "rosemary", "elderberry"],
|
"flavors": ["fresh mint", "rosemary", "elderberry"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -161,6 +165,7 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Charmed Chalice",
|
"title": "Charmed Chalice",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A mysterious potion that glows softly, made with enchanted spirits and a hint of honey, served in a chalice that changes shape.",
|
"desc": "A mysterious potion that glows softly, made with enchanted spirits and a hint of honey, served in a chalice that changes shape.",
|
||||||
"flavors": ["honey"],
|
"flavors": ["honey"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -171,6 +176,7 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Enchanted Elixir",
|
"title": "Enchanted Elixir",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A deep blue drink with hints of blueberry and a touch of magic, served with a glowing ice sphere.",
|
"desc": "A deep blue drink with hints of blueberry and a touch of magic, served with a glowing ice sphere.",
|
||||||
"flavors": ["blueberry", "blue"],
|
"flavors": ["blueberry", "blue"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -183,6 +189,7 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Sylvan Serenade",
|
"title": "Sylvan Serenade",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A melodic blend of apple cider and spiced rum, garnished with a cinnamon stick and a slice of star fruit.",
|
"desc": "A melodic blend of apple cider and spiced rum, garnished with a cinnamon stick and a slice of star fruit.",
|
||||||
"flavors": ["apple", "cider", "spices", "cinnamon"],
|
"flavors": ["apple", "cider", "spices", "cinnamon"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -192,6 +199,7 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Brambleberry Bliss",
|
"title": "Brambleberry Bliss",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A sweet and tart mix of brambleberries and gin, served over crushed ice with a sprinkle of edible flowers.",
|
"desc": "A sweet and tart mix of brambleberries and gin, served over crushed ice with a sprinkle of edible flowers.",
|
||||||
"flavors": ["brambleberries", "berry", "floral"],
|
"flavors": ["brambleberries", "berry", "floral"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -203,6 +211,7 @@ COCKTAILS = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "Twilight Tonic",
|
"title": "Twilight Tonic",
|
||||||
|
"type": "cocktail",
|
||||||
"desc": "A dark, mysterious drink made with blackcurrant and tonic water, served with a slice of lime and a hint of mint.",
|
"desc": "A dark, mysterious drink made with blackcurrant and tonic water, served with a slice of lime and a hint of mint.",
|
||||||
"flavors": ["lime", "blackcurrant", "mint"],
|
"flavors": ["lime", "blackcurrant", "mint"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -211,7 +220,64 @@ COCKTAILS = [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"title": "A 'water'",
|
"title": "Bee Knees",
|
||||||
|
"type": "mead",
|
||||||
|
"desc": "Slightly fizzy, slightly sweet, served with a wedge of honeycomb.",
|
||||||
|
"flavors": ["honey", "vanilla"],
|
||||||
|
"effects": [
|
||||||
|
"You feel like a dwarf in a tunnel digging a hole. Diggy, diggy hole!",
|
||||||
|
"Just like being in the Mud World."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "whisky",
|
||||||
|
"type": "whisky",
|
||||||
|
"desc": "A dram of smokey, amber ambrosia.",
|
||||||
|
"flavors": ["tar", "peat", "smoke", "brine", "vanilla", "toffee"],
|
||||||
|
"effects": [
|
||||||
|
"This reminds you of your travels in the Mud World.",
|
||||||
|
"Lovely.",
|
||||||
|
"Friendships and conversations distilled in a glass.",
|
||||||
|
"A dram to << certainly ^ >> << savor ^ cherish ^ enjoy>>.",
|
||||||
|
"Here's to friends that aren't here to share."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "whiskey",
|
||||||
|
"type": "whiskey",
|
||||||
|
"desc": "A dram of strong, amber ambrosia.",
|
||||||
|
"flavors": ["vanilla", "toffee"],
|
||||||
|
"effects": [
|
||||||
|
"This reminds you of your travels in the Mud World.",
|
||||||
|
"Lovely.",
|
||||||
|
"Friendships and conversations distilled in a glass.",
|
||||||
|
"A dram to << certainly ^ >> << savor ^ cherish ^ enjoy>>.",
|
||||||
|
"Here's to friends that aren't here to share."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "ale",
|
||||||
|
"type": "beer",
|
||||||
|
"desc": "A malty, only slightly carbonated, opaque beverage with overt herbal notes.",
|
||||||
|
"flavors": ["rosemary", "bog myrtle", "yarrow"],
|
||||||
|
"effects": [
|
||||||
|
"Wonder where they got the recipe, twelfth century England?",
|
||||||
|
"Tastes like drinking a loaf of bread."
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "red wine",
|
||||||
|
"type": "wine",
|
||||||
|
"desc": "A rich glass a blood red color with notes of raspberries and toffee.",
|
||||||
|
"flavors": ["earthiness", "toffee", "raspberries"],
|
||||||
|
"effects": [
|
||||||
|
"Ah, what was the name of the land in the Mud World?",
|
||||||
|
"You swirl your glass and watch the legs return to the bottom.",
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "water",
|
||||||
|
"type": "water",
|
||||||
"desc": "A clean cocktail with absolutely no taste.",
|
"desc": "A clean cocktail with absolutely no taste.",
|
||||||
"flavors": ["water", "blandness"],
|
"flavors": ["water", "blandness"],
|
||||||
"effects": [
|
"effects": [
|
||||||
|
|
@ -221,31 +287,25 @@ COCKTAILS = [
|
||||||
"Your liver is thanking you."
|
"Your liver is thanking you."
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"title": "Bee Knees",
|
|
||||||
"desc": "Slightly fizzy, slightly sweet, served with a wedge of honeycomb.",
|
|
||||||
"flavors": ["honey", "vanilla"],
|
|
||||||
"effects": [
|
|
||||||
"You feel like a dwarf in a tunnel digging a hole. Diggy, diggy hole!",
|
|
||||||
"Just like being in the Mud World."
|
|
||||||
]
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
DRINK_COCKTAIL_MSGS = [
|
DRINK_COCKTAIL_MSGS = [
|
||||||
'You take a <<sip ^ sample ^ drink>> of your << |w{0}|n ^ cocktail >>.', # 0 == title
|
# 0 -> drink title or name
|
||||||
'You << notice ^ savor ^ relish ^ enjoy >> the {1}.', # 1 == flavors
|
# 1 -> type of drink, e.g. cocktail or whiskey
|
||||||
|
# 2 -> one of the flavors
|
||||||
|
'You take a <<sip ^ sample ^ drink>> of your << |w{0}|n ^ {1} ^ drink >>.',
|
||||||
|
'You <<sip ^ sample ^ drink>> your << |w{0}|n ^ {1} ^ drink >>.',
|
||||||
|
'You << notice ^ savor ^ relish ^ enjoy >> the {2}.',
|
||||||
]
|
]
|
||||||
|
|
||||||
EMPTY_COCKTAIL_MSGS = [
|
EMPTY_COCKTAIL_MSGS = [
|
||||||
'That drink went down fast.',
|
'That {1} went down fast.',
|
||||||
'Hrm ... did you enjoy that?',
|
'Hrm ... did you enjoy that {1}?',
|
||||||
'You drain your glass.',
|
'You drain your glass.',
|
||||||
"You've finished that concoction.",
|
"You've finished that concoction.",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# py Cocktail.make(self, "mirage")
|
|
||||||
class Cocktail(Object):
|
class Cocktail(Object):
|
||||||
fill_amount = 4
|
fill_amount = 4
|
||||||
sip_amount = 1
|
sip_amount = 1
|
||||||
|
|
@ -255,20 +315,22 @@ class Cocktail(Object):
|
||||||
Create for 'owner', a drink that matches 'name'.
|
Create for 'owner', a drink that matches 'name'.
|
||||||
If name doesn't match, get a random one.
|
If name doesn't match, get a random one.
|
||||||
"""
|
"""
|
||||||
details = random.choice(COCKTAILS)
|
|
||||||
if name:
|
if name:
|
||||||
rx = r".*" + name + r".*"
|
rx = r".*" + name + r".*"
|
||||||
details = [c for c in COCKTAILS
|
details = [c for c in COCKTAILS
|
||||||
if re.match(rx, c.get("title"), re.IGNORECASE)]
|
if re.match(rx, c.get("title"), re.IGNORECASE)]
|
||||||
if len(details) > 0:
|
if len(details) > 0:
|
||||||
details = details[0]
|
details = details[0]
|
||||||
|
else:
|
||||||
|
details = random.choice(COCKTAILS)
|
||||||
|
|
||||||
drink = spawn({
|
drink = spawn({
|
||||||
"typeclass": "typeclasses.drinkables.Cocktail",
|
"typeclass": "typeclasses.drinkables.Cocktail",
|
||||||
"key": details.get("title") + " cocktail",
|
"key": details.get("title"),
|
||||||
"aliases": ["drink", "glass"],
|
"aliases": ["drink", "glass", "cocktail"],
|
||||||
"desc": details.get("desc")
|
"desc": details.get("desc")
|
||||||
})[0]
|
})[0]
|
||||||
|
drink.db.cocktail_type = details.get("type")
|
||||||
drink.db.flavors = details.get("flavors")
|
drink.db.flavors = details.get("flavors")
|
||||||
drink.db.effects = details.get("effects")
|
drink.db.effects = details.get("effects")
|
||||||
drink.db.amount = Cocktail.fill_amount
|
drink.db.amount = Cocktail.fill_amount
|
||||||
|
|
@ -291,21 +353,23 @@ class Cocktail(Object):
|
||||||
|
|
||||||
if amount > 2:
|
if amount > 2:
|
||||||
flavor = random.choice(cocktail_flavors)
|
flavor = random.choice(cocktail_flavors)
|
||||||
drinker.msg(choices(DRINK_COCKTAIL_MSGS, cocktail_type, flavor))
|
drinker.msg(choices(DRINK_COCKTAIL_MSGS, self.key, cocktail_type, flavor))
|
||||||
elif amount > 0:
|
elif amount > 0:
|
||||||
drinker.msg(random.choice(self.db.effects))
|
drinker.msg(choices(self.db.effects, self.key, cocktail_type))
|
||||||
else:
|
else:
|
||||||
drinker.msg(choices(EMPTY_COCKTAIL_MSGS, cocktail_type))
|
drinker.msg(choices(EMPTY_COCKTAIL_MSGS, self.key, cocktail_type))
|
||||||
self.key = "cocktail glass"
|
self.key = "cocktail glass"
|
||||||
self.aliases = ['glass']
|
self.aliases.add('glass')
|
||||||
self.db.desc = "An empty cocktail glass"
|
self.db.desc = "An empty cocktail glass"
|
||||||
|
|
||||||
self.db.amount = self.db.amount - self.sip_amount
|
self.db.amount = self.db.amount - self.sip_amount
|
||||||
|
|
||||||
def at_pre_drop(self, dropper):
|
def at_pre_drop(self, dropper):
|
||||||
if dropper.location.key == 'Wyldwood Bar':
|
if dropper.location.key == 'Wyldwood Bar':
|
||||||
dropper.msg(routput(f"<< A ^ The >> mushroom << man ^ person >> << bounces ^ shimmies over ^ appears >> and takes the {self.name} << from you ^ >>.")
|
dropper.msg(routput(f"<< A ^ The >> mushroom << man ^ person >> << bounces ^ shimmies over ^ appears >> and takes the {self.name} << from you ^ >>."))
|
||||||
)
|
self.delete()
|
||||||
|
elif dropper.location.key == "Dabbler's House":
|
||||||
|
dropper.msg(routput(f"The {self.db.cocktail_type} << falls ^ drops >> to the << floor ^ ground >> and shatters! A dust ball from under the chair forms into a little impish-looking fellow, who cleans it all before disappearing."))
|
||||||
self.delete()
|
self.delete()
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue