This repository has been archived by the owner on Nov 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a5b683
commit f80fa5d
Showing
8 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import random | ||
|
||
from utils.buffs import DiabetBuff | ||
|
||
name = 'Конфетка' | ||
description = ( | ||
'Сладкая и вкусная' | ||
) | ||
|
||
price = 1 | ||
|
||
usable = True | ||
disposable = True | ||
|
||
def on_use(user, reply): | ||
cnt = user.get_variable('candies_eat', 0) | ||
|
||
if cnt == 10: | ||
reply('Поздравляю, у вас диабет!') | ||
reply('Вот вам конфетка без сахара, чтобы утешить себя') | ||
|
||
user.new_buff(DiabetBuff()) | ||
user.add_item('special', 'candy') | ||
elif cnt == 11: | ||
reply('А нет, это с сахаром :(\nВот вам другая.') | ||
user.add_item('special', 'candy') | ||
user.make_damage(3, 7, reply, name='Диабет') | ||
elif cnt > 11: | ||
reply('Ну что же вы себя убиваете, голубчик!') | ||
user.make_damage(cnt - 5, cnt + 3, reply, name='Диабет') | ||
else: | ||
reply('Вкусненько!') | ||
user.heal(15) | ||
|
||
user.get_variable('candies_eat', cnt + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import random | ||
|
||
name = 'Тыква' | ||
description = ( | ||
'Праздник к нам приходит, праздник к нам приходит!' | ||
) | ||
|
||
price = 3 | ||
|
||
fightable = True | ||
strengthoff = True | ||
disposable = True | ||
|
||
def fight_use(user, reply, room): | ||
reply('Не фашисты, но гранату получат.') | ||
|
||
user.make_damage(0, 20, reply, name='Тыква') | ||
|
||
if user.dead: | ||
return 0 | ||
|
||
return random.range(50, 70) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import random | ||
from items import itemloader | ||
from utils import costumes | ||
|
||
name = 'Зуллуинский магазин' | ||
|
||
ACTIONS = [ 'Тыква', 'Костюм', 'Конфета' ] | ||
|
||
def enter(user, reply): | ||
reply( | ||
'Какие-то странные бездедушки, черепа и прочая ересь.\n' | ||
'Рука невольно тянется к ручки двери, чтобы сбежать, но ' | ||
'какая-та улыбчивая тварь пригласила тебя внутрь и предлагает тебе взять что-то одно, но зато *абсолютно* бесплатно.' | ||
) | ||
|
||
user.set_room_temp('costume', costumes.rand_costume_key()) | ||
|
||
def get_actions(user): | ||
return ACTIONS | ||
|
||
def action(user, reply, text): | ||
if text == ACTIONS[0]: | ||
reply('Держи!', photo='BQADAgAD7QgAAmrZzgfDVlphbK6MlgI') | ||
user.add_item('special', 'pumpkin') | ||
user.leave(reply) | ||
elif text == 'Свечка': | ||
reply('Держи свечу, не обожгись!') | ||
user.add_item('special', 'candle') | ||
user.leave(reply) | ||
elif text == ACTIONS[1]: | ||
key = user.get_room_temp('costume', 'none') | ||
costume = costumes.get_costume(key) | ||
|
||
user.costume = key | ||
|
||
reply('Держи этот шикарный костюм!') | ||
reply('_Вы надеваете костюм {0}_'.format(costume['who'])) | ||
reply(costume['description']) | ||
elif text == ACTIONS[2]: | ||
reply('Забирай, но не переедай!') | ||
|
||
user.add_item('special', 'candy') | ||
else: | ||
reply('Не понял сейчас') | ||
return | ||
|
||
user.leave(reply) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import random | ||
|
||
COSTUMES = { | ||
'mexican': { | ||
'who': 'Мексиканского рестлера', | ||
'description': 'Надевая костюм, ты почувствовал как кокс, оставшийся на одежде, попадает в твое тело и ты наполняешься силой.' | ||
}, | ||
'ghost': { | ||
'who': 'Призрака', | ||
'description': 'Простыня все еще в моде!' | ||
}, | ||
'sceleton': { | ||
'who': 'Скелета', | ||
'description': 'С чем стирать и материал не уточняются.. Но выглядят прямо как настоящие! Жуть.' | ||
}, | ||
'fox': { | ||
'who': 'Лисички', | ||
'description': 'Этот хвост так интересно крепится!' | ||
}, | ||
'headless': { | ||
'who': 'Всадника без головы', | ||
'description': 'Стало легче выпря млять спину, но теперь ты видишь всё так, будто глаза на уровне пупка.' | ||
}, | ||
'zombie': { | ||
'who': 'Зомби', | ||
'description': 'Весь в блювотине, но перфоманс того требует.' | ||
}, | ||
'wizzard': { | ||
'who': 'Волшебника', | ||
'description': 'Колпак и палочка Гарри Поттера, которого избили и выкинули в канаву.' | ||
}, | ||
'none': { | ||
'who': 'Самого себя', | ||
'description': 'Так себе конечно. Одел бы нижнее белье хотя бы' | ||
} | ||
} | ||
|
||
def rand_costume_key(): | ||
return random.choice(list(COSTUMES)) | ||
|
||
def rand_costume(): | ||
return get_costume(rand_costume_key()) | ||
|
||
def get_costume(key): | ||
if key in COSTUMES: | ||
return COSTUMES[key] | ||
else: | ||
return COSTUMES['none'] |