You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the gens that use DVs, DV spreads may only be either 15 in everything or a default hidden power spread. Custom spreads can be achieved by editing after selection, but they can not appear initially.
The only built-in set where this is relevant is the gen 1 Mewtwo "Ubers Staller" set, which should have 13 special DVs (to avoid overflow when boosted to +4) but gets 15 instead.
Cause
Custom DVs get ignored here. Instead of reading from "ivs", where custom spreads are stored, the "dvs" entry is used. Since "dvs" isn't generally defined, the fallback value of 15 gets used.
Any set with hidden power gets its DVs maxed, then corrected to a default spread by the move change listener. The issue is with custom spreads getting ignored; the correction code is working perfectly.
Solution
I think the best solution would be to remove all references to the "dvs" property in setdex entries and, instead, always calculate DVs from IVs. As far as I can tell, the only place that assigns a dvs entry is correctHiddenPower and it's only read here and here.
If the dvs property needs to be kept, another solution would be to change
Problem
In the gens that use DVs, DV spreads may only be either 15 in everything or a default hidden power spread. Custom spreads can be achieved by editing after selection, but they can not appear initially.
The only built-in set where this is relevant is the gen 1 Mewtwo "Ubers Staller" set, which should have 13 special DVs (to avoid overflow when boosted to +4) but gets 15 instead.
Cause
Custom DVs get ignored here. Instead of reading from "ivs", where custom spreads are stored, the "dvs" entry is used. Since "dvs" isn't generally defined, the fallback value of 15 gets used.
Any set with hidden power gets its DVs maxed, then corrected to a default spread by the move change listener. The issue is with custom spreads getting ignored; the correction code is working perfectly.
Solution
I think the best solution would be to remove all references to the "dvs" property in setdex entries and, instead, always calculate DVs from IVs. As far as I can tell, the only place that assigns a dvs entry is correctHiddenPower and it's only read here and here.
If the dvs property needs to be kept, another solution would be to change
damage-calc/src/js/shared_controls.js
Line 685 in 9e8ca8e
to something like
set.dvs?.[LEGACY_STATS[gen][i]] ?? calc.Stats.IVToDV(set.ivs?.[LEGACY_STATS[gen][i]] ?? 31);
The text was updated successfully, but these errors were encountered: