Update src/data/ability.ts

Co-authored-by: Samuel H <flashfireex@gmail.com>
pull/432/head
takeyourt1me 2024-05-03 14:33:29 -07:00 committed by GitHub
parent 39392ace32
commit d2321f725f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -884,10 +884,12 @@ export class VariableMovePowerAbAttr extends PreAttackAbAttr {
export class PreAttackChangeType extends PreAttackAbAttr{
private condition: PokemonAttackCondition;
constructor (condition:PokemonAttackCondition) {
super(true);
this.condition = condition;
}
applyPreAttack(pokemon:Pokemon,passive:boolean,defender:Pokemon,move:PokemonMove): boolean{
const MoveType = move.getMove().type;
const originalType = pokemon.getTypes();