From 0553852cb0062c3b0059141e28d166354cc71388 Mon Sep 17 00:00:00 2001 From: The Immortal Date: Mon, 2 Dec 2019 18:06:38 +0400 Subject: [PATCH] Fix 4b324e536 This reverts the other changes that were related to that commit. --- data/abilities.js | 10 +++++----- data/mods/gen7/abilities.js | 2 +- sim/dex-data.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/data/abilities.js b/data/abilities.js index edab8fddd0855..647d304fb9b64 100644 --- a/data/abilities.js +++ b/data/abilities.js @@ -4641,9 +4641,9 @@ let BattleAbilities = { if (pokemon.baseTemplate.baseSpecies !== 'Darmanitan' || pokemon.transformed) { return; } - if (pokemon.hp <= pokemon.maxhp / 2 && pokemon.template.forme !== 'Zen') { + if (pokemon.hp <= pokemon.maxhp / 2 && !['Zen', 'Zen-Galar'].includes(pokemon.template.forme)) { pokemon.addVolatile('zenmode'); - } else if (pokemon.hp > pokemon.maxhp / 2 && pokemon.template.forme === 'Zen') { + } else if (pokemon.hp > pokemon.maxhp / 2 && ['Zen', 'Zen-Galar'].includes(pokemon.template.forme)) { pokemon.addVolatile('zenmode'); // in case of base Darmanitan-Zen pokemon.removeVolatile('zenmode'); } @@ -4652,18 +4652,18 @@ let BattleAbilities = { if (!pokemon.volatiles['zenmode'] || !pokemon.hp) return; pokemon.transformed = false; delete pokemon.volatiles['zenmode']; - pokemon.formeChange(pokemon.template.baseSpecies, this.effect, false, '[silent]'); + pokemon.formeChange(pokemon.template.inheritsLearnsetFrom, this.effect, false, '[silent]'); }, effect: { onStart(pokemon) { if (!pokemon.template.species.includes('Galar')) { if (pokemon.template.speciesid !== 'darmanitanzen') pokemon.formeChange('Darmanitan-Zen'); } else { - if (pokemon.template.speciesid !== 'darmanitangalarzen') pokemon.formeChange('Darmanitan-Galar-Zen'); + if (pokemon.template.speciesid !== 'darmanitanzengalar') pokemon.formeChange('Darmanitan-Zen-Galar'); } }, onEnd(pokemon) { - if (pokemon.template.forme === 'Zen') pokemon.formeChange(pokemon.template.baseSpecies); + if ('Zen', 'Zen-Galar'].includes(pokemon.template.forme)) pokemon.formeChange(pokemon.template.inheritsLearnsetFrom); }, }, id: "zenmode", diff --git a/data/mods/gen7/abilities.js b/data/mods/gen7/abilities.js index 5971eec4693bd..a290e3431bb8d 100644 --- a/data/mods/gen7/abilities.js +++ b/data/mods/gen7/abilities.js @@ -8,7 +8,7 @@ let BattleAbilities = { shortDesc: "(Mimikyu only) First hit deals 0 damage, breaks disguise.", onUpdate(pokemon) { if (['mimikyu', 'mimikyutotem'].includes(pokemon.template.speciesid) && this.effectData.busted) { - let templateid = pokemon.template.speciesid + 'busted'; + let templateid = pokemon.template.speciesid === 'mimikyutotem' ? 'Mimikyu-Busted-Totem' : 'Mimikyu-Busted'; pokemon.formeChange(templateid, this.effect, true); } }, diff --git a/sim/dex-data.ts b/sim/dex-data.ts index 2a985f75cd8a4..e8a8d4603ec20 100644 --- a/sim/dex-data.ts +++ b/sim/dex-data.ts @@ -676,7 +676,7 @@ export class Template extends BasicEffect implements Readonly= 1) { - if (this.num >= 810 || this.species.includes('Galar') || this.forme === 'Gmax') { + if (this.num >= 810 || this.forme.endsWith('Galar') || this.forme === 'Gmax') { this.gen = 8; } else if (this.num >= 722 || this.forme.startsWith('Alola') || this.forme === 'Starter') { this.gen = 7;