Minor fixes
This commit is contained in:
parent
76dba4c300
commit
f86b348afc
|
@ -5426,7 +5426,7 @@ export class CallMoveAttr extends OverrideMoveEffectAttr {
|
||||||
? [ target.getBattlerIndex() ]
|
? [ target.getBattlerIndex() ]
|
||||||
: [ moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ];
|
: [ moveTargets.targets[user.randSeedInt(moveTargets.targets.length)] ];
|
||||||
user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true });
|
user.getMoveQueue().push({ move: move.id, targets: targets, virtual: true, ignorePP: true });
|
||||||
user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, new PokemonMove(move.id, 0, 0, true), true));
|
user.scene.unshiftPhase(new MovePhase(user.scene, user, targets, new PokemonMove(move.id, 0, 0, true), true, true));
|
||||||
|
|
||||||
await Promise.resolve(initMoveAnim(user.scene, move.id).then(() => {
|
await Promise.resolve(initMoveAnim(user.scene, move.id).then(() => {
|
||||||
loadMoveAnimAssets(user.scene, [ move.id ], true);
|
loadMoveAnimAssets(user.scene, [ move.id ], true);
|
||||||
|
|
|
@ -65,7 +65,7 @@ export class CommandPhase extends FieldPhase {
|
||||||
if (moveIndex > -1 && playerPokemon.getMoveset()[moveIndex]!.isUsable(playerPokemon, queuedMove.ignorePP)) { // TODO: is the bang correct?
|
if (moveIndex > -1 && playerPokemon.getMoveset()[moveIndex]!.isUsable(playerPokemon, queuedMove.ignorePP)) { // TODO: is the bang correct?
|
||||||
this.handleCommand(Command.FIGHT, moveIndex, queuedMove.ignorePP, { targets: queuedMove.targets, multiple: queuedMove.targets.length > 1 });
|
this.handleCommand(Command.FIGHT, moveIndex, queuedMove.ignorePP, { targets: queuedMove.targets, multiple: queuedMove.targets.length > 1 });
|
||||||
} else if (queuedMove.virtual) {
|
} else if (queuedMove.virtual) {
|
||||||
this.handleCommand(Command.FIGHT, moveIndex, queuedMove);
|
this.handleCommand(Command.FIGHT, moveIndex, queuedMove.ignorePP, queuedMove);
|
||||||
} else {
|
} else {
|
||||||
this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex);
|
this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex);
|
||||||
}
|
}
|
||||||
|
@ -90,12 +90,12 @@ export class CommandPhase extends FieldPhase {
|
||||||
if (cursor === -1 ||
|
if (cursor === -1 ||
|
||||||
playerPokemon.trySelectMove(cursor, args[0] as boolean) ||
|
playerPokemon.trySelectMove(cursor, args[0] as boolean) ||
|
||||||
(useStruggle = cursor > -1 && !playerPokemon.getMoveset().filter(m => m?.isUsable(playerPokemon)).length)) {
|
(useStruggle = cursor > -1 && !playerPokemon.getMoveset().filter(m => m?.isUsable(playerPokemon)).length)) {
|
||||||
const turnMove: TurnMove | undefined = (args.length === 1 ? (args[0] as TurnMove) : undefined);
|
const turnMove: TurnMove | undefined = (args.length === 2 ? (args[1] as TurnMove) : undefined);
|
||||||
|
|
||||||
let moveId: Moves;
|
let moveId: Moves;
|
||||||
if (useStruggle) {
|
if (useStruggle) {
|
||||||
moveId = Moves.STRUGGLE;
|
moveId = Moves.STRUGGLE;
|
||||||
} else if (turnMove) {
|
} else if (turnMove !== undefined) {
|
||||||
moveId = turnMove.move;
|
moveId = turnMove.move;
|
||||||
} else if (cursor > -1) {
|
} else if (cursor > -1) {
|
||||||
moveId = playerPokemon.getMoveset()[cursor]!.moveId;
|
moveId = playerPokemon.getMoveset()[cursor]!.moveId;
|
||||||
|
|
Loading…
Reference in New Issue