Skip to content

[Enhancement] Re-calculate any statistics affected by calculations on fight-load/plugin-load (eD, KO, Magic Luck) #116

Description

@Matsyir

These re-calculations mostly do happen on PvP-Hub, but for local fights, eD, KO chance, and Magic Luck remain outdated even after we make an update to these calcs and change their values.

Some Fight Log columns may also remain outdated: minHit, maxHit, avgHit, ko chance.

I think, these calculations should be able to execute fairly quickly. We probably don't need to re-write the file/fight data when we update calcs, we can probably just re-run the calcs every time fights are read from file. Also, ensure to update the fight's "global statistic value" or "total value" so it's shown everywhere, not just in logs. For example, don't just update minHit/maxHit/avgHit in logs, but also fighter.expectedDamage on both competitor/opponent.

We also could only run this once per pluginVersion and rewrite the files, though. But I don't think it's necessary and will probably make the process appear much slower than it really is. But perhaps the calcs will take a significant amount of time for 1k+ fights and it'll be worth writing them, not too sure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomershas known solutionThere is a known implementation method

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions