Class FAST_LEARNING
The FAST_LEARNING effect is a temporary marker effect that increases the rate at which the player gains experience when using skills (book learning, spell practice, etc.). This effect does not apply any active modifications itself; instead, the skill system checks for this effect's presence and applies an experience multiplier when the player gains skill experience. The effect is passive and only needs to be tracked until expiration.
Mechanism:
- Passive marker effect - no active behavior during each tick
- Skill system applies experience multiplier when this effect is present
- Detectable by mind-reading spells (Legilimens)
- Detection text: "feels more mentally alert than usual"
- Effect expires naturally when duration reaches zero
-
Field Summary
Fields inherited from class net.pottercraft.ollivanders2.effect.O2Effect
affectedPlayerText, duration, effectType, informousText, kill, legilimensText, p, permanent, targetID -
Constructor Summary
ConstructorsConstructorDescriptionFAST_LEARNING(@NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull UUID pid) Constructor for creating a fast learning skill experience boost effect. -
Method Summary
Modifier and TypeMethodDescriptionvoidAge the fast learning marker effect.voiddoRemove()Perform cleanup when the fast learning effect is removed.Methods inherited from class net.pottercraft.ollivanders2.effect.O2Effect
age, getAffectedPlayerText, getInformousText, getLegilimensText, getMaxDuration, getMinDuration, getRemainingDuration, getTargetID, isKilled, isPermanent, kill, setPermanent
-
Constructor Details
-
FAST_LEARNING
public FAST_LEARNING(@NotNull @NotNull Ollivanders2 plugin, int duration, boolean isPermanent, @NotNull @NotNull UUID pid) Constructor for creating a fast learning skill experience boost effect.Creates a temporary marker effect that boosts skill experience gain. This effect is passive and does not apply modifications directly; the skill system checks for its presence to apply an experience multiplier. Sets the detection text for mind-reading spells to "feels more mentally alert than usual".
- Parameters:
plugin- a callback to the MC pluginduration- the duration of the effect in game ticksisPermanent- true if this effect is permanent, false if it is notpid- the unique ID of the player to grant fast learning
-
-
Method Details
-
checkEffect
public void checkEffect()Age the fast learning marker effect.Called each game tick. This effect is passive and only needs to track its remaining duration. The actual experience multiplier is applied by the skill system when it detects this effect's presence on a player gaining skill experience. When the duration reaches zero, the effect is automatically killed and removed from the player.
- Specified by:
checkEffectin classO2Effect
-
doRemove
public void doRemove()Perform cleanup when the fast learning effect is removed.The default implementation does nothing, as the fast learning effect is a passive marker with no state to clean up. When removed, the player simply stops receiving the experience multiplier boost from the skill system.
-