mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-26 02:02:20 +02:00
Removing redundant .leaveField() calls
This commit is contained in:
parent
b057fcd715
commit
de47693a9d
@ -4921,7 +4921,6 @@ class ForceSwitchOutHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (switchOutTarget.hp > 0) {
|
if (switchOutTarget.hp > 0) {
|
||||||
switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH);
|
|
||||||
globalScene.prependToPhase(new SwitchPhase(this.switchType, switchOutTarget.getFieldIndex(), true, true), MoveEndPhase);
|
globalScene.prependToPhase(new SwitchPhase(this.switchType, switchOutTarget.getFieldIndex(), true, true), MoveEndPhase);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -6122,7 +6122,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
if (switchOutTarget.hp > 0) {
|
if (switchOutTarget.hp > 0) {
|
||||||
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
||||||
switchOutTarget.leaveField(true);
|
|
||||||
const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)];
|
const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)];
|
||||||
globalScene.prependToPhase(
|
globalScene.prependToPhase(
|
||||||
new SwitchSummonPhase(
|
new SwitchSummonPhase(
|
||||||
@ -6135,7 +6134,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
MoveEndPhase
|
MoveEndPhase
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH);
|
|
||||||
globalScene.prependToPhase(
|
globalScene.prependToPhase(
|
||||||
new SwitchPhase(
|
new SwitchPhase(
|
||||||
this.switchType,
|
this.switchType,
|
||||||
@ -6164,7 +6162,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
if (switchOutTarget.hp > 0) {
|
if (switchOutTarget.hp > 0) {
|
||||||
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
if (this.switchType === SwitchType.FORCE_SWITCH) {
|
||||||
switchOutTarget.leaveField(true);
|
|
||||||
const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)];
|
const slotIndex = eligibleNewIndices[user.randSeedInt(eligibleNewIndices.length)];
|
||||||
globalScene.prependToPhase(
|
globalScene.prependToPhase(
|
||||||
new SwitchSummonPhase(
|
new SwitchSummonPhase(
|
||||||
@ -6177,7 +6174,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
|||||||
MoveEndPhase
|
MoveEndPhase
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
switchOutTarget.leaveField(this.switchType === SwitchType.SWITCH);
|
|
||||||
globalScene.prependToPhase(
|
globalScene.prependToPhase(
|
||||||
new SwitchSummonPhase(
|
new SwitchSummonPhase(
|
||||||
this.switchType,
|
this.switchType,
|
||||||
|
Loading…
Reference in New Issue
Block a user