{
    num: -32015,
    accuracy: 100,
    basePower: 75,
    category: "Special",
    name: "Conjuring Fire",
    pp: 10,
    priority: 0,
    flags: { protect: 1, mirror: 1 },
    basePowerCallback(pokemon, target, move) {
      if (pokemon.hasItem(["ironball","bignugget","thickclub","laggingtail"])) {
        return move.basePower * 2;
      } else if (pokemon.hasItem(["lifeorb"])) {
        return move.basePower * 1.5;
      } else if (pokemon.hasItem(["loadeddice"])) {
        return move.basePower = 25;
      } else if (pokemon.hasItem(["powerherb"])) {
        const bp = move.basePower + 20 * pokemon.positiveBoosts();
        this.debug("BP: " + bp);
        return bp;
      }
      return move.basePower;
    },
    onModifyMove(move, pokemon, source) {
      if (pokemon.getStat("atk", false, true) > pokemon.getStat("spa", false, true))
        move.category = "Physical";
      if (pokemon.hasItem(["razorclaw","scopelens","leek"])) {
        move.willCrit = true;
      } else if (pokemon.hasItem(["ejectbutton","ejectpack","shedshell","smokeball","telepearl"])) {
        move.selfSwitch = true;
      } else if (pokemon.hasItem(["lifeorb"])) {
        move.recoil = [33, 100];
      } else if (pokemon.hasItem(["loadeddice"])) {
        move.multihit = [2, 5];
      } else if (pokemon.hasItem(["mirrorherb","expshare"])) {
        move.stealsBoosts = true;
      } else if (pokemon.hasItem(["redcard"])) {
        move.forceSwitch = true;
      } else if (pokemon.hasItem(["normalgem"])) {
        move.type = "Normal";
      } else if (pokemon.hasItem(["firegem"])) {
        move.type = "Fire";
      } else if (pokemon.hasItem(["grassgem"])) {
        move.type = "Grass";
      } else if (pokemon.hasItem(["watergem"])) {
        move.type = "Water";
      } else if (pokemon.hasItem(["icegem"])) {
        move.type = "Ice";
      } else if (pokemon.hasItem(["electricgem"])) {
        move.type = "Electric";
      } else if (pokemon.hasItem(["psychicgem"])) {
        move.type = "Psychic";
      } else if (pokemon.hasItem(["darkgem"])) {
        move.type = "Dark";
      } else if (pokemon.hasItem(["fairygem"])) {
        move.type = "Fairy";
      } else if (pokemon.hasItem(["ghostgem"])) {
        move.type = "Ghost";
      } else if (pokemon.hasItem(["fightinggem"])) {
        move.type = "Fighting";
      } else if (pokemon.hasItem(["buggem"])) {
        move.type = "Bug";
      } else if (pokemon.hasItem(["flyinggem"])) {
        move.type = "Flying";
      } else if (pokemon.hasItem(["dragongem"])) {
        move.type = "Dragon";
      } else if (pokemon.hasItem(["rockgem","helixfossil","domefossil","oldamber","rootfossil","clawfossil","skullfossil","armorfossil","coverfossil","plumefossil","jawfossil","sailfossil","fossilizedbird","fossilizedfish","fossilizeddrake","fossilizeddino"])) {
        move.type = "Rock";
      } else if (pokemon.hasItem(["groundgem"])) {
        move.type = "Ground";
      } else if (pokemon.hasItem(["steelgem"])) {
        move.type = "Steel";
      } else if (pokemon.hasItem(["poisongem"])) {
        move.type = "Poison";
      }
    },
    onModifyPriority(priority, pokemon, target, move) {
      if (pokemon.hasItem(["quickclaw"]))
        return priority + 2;
    },
    onHit(target, source, move) {
      if (source.hasItem(["leftovers","soothebell","fairybottle","berryjuice"])) {
        this.heal(source.baseMaxhp / 2, source);
      } else if (source.hasItem(["assaultvest","eviolite","mentalenergy"])) {
        this.boost({ spd: 1 }, source);
      } else if (source.hasItem(["blackbelt","choiceband","expertbelt","muscleband","powerenergy"])) {
        this.boost({ atk: 1 }, source);
      } else if (source.hasItem(["quickpowder","choicescarf","silkscarf","swiftenergy"])) {
        this.boost({ spe: 1 }, source);
      } else if (source.hasItem(["roomservice"])) {
        this.boost({ spe: -2 }, source);
      } else if (source.hasItem(["choicespecs","wiseglasses","mindenergy"])) {
        this.boost({ spa: 1 }, source);
      } else if (source.hasItem(["metalcoat","metalpowder","hardstone","defendenergy"])) {
        this.boost({ def: 1 }, source);
      } else if (source.hasItem(["widelens","zoomlens","magnifyingglass"])) {
        this.boost({ accuracy: 2 }, source);
      } else if (source.hasItem(["weaknesspolicy","boosterenergy"])) {
        this.boost({ atk: 1, spa: 1 }, source);
      } else if (source.hasItem(["chippedpot","masterpieceteacup"])) {
        this.boost({ atk: 1, spa: 1, spe: 1, def: -1, spd: -1 }, source);
      } else if (source.hasItem(["helixfossil","domefossil","oldamber","rootfossil","clawfossil","skullfossil","armorfossil","coverfossil","plumefossil","jawfossil","sailfossil","fossilizedbird","fossilizedfish","fossilizeddrake","fossilizeddino"])) {
        if (this.randomChance(3, 10)) {
          this.boost({ atk: 1, def: 1, spa: 1, spd: 1, spe: 1 }, source);
        }
      } else if (source.hasItem(["strawberrysweet","lovesweet","ribbonsweet","cloversweet","berrysweet","starsweet","flowersweet"])) {
        const ally = source.allies()[0];
        if (!ally)
          return;
        this.boost({ atk: 1, spa: 1 }, ally);
      } else if (source.getItem().isBerry) {
        source.eatItem(true);
      } else if (source.hasItem(["magnet","cellbattery"])) {
        target.addVolatile("electrify");
      } else if (source.hasItem(["clearamulet","whiteherb","everstone","cleansetag"])) {
        target.clearBoosts();
        this.add("-clearboost", target);
      } else if (source.hasItem(["charcoal","flameorb","firestone","magmarizer","rocketflare","burndrive"])) {
        target.trySetStatus("brn", source);
      } else if (source.hasItem(["lightball","thunderorb","thunderstone","electirizer","shockdrive"])) {
        target.trySetStatus("par", source);
      } else if (source.hasItem(["frostorb","icestone","chilldrive"])) {
        target.trySetStatus("frz", source);
      } else if (source.hasItem(["bindingband","gripclaw"])) {
        target.addVolatile("partiallytrapped", source, this.dex.getActiveMove("Fire Spin"));
      } else if (source.hasItem(["blackglasses","ringtarget"])) {
        target.addVolatile("taunt");
      } else if (source.hasItem(["maliciousarmor","duskstone"])) {
        target.addVolatile("torment");
      } else if (source.hasItem(["toxicorb", "blacksludge"])) {
        target.trySetStatus("tox", source);
      } else if (source.hasItem(["blunderpolicy","brightpowder","shinystone"])) {
        this.boost({ accuracy: -1 });
      } else if (source.hasItem(["abilityshield"])) {
        target.addVolatile("gastroacid");
      } else if (source.hasItem(["covertcloak","spelltag","reapercloth"])) {
        this.directDamage(source.maxhp / 3, source, source);
        target.addVolatile("curse");
      } else if (source.hasItem(["destinyknot","fairyfeather"])) {
        target.addVolatile("attract");
      } else if (source.hasItem(["whippeddream","sachet"])) {
        target.addVolatile("yawn");
      } else if (source.hasItem(["ovalstone"])) {
        target.addVolatile("healblock");
      } else if (source.hasItem(["damprock"])) {
        this.field.setWeather("raindance");
      } else if (source.hasItem(["heatrock","sunstone"])) {
        this.field.setWeather("sunnyday");
      } else if (source.hasItem(["icyrock","snowball"])) {
        this.field.setWeather("snow");
      } else if (source.hasItem(["nevermeltice"])) {
        this.field.setWeather("hail");
      } else if (source.hasItem(["smoothrock","softsand"])) {
        this.field.setWeather("sandstorm");
      } else if (source.hasItem(["voidrock"])) {
        this.field.setWeather("voidfog");
      } else if (source.hasItem(["wonderseed"])) {
        this.field.addPseudoWeather("wonderroom");
      } else if (source.hasItem(["dubiousdisc"])) {
        this.field.addPseudoWeather("distortionroom");
      } else if (source.hasItem(["upgrade"])) {
        this.field.addPseudoWeather("stasisroom");
      } else if (source.hasItem(["utilityumbrella","safetygoggles"])) {
        this.field.clearWeather();
      } else if (source.hasItem(["terrainextender"])) {
        this.field.clearTerrain();
      } else if (source.hasItem(["electricseed"])) {
        this.field.setTerrain("electricterrain");
      } else if (source.hasItem(["grassyseed"])) {
        this.field.setTerrain("grassyterrain");
      } else if (source.hasItem(["psychicseed"])) {
        this.field.setTerrain("psychicterrain");
      } else if (source.hasItem(["mistyseed"])) {
        this.field.setTerrain("mistyterrain");
      } else if (source.hasItem(["silverpowder","dawnstone","dousedrive"])) {
        target.addVolatile("confusion");
      } else if (source.hasItem(["twistedspoon"])) {
        target.addVolatile("disable");
      } else if (source.hasItem(["focussash","focusband"])) {
        source.addVolatile("endure");
      } else if (source.hasItem(["protector"])) {
        source.addVolatile("protect");
      } else if (source.hasItem(["razorclaw","scopelens","leek"])) {
        source.addVolatile("focusenergy");
      } else if (source.hasItem(["floatstone","moonstone","airballoon"])) {
        target.addVolatile("telekinesis");
      } else if (source.hasItem(["mentalherb","auspiciousarmor","metronome"])) {
        target.addVolatile("encore");
      } else if (source.hasItem(["throatspray"])) {
        this.add("-fieldactivate", "move: Perish Song");
        target.addVolatile("perishsong");
      } else if (source.hasItem(["heavydutyboots"])) {
        const side = target.isAlly(source) ? target.side.foe : target.side;
        const spikes = side.sideConditions["spikes"];
        if ((!spikes || spikes.layers < 2)) {
          side.addSideCondition("spikes", target);
        }
      } else if (source.hasItem(["rockyhelmet","blackaugurite"])) {
        const side = target.isAlly(source) ? target.side.foe : target.side;
        const stealthrocks = side.sideConditions["stealthrock"];
        if ((!stealthrocks)) {
          side.addSideCondition("stealthrock", target);
        }
      } else if (source.hasItem(["poisonbarb"])) {
        const side = target.isAlly(source) ? target.side.foe : target.side;
        const toxicspikes = side.sideConditions["toxicspikes"];
        if ((!toxicspikes || toxicspikes.layers < 2)) {
          side.addSideCondition("toxicspikes", target);
        }
      } else if (source.hasItem(["peatblock","metalalloy","deepseatooth"])) {
        const side = source.isAlly(target) ? source.side.foe : source.side;
        const reflects = side.sideConditions["reflect"];
        if ((!reflects)) {
          side.addSideCondition("reflect", source);
        }
      } else if (source.hasItem(["lightclay","prismscale","deepseascale"])) {
        const side = source.isAlly(target) ? source.side.foe : source.side;
        const lightscreens = side.sideConditions["lightscreen"];
        if ((!lightscreens)) {
          side.addSideCondition("lightscreen", source);
        }
      } else if (source.hasItem(["sharpbeak"])) {
        const side = source.isAlly(target) ? source.side.foe : source.side;
        const tailwind = side.sideConditions["tailwind"];
        if ((!tailwind)) {
          side.addSideCondition("tailwind", source);
        }
      } else if (source.hasItem(["boxshell","shellhelmet","amuletcoin","luckypunch","luckyegg"])) {
        const side = source.isAlly(target) ? source.side.foe : source.side;
        const luckychant = side.sideConditions["luckychant"];
        if ((!luckychant)) {
          side.addSideCondition("luckychant", source);
        }
      } else if (source.hasItem(["ironball","laggingtail","poweranklet","powerband","powerbelt","powerbracer","powerlens","powerweight"])) {
        this.boost({ spe: -2 }, target);
      } else if (source.hasItem(["adrenalineorb"])) {
        this.boost({ atk: -2 }, target);
      } else if (source.hasItem(["crackedpot","unremarkableteacup"])) {
        this.boost({ def: -2 }, target);
      } else if (source.hasItem(["kingsrock","razorfang"])) {
        target.addVolatile("flinch");
      } else if (source.hasItem(["absorbbulb","miracleseed"])) {
        target.addVolatile("leechseed");
      } else if (source.hasItem(["syrupyapple","tartapple","sweetapple"])) {
        target.addVolatile("syrupbomb");
      } else if (source.hasItem(["luminousmoss","bigroot","leafstone"])) {
        source.addVolatile("ingrain");
      } else if (source.hasItem(["mysticwater","shellbell","waterstone"])) {
        source.addVolatile("aquaring");
      } else if (source.hasItem(["flameplate","firememory"])) {
        this.add("-start", source, "typechange", "Fire");
      } else if (source.hasItem(["splashplate","watermemory"])) {
        this.add("-start", source, "typechange", "Water");
      } else if (source.hasItem(["meadowplate","grassmemory"])) {
        this.add("-start", source, "typechange", "Grass");
      } else if (source.hasItem(["zapplate","electricmemory"])) {
        this.add("-start", source, "typechange", "Electric");
      } else if (source.hasItem(["icicleplate","icememory"])) {
        this.add("-start", source, "typechange", "Ice");
      } else if (source.hasItem(["fistplate","fightingmemory"])) {
        this.add("-start", source, "typechange", "Fighting");
      } else if (source.hasItem(["toxicplate","poisonmemory"])) {
        this.add("-start", source, "typechange", "Poison");
      } else if (source.hasItem(["earthplate","groundmemory"])) {
        this.add("-start", source, "typechange", "Ground");
      } else if (source.hasItem(["skyplate","flyingmemory"])) {
        this.add("-start", source, "typechange", "Flying");
      } else if (source.hasItem(["mindplate","psychicmemory"])) {
        this.add("-start", source, "typechange", "Psychic");
      } else if (source.hasItem(["insectplate","bugmemory"])) {
        this.add("-start", source, "typechange", "Bug");
      } else if (source.hasItem(["stoneplate","rockmemory"])) {
        this.add("-start", source, "typechange", "Rock");
      } else if (source.hasItem(["spookyplate","ghostmemory"])) {
        this.add("-start", source, "typechange", "Ghost");
      } else if (source.hasItem(["dracoplate","dragonmemory"])) {
        this.add("-start", source, "typechange", "Dragon");
      } else if (source.hasItem(["dreadplate","darkmemory"])) {
        this.add("-start", source, "typechange", "Dark");
      } else if (source.hasItem(["ironplate","steelmemory"])) {
        this.add("-start", source, "typechange", "Steel");
      } else if (source.hasItem(["pixieplate","fairymemory"])) {
        this.add("-start", source, "typechange", "Fairy");
      } else if (source.hasItem(["galaricacuff","stickybarb"])) {
        source.addVolatile("bramblering");
      } else if (source.hasItem(["galaricawreath"])) {
        if (!target.hp)
          return;
        let move = target.lastMove;
        if (!move || move.isZ)
          return;
        if (move.isMax && move.baseMove)
          move = this.dex.moves.get(move.baseMove);
        const ppDeducted = target.deductPP(move.id, 4);
        if (!ppDeducted)
          return;
        this.add("-activate", target, "move: Eerie Spell", move.name, ppDeducted);
      } else if (source.hasItem(["protectivepads","punchingglove"])) {
        source.addVolatile("substitute");
      } else if (source.hasItem(["dragonfang","dragonscale"])) {
        const ally = source.allies()[0];
        if (!ally)
          return;
        ally.addVolatile("dragoncheer");
      } else if (source.hasItem(["earmuffs"])) {
        const oldAbility = target.setAbility("soundproof");
        if (oldAbility) {
          this.add("-ability", target, "Soundproof", "[from] ability: Soundproof");
          return;
        }
        return oldAbility;
      }
    },
    onAfterHit(target, source, move) {
      if (source.item && source.hp) {
        const item = source.getItem();
        source.setItem("");
        source.lastItem = item.id;
        source.usedItemThisTurn = true;
        this.add("-enditem", source, item.name, "[from] move: Conjuring Fire");
        this.runEvent("AfterUseItem", source, null, null, item);
      }
    },
    onAfterSubDamage(damage, target, source, move) {
      if (source.item && source.hp) {
        const item = source.getItem();
        source.setItem("");
        source.lastItem = item.id;
        source.usedItemThisTurn = true;
        this.add("-enditem", source, item.name, "[from] move: Conjuring Fire");
        this.runEvent("AfterUseItem", source, null, null, item);
      }
    },
    secondary: null,
    target: "normal",
    type: "Fire",
    contestType: "Clever"
}