You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes#6346
The `AfterDamage` event has been replaced with `DamagingHit`, which
which happens for damaging moves after secondaries.
The `AfterHit` event has also been moved after `DamagingHit`, to make
sure Knock Off still procs after Rocky Helmet.
`AfterHit` is no longer a valid event on `secondary` and `self` blocks,
because it's meaningless in those blocks, anyway. All `self.onAfterHit`
and `secondary.onAfterHit` handlers have been moved to `onHit`, which
should have the same timing in practice.
Copy file name to clipboardexpand all lines: data/mods/gen4/abilities.js
+4-4
Original file line number
Diff line number
Diff line change
@@ -33,10 +33,10 @@ let BattleAbilities = {
33
33
"colorchange": {
34
34
inherit: true,
35
35
desc: "This Pokemon's type changes to match the type of the last move that hit it, unless that type is already one of its types. This effect applies after each hit from a multi-hit move.",
shortDesc: "100% chance a Pokemon making contact with this Pokemon will be paralyzed.",
150
150
},
151
151
"cutecharm": {
152
152
inherit: true,
153
-
onAfterDamage(damage,target,source,move){
154
-
if(move&&move.flags['contact']){
153
+
onDamagingHit(damage,target,source,move){
154
+
if(move.flags['contact']){
155
155
source.addVolatile('Attract',target);
156
156
}
157
157
},
@@ -160,8 +160,8 @@ let BattleAbilities = {
160
160
},
161
161
"poisonpoint": {
162
162
inherit: true,
163
-
onAfterDamage(damage,target,source,move){
164
-
if(move&&move.flags['contact']){
163
+
onDamagingHit(damage,target,source,move){
164
+
if(move.flags['contact']){
165
165
source.trySetStatus('psn',target);
166
166
}
167
167
},
@@ -416,7 +416,7 @@ let BattleAbilities = {
416
416
returndamage;
417
417
}
418
418
},
419
-
onAfterDamage(){},
419
+
onDamagingHit(){},
420
420
desc: "This ability reduces incoming move damage by 1/10 of the user's max HP and increases the user's Speed for the first hit after switch-in (and does not activate again until the next switch-in).",
421
421
shortDesc: "Reduces incoming move damage by 1/10 of the user's max HP and increases the user's Spe for the 1st hit after switch-in (doesn't activate until next switch-in).",
0 commit comments