Esempio n. 1
0
 def required_moves(self, moves):
     if moves is None:  # no moves
         return None
     list_ = []
     for move_name in moves:
         move_id = get_move_id(move_name)
         if move_id is not None:
             list_.append(move_id)
         else:
             log.error("Unable to find a move id for '{}'. Please check your spelling.".format(move_name))
             sys.exit(1)
     return list_
Esempio n. 2
0
 def create_moves_list(moves):
     if moves is None or type(moves) == set:  # no moves or already defined moves
         return moves
     if type(moves) != list:
         log.error("Moves list must be in a comma seperated array. Ex: [\"Move\",\"Move\"]. "
                   + "Please see PokeAlarm documentation for more examples.")
         sys.exit(1)
     list_ = set()
     for move_name in moves:
         move_id = get_move_id(move_name)
         if move_id is not None:
             list_.add(move_id)
         else:
             log.error("{} is not a valid move name.".format(move_name)
                       + "Please see documentation for accepted move names and correct your Filters file.")
             sys.exit(1)
     return list_
Esempio n. 3
0
 def create_moves_list(moves):
     if moves is None or type(moves) == set:  # no moves or already defined moves
         return moves
     if type(moves) != list:
         log.error("Moves list must be in a comma seperated array. Ex: [\"Move\",\"Move\"]. "
                   + "Please see PokeAlarm documentation for more examples.")
         sys.exit(1)
     list_ = set()
     for move_name in moves:
         move_id = get_move_id(move_name)
         if move_id is not None:
             list_.add(move_id)
         else:
             log.error("{} is not a valid move name.".format(move_name)
                       + "Please see documentation for accepted move names and correct your Filters file.")
             sys.exit(1)
     return list_