Adds lifesteal mechanics via new enchantments and a new food item.
NEW ENCHANTMENTS
Drain life
Restores health based on a portion of damage dealt.
Maximum level: 3
Rarity: Rare
Type: Normal
Applicable to: Weapons
Formula: Damage Dealt * (1 - 0.95^X), where X = enchantment level.
If the result is less than 1, it will not apply the Drain Life effect. Otherwise the value will round up or down to the nearest neighbor.
Necrotism
Deals extra damage and restores half as much as health.
Drains 8 durability per use.
Maximum level: 4
Rarity: Rare. Not available via the enchantment table.
Type: Curse
Applicable to: Weapons
Formula (for damage): 2*X, where X = enchantment level.
This uses an unique damage type.
Health gained is equal to the enchantment level.
NEW ORE
Vitalifur Ore
Drops vitalifur when broken. Works with fortune enchantments.
Spawns between Y-64 and Y64 on stone blocks.
NEW FOOD
Vitalifur
Drops from vitalifur ore. Can always be eaten.
Restores a little bit of hunger and saturation. Also restores 2 health (1 heart).
Healing Cookie
Crafted with wheat, sugar, cocoa beans and vitalifur. This gives 8 cookies.
Restores a minimal amount of hunger and saturation. Also restores 1 health (0,5 hearts).
Can be eaten extremely fast.
NEW POTION EFFECT
Vampirism
Restores health based on a portion of damage dealt.
Potion is crafted by brewing vitalifur into mundane potion(s).
Formula: Damage Dealt * 0.1
If the result is less than 1, it will not apply the Vampirism effect. Otherwise the value will round up or down to the nearest neighbor.
For bug reporting:
Please leave comment with a description on what the bug is or what feature doesn't work properly. You can also use the debug command in-game to assist you.
Use the command /fossielifestealcommanddebug to enable debug mode. (Permission level 1)
Debug text will appear when doing the following actions:
Attacking with the Drain Life enchantment on your main hand weapon:
ENCHLVL: W | DMGA: X | LSCALC: Y | ROUND: Z | TH: true/false
W = Level of enchantment
X = Amount of damage dealt
Y = Result of the formula for calculating how much life is restored
Z = Y, rounded
TH = Is threshold met. If false, no health will be regenerated. This is based on the base value, not the rounded value.
Attacking with the Necrotism enchantment on your main hand weapon:
NECRO: X | HEAL: Y | ITEMDMG: Z
X = Bonus Necrotism damage dealt
Y = Health restored
Z = Damage dealt to the item
Attacking with the Vampirism potion effect:
PTNCALC: X | ROUND: Y | TH: true/false
X = Damage dealt * 0.1
Y = X, rounded
TH = Is threshold met. If false, no health will be regenerated. This is based on the base value, not the rounded value.
Breaking Vitalifur Ore:
FORTUNE: X | RANDOM: Y | SILK TOUCH: true/false
X = Fortune level of the tool in the main hand of the player
Y = Random number generated based on the fortune level. Returns 0 if there is none.