HomeWildfire Games

Allow resistances to StatusEffects.
AuditedrP24162

Description

Allow resistances to StatusEffects.

Differential Revision: D2908
Reviewed by: @wraitii
Comments by: @bb.

Event Timeline

bb raised a concern with this commit.
bb added inline comments.
/ps/trunk/binaries/data/mods/public/simulation/helpers/Attacking.js
122–124

Yelled a couple of times at these, to remove them here. The are never used down the line (the gui gets it directly from the json) and passing translatable strings through the guiinterface might be considered unwanted (which is happening).

This commit now has outstanding concerns.Nov 17 2020, 10:27 PM
bb accepted this commit.Nov 18 2020, 9:25 AM
All concerns with this commit have now been addressed.Nov 18 2020, 9:25 AM

I think the 'fetch the GUI data exclusively from JSON' was a regression, though we didn't notice at the time. The problem is modifiers: these are actually defined in the template (in the status effects receiver really). To show their effect in the GUI, we need to pull the data from the template. If we want the tooltip to explain the modifiers, it becomes intractable -> the GUI must show template-specific data.

While _technically_ it ought to be possible to pull the data from the template in the GUI, this just seems inferior to the easy solution -> pass the raw translatable strings from the sim to the GUI. The main drawback I can see is that it _could_ be a performance problem, but that doesn't really seem concerning enough to warrant particular handling right now.
(Conceptually, I don't think this is different from getting the identity classes from the sim to the GUI).