mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 08:19:33 +02:00
Fix style issues
This commit is contained in:
parent
c61eb6eb63
commit
780802a683
@ -2721,11 +2721,11 @@ export class AwaitCombinedPledgeAttr extends OverrideMoveEffectAttr {
|
|||||||
|
|
||||||
const overridden = args[0] as Utils.BooleanHolder;
|
const overridden = args[0] as Utils.BooleanHolder;
|
||||||
|
|
||||||
const allyMovePhase = user.scene.findPhase<MovePhase>(phase => phase instanceof MovePhase && phase.pokemon.isPlayer() === user.isPlayer());
|
const allyMovePhase = user.scene.findPhase<MovePhase>((phase) => phase instanceof MovePhase && phase.pokemon.isPlayer() === user.isPlayer());
|
||||||
if (allyMovePhase) {
|
if (allyMovePhase) {
|
||||||
const allyMove = allyMovePhase.move.getMove();
|
const allyMove = allyMovePhase.move.getMove();
|
||||||
if (allyMove !== move && allyMove.hasAttr(AwaitCombinedPledgeAttr)) {
|
if (allyMove !== move && allyMove.hasAttr(AwaitCombinedPledgeAttr)) {
|
||||||
[user, allyMovePhase.pokemon].forEach(p => p.turnData.combiningPledge = move.id);
|
[user, allyMovePhase.pokemon].forEach((p) => p.turnData.combiningPledge = move.id);
|
||||||
|
|
||||||
// "{userPokemonName} is waiting for {allyPokemonName}'s move..."
|
// "{userPokemonName} is waiting for {allyPokemonName}'s move..."
|
||||||
user.scene.queueMessage(i18next.t("moveTriggers:awaitingPledge", {
|
user.scene.queueMessage(i18next.t("moveTriggers:awaitingPledge", {
|
||||||
@ -2735,7 +2735,7 @@ export class AwaitCombinedPledgeAttr extends OverrideMoveEffectAttr {
|
|||||||
|
|
||||||
// Move the ally's MovePhase (if needed) so that the ally moves next
|
// Move the ally's MovePhase (if needed) so that the ally moves next
|
||||||
const allyMovePhaseIndex = user.scene.phaseQueue.indexOf(allyMovePhase);
|
const allyMovePhaseIndex = user.scene.phaseQueue.indexOf(allyMovePhase);
|
||||||
const firstMovePhaseIndex = user.scene.phaseQueue.findIndex(phase => phase instanceof MovePhase);
|
const firstMovePhaseIndex = user.scene.phaseQueue.findIndex((phase) => phase instanceof MovePhase);
|
||||||
if (allyMovePhaseIndex !== firstMovePhaseIndex) {
|
if (allyMovePhaseIndex !== firstMovePhaseIndex) {
|
||||||
user.scene.prependToPhase(user.scene.phaseQueue.splice(allyMovePhaseIndex, 1)[0], MovePhase);
|
user.scene.prependToPhase(user.scene.phaseQueue.splice(allyMovePhaseIndex, 1)[0], MovePhase);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user