[Enhancement] add revealed ability flag (#2105)
This commit is contained in:
parent
a2638e4a79
commit
fe7ed72afa
|
@ -1111,7 +1111,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
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 berriesEaten: BerryType[] = [];
|
||||
public abilitiesApplied: Abilities[] = [];
|
||||
public abilityRevealed: boolean = false;
|
||||
}
|
||||
|
||||
export class PokemonBattleSummonData {
|
||||
|
|
|
@ -3122,7 +3122,10 @@ export class ShowAbilityPhase extends PokemonPhase {
|
|||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue