mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 07:42:25 +02:00
Remove boolean return type apply functions
This commit is contained in:
parent
2eb67a5d66
commit
ddfce53c77
1060
src/data/ability.ts
1060
src/data/ability.ts
File diff suppressed because it is too large
Load Diff
@ -29,7 +29,7 @@ export class ShowAbilityPhase extends PokemonPhase {
|
||||
} else {
|
||||
globalScene.currentBattle.lastPlayerInvolved = pokemon.getBattlerIndex() % 2;
|
||||
}
|
||||
|
||||
|
||||
globalScene.abilityBar.showAbility(this.pokemonName, this.abilityName, this.passive).then(() => {
|
||||
if (pokemon?.battleData) {
|
||||
pokemon.battleData.abilityRevealed = true;
|
||||
|
@ -71,7 +71,7 @@ describe("Moves - Secret Power", () => {
|
||||
await game.classicMode.startBattle([ Species.BLASTOISE, Species.CHARIZARD ]);
|
||||
|
||||
const sereneGraceAttr = allAbilities[Abilities.SERENE_GRACE].getAttrs(MoveEffectChanceMultiplierAbAttr)[0];
|
||||
vi.spyOn(sereneGraceAttr, "apply");
|
||||
vi.spyOn(sereneGraceAttr, "canApply");
|
||||
|
||||
game.move.select(Moves.WATER_PLEDGE, 0, BattlerIndex.ENEMY);
|
||||
game.move.select(Moves.FIRE_PLEDGE, 1, BattlerIndex.ENEMY_2);
|
||||
@ -89,8 +89,8 @@ describe("Moves - Secret Power", () => {
|
||||
|
||||
await game.phaseInterceptor.to("BerryPhase", false);
|
||||
|
||||
expect(sereneGraceAttr.apply).toHaveBeenCalledOnce();
|
||||
expect(sereneGraceAttr.apply).toHaveLastReturnedWith(true);
|
||||
expect(sereneGraceAttr.canApply).toHaveBeenCalledOnce();
|
||||
expect(sereneGraceAttr.canApply).toHaveLastReturnedWith(true);
|
||||
|
||||
expect(rainbowEffect.apply).toHaveBeenCalledTimes(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user