@@ -0,0 +1,294 @@
exports.BattleAbilities = {
"battlearmor": {
desc: "Not very effective hits do two thirds damage to this pokemon.",
shortDesc: "Resisted hits do 2/3 damage to this pokemon.",
onSourceBasePower: function(basePower, attacker, defender, move) {
if (this.getEffectiveness(move.type, defender) < 0) {
this.debug('Battle Armor Weaken');
return basePower*2/3;
}
},
id: "battlearmor",
name: "Battle Armor",
rating: 1,
num: 4
},
"cheekpouch": {
inherit: true,
onEatItem: function (item, pokemon) {
this.heal(pokemon.maxhp / 2);
},
},
"cloudnine": {
inherit: true,
onStart: function(pokemon) {
this.setWeather('');
}
},
"colorchange": {
desc: "This Pokemon's secondary type changes according to it's most powerful attack.",
shortDesc: "This Pokemon's secondary type changes according to it's most powerful attack.",
onStart: function(pokemon) {
var move = this.getMove(pokemon.moveset[0].move);
if (pokemon.types[0] != move.type) {
pokemon.types[1] = move.type;
this.add('-message', pokemon.name+' changed its color to '+pokemon.types+'!');
}
},
id: "colorchange",
name: "Color Change",
rating: 4,
num: 16
},
"defeatist": {
desc: "While this Pokemon has 1/2 or less of its maximum HP, its Attack and Special Attack are halved.",
shortDesc: "While this Pokemon has 1/2 or less of its max HP, its Attack and Sp. Atk are halved.",
onModifyDefPriority: 5,
onModifyDef: function (def, pokemon) {
if (pokemon.hp < pokemon.maxhp / 2) {
return this.chainModify(0.5);
}
},
onModifySpDPriority: 5,
onModifySpD: function (spd, pokemon) {
if (pokemon.hp < pokemon.maxhp / 2) {
return this.chainModify(0.5);
}
},
onResidual: function (pokemon) {
pokemon.update();
},
id: "defeatist",
name: "Defeatist",
rating: -1,
num: 129
},
"drought": {
inherit: true,
onStart: function(source) {
this.setWeather('sunnyday');
this.weatherData.duration = 0;
},
},
"drizzle": {
inherit: true,
onStart: function(source) {
this.setWeather('raindance');
this.weatherData.duration = 0;
},
},
"snowwarning": {
inherit: true,
onStart: function(source) {
this.setWeather('hail');
this.weatherData.duration = 0;
},
},
"sandstream": {
inherit: true,
onStart: function(source) {
this.setWeather('sandstorm');
this.weatherData.duration = 0;
},
},
"flowergift": {
desc: "When Cherrim enters the battle, it will enter Sunshine Forme.. This ability only works on Cherrim, even if it is copied by Role Play, Entrainment, or swapped with Skill Swap.",
shortDesc: "If this Pokemon is Cherrim, it changes to Sunshine Forme.",
onStart: function(pokemon) {
if (pokemon.template.speciesid==='cherrim' && pokemon.formeChange('Cherrim-Sunshine')) {
pokemon.transformed = false;
this.add('-formechange', pokemon, 'Cherrim-Sunshine');
this.add('-message', 'Cherrim blossomed!');
} else {
return false;
}
},
id: "flowergift",
name: "Flower Gift",
rating: 3,
num: 122
},
"grasspelt": {
shortDesc: "If Grassy Terrain is active, this Pokemon's Defense and Special Defense are multiplied by 1.5.",
onModifyDefPriority: 6,
onModifyDef: function (pokemon) {
if (this.isTerrain('grassyterrain')) return this.chainModify(1.5);
},
onModifySpDPriority: 6,
onModifySpD: function (pokemon) {
if (this.isTerrain('grassyterrain')) return this.chainModify(1.5);
},
id: "grasspelt",
name: "Grass Pelt",
rating: 4,
num: 179
},
"healer": {
desc: "Has a 30% chance of curing an adjacent ally's status ailment at the end of each turn in Double and Triple Battles.",
shortDesc: "30% chance of curing an adjacent ally's status at the end of each turn.",
id: "healer",
name: "Healer",
onResidualOrder: 5,
onResidualSubOrder: 2,
onResidual: function (pokemon) {
this.heal(pokemon.maxhp / 18);
},
rating: 0,
num: 131
},
"leafguard": {
desc: "If this Pokemon is active while Sunny Day is in effect, it cannot become poisoned, burned, paralyzed or put to sleep (other than user-induced Rest). Leaf Guard does not heal status effects that existed before Sunny Day came into effect.",
shortDesc: "If Sunny Day is active, this Pokemon cannot be statused and Rest will fail for it.",
onSourceBasePower: function(basePower, attacker, defender, move) {
if (this.isWeather('sunnyday')) {
this.debug('Leaf Guard weaken');
return basePower*2/3;
}
},
id: "leafguard",
name: "Leaf Guard",
rating: 3,
num: 102
},
"overcoat": {
shortDesc: "This Pokemon is immune to powder moves and damage from Sandstorm or Hail.",
onImmunity: function (type, pokemon) {
if (type === 'sandstorm' || type === 'hail' || type === 'powder' || type === 'sunnyday' || type === 'raindance') return false;
},
id: "overcoat",
name: "Overcoat",
rating: 2.5,
num: 142
},
"pickup": {
desc: "Removes hazards on switch-in.",
shortDesc: "Removes hazards on switch-in.",
onStart: function(pokemon) {
var sideConditions = {spikes:1, toxicspikes:1, stickyweb:1};
for (var i in sideConditions) {
if (pokemon.hp && pokemon.side.removeSideCondition(i)) {
this.add('-sideend', pokemon.side, this.getEffect(i).name, '[from] ability: Pickup', '[of] ' + pokemon);
}
}
},
id: "pickup",
name: "Pickup",
rating: 0,
num: 53
},
"parentalbond": {
desc: "This Pokemon's damaging moves become multi-hit moves that hit twice. The second hit has its damage halved. Does not affect multi-hit moves or moves that have multiple targets.",
shortDesc: "This Pokemon's damaging moves hit twice. The second hit has its damage halved.",
onModifyMove: function (move, pokemon, target) {
if (move.category !== 'Status' && !move.selfdestruct && !move.multihit && !move.poweruppunch && ((target.side && target.side.active.length < 2) || move.target in {any:1, normal:1, randomNormal:1})) {
move.multihit = 2;
pokemon.addVolatile('parentalbond');
}
},
effect: {
duration: 1,
onBasePowerPriority: 8,
onBasePower: function (basePower) {
if (this.effectData.hit) {
return this.chainModify(0.3);
} else {
this.effectData.hit = true;
}
}
},
id: "parentalbond",
name: "Parental Bond",
rating: 5,
num: 184
},
"runaway": {
shortDesc: "No competitive use.",
id: "runaway",
name: "Run Away",
onModifyPokemonPriority: -10,
onModifyPokemon: function (pokemon) {
pokemon.trapped = pokemon.maybeTrapped = false;
},
rating: 0,
num: 50
},
"swiftswim": {
shortDesc: "If Rain Dance is active, this Pokemon's Speed is raised by 50%.",
onModifySpe: function (speMod, pokemon) {
if (this.isWeather(['raindance', 'primordialsea'])) {
return this.chain(speMod, 1.5);
}
},
onModifySpe: function (speMod, pokemon) {
if (this.isWeather(['sunnyday', 'desolateland'])) {
return this.chain(speMod, .5);
}
},
id: "swiftswim",
name: "Swift Swim",
rating: 2.5,
num: 33
},
"sandrush": {
desc: "If Sandstorm is active, this Pokemon's Speed is doubled. This Pokemon takes no damage from Sandstorm.",
shortDesc: "If Sandstorm is active, this Pokemon's Speed is doubled; immunity to Sandstorm.",
onModifySpe: function (speMod, pokemon) {
if (this.isWeather('sandstorm')) {
return this.chain(speMod, 1.5);
}
},
onImmunity: function (type, pokemon) {
if (type === 'sandstorm') return false;
},
id: "sandrush",
name: "Sand Rush",
rating: 2.5,
num: 146
},
"chlorophyll": {
shortDesc: "If Sunny Day is active, this Pokemon's Speed is doubled.",
onModifySpe: function (speMod) {
if (this.isWeather(['sunnyday', 'desolateland'])) {
return this.chain(speMod, 1.5);
}
},
onModifySpe: function (speMod) {
if (this.isWeather(['raindance', 'primordialsea'])) {
return this.chain(speMod, .5);
}
},
id: "chlorophyll",
name: "Chlorophyll",
rating: 2.5,
num: 34
},
"tempochange": {
desc: "When Meloetta enters the battle, it will turn into its Zen Mode. This ability only works on Meloetta, even if it is copied by Role Play, Entrainment, or swapped with Skill Swap.",
shortDesc: "If this Pokemon is Meloetta, it changes to its Pirouette Forme.",
onStart: function(pokemon) {
if (pokemon.template.speciesid==='meloetta' && pokemon.formeChange('Meloetta-Pirouette')) {
pokemon.transformed = false;
this.add('-formechange', pokemon, 'Meloetta-Pirouette');
this.add('-message', 'Meloetta transformed!');
} else {
return false;
}
},
id: "Tempo Change",
name: "Tempo Change",
rating: 3,
num: -5
},
"persistent": {
inherit: true,
isNonStandard: false,
},
"rebound": {
inherit: true,
isNonStandard: false,
},
"mountaineer": {
inherit: true,
isNonStandard: false,
},
};

