# 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
        print('WARNING: Failed to pick proper lead, using random.')
        return randint(1, 6)

def calcScore(move, mon, opponents):
    ''' Calculates an arbitrary score for a move against an opponent to decide how good it is '''
    if type(move) is str:
        if 'hiddenpower' in  move:
            move = move[:-2] if not move == 'hiddenpower' else move
        for var in ['return', 'frustration']:
            if move.startswith(var):
                move = var
        move = move.replace("'",'')
        move = Moves[move]
    opp = Pokedex[getBaseSpecies(opponents)]

    score = move['basePower'] - (100 - move['accuracy'])

    oBias = 'Physical' if mon.stats['atk'] > mon.stats['spa'] else 'Special'
    if mon.stats['atk'] == mon.stats['spa']:
        oBias = 'No bias'
    dBias = 'Physical' if opp['baseStats']['def'] > opp['baseStats']['spd'] else 'Special'
    if opp['baseStats']['def'] == opp['baseStats']['spd']:
        dBias = 'No bias'
    if move['category'] == oBias:
        score += 10
    if move['category'] == dBias:
        score -= 10
    # Typing
    eff = Types[opp['types'][0]][move['type']]
    if len(opp['types']) > 1:

# 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

        print('WARNING: Failed to pick proper lead, using random.')
        return randint(1, 6)

def calcScore(move, mon, opponents):
    ''' Calculates an arbitrary score for a move against an opponent to decide how good it is '''
    if type(move) is str:
        if 'hiddenpower' in  move:
            move = move[:-2] if not move == 'hiddenpower' else move
        for var in ['return', 'frustration']:
            if move.startswith(var):
                move = var
        move = move.replace("'",'')
        move = Moves[move]
    opp = Pokedex[getBaseSpecies(opponents)]

    score = move['basePower'] - (100 - move['accuracy'])

    oBias = 'Physical' if mon.stats['atk'] > mon.stats['spa'] else 'Special'
    if mon.stats['atk'] == mon.stats['spa']:
        oBias = 'No bias'
    dBias = 'Physical' if opp['baseStats']['def'] > opp['baseStats']['spd'] else 'Special'
    if opp['baseStats']['def'] == opp['baseStats']['spd']:
        dBias = 'No bias'
    if move['category'] == oBias:
        score += 10
    if move['category'] == dBias:
        score -= 10
    # Typing
    eff = Types[opp['types'][0]][move['type']]
    if len(opp['types']) > 1:

        eff *= Types[opp['types'][1]][move['type']]