fixed oopsie

This commit is contained in:
Bertie690 2025-08-02 17:24:08 -04:00
parent 606b3994d0
commit ac438fd174

View File

@ -294,10 +294,14 @@ export class GameManager {
.getMoveset() .getMoveset()
[movePosition].getMove(); [movePosition].getMove();
if (move.isMultiTarget() && targetIndex !== undefined) { // Multi target attacks do not select a target
expect.fail(`targetIndex was passed to selectMove() but move ("${move.name}") is not targetted`); if (move.isMultiTarget()) {
if (targetIndex !== undefined) {
expect.fail(`targetIndex was passed to selectMove() but move ("${move.name}") is not targeted`);
}
} else {
handler.setCursor(targetIndex ?? BattlerIndex.ENEMY);
} }
handler.setCursor(targetIndex ?? BattlerIndex.ENEMY);
handler.processInput(Button.ACTION); handler.processInput(Button.ACTION);
}, },
() => () =>