CastAtMarkSpell - TheComputerGeek2/MagicSpells GitHub Wiki

Source Code

spell-class: ".instant.CastAtMarkSpell"

Description:

Casts a spell at your mark.

Configuration:

Option Description Type Default
mark-spell The internal name of the mark spell. String
spell The internal name of the spell you want to cast at the mark. String
str-no-mark The message to send when the player doesn't have a mark set. Rich Text "You do not have a mark specified"

Examples:

Example 1:

CastAtMark:
    spell-class: ".instant.CastAtMarkSpell"
    mark-spell: Mark
    spell: CastAtMark_Effect
    str-no-mark: "You do not have a mark set up anywhere" 

CastAtMark_Effect:
    spell-class: ".targeted.DummySpell"
    helper-spell: true 
    effects:
        1:
            position: target
            effect: sound
            sound: entity.generic.explode
            pitch: 1
        2:
            position: target
            effect: particles
            particle-name: EXPLOSION_NORMAL
            horiz-spread: 0.25
            vert-spread: 0.25
            speed: 0.35
            count: 10
            relative-offset: 0,1,0

Example 2:

Magic_Mine_CastAtMark:
    spell-class: ".instant.CastAtMarkSpell"
    name: "&d&oMagic &5Mine"
    mark-spell: Magic_Mine_Mark
    spell: Magic_Mine_Explosion
    str-no-mark: "You do not have a Magic Mine set up at any location" 

Magic_Mine_Main:
    spell-class: ".MultiSpell"
    name: "&d&oMagic &5Mine &7- Mark"
    spells:
        - Magic_Mine_Buff_Dummy
        - Magic_Mine_Beam
    cost:
        - coal 1
        - redstone 1
        - flint 1 
        - iron_ingot 1
    str-cost: "In order to set up your Magic Mine you need the following:
        - 1 coal 
        - 1 redstone dust
        - 1 flint 
        - 1 iron ingot"
    str-cast-self: You have set up a location for your Magic Mine!
    modifiers:
        - buffactive Magic_Mine_Buff_Dummy cast Magic_Mine_PPJ_Modify

Magic_Mine_Effect:
    spell-class: ".targeted.DummySpell"
    helper-spell: true 
    effects:
        1:
            position: target
            effect: particles
            particle-name: SPELL_WITCH
            horiz-spread: 1
            vert-spread: 1
            count: 10
            relative-offset: 0,1,0
        2:
            position: target
            effect: fireworks
            type: 4
            flicker: true
            trail: no
            colors: 830BD3
            fade-colors: 30044D
            relative-offset: 0,1,0

Magic_Mine_Explosion:
    spell-class: ".TargetedMultiSpell"
    helper-spell: true 
    stop-on-fail: false 
    require-entity-target: false
    spells:
        - Magic_Mine_Effect
        - Magic_Mine_PPJ_Modify
        - Magic_Mine_Remove_Mark

Magic_Mine_Mark:
    spell-class: ".instant.MarkSpell"
    helper-spell: true 
    permanent: false 

Magic_Mine_Remove_Mark:
    spell-class: ".targeted.RemoveMarksSpell"
    helper-spell: true 
    radius: 20
    point-blank: true
    mark-spell: Magic_Mine_Mark

Magic_Mine_Clear:
    spell-class: ".MultiSpell"
    helper-spell: true  
    spells:
        - Magic_Mine_Remove_Mark
        - Magic_Mine_PPJ_Modify

Magic_Mine_Buff_Dummy:
    spell-class: ".buff.DummySpell"
    helper-spell: true 
    duration: 5
    toggle: false
    num-uses: 1
    spell-on-end: Magic_Mine_Clear

Magic_Mine_Targeted_Multi:
    spell-class: ".TargetedMultiSpell"
    helper-spell: true 
    stop-on-fail: false 
    require-entity-target: false
    spells:
        - Magic_Mine_Mark
        - Magic_Mine_PPJ

Magic_Mine_Beam:
    spell-class: ".instant.BeamSpell"
    helper-spell: true 
    y-offset: -0.25
    max-distance: 1
    interval: 0.5
    spell-on-end: Magic_Mine_Targeted_Multi

Magic_Mine_PPJ:
    spell-class: ".instant.ParticleProjectileSpell"
    helper-spell: true 
    change-pitch: false
    projectile-velocity: 10
    tick-interval: 1
    max-distance: 5
    projectile-turn: 30
    stop-on-hit-entity: false
    stop-on-hit-ground: false 
    relative-offset: 0,0,-1
    effects:
        1:
            position: special
            effect: particles
            particle-name: REDSTONE
            color: 9B00FF
            count: 5

Magic_Mine_PPJ_Modify:
    spell-class: ".targeted.ProjectileModifySpell"
    helper-spell: true 
    horizontal-radius: 20
    vertical-radius: 20
    max-duration: 1
    spells:
        - Magic_Mine_PPJ