Skip to content

Action On Attacker Hurt

Power Type

Executes a bi-entity action upon an entity's most recent attacker getting hurt.

Type ID: apugli:action_on_attacker_hurt

Fields

Field Type Default Description
cooldown Integer 1 The number of ticks the entity has to wait between uses of this power.
hud_render Hud Render Determines how the resource is visualized on the HUD.
bientity_action Bi-entity Action The bi-entity action to run with the power holder as the actor and that entity's most recent attacker as the target.
bientity_condition Bi-entity Condition optional If set, the bi-entity condition that must be met with the power holder as the actor and that entity's most recent attacker as the target for the action to run.
damage_condition Damage Condition optional If set, the damage condition that must be met by the source and amount of the damage dealt to the power holder's most recent attacker.

Examples

{
    "type": "apugli:action_on_attacker_hurt",
    "bientity_action": {
        "type": "apoli:heal",
        "amount": 6
    },
    "bientity_condition": {
        "type": "apoli:target_condition",
        "condition": {
            "type": "apoli:entity_type",
            "entity_type": "minecraft:player"
        }
    }
}
This example heals the entity each time their most recent attacker is hurt if they're a player.