Пример #1
0
	def 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
		 Actions.Flee(tile=self)
		"""
		if self.enemy.is_alive():
			return [Actions.Guess(enemy = self.enemy), Actions.Quit(), Actions.ViewInventory()]

		else:
			moves = self.adjacent_moves()
			moves.append(Actions.ViewInventory())
			moves.append(Actions.Quit())

			return moves