collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
872 stars 99 forks source link

propagate stat modifications to maxstat (if exists) #50

Open collinsmith opened 5 years ago

collinsmith commented 5 years ago

acdf053a76b30e011be3eb9d05af7064fc3d6175 provided a temp fix to the discrepancy between 3/4 stats that have a maxstat (maxdurability remains unfixed). I believe the intention of this column is to indicate an additional stat which operations on the base stat should also be preformed on (as well as serving as the max value). The current fix is insufficient and hacky for cases where the player loads with less than max health. A bit more investigation is needed for all of the use-cases for this column.

See direct column as well -- looks like it indicates existence of maxstat.

Direct - this boolean controls whenever this stat has a maximum stat associated with it, which among others means that unless you screw up something badly, this stat can never exceed the value of the maximum stat and that any change to this stat is permanent (a skill that alters mana, hitpoints or stamina is permanent, while a skill that alters maxmana, maxhp and maxstamina is temporary). You do not need to specify a maximum stat for the effect to be permanent, this can be used to get kill counters to work (look for SVR's old post).

MaxStat - the maximum stat associated with this stat, this field only ever has an effect if Direct is set to true, see the discussion under that field. Percentage based increases to the max stat will usually alter this stat too, however this has some hardcoded aspects to it and is not entirely softcoded.