Esempio n. 1
0
    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!")
Esempio n. 2
0
 def is_jailor(self) -> bool:
     jailor_role = role_mapping.get("Jailor")
     return jailor_role is not None and isinstance(self.role, jailor_role)
Esempio n. 3
0
 def is_citizen(self) -> bool:
     citizen_role = role_mapping.get("Citizen")
     return citizen_role is not None and isinstance(self.role, citizen_role)
Esempio n. 4
0
 def is_independent(self) -> bool:
     independent_role = role_mapping.get("Independent")
     return independent_role is not None and isinstance(
         self.role, independent_role)
Esempio n. 5
0
 def is_mafia(self) -> bool:
     mafia_role = role_mapping.get("Mafia")
     return mafia_role is not None and isinstance(self.role, mafia_role)