PerformHeal¶
A heal action restores health or energy to each resolved target. Add it to a
skill's actions array with type: "heal".
The caster is the fighter using the skill. The target is selected by the
action's target_type. For target_type: "self", the caster and target are the
same fighter.
Heal types¶
Choose a heal type based on the resource to restore and the value that should determine the amount.
Health healing types¶
health.type |
Heal amount |
|---|---|
flat |
The configured health.value |
current_health_percent |
Target's current health × health.value |
maximum_health_percent |
Target's maximum health × health.value |
attack_percent |
Caster's current effective attack × health.value |
initial_attack_percent |
Caster's original configured attack × health.value |
Energy heal types¶
energy.type |
Heal amount |
|---|---|
flat |
The configured energy.value |
current_energy_percent |
Target's current energy × energy.value |
maximum_energy_percent |
Target's maximum energy × energy.value |
attack_percent |
Caster's current effective attack × energy.value |
initial_attack_percent |
Caster's original configured attack × energy.value |
For percentage types, value is a multiplier: 0.25 means 25% and 0.5
means 50%. Current effective attack includes active stat increases and
reductions when the heal resolves. Original configured attack is the caster's
attack before battle statuses modify it.
For flat healing, value is the requested number of health or energy points.
Cowculator discards any fractional part of a flat value.
Resolution order¶
Cowculator resolves a heal action in this order:
- Resolve the action's targets.
- Check the action's
chanceindependently for each target. - Calculate the requested healing from the selected heal type.
- Round percentage-based healing or discard the fractional part of flat healing.
- Restore the resource up to the target's maximum.
A missed target receives no healing. With target_type: "all", one fighter can
receive healing while the action misses the other.
Configure a heal action¶
Put the selected heal type and its value inside the resource it restores:
- Use
healthto restore health - Use
energyto restore energy
A single action restores one resource, so include one of these objects rather than both.
Health-healing example¶
This action restores 25% of the target's maximum health:
{
"type": "heal",
"name": "Recover",
"chance": 1.0,
"target_type": "self",
"health": {
"type": "maximum_health_percent",
"value": 0.25
}
}
If the target has 1,000 maximum health, the requested heal is:
Energy-healing example¶
This action restores half of the target's maximum energy:
{
"type": "heal",
"name": "Recharge",
"chance": 1.0,
"target_type": "self",
"energy": {
"type": "maximum_energy_percent",
"value": 0.5
}
}
If the target has 100 maximum energy, the requested heal is:
Rounding and resource limits¶
Cowculator rounds percentage-based healing to a whole point using round-half-up.
For example, 10.5 becomes 11.
Healing cannot raise health or energy above the target's maximum. If a fighter
has 950 of 1,000 health and receives a requested heal of 100, only 50 is
applied. The heal event records both values so clients can distinguish the
requested heal from the amount that restored the resource.
Looking for exact fields?
Use the OpenAPI reference for the complete heal action schema, supported types, and validation rules.