Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- illusiondouble: {
- dssb: true,
- accuracy: true,
- basePower: 0,
- category: "Status",
- name: "Illusion Double",
- pp: 10,
- priority: 1,
- flags: {snatch: 1, nonsky: 1},
- volatileStatus: 'illusiondouble',
- onTryHit(target) {
- if (target.volatiles['illusiondouble']) {
- this.add('-fail', target, 'move: Illusion Double');
- return null;
- }
- if (target.hp <= target.maxhp / 2 || target.maxhp === 1) { // Shedinja clause
- this.add('-fail', target, 'move: Illusion Double', '[weak]');
- return null;
- }
- },
- onHit(target) {
- this.directDamage(target.maxhp / 2);
- },
- condition: {
- onStart(target) {
- this.add('-start', target, 'Substitute');
- this.effectData.hp = Math.floor(target.maxhp / 2);
- if (target.volatiles['partiallytrapped']) {
- this.add('-end', target, target.volatiles['partiallytrapped'].sourceEffect, '[partiallytrapped]', '[silent]');
- delete target.volatiles['partiallytrapped'];
- }
- // replace this move with moonlight slash
- const move = Moves.moonlightslash;
- const sketchedMove = {
- move: move.name,
- id: 'moonlightslash',
- pp: move.pp,
- maxpp: move.pp,
- target: move.target,
- disabled: false,
- disabledSource: '',
- used: false,
- };
- const index = target.moves.indexOf('illusiondouble');
- if (index < 0) return;
- target.moveSlots[index] = sketchedMove;
- target.baseMoveSlots[index] = sketchedMove;
- },
- onTryPrimaryHitPriority: -1,
- onTryPrimaryHit(target, source, move) {
- if (target === source || move.flags['authentic'] || move.infiltrates) {
- return;
- }
- let damage = this.getDamage(source, target, move);
- if (!damage && damage !== 0) {
- this.add('-fail', source);
- this.attrLastMove('[still]');
- return null;
- }
- damage = this.runEvent('SubDamage', target, source, move, damage);
- if (!damage) {
- return damage;
- }
- if (damage > target.volatiles['illusiondouble'].hp) {
- damage = target.volatiles['illusiondouble'].hp as number;
- }
- target.volatiles['illusiondouble'].hp -= damage;
- source.lastDamage = damage;
- if (target.volatiles['illusiondouble'].hp <= 0) {
- target.removeVolatile('illusiondouble');
- } else {
- this.add('-activate', target, 'move: Substitute', '[damage]');
- }
- if (move.recoil) {
- this.damage(this.calcRecoilDamage(damage, move), source, target, 'recoil');
- }
- if (move.drain) {
- this.heal(Math.ceil(damage * move.drain[0] / move.drain[1]), source, target, 'drain');
- }
- this.singleEvent('AfterSubDamage', move, null, target, source, move, damage);
- this.runEvent('AfterSubDamage', target, source, move, damage);
- return this.HIT_SUBSTITUTE;
- },
- onEnd(target) {
- this.add('-end', target, 'Substitute');
- // replace moonlight slash with illusion double
- const move = Moves.illusiondouble;
- const sketchedMove = {
- move: move.name,
- id: 'illusiondouble',
- pp: move.pp,
- maxpp: move.pp,
- target: move.target,
- disabled: false,
- disabledSource: '',
- used: false,
- };
- const index = target.moves.indexOf('moonlightslash');
- if (index < 0) return;
- target.moveSlots[index] = sketchedMove;
- target.baseMoveSlots[index] = sketchedMove;
- },
- onModifyMove(move) {
- if (move.category !== 'Status') move.multihit = (move.multihit || 1) * 2;
- if (move.name === 'Quiver Dance') move.boosts = {spa: 2, spd: 2, spe: 2};
- return move;
- },
- },
- secondary: null,
- target: "self",
- type: "Normal",
- zMove: {effect: 'clearnegativeboost'},
- contestType: "Cute",
- },
- moonlightslash: {
- dssb: true,
- accuracy: 100,
- basePower: 60,
- category: "Physical",
- name: "Moonlight Slash",
- pp: 10,
- priority: 0,
- flags: {protect: 1, mirror: 1},
- willCrit: true,
- secondary: null,
- target: "normal",
- type: "Fairy",
- contestType: "Beautiful",
- },
- "illusionrealm": {
- isNonstandard: 'Custom',
- name: 'Illusion Realm',
- id: 'illusionrealm',
- onAnyModifyMove: function(move) {
- if (move.category === 'Physical') move.category = 'Special';
- return move;
- },
- onModifySpD(def) {
- return this.chainModify(1.75);
- },
- onModifySpA(spa) {
- return this.chainModify(1.75);
- },
- onModifyMove: function(move) {
- if (!move.drain || move.drain[0] / move.drain[1] < 1 / 3) {
- move.drain = [1, 3];
- }
- },
- },
- '~sparkychild': {
- species: 'Delcatty', ability: 'Illusion Realm', item: 'Leftovers', gender: "F",
- moves: ['Quiver Dance', 'Boomburst', 'Shadow Ball'],
- signatureMove: "Illusion Double",
- evs: {spe: 4, hp: 252, spd: 252}, nature: 'Calm',
- },
Add Comment
Please, Sign In to add comment