Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out calculation bug for WintersEbb's "Wyrd the Wheezy" #377

Open
amoeba opened this issue Oct 5, 2021 · 1 comment
Open

Figure out calculation bug for WintersEbb's "Wyrd the Wheezy" #377

amoeba opened this issue Oct 5, 2021 · 1 comment
Assignees
Labels

Comments

@amoeba
Copy link
Owner

amoeba commented Oct 5, 2021

When I import https://treestats.net/WintersEbb/Wyrd%20the%20Wheezy into the planner, it pops out with a Spent value above the Total. TreeStats reports total XP of 746,858 with 23,287 unassigned which calculates out to 723,571 spent. That's sorta close to the planner's reported 728,284 spent and a difference of 4,287.

Figure out why the Spent is different (723k vs 728k). I already looked at the stats, vitals, and skill base values and they match up.

@amoeba amoeba added the bug label Oct 5, 2021
@amoeba amoeba self-assigned this Oct 5, 2021
@jkisor
Copy link
Contributor

jkisor commented May 15, 2022

totalXPEarned may be incorrect. It's currently looked-up as the total xp to achieve the current level and doesn't account for the XP between levels.

totalXPEarned: (state: State) => {
let cost: number = 0;
cost += COST_LEVEL[state.build.character.level];
cost += state.build.character.timesEnlightened * COST_LEVEL[275];
return cost;
},

Unassigned Xp depends on totalXPEarned which causes it to be off as well. Noting the < 0 check... revealing that sometimes total XP is lower than the XP invested.

unassignedXP: (state: State, getters: any) => {
const diff = getters.totalXPEarned - getters.totalXPInvested;
if (diff < 0) {
return 0;
}
return diff;
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants