mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Remove boolean return type apply functions
This commit is contained in:
parent
2eb67a5d66
commit
ddfce53c77
1010
src/data/ability.ts
1010
src/data/ability.ts
File diff suppressed because it is too large
Load Diff
@ -71,7 +71,7 @@ describe("Moves - Secret Power", () => {
|
|||||||
await game.classicMode.startBattle([ Species.BLASTOISE, Species.CHARIZARD ]);
|
await game.classicMode.startBattle([ Species.BLASTOISE, Species.CHARIZARD ]);
|
||||||
|
|
||||||
const sereneGraceAttr = allAbilities[Abilities.SERENE_GRACE].getAttrs(MoveEffectChanceMultiplierAbAttr)[0];
|
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.WATER_PLEDGE, 0, BattlerIndex.ENEMY);
|
||||||
game.move.select(Moves.FIRE_PLEDGE, 1, BattlerIndex.ENEMY_2);
|
game.move.select(Moves.FIRE_PLEDGE, 1, BattlerIndex.ENEMY_2);
|
||||||
@ -89,8 +89,8 @@ describe("Moves - Secret Power", () => {
|
|||||||
|
|
||||||
await game.phaseInterceptor.to("BerryPhase", false);
|
await game.phaseInterceptor.to("BerryPhase", false);
|
||||||
|
|
||||||
expect(sereneGraceAttr.apply).toHaveBeenCalledOnce();
|
expect(sereneGraceAttr.canApply).toHaveBeenCalledOnce();
|
||||||
expect(sereneGraceAttr.apply).toHaveLastReturnedWith(true);
|
expect(sereneGraceAttr.canApply).toHaveLastReturnedWith(true);
|
||||||
|
|
||||||
expect(rainbowEffect.apply).toHaveBeenCalledTimes(0);
|
expect(rainbowEffect.apply).toHaveBeenCalledTimes(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user