@@ -58,6 +58,8 @@ export function calculateSMSS(
58
58
checkKlutz ( defender ) ;
59
59
checkSeedBoost ( attacker , field ) ;
60
60
checkSeedBoost ( defender , field ) ;
61
+ checkDauntlessShield ( attacker ) ;
62
+ checkDauntlessShield ( defender ) ;
61
63
62
64
computeFinalStats ( gen , attacker , defender , field , 'def' , 'spd' , 'spe' ) ;
63
65
@@ -67,8 +69,6 @@ export function calculateSMSS(
67
69
checkDownload ( defender , attacker ) ;
68
70
checkIntrepidSword ( attacker ) ;
69
71
checkIntrepidSword ( defender ) ;
70
- checkDauntlessShield ( attacker ) ;
71
- checkDauntlessShield ( defender ) ;
72
72
73
73
computeFinalStats ( gen , attacker , defender , field , 'atk' , 'spa' ) ;
74
74
@@ -130,8 +130,7 @@ export function calculateSMSS(
130
130
const isCritical = ! defender . hasAbility ( 'Battle Armor' , 'Shell Armor' ) &&
131
131
( move . isCrit || ( attacker . hasAbility ( 'Merciless' ) && defender . hasStatus ( 'psn' , 'tox' ) ) ) &&
132
132
move . timesUsed === 1 ;
133
-
134
- if ( move . named ( 'Weather Ball' ) ) {
133
+ if ( move . named ( 'Weather Ball' ) || move . originalName === 'Weather Ball' ) {
135
134
const holdingUmbrella = attacker . hasItem ( 'Utility Umbrella' ) ;
136
135
move . type =
137
136
field . hasWeather ( 'Sun' , 'Harsh Sunshine' ) && ! holdingUmbrella ? 'Fire'
@@ -154,7 +153,8 @@ export function calculateSMSS(
154
153
desc . attackerItem = attacker . item ;
155
154
desc . moveBP = move . bp ;
156
155
desc . moveType = move . type ;
157
- } else if ( move . named ( 'Nature Power' , 'Terrain Pulse' ) ) {
156
+ } else if ( move . named ( 'Nature Power' ) || move . originalName === 'Nature Power' ||
157
+ ( ( move . named ( 'Terrain Pulse' ) || move . originalName === 'Terrain Pulse' ) && isGrounded ( attacker , field ) ) ) {
158
158
move . type =
159
159
field . hasTerrain ( 'Electric' ) ? 'Electric'
160
160
: field . hasTerrain ( 'Grassy' ) ? 'Grass'
@@ -234,6 +234,8 @@ export function calculateSMSS(
234
234
} else if ( defender . types [ 1 ] && effectiveness [ defender . types [ 1 ] ] ! === 0 ) {
235
235
typeEffectiveness = type1Effectiveness ;
236
236
}
237
+ } else if ( typeEffectiveness === 0 && move . hasType ( 'Ground' ) && defender . hasItem ( 'Iron Ball' ) ) {
238
+ typeEffectiveness = 1 ;
237
239
}
238
240
239
241
if ( typeEffectiveness === 0 ) {
@@ -256,7 +258,8 @@ export function calculateSMSS(
256
258
( move . hasType ( 'Electric' ) &&
257
259
defender . hasAbility ( 'Lightning Rod' , 'Motor Drive' , 'Volt Absorb' ) ) ||
258
260
( move . hasType ( 'Ground' ) &&
259
- ! field . isGravity && ! move . named ( 'Thousand Arrows' ) && defender . hasAbility ( 'Levitate' ) ) ||
261
+ ! field . isGravity && ! defender . hasItem ( 'Iron Ball' ) &&
262
+ ! move . named ( 'Thousand Arrows' ) && defender . hasAbility ( 'Levitate' ) ) ||
260
263
( move . flags . bullet && defender . hasAbility ( 'Bulletproof' ) ) ||
261
264
( move . flags . sound && ! move . named ( 'Clangorous Soul' ) && defender . hasAbility ( 'Soundproof' ) ) ||
262
265
( move . priority > 0 && defender . hasAbility ( 'Queenly Majesty' , 'Dazzling' ) )
@@ -648,7 +651,7 @@ export function calculateBasePowerSMSS(
648
651
desc . moveBP = basePower ;
649
652
break ;
650
653
case 'Terrain Pulse' :
651
- basePower = move . bp * ( field . terrain ? 2 : 1 ) ;
654
+ basePower = move . bp * ( field . terrain && isGrounded ( attacker , field ) ? 2 : 1 ) ;
652
655
desc . moveBP = basePower ;
653
656
break ;
654
657
case 'Fling' :
@@ -812,6 +815,11 @@ export function calculateBPModsSMSS(
812
815
desc . isBattery = true ;
813
816
}
814
817
818
+ if ( field . attackerSide . isPowerSpot ) {
819
+ bpMods . push ( 0x14CD ) ;
820
+ desc . isPowerSpot = true ;
821
+ }
822
+
815
823
// Sheer Force does not power up max moves or remove the effects (SadisticMystic)
816
824
const analyticBoost = attacker . hasAbility ( 'Analytic' ) &&
817
825
( turnOrder !== 'first' || field . defenderSide . isSwitching === 'out' ) ;
0 commit comments