Class LYCANTHROPY_RELIEF

java.lang.Object
net.pottercraft.ollivanders2.effect.O2Effect
net.pottercraft.ollivanders2.effect.LYCANTHROPY_RELIEF

public class LYCANTHROPY_RELIEF extends O2Effect
Passive marker effect that suppresses the secondary effects of lycanthropy curse.

LYCANTHROPY_RELIEF is a temporary marker effect that suppresses the unwanted symptoms of the LYCANTHROPY curse. When applied to a player affected by lycanthropy, this effect does not directly remove the curse itself, but rather suppresses the secondary effects (AGGRESSION and LYCANTHROPY_SPEECH) that normally accompany werewolf transformation during full moons. The effect is passive and only needs to be tracked until expiration. The effect is detectable by information spells (Informous) which report the target "looks unwell".

Mechanism:

  • Passive marker effect - no active behavior during each tick
  • Suppresses AGGRESSION and LYCANTHROPY_SPEECH secondary effects from lycanthropy curse
  • Does not remove the permanent LYCANTHROPY curse itself
  • Detectable by information spells (Informous)
  • Detection text: "looks unwell"
  • Effect expires naturally when duration reaches zero
See Also:
  • Constructor Details

    • LYCANTHROPY_RELIEF

      public LYCANTHROPY_RELIEF(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid)
      Constructor for creating a lycanthropy relief passive marker effect.

      Creates a temporary marker effect that suppresses the secondary symptoms of lycanthropy. This effect is passive and does not directly remove the curse; the LYCANTHROPY effect itself determines whether to apply AGGRESSION and LYCANTHROPY_SPEECH based on whether this relief effect is present. Sets the detection text for information spells to "looks unwell".

      Parameters:
      plugin - a callback to the MC plugin
      duration - the duration of the relief effect in game ticks
      isPermanent - is this effect permanent (does not age)
      pid - the unique ID of the player to provide lycanthropy relief
  • Method Details

    • checkEffect

      public void checkEffect()
      Age the lycanthropy relief marker effect and set relief flag on lycanthropy.

      Called each game tick. This method ages the effect by 1 tick and performs two key functions:

      1. Checks if the player still has the LYCANTHROPY effect. If not found, kills this relief effect since it cannot function without an active lycanthropy curse to suppress.
      2. Sets the relief flag on the LYCANTHROPY effect to true, signaling that secondary effects (AGGRESSION and LYCANTHROPY_SPEECH) should be suppressed during transformation. The LYCANTHROPY effect checks this flag during checkEffect() to prevent applying secondary effects.

      When the duration reaches zero, the effect is automatically killed and removed from the player.

      Specified by:
      checkEffect in class O2Effect
    • doRemove

      public void doRemove()
      Perform cleanup when the lycanthropy relief effect is removed.

      When the relief effect is removed (either by duration expiration or manual removal), this method clears the relief flag on the LYCANTHROPY effect. This allows the lycanthropy curse to resume applying its secondary effects (AGGRESSION and LYCANTHROPY_SPEECH) during future transformations at moonrise. If the player no longer has the LYCANTHROPY effect, no cleanup is needed.

      Specified by:
      doRemove in class O2Effect