# Path: data/pokedex.py

# 
# Path: data/types.py



from random import randint, choice
from copy import deepcopy
from data.moves import Moves
from data.pokedex import Pokedex
from data.types import Types
    if best[0] == me.active.species:
        return 'move'
    fainted = 0
    for mon in me.team:
        if me.team[mon].status == 'fnt':
            fainted += 1
    if fainted == 5:
        return 'move'
    if not randint(0,5):
        return 'move'
    if 'trapped' in battle.myActiveData[0] or me.active.trapped:
        return 'move'
    return 'switch'
def getMove(moves, active, opponent, battle):
    action = ''
    move = getCC1v1Move(moves, active, opponent)
    if 'isZ' in move and active.side.canZmove:
        if battle.hackmons:
            # Call this move by its 1-indexed index not name
            for i, val in enumerate(moves):
                if val['id'] == move['id']:
                    action += '{}'.format(i + 1)
                    break
        else:
            action += '{} zmove'.format(move['baseMove'])
    elif 'isMax' in move:
        try:
            action += move['baseMove']
        except KeyError as e:
            print(moves)

# Path: data/pokedex.py

# 
# Path: data/types.py



# Path: plugins/battling/battleLogic.py
from random import randint, choice
from copy import deepcopy
from data.moves import Moves
from data.pokedex import Pokedex
from data.types import Types

    if best[0] == me.active.species:
        return 'move'
    fainted = 0
    for mon in me.team:
        if me.team[mon].status == 'fnt':
            fainted += 1
    if fainted == 5:
        return 'move'
    if not randint(0,5):
        return 'move'
    if 'trapped' in battle.myActiveData[0] or me.active.trapped:
        return 'move'
    return 'switch'
def getMove(moves, active, opponent, battle):
    action = ''
    move = getCC1v1Move(moves, active, opponent)
    if 'isZ' in move and active.side.canZmove:
        if battle.hackmons:
            # Call this move by its 1-indexed index not name
            for i, val in enumerate(moves):
                if val['id'] == move['id']:
                    action += '{}'.format(i + 1)
                    break
        else:
            action += '{} zmove'.format(move['baseMove'])
    elif 'isMax' in move:
        try:
            action += move['baseMove']
        except KeyError as e:
            print(moves)

            print(move)