changed variable name for ability trigger

abilityTriggeredThisSwitch --> abilityTriggered
This commit is contained in:
takeyourt1me 2024-05-03 15:15:19 -07:00 committed by GitHub
parent 194a1135c9
commit 4ffedc2a92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -897,7 +897,7 @@ export class PreAttackChangeType extends PreAttackAbAttr{
if (this.condition(pokemon,defender,move.getMove())){ if (this.condition(pokemon,defender,move.getMove())){
if (originalType.length > 1 || originalType[0] !== MoveType){ if (originalType.length > 1 || originalType[0] !== MoveType){
pokemon.summonData.types = [MoveType]; pokemon.summonData.types = [MoveType];
pokemon.battleSummonData.abilityTriggeredThisSwitch = true; pokemon.battleSummonData.abilityTriggered = true;
pokemon.updateInfo(); pokemon.updateInfo();
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` tranformed\ninto the ${Utils.toReadableString(Type[MoveType])} type!`)); pokemon.scene.queueMessage(getPokemonMessage(pokemon, ` tranformed\ninto the ${Utils.toReadableString(Type[MoveType])} type!`));
} }
@ -3053,7 +3053,7 @@ export function initAbilities() {
new Ability(Abilities.CHEEK_POUCH, 6) new Ability(Abilities.CHEEK_POUCH, 6)
.unimplemented(), .unimplemented(),
new Ability(Abilities.PROTEAN, 6) new Ability(Abilities.PROTEAN, 6)
.attr(PreAttackChangeType,(user,target,move) => move.name !== 'Struggle' && !user.isTerastallized() && user.battleSummonData.abilityTriggeredThisSwitch === false), .attr(PreAttackChangeType,(user,target,move) => move.name !== 'Struggle' && !user.isTerastallized() && user.battleSummonData.abilityTriggered === false),
new Ability(Abilities.FUR_COAT, 6) new Ability(Abilities.FUR_COAT, 6)
.attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.category === MoveCategory.PHYSICAL, 0.5) .attr(ReceivedMoveDamageMultiplierAbAttr, (target, user, move) => move.category === MoveCategory.PHYSICAL, 0.5)
.ignorable(), .ignorable(),