"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var rulesets_exports = {}; __export(rulesets_exports, { Rulesets: () => Rulesets }); module.exports = __toCommonJS(rulesets_exports); const Rulesets = { megadatamod: { effectType: "Rule", name: "Mega Data Mod", desc: "Gives data on stats, Ability and types when a Pok\xE9mon Mega Evolves or undergoes Ultra Burst.", onSwitchIn(pokemon) { if (pokemon.illusion) { if (pokemon.illusion.species.forme.startsWith("Mega") || pokemon.illusion.species.forme.startsWith("Ultra")) { this.add("-start", pokemon, "typechange", pokemon.illusion.getTypes(true).join("/"), "[silent]"); } } else { if (pokemon.species.forme.startsWith("Mega") || pokemon.species.forme.startsWith("Ultra")) { this.add("-start", pokemon, "typechange", pokemon.getTypes(true).join("/"), "[silent]"); } } }, onDamagingHit(damage, target, source, move) { if (target.hasAbility("illusion")) { if (target.species.forme.startsWith("Mega") || target.species.forme.startsWith("Ultra")) { this.add("-start", target, "typechange", target.getTypes(true).join("/"), "[silent]"); } else { const types = target.baseSpecies.types; if (target.getTypes().join() === types.join()) { this.add("-end", target, "typechange", "[silent]"); } } } }, onAfterMega(pokemon) { this.add("-start", pokemon, "typechange", pokemon.getTypes(true).join("/"), "[silent]"); const species = this.dex.species.get(pokemon.species.name); const abilities = species.abilities; const baseStats = species.baseStats; const type = species.types[0]; if (species.types[1]) { const type2 = species.types[1]; this.add(`raw|`); } else { this.add(`raw|`); } } } }; //# sourceMappingURL=rulesets.js.map