Skip to content
Iniquit edited this page Sep 2, 2019 · 12 revisions

MultiSpells can be used to combine spells to form new spells, to cast more than one spell at once, or to randomly cast one of several spells.

Configuration Options:

Option Description Default Value
cast-random-spell-instead Whether to cast a random spell from the list instead of casting all the spells. false
enable-custom-spell-cast-chance Whether to use custom spell weighting indicated next to a spell (ex: Fireball:2) instead of weighting each spell equally in the random selection. false
enable-individual-chances If this is true, each spell will be handled individually, meaning its random chance will be calculated separately, and it will be possible for each spell to be cast. If this is false, the spells will be handled together, so only one of the spells will be cast. false
spells A list of spells the MultiSpell should cast. By default, spells will all be cast at the same time, but you can use the special “DELAY #” fake spell to add a delay between spell casts (see below). empty

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 from when the multispell was cast. If the player moves or turns, a delayed spell will target whatever they are looking at when it actually fires, not what they were looking at when they first cast the spell.

Example: DELAY

froghop:
    spell-class: ".MultiSpell"
    spells:
        - froghop_leap1
        - DELAY 12 #(wait 0.6 seconds)
        - froghop_leap2
        - DELAY 16 #(wait 0.8 seconds)
        - froghop_leap3

froghop_leap1:
    spell-class: ".instant.LeapSpell"
    forward-velocity: 2
    upward-velocity: 2

froghop_leap2:
    spell-class: ".instant.LeapSpell"
    forward-velocity: 4
    upward-velocity: 4

froghop_leap3:
    spell-class: ".instant.LeapSpell"
    forward-velocity: 6
    upward-velocity: 6

Example: cast-random-spell-instead

coinflip:
    spell-class: ".MultiSpell"
    cast-random-spell-instead: true
    spells:
        - coinflip_heads(mode=hard)
        - coinflip_tails(mode=hard)

coinflip_heads:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The coin came up heads!"

coinflip_tails:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The coin came up tails!"

Example: enable-custom-spell-cast-chance

rigged_coinflip:
    spell-class: ".MultiSpell"
    cast-random-spell-instead: true
    enable-custom-spell-cast-chance: true
    spells:
        - rigged_coinflip_heads(mode=hard):1
        - rigged_coinflip_tails(mode=hard):10

rigged_coinflip_heads:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The coin came up heads!"

rigged_coinflip_tails:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The coin came up tails!"

Example: enable-individual-chances

flowergarden:
    spell-class: ".MultiSpell"
    cast-random-spell-instead: true
    enable-individual-chances: true
    str-cast-self: "----------"
    spells:
        - flower1(mode=hard):75 #(75% chance to be cast, regardless of the other two spells)
        - flower2(mode=hard):50 #(50% chance to be cast, regardless of the other two spells)
        - flower3(mode=hard):25 #(25% chance to be cast, regardless of the other two spells)

flower1:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The rose bloomed!"

flower2:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The violet bloomed!"

flower3:
    spell-class: ".instant.DummySpell"
    str-cast-self: "The morning glory bloomed!"
Clone this wiki locally