forked from nisovin/MagicSpells
-
Notifications
You must be signed in to change notification settings - Fork 71
DrainlifeSpell
JasperLorelai edited this page Feb 18, 2025
·
8 revisions
spell-class: ".targeted.DrainlifeSpell"| Value | Supported |
|---|---|
entity |
true |
location |
false |
entity_from_location |
false |
-
delayed- Plays the effect at the caster's location every animation tick. -
special- Plays the effect at the caster's location at the current location of the animation every tick.
This spell is used to drain resources from the target.
Since 4.0 Beta 13 some of these options support dynamic values through numeric or string expressions.
| Option | Description | Type | Default | Supports Expressions |
|---|---|---|---|---|
take-type |
Defines what type is taken from the target. | Drain Type |
Before 4.0 Beta 17:healthSince 4.0 Beta 17: health_points
|
true |
give-type |
Defines what type should be given to the caster. | Drain Type |
Before 4.0 Beta 17:healthSince 4.0 Beta 17: health_points
|
true |
take-amt |
Amount to take from the target. | Float | 2 |
true |
give-amt |
The amount to give to the caster. | Float | 2 |
true |
power-affects-amount |
Since 4.0 Beta 13. | Boolean | true |
true |
instant |
Defines if the caster should receive the effect instantly or wait until the animation brings them to the caster. | Boolean | true |
true |
animation-speed |
The speed of the spell effect. A smaller number is faster. | Integer | 2 |
true |
show-spell-effect |
Whether to show the animated smoke moving from target to caster. | Boolean | true |
true |
spell-on-animation |
Sub-spell to cast when the animation reaches the caster. | String | false |
-
- Since 4.0 Beta 17 this type has been deprecated in favour ofhealthhealth_points:Option Description Type Default Supports Expressions damage-typeDefines the damage cause of this spell. String "entity_attack"truecheck-pluginsWhether to attempt to check other plugins for PvP restrictions. Boolean truetruespell-damage-typeThis custom damage type can be used with the ResistSpell.String trueavoid-damage-modificationDefienes whether any spells shouldn't modify the damage amount of this spell. Boolean truetrueignore-armorIgnores armor. Boolean truetrue -
health_points- Since 4.0 Beta 17:Option Description Type Default Supports Expressions drain-damage-typeDamage type to use when draining the target of their health. Damage Type, the behaviour of which is determined by Damage Type Tags player_attackfor players,mob_attackfor non-players.truespell-damage-typeThis custom damage type can be used with the ResistSpelland similar.String true -
mana -
hunger -
experience
drainlife:
spell-class: ".targeted.DrainlifeSpell"
name: drainlife
spell-icon: ghast_tear
description: Drain life from your enemy and give it to you.
cast-item: blaze_rod
cooldown: 5
range: 15
take-type: health
take-amt: 2
give-type: health
give-amt: 2
animation-speed: 2
ignore-armor: false
instant: false
can-target: players,monsters
check-plugins: true
cost:
- mana 10
str-cost: 10 mana
str-cast-self: You drain life from your enemy.
str-no-target: No target found.
effects:
eff1:
position: special
effect: particles
height-offset: 1
particle-name: redstone
color: FF0000
horiz-spread: 0.25
vert-spread: 0.25
count: 10