Add additional test for 10% PC Zygarde
This commit is contained in:
parent
92f3fb5fe1
commit
87ea2c38aa
|
@ -32,7 +32,7 @@ describe("Abilities - POWER CONSTRUCT", () => {
|
|||
});
|
||||
|
||||
test(
|
||||
"check if fainted pokemon switches to base form on arena reset",
|
||||
"check if fainted 50% Power Construct Pokemon switches to base form on arena reset",
|
||||
async () => {
|
||||
const baseForm = 2,
|
||||
completeForm = 4;
|
||||
|
@ -41,7 +41,37 @@ describe("Abilities - POWER CONSTRUCT", () => {
|
|||
[Species.ZYGARDE]: completeForm,
|
||||
});
|
||||
|
||||
await game.startBattle([ Species.MAGIKARP, Species.ZYGARDE ]);
|
||||
await game.classicMode.startBattle([ Species.MAGIKARP, Species.ZYGARDE ]);
|
||||
|
||||
const zygarde = game.scene.getParty().find((p) => p.species.speciesId === Species.ZYGARDE);
|
||||
expect(zygarde).not.toBe(undefined);
|
||||
expect(zygarde!.formIndex).toBe(completeForm);
|
||||
|
||||
zygarde!.hp = 0;
|
||||
zygarde!.status = new Status(StatusEffect.FAINT);
|
||||
expect(zygarde!.isFainted()).toBe(true);
|
||||
|
||||
game.move.select(Moves.SPLASH);
|
||||
await game.doKillOpponents();
|
||||
await game.phaseInterceptor.to(TurnEndPhase);
|
||||
game.doSelectModifier();
|
||||
await game.phaseInterceptor.to(QuietFormChangePhase);
|
||||
|
||||
expect(zygarde!.formIndex).toBe(baseForm);
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
"check if fainted 10% Power Construct Pokemon switches to base form on arena reset",
|
||||
async () => {
|
||||
const baseForm = 3,
|
||||
completeForm = 5;
|
||||
game.override.startingWave(4);
|
||||
game.override.starterForms({
|
||||
[Species.ZYGARDE]: completeForm,
|
||||
});
|
||||
|
||||
await game.classicMode.startBattle([ Species.MAGIKARP, Species.ZYGARDE ]);
|
||||
|
||||
const zygarde = game.scene.getParty().find((p) => p.species.speciesId === Species.ZYGARDE);
|
||||
expect(zygarde).not.toBe(undefined);
|
||||
|
|
Loading…
Reference in New Issue