Skip to content
JasperLorelai edited this page Jul 31, 2023 · 31 revisions

Source Code

spell-class: ".targeted.AreaEffectSpell"

Description:

The 'Area of Effect' spell is used for converting or applying, all spells listed in its string to an area, which is defined and limited by its configuration options.

Configuration:

Option Description Type Default Value
spells List of sub-spells to cast. String List null
max-targets Max targets for the AOE. 0 means there is no max. Integer 0
circle-shape Whether the horizontal radius of the AOE should be circular. Boolean false
cone If point-blank is set to true, which it is by default, this will make the AOE a cone instead of it being 360 degrees around the caster. Best way to explain it is that it works like the sweep attack on swords. Value is specified in degrees. Double 0
vertical-radius Vertical hit radius for the AOE. Double 5
horizontal-radius Horizontal hit radius for the AOE. Double 10
use-proximity Defines if the AOE should select targets by proximity. This is only useful if you have defined max-targets. Boolean false
reverse-proximity Defines reverse proximity, if use-proximity is enabled. This makes the AOE look for further away targets instead. Boolean false
point-blank While set to true, when cast the start location of the AOE will be the caster's location. When it's set to false, the AOE center will be the block the caster was pointing at while casting the spell. Boolean true
fail-if-no-targets If set to false, if the AOE fails to find targets, it won't play any effects specified on it. Boolean true
spell-source-in-center If point-blank is set to false and this to true, it will attempt to make the source of all targeted spells the center of the AOE. For example, if the AOE casts a HomingMissileSpell, the missile will spawn in the center of the AOE. Boolean false

Examples:

sweep:
    spell-class: ".targeted.AreaEffectSpell"
    cast-item: watch
    horizontal-radius: 5
    vertical-radius: 3
    cone: 45
    spells: [pain]
    effects:
        Sound:
            position: caster
            sound: entity.player.attack.sweep
        Particles:
            position: special
            effect: particles
            forward-offset: 1
            height-offset: 1
            particle-name: SWEEP_ATTACK
            horiz-spread: 1
            vert-spread: 1
            count: 10
            speed: 0
pain:
    spell-class: ".targeted.PainSpell"
    damage: 2
storm:
    spell-class: ".targeted.AreaEffectSpell"
    cast-item: paper
    horizontal-radius: 10
    vertical-radius: 10
    point-blank: false
    range: 200
    spells: [lightning]

lightning:
    spell-class: ".targeted.LightningSpell"
    no-damage: true

Clone this wiki locally