mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 05:52:17 +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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(pokemon: Pokemon): boolean {
|
apply(pokemon: Pokemon, isPlayer: boolean): boolean {
|
||||||
const consumed = this.applyConsumable(pokemon);
|
const consumed = this.applyConsumable(pokemon);
|
||||||
|
|
||||||
if (consumed) {
|
if (consumed) {
|
||||||
pokemon.heldItemManager.remove(this.type, 1);
|
pokemon.heldItemManager.remove(this.type, 1);
|
||||||
|
// TODO: Turn this into updateItemBar or something
|
||||||
|
globalScene.updateModifiers(isPlayer);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,11 +239,7 @@ export class StatStageChangePhase extends PokemonPhase {
|
|||||||
);
|
);
|
||||||
if (!(existingPhase instanceof StatStageChangePhase)) {
|
if (!(existingPhase instanceof StatStageChangePhase)) {
|
||||||
// Apply White Herb if needed
|
// Apply White Herb if needed
|
||||||
const whiteHerb = applyResetNegativeStatStageHeldItem(pokemon);
|
applyResetNegativeStatStageHeldItem(pokemon);
|
||||||
// If the White Herb was applied, update scene modifiers
|
|
||||||
if (whiteHerb) {
|
|
||||||
globalScene.updateModifiers(this.player);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pokemon.updateInfo();
|
pokemon.updateInfo();
|
||||||
|
Loading…
Reference in New Issue
Block a user