diff --git a/main.py b/main.py index 967073b..825811c 100644 --- a/main.py +++ b/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()