can remove this comment now
This commit is contained in:
parent
742096bf6f
commit
41bd153188
@ -50,7 +50,7 @@ const scaleAmount = (day: number, amount: number, scalingMultiplier: number): nu
|
|||||||
export const isLoginRewardAChoice = (account: TAccountDocument): boolean => {
|
export const isLoginRewardAChoice = (account: TAccountDocument): boolean => {
|
||||||
const accountSeed = parseInt(account._id.toString().substring(16), 16);
|
const accountSeed = parseInt(account._id.toString().substring(16), 16);
|
||||||
const rng = new SRng(mixSeeds(accountSeed, account.LoginDays));
|
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.
|
// Always produces the same result for the same account _id & LoginDays pair.
|
||||||
@ -60,7 +60,7 @@ export const getRandomLoginRewards = (
|
|||||||
): ILoginReward[] => {
|
): ILoginReward[] => {
|
||||||
const accountSeed = parseInt(account._id.toString().substring(16), 16);
|
const accountSeed = parseInt(account._id.toString().substring(16), 16);
|
||||||
const rng = new SRng(mixSeeds(accountSeed, account.LoginDays));
|
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)];
|
const rewards = [getRandomLoginReward(rng, account.LoginDays, inventory)];
|
||||||
if (pick_a_door) {
|
if (pick_a_door) {
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user