mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-11 18:09:29 +02:00
Fixed battler thingy
This commit is contained in:
parent
07f25c7771
commit
1c73b7c269
@ -7257,8 +7257,8 @@ export class ReducePpMoveAttr extends MoveEffectAttr {
|
|||||||
const lastPpUsed = movesetMove.ppUsed;
|
const lastPpUsed = movesetMove.ppUsed;
|
||||||
movesetMove.ppUsed = Math.min(lastPpUsed + this.reduction, movesetMove.getMovePp());
|
movesetMove.ppUsed = Math.min(lastPpUsed + this.reduction, movesetMove.getMovePp());
|
||||||
|
|
||||||
globalScene.eventTarget.dispatchEvent(new MovesetChangedEvent(target.id, movesetMove));
|
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("battle:ppReduced", { targetName: getPokemonNameWithAffix(target), moveName: movesetMove.getName(), reduction: (movesetMove.ppUsed) - lastPpUsed }));
|
globalScene.phaseManager.queueMessage(i18next.t("battle:ppReduced", { targetName: getPokemonNameWithAffix(target), moveName: movesetMove.getName(), reduction: (movesetMove.ppUsed) - lastPpUsed }));
|
||||||
|
globalScene.eventTarget.dispatchEvent(new MovesetChangedEvent(target.id, movesetMove));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -7368,7 +7368,7 @@ export class MovesetCopyMoveAttr extends OverrideMoveEffectAttr {
|
|||||||
user.summonData.moveset[thisMoveIndex] = newMove;
|
user.summonData.moveset[thisMoveIndex] = newMove;
|
||||||
|
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:copiedMove", { pokemonName: getPokemonNameWithAffix(user), moveName: copiedMove.name }));
|
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:copiedMove", { pokemonName: getPokemonNameWithAffix(user), moveName: copiedMove.name }));
|
||||||
globalScene.eventTarget.dispatchEvent(new MovesetChangedEvent(target.id, newMove));
|
globalScene.eventTarget.dispatchEvent(new MovesetChangedEvent(user.id, newMove));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ import { SwitchType } from "#enums/switch-type";
|
|||||||
import type { TrainerSlot } from "#enums/trainer-slot";
|
import type { TrainerSlot } from "#enums/trainer-slot";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
import { SummonDataResetEvent } from "#events/battle-scene";
|
import { MovesetChangedEvent, SummonDataResetEvent } from "#events/battle-scene";
|
||||||
import { doShinySparkleAnim } from "#field/anims";
|
import { doShinySparkleAnim } from "#field/anims";
|
||||||
import {
|
import {
|
||||||
BaseStatModifier,
|
BaseStatModifier,
|
||||||
@ -2836,6 +2836,7 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (this.summonData.moveset) {
|
if (this.summonData.moveset) {
|
||||||
this.summonData.moveset[moveIndex] = move;
|
this.summonData.moveset[moveIndex] = move;
|
||||||
}
|
}
|
||||||
|
globalScene.eventTarget.dispatchEvent(new MovesetChangedEvent(this.id, move));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user