🧬 Health — Internal / Mutation¶
📦 Folder Overview¶
This folder contains internal mutation processors and host seams used by HealthSystem.
These types implement the concrete damage and healing execution flow, but they are not public extension points.
🎯 Purpose¶
Internal mutation helpers exist to:
- Keep
HealthSystemorchestration readable - Isolate damage and heal pipeline execution into focused units
- Reuse shared host-facing logic without exposing internals publicly
🧩 What Lives Here¶
This folder contains:
- Internal execution logic for damage and healing
- Host interfaces used by the processors
- Core implementation plumbing
It does not contain:
- A public mutation API
- Supported extension seams
- A second abstraction layer
🧩 Components¶
HealthDamageProcessor¶
Internal executor for damage evaluation.
Responsibilities:
- Applies damage through the host’s pipeline
- Performs guard checks
- Runs PRE damage rules
- Applies shield absorption
- Mutates current HP
- Triggers post-damage notifications and death handling
- Emits attempted and applied outcomes through the host
High-level flow:
- Check mutation permission
- Check dead / invincible / damage-locked guards
- Normalize incoming
DamageContext - Run PRE damage rules
- Fold final incoming damage
- Apply shield absorption unless bypassed
- Apply remaining damage to HP
- Notify post-damage observers
- Trigger death handling if HP reaches 0
- Emit
DamageResult
This processor backs HealthSystem.ApplyDamage(...).
HealthHealProcessor¶
Internal executor for heal evaluation.
Responsibilities:
- Applies healing through the host’s pipeline
- Performs guard checks
- Runs PRE heal rules
- Applies healing modifiers
- Mutates current HP
- Handles overheal spill when supported
- Triggers post-heal notifications and events
High-level flow:
- Check mutation permission
- Check dead / invalid amount guards
- Run PRE heal rules
- Apply healing modifiers
- Clamp and apply to HP
- Forward overflow to overheal shield when enabled
- Notify post-heal observers
- Emit heal events
This processor backs HealthSystem.TryHeal(...).
IHealthDamageProcessorHost¶
Internal host seam consumed by HealthDamageProcessor.
Purpose:
- Provides required state and callbacks without coupling to all of
HealthSystem
Exposes:
- owner object
- current HP
- dead / lock state
- invincibility
- shield
- damage rules
- mutation permission
- rejected-context construction
- last-damage recording
- post-damage notifications
- applied event emission
- death handling
- attempted-result emission
This is an internal processor seam, not a user contract.
IHealthHealProcessorHost¶
Internal host seam consumed by HealthHealProcessor.
Purpose:
- Provides heal-specific state and callbacks without coupling to all of
HealthSystem
Exposes:
- owner object
- current / max HP
- dead state
- overheal spill behaviour
- heal rules
- overheal shield
- mutation permission
- post-heal notifications
- applied event emission
This exists only to support internal implementation structure.
⚠️ Important Notes¶
Boundaries¶
Do not:
- Depend on these types from gameplay code
- Implement these interfaces outside the Health implementation layer
- Treat the processors as reusable public services
- Build custom systems against these host seams
For supported mutation surfaces, use:
IHealthMutatorIHealthWriterIDamageableHealthSystem
🧠 Usage Guidance¶
- Treat this folder as implementation detail
- Prefer public contracts and APIs for integrations
- Expect internal execution details to change over time
🚫 Not for Production Use¶
This folder is not intended as a gameplay integration surface.
🔗 Related Documentation¶
- Health System
- Health Abstractions
- Rules
- Shields