mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 21:42:20 +02:00
Update modifier bar is now called in the apply of consumable held items
This commit is contained in:
parent
b885b9c62c
commit
db580a6735
@ -113,11 +113,13 @@ export class ConsumableHeldItem extends HeldItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
apply(pokemon: Pokemon): boolean {
|
||||
apply(pokemon: Pokemon, isPlayer: boolean): boolean {
|
||||
const consumed = this.applyConsumable(pokemon);
|
||||
|
||||
if (consumed) {
|
||||
pokemon.heldItemManager.remove(this.type, 1);
|
||||
// TODO: Turn this into updateItemBar or something
|
||||
globalScene.updateModifiers(isPlayer);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -239,11 +239,7 @@ export class StatStageChangePhase extends PokemonPhase {
|
||||
);
|
||||
if (!(existingPhase instanceof StatStageChangePhase)) {
|
||||
// Apply White Herb if needed
|
||||
const whiteHerb = applyResetNegativeStatStageHeldItem(pokemon);
|
||||
// If the White Herb was applied, update scene modifiers
|
||||
if (whiteHerb) {
|
||||
globalScene.updateModifiers(this.player);
|
||||
}
|
||||
applyResetNegativeStatStageHeldItem(pokemon);
|
||||
}
|
||||
|
||||
pokemon.updateInfo();
|
||||
|
Loading…
Reference in New Issue
Block a user