Skip to content

Commit

Permalink
Dynamic Max Moves get the right type, name and desc still wrong (smog…
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmagier committed Mar 29, 2021
1 parent e593be2 commit 01d9656
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calc/src/mechanics/gen78.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,7 @@ export function calculateSMSS(
const isCritical = !defender.hasAbility('Battle Armor', 'Shell Armor') &&
(move.isCrit || (attacker.hasAbility('Merciless') && defender.hasStatus('psn', 'tox'))) &&
move.timesUsed === 1;

if (move.named('Weather Ball')) {
if (move.named('Weather Ball') || move.originalName === 'Weather Ball') {
const holdingUmbrella = attacker.hasItem('Utility Umbrella');
move.type =
field.hasWeather('Sun', 'Harsh Sunshine') && !holdingUmbrella ? 'Fire'
Expand All @@ -154,7 +153,8 @@ export function calculateSMSS(
desc.attackerItem = attacker.item;
desc.moveBP = move.bp;
desc.moveType = move.type;
} else if (move.named('Nature Power') || (move.named('Terrain Pulse') && isGrounded(attacker, field))) {
} else if (move.named('Nature Power') || move.originalName === 'Nature Power' ||
((move.named('Terrain Pulse') || move.originalName === 'Terrain Pulse') && isGrounded(attacker, field))) {
move.type =
field.hasTerrain('Electric') ? 'Electric'
: field.hasTerrain('Grassy') ? 'Grass'
Expand Down

0 comments on commit 01d9656

Please sign in to comment.