Add werewolf role
This commit is contained in:
parent
b7276da8d8
commit
5b64565590
1 changed files with 12 additions and 4 deletions
16
main.py
16
main.py
|
|
@ -118,7 +118,7 @@ class Game:
|
|||
if fuzz_score >= 60:
|
||||
log.info("You meant %s!", fuzz_player.name)
|
||||
log.debug("Fuzz score: %s" % fuzz_score)
|
||||
return fuzz_player
|
||||
return fuzz_player.name
|
||||
|
||||
def choose_between(self, options):
|
||||
#Prompt the user to choose between options until a valid one is entered
|
||||
|
|
@ -182,13 +182,13 @@ class Game:
|
|||
return
|
||||
|
||||
# in love?
|
||||
if target in self.lovers:
|
||||
log.debug("%s is in love! Killing them and their lover.", target)
|
||||
if player in self.lovers:
|
||||
log.debug("%s is in love! Killing them and their lover.", player)
|
||||
for p in self.lovers:
|
||||
# kill them and their lover
|
||||
log.debug("Killed %s", p)
|
||||
self.dead_this_night.append(p)
|
||||
p.alive = False
|
||||
self.players[p].alive = False
|
||||
return
|
||||
|
||||
# else just kill them
|
||||
|
|
@ -313,6 +313,12 @@ class Game:
|
|||
else:
|
||||
log.critical("Unknown error: Invalid potion choice.")
|
||||
return
|
||||
@role
|
||||
def werewolf(self) -> None:
|
||||
log.info("You will choose someone to kill.")
|
||||
player = self.select_someone()
|
||||
self.kill(player)
|
||||
|
||||
|
||||
# -------------------------
|
||||
# game flow
|
||||
|
|
@ -320,7 +326,9 @@ class Game:
|
|||
def first_day_cycle(self) -> None:
|
||||
log.info("All the villagers fall asleep.")
|
||||
self.cupidon()
|
||||
print(self.lovers)
|
||||
self.savior()
|
||||
self.werewolf()
|
||||
self.witch()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue