en:rpd:leech_enchantment
Table of Contents
Leech Enchantment
The Leech enchantment is a weapon enchantment that heals the wielder for a portion of the damage dealt when hitting an enemy. This creates a sustain mechanic for melee combat, allowing players to recover health while dealing damage.
Description
The Leech enchantment provides life steal functionality, converting a percentage of damage dealt into healing for the attacker. The enchantment glows with a dark red color when active.
Mechanics
- Proc Chance: Based on weapon level and damage dealt
- Healing Formula: The healing amount is calculated as follows:
- Maximum heal value: damage * (level + 2) / (level + 6)
- Actual heal: Random value between 0 and max, capped by missing HP
- Only heals if the attacker has missing HP
- Level Scaling:
- Level 0: ~33% of damage (max)
- Level 1: ~43% of damage (max)
- Level 2: ~50% of damage (max)
- Higher levels continue to improve the ratio
- Visual Effect: Shows healing amount as green numbers above the character
- Glow Color: Dark red (RGB: 0x660022)
Strategy
- Most effective on fast-hitting weapons that deal consistent damage
- Provides sustain in prolonged fights, reducing reliance on healing potions
- Less effective when at full health (no healing occurs)
- Works well with high-damage weapons for larger healing bursts
- Can be the difference between life and death in difficult encounters
Source Code
- Java Implementation: Leech.java
- The effect is applied in the proc() method
- Healing amount scales with weapon level using the formula: damage * (level + 2) / (level + 6)
- Only heals if attacker has missing HP (attacker.ht() - attacker.hp() > 0)
- Uses Random.IntRange() for variability in healing amount
String Resources
- The enchantment name and description are defined in the weapon enchantment string resources
See Also
- Enchantments - List of all weapon enchantments
- Weapons - Equipment that can have enchantments
- Heal Spell - General information about healing in the game
- Combat Mechanics - How combat and damage work
- Healing - All healing methods in the game
en/rpd/leech_enchantment.txt · Last modified: by 127.0.0.1

