Fixed pollen puff

This commit is contained in:
Bertie690 2025-06-14 13:46:58 -04:00
parent 2eae68785d
commit 374474720b
2 changed files with 6 additions and 1 deletions

View File

@ -2285,6 +2285,11 @@ export class HealOnAllyAttr extends HealAttr {
return false;
}
override canApply(user: Pokemon, target: Pokemon, _move: Move, _args?: any[]): boolean {
// Don't fail move if not targeting an ally
return user.getAlly() !== target || super.canApply(user, target, _move, _args);
}
}
/**

View File

@ -84,7 +84,7 @@ describe("Moves - Pollen Puff", () => {
game.move.use(MoveId.SPLASH, BattlerIndex.PLAYER_2);
await game.toEndOfTurn();
expect(bulbasaur.turnData.hitCount).toBe(1);
expect(bulbasaur.turnData.hitCount).toBe(0);
expect(omantye.hp).toBeLessThanOrEqual(0.5 * omantye.getMaxHp() + 1);
expect(game.phaseInterceptor.log.filter(l => l === "PokemonHealPhase")).toHaveLength(1);
});