Unimplemented moves cannot be selected by the play
parent
716388c92b
commit
49f2a5d3eb
|
@ -1568,7 +1568,17 @@ export class CommandPhase extends FieldPhase {
|
||||||
const moveId = !useStruggle ? cursor > -1 ? playerPokemon.getMoveset()[cursor].moveId : Moves.NONE : Moves.STRUGGLE;
|
const moveId = !useStruggle ? cursor > -1 ? playerPokemon.getMoveset()[cursor].moveId : Moves.NONE : Moves.STRUGGLE;
|
||||||
const turnCommand: TurnCommand = { command: Command.FIGHT, cursor: cursor, move: { move: moveId, targets: [], ignorePP: args[0] }, args: args };
|
const turnCommand: TurnCommand = { command: Command.FIGHT, cursor: cursor, move: { move: moveId, targets: [], ignorePP: args[0] }, args: args };
|
||||||
const moveTargets: MoveTargetSet = args.length < 3 ? getMoveTargets(playerPokemon, moveId) : args[2];
|
const moveTargets: MoveTargetSet = args.length < 3 ? getMoveTargets(playerPokemon, moveId) : args[2];
|
||||||
if (!moveId)
|
if (moveId) {
|
||||||
|
const move = playerPokemon.getMoveset()[cursor];
|
||||||
|
if (move.getName().endsWith(' (N)')) {
|
||||||
|
this.scene.ui.setMode(Mode.MESSAGE);
|
||||||
|
this.scene.ui.showText(`${move.getName().slice(0, -4)} is not yet implemented and cannot be selected.`, null, () => {
|
||||||
|
this.scene.ui.clearText();
|
||||||
|
this.scene.ui.setMode(Mode.FIGHT, this.fieldIndex);
|
||||||
|
}, null, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else
|
||||||
turnCommand.targets = [ this.fieldIndex ];
|
turnCommand.targets = [ this.fieldIndex ];
|
||||||
console.log(moveTargets, playerPokemon.name);
|
console.log(moveTargets, playerPokemon.name);
|
||||||
if (moveTargets.targets.length <= 1 || moveTargets.multiple)
|
if (moveTargets.targets.length <= 1 || moveTargets.multiple)
|
||||||
|
|
Loading…
Reference in New Issue