mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 18:52:19 +02:00
Fix if statement in FaintPhase
This commit is contained in:
parent
f42e11f770
commit
37c69896be
@ -121,7 +121,7 @@ export class FaintPhase extends PokemonPhase {
|
|||||||
if (pokemon.turnData?.attacksReceived?.length) {
|
if (pokemon.turnData?.attacksReceived?.length) {
|
||||||
const defeatSource = this.source;
|
const defeatSource = this.source;
|
||||||
|
|
||||||
if (defeatSource instanceof Pokemon && defeatSource.isOnField()) {
|
if (defeatSource?.isOnField()) {
|
||||||
applyPostVictoryAbAttrs(PostVictoryAbAttr, defeatSource);
|
applyPostVictoryAbAttrs(PostVictoryAbAttr, defeatSource);
|
||||||
const pvmove = allMoves[pokemon.turnData.attacksReceived[0].move];
|
const pvmove = allMoves[pokemon.turnData.attacksReceived[0].move];
|
||||||
const pvattrs = pvmove.getAttrs(PostVictoryStatStageChangeAttr);
|
const pvattrs = pvmove.getAttrs(PostVictoryStatStageChangeAttr);
|
||||||
|
@ -35,14 +35,11 @@ describe("Moves - Fell Stinger", () => {
|
|||||||
Moves.LEECH_SEED
|
Moves.LEECH_SEED
|
||||||
])
|
])
|
||||||
.startingLevel(50)
|
.startingLevel(50)
|
||||||
.disableCrits();
|
.disableCrits()
|
||||||
|
.enemyAbility(Abilities.STURDY)
|
||||||
game.override.enemyAbility(Abilities.STURDY)
|
|
||||||
.enemySpecies(Species.HYPNO)
|
.enemySpecies(Species.HYPNO)
|
||||||
.enemyMoveset([ Moves.SPLASH ])
|
.enemyMoveset(Moves.SPLASH)
|
||||||
.enemyLevel(5);
|
.enemyLevel(5);
|
||||||
|
|
||||||
game.override.weather(WeatherType.NONE);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not grant stat boost if opponent gets KO'd by recoil", async () => {
|
it("should not grant stat boost if opponent gets KO'd by recoil", async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user