Skip to content

Forcebomb Spell

MomoPewpew edited this page Jul 28, 2023 · 8 revisions

Source Code

spell-class: ".targeted.ForcebombSpell"

Description:

A targeted spell that causes a knockback effect at the targeted location.

Configuration:

Option Description Default Value
pushback-force The strength of the knockback effect. Can accept negative values which will pull people towards the caster instead. 30
additional-vertical-force The additional knockback to apply vertically, rather than purely horizontal. 15
max-vertical-force The maximum vertical velocity a target can get from this spell. 20
radius The radius of the area to deal knockback in. 3
y-offset The vertical offset to begin the knockback from. 0
call-target-events Whether the spell should call target events. true
add-velocity-instead Change the target's velocity in a similar fashion to how they'd be knocked back, rather than just knocking them away. false

Example:

forcebomb:
    spell-class: ".targeted.ForcebombSpell"
    name: forcebomb
    description: Push back your enemies.
    cast-item: blaze_rod
    cooldown: 8
    range: 15
    radius: 3
    pushback-force: 30
    additional-vertical-force: 15
    max-vertical-force: 20
    can-target: players,nonplayers
    cost:
        - mana 30
    str-cost: 30 mana
    str-cast-self: An explosion of energy pushes your enemies around.
    str-no-target: No target found.
    effects:
        eff1:
            position: special
            effect: fireworks
            height-offset: 1
            type: 0
            flight: 0
            trail: false
            flicker: false
            colors: FF0000,0000FF
            fade-colors: 0000FF
Clone this wiki locally