Damage Over Time (Power Type)

Legacy alias of apoli:action_over_time with an apoli:damage action pre-filled.

Damages the holder on an interval. This is a legacy alias — it resolves to apoli:action_over_time with an apoli:damage action built for you, so existing data packs keep working unchanged.

Type ID: apoli:damage_over_time

Fields

FieldTypeDefaultDescription
damageFloatrequiredHow much damage to deal each interval.
damage_easyFloatvalue of damageDamage dealt on Easy difficulty.
damage_typeIdentifierminecraft:genericThe damage type to use.
intervalInteger20Ticks between hits.
onset_delayIntegervalue of intervalTicks to wait after the condition becomes true before the first hit.

The composed form

Write this instead in new packs — it is what the alias expands to, and it lets you swap the damage for any other entity action:

{
  "type": "apoli:action_over_time",
  "interval": 20,
  "onset_delay": 20,
  "entity_action": {
    "type": "apoli:damage",
    "amount": 1,
    "damage_type": "minecraft:starve"
  },
  "condition": { "type": "apoli:food_level", "comparison": "<=", "compare_to": 6 }
}

When damage_easy differs from damage, the alias wraps the action in apoli:if_else against the new apoli:difficulty condition — you can write that yourself for finer control, such as a separate Hard value.

protection_enchantment and protection_effectiveness are not supported — they do not scale the onset delay, and Apoli logs a warning once if a pack sets them. Track the protection level in an apoli:resource and use an expression instead — "onset_delay": "20 + mypack:protection * 26" — which is both clearer and not limited to enchantments.