Unnerve message procs only once

This commit is contained in:
Flashfyre committed 2024-04-25 21:40:00 -04:00
1 parent a3f17b5b2e
commit 251bd3edb1
2 files changed
+9 -10

No files matched your search

-8
View File
@@ -874,14 +874,6 @@ export class BerryModifier extends PokemonHeldItemModifier {
apply(args: any[]): boolean {
const pokemon = args[0] as Pokemon;
const cancelled = new Utils.BooleanHolder(false);
pokemon.getOpponents().map(opp => applyAbAttrs(PreventBerryUseAbAttr, opp, cancelled));
if (cancelled.value) {
pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' is too\nnervous to eat berries!'));
return false;
}
const preserve = new Utils.BooleanHolder(false);
pokemon.scene.applyModifiers(PreserveBerryModifier, pokemon.isPlayer(), pokemon, preserve);