Skip to content

Commit

Permalink
ovr matching
Browse files Browse the repository at this point in the history
  • Loading branch information
nicidob committed Dec 22, 2021
1 parent d61023b commit a8e22f5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 10 additions & 0 deletions src/worker/core/player/developSeason.basketball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ const calcBaseChange = (age: number, coachingRank: number): number => {
);
val += std_noise;

if (g.hasOwnProperty("numActiveTeams")) {
const numActiveTeams = g.get("numActiveTeams");
if (numActiveTeams > 1) {
if (val >= 0) {
val *= ((coachingRank - 1) * -0.5) / (numActiveTeams - 1) + 1.25;
} else {
val *= ((coachingRank - 1) * 0.5) / (numActiveTeams - 1) + 0.75;
}
}
}
if (g.hasOwnProperty("numActiveTeams")) {
const numActiveTeams = g.get("numActiveTeams");
if (numActiveTeams > 1) {
Expand Down
8 changes: 4 additions & 4 deletions src/worker/core/player/genRatings.basketball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ const genRatings = (
],
];

const pca1 = 1.61 * hgt - 77.92 + random.realGauss(0, 18.0);
const pca2 = 0.51 * hgt - 24.93 + random.realGauss(0, 20.0);
const pca3 = 0.29 * hgt - 14.16 + random.realGauss(0, 10.0);
const pca1 = 1.61 * hgt - 77.92 + random.realGauss(0, 15.4);
const pca2 = 0.51 * hgt - 24.93 + random.realGauss(0, 17.7);
const pca3 = 0.29 * hgt - 14.16 + random.realGauss(0, 9.3);

const rawRatings = {
diq:
Expand Down Expand Up @@ -124,7 +124,7 @@ const genRatings = (
};

for (const key of helpers.keys(rawRatings)) {
rawRatings[key] = limitRating(rawRatings[key] * random.uniform(0.78, 1.2));
rawRatings[key] = limitRating(rawRatings[key] * random.uniform(0.77, 1.23));
}

const ratings = {
Expand Down

0 comments on commit a8e22f5

Please sign in to comment.