Remove partial Magic Bounce implementation

This commit is contained in:
NightKev 2024-09-04 19:46:34 -07:00
parent e44c423aa8
commit 89b5893f82
1 changed files with 0 additions and 16 deletions

View File

@ -14,7 +14,6 @@ import { PokemonMultiHitModifier, FlinchChanceModifier, EnemyAttackStatusEffectC
import i18next from "i18next"; import i18next from "i18next";
import * as Utils from "#app/utils.js"; import * as Utils from "#app/utils.js";
import { PokemonPhase } from "./pokemon-phase"; import { PokemonPhase } from "./pokemon-phase";
import { Abilities } from "#enums/abilities";
export class MoveEffectPhase extends PokemonPhase { export class MoveEffectPhase extends PokemonPhase {
public move: PokemonMove; public move: PokemonMove;
@ -125,10 +124,6 @@ export class MoveEffectPhase extends PokemonPhase {
/** Has the move successfully hit a target (for damage) yet? */ /** Has the move successfully hit a target (for damage) yet? */
let hasHit: boolean = false; let hasHit: boolean = false;
/** Hazards bounce if any opposing Pokémon has the ability **/
/** TODO: Update to support future Magic Coat / Magic Bounce implementation **/
let hazardBounce: boolean = false;
for (const target of targets) { for (const target of targets) {
/** /**
* If the move missed a target, stop all future hits against that target * If the move missed a target, stop all future hits against that target
@ -163,17 +158,6 @@ export class MoveEffectPhase extends PokemonPhase {
/** Does this phase represent the invoked move's first strike? */ /** Does this phase represent the invoked move's first strike? */
const firstHit = (user.turnData.hitsLeft === user.turnData.hitCount); const firstHit = (user.turnData.hitsLeft === user.turnData.hitCount);
/** Check if current target is affected by Magic Bounce or used Magic Coat
* If they did, then field hazards should be bounced back in their entirety
*/
const bounceStatus = target.hasAbility(Abilities.MAGIC_BOUNCE) || (this.scene.currentBattle.turnCommands[target.getBattlerIndex()]?.move?.move === Moves.MAGIC_COAT);
hazardBounce = hazardBounce && bounceStatus;
// Prevent ENEMY_SIDE targeted moves from occurring twice in double battles
if (move.moveTarget === MoveTarget.ENEMY_SIDE && target !== targets[targets.length-1]) {
continue;
}
// Only log the move's result on the first strike // Only log the move's result on the first strike
if (firstHit) { if (firstHit) {
user.pushMoveHistory(moveHistoryEntry); user.pushMoveHistory(moveHistoryEntry);