Modify Damage (Power Type)

Modifies the damage this entity deals or takes.

Modifies damage. Which side it applies to is decided by target_used, and the two aliases exist so you never have to write that field: apoli:modify_damage_dealt sets it to false, apoli:modify_damage_taken sets it to true. Use the aliases — they read better.

Type ID: apoli:modify_damage (aliases apoli:modify_damage_dealt, apoli:modify_damage_taken)

Fields

FieldTypeDefaultDescription
modifierAttribute ModifieroptionalA single modifier applied to the damage amount.
modifiersarray of Attribute ModifieroptionalSeveral modifiers, applied in operation order.
target_usedBooleanfalsefalse modifies damage the holder deals; true modifies damage the holder takes. Filled in for you by the two aliases.
damage_conditionDamage ConditionoptionalOnly apply to damage matching this.
bientity_conditionBi-Entity ConditionoptionalOnly apply for this attacker/target pairing.

Examples

Hit 50% harder:

{
  "type": "apoli:modify_damage_dealt",
  "modifier": {
    "operation": "multiply_base_multiplicative",
    "value": 0.5
  }
}

Take a quarter less damage from explosions only:

{
  "type": "apoli:modify_damage_taken",
  "damage_condition": { "type": "apoli:explosive" },
  "modifier": {
    "operation": "multiply_base_multiplicative",
    "value": -0.25
  }
}

A classic weakness — double damage from a specific source, which is how most origins are balanced:

{
  "type": "apoli:modify_damage_taken",
  "damage_condition": {
    "type": "apoli:in_tag",
    "tag": "minecraft:is_fire"
  },
  "modifier": {
    "operation": "multiply_base_multiplicative",
    "value": 1.0
  }
}

Only hit undead harder, using the pairing rather than the damage:

{
  "type": "apoli:modify_damage_dealt",
  "bientity_condition": {
    "type": "apoli:target_condition",
    "condition": { "type": "apoli:in_tag", "tag": "minecraft:undead" }
  },
  "modifier": { "operation": "multiply_base_multiplicative", "value": 1.0 }
}

multiply_base_multiplicative with -1.0 reduces the damage to zero, which is a softer way to write immunity than apoli:invulnerability because other powers can still add to it afterwards.