Large diffs are not rendered by default.

@@ -0,0 +1,173 @@
exports.BattleItems = {
"souldew": {
id: "souldew",
name: "Soul Dew",
spritenum: 459,
fling: {
basePower: 30
},
onModifySpAPriority: 1,
onModifySpA: function (spa, pokemon) {
if (pokemon.baseTemplate.num === 380 || pokemon.baseTemplate.num === 381) {
return this.chainModify(1.5);
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.baseTemplate.num === 380 || pokemon.baseTemplate.num === 381) {
return this.chainModify(1.5);
}
},
onModifyDefPriority: 2,
onModifyDef: function (def, pokemon) {
if (pokemon.template.species === 'Shuckle') {
return def * 1.5;
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.template.species === 'Shuckle') {
return spd * 1.5;
}
},

num: 225,
gen: 3,
desc: "If holder is a Latias or a Latios, its Sp. Atk and Sp. Def are 1.5x."
},
"eviolite": {
id: "eviolite",
name: "Eviolite",
spritenum: 130,
fling: {
basePower: 40
},
onModifyDefPriority: 2,
onModifyDef: function (def, pokemon) {
if (pokemon.baseTemplate.nfe) {
return this.chainModify(1.5);
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.baseTemplate.nfe) {
return this.chainModify(1.5);
}
},
onModifyDefPriority: 2,
onModifyDef: function (def, pokemon) {
if (pokemon.template.species === 'Phione') {
return this.chainModify(1.25);
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.template.species === 'Phione') {
return this.chainModify(1.25);
}
},
num: 538,
gen: 5,
desc: "If holder's species can evolve, its Defense and Sp. Def are 1.5x."
},
"lightball": {
inherit: true,
onModifyAtkPriority: 1,
onModifyAtk: function (atk, pokemon) {
if (pokemon.baseTemplate.baseSpecies === 'Raichu') {
return this.chainModify(1.5);
}
},
onModifySpAPriority: 1,
onModifySpA: function (spa, pokemon) {
if (pokemon.baseTemplate.baseSpecies === 'Raichu') {
return this.chainModify(1.5);
}
},
},
"heatrock": {
inherit: true,
onSwitchInPriority: -6,
onSwitchIn: function (pokemon) {
if (pokemon.isActive && pokemon.baseTemplate.species === 'Castform') {
var template = this.getTemplate('Castform-Sunny');
pokemon.formeChange(template);
pokemon.baseTemplate = template;
pokemon.details = template.species + (pokemon.level === 100 ? '' : ', L' + pokemon.level) + (pokemon.gender === '' ? '' : ', ' + pokemon.gender) + (pokemon.set.shiny ? ', shiny' : '');
this.add('detailschange', pokemon, pokemon.details);
this.add('message', pokemon.name + " transformed!");
pokemon.setAbility(template.abilities['H']);
pokemon.baseAbility = pokemon.ability;
}
},
onTakeItem: function (item, source) {
if (source.baseTemplate.baseSpecies === 'Castform') return false;
return true;
}
},
"icyrock": {
inherit: true,
onSwitchInPriority: -6,
onSwitchIn: function (pokemon) {
if (pokemon.isActive && pokemon.baseTemplate.species === 'Castform') {
var template = this.getTemplate('Castform-Snowy');
pokemon.formeChange(template);
pokemon.baseTemplate = template;
pokemon.details = template.species + (pokemon.level === 100 ? '' : ', L' + pokemon.level) + (pokemon.gender === '' ? '' : ', ' + pokemon.gender) + (pokemon.set.shiny ? ', shiny' : '');
this.add('detailschange', pokemon, pokemon.details);
this.add('message', pokemon.name + " transformed!");
pokemon.setAbility(template.abilities['H']);
pokemon.baseAbility = pokemon.ability;
}
},
onTakeItem: function (item, source) {
if (source.baseTemplate.baseSpecies === 'Castform') return false;
return true;
}
},
"damprock": {
inherit: true,
onSwitchInPriority: -6,
onSwitchIn: function (pokemon) {
if (pokemon.isActive && pokemon.baseTemplate.species === 'Castform') {
var template = this.getTemplate('Castform-Rainy');
pokemon.formeChange(template);
pokemon.baseTemplate = template;
pokemon.details = template.species + (pokemon.level === 100 ? '' : ', L' + pokemon.level) + (pokemon.gender === '' ? '' : ', ' + pokemon.gender) + (pokemon.set.shiny ? ', shiny' : '');
this.add('detailschange', pokemon, pokemon.details);
this.add('message', pokemon.name + " transformed!");
pokemon.setAbility(template.abilities['H']);
pokemon.baseAbility = pokemon.ability;
}
},
onTakeItem: function (item, source) {
if (source.baseTemplate.baseSpecies === 'Castform') return false;
return true;
}
},
"blueorb": {
id: "blueorb",
name: "Blue Orb",
spritenum: 41,
onSwitchInPriority: -6,
onSwitchIn: function (pokemon) {
if (pokemon.isActive && pokemon.baseTemplate.species === 'Kyogre') {
var template = this.getTemplate('Kyogre-Primal');
pokemon.formeChange(template);
pokemon.baseTemplate = template;
pokemon.details = template.species + (pokemon.level === 100 ? '' : ', L' + pokemon.level) + (pokemon.gender === '' ? '' : ', ' + pokemon.gender) + (pokemon.set.shiny ? ', shiny' : '');
this.add('detailschange', pokemon, pokemon.details);
this.add('message', pokemon.name + "'s Primal Reversion! It reverted to its primal form!");
pokemon.setAbility(template.abilities['0']);
pokemon.baseAbility = pokemon.ability;
}
},
onTakeItem: function (item, source) {
if (source.baseTemplate.baseSpecies === 'Kyogre') return false;
return true;
},
num: -6,
gen: 6,
desc: "If holder is a Kyogre, this item triggers its Primal Reversion in battle."
},
};
@@ -0,0 +1,340 @@
exports.BattleMovedex = {
"darkvoid": {
num: 464,
accuracy: 95,
basePower: 60,
category: "Special",
desc: "50% chance to sleep the target.",
shortDesc: "50% chance to cause sleep.",
id: "darkvoid",
isViable: true,
name: "Dark Void",
pp: 10,
priority: 0,
flags: {protect: 1, mirror: 1},
secondary: {
chance: 50,
status: 'slp'
},
target: "normal",
type: "Dark"
},
"dizzypunch": {
inherit: true,
basePower: 65,
onBasePower: function (power, user) {
if (user.template.id === 'spinda') return this.chainModify(1.5);
},
secondary: {
chance: 50,
volatileStatus: 'confusion'
}
},
"flameburst": {
num: 481,
accuracy: 100,
basePower: 85,
category: "Special",
desc: "If this move is successful, each ally adjacent to the target loses 1/16 of its maximum HP, rounded down, unless it has the Ability Magic Guard.",
shortDesc: "Damages Pokemon next to the target as well.",
id: "flameburst",
name: "Flame Burst",
pp: 15,
priority: 0,
flags: {protect: 1, pulse: 1, mirror: 1, distance: 1},
secondary: {
chance: 10,
volatileStatus: 'brn'
},
target: "normal",
type: "Fire"
},
"irontail": {
inherit: true,
basePower: 100,
accuracy: 90,
},
"kingsshield": {
num: 588,
accuracy: true,
basePower: 0,
category: "Status",
desc: "The user is protected from most attacks made by other Pokemon during this turn, and Pokemon making contact with the user have their Attack lowered by 2 stages. Non-damaging moves go through this protection. This move has a 1/X chance of being successful, where X starts at 1 and triples each time this move is successfully used. X resets to 1 if this move fails or if the user's last move used is not Detect, Endure, King's Shield, Protect, Quick Guard, Spiky Shield, or Wide Guard. Fails if the user moves last this turn.",
shortDesc: "Protects from attacks. Contact: lowers Atk by 2.",
id: "kingsshield",
isViable: true,
name: "King's Shield",
pp: 10,
priority: 4,
flags: {},
stallingMove: true,
volatileStatus: 'kingsshield',
onTryHit: function (pokemon) {
return !!this.willAct() && this.runEvent('StallMove', pokemon);
},
onHit: function (pokemon) {
pokemon.addVolatile('stall');
},
effect: {
duration: 1,
onStart: function (target) {
this.add('-singleturn', target, 'Protect');
},
onTryHitPriority: 3,
onTryHit: function (target, source, move) {
if (!move.flags['protect'] || move.category === 'Status') return;
if (move.breaksProtect) {
target.removeVolatile('kingsshield');
return;
}
this.add('-activate', target, 'Protect');
var lockedmove = source.getVolatile('lockedmove');
if (lockedmove) {
// Outrage counter is reset
if (source.volatiles['lockedmove'].duration === 2) {
delete source.volatiles['lockedmove'];
}
}
if (move.flags['contact']) {
this.boost({atk:-1}, source, target, this.getMove("King's Shield"));
}
return null;
}
},
secondary: false,
target: "self",
type: "Steel"
},
"landswrath": {
inherit: true,
basePower: 120,
accuracy: 95,
},
"lunardance": {
num: 461,
accuracy: true,
basePower: 0,
category: "Status",
desc: "Raises the user's Special Attack and Speed by 1 stage.",
shortDesc: "Raises the user's Special Attack and Speed by 1.",
id: "lunardance",
isViable: true,
name: "Lunar Dance",
pp: 10,
priority: 0,
flags: {snatch: 1},
boosts: {
spa: 1,
spe: 1
},
secondary: false,
target: "self",
type: "Psychic"
},
"meditate": {
inherit: true,
boosts: {
atk: 1,
spd: 1
},
},
"megakick": {
inherit: true,
accuracy: 95,
basePower: 65,
onBasePower: function (power, user) {
if (user.template.id === 'hitmonlee') return this.chainModify(1.5);
},
type: "Fighting"
},
"megapunch": {
inherit: true,
accuracy: 95,
basePower: 65,
onBasePower: function (power, user) {
if (user.template.id === 'hitmonchan') return this.chainModify(1.5);
},
type: "Fighting"
},
"naturepower": {
accuracy: 90,
basePower: 90,
category: "Physical",
desc: "Does a Physical Grass-type attack, that also applies Ground to its effectiveness.",
shortDesc: "Grass/Ground-type Flying Press.",
id: "naturepower",
name: "Nature Power",
pp: 10,
priority: 0,
onEffectiveness: function (typeMod, type, move) {
return typeMod + this.getEffectiveness('Ground', type);
},
self: {
onHit: function (pokemon) {
this.add('-anim', pokemon, "Geomancy", pokemon);
}
},
onTry: function (pokemon) {
this.add('-anim', pokemon, "Earth Power", pokemon);
},
flags: {protect: 1, mirror: 1, nonsky: 1},
secondary: false,
target: "allAdjacent",
type: "Grass"
},
"nightdaze": {
inherit: true,
accuracy: 100,
basePower: 95,
flags: {protect: 1, mirror: 1},
secondary: {
chance: 20,
boosts: {
accuracy: -1
}
},
},
"ominouswind": {
inherit: true,
secondary: {
chance: 60,
self: {
onHit: function (target, source) {
var stats = [];
for (var i in target.boosts) {
if (i !== 'atk' && i !== 'evasion' && i !== 'spa' && i !== 'spe' && target.boosts[i] < 6) {
stats.push(i);
}
}
if (stats.length) {
var i = stats[this.random(stats.length)];
var boost = {};
boost[i] = 1;
this.boost(boost);
} else {
return false;
}
}
}
}
},
"paraboliccharge": {
inherit: true,
basePower: 80,
drain: [3, 4]
},
"phantomforce": {
num: 566,
accuracy: 100,
basePower: 90,
category: "Physical",
desc: "If this move is successful, it breaks through the target's Detect, King's Shield, Protect, or Spiky Shield for this turn, allowing other Pokemon to attack the target normally. If the target's side is protected by Crafty Shield, Mat Block, Quick Guard, or Wide Guard, that protection is also broken for this turn and other Pokemon may attack the target's side normally. This attack charges on the first turn and executes on the second. On the first turn, the user avoids all attacks. If the user is holding a Power Herb, the move completes in one turn. Damage doubles and no accuracy check is done if the target has used Minimize while active.",
shortDesc: "Disappears turn 1. Hits turn 2. Breaks protection.",
id: "phantomforce",
name: "Phantom Force",
pp: 10,
priority: 0,
flags: {contact: 1, mirror: 1},
breaksProtect: false,
effect: false,
secondary: false,
target: "normal",
type: "Ghost"
},
"powergem": {
inherit: true,
secondary: {
chance: 10,
boosts: {
spa: -1
},
},
},
"seedflare": {
inherit: true,
basePower: 100,
accuracy: 90,
secondary: {
chance: 20,
boosts: {
def: -1,
spd: -1
},
},
},
"silverwind": {
inherit: true,
secondary: {
chance: 60,
self: {
onHit: function (target, source) {
var stats = [];
for (var i in target.boosts) {
if (i !== 'accuracy' && i !== 'evasion' && i !== 'atk' && i !== 'def' && target.boosts[i] < 6) {
stats.push(i);
}
}
if (stats.length) {
var i = stats[this.random(stats.length)];
var boost = {};
boost[i] = 1;
this.boost(boost);
} else {
return false;
}
}
}
}
},
"skyattack": {
num: 143,
accuracy: 100,
basePower: 75,
category: "Physical",
desc: "Has a 30% chance to flinch the target and a higher chance for a critical hit. This attack charges on the first turn and executes on the second. If the user is holding a Power Herb, the move completes in one turn.",
shortDesc: "Charges, then hits turn 2. 30% flinch. High crit.",
id: "skyattack",
name: "Sky Attack",
pp: 10,
priority: 0,
flags: {contact: 1, protect: 1, mirror: 1},
willCrit: true,
secondary: false,
target: "normal",
type: "Flying"
},
"technoblast": {
inherit: true,
basePower: 95,
},
"topsyturvy": {
inherit: true,
flags: {protect: 1, mirror: 1},
priority: 1,
},
"triplekick:": {
inherit: true,
basePower: 25,
accuracy: 95,
},
"hyperspacehole": {
inherit: true,
basePower: 95,
},
"lightofruin": {
inherit: true,
isUnreleased: false,
},
"thousandarrows": {
inherit: true,
isUnreleased: false,
},
"thousandwaves": {
inherit: true,
isUnreleased: false,
},
"steameruption": {
inherit: true,
isUnreleased: false,
},
};

