Try / OpenGothic

Reimplementation of Gothic 2 Notr
MIT License
1.07k stars 78 forks source link

Move godmode damage negation to `changeAttribute` #586

Closed thokkat closed 2 months ago

thokkat commented 2 months ago

Damage could still be applied by script if changeAttribue function was used. Because all other cases where damage is calculated in OpenGothic use this function too, former checks for godmode became redundant. Script can still access hnpc directly like in swamp drone explosion which makes full damage negation impossible.

For now I opted to only check for lifepoints. Vanilla prevents reduction of other attributes as well. Equip-/unequipping strength belt is an infinite strength source.

Try commented 2 months ago

Make sense - merged, thanks!