mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-08-28 12:04:28 -05:00
Make -Ate abilities share a ...Boosted property (#9174)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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)",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
36
test/sim/misc/ateabilities.js
Normal file
36
test/sim/misc/ateabilities.js
Normal 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]);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user