SpellweaveSkill

public class SpellweaveSkill extends MagicWeaponSkill implements StackingSkill

Spellweave (STACKING) - Consecutive missiles on the same target weave stronger spells. Tier 2 unlock.

Switching targets or 3 seconds without a hit unravels the weave. A cast moves the weave only when none of its missiles reaches the woven target, so Multicast missiles that also strike a nearby enemy do not break the weave on the one being focused. Missiles land in any order, so a cast that has only hit other targets so far waits for the next cast to settle it. Power budget: ~50% uptime on the ramp, so full stacks are worth +40% at level 50 (E = 0.50 * 0.40 = 0.20), the same band as Ranger's Focus.

Constructors

Link copied to clipboard
public void SpellweaveSkill()

Properties

Link copied to clipboard
public final static String SKILL_ID

Inherited properties

Link copied to clipboard
protected String bonusName
Link copied to clipboard
protected final SkillBonusType bonusType
Link copied to clipboard
Link copied to clipboard
protected String description
Link copied to clipboard
protected boolean enabled
Link copied to clipboard
public final static double MAX_DEFENSIVE_REDUCTION
Hard cap on how much any single defensive skill may reduce incoming damage.
Link copied to clipboard
protected int requiredLevel
Link copied to clipboard
protected final String skillId
Link copied to clipboard
protected final SkillType skillType
Link copied to clipboard
protected int unlockTier

Functions

Link copied to clipboard
public void addStack(Player player)
Adds a stack for the player (up to max).
Link copied to clipboard
protected void clearPlayer(UUID playerId)
Drops per-player combat state when the skill is deactivated.
Link copied to clipboard
public double getBonusPerStack(int skillLevel)
Gets the bonus value per stack at the given skill level.
Link copied to clipboard
public double getBonusValue(int skillLevel)
Gets the numeric value of the bonus at a given skill level.
Link copied to clipboard
public int getCurrentStacks(Player player)
Gets the current number of stacks for a player.
Link copied to clipboard
public String getFormattedBonus(int skillLevel)
Gets a formatted string describing the bonus at a given level.
Link copied to clipboard
public List<String> getLoreDescription(int skillLevel)
Gets the lore description for the skill menu display.
Link copied to clipboard
public int getMaxStacks()
Gets the maximum number of stacks this skill can accumulate.
Link copied to clipboard
public void resetStacks(Player player)
Resets all stacks for a player.
Link copied to clipboard
public void shutdown()
Called on plugin shutdown.
Link copied to clipboard
Whether this hit should add a stack.

Inherited functions

Link copied to clipboard
public boolean affectsDamage()
Returns whether this skill affects damage when used offensively.
Link copied to clipboard
public void applyBonus(Player player, int skillLevel)
Applies this bonus to a player based on their skill level.
Link copied to clipboard
protected String applyFormattedBonusTemplate(Map<String, String> replacements)
Applies placeholder replacements to the formatted bonus template from config.
Link copied to clipboard
protected List<String> applyLoreTemplates(Map<String, String> replacements)
Applies placeholder replacements to lore templates from config.
Link copied to clipboard
public boolean banksStacksExternally()
Whether stacks are banked by something other than the on-hit dispatcher (e.g.
Link copied to clipboard
protected static void beam(Location from, Location to, Particle particle)
A straight particle line, capped so long beams stay cheap.
Link copied to clipboard
public boolean canUnlock(int skillLevel)
Checks if this skill can be unlocked at the given level.
Link copied to clipboard
protected static Location chest(LivingEntity entity)
Link copied to clipboard
public static double clampDefensiveReduction(double reduction)
Clamps a defensive damage reduction into the safe [0, MAX_DEFENSIVE_REDUCTION] range.
Link copied to clipboard
public void endCooldown(Player player)
Link copied to clipboard
protected static List<LivingEntity> enemiesNear(Player player, Location center, double radius, LivingEntity exclude)
Elites a magic weapon may hit within a radius of a point, nearest first.
Link copied to clipboard
public String getBonusName()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public long getCooldownSeconds(int skillLevel)
Link copied to clipboard
public String getDescription()
Link copied to clipboard
public static int getLevelForTier(int tier)
Gets the required level for a given unlock tier.
Link copied to clipboard
public int getProcCount(Player player)
Gets the proc count for a player.
Link copied to clipboard
public long getRemainingCooldown(Player player)
Link copied to clipboard
public int getRequiredLevel()
Link copied to clipboard
protected double getScaledCooldown(int skillLevel)
Returns the configured cooldown at a specific skill level.
protected double getScaledCooldown(Player player)
Returns the configured cooldown at the player's current skill level.
Link copied to clipboard
protected double getScaledProcChance(Player player)
Returns the configured proc chance at the player's current skill level.
Link copied to clipboard
protected double getScaledValue(int skillLevel)
Returns the configured linear bonus at a specific skill level.
protected double getScaledValue(Player player)
Returns the configured linear bonus at the player's current level.
Link copied to clipboard
public String getSkillId()
Link copied to clipboard
Link copied to clipboard
Returns the test strategy for verifying this skill in automated testing.
Link copied to clipboard
public double getTotalStackBonus(Player player, int skillLevel)
Gets the total bonus represented by the currently banked stacks.
Link copied to clipboard
public int getUnlockTier()
Link copied to clipboard
public void incrementProcCount(Player player)
Increments the proc count for a player.
Link copied to clipboard
public boolean isActive(Player player)
Checks if this skill is currently active for a player.
Link copied to clipboard
public boolean isEnabled()
Link copied to clipboard
public boolean isOnCooldown(Player player)
Link copied to clipboard
public boolean meetsLevelRequirement(int skillLevel)
Checks if a player meets the level requirement for this bonus.
Link copied to clipboard
public void onActivate(Player player)
Called when a player activates (selects) this skill.
Link copied to clipboard
public void onDeactivate(Player player)
Called when a player deactivates (deselects) this skill.
Link copied to clipboard
public void removeBonus(Player player)
Removes this bonus from a player.
Link copied to clipboard
public void resetAllProcCounts()
Resets all proc counts.
Link copied to clipboard
public void resetProcCount(Player player)
Resets the proc count for a player.
Link copied to clipboard
protected static double scaled(double base, double perLevel, int level)
The standard linear per-level scaling used by most skill payouts: base + level * perLevel.
protected static double scaled(double base, double perLevel, double cap, int level)
Capped variant of scaled: min(cap, base + level * perLevel).
Link copied to clipboard
public static void sendSkillActionBar(Player player, SkillBonus skill)
Sends a skill trigger action bar message to the player.
Link copied to clipboard
public static void sendStackingSkillActionBar(Player player, SkillBonus skill, int currentStacks, int maxStacks)
Sends a stacking skill action bar message showing current stack count.
Link copied to clipboard
public void setConfigFields(SkillBonusConfigFields configFields)
Sets the configuration fields for this skill.
Link copied to clipboard
public void setEnabled(boolean enabled)
Link copied to clipboard
protected static void sideDamage(Player player, LivingEntity target, double damage)
Skill damage on top of the weapon's hit.
Link copied to clipboard
protected int skillLevel(Player player)
Link copied to clipboard
public void startCooldown(Player player, int skillLevel)
Link copied to clipboard
protected static EliteMobDamagedByPlayerEvent strike(Object context, MagicStrike strike)
The hit in this context when it is the primary hit of the given staff or wand attack.
Link copied to clipboard
protected boolean wieldedBy(Player player)
True while the player holds this skill's weapon with the skill active and unlocked.