Origins: Powerful Powers
» Entity conditions » Last attack reach

Last attack reach

origins-powerful-powers:last_attack_reachentity conditionplayers onlytracked

The distance, in blocks, between the player and the entity they last attacked, measured as the attack starts.

FieldTypeDefaultDescription
comparisonComparisonrequired
compare_toDoublerequiredblocks
  • It's 0 until the player first attacks, and keeps its value until the next attack.
  • It's recorded at the start of the attack, before damage is worked out, so inside modify_damage_dealt it's the distance of the current hit.

Example:

json
{
  "type": "origins:modify_damage_dealt",
  "condition": {
    "type": "origins-powerful-powers:last_attack_reach",
    "comparison": ">",
    "compare_to": 2.5
  },
  "modifier": {
    "operation": "multiply_total_multiplicative",
    "value": 0.25
  }
}

Hits landed from more than 2.5 blocks away deal 25% more: a spear-tip bonus.

Attribute: last_attack_reach