ABILITY 06
LifeSteal
Attack the nearest valid target and request healing based on the configured damage amount and life-steal fraction.
Activation
LifeStealButtonExample use
Recover health by dealing damage during an encounter.
Ability documentationCHARACTER ABILITY
SETUP GUIDE
Set up this ability
Component dependencies
| Component | Where to add or assign it | Purpose / setup |
|---|---|---|
| Health | Character GameObject | Required for restoring character health. |
Visual component dependencies
These components support the associated effect. A missing optional visual does not by itself imply that the gameplay mechanic cannot run.
| Component | Where to add or assign it | Purpose / setup |
|---|---|---|
| LifeStealRadiusEffect + SpriteRenderer | RadiusEffectPrefab root | Required for the supplied expanding-radius visual. Assign LifeStealRadiusEffect. |
- Add CharacterLifeSteal to a CharacterPlus character with Health.
- Set the ability range and target layer mask for your scene.
- Place a valid target within the configured range.
- Set DamageAmount, Range and LifeStealPercentage. Optionally assign LifeStealRadiusEffect to RadiusEffectPrefab.
- Press LifeStealButton near a living valid target. The nearest valid target is cached before ActivationDelay.
Inspector reference
These are C# field declaration defaults. Existing prefab and scene values can override them. Shared fields are documented under Ability Configuration.
| Field | Type | Declared default |
|---|---|---|
DamageAmount | float | 10f |
LifeStealPercentage | float | 0.5f |
Range | float | 2f |
TargetLayerMask | LayerMask | Not assigned in declaration |
TargetFlickerDuration | float | 0.2f |
TargetInvincibilityDuration | float | 0.5f |
RadiusEffectPrefab | GameObject | Not assigned in declaration |
Usage notes
- Healing is calculated as DamageAmount × LifeStealPercentage, rather than measured damage actually lost by the target. With declaration defaults, this requests 5 health from a 10-damage attack.
- If no valid target is found, activation returns without starting.
