Open i4D4 opened 10 months ago
move.type.damage_multiplier
function need type chart, but move.type.damage_multiplier
need not it, so I'm using
if move.type:
moves_dmg_multiplier[i] = battle.opponent_active_pokemon.damage_multiplier(move)
insted of
if move.type:
moves_dmg_multiplier[i] = move.type.damage_multiplier(
battle.opponent_active_pokemon.type_1,
battle.opponent_active_pokemon.type_2,
)
good luck.
Hey there, I can't seem to get random battles to work with the bot because the type chart isn't working. This is the error message I get:
Message='ELECTRIC' Source=C:\Users\i4D4\Downloads\poke-env-master\poke-env-master\AItest.py StackTrace: File "C:\Users\i4D4\Downloads\poke-env-master\poke-env-master\AItest.py", line 61, in embed_battle (Current frame) moves_dmg_multiplier[i] = move.type.damage_multiplier( KeyError: 'ELECTRIC'
The type changes every time I run it because I'm running random battles.
This is the part of the code causing issues: