pokerogue icon indicating copy to clipboard operation
pokerogue copied to clipboard

Bugfix: Abilities check final move type instead of default move type

Open td76099 opened this issue 8 months ago • 0 comments

Updates abilities to no longer use PokemonMove but instead Move so that they can accurately track the type of a move in case it gets updated

That same move object is maintained through all of MoveEffectPhase in phases.ts and in all of .apply() to the Pokemon object in pokemon.ts

Has only been lightly tested to ensure it functions, but is this closer to what you were thinking? I could technically move

    applyMoveAttrs(VariableMoveTypeAttr, source, this, move);
    applyPreAttackAbAttrs(MoveTypeChangeAttr, source, this, move, typeChangeMovePowerMultiplier);

outside of pokemon.ts before hitResult. @bennybroseph

td76099 avatar May 27 '24 15:05 td76099