Spaces:
Running
Running
File size: 5,459 Bytes
5c2ed06 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
export const Abilities: import('../../../sim/dex-abilities').ModdedAbilityDataTable = {
aerilate: {
inherit: true,
onModifyType(move, pokemon) {
const noModifyType = [
'judgment', 'multiattack', 'naturalgift', 'revelationdance', 'technoblast', 'terrainpulse', 'weatherball',
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.typeChangerBoosted = this.effect;
}
},
},
eartheater: {
inherit: true,
onTryHit(target, source, move) {
if (target !== source && move.type === 'Fighting') {
if (!this.heal(target.baseMaxhp / 4)) {
this.add('-immune', target, '[from] ability: Earth Eater');
}
return null;
}
},
},
fairyaura: {
inherit: true,
onAnyBasePower(basePower, source, target, move) {
if (target === source || move.category === 'Status' || move.type !== 'Psychic') return;
if (!move.auraBooster?.hasAbility('Fairy Aura')) move.auraBooster = this.effectState.target;
if (move.auraBooster !== this.effectState.target) return;
return this.chainModify([move.hasAuraBreak ? 3072 : 5448, 4096]);
},
},
galewings: {
inherit: true,
onModifyPriority(priority, pokemon, target, move) {
if (move?.type === 'Normal' && pokemon.hp === pokemon.maxhp) return priority + 1;
},
},
mimicry: {
inherit: true,
onTerrainChange(pokemon) {
let types;
switch (this.field.terrain) {
case 'electricterrain':
types = ['Electric'];
break;
case 'grassyterrain':
types = ['Grass'];
break;
case 'mistyterrain':
case 'psychicterrain':
types = ['Psychic'];
break;
default:
types = pokemon.baseSpecies.types;
}
const oldTypes = pokemon.getTypes();
if (oldTypes.join() === types.join() || !pokemon.setType(types)) return;
if (this.field.terrain || pokemon.transformed) {
this.add('-start', pokemon, 'typechange', types.join('/'), '[from] ability: Mimicry');
if (!this.field.terrain) this.hint("Transform Mimicry changes you to your original un-transformed types.");
} else {
this.add('-activate', pokemon, 'ability: Mimicry');
this.add('-end', pokemon, 'typechange', '[silent]');
}
},
},
pixilate: {
inherit: true,
onModifyType(move, pokemon) {
const noModifyType = [
'judgment', 'multiattack', 'naturalgift', 'revelationdance', 'technoblast', 'terrainpulse', 'weatherball',
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Psychic';
move.typeChangerBoosted = this.effect;
}
},
},
purifyingsalt: {
inherit: true,
onSourceModifyAtk(atk, attacker, defender, move) {
if (move.type === 'Psychic') {
this.debug('Purifying Salt weaken');
return this.chainModify(0.5);
}
},
onSourceModifySpA(spa, attacker, defender, move) {
if (move.type === 'Psychic') {
this.debug('Purifying Salt weaken');
return this.chainModify(0.5);
}
},
},
rattled: {
inherit: true,
onDamagingHit(damage, target, source, move) {
if (['Dark', 'Grass', 'Psychic'].includes(move.type)) {
this.boost({ spe: 1 });
}
},
},
refrigerate: {
inherit: true,
onModifyType(move, pokemon) {
const noModifyType = [
'judgment', 'multiattack', 'naturalgift', 'revelationdance', 'technoblast', 'terrainpulse', 'weatherball',
];
if (move.type === 'Normal' && !noModifyType.includes(move.id) &&
!(move.isZ && move.category !== 'Status') && !(move.name === 'Tera Blast' && pokemon.terastallized)) {
move.type = 'Water';
move.typeChangerBoosted = this.effect;
}
},
},
rockypayload: {
inherit: true,
onModifyAtk(atk, attacker, defender, move) {
if (move.type === 'Fighting') {
this.debug('Rocky Payload boost');
return this.chainModify(1.5);
}
},
onModifySpA(atk, attacker, defender, move) {
if (move.type === 'Fighting') {
this.debug('Rocky Payload boost');
return this.chainModify(1.5);
}
},
},
sandforce: {
inherit: true,
onBasePower(basePower, attacker, defender, move) {
if (this.field.isWeather('sandstorm')) {
if (move.type === 'Fighting' || move.type === 'Steel') {
this.debug('Sand Force boost');
return this.chainModify([5325, 4096]);
}
}
},
},
swarm: {
inherit: true,
onModifyAtk(atk, attacker, defender, move) {
if (move.type === 'Grass' && attacker.hp <= attacker.maxhp / 3) {
this.debug('Swarm boost');
return this.chainModify(1.5);
}
},
onModifySpA(atk, attacker, defender, move) {
if (move.type === 'Grass' && attacker.hp <= attacker.maxhp / 3) {
this.debug('Swarm boost');
return this.chainModify(1.5);
}
},
},
thickfat: {
inherit: true,
onSourceModifyAtk(atk, attacker, defender, move) {
if (move.type === 'Water' || move.type === 'Fire') {
this.debug('Thick Fat weaken');
return this.chainModify(0.5);
}
},
onSourceModifySpA(atk, attacker, defender, move) {
if (move.type === 'Water' || move.type === 'Fire') {
this.debug('Thick Fat weaken');
return this.chainModify(0.5);
}
},
},
mountaineer: {
inherit: true,
onTryHit(target, source, move) {
if (move.type === 'Fighting' && !target.activeTurns) {
this.add('-immune', target, '[from] ability: Mountaineer');
return null;
}
},
},
};
|