KumaV1 / Custom-Modifiers-in-Melvor

MIT License
0 stars 0 forks source link

Conditional damage immunity/evasion #23

Closed KumaV1 closed 5 months ago

KumaV1 commented 6 months ago

Modifiers that provide (chance) for damage being reduced to 0 (or maybe damage taken in general as well)

It's important to highlight the difference between "Reducing damage taken to 0" and "Avoid getting hit", as the former would still be treated as being hit, including everything that comes with it (like being able to have effects applied).

There may also be a difference between "dodging" and outright immunity, though my guess would be that the former is just a chance-limited variant of the latter.

UPDATE: "Dodging" (and "Protection") are indeed chance/value based (character.rollToHit(target, attack)). And while onHit-effects are also only evaluated on hit (so dodge/protection failing), they still allow for preHitEffects, unlike immunity which nullifies even those. Also, as damage is only calculated on rolling for a hit, it can not be used for conditional immunity, only reducing damage received to zero, while the enemy is still treated as having been hit.

KumaV1 commented 5 months ago

Implemented through #35. There are certainly more conditions that could be implemented (based on the generic issue title), but the ones in the ticket description have been implemented