Prevented gp coin repeatable reward falling below 1

This commit is contained in:
Dev 2024-06-17 17:44:34 +01:00
parent 996e567959
commit 1db9aa3243

View File

@ -220,7 +220,7 @@ export class RepeatableQuestRewardGenerator
* this.mathUtil.interp1(pmcLevel, levelsConfig, roublesConfig) * this.mathUtil.interp1(pmcLevel, levelsConfig, roublesConfig)
* this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig),
), ),
gpCoinRewardCount: Math.floor( gpCoinRewardCount: Math.ceil( // Ceil value to ensure it never drops below 1
effectiveDifficulty effectiveDifficulty
* this.mathUtil.interp1(pmcLevel, levelsConfig, gpCoinConfig) * this.mathUtil.interp1(pmcLevel, levelsConfig, gpCoinConfig)
* this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig), * this.randomUtil.getFloat(1 - rewardSpreadConfig, 1 + rewardSpreadConfig),