Origins: Powerful Powers
» Entity conditions » Recent damage taken

Recent damage taken

origins-powerful-powers:recent_damage_takenentity conditiontracked

The total damage the entity took in the last window_ticks ticks.

FieldTypeDefaultDescription
window_ticksInteger60How far back to add up, in ticks. Capped at 600 (30 seconds).
comparisonComparisonrequired
compare_toFloatrequireddamage points (2 = one heart)
  • It adds up the raw damage of each hit as it arrives, before armor, enchantments and effects reduce it.
  • Hits fully blocked by a shield go to recent damage blocked.
  • Hits ignored because of the damage cooldown (invulnerable ticks) are still counted.
  • False for entities that aren't living.

Example: berserk.

json
{
  "type": "origins:action_over_time",
  "interval": 20,
  "condition": {
    "type": "origins-powerful-powers:recent_damage_taken",
    "window_ticks": 100,
    "comparison": ">",
    "compare_to": 10
  },
  "entity_action": {
    "type": "origins:apply_effect",
    "effect": {
      "effect": "minecraft:strength",
      "duration": 40,
      "amplifier": 0
    }
  }
}

After taking more than 10 damage (5 hearts) within 5 seconds, you get Strength, refreshed every second while that stays true.

Attribute: recent_damage_taken (always a 60-tick window)