Make -Ate abilities share a ...Boosted property (#9174)

This commit is contained in:
pyuk-bot
2022-12-13 21:43:52 -06:00
committed by GitHub
parent 9b8ff871cf
commit 2bc2100a7b
6 changed files with 59 additions and 31 deletions

View File

@@ -56,12 +56,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Flying';
move.aerilateBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.aerilateBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
name: "Aerilate",
rating: 4,
@@ -1427,12 +1427,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Electric';
move.galvanizeBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.galvanizeBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
name: "Galvanize",
rating: 4,
@@ -2699,12 +2699,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
// TODO: Figure out actual interaction
!(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Normal';
move.normalizeBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.normalizeBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
name: "Normalize",
rating: 0,
@@ -2975,12 +2975,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Fairy';
move.pixilateBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.pixilateBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
name: "Pixilate",
rating: 4,
@@ -3472,12 +3472,12 @@ export const Abilities: {[abilityid: string]: AbilityData} = {
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Ice';
move.refrigerateBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.refrigerateBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
name: "Refrigerate",
rating: 4,

View File

@@ -2,7 +2,7 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
aerilate: {
inherit: true,
onBasePower(basePower, pokemon, target, move) {
if (move.aerilateBoosted) return this.chainModify([5325, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([5325, 4096]);
},
rating: 4.5,
},
@@ -64,14 +64,14 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
pixilate: {
inherit: true,
onBasePower(basePower, pokemon, target, move) {
if (move.pixilateBoosted) return this.chainModify([5325, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([5325, 4096]);
},
rating: 4.5,
},
refrigerate: {
inherit: true,
onBasePower(basePower, pokemon, target, move) {
if (move.refrigerateBoosted) return this.chainModify([5325, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([5325, 4096]);
},
rating: 4.5,
},

View File

@@ -1419,12 +1419,12 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) && !(move.isZ && move.category !== 'Status')) {
move.type = 'Fairy';
move.pixilateBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.pixilateBoosted) return this.chainModify([0x1333, 0x1000]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([0x1333, 0x1000]);
},
isPermanent: true,
name: "Power of Alchemy (Sylveon)",

View File

@@ -576,14 +576,12 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) && !(move.isZ && move.category !== 'Status')) {
move.type = 'Dragon';
// @ts-ignore
move.drakeskinBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
// @ts-ignore
if (move.drakeskinBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
gen: 8,
},
@@ -797,16 +795,16 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) && !(move.isZ && move.category !== 'Status')) {
move.type = 'Ice';
move.refrigerateBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
if (move.refrigerateBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
onModifyMovePriority: -2,
onModifyMove(move, attacker) {
if (move.refrigerateBoosted) return;
if (move.typeChangerBoosted === this.effect) return;
move.onTry = function () {
this.field.addPseudoWeather('echoedvoiceclone');
this.field.pseudoWeather.echoedvoiceclone.lastmove = move.name;
@@ -1039,14 +1037,12 @@ export const Abilities: {[k: string]: ModdedAbilityData} = {
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) && !(move.isZ && move.category !== 'Status')) {
move.type = 'Poison';
// @ts-ignore
move.venomizeBoosted = true;
move.typeChangerBoosted = this.effect;
}
},
onBasePowerPriority: 23,
onBasePower(basePower, pokemon, target, move) {
// @ts-ignore
if (move.venomizeBoosted) return this.chainModify([4915, 4096]);
if (move.typeChangerBoosted === this.effect) return this.chainModify([4915, 4096]);
},
name: "Venomize",
gen: 8,

View File

@@ -304,12 +304,10 @@ export interface ActiveMove extends MutableMove, RuinableMove {
hit: number;
moveHitData?: MoveHitData;
ability?: Ability;
aerilateBoosted?: boolean;
allies?: Pokemon[];
auraBooster?: Pokemon;
causedCrashDamage?: boolean;
forceStatus?: ID;
galvanizeBoosted?: boolean;
hasAuraBreak?: boolean;
hasBounced?: boolean;
hasSheerForce?: boolean;
@@ -318,16 +316,14 @@ export interface ActiveMove extends MutableMove, RuinableMove {
lastHit?: boolean;
magnitude?: number;
negateSecondary?: boolean;
normalizeBoosted?: boolean;
pixilateBoosted?: boolean;
pranksterBoosted?: boolean;
refrigerateBoosted?: boolean;
selfDropped?: boolean;
selfSwitch?: 'copyvolatile' | 'shedtail' | boolean;
spreadHit?: boolean;
stab?: number;
statusRoll?: string;
totalDamage?: number | false;
typeChangerBoosted?: Effect;
willChangeForme?: boolean;
infiltrates?: boolean;

View File

@@ -0,0 +1,36 @@
'use strict';
const assert = require('../../assert');
const common = require('../../common');
let battle;
const ates = {Refrigerate: 'Ice', Pixilate: 'Fairy', Aerilate: 'Flying', Galvanize: 'Electric'};
for (const ate in ates) {
describe(ate, function () {
afterEach(function () {
battle.destroy();
});
it(`should make most Normal type moves become ${ates[ate]} type`, function () {
battle = common.createBattle([[
{species: 'Genesect', ability: ate, moves: ['hypervoice']},
], [
{species: 'Gengar', moves: ['sleeptalk']},
]]);
battle.makeChoices();
assert.false.fullHP(battle.p2.active[0]);
});
it('should boost the power of Normal type attacks by 20% when changing their type', function () {
battle = common.createBattle([[
{species: 'Genesect', ability: ate, moves: ['hypervoice']},
], [
{species: 'Blissey', ability: 'shellarmor', moves: ['sleeptalk']},
]]);
battle.makeChoices();
assert.bounded(battle.p2.active[0].hp, [651 - 83, 651 - 70]);
});
});
}