Minion Spell - MomoPewpew/MagicSpells GitHub Wiki
spell-class: ".buff.MinionSpell"
Targeting:
This spell can only be cast by/on players.
Description:
A buff spell that summons a minion bound to the player.
Buff Uses:
Buff spell Uses increment whenever the minion changes targets or deals damage.
Configuration:
| Option | Description | Default Value |
|---|---|---|
mob-chances |
A list of the possible types of mobs this minion spell should summon. Can include a percentage chance. See the example below. | null |
potion-effects |
A list of potion effects to apply to the summoned minion. | null |
attributes |
Attribute list to apply to the summoned minion. | null |
main-hand |
The item to be held in the minion's main hand. | "" |
off-hand |
The item to be held in the minion's off-hand. | "" |
helmet |
The armor piece to show up in the helmet slot. | "" |
chestplate |
The armor piece to show up in the chestplate slot. | "" |
leggings |
The armor piece to show up in the leggings slot. | "" |
boots |
The armor piece to show up in the boots slot. | "" |
minion-targets |
Target list | null |
main-hand-drop-chance |
The chance to drop the item in the minion's main hand. | 0 |
off-hand-drop-chance |
The chance to drop the item in the minion's off-hand. | 0 |
helmet-drop-chance |
The chance to drop the minion's helmet. | 0 |
chestplate-drop-chance |
The chance to drop the minion's chestplate. | 0 |
leggings-drop-chance |
The chance to drop the minion's leggings. | 0 |
boots-drop-chance |
The chance to drop the minion's boots. | 0 |
spell-on-spawn |
Sub-spell to cast when the minion spawns. This is achieved, code-wise, by having the caster cast a spell at the minion's location. The minion itself is not the one casting the spell. Must be able to target location or the mob itself. | "" |
spell-on-attack |
Sub-spell to cast when the minion lands a hit. This is achieved, code-wise, by having the caster cast a spell at the minion's target. The minion itself is not the one casting the spell. | "" |
spell-on-death |
Sub-spell to cast when the minion dies. This is achieved, code-wise, by having the caster cast a spell at the minion's location. The minion itself is not the one casting the spell. Must be able to target location. | "" |
spawn-offset |
The offset to use when spawning a minion. | 1,0,0 |
follow-range |
The distance the minion should try to be from the caster. | 1.5 |
follow-speed |
The speed at which the minion will run to the caster when it reaches max-distance. | 1 |
max-distance |
The maximum distance the minion can be from the caster before running to them. | 30 |
power-affects-health |
Whether to let spell power influence the health option. | false |
power-health-factor |
The factor of which to change the mob's health based on spell power. | 1 |
max-health |
The maximum health the minion is able to have. | 20 |
health |
The beginning health of the mob on spawning. | 20 |
minion-name |
The name of the minion. If defined, the nameplate will always display above the mob's head. | "" |
gravity |
Whether the minion should follow gravity. | true |
baby |
Whether the minion should be a baby version of the mob being summoned. | false |
prevent-sun-burn |
Whether to prevent the minions from taking burn damage in the sun. | true |
Example:
HellKnight:
spell-class: ".buff.MinionSpell"
permission-name: necromancer
duration: 60
mob-chances:
- Wither_Skeleton 100
minion-name: "&a%c's &cHell Knight"
prevent-sun-burn: true
follow-range: 25
follow-speed: 1
spell-on-spawn: MinionSpawnEffect
max-health: 40
health: 40
max-distance: 25
main-hand: stone_axe
off-hand: shield
helmet: diamond_helmet#000000;durability--100|&0Sacrificial__Helmet
chestplate: diamond_chestplate#000000;durability--100|&0Sacrificial__Plate
leggings: diamond_leggings#000000;durability--100|&0Sacrificial__Leggings
boots: diamond_boots#000000;durability--100|&0Sacrificial__Boots
toggle: false
minion-targets:
- players
- nonplayers
attributes:
- "knockback_resistance 5 addnumber"
- "armor 4 addnumber"
potion-effects:
- 2 1200 1
MinionSpawnEffect:
spell-class: ".targeted.DummySpell"
helper-spell: true
permission-name: necromancer
effects:
1:
position: target
effect: effectlib
effectlib:
class: AnimatedBallEffect
particle: EXPLOSION_LARGE
particles: 10
particlesPerIteration: 10
size: 1
yOffset: 1
xFactor: 1
yFactor: 1.25
zFactor: 1
period: 0
iterations: 1
visibleRange: 100
2:
position: target
effect: lightning