Buff Spell - TheComputerGeek2/MagicSpells GitHub Wiki

Description:

A spell that once activated stays active for a set duration. The options below extend from the Instant Spell.

Spell Effect Positions:

  • Buff spells can play Spell Effects on some specific positions repeatedly with a configurable interval while the buff is active. When using EffectLib effects, the recommended position is buffeffectlib, otherwise buff/active may be used.
  • Once buff spells end, an effect is played on the disabled position.

Configuration:

This spell supports Spell Filter options used with the option cancel-on-spell-cast.

Option Description Type Default
duration Buff spell duration specified in seconds before the buff expires. Set to 0 to define an infinite duration. Float 0
toggle Defines whether the spell can be deactivated while it's still active. It will only apply cooldown when its duration fades. Boolean true
targeted Defines if this spell should become a targeted spell. Boolean false
cancel-on-join Defines whether the buff spell will cancel if the caster joins the game. Boolean false
cancel-on-move Defines whether the buff spell will cancel if the caster moves. Boolean false
cancel-on-death Defines whether the buff spell will cancel if the caster dies. Boolean false
cancel-on-logout Defines whether the buff spell will cancel if the caster leaves the game. Boolean false
cancel-on-teleport Defines whether the buff spell will cancel if the server emits a teleport event for the caster. Boolean false
cancel-on-spell-cast Defines whether the buff spell will cancel if the caster casts a spell. Since 4.0 Beta 14 this cancels all spells if the Spell Filter is left undefined. Boolean false
cancel-on-take-damage Defines whether the buff spell will cancel if the caster receives damage. Boolean false
cancel-on-give-damage Defines whether the buff spell will cancel if the caster deals damage to another entity. Boolean false
cancel-on-change-world Defines whether the buff spell will cancel if the caster switches worlds. Boolean false
cancel-affects-target If the buff spell is targeted, cancelling logic will be affected by and to the target instead. Boolean false
power-affects-duration Defines whether Spell Power can affect the duration of the spell. Boolean true
end-spell-from-target Defines caster of the spell-on-end. If the spell isn't targeted, the "target" is technically the caster, so they cast the spell. Boolean true
str-fade Message sent after the buff ends. Rich Text true
spell-on-end Sub-spell that will be cast whenever the buff spell reaches the end of its duration. String

Uses:

Most buff spells have special events that define when a buff Use happened. Some buffs, like DummySpell, don't. The below options can be used to configure how buff Uses behave. You can use Uses, for example, to make the buff last forever (duration: 0), but end after it depletes its uses.

Option Description Type Default
num-uses Number of Uses before the buff spell expires. Integer 0
use-cost-interval Interval defines after how many Uses the spell can charge use-cost. Integer 0
use-cost A string list of reagents required for the buff to remain active. The cost will be charged only when the buff spell's Uses is incremented. String List
spell-on-use-increment Sub-spell that will be cast whenever the buff spell Uses has been incremented (depends on the buff spell type). This spell will be cast once even if num-uses is set to 0. String
spell-on-cost Sub-spell that will be cast whenever the buff spell tries to charge use cost. String