Unnerve message procs only once
This commit is contained in:
1 parent
a3f17b5b2e
commit
251bd3edb1
2 files changed
+9
-10
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user