Fix Gulp Missile's interaction with Disguise

This commit is contained in:
Marty-D 2020-10-14 11:43:10 -04:00 committed by GitHub
parent a65faf263f
commit 131aa64a5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1212,17 +1212,8 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
target.formeChange('cramorant', move);
}
},
// The Dive part of this mechanic is implemented in Dive's `onTryMove` in moves.js
onAnyDamage(damage, target, source, effect) {
if (
effect && effect.id === 'surf' && source.hasAbility('gulpmissile') &&
source.species.name === 'Cramorant' && !source.transformed
) {
const forme = source.hp <= source.maxhp / 2 ? 'cramorantgorging' : 'cramorantgulping';
source.formeChange(forme, effect);
}
},
onAnyAfterSubDamage(damage, target, source, effect) {
// The Dive part of this mechanic is implemented in Dive's `onTryMove` in moves.ts
onSourceTryPrimaryHit(target, source, effect) {
if (
effect && effect.id === 'surf' && source.hasAbility('gulpmissile') &&
source.species.name === 'Cramorant' && !source.transformed