Skip to content

Commit

Permalink
Annonce du traitre au début/quand il meurt
Browse files Browse the repository at this point in the history
  • Loading branch information
Tailszefox committed Mar 31, 2015
1 parent a470f4d commit 798997f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions loup.py
Expand Up @@ -517,6 +517,7 @@ def personnaliteeChoisie(self, serv):
self.maire = None
self.maireElu = False
self.noJour = 0
self.noNuit = 0

self.traitre = None

Expand Down Expand Up @@ -915,9 +916,14 @@ def equivalencesRoles(self, serv, source):
#Passe à l'étape de nuit
def passerNuit(self, serv):
self.statut = "nuit"
self.noNuit += 1
self.addLog('tour')

self.envoyer(self.chanJeu, "NUIT_TOMBEE")

# S'il y a un traitre, on l'annonce lors de la première nuit
if(self.noNuit == 1 and self.traitre is not None):
serv.execute_delayed(5, self.envoyer, [self.chanJeu, "ANNONCE_TRAITRE"])

#Si Cupidon est là (premier tour), on l'appelle
if (self.cupidon != None):
Expand Down Expand Up @@ -1369,6 +1375,10 @@ def passerJour(self, serv):
serv.execute_delayed(25, self.envoyer, [self.chanJeu, "VICTIME_LOUPS_ETAIT_LOUP", [self.victimeLoups.capitalize()]])
else:
serv.execute_delayed(25, self.envoyer, [self.chanJeu, "VICTIME_LOUPS_ETAIT_VILLAGEOIS", [self.victimeLoups.capitalize(), identite]])

# Si c'était le traitre, on l'annonce
if(joueur == self.traitre):
serv.execute_delayed(27, self.envoyer, [self.chanJeu, "VICTIME_ETAIT_TRAITRE", [self.victimeLoups.capitalize()]])

self.suivante = self.tuerVictimeSorciere
self.tuer(20, joueur)
Expand All @@ -1392,6 +1402,10 @@ def tuerVictimeSorciere(self, serv):
serv.execute_delayed(25, self.envoyer, [self.chanJeu, "VICTIME_LOUPS_ETAIT_LOUP", [self.victimeSorciere.capitalize()]])
else:
serv.execute_delayed(25, self.envoyer, [self.chanJeu, "VICTIME_LOUPS_ETAIT_VILLAGEOIS", [self.victimeSorciere.capitalize(), identite]])

# Si c'était le traitre, on l'annonce
if(joueur == self.traitre):
serv.execute_delayed(27, self.envoyer, [self.chanJeu, "VICTIME_ETAIT_TRAITRE", [self.victimeSorciere.capitalize()]])

self.suivante = self.annoncerAttenteVote
self.victimeSorciere = None
Expand Down Expand Up @@ -1436,6 +1450,10 @@ def messageChasseur(self, serv, source, message):
serv.execute_delayed(10, self.envoyer, [self.chanJeu, "VICTIME_CHASSEUR_ETAIT_LOUP", [pseudo.capitalize()]])
else:
serv.execute_delayed(10, self.envoyer, [self.chanJeu, "VICTIME_CHASSEUR_ETAIT_VILLAGEOIS", [pseudo.capitalize() ,identite]])

# Si c'était le traitre, on l'annonce
if(joueur == self.traitre):
serv.execute_delayed(12, self.envoyer, [self.chanJeu, "VICTIME_ETAIT_TRAITRE", [pseudo.capitalize()]])

#On enlève le chasseur maintenant
self.chasseur = None
Expand Down Expand Up @@ -1911,6 +1929,10 @@ def tuerLapidation(self, serv, joueurDesigne):
self.corbeau = None
self.victimeCorbeau = None
self.enPrison = None

# Si c'était le traitre, on l'annonce
elif(self.pseudos[joueurDesigne] == self.traitre):
serv.execute_delayed(15, self.envoyer, [self.chanJeu, "VICTIME_ETAIT_TRAITRE", [joueurDesigne.capitalize()]])

#Si c'était pas l'idiot, on le tue
if(self.pseudos[joueurDesigne] != self.idiot):
Expand Down Expand Up @@ -2122,6 +2144,10 @@ def tueAmoureux(self, amoureux, continuer = True):

else:
self.connection.execute_delayed(5, self.envoyer, [self.chanJeu, "AMOUREUX_ETAIT_VILLAGEOIS", [irclib.nm_to_n(amoureux).capitalize(), identite]])

# Si c'était le traitre, on l'annonce
if(amoureux == self.traitre):
self.connection.execute_delayed(7, self.envoyer, [self.chanJeu, "VICTIME_ETAIT_TRAITRE", [irclib.nm_to_n(amoureux).capitalize()]])

self.addLog('action', irclib.nm_to_n(amoureux).capitalize(), {'type' : 'mort', 'typeMort' : 'amoureux', 'role' : self.identiteBrute(amoureux)}, 'tour')

Expand Down

0 comments on commit 798997f

Please sign in to comment.