mirror of
https://github.com/inexcode/ixizi
synced 2024-11-23 15:31:26 +00:00
Топпинги
This commit is contained in:
parent
c5c2ffa5ff
commit
dd86c8ce5c
|
@ -74,36 +74,55 @@ class Teas(Enum):
|
||||||
self.id = id
|
self.id = id
|
||||||
self.title = title
|
self.title = title
|
||||||
|
|
||||||
|
class Toppings(Enum):
|
||||||
|
topping1 = (1, "Шоколадный топпинг")
|
||||||
|
topping2 = (2, "Топпинг солёная карамель")
|
||||||
|
topping3 = (3, "Ореховый топпинг")
|
||||||
|
topping4 = (4, "Топпинг ягодное печенье")
|
||||||
|
topping5 = (5, "Топпинг бельгийская вафля")
|
||||||
|
topping6 = (6, "Карамельный топпинг")
|
||||||
|
topping7 = (7, "Маршмеллоу")
|
||||||
|
topping8 = (8, "")
|
||||||
|
topping9 = (9, "")
|
||||||
|
|
||||||
|
def __init__(self, id, title):
|
||||||
|
self.id = id
|
||||||
|
self.title = title
|
||||||
|
|
||||||
|
|
||||||
class CoffeePlugin(Plugin):
|
class CoffeePlugin(Plugin):
|
||||||
@Plugin.command('coffee', '[param:str]')
|
@Plugin.command('coffee', '[param:str]')
|
||||||
def on_coffee(self, event, param=''):
|
def on_coffee(self, event, param=''):
|
||||||
try:
|
try:
|
||||||
result = ""
|
result = ""
|
||||||
if param.lower() == 'classic':
|
if param.lower() == 'topping':
|
||||||
result1, expl1 = rolldice.roll_dice('1d12')
|
result1, expl1 = rolldice.roll_dice('1d7')
|
||||||
elif param.lower() == 'raf':
|
result += list(Toppings)[result1 - 1].title
|
||||||
result1, expl1 = (5, 'User')
|
|
||||||
else:
|
else:
|
||||||
result1, expl1 = rolldice.roll_dice('1d23')
|
if param.lower() == 'classic':
|
||||||
result += list(Drinks)[result1-1].title
|
result1, expl1 = rolldice.roll_dice('1d12')
|
||||||
if result1 == 5:
|
elif param.lower() == 'raf':
|
||||||
result2, expl2 = rolldice.roll_dice('1d18')
|
result1, expl1 = (5, 'User')
|
||||||
if result2 > 16:
|
|
||||||
result2, expl2 = rolldice.roll_dice('1d15')
|
|
||||||
result21, expl21 = rolldice.roll_dice('1d15')
|
|
||||||
result += "\n**Сиропы**: {} и {}".format(list(Syrops)[result2 - 1].title, list(Syrops)[result21 - 1].title)
|
|
||||||
else:
|
else:
|
||||||
result += "\n**Сироп**: {}".format(list(Syrops)[result2 - 1].title)
|
result1, expl1 = rolldice.roll_dice('1d23')
|
||||||
elif result1 == 9:
|
result += list(Drinks)[result1-1].title
|
||||||
result2, expl2 = rolldice.roll_dice('1d2')
|
if result1 == 5:
|
||||||
if result2 == 1:
|
result2, expl2 = rolldice.roll_dice('1d22')
|
||||||
result += "\nТёмный"
|
if result2 > 19:
|
||||||
else:
|
result2, expl2 = rolldice.roll_dice('1d19')
|
||||||
result += "\nМолочный"
|
result21, expl21 = rolldice.roll_dice('1d19')
|
||||||
elif result1 == 12 or result1 == 19:
|
result += "\n**Сиропы**: {} и {}".format(list(Syrops)[result2 - 1].title, list(Syrops)[result21 - 1].title)
|
||||||
result2, expl2 = rolldice.roll_dice('1d3')
|
else:
|
||||||
result += " {}".format(list(Teas)[result2 - 1].title)
|
result += "\n**Сироп**: {}".format(list(Syrops)[result2 - 1].title)
|
||||||
|
elif result1 == 9:
|
||||||
|
result2, expl2 = rolldice.roll_dice('1d2')
|
||||||
|
if result2 == 1:
|
||||||
|
result += "\nТёмный"
|
||||||
|
else:
|
||||||
|
result += "\nМолочный"
|
||||||
|
elif result1 == 12 or result1 == 19:
|
||||||
|
result2, expl2 = rolldice.roll_dice('1d3')
|
||||||
|
result += " {}".format(list(Teas)[result2 - 1].title)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
event.msg.reply(str(e))
|
event.msg.reply(str(e))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue