can remove this comment now
All checks were successful
Build / build (pull_request) Successful in 54s
Build / build (push) Successful in 1m45s

This commit is contained in:
Sainan 2025-05-09 03:04:01 +02:00
parent 742096bf6f
commit 41bd153188

View File

@ -50,7 +50,7 @@ const scaleAmount = (day: number, amount: number, scalingMultiplier: number): nu
export const isLoginRewardAChoice = (account: TAccountDocument): boolean => {
const accountSeed = parseInt(account._id.toString().substring(16), 16);
const rng = new SRng(mixSeeds(accountSeed, account.LoginDays));
return rng.randomFloat() < 0.25; // Using 25% as an approximate chance for pick-a-doors. More conclusive data analysis is needed.
return rng.randomFloat() < 0.25;
};
// Always produces the same result for the same account _id & LoginDays pair.
@ -60,7 +60,7 @@ export const getRandomLoginRewards = (
): ILoginReward[] => {
const accountSeed = parseInt(account._id.toString().substring(16), 16);
const rng = new SRng(mixSeeds(accountSeed, account.LoginDays));
const pick_a_door = rng.randomFloat() < 0.25; // Using 25% as an approximate chance for pick-a-doors. More conclusive data analysis is needed.
const pick_a_door = rng.randomFloat() < 0.25;
const rewards = [getRandomLoginReward(rng, account.LoginDays, inventory)];
if (pick_a_door) {
do {