Skip to content

TargetedMultiSpell

MomoPewpew edited this page Dec 9, 2023 · 12 revisions

Source Code

spell-class: ".TargetedMultiSpell"

Description:

This is a special type of Multi Spell that only works with targeted spells. It works with any spell that can target an entity or the ground. The difference with this spell is that it maintains the initial target, even if the caster moves or looks around, unlike the normal Multi Spell.

Configuration Options:

Option Description Default Value
require-entity-target Whether this spell requires the caster to target an entity. false
point-blank Whether the spell should be centered on the player, or if it should be targeted. If this is true, the spell is centered at the casting player. If it's false, it will be centered at the targeted block. false
y-offset Modifies the height of the targeted location 0
cast-random-spell-instead Casts a random spell from the list instead of casting all the spells. false
stop-on-fail If this is true, the spell will stop executing spells if one of them fails. true
spells A list of sub-spells to cast, in order. You can also use the special “DELAY #” fake spell to add a delay between spell casts (see below). empty
pass-targeting If true, the spell's can-target list will be passed down to targeted entity spells in spells when casting. Boolean

Delays:

You can add a delay between spells by using the special “DELAY #” fake spell, where # is a number of server ticks to delay (1 second = 20 ticks). Please keep in mind that this simply delays the cast of the spells and does not maintain any state when the targeted multispell was cast. If the player moves or turns, the delayed spell will target whatever they are looking at when it fires, not what they were looking at when they first cast the spell.

Example:

smite:
    spell-class: ".TargetedMultiSpell"
    name: smite
    cooldown: 10
    cost:
        - mana 5
    str-cost: 5 mana
    stop-on-fail: false
    require-entity-target: false
    spells:
        - lightning
        - DELAY 10
        - lightning
        - DELAY 10
        - lightning
Clone this wiki locally