Fix some bugs
Fix softlock with charging moves; fix double summon bug with Dragon Tail and similar moves in a trainer battle
This commit is contained in:
1 parent
957b5d0fa7
commit
4a575a45a9
7 files changed
+12
-13
No files matched your search
+2
-2
@@ -13,7 +13,6 @@ import { Abilities, BlockRecoilDamageAttr, IgnoreContactAbAttr, applyAbAttrs } f
|
||||
import { PokemonHeldItemModifier } from "../modifier/modifier";
|
||||
import { BattlerIndex } from "../battle";
|
||||
import { Stat } from "./pokemon-stat";
|
||||
import { Species } from "./species";
|
||||
|
||||
export enum MoveCategory {
|
||||
PHYSICAL,
|
||||
@@ -2580,7 +2579,8 @@ export class ForceSwitchOutAttr extends MoveEffectAttr {
|
||||
switchOutTarget.hideInfo();
|
||||
switchOutTarget.setVisible(false);
|
||||
|
||||
user.scene.unshiftPhase(new SwitchSummonPhase(user.scene, switchOutTarget.getFieldIndex(), user.scene.currentBattle.trainer.getNextSummonIndex(), false, this.batonPass, false));
|
||||
if (switchOutTarget.hp)
|
||||
user.scene.unshiftPhase(new SwitchSummonPhase(user.scene, switchOutTarget.getFieldIndex(), user.scene.currentBattle.trainer.getNextSummonIndex(), false, this.batonPass, false));
|
||||
} else {
|
||||
switchOutTarget.hideInfo().then(() => switchOutTarget.destroy());
|
||||
switchOutTarget.hp = 0;
|
||||
|
||||
Reference in new issue
Block a user