Fix missing form change logic for Cramorant (#3603)
This commit is contained in:
parent
5ede6a54c6
commit
8704723c9c
|
@ -837,6 +837,8 @@ export const pokemonFormChanges: PokemonFormChanges = {
|
|||
new SpeciesFormChange(Species.CRAMORANT, "", "gorging", new SpeciesFormChangeManualTrigger, true, new SpeciesFormChangeCondition(p => p.getHpRatio() < .5)),
|
||||
new SpeciesFormChange(Species.CRAMORANT, "gulping", "", new SpeciesFormChangeManualTrigger, true),
|
||||
new SpeciesFormChange(Species.CRAMORANT, "gorging", "", new SpeciesFormChangeManualTrigger, true),
|
||||
new SpeciesFormChange(Species.CRAMORANT, "gulping", "", new SpeciesFormChangeActiveTrigger(false), true),
|
||||
new SpeciesFormChange(Species.CRAMORANT, "gorging", "", new SpeciesFormChangeActiveTrigger(false), true),
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
@ -84,6 +84,21 @@ describe("Abilities - Gulp Missile", () => {
|
|||
expect(cramorant.formIndex).toBe(GORGING_FORM);
|
||||
});
|
||||
|
||||
it("changes to base form when switched out after Surf or Dive is used", async () => {
|
||||
await game.startBattle([Species.CRAMORANT, Species.MAGIKARP]);
|
||||
const cramorant = game.scene.getPlayerPokemon()!;
|
||||
|
||||
game.doAttack(getMovePosition(game.scene, 0, Moves.SURF));
|
||||
await game.toNextTurn();
|
||||
|
||||
game.doSwitchPokemon(1);
|
||||
await game.toNextTurn(); // form change is delayed until after end of turn
|
||||
|
||||
expect(cramorant.formIndex).toBe(NORMAL_FORM);
|
||||
expect(cramorant.getTag(BattlerTagType.GULP_MISSILE_ARROKUDA)).toBeUndefined();
|
||||
expect(cramorant.getTag(BattlerTagType.GULP_MISSILE_PIKACHU)).toBeUndefined();
|
||||
});
|
||||
|
||||
it("changes form during Dive's charge turn", async () => {
|
||||
await game.startBattle([Species.CRAMORANT]);
|
||||
const cramorant = game.scene.getPlayerPokemon()!;
|
||||
|
|
Loading…
Reference in New Issue