Self Action On Kill

Power Type

Executes an Entity Action Type on the entity that has the power when the entity kills another entity.

Type ID: origins:self_action_on_kill

Fields

Field Type Default Description
entity_action Entity Action Type The action to execute on the entity.
cooldown Integer 1 Interval of ticks this power needs to recharge before the power can be triggered again.
hud_render Hud Render optional If specified, determines how the cooldown of this power is visualized on the HUD.
damage_condition Damage Condition Type optional If specified, the specified action will only execute if the damage dealt by the entity fulfills this condition.
target_condition Entity Condition Type optional If specified, the specified action will only execute if the entity that has been killed fulfills this condition.

Examples

{
    "type": "origins:self_action_on_kill",
    "entity_action": {
        "type": "origins:heal",
        "amount": 4.0
    },
    "cooldown": 100,
    "hud_render": {
        "should_render": true,
        "sprite_location": "origins:textures/gui/community/spiderkolo/resource_bar_01.png",
        "bar_index": 5
    },
    "condition": {
        "type": "origins:equipped_item",
        "equipment_slot": "mainhand",
        "item_condition": {
            "type": "origins:ingredient",
            "ingredient": {
                "item": "minecraft:iron_sword"
            }
        }
    }
}

This example will restore 2 hearts to the entity that has the power if the entity has killed a mob with an Iron Sword.