mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-21 06:49:35 +02:00
Fix mistimed/dupe showMoveText and leftover TODO
This commit is contained in:
parent
acc33e88d0
commit
ae553760b4
@ -313,8 +313,6 @@ export class MovePhase extends BattlePhase {
|
|||||||
const move = this.move.getMove();
|
const move = this.move.getMove();
|
||||||
const targets = this.getActiveTargetPokemon();
|
const targets = this.getActiveTargetPokemon();
|
||||||
|
|
||||||
this.showMoveText();
|
|
||||||
|
|
||||||
if (move.applyConditions(this.pokemon, targets[0], move)) {
|
if (move.applyConditions(this.pokemon, targets[0], move)) {
|
||||||
// Protean and Libero apply on the charging turn of charge moves
|
// Protean and Libero apply on the charging turn of charge moves
|
||||||
applyPreAttackAbAttrs(PokemonTypeChangeAbAttr, this.pokemon, null, this.move.getMove());
|
applyPreAttackAbAttrs(PokemonTypeChangeAbAttr, this.pokemon, null, this.move.getMove());
|
||||||
@ -322,7 +320,6 @@ export class MovePhase extends BattlePhase {
|
|||||||
this.showMoveText();
|
this.showMoveText();
|
||||||
this.scene.unshiftPhase(new MoveChargePhase(this.scene, this.pokemon.getBattlerIndex(), this.targets[0], this.move));
|
this.scene.unshiftPhase(new MoveChargePhase(this.scene, this.pokemon.getBattlerIndex(), this.targets[0], this.move));
|
||||||
} else {
|
} else {
|
||||||
// Copied from useMove()
|
|
||||||
this.pokemon.pushMoveHistory({ move: this.move.moveId, targets: this.targets, result: MoveResult.FAIL, virtual: this.move.virtual });
|
this.pokemon.pushMoveHistory({ move: this.move.moveId, targets: this.targets, result: MoveResult.FAIL, virtual: this.move.virtual });
|
||||||
|
|
||||||
let failedText: string | undefined;
|
let failedText: string | undefined;
|
||||||
@ -332,6 +329,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
failedText = failureMessage;
|
failedText = failureMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.showMoveText();
|
||||||
this.showFailedText(failedText);
|
this.showFailedText(failedText);
|
||||||
|
|
||||||
// Remove the user from its semi-invulnerable state (if applicable)
|
// Remove the user from its semi-invulnerable state (if applicable)
|
||||||
@ -452,8 +450,6 @@ export class MovePhase extends BattlePhase {
|
|||||||
* - Lapses `AFTER_MOVE` tags:
|
* - Lapses `AFTER_MOVE` tags:
|
||||||
* - This handles the effects of {@link Moves.SUBSTITUTE Substitute}
|
* - This handles the effects of {@link Moves.SUBSTITUTE Substitute}
|
||||||
* - Removes the second turn of charge moves
|
* - Removes the second turn of charge moves
|
||||||
*
|
|
||||||
* TODO: handle charge moves more gracefully
|
|
||||||
*/
|
*/
|
||||||
protected handlePreMoveFailures(): void {
|
protected handlePreMoveFailures(): void {
|
||||||
if (this.cancelled || this.failed) {
|
if (this.cancelled || this.failed) {
|
||||||
|
Loading…
Reference in New Issue
Block a user