noxworld-dev / opennox

OpenNox main repository.
GNU General Public License v3.0
446 stars 24 forks source link

NS4: Add "pure" damage type #637

Closed dennwc closed 8 months ago

dennwc commented 9 months ago

Currently scripts may set any existing damage type, but sometimes it's not enough. Each damage type has its own specifics, while for scripts you sometimes just want to deal specific damage that ignores all armor, resists, etc.

There's a function that deals this damage type: nox_xxx_unitDamageClear_4EE5E0. It's used for Channel Life spell, Elimination's Sudden Death, etc.

I think we could expose it as a special damage type: PURE = -1. It's only relevant to scripts, so we will just switch on that type and run a different function.

KILAH4716 commented 9 months ago

I'm about to test damage types to see if any kind of damage can already be identified as "pure" damage.

Evengard commented 9 months ago

In other games that kind of damage is usually called "true damage", btw.