Origins: Powerful Powers
» Entity conditions » Last damage amount

Last damage amount

origins-powerful-powers:last_damage_amountentity conditiontracked

The raw damage of the most recent hit the entity took, before armor and effects.

FieldTypeDefaultDescription
comparisonComparisonrequired
compare_toFloatrequireddamage points
  • It keeps its value until the next hit, so combine it with hurt_time for "just now".
  • Hits blocked by a shield count here too.

Example: heavy hits stagger you.

json
{
  "type": "origins:action_over_time",
  "interval": 1,
  "condition": {
    "type": "origins:and",
    "conditions": [
      {
        "type": "origins-powerful-powers:hurt_time",
        "comparison": ">=",
        "compare_to": 9
      },
      {
        "type": "origins-powerful-powers:last_damage_amount",
        "comparison": ">=",
        "compare_to": 8
      }
    ]
  },
  "entity_action": {
    "type": "origins:apply_effect",
    "effect": {
      "effect": "minecraft:slowness",
      "duration": 20,
      "amplifier": 1
    }
  }
}

Right after a hit of 8 or more damage, you get Slowness II for a second.

Attribute: last_damage_amount