コード例 #1
0
 def available_actions(self):
     if self.enemy.is_alive():
         return [
             actions.Flee(tile=self),
             actions.Attack(enemy=self.enemy),
             actions.Heal()
         ]
     else:
         moves = self.adjacent_moves()
         moves.append(actions.ViewInventory())
         moves.append(actions.Heal())
         return moves
コード例 #2
0
 def available_actions(self):
     moves = self.adjacent_moves()
     moves.append(actions.ViewInventory())
     moves.append(actions.Heal())
     if (len(self.inventory) > 0):
         moves.append(actions.Buy(inventory=self.inventory))
     return moves
コード例 #3
0
 def available_actions(self):
     moves = self.adjacent_moves()
     moves.append(actions.ViewInventory())
     moves.append(actions.Heal())
     if self.item.available: 
         moves.append(actions.Search(item = self.item, text = self.itemText))
     return moves
コード例 #4
0
 def available_actions(self):
     """Returns all of the available actions in this room."""
     moves = self.adjacent_moves()
     moves.append(actions.ViewInventory())
     moves.append(actions.Heal())
     
     return moves
コード例 #5
0
 def available_actions(self):
     moves = self.adjacent_moves()
     moves.append(actions.ViewInventory())
     moves.append(actions.Heal())
     moves.append(actions.LookAround())
     moves.append(actions.Status())
     moves.append(actions.CraftMenu())
     return moves
コード例 #6
0
 def available_actions(self):
     if self.enemy.is_alive():
         return [
             actions.Flee(tile=self),
             actions.Attack(enemy=self.enemy),
             actions.Heal()
         ]
     else:
         return self.adjacent_moves()
コード例 #7
0
 def available_actions(self,player):
     if self.enemy.is_alive() and player.is_alive():
         moves = [actions.Flee(tile=self), actions.Attack(enemy=self.enemy)]
         if player.HealingPotions > 0:
             moves.append(actions.Heal())
         return moves
     else:
         moves = self.adjacent_moves()
         moves.append(actions.ViewInventory())
         moves.append(actions.CheckHP())
         moves.append(actions.EquipWep())
         if self.item and not self.enemy.is_alive():
             moves.append(actions.PickUpItem())
         if player.Potion_Of_Life:
             moves.append(actions.Undead())
         if player.HealingPotions > 0:
             moves.append(actions.Heal())
         if player.beer > 0:
             moves.append(actions.Drink())
         return moves
コード例 #8
0
 def available_actions(self,player):
     moves = self.adjacent_moves()
     moves.append(actions.ViewInventory())
     moves.append(actions.CheckHP())
     moves.append(actions.EquipWep())
     if player.Potion_Of_Life:
         moves.append(actions.Undead())
     if player.HealingPotions > 0:
         moves.append(actions.Heal())
     if player.beer > 0:
         moves.append(actions.Drink())
     return moves
コード例 #9
0
    def available_actions(self):
        '''Returns all of the available actions in this room.'''
        moves = self.adjacent_moves()
        moves.append(actions.view_inventory())
        moves.append(actions.Heal())

        if self.__class__.__name__ == 'trader_room':
            moves.append(actions.Trade())

        moves.append(actions.Quit())

        return moves
コード例 #10
0
 def available_actions(self):
     if self.enemy.is_alive():
         return [
             actions.Flee(tile=self),
             actions.Attack(enemy=self.enemy),
             actions.ViewInventory(),
             actions.CheckStats(),
             actions.CheckMap(),
             actions.Heal()
         ]
     else:
         return self.adjacent_moves()