Add missing attribute to counter

This commit is contained in:
Sirz Benjie 2025-08-19 12:22:40 -05:00
parent f361b8efed
commit 53fb2585aa
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
2 changed files with 3 additions and 1 deletions

View File

@ -8715,6 +8715,7 @@ export function initMoves() {
.attr(WeightPowerAttr),
new AttackMove(MoveId.COUNTER, PokemonType.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, -5, 1)
.attr(CounterDamageAttr, 2, MoveCategory.PHYSICAL)
.attr(CounterRedirectAttr, MoveCategory.PHYSICAL)
.condition(counterAttackCondition_Physical, 3)
.target(MoveTarget.ATTACKER),
new AttackMove(MoveId.SEISMIC_TOSS, PokemonType.FIGHTING, MoveCategory.PHYSICAL, -1, 100, 20, -1, 0, 1)

View File

@ -709,6 +709,7 @@ export class MovePhase extends PokemonPhase {
}
if (this.thirdFailureCheck()) {
console.log("Move failed during third failure check");
return;
}
@ -730,6 +731,7 @@ export class MovePhase extends PokemonPhase {
// TODO: Move this to the Move effect phase where it belongs.
// Fourth failure check happens _after_ protean
if (!move.applyConditions(user, opponent, 4)) {
console.log("Move failed during fourth failure check");
this.failMove();
return;
}
@ -943,7 +945,6 @@ export class MovePhase extends PokemonPhase {
applyMoveAttrs("CounterRedirectAttr", this.pokemon, null, this.move.getMove(), targetHolder);
this.targets[0] = targetHolder.value;
if (targetHolder.value === BattlerIndex.ATTACKER) {
console.log("%cSkipping counter attack target resolution", "color: red");
this.fail();
}
}