mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-21 00:52:47 +02:00
Fixed pollen puff
This commit is contained in:
parent
2eae68785d
commit
374474720b
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user