handler_game_complete minigame handler

This commit is contained in:
Ben 2020-02-14 21:46:27 +00:00
parent 223acc583b
commit 84c4e1ca6b

View File

@ -132,3 +132,11 @@ async def handle_get_game_again(p):
f'{games.pop(random.randrange(len(games)))}'
await p.send_xt('zr', games_string, random.randint(1, 6))
@handlers.handler(XTPacket('zc', ext='z'), client=ClientType.Vanilla)
@handlers.player_attribute(agent_status=True)
@handlers.cooldown(5)
async def handle_game_complete(p, medals: int):
medals = min(6, medals)
await p.update(career_medals=p.career_medals + medals,
agent_medals=p.agent_medals + medals).apply()