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
Hello! This is not an issue per se, but I think there's an error in the formula for the HTMS Potential points.
This is the code for calculating the potential in players over the age factor limit:
else if (skills.years <= MAX_AGE) {
// subtract weeks to previous birthday
pointsDiff = skills.days / DAYS_IN_WEEK * WEEK_PTS_PER_AGE[skills.years];
// subtracting 16 weeks per whole year until 28
for (let i = skills.years; i > AGE_FACTOR; i--)
pointsDiff += WEEKS_IN_SEASON * WEEK_PTS_PER_AGE[i];
pointsDiff = -pointsDiff;
}
Shouldn't the loop go from skills.years-1 to AGE_FACTOR, including it?
Let's say we have a player with 30.013 years. First, we'll subtract the days equivalence until we reach a full year (in this case, 30.000). Then we'll have to subtract the full 29.111 to 29.000 year (WEEKS_IN_SEASON * WEEK_PTS_PER_AGE[29]) and finally the 28.111-28.000 year (WEEKS_IN_SEASON * WEEK_PTS_PER_AGE[28]). As it is right now, unless I'm missing something it will be taking the 30 and 29 years, so the calculations are messed up in that part...
The text was updated successfully, but these errors were encountered:
Hello! This is not an issue per se, but I think there's an error in the formula for the HTMS Potential points.
This is the code for calculating the potential in players over the age factor limit:
Shouldn't the loop go from
skills.years-1
toAGE_FACTOR
, including it?Let's say we have a player with 30.013 years. First, we'll subtract the days equivalence until we reach a full year (in this case, 30.000). Then we'll have to subtract the full 29.111 to 29.000 year (
WEEKS_IN_SEASON * WEEK_PTS_PER_AGE[29]
) and finally the 28.111-28.000 year (WEEKS_IN_SEASON * WEEK_PTS_PER_AGE[28]
). As it is right now, unless I'm missing something it will be taking the 30 and 29 years, so the calculations are messed up in that part...The text was updated successfully, but these errors were encountered: