Fix Sleep Talk bugs

This commit is contained in:
LaukkaE 2024-04-18 22:49:07 +03:00 committed by Samuel H
parent e07ba5680d
commit d7ee958d29
1 changed files with 3 additions and 2 deletions

View File

@ -2929,7 +2929,7 @@ export class RandomMovesetMoveAttr extends OverrideMoveEffectAttr {
: moveTargets.targets.indexOf(target.getBattlerIndex()) > -1 : moveTargets.targets.indexOf(target.getBattlerIndex()) > -1
? [ target.getBattlerIndex() ] ? [ target.getBattlerIndex() ]
: [ moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ]; : [ moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ];
user.getMoveQueue().push({ move: move.moveId, targets: targets, ignorePP: this.enemyMoveset }); user.getMoveQueue().push({ move: move.moveId, targets: targets, ignorePP: true });
user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, moveset[moveIndex], true)); user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, moveset[moveIndex], true));
return true; return true;
} }
@ -4117,7 +4117,8 @@ export function initMoves() {
new SelfStatusMove(Moves.SLEEP_TALK, Type.NORMAL, -1, 10, -1, 0, 2) new SelfStatusMove(Moves.SLEEP_TALK, Type.NORMAL, -1, 10, -1, 0, 2)
.attr(BypassSleepAttr) .attr(BypassSleepAttr)
.attr(RandomMovesetMoveAttr) .attr(RandomMovesetMoveAttr)
.condition((user, target, move) => user.status?.effect === StatusEffect.SLEEP), .condition((user, target, move) => user.status?.effect === StatusEffect.SLEEP)
.ignoresVirtual(),
new StatusMove(Moves.HEAL_BELL, Type.NORMAL, -1, 5, -1, 0, 2) new StatusMove(Moves.HEAL_BELL, Type.NORMAL, -1, 5, -1, 0, 2)
.soundBased() .soundBased()
.target(MoveTarget.USER_AND_ALLIES) .target(MoveTarget.USER_AND_ALLIES)