Large diffs are not rendered by default.

@@ -0,0 +1,187 @@
exports.BattleScripts = {
init: function () {
//New Uber Moves
this.modData('Learnsets', 'masquerain').learnset.hurricane = ['5L100'];
this.modData('Learnsets', 'kyuremblack').learnset.boltstrike = ["6L0"];
this.modData('Learnsets', 'kyuremblack').learnset.iciclecrash = ["6L0"];
this.modData('Learnsets', 'kyuremwhite').learnset.blueflare = ["6L0"];
this.modData('Learnsets', 'kyuremwhite').learnset.iciclecrash = ["6L0"];
this.modData('Learnsets', 'xerneas').learnset.lightofruin = ["6L0"];

//OU Tier New Learnsets
delete this.modData('Learnsets', 'aegislash').learnset.sacredsword;
delete this.modData('Learnsets', 'darkrai').learnset.sludgebomb;
this.modData('Learnsets', 'diancie').learnset.playrough = ["6L0"];
this.modData('Learnsets', 'diancie').learnset.powergem = ["6L0"];
delete this.modData('Learnsets', 'genesect').learnset.rockpolish;
delete this.modData('Learnsets', 'genesect').learnset.thunder;
delete this.modData('Learnsets', 'greninja').learnset.lowkick;
delete this.modData('Learnsets', 'genesect').learnset.gunkshot;
delete this.modData('Learnsets', 'kangaskhan').learnset.seismictoss;
delete this.modData('Learnsets', 'kangaskhan').learnset.poweruppunch;
this.modData('Learnsets', 'rotomwash').learnset.whirlpool = ["6L0"];

//UU Tier New Learnsets
this.modData('Learnsets', 'blissey').learnset.wish = ["6L0"];
this.modData('Learnsets', 'darmanitan').learnset.calmmind = ["6L0"];
this.modData('Learnsets', 'espeon').learnset.aurasphere = ["6L0"];
this.modData('Learnsets', 'nidoqueen').learnset.powergem = ["6L0"];
this.modData('Learnsets', 'rotomheat').learnset.heatwave = ["6L0"];
this.modData('Learnsets', 'shuckle').learnset.leechseed = ["6L0"];
this.modData('Learnsets', 'slurpuff').learnset.slackoff = ["6S666"];
this.modData('Learnsets', 'umbreon').learnset.switcheroo = ["6L0"];
this.modData('Learnsets', 'vaporeon').learnset.recover = ["6L0"];
this.modData('Learnsets', 'zoroark').learnset.fireblast = ["6L0"];
this.modData('Learnsets', 'zoroark').learnset.sludgebomb = ["6L0"];

//RU Tier New Learnsets
this.modData('Learnsets', 'braviary').learnset.skyuppercut = ["6L0"];
this.modData('Learnsets', 'camerupt').learnset.slackoff = ["6L0"];
this.modData('Learnsets', 'camerupt').learnset.powergem = ["6L0"];
this.modData('Learnsets', 'druddigon').learnset.stoneedge = ["6L0"];
this.modData('Learnsets', 'glalie').learnset.earthpower = ["6L0"];
this.modData('Learnsets', 'glalie').learnset.hypervoice = ["6L0"];
this.modData('Learnsets', 'glalie').learnset.focusblast = ["6L0"];
this.modData('Learnsets', 'jolteon').learnset.nastyplot = ["6L0"];
this.modData('Learnsets', 'jolteon').learnset.paraboliccharge = ["6L0"];
this.modData('Learnsets', 'meloetta').learnset.lunardance = ["6L0"];
this.modData('Learnsets', 'meloetta').learnset.dragondance = ["6L0"];
this.modData('Learnsets', 'meloetta').learnset.vacuumwave = ["6L0"];
this.modData('Learnsets', 'meloetta').learnset.machpunch = ["6L0"];
this.modData('Learnsets', 'rotommow').learnset.leaftornado = ["6L0"];
this.modData('Learnsets', 'skuntank').learnset.clearsmog = ["6L0"];
this.modData('Learnsets', 'spiritomb').learnset.stealthrock = ["6L0"];
this.modData('Learnsets', 'spiritomb').learnset.darkvoid = ["6L0"];
this.modData('Learnsets', 'spiritomb').learnset.stoneedge = ["6L0"];
this.modData('Learnsets', 'spiritomb').learnset.powergem = ["6L0"];
this.modData('Learnsets', 'steelix').learnset.headsmash = ["6L0"];
this.modData('Learnsets', 'steelix').learnset.coil = ["6L0"];


//NU Tier New Learnsets
this.modData('Learnsets', 'arbok').learnset.dragonrsuh = ["6L0"];
this.modData('Learnsets', 'arbok').learnset.dragondance = ["6L0"];
this.modData('Learnsets', 'arbok').learnset.dragonpulse = ["6L0"];
this.modData('Learnsets', 'arbok').learnset.dracometeor = ["6L0"];

this.modData('Learnsets', 'archeops').learnset.powergem = ["6L0"];

this.modData('Learnsets', 'articuno').learnset.defog = ["6L0"];
this.modData('Learnsets', 'articuno').learnset.healbell = ["6L0"];

this.modData('Learnsets', 'audino').learnset.moonblast = ["6L0"];

this.modData('Learnsets', 'aurorus').learnset.recover = ["6L0"];
this.modData('Learnsets', 'aurorus').learnset.powergem = ["6L0"];

this.modData('Learnsets', 'beautifly').learnset.airslash = ["6L0"];
this.modData('Learnsets', 'beautifly').learnset.ominouswind = ["6L0"];

this.modData('Learnsets', 'beheeyem').learnset.powergem = ["6L0"];

this.modData('Learnsets', 'bellossom').learnset.quiverdance = ["6L0"];
this.modData('Learnsets', 'bellossom').learnset.weatherball = ["6L0"];

this.modData('Learnsets', 'carracosta').learnset.rapidspin = ["6L0"];

this.modData('Learnsets', 'cherrim').learnset.flamethrower = ["6L0"];
this.modData('Learnsets', 'cherrim').learnset.fireblast = ["6L0"];
this.modData('Learnsets', 'cherrim').learnset.flameburst = ["6L0"];
this.modData('Learnsets', 'cherrim').learnset.flareblitz = ["6L0"];

this.modData('Learnsets', 'dedenne').learnset.dazzlinggleam = ["6L0"];

this.modData('Learnsets', 'emolga').learnset.nastyplot = ["6L0"];
this.modData('Learnsets', 'emolga').learnset.defog = ["6L0"];

this.modData('Learnsets', 'flareon').learnset.swordsdance = ["6L0"];

this.modData('Learnsets', 'glaceon').learnset.freezedry = ["6L0"];

this.modData('Learnsets', 'gogoat').learnset.grassyterrain = ["6L0"];

this.modData('Learnsets', 'grumpig').learnset.slackoff = ["6L0"];

this.modData('Learnsets', 'leavanny').learnset.twinneedle = ["6L0"];
this.modData('Learnsets', 'leavanny').learnset.naturepower = ["6L0"];

this.modData('Learnsets', 'lilligant').learnset.psychic = ["6L0"];
this.modData('Learnsets', 'lilligant').learnset.earthpower = ["6L0"];

this.modData('Learnsets', 'magmortar').learnset.darkpulse = ["6L0"];
this.modData('Learnsets', 'magmortar').learnset.aurasphere = ["6L0"];

this.modData('Learnsets', 'minun').learnset.disable = ["6L0"];
this.modData('Learnsets', 'minun').learnset.electricterrain = ["6L0"];
this.modData('Learnsets', 'minun').learnset.followme = ["6L0"];
this.modData('Learnsets', 'minun').learnset.afteryou = ["6L0"];
this.modData('Learnsets', 'minun').learnset.electrify = ["6L0"];
this.modData('Learnsets', 'minun').learnset.mefirst = ["6L0"];
delete this.modData('Learnsets', 'minun').learnset.encore;

this.modData('Learnsets', 'mismagius').learnset.moonblast = ["6L0"];
this.modData('Learnsets', 'mismagius').learnset.moonlight = ["6L0"];

this.modData('Learnsets', 'mrmime').learnset.drainingkiss = ["6L0"];

this.modData('Learnsets', 'muk').learnset.superpower = ["6L0"];
this.modData('Learnsets', 'muk').learnset.knockoff = ["6L0"];
this.modData('Learnsets', 'muk').learnset.slackoff = ["6L0"];

this.modData('Learnsets', 'musharna').learnset.recover = ["6L0"];

this.modData('Learnsets', 'pachirisu').learnset.wish = ["6L0"];
this.modData('Learnsets', 'pachirisu').learnset.healbell = ["6L0"];
this.modData('Learnsets', 'pachirisu').learnset.foulplay = ["6L0"];

this.modData('Learnsets', 'phione').learnset.tailglow = ["6L0"];
this.modData('Learnsets', 'phione').learnset.heartswap = ["6L0"];

this.modData('Learnsets', 'plusle').learnset.electricterrain = ["6L0"];
this.modData('Learnsets', 'plusle').learnset.followme = ["6L0"];
this.modData('Learnsets', 'plusle').learnset.flamethrower = ["6L0"];
this.modData('Learnsets', 'plusle').learnset.overheat = ["6L0"];

this.modData('Learnsets', 'politoed').learnset.whirlpool = ["6L0"];

this.modData('Learnsets', 'rotom').learnset.hypervoice = ["6L0"];

this.modData('Learnsets', 'rotomfan').learnset.hurricane = ["6L0"];

this.modData('Learnsets', 'spinda').learnset.topsyturvy = ["6L0"];

this.modData('Learnsets', 'throh').learnset.meditate = ["6L0"];
this.modData('Learnsets', 'throh').learnset.slackoff = ["6L0"];


this.modData('Learnsets', 'vanilluxe').learnset.chargebeam = ["6L0"];
this.modData('Learnsets', 'vanilluxe').learnset.recover = ["6L0"];

this.modData('Learnsets', 'watchog').learnset.suckerpunch = ["6L0"];
this.modData('Learnsets', 'watchog').learnset.nightslash = ["6L0"];

this.modData('Learnsets', 'weezing').learnset.recover = ["6L0"];

this.modData('Learnsets', 'wobbuffet').learnset.recover = ["6L0"];
this.modData('Learnsets', 'wobbuffet').learnset.magiccoat = ["6L0"];

this.modData('Learnsets', 'zebstrika').learnset.flareblitz = ["6L0"];

this.modData('Learnsets', 'bellossom').learnset.leechseed = ["6L0"];
this.modData('Learnsets', 'hoopa').learnset.shadowsneak = ["6L0"];

//Universal Release Buttons
for (var i in this.data.FormatsData) {
this.modData('FormatsData', i).unreleasedHidden = false;
};
for (var i in this.data.Items) {
this.modData('Items', i).isUnreleased = false;
};
for (var i in this.data.Moves) {
this.modData('Moves', i).isUnreleased = false;
};
for (var a in this.data.FormatsData) {
this.modData('FormatsData', a).isUnreleased = false;
};
}
};
@@ -0,0 +1,119 @@
function clampIntRange(num, min, max) {
num = Math.floor(num);
if (num < min) num = min;
if (typeof max !== 'undefined' && num > max) num = max;
return num;
}
exports.BattleStatuses = {
raindance: {
inherit: true,
onBasePower: function(basePower, attacker, defender, move) {
if (move.type === 'Water') {
this.debug('rain water boost');
return basePower * 1.3;
}
if (move.type === 'Fire') {
this.debug('rain fire suppress');
return basePower * .7;
}
}
},
sunnyday: {
inherit: true,
onBasePower: function(basePower, attacker, defender, move) {
if (move.type === 'Fire') {
this.debug('Sunny Day fire boost');
return basePower * 1.3;
}
if (move.type === 'Water') {
this.debug('Sunny Day water suppress');
return basePower * .7;
}
}
},
hail: {
effectType: 'Weather',
duration: 5,
durationCallback: function (source, effect) {
if (source && source.hasItem('icyrock')) {
return 8;
}
return 5;
},
// This should be applied directly to the stat before any of the other modifiers are chained
// So we give it increased priority.
onModifyDefPriority: 10,
onModifyDef: function (def, pokemon) {
if (pokemon.hasType('Ice') && this.isWeather('hail')) {
return this.modify(def, 1.5);
}
},
onStart: function (battle, source, effect) {
if (effect && effect.effectType === 'Ability' && this.gen <= 5) {
this.effectData.duration = 0;
this.add('-weather', 'Hail', '[from] ability: ' + effect, '[of] ' + source);
} else {
this.add('-weather', 'Hail');
}
},
onResidualOrder: 1,
onResidual: function () {
this.add('-weather', 'Hail', '[upkeep]');
if (this.isWeather('hail')) this.eachEvent('Weather');
},
onWeather: function (target) {
this.damage(target.maxhp / 16);
},
onEnd: function () {
this.add('-weather', 'none');
}
},
latios: {
// Latios: Synchronize
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'synchronize';
pokemon.baseAbility = 'synchronize';
}
}
},
latias: {
// Latias: Synchronize
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'synchronize';
pokemon.baseAbility = 'synchronize';
}
}
},
latiosmega: {
// Latios-Mega: Magic Bounce
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'magicbounce';
pokemon.baseAbility = 'magicbounce';
}
}
},
latiasmega: {
// Latios-Mega: Magic Bounce
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'magicguard';
pokemon.baseAbility = 'magicguard';
}
}
},
};

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,88 @@
exports.BattleItems = {
"souldew": {
id: "souldew",
name: "Soul Dew",
spritenum: 459,
fling: {
basePower: 30
},
onModifySpAPriority: 1,
onModifySpA: function (spa, pokemon) {
if (pokemon.baseTemplate.num === 380 || pokemon.baseTemplate.num === 381) {
return this.chainModify(1.5);
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.baseTemplate.num === 380 || pokemon.baseTemplate.num === 381) {
return this.chainModify(1.5);
}
},
onModifyDefPriority: 2,
onModifyDef: function (def, pokemon) {
if (pokemon.template.species === 'Shuckle') {
return def * 1.5;
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.template.species === 'Shuckle') {
return spd * 1.5;
}
},

num: 225,
gen: 3,
desc: "If holder is a Latias or a Latios, its Sp. Atk and Sp. Def are 1.5x."
},
"eviolite": {
id: "eviolite",
name: "Eviolite",
spritenum: 130,
fling: {
basePower: 40
},
onModifyDefPriority: 2,
onModifyDef: function (def, pokemon) {
if (pokemon.baseTemplate.nfe) {
return this.chainModify(1.5);
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.baseTemplate.nfe) {
return this.chainModify(1.5);
}
},
onModifyDefPriority: 2,
onModifyDef: function (def, pokemon) {
if (pokemon.template.species === 'Phione') {
return this.chainModify(1.25);
}
},
onModifySpDPriority: 2,
onModifySpD: function (spd, pokemon) {
if (pokemon.template.species === 'Phione') {
return this.chainModify(1.25);
}
},
num: 538,
gen: 5,
desc: "If holder's species can evolve, its Defense and Sp. Def are 1.5x."
},
"lightball": {
inherit: true,
onModifyAtkPriority: 1,
onModifyAtk: function (atk, pokemon) {
if (pokemon.baseTemplate.baseSpecies === 'Raichu') {
return this.chainModify(1.5);
}
},
onModifySpAPriority: 1,
onModifySpA: function (spa, pokemon) {
if (pokemon.baseTemplate.baseSpecies === 'Raichu') {
return this.chainModify(1.5);
}
},
},
};

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -0,0 +1,7 @@
exports.BattleScripts = {
init: function () {
this.modData('Pokedex', 'latios').abilities['1'] = 'Synchronize';
this.modData('Pokedex', 'latias').abilities['1'] = 'Synchronize';
this.modData('Pokedex', 'latiosmega').abilities['1'] = 'Magic Bounce';
}
};
@@ -0,0 +1,119 @@
function clampIntRange(num, min, max) {
num = Math.floor(num);
if (num < min) num = min;
if (typeof max !== 'undefined' && num > max) num = max;
return num;
}
exports.BattleStatuses = {
raindance: {
inherit: true,
onBasePower: function(basePower, attacker, defender, move) {
if (move.type === 'Water') {
this.debug('rain water boost');
return basePower * 1.3;
}
if (move.type === 'Fire') {
this.debug('rain fire suppress');
return basePower * .7;
}
}
},
sunnyday: {
inherit: true,
onBasePower: function(basePower, attacker, defender, move) {
if (move.type === 'Fire') {
this.debug('Sunny Day fire boost');
return basePower * 1.3;
}
if (move.type === 'Water') {
this.debug('Sunny Day water suppress');
return basePower * .7;
}
}
},
hail: {
effectType: 'Weather',
duration: 5,
durationCallback: function (source, effect) {
if (source && source.hasItem('icyrock')) {
return 8;
}
return 5;
},
// This should be applied directly to the stat before any of the other modifiers are chained
// So we give it increased priority.
onModifyDefPriority: 10,
onModifyDef: function (def, pokemon) {
if (pokemon.hasType('Ice') && this.isWeather('hail')) {
return this.modify(def, 1.5);
}
},
onStart: function (battle, source, effect) {
if (effect && effect.effectType === 'Ability' && this.gen <= 5) {
this.effectData.duration = 0;
this.add('-weather', 'Hail', '[from] ability: ' + effect, '[of] ' + source);
} else {
this.add('-weather', 'Hail');
}
},
onResidualOrder: 1,
onResidual: function () {
this.add('-weather', 'Hail', '[upkeep]');
if (this.isWeather('hail')) this.eachEvent('Weather');
},
onWeather: function (target) {
this.damage(target.maxhp / 16);
},
onEnd: function () {
this.add('-weather', 'none');
}
},
latios: {
// Latios: Synchronize
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'synchronize';
pokemon.baseAbility = 'synchronize';
}
}
},
latias: {
// Latias: Synchronize
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'synchronize';
pokemon.baseAbility = 'synchronize';
}
}
},
latiosmega: {
// Latios-Mega: Magic Bounce
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'magicbounce';
pokemon.baseAbility = 'magicbounce';
}
}
},
latiasmega: {
// Latios-Mega: Magic Bounce
onImmunity: function (type, pokemon) {
if (type === 'Ground' && (!this.suppressingAttackEvents() || this.activePokemon === pokemon)) return false;
},
onStart: function (pokemon) {
if (pokemon.ability === 'levitate') {
pokemon.ability = 'magicguard';
pokemon.baseAbility = 'magicguard';
}
}
},
};

