Skip to content

Commit

Permalink
Add support for moves breaking screens
Browse files Browse the repository at this point in the history
  • Loading branch information
shrianshChari committed Oct 6, 2024
1 parent e7a4fda commit e2c949d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions calc/src/mechanics/gen3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ export function calculateADV(
desc.weather = field.weather;
desc.moveType = move.type;
desc.moveBP = move.bp;
} else if (move.named('Brick Break')) {
field.defenderSide.isReflect = false;
field.defenderSide.isLightScreen = false;
}

const typeEffectivenessPrecedenceRules = [
Expand Down
3 changes: 3 additions & 0 deletions calc/src/mechanics/gen4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export function calculateDPP(
desc.attackerItem = attacker.item;
desc.moveBP = move.bp;
desc.moveType = move.type;
} else if (move.named('Brick Break')) {
field.defenderSide.isReflect = false;
field.defenderSide.isLightScreen = false;
}

if (attacker.hasAbility('Normalize') && !move.named('Struggle')) {
Expand Down
3 changes: 3 additions & 0 deletions calc/src/mechanics/gen56.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ export function calculateBWXY(
: field.hasTerrain('Misty') ? 'Fairy'
: 'Normal';
}
} else if (move.named('Brick Break')) {
field.defenderSide.isReflect = false;
field.defenderSide.isLightScreen = false;
}

let hasAteAbilityTypeChange = false;
Expand Down
8 changes: 8 additions & 0 deletions calc/src/mechanics/gen789.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ export function calculateSMSSSV(
} else if (attacker.named('Tauros-Paldea-Aqua')) {
type = 'Water';
}

field.defenderSide.isReflect = false;
field.defenderSide.isLightScreen = false;
field.defenderSide.isAuroraVeil = false;
} else if (move.named('Ivy Cudgel')) {
if (attacker.name.includes('Ogerpon-Cornerstone')) {
type = 'Rock';
Expand All @@ -286,6 +290,10 @@ export function calculateSMSSSV(
) {
move.target = 'allAdjacentFoes';
type = 'Stellar';
} else if (move.named('Brick Break', 'Psychic Fangs')) {
field.defenderSide.isReflect = false;
field.defenderSide.isLightScreen = false;
field.defenderSide.isAuroraVeil = false;
}

let hasAteAbilityTypeChange = false;
Expand Down

0 comments on commit e2c949d

Please sign in to comment.