Fix issue where scav raids would generate MORE loot the shorter the raid was
This commit is contained in:
parent
b15c8e196e
commit
14e94dbb8e
@ -129,6 +129,7 @@ export class RaidTimeAdjustmentService
|
||||
const chosenRaidReductionPercent = Number.parseInt(this.weightedRandomHelper.getWeightedValue<string>(
|
||||
mapSettings.reductionPercentWeights,
|
||||
));
|
||||
const raidTimeRemainingPercent = 100 - chosenRaidReductionPercent;
|
||||
|
||||
// How many minutes raid will last
|
||||
const newRaidTimeMinutes = Math.floor(this.randomUtil.reduceValueByPercent(baseEscapeTimeMinutes, chosenRaidReductionPercent));
|
||||
@ -141,8 +142,8 @@ export class RaidTimeAdjustmentService
|
||||
// Store time reduction percent in app context so loot gen can pick it up later
|
||||
this.applicationContext.addValue(ContextVariableType.RAID_ADJUSTMENTS,
|
||||
{
|
||||
dynamicLootPercent: Math.max(chosenRaidReductionPercent, mapSettings.minDynamicLootPercent),
|
||||
staticLootPercent: Math.max(chosenRaidReductionPercent, mapSettings.minStaticLootPercent),
|
||||
dynamicLootPercent: Math.max(raidTimeRemainingPercent, mapSettings.minDynamicLootPercent),
|
||||
staticLootPercent: Math.max(raidTimeRemainingPercent, mapSettings.minStaticLootPercent),
|
||||
simulatedRaidStartSeconds: simulatedRaidStartTimeMinutes * 60
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user