[Enhancement] add revealed ability flag (#2105)

This commit is contained in:
Adrian T 2024-06-13 01:30:10 +08:00 committed by GitHub
parent a2638e4a79
commit fe7ed72afa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -1111,7 +1111,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return undefined; return undefined;
} }
return this.getAttackMoveEffectiveness(source, move, true); return this.getAttackMoveEffectiveness(source, move, !this.battleData?.abilityRevealed);
} }
/** /**
@ -3821,6 +3821,7 @@ export class PokemonBattleData {
public endured: boolean = false; public endured: boolean = false;
public berriesEaten: BerryType[] = []; public berriesEaten: BerryType[] = [];
public abilitiesApplied: Abilities[] = []; public abilitiesApplied: Abilities[] = [];
public abilityRevealed: boolean = false;
} }
export class PokemonBattleSummonData { export class PokemonBattleSummonData {

View File

@ -3122,7 +3122,10 @@ export class ShowAbilityPhase extends PokemonPhase {
start() { start() {
super.start(); super.start();
this.scene.abilityBar.showAbility(this.getPokemon(), this.passive); const pokemon = this.getPokemon();
this.scene.abilityBar.showAbility(pokemon, this.passive);
pokemon.battleData.abilityRevealed = true;
this.end(); this.end();
} }