{
name: "Type Exchange",
desc: [
"• <a href=\"http://www.smogon.com/forums/threads/type-exchange.3556479/\">Type Exchange Metagame Discussion</a>",
"• <a href=\"http://www.smogon.com/forums/threads/type-exchange.3556479/page-2#post-6547201/\">Gothitelle & Gothorita Quick Ban</a>"
],
section: "Other Metagames",
ruleset: [/*'OU',*/ 'Pokemon', 'Standard', 'Team Preview', 'Swagger Clause', 'Baton Pass Clause'],
banlist: ['Uber', 'Soul Dew', 'Gengarite', 'Kangaskhanite', 'Lucarionite', /*'Shadow Tag',*/ 'Gothitelle', 'Gothorita'],
onBegin: function () {
[this.p1.pokemon,this.p2.pokemon].forEach(function(pokemons) {
let last_pokemon = {
species: pokemons[pokemons.length-1].species,
types: pokemons[pokemons.length-1].types,
typesData: pokemons[pokemons.length-1].typesData,
};
for (let i = pokemons.length-1; i >= 0; i--) {
if (i != 0) {
pokemons[i].types = pokemons[i-1].types;
pokemons[i].typesData = pokemons[i-1].typesData;
} else {
pokemons[i].types = last_pokemon.types;
pokemons[i].typesData = last_pokemon.typesData;
}
}
})
},
},