Class FORGETFULNESS_POTION
This potion causes the drinker to lose experience with either a randomly selected spell or a randomly selected potion. The amount of skill lost is random (1-20 levels), and there is a 50% chance it will affect spell skills vs. potion skills. The skill loss can significantly impact the player's ability to cast spells or brew potions effectively.
If the player has no known spells and the spell skill loss is selected (or vice versa for potions), no effect is applied.
- Since:
- 2.2.7
- See Also:
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.potion.O2Potion
duration, flavorText, ingredients, potionColor, potionSuccessMessage, potionType, text, usesModifier -
Constructor Summary
ConstructorsConstructorDescriptionFORGETFULNESS_POTION(@NotNull Ollivanders2 plugin) Constructor for Forgetfulness Potion. -
Method Summary
Modifier and TypeMethodDescriptionvoiddrink(@NotNull org.bukkit.entity.Player player) Drink the Forgetfulness Potion and suffer skill loss.Methods inherited from class net.pottercraft.ollivanders2.potion.O2Potion
brew, brewBadPotion, checkRecipe, createPotionItemStack, getFlavorText, getIngredients, getIngredientsText, getLevel, getMagicBranch, getName, getPotionSuccessMessage, getPotionType, getText, setUsesModifier
-
Constructor Details
-
FORGETFULNESS_POTION
Constructor for Forgetfulness Potion.Initializes the potion with its ingredients (Mistletoe Berries, Valerian Sprigs, Lethe River Water, and Standard Potion Ingredients), description text, flavor text, and potion color. Sets up the recipe for brewing this potion that causes skill loss in the drinker.
- Parameters:
plugin- a callback to the plugin instance
-
-
Method Details
-
drink
public void drink(@NotNull @NotNull org.bukkit.entity.Player player) Drink the Forgetfulness Potion and suffer skill loss.Causes the player to lose experience with a randomly selected skill:
- 50% chance: A random known spell's skill count is reduced by 1-20 levels
- 50% chance: A random known potion's skill count is reduced by 1-20 levels
The amount of skill lost is determined randomly (1-20 levels). If the selected skill type (spell or potion) has no known skills, no effect is applied. The skill loss can significantly impact the player's ability to successfully cast spells or brew potions.
-