Skip to content

Modify Health

Entity Action Type

Modifies the current health of the entity.

Type ID: eggolib:modify_health

Note

The max health of the entity will be used as the base value for the modifier.

Fields

Field Type Default Description
modifier Attribute Modifier The modifier to use for modifying the current health of the entity.

Examples

"entity_action": {
    "type": "eggolib:modify_health",
    "modifier": {
        "operation": "add_base_early",
        "value": -2
    }
}

This example will subtract 2 (or 1 heart) from the entity's current health.

"entity_action": {
    "type": "eggolib:modify_health",
    "modifier": {
        "operation": "multiply_total",
        "value": -0.25
    }
}

This example will subtract 25% from the entity's current health. If the max health of the entity is 20, this example will subtract 5 (or 2 and a half hearts) from the entity's current health.