Action on kill
too-many-attributes:action_on_killpower type
Runs actions on the holder, the victim, or both, when the holder kills a living entity.
| Field | Type | Default | Description |
|---|---|---|---|
entity_action | Entity action | optional | Runs on the holder. |
target_action | Entity action | optional | Runs on the victim. |
bientity_action | Bi-entity action | optional | Actor: the holder. Target: the victim. |
bientity_condition | Bi-entity condition | optional | If set, the actions only run when it's true. Actor: the holder. Target: the victim. |
target_condition | Entity condition | optional | If set, the actions only run when the victim matches. |
damage_condition | Damage condition | optional | If set, the actions only run when the killing damage matches. The amount is the damage before armor. |
cooldown | Integer | 1 | Ticks before it can run again. |
hud_render | HUD render | hidden | Shows the cooldown as a bar, like other Origins cooldown powers. |
- The killer is the entity credited by the damage source, such as the shooter of an arrow.
- It runs after the victim has died, so
target_actionsees a dead entity. Use it for effects on the world around the victim. - To test the holder, use the power's own
condition. - From Overgrown's Apoli: Overgrown's
self_actionandattacker_actionareentity_action. Itsattacker_conditionis the power's owncondition.entity_action_targetisn't supported, so usetarget_actionfor the victim.
Example: "Soul harvest". Killing an undead mob heals you 2 hearts, at most once every 5 seconds.
{
"type": "too-many-attributes:action_on_kill",
"target_condition": {
"type": "origins:entity_group",
"group": "undead"
},
"entity_action": {
"type": "origins:heal",
"amount": 4
},
"cooldown": 100,
"hud_render": {
"should_render": true
}
}