Skip to content

Commit

Permalink
Fix 4b324e5
Browse files Browse the repository at this point in the history
This reverts the other changes that were related to that commit.
  • Loading branch information
TheImmortal committed Dec 2, 2019
1 parent 953531c commit a133a5b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions data/abilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion data/mods/gen7/abilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down
2 changes: 1 addition & 1 deletion sim/dex-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ export class Template extends BasicEffect implements Readonly<BasicEffect & Temp
}

if (!this.gen && this.num >= 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;
Expand Down

0 comments on commit a133a5b

Please sign in to comment.