Exemplo n.º 1
0
    def firststrike(self, playerlvl):
        opponent_builder = Encounter.OpponentBuilder()
        opponent = opponent_builder.monstermaker(int(playerlvl))
        dice_roll = Combat()
        first = dice_roll.d20
        if first >= 11:
            prompt = "Player has first strike."
            temp_list = [opponent, prompt, False]
            return temp_list

        else:
            prompt = "Opponent has first strike."
            temp_list = [opponent, prompt, True]
            return temp_list
Exemplo n.º 2
0
    def firststrike(self):
        opponent_builder = Encounter.OpponentBuilder()
        self.opponent = opponent_builder.monstermaker(self.player["level"])
        dice_roll = Combat()
        first = dice_roll.d20
        if first >= 11:
            self.prompt_list[0] = "Player has first strike."
            self.main_frame.destroy()
            self.game_window(True)

        else:
            self.prompt_list[0] = "Opponent has first strike."
            self.main_frame.destroy()
            self.game_window(False)
Exemplo n.º 3
0
 def firststrike(self):
     self.dice_roll = Combat()
     builder = Encounter.OpponentBuilder()
     self.player = self.play.characterbuilder()
     self.opponent = builder.monstermaker(self.player["level"])
     first = self.dice_roll.d20
     if first >= 11:
         print("Player has first strike.")
         start.playerturn()
     else:
         print("Opponent has first strike.")
         time.sleep(1)
         print("Player Stats:\n", self.player)
         print("Opponent stats:\n", self.opponent)
         time.sleep(1)
         start.opponentturn()