Large diffs are not rendered by default.

@@ -0,0 +1,72 @@
exports.BattleFormats = {
followersclause: {
effectType: 'Rule',
validateTeam: function (team) {
var problems = [];
var god = team[0];
var godName = god.name || god.species;
var godTemplate = this.getTemplate(god.species);
var godFormes = godTemplate.otherFormes || [];
// Look for item changing a forme, if one exists (for example mega
// stones or Red Orb).
for (var i = 0; i < godFormes.length; i++) {
var forme = this.getTemplate(godFormes[i]);
if (forme.requiredItem === god.item) {
godTemplate = forme;
break;
}
}

for (var i = 1; i < team.length; i++) {
var pokemon = team[i];
var name = pokemon.name || pokemon.species;
var template = this.getTemplate(pokemon.species);
if (template.types.intersect(godTemplate.types).isEmpty()) {
problems.push("Your " + name + " must share a type with " + godName + ".");
}
if (template.tier === 'Uber' || template.isUnreleased) {
problems.push("You cannot use " + name + " as non-god.");
}
var bannedItems = {
'Soul Dew': true,
'Gengarite': true,
'Kangaskhanite': true,
'Lucarionite': true,
'Mawilite': true,
'Salamencite': true
}
if (bannedItems[pokemon.item]) {
problems.push(name + "'s item " + pokemon.item + " is banned for non-gods.");
}
}
// Item check
for (var i = 0; i < team.length; i++) {
var pokemon = team[i];
var name = pokemon.name || pokemon.species;
var item = this.getItem(pokemon.item);
if (item.isUnreleased) {
problems.push(name + "'s item " + set.item + " is unreleased.");
}
}
return problems;
},
onStart: function () {
// Set up god, because the Pokemon positions during battle switch around.
for (var i = 0; i < this.sides.length; i++) {
this.sides[i].god = this.sides[i].pokemon[0];
}
},
onFaint: function (pokemon) {
if (pokemon.side.god === pokemon) {
this.add('-message', pokemon.name + " has fallen! "
+ pokemon.side.name + "'s team has been Cursed!");
}
},
onSwitchIn: function (pokemon) {
if (pokemon.side.god.hp === 0) {
// What a horrible night to have a Curse.
pokemon.addVolatile('curse', pokemon);
}
}
}
};
@@ -0,0 +1,103 @@
exports.BattleFormatsData = {

chansey: {
inherit: true,
tier: "NFE"
},
combusken: {
inherit: true,
tier: "NFE"
},
porygon2: {
inherit: true,
tier: "NFE"
},
golbat: {
inherit: true,
tier: "NFE"
},
togetic: {
inherit: true,
tier: "NFE"
},
magneton: {
inherit: true,
tier: "NFE"
},
fletchinder: {
inherit: true,
tier: "NFE"
},
haunter: {
inherit: true,
tier: "NFE"
},
gurdurr: {
inherit: true,
tier: "NFE"
},
doublade: {
inherit: true,
tier: "NFE"
},
prinplup: {
inherit: true,
tier: "NFE"
},
rhydon: {
inherit: true,
tier: "NFE"
},
kadabra: {
inherit: true,
tier: "NFE"
},
machoke: {
inherit: true,
tier: "NFE"
},
gligar: {
inherit: true,
tier: "LC"
},
swirlix: {
inherit: true,
tier: "LC",
},
scyther: {
inherit: true,
tier: "LC",
},
sneasel: {
inherit: true,
tier: "LC"
},
meditite: {
inherit: true,
tier: "LC"
},
murkrow: {
inherit: true,
tier: "LC"
},
yanma: {
inherit: true,
tier: "LC"
},
carvanha: {
inherit: true,
tier: "LC"
},
misdreavus: {
inherit: true,
tier: "LC"
},
tangela: {
inherit: true,
tier: "LC"
},
vulpix: {
inherit: true,
tier: "LC"
},
}
@@ -0,0 +1,59 @@
exports.BattleFormatsData = {

chansey: {
inherit: true,
tier: "NFE"
},
combusken: {
inherit: true,
tier: "NFE"
},
porygon2: {
inherit: true,
tier: "NFE"
},
golbat: {
inherit: true,
tier: "NFE"
},
togetic: {
inherit: true,
tier: "NFE"
},
magneton: {
inherit: true,
tier: "NFE"
},
fletchinder: {
inherit: true,
tier: "NFE"
},
haunter: {
inherit: true,
tier: "NFE"
},
gurdurr: {
inherit: true,
tier: "NFE"
},
doublade: {
inherit: true,
tier: "NFE"
},
prinplup: {
inherit: true,
tier: "NFE"
},
rhydon: {
inherit: true,
tier: "NFE"
},
kadabra: {
inherit: true,
tier: "NFE"
},
machoke: {
inherit: true,
tier: "NFE"
}
}