{
  onEffectiveness(typeMod, target, type, move) {
    if (move.type === "Water" && type === "Grass")
      return 1;
  },
  onDamagingHit(damage, target, source, move) {
    if (["Water"].includes(move.type) && !target.volatiles["burning"]) {
      target.addVolatile("soggy");
    } else if (["Water"].includes(move.type) && target.volatiles["burning"]) {
      target.removeVolatile("burning");
    }
    if (["Fire"].includes(move.type) && !target.volatiles["soggy"]) {
      target.addVolatile("burning");
    } else if (["Fire"].includes(move.type) && target.volatiles["soggy"]) {
      target.removeVolatile("soggy");
    }
  },
  onWeather(target, source, effect) {
    if (target.hasItem("utilityumbrella"))
      return;
    if (effect.id === "raindance" || effect.id === "primordialsea") {
      if (target.volatiles["burning"]) {
        target.removeVolatile("burning");
      } else {
        target.addVolatile("soggy");
      }
    }
  },
  onUpdate(pokemon) {
    if (pokemon.status === "brn") {
      pokemon.addVolatile("burning");
    }
  },
  onSetStatus(status, target, source, effect) {
    if (status.id !== "brn")
      return;
    if (["raindance", "primordialsea"].includes(target.effectiveWeather())) {
      if (effect?.status) {
        this.add("-immune", target, "[from] ability: Paper Thin");
      }
      return false;
    } else {
      target.addVolatile("burning");
    }
  },
  onBasePowerPriority: 19,
  onBasePower(basePower, attacker, defender, move) {
    if (attacker.status === "brn" && attacker.volatiles["burning"] && move.category === "Physical" && move.id !== "facade") {
      return this.chainModify(2);
    }
  },
  flags: { failroleplay: 1, noreceiver: 1, noentrain: 1, notrace: 1, failskillswap: 1 },
  name: "Paper Thin",
  rating: 3.5,
  num: -32063
}
