1
Fork 0
mirror of https://github.com/RYGhub/royal-mifia.git synced 2024-11-22 22:04:18 +00:00
royal-mifia/roles/Mamma.py

21 lines
720 B
Python
Raw Permalink Normal View History

2017-07-06 16:49:06 +00:00
from .Role import Role
import strings as s
import random
class Mamma(Role):
"""La mamma sente i pettegolezzi in giro per la città e inizia conoscendo un ruolo a caso..."""
icon = s.mom_icon
team = 'Good'
name = s.mom_name
powerdesc = s.mom_power_description
def __repr__(self) -> str:
return "<Role: Mamma>"
def onstartgame(self):
2017-07-06 16:49:06 +00:00
# Scegli un bersaglio casuale che non sia il giocatore stesso
possibletargets = self.player.game.players.copy()
2017-07-07 20:24:08 +00:00
possibletargets.remove(self.player)
2017-07-06 16:49:06 +00:00
target = random.sample(possibletargets, 1)[0]
self.player.message(s.mom_discovery.format(target=target.tusername, icon=target.role.icon, role=target.role.name))