LightningSpell - TheComputerGeek2/MagicSpells GitHub Wiki

Source Code

spell-class: ".targeted.LightningSpell"

targeting cast argument values:

Value Supported
entity false
location true
entity_from_location false

Description:

A targeted spell that casts a lightning strike on the targeted block or player.

Configuration:

Since 4.0 Beta 13 these options support dynamic values through numeric or string expressions.

Option Description Type Default
additional-damage The amount of damage to deal on the secondary hit that comes with vanilla lightning strikes. Double 0
power-affects-additional-damage Since 4.0 Beta 13. Boolean true
zap-pigs Defines whether the bolt should be able to turn pigs into zombie pig men. Boolean true
no-damage Defines whether the initial strike should deal damage or not. Boolean false
check-plugins Defines whether the spell should check damage-related plugins. Boolean true
charge-creepers Defines whether the bolt should be able to charge creepers. Boolean true
transform-entities Since 4.0 Beta 17. When false, the lightning will not transform entities (turn villagers to witches, pigs to zombified piglins, etc.). Boolean true
require-entity-target Defines whether to require a target to strike the lightning bolt on, or to target the ground. Boolean false

Example:

lightning:
    spell-class: ".targeted.LightningSpell"
    name: lightning
    description: Call down lightning.
    cast-item: blaze_rod
    cooldown: 15
    range: 20
    additional-damage: 0
    no-damage: false
    require-entity-target: false
    check-plugins: true
    cost:
        - mana 15
    str-cost: 15 mana
    str-cast-self: You call down lightning.
    str-cast-others: "%a calls down lightning."
    str-no-target: No target found.