Skip to main content

Modify Damage Taken (Power Type)

Changes how much damage the entity that has the power takes. The actor is the attacker, and the target is the entity with the power.

Type ID: apoli:modify_damage_taken

Fields

FieldTypeDefaultDescription
bientity_actionBi-entity Action TypeoptionalIf set, this action runs on the actor, the target or both whenever the modifiers are applied.
self_actionEntity Action TypeoptionalIf set, this action runs on the target whenever the modifiers are applied.
attacker_actionEntity Action TypeoptionalIf set, this action runs on the actor whenever the modifiers are applied.
bientity_conditionBi-entity Condition TypeoptionalIf set, the actions and modifiers only apply when the actor and target pass this condition.
target_conditionEntity Condition TypeoptionalIf set, the actions and modifiers only apply when the target, the entity with the power, passes this condition.
apply_armor_conditionEntity Condition TypeoptionalIf set, armor only reduces the damage while the target passes this condition.
damage_armor_conditionEntity Condition TypeoptionalIf set, worn armor only takes damage while the target passes this condition.
damage_conditionDamage Condition TypeoptionalIf set, the modifiers and actions only apply when the damage taken passes this condition.
modifierAttribute ModifieroptionalIf set, this modifier is applied to the damage the target takes.
modifiersArray of Attribute ModifiersoptionalIf set, these modifiers are applied to the damage the target takes.

Examples

{
    "type": "apoli:modify_damage_taken",
    "damage_condition": {
        "type": "apoli:attacker",
        "entity_condition": {
            "type": "apoli:equipped_item",
            "equipment_slot": "mainhand",
            "item_condition": {
                "type": "apoli:or",
                "conditions": [
                    {
                        "type": "apoli:enchantment",
                        "enchantment": "minecraft:binding_curse",
                        "comparison": ">=",
                        "compare_to": 1
                    },
                    {
                        "type": "apoli:enchantment",
                        "enchantment": "minecraft:vanishing_curse",
                        "comparison": ">=",
                        "compare_to": 1
                    }
                ]
            }
        }
    },
    "modifier": {
        "operation": "addition",
        "value": 5.5
    }
}

The entity with the power takes 5.5 extra damage (almost 3 hearts) when the attacker holds an item with Curse of Binding or Curse of Vanishing.

{
    "type": "apoli:modify_damage_taken",
    "bientity_condition": {
        "type": "apoli:actor_condition",
        "condition": {
            "type": "apoli:equipped_item",
            "equipment_slot": "mainhand",
            "item_condition": {
                "type": "apoli:or",
                "conditions": [
                    {
                        "type": "apoli:enchantment",
                        "enchantment": "minecraft:binding_curse",
                        "comparison": ">=",
                        "compare_to": 1
                    },
                    {
                        "type": "apoli:enchantment",
                        "enchantment": "minecraft:vanishing_curse",
                        "comparison": ">=",
                        "compare_to": 1
                    }
                ]
            }
        }
    },
    "modifier": {
        "operation": "addition",
        "value": 5.5
    }
}

This does the same, but checks the attacker with a bi-entity condition instead of a damage condition.