Skip to content

Commit

Permalink
Fix missing negation on mayBounce check
Browse files Browse the repository at this point in the history
  • Loading branch information
SirzBenjie authored Feb 1, 2025
1 parent 301b9ae commit e561ad5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/phases/move-effect-phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export class MoveEffectPhase extends PokemonPhase {
* (and not random target) and failed the hit check against its target (MISS), log the move
* as FAILed or MISSed (depending on the conditions above) and end this phase.
*/
if (!hasActiveTargets || (mayBounce && !move.hasAttr(VariableTargetAttr) && !move.isMultiTarget() && !targetHitChecks[this.targets[0]] && !targets[0].getTag(ProtectedTag) && !isImmune)) {
if (!hasActiveTargets || (!mayBounce && !move.hasAttr(VariableTargetAttr) && !move.isMultiTarget() && !targetHitChecks[this.targets[0]] && !targets[0].getTag(ProtectedTag) && !isImmune)) {
this.stopMultiHit();
if (hasActiveTargets) {
globalScene.queueMessage(i18next.t("battle:attackMissed", { pokemonNameWithAffix: this.getFirstTarget() ? getPokemonNameWithAffix(this.getFirstTarget()!) : "" }));
Expand Down

0 comments on commit e561ad5

Please sign in to comment.