Skip to content

Refactors Actor:onTakeHit to move special-cased effect/talent behavior back into callbacks.

General re-ordering and re-factoring of Actor:onTakeHit

New order of operations:

  1. Invulnerability and chance negation of hits always happens first.

  2. Negative effects that break on damage (Daze, Sleep, Suspended).

  3. Frozen's ice-block damage now occurs before most other forms of onTakeHit mitigation, aside from Invulnerability. This is a balance change.

  4. Unconditional redirection and reduction: Stone Link, Shadow Empathy, Dismissal.

  5. Effects that trigger on damage and make sense to consider pre-shielded damage: Seethe, Vimsense, Stoneshield, Shield of Light.

  6. All Shield and Shield-like effects. Also includes pseudo-shields like Resonance Field, Eldritch Stone, and Deflection. Shields that only block part of the damage and shields that do other things will take precedence over more general shields.

  7. Effects that trigger based on a loss of life, rather than damage. Rampage, Hate and Feedback Gain, Solipsism, Bloodspring, etc.

  8. Stoned. Dying to Stoned should be a sure-kill outside of dedicated life-saving talents, not "Oops I shattered but I shrugged that off." because Rampage normally shrugs after Stoned sets the damage high.

  9. Threshold-triggered effects: Vitality, Second Life, Heartstart, Shadow Decoy, and Draconic Body.

  10. Several other generic properties: clone_on_hit, on_takehit, and the Actor:takeHit hook. These are pseudo-callbacks and so get lumped in here.

  11. lifesteal now applies only to post-mitigation damage. You can't steal life from a shield, and life gained should be directly correlated with the life actually lost.

  12. Size Matters and related achievements now triggers on post-mitigated damage. Might be better to move to pre-mitigated damage, but it being in the middle (After Resistances and Shields, but not other effects) is just bizarre.

  • Moves the vast majority of special cases in Actor:onTakeHit to independent callbacks with manually set weights to control order of events.

  • This only effects behaviors that were previously special-cased (and T_HIEMAL_SHIELD). Many behaviors already used callbackOnHit and were not touched or reordered.

Refactors Shield-like effects and talents

  1. The following talents/effects are "shield-like" for UI purposes.
    • EFF_RESONANCE_FIELD
    • EFF_DISPLACEMENT_SHIELD
    • EFF_TIME_SHIELD
    • EFF_ELDRITCH_STONE
    • EFF_DAMAGE_SHIELD
    • EFF_PSI_DAMAGE_SHIELD
    • T_DEFLECTION
    • T_HIEMAL_SHIELD
    • T_RETRIBUTION
    • EFF_RAMPAGE (with T_TENACITY) triggers with the shields but is not shield-like for UI purposes.
  2. Shield-like talents should all
    1. Denote their current power in effect icon by the charges or icon_overlay property. Damage Shield does this, everyone else should too when reasonable.
    2. Implement a shield_bar function that returns their current and max durability.
  3. The shield/life-bar UI no longer requires special casing for shield effects. All effects/sustains that implement a shield_bar function add to the bar.
  4. Moves the burden of tracking shield power from the Actor (e.g. self.damage_shield_absorb) to the effect (e.g. eff.power). Now you can just interact with the shield, instead of interacting with the shield and the actor.
  5. Damage types (like HEALING_POWER from T_BATHE_IN_LIGHT) and talents (like T_DIRGE_OF_PESTILENCE) are adjusted to work with the new framework.

Deprecates the attribute tags when used in the onTakeHit calculation.

  • speed_resist (no longer exists on Tarrasca)
  • invis_on_hit (only used by T_SECRETS_OF_THE_ETERNALS)
  • reduce_spell_cooldown_on_hit (unused)
  • life_leech_chance (only used by Netherworm Masses, should grant that creature lifesteal instead)
  • contingency (unused)
  • resource_leech_chance (unused)
  • hate_per_powerful_hit (unused, hate gain is a mess and this cleans it up)
  • incoming_reduce (see below)

As part of the shield reform:

  • displacement_shield_chance
  • displacement_shield
  • displacement_shield_target
  • time_shield_absorb
  • damage_shield_reflect
  • damage_shield_absorb
  • resonance_field_absorb
  • retribution_absorb

Changes some talent behaviors behind the scene.

  • T_SNIPE and T_SKIRMISHER_TRAINED_REACTIONS now use Absolute Resistance instead of incoming_reduce. The stacking between the two and Tarrasca is an incredibly niche overlap, and two talents doesn't justify a unique property when Absolute Resistance exists.
  • T_RESONANCE_FIELD now special-cases its feedback generation with a turn-proc, because of the reordering. It also applies prior to most general shields, so feedback generation is optimized.
  • T_SHIELD_OF_LIGHT no longer attempts to heal you if you're already at full Health, but triggers before shield mitigation.
  • T_SECRETS_OF_THE_ETERNALS no longer grants the invis_on_hit property, but has its own callback.
  • T_HEALING_LIGHT, T_WEAPON_OF_LIGHT, and T_DIRGE_OF_PESTILENCE tweaked to support the changes to damage shields.
  • T_BLOODSPRING now has a chat message when it triggers. Felt a little bland without it.
  • T_BLOODSPRING and T_DRACONIC_BODY moved off the antiquated trigger framework and just have regular callbacks.
  • The status effect generated from T_SEETHE and T_GRIM_RESOLVE (EFF_CURSED_FORM) now displays its number of stacks (which doubles as its duration).
  • Several other talents had their do_onHit-esque functions removed and just integrated into their callbacks.

Merge request reports