async def choose_godfather(self): godfather = self._rand.choice( [ p for p in self.players # We don't want to choose special mafia if p.role.__class__ is role_mapping.get("Mafia") ] ) godfather.role.is_godfather = True await godfather.channel.send("You are the godfather!")
def is_jailor(self) -> bool: jailor_role = role_mapping.get("Jailor") return jailor_role is not None and isinstance(self.role, jailor_role)
def is_citizen(self) -> bool: citizen_role = role_mapping.get("Citizen") return citizen_role is not None and isinstance(self.role, citizen_role)
def is_independent(self) -> bool: independent_role = role_mapping.get("Independent") return independent_role is not None and isinstance( self.role, independent_role)
def is_mafia(self) -> bool: mafia_role = role_mapping.get("Mafia") return mafia_role is not None and isinstance(self.role, mafia_role)