mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-05 21:17:43 -05:00
Update OMotM
Still have to code the second OMotM, but put the first one up, and removed old seasonal.
This commit is contained in:
parent
313fe362fa
commit
29bfbd89f2
|
|
@ -406,196 +406,43 @@ exports.Formats = [
|
|||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
{
|
||||
name: "Inheritance",
|
||||
name: "350 Cup",
|
||||
desc: [
|
||||
"Pokémon may use the ability and moves of another, as long as they forfeit their own learnset.",
|
||||
"• <a href=\"https://www.smogon.com/forums/threads/3529252/\">Inheritance</a>"
|
||||
"Pokémon with a base stat total of 350 or lower get their stats doubled.",
|
||||
"• <a href=\"https://www.smogon.com/forums/threads/3512945/\">350 Cup</a>"
|
||||
],
|
||||
section: "OM of the Month",
|
||||
column: 2,
|
||||
|
||||
ruleset: ['Pokemon', 'Species Clause', 'Moody Clause', 'Baton Pass Clause', 'Evasion Moves Clause', 'OHKO Clause',
|
||||
'Swagger Clause', 'Endless Battle Clause', 'Team Preview', 'HP Percentage Mod', 'Sleep Clause Mod', 'Cancel Mod'
|
||||
],
|
||||
banlist: ['Unreleased', 'Illegal', 'Assist', 'Chatter'],
|
||||
customBans: {
|
||||
receiver: {
|
||||
arceus:1, archeops:1, darkrai:1, deoxys:1, deoxysattack:1, deoxysspeed:1, dialga:1, giratina:1, giratinaorigin:1,
|
||||
groudon:1, hooh:1, hoopaunbound:1, keldeo:1, kyogre:1, kyuremblack:1, kyuremwhite:1, lugia:1, mewtwo:1, palkia:1,
|
||||
rayquaza:1, regigigas:1, reshiram:1, shayminsky:1, shedinja:1, slaking:1, xerneas:1, yveltal:1, zekrom:1
|
||||
},
|
||||
donor: {masquerain:1, sableye:1, smeargle:1},
|
||||
inheritedAbilities: {arenatrap:1, galewings:1, hugepower:1, imposter:1, parentalbond:1, purepower:1, shadowtag:1, wonderguard:1},
|
||||
items: {blazikenite:1, gengarite:1, kangaskhanite:1, mawilite:1, salamencite:1, souldew:1}
|
||||
},
|
||||
noChangeForme: true,
|
||||
noChangeAbility: true,
|
||||
abilityMap: (function () {
|
||||
let Pokedex = require('./../tools.js').data.Pokedex;
|
||||
if (!Pokedex) return null; // Process is data-unaware
|
||||
|
||||
let abilityMap = Object.create(null);
|
||||
for (let speciesid in Pokedex) {
|
||||
let pokemon = Pokedex[speciesid];
|
||||
if (pokemon.num < 1 || pokemon.num > 720) continue;
|
||||
for (let key in pokemon.abilities) {
|
||||
let abilityId = toId(pokemon.abilities[key]);
|
||||
if (abilityMap[abilityId]) {
|
||||
abilityMap[abilityId][pokemon.evos ? 'push' : 'unshift'](speciesid);
|
||||
} else {
|
||||
abilityMap[abilityId] = [speciesid];
|
||||
}
|
||||
}
|
||||
}
|
||||
return abilityMap;
|
||||
})(),
|
||||
getEvoFamily: function (species) {
|
||||
let template = Tools.getTemplate(species);
|
||||
while (template.prevo) {
|
||||
template = Tools.getTemplate(template.prevo);
|
||||
}
|
||||
return template.speciesid;
|
||||
},
|
||||
onValidateTeam: function (team, format, teamHas) {
|
||||
// Donor Clause
|
||||
let evoFamilyLists = [];
|
||||
for (let i = 0; i < team.length; i++) {
|
||||
let set = team[i];
|
||||
if (!set.abilitySources) continue;
|
||||
evoFamilyLists.push(set.abilitySources.map(format.getEvoFamily).unique());
|
||||
}
|
||||
|
||||
// Checking actual full incompatibility would require expensive algebra.
|
||||
// Instead, we only check the trivial case of multiple Pokémon only legal for exactly one family. FIXME?
|
||||
let requiredFamilies = Object.create(null);
|
||||
for (let i = 0; i < evoFamilyLists.length; i++) {
|
||||
let evoFamilies = evoFamilyLists[i];
|
||||
if (evoFamilies.length !== 1) continue;
|
||||
if (requiredFamilies[evoFamilies[0]]) return ["You are limited to one inheritance from each family by the Donor Clause.", "(You inherit more than once from " + this.getTemplate(evoFamilies[0]).species + "'s.)"];
|
||||
requiredFamilies[evoFamilies[0]] = 1;
|
||||
}
|
||||
},
|
||||
validateSet: function (set, teamHas) {
|
||||
if (!this.format.abilityMap) return this.validateSet(set, teamHas); // shouldn't happen
|
||||
|
||||
this.format.noChangeForme = false;
|
||||
let problems = this.tools.getFormat('Pokemon').onChangeSet.call(this.tools, set, this.format) || [];
|
||||
this.format.noChangeForme = true;
|
||||
|
||||
if (problems.length) return problems;
|
||||
|
||||
let species = toId(set.species);
|
||||
let template = this.tools.getTemplate(species);
|
||||
if (!template.exists) return ["" + set.species + " is not a real Pok\u00E9mon."];
|
||||
if (template.isUnreleased) return ["" + set.species + " is unreleased."];
|
||||
if (template.speciesid in this.format.customBans.receiver) {
|
||||
return ["" + set.species + " is banned."];
|
||||
} else if (!this.tools.data.FormatsData[species] || !this.tools.data.FormatsData[species].tier) {
|
||||
if (toId(template.baseSpecies) in this.format.customBans.receiver) {
|
||||
return ["" + template.baseSpecies + " is banned."];
|
||||
}
|
||||
}
|
||||
|
||||
let name = set.name;
|
||||
|
||||
let abilityId = toId(set.ability);
|
||||
if (!abilityId) return ["" + (set.name || set.species) + " must have an ability."];
|
||||
let pokemonWithAbility = this.format.abilityMap[abilityId];
|
||||
if (!pokemonWithAbility) return ["" + set.ability + " is an invalid ability."];
|
||||
let isBaseAbility = Object.values(template.abilities).map(toId).indexOf(abilityId) >= 0;
|
||||
if (!isBaseAbility && abilityId in this.format.customBans.inheritedAbilities) return ["" + set.ability + " is banned from being passed down."];
|
||||
|
||||
// Items must be fully validated here since we may pass a different item to the base set validator.
|
||||
let item = this.tools.getItem(set.item);
|
||||
if (item.id) {
|
||||
if (!item.exists) return ["" + set.item + " is an invalid item."];
|
||||
if (item.isUnreleased) return ["" + (set.name || set.species) + "'s item " + item.name + " is unreleased."];
|
||||
if (item.id in this.format.customBans.items) return ["" + item.name + " is banned."];
|
||||
}
|
||||
|
||||
let validSources = set.abilitySources = []; // evolutionary families
|
||||
for (let i = 0; i < pokemonWithAbility.length; i++) {
|
||||
let donorTemplate = this.tools.getTemplate(pokemonWithAbility[i]);
|
||||
let evoFamily = this.format.getEvoFamily(donorTemplate);
|
||||
|
||||
if (validSources.indexOf(evoFamily) >= 0) {
|
||||
// The existence of a legal set has already been established.
|
||||
// We only keep iterating to find all legal donor families (Donor Clause).
|
||||
// Skip this redundant iteration.
|
||||
continue;
|
||||
}
|
||||
|
||||
if (set.name === set.species) delete set.name;
|
||||
if (donorTemplate.species !== set.species && toId(donorTemplate.species) in this.format.customBans.donor) {
|
||||
problems = ["" + donorTemplate.species + " is banned from passing abilities down."];
|
||||
continue;
|
||||
} else if (donorTemplate.species !== set.species && abilityId in this.format.customBans.inheritedAbilities) {
|
||||
problems = ["The ability " + this.tools.getAbility(abilityId).name + " is banned from being passed down."];
|
||||
continue;
|
||||
}
|
||||
set.species = donorTemplate.species;
|
||||
if (donorTemplate.species !== template.species && donorTemplate.requiredItem) {
|
||||
// Bypass forme validation. Relevant to inherit from Giratina-O, and Mega/Primal formes.
|
||||
set.item = donorTemplate.requiredItem;
|
||||
}
|
||||
problems = this.validateSet(set, teamHas) || [];
|
||||
if (!problems.length) {
|
||||
validSources.push(evoFamily);
|
||||
}
|
||||
if (validSources.length > 1) {
|
||||
// This is an optimization only valid for the current basic implementation of Donor Clause.
|
||||
// Remove if the FIXME? above actually gets fixed.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Restore the intended species, name and item.
|
||||
set.species = template.species;
|
||||
set.name = (name === set.species ? "" : name);
|
||||
set.item = item.name;
|
||||
|
||||
if (!validSources.length && pokemonWithAbility.length > 1) {
|
||||
return ["" + (set.name || set.species) + " set is illegal."];
|
||||
}
|
||||
if (!validSources.length) {
|
||||
problems.unshift("" + (set.name || set.species) + " has an illegal set with an ability from " + this.tools.getTemplate(pokemonWithAbility[0]).name);
|
||||
return problems;
|
||||
mod: '350cup',
|
||||
ruleset: ['Ubers', 'Evasion Moves Clause'],
|
||||
banlist: ['Abra', 'Cranidos', 'Darumaka', 'Gastly', 'Pawniard', 'Spritzee', 'DeepSeaScale', 'DeepSeaTooth', 'Light Ball', 'Thick Club'],
|
||||
validateSet: function (set) {
|
||||
var template = Tools.getTemplate(set.species);
|
||||
var item = this.getItem(set.item);
|
||||
if (item.name === 'Eviolite' && Object.values(template.baseStats).sum() <= 350) {
|
||||
return ['Eviolite is banned on Pokémon with 350 or lower BST.'];
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Same Type Stealth Rock",
|
||||
/*{
|
||||
name: "Little Cup Extra",
|
||||
desc: [
|
||||
"Stealth Rock inflicts damage calculated from the primary type of the user.",
|
||||
"• <a href=\"https://www.smogon.com/forums/threads/3511171/\">Same Type Stealth Rock</a>"
|
||||
"LC but with Pokémon being able to learn all moves from their evolutions.",
|
||||
"• <a href=\"https://www.smogon.com/forums/threads/3516429/\">Little Cup Extra</a>"
|
||||
],
|
||||
section: "OM of the Month",
|
||||
|
||||
mod: 'stsr',
|
||||
ruleset: ['OU']
|
||||
},
|
||||
{
|
||||
mod: 'lce',
|
||||
ruleset: ['LC']
|
||||
},*/
|
||||
/*{
|
||||
name: "[Seasonal] Super Squad Smackdown",
|
||||
desc: ["• <a href=\"https://www.smogon.com/forums/threads/3491902/\">Seasonal Ladder</a>"],
|
||||
section: "OM of the Month",
|
||||
team: 'randomSeasonalHero',
|
||||
ruleset: ['HP Percentage Mod', 'Sleep Clause Mod', 'Cancel Mod'],
|
||||
onEffectiveness: function (typeMod, target, move, type) {
|
||||
if (this.activePokemon && this.activePokemon.name === 'Magneto' && move.id === 'flashcannon' && type === 'Steel') return 1;
|
||||
},
|
||||
onSwitchInPriority: 10,
|
||||
onSwitchIn: function (pokemon) {
|
||||
switch (pokemon.name) {
|
||||
case 'Iron Man':
|
||||
pokemon.addType('Steel');
|
||||
this.add('-start', pokemon, 'typechange', 'Fire/Steel');
|
||||
break;
|
||||
case 'Spiderman':
|
||||
this.boost({atk: 1, spe: 2}, pokemon, pokemon, 'Spidey Sense');
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
ruleset: ['HP Percentage Mod', 'Sleep Clause Mod', 'Cancel Mod']
|
||||
},*/
|
||||
{
|
||||
name: "CAP",
|
||||
desc: [
|
||||
|
|
|
|||
|
|
@ -1187,7 +1187,7 @@ exports.BattleScripts = {
|
|||
|
||||
// Not very useful without their supporting moves
|
||||
case 'batonpass':
|
||||
if (!counter.setupType && !counter['speedsetup'] && !hasMove['cosmicpower'] && !hasMove['substitute'] && !hasMove['wish'] && !hasAbility['Speed Boost']) rejected = true;
|
||||
if (!counter.setupType && !counter['speedsetup'] && !hasMove['substitute'] && !hasMove['wish'] && !hasAbility['Speed Boost']) rejected = true;
|
||||
break;
|
||||
case 'focuspunch':
|
||||
if (!hasMove['substitute'] || counter.damagingMoves < 2) rejected = true;
|
||||
|
|
@ -3180,100 +3180,6 @@ exports.BattleScripts = {
|
|||
shiny: !this.random(template.id === 'missingno' ? 4 : 1024)
|
||||
};
|
||||
},
|
||||
randomSeasonalHeroTeam: function () {
|
||||
let teams = [
|
||||
['Wolverine', 'Professor X', 'Cyclops', 'Nightcrawler', 'Phoenix', 'Emma Frost', 'Storm', 'Iceman'],
|
||||
['Magneto', 'Mystique', 'Quicksilver', 'Scarlet Witch', 'Blob', 'Pyro', 'Sabretooth', 'Juggernaut', 'Toad'],
|
||||
['Captain America', 'Hulk', 'Iron Man', 'Hawkeye', 'Black Widow', 'Thor', 'Nick Fury', 'Vision'],
|
||||
['Starlord', 'Gamora', 'Groot', 'Rocket Raccoon', 'Drax the Destroyer', 'Nova'],
|
||||
['Batman', 'Superman', 'Aquaman', 'Wonder Woman', 'Green Lantern', 'The Flash', 'Green Arrow', 'Firestorm'],
|
||||
['Robin', 'Starfire', 'Cyborg', 'Beast Boy', 'Raven', 'Jinx', 'Terra', 'Blue Beetle'],
|
||||
['Mr. Fantastic', 'Invisible Woman', 'Thing', 'Human Torch', 'Spiderman', 'Ant-Man'],
|
||||
['Baymax', 'Honey Lemon', 'GoGo Tomago', 'Wasabi-no-Ginger', 'Fredzilla', 'Silver Samurai', 'Sunfire'],
|
||||
['Joker', 'Deadshot', 'Harley Quinn', 'Boomerang', 'Killer Croc', 'Enchantress'],
|
||||
['Poison Ivy', 'Bane', 'Scarecrow', 'Two-Face', 'Penguin', 'Mr. Freeze', 'Catwoman']
|
||||
];
|
||||
let mons = {
|
||||
'Wolverine': {species: 'excadrill', ability: 'Regenerator', item: 'lifeorb', gender: 'M'},
|
||||
'Professor X': {species: 'beheeyem', moves: ['psystrike', 'thunderbolt', 'calmmind', 'aurasphere', 'signalbeam'], gender: 'M'},
|
||||
'Cyclops': {species: 'sigilyph', moves: ['icebeam', 'psybeam', 'signalbeam', 'chargebeam'], item: 'lifeorb',
|
||||
ability: 'tintedlens', gender: 'M'},
|
||||
'Nightcrawler': {species: 'sableye', gender: 'M'}, 'Phoenix': {species: 'Ho-oh', gender: 'F'},
|
||||
'Emma Frost': {species: 'dianciemega', gender: 'F'}, 'Storm': {species: 'tornadus', gender: 'F'},
|
||||
'Iceman': {species: 'regice', moves: ['freezedry', 'thunderbolt', 'focusblast', 'thunderwave'], gender: 'M'},
|
||||
'Magneto': {species: 'magnezone', required: 'flashcannon', gender: 'M'}, 'Quicksilver': {species: 'lucario', gender: 'M', required: 'extremespeed'}, 'Scarlet Witch': {species: 'delphox', gender: 'F'},
|
||||
'Blob': {species: 'snorlax', gender: 'M'}, 'Pyro': {species: 'magmortar', gender: 'M'}, 'Juggernaut': {species: 'conkeldurr', gender: 'M'}, 'Toad': {species: 'poliwrath', gender: 'M'},
|
||||
'Mystique': {species: 'mew', moves: ['knockoff', 'zenheadbutt', 'stormthrow', 'acrobatics', 'fakeout'], ability: 'Illusion', gender: 'F'},
|
||||
'Sabretooth': {species: 'zangoose', ability: 'Tough Claws', item: 'lifeorb',
|
||||
moves: ['swordsdance', 'quickattack', 'doubleedge', 'closecombat', 'knockoff'], gender: 'M'},
|
||||
'Captain America': {species: 'braviary', gender: 'M'}, 'Hulk': {species: 'machamp', shiny: true, gender: 'M'},
|
||||
'Iron Man': {species: 'magmortar', moves: ['fireblast', 'flashcannon', 'thunderbolt', 'energyball', 'focusblast', 'substitute'], gender: 'M'},
|
||||
'Hawkeye': {species: 'gliscor', item: 'flyinggem', moves: ['thousandarrows', 'acrobatics', 'stoneedge', 'knockoff'], ability: 'hypercutter', gender: 'M'},
|
||||
'Black Widow': {species: 'greninja', gender: 'F', shiny: true}, 'Thor': {species: 'ampharosmega', gender: (this.random(10) ? 'M' : 'F')}, 'Nick Fury': {species: 'primeape', gender: 'M'},
|
||||
'Vision': {species: 'genesectshock', shiny: true}, 'Starlord': {species: 'medicham', required: 'teeterdance', gender: 'M'},
|
||||
'Groot': {species: 'trevenant', moves: ['hornleech', 'shadowforce', 'hammerarm', 'icepunch'], item: 'assaultvest', gender: 'N'},
|
||||
'Rocket Raccoon': {species: 'linoone', gender: 'M'}, 'Gamora': {species: 'gardevoirmega', gender: 'F'},
|
||||
'Drax the Destroyer': {species: 'throh', gender: 'M'}, 'Nova': {species: 'electivire', gender: 'M'}, 'Batman': {species: 'crobat', gender: 'M'},
|
||||
'Superman': {species: 'deoxys', gender: 'M'}, 'Aquaman': {species: 'samurott', gender: 'M'}, 'Wonder Woman': {species: 'lopunnymega', gender: 'F'},
|
||||
'Green Lantern': {species: 'reuniclus', moves: ['psyshock', 'shadowball', 'aurasphere', 'recover'], gender: 'M'}, 'The Flash': {species: 'blaziken', gender: 'M'},
|
||||
'Green Arrow': {species: 'sceptilemega', moves: ['dragonpulse', 'thousandarrows', 'seedflare', 'flashcannon'], gender: 'M'},
|
||||
'Firestorm': {species: 'infernape', gender: 'M'}, 'Robin': {species: 'talonflame', gender: 'M'}, 'Starfire': {species: 'latias', gender: 'F'},
|
||||
'Cyborg': {species: 'golurk', gender: 'M'}, 'Raven': {species: 'absolmega', gender: 'F'}, 'Jinx': {species: 'mismagius', gender: 'F'},
|
||||
'Terra': {species: 'nidoqueen', gender: 'F'}, 'Blue Beetle': {species: 'heracross', gender: 'M'}, 'Beast Boy': {species: 'virizion', gender: 'M'},
|
||||
'Mr. Fantastic': {species: 'zygarde', gender: 'M'}, 'Invisible Woman': {species: 'cresselia', gender: 'F'}, 'Thing': {species: 'regirock', gender: 'M'},
|
||||
'Human Torch': {species: 'typhlosion', gender: 'M'}, 'Spiderman': {species: 'Ariados', gender: 'M'}, 'Ant-Man': {species: 'durant', gender: 'M'},
|
||||
'Baymax': {species: 'regigigas'}, 'Honey Lemon': {species: 'goodra', gender: 'F'}, 'GoGo Tomago': {species: 'heliolisk', gender: 'F'},
|
||||
'Wasabi-no-Ginger': {species: 'gallademega', gender: 'M'}, 'Fredzilla': {species: 'tyrantrum', gender: 'M'}, 'Silver Samurai': {species: 'cobalion', gender: 'M'},
|
||||
'Sunfire': {species: 'charizardmegay', gender: 'M'}, 'Joker': {species: 'mrmime', gender: 'M'}, 'Boomerang': {species: 'marowak', gender: 'M'},
|
||||
'Deadshot': {species: 'kingdra', ability: 'No Guard', item: 'scopelens', moves: ['dracometeor', 'hydropump', 'searingshot', 'aurasphere'], gender: 'M'},
|
||||
'Harley Quinn': {species: 'lopunny', gender: 'F'}, 'Killer Croc': {species: 'krookodile', gender: 'M'}, 'Enchantress': {species: 'mesprit', gender: 'F'},
|
||||
'Bane': {species: 'metagross', gender: 'M'}, 'Scarecrow': {species: 'cacturne', moves: ['gunkshot', 'seedbomb', 'knockoff', 'drainpunch'], shiny: true, gender: 'M'},
|
||||
'Penguin': {species: 'empoleon', gender: 'M'}, 'Two-Face': {species: 'zweilous', gender: 'M'}, 'Mr. Freeze': {species: 'beartic', gender: 'M'}, 'Catwoman': {species: 'persian', gender: 'F'},
|
||||
'Poison Ivy': {species: 'roserade', gender: 'F'}
|
||||
};
|
||||
|
||||
if (!this.seasonal) this.seasonal = {};
|
||||
|
||||
let teamDetails = {megaCount: 1, stealthRock: 0, hazardClear: 0};
|
||||
let sides = Object.keys(teams);
|
||||
let side;
|
||||
while (side === undefined || this.seasonal.side === side) {
|
||||
// You can't have both players have the same squad
|
||||
side = this.sampleNoReplace(sides);
|
||||
}
|
||||
if (this.seasonal.side === undefined) this.seasonal.side = side;
|
||||
|
||||
let heroes = teams[side];
|
||||
let pokemonTeam = [];
|
||||
|
||||
for (let i = 0; i < 6; i++) {
|
||||
let hero = this.sampleNoReplace(heroes);
|
||||
let heroTemplate = mons[hero];
|
||||
|
||||
let template = {};
|
||||
if (heroTemplate.moves) template.randomBattleMoves = heroTemplate.moves;
|
||||
if (heroTemplate.required) template.requiredMove = heroTemplate.required;
|
||||
Object.merge(template, this.getTemplate(heroTemplate.species), false, false);
|
||||
|
||||
let pokemon = this.randomSet(template, i, teamDetails);
|
||||
|
||||
if (heroTemplate.ability) pokemon.ability = heroTemplate.ability;
|
||||
if (heroTemplate.gender) pokemon.gender = heroTemplate.gender;
|
||||
if (heroTemplate.item) pokemon.item = heroTemplate.item;
|
||||
pokemon.species = pokemon.name;
|
||||
pokemon.name = hero;
|
||||
pokemon.shiny = !!heroTemplate.shiny;
|
||||
|
||||
pokemonTeam.push(pokemon);
|
||||
|
||||
if (pokemon.ability === 'Snow Warning') teamDetails['hail'] = 1;
|
||||
if (pokemon.ability === 'Drizzle' || pokemon.moves.indexOf('raindance') >= 0) teamDetails['rain'] = 1;
|
||||
if (pokemon.moves.indexOf('stealthrock') >= 0) teamDetails.stealthRock++;
|
||||
if (pokemon.moves.indexOf('defog') >= 0 || pokemon.moves.indexOf('rapidspin') >= 0) teamDetails.hazardClear++;
|
||||
}
|
||||
|
||||
return pokemonTeam;
|
||||
},
|
||||
randomFactorySets: require('./factory-sets.json'),
|
||||
randomFactorySet: function (template, slot, teamData, tier) {
|
||||
let speciesId = toId(template.species);
|
||||
|
|
|
|||
17
mods/350cup/scripts.js
Normal file
17
mods/350cup/scripts.js
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
exports.BattleScripts = {
|
||||
init: function () {
|
||||
for (let i in this.data.Pokedex) {
|
||||
if (Object.values(this.data.Pokedex[i].baseStats).sum() <= 350) {
|
||||
this.modData('Pokedex', i).baseStats['hp'] = this.data.Pokedex[i].baseStats['hp'] * 2;
|
||||
this.modData('Pokedex', i).baseStats['atk'] = this.data.Pokedex[i].baseStats['atk'] * 2;
|
||||
this.modData('Pokedex', i).baseStats['def'] = this.data.Pokedex[i].baseStats['def'] * 2;
|
||||
this.modData('Pokedex', i).baseStats['spa'] = this.data.Pokedex[i].baseStats['spa'] * 2;
|
||||
this.modData('Pokedex', i).baseStats['spd'] = this.data.Pokedex[i].baseStats['spd'] * 2;
|
||||
this.modData('Pokedex', i).baseStats['spe'] = this.data.Pokedex[i].baseStats['spe'] * 2;
|
||||
}
|
||||
}
|
||||
this.modData('Pokedex', 'shedinja').baseStats['hp'] = 1;
|
||||
}
|
||||
};
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
exports.BattleMovedex = {
|
||||
rapidspin: {
|
||||
inherit: true,
|
||||
self: {
|
||||
onHit: function (pokemon) {
|
||||
if (pokemon.hp && pokemon.removeVolatile('leechseed')) {
|
||||
this.add('-end', pokemon, 'Leech Seed', '[from] move: Rapid Spin', '[of] ' + pokemon);
|
||||
}
|
||||
let sideConditions = {spikes:1, toxicspikes:1, stealthrock:1, stickyweb:1};
|
||||
for (let i in sideConditions) {
|
||||
if (i === 'stealthrock' && pokemon.side.sideConditions[i] && pokemon.side.sideConditions[i].type === 'Ghost') continue;
|
||||
if (pokemon.hp && pokemon.side.removeSideCondition(i)) {
|
||||
this.add('-sideend', pokemon.side, this.getEffect(i).name, '[from] move: Rapid Spin', '[of] ' + pokemon);
|
||||
}
|
||||
}
|
||||
if (pokemon.hp && pokemon.volatiles['partiallytrapped']) {
|
||||
pokemon.removeVolatile('partiallytrapped');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
stealthrock: {
|
||||
inherit: true,
|
||||
effect: {
|
||||
onStart: function (side, source) {
|
||||
this.add('-sidestart', side, 'move: Stealth Rock');
|
||||
this.effectData.type = source.getTypes()[0];
|
||||
this.add('-message', '(' + this.effectData.type + '-type)');
|
||||
},
|
||||
onSwitchIn: function (pokemon) {
|
||||
if (pokemon.hasAbility('voltabsorb') && this.effectData.type === 'Electric') {
|
||||
pokemon.side.removeSideCondition('stealthrock');
|
||||
this.add('-sideend', pokemon.side, 'move: Stealth Rock', '[of] ' + pokemon);
|
||||
} else if (pokemon.hasAbility('waterabsorb') && this.effectData.type === 'Water') {
|
||||
pokemon.side.removeSideCondition('stealthrock');
|
||||
this.add('-sideend', pokemon.side, 'move: Stealth Rock', '[of] ' + pokemon);
|
||||
} else if (pokemon.runImmunity(this.effectData.type)) {
|
||||
let typeMod = this.clampIntRange(this.getEffectiveness(this.effectData.type, pokemon), -6, 6);
|
||||
this.damage(pokemon.maxhp * Math.pow(2, typeMod) / 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user