Пример #1
0
    def set_available_actions(self):
        """
		Appends actions to all_moves
		"""
        self.all_moves = self.adjacent_movements
        self.all_moves.append(Actions.ViewInventory())
        self.all_moves.append(Actions.Equip())
        self.all_moves.append(Actions.ViewCharacter())
Пример #2
0
    def set_available_actions(self):
        """
		Changes the base available actions, 
		 if the enemy is alive only allow the player to attack or flee
		 otherwise the default moves
		"""
        if self.enemy.is_alive():
            self.all_moves = [
                Actions.Flee(tile=self),
                Actions.Attack(combatClass=self.enemyCombat)
            ]
            self.all_moves.append(Actions.ViewInventory())
            self.all_moves.append(Actions.Equip())
            self.all_moves.append(Actions.ViewCharacter())
            # self.all_moves.append(Actions.Quit())

        else:
            self.all_moves = self.adjacent_movements
            self.all_moves.append(Actions.ViewInventory())
            self.all_moves.append(Actions.Equip())
            self.all_moves.append(Actions.ViewCharacter())