{
    onSetStatus(status, target, source, effect) {
      if (status.id !== "slp")
        return;
      if (effect?.status) {
        if (!this.heal(target.baseMaxhp / 4)) {
          this.add("-activate", target, "ability: Dream Catcher");
        }
      }
      return false;
    },
    onTryAddVolatile(status, target) {
      if (status.id === "yawn") {
        if (!this.heal(target.baseMaxhp / 4)) {
          this.add("-activate", target, "ability: Dream Catcher");
        }
        return null;
      }
    },
    onAnyModifyMove(move, pokemon) {
      if (!move.flags["sleep"])
        return;
      if (move.tracksTarget)
        return;
      if (move.target === "allAdjacentFoes" || move.target === "allAdjacent")
        move.target = "normal";
    },
    onAnyRedirectTarget(target, source, source2, move) {
      if (!move.flags["sleep"])
        return;
      const redirectTarget = ["randomNormal", "adjacentFoe"].includes(move.target) ? "normal" : move.target;
      if (this.validTarget(this.effectState.target, source, redirectTarget)) {
        if (move.smartTarget)
          move.smartTarget = false;
        if (this.effectState.target !== target) {
          this.add("-activate", this.effectState.target, "ability: Dream Catcher", "[msg]redirect");
        }
        return this.effectState.target;
      }
    },
    flags: { breakable: 1 },
    name: "Dream Catcher",
    rating: 3.5,
    num: -32115
}