fix: nightmare missions rewards (#926)
Some checks failed
Build Docker image / docker (push) Waiting to run
Build / build (18) (push) Has been cancelled
Build / build (22) (push) Has been cancelled
Build / build (20) (push) Has been cancelled

Closes #416

Reviewed-on: #926
Reviewed-by: Sainan <sainan@calamity.inc>
Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
This commit is contained in:
AMelonInsideLemon 2025-02-08 17:41:21 -08:00 committed by OrdisPrime
parent eb3acad598
commit d4c5e367b4

View File

@ -347,6 +347,24 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
}
}
}
if (RewardInfo.nightmareMode) {
const deck = ExportRewards["/Lotus/Types/Game/MissionDecks/NightmareModeRewards"];
let rotation = 0;
if (region.missionIndex === 3 && RewardInfo.rewardTier) {
rotation = RewardInfo.rewardTier;
} else if ([6, 7, 8, 10, 11].includes(region.systemIndex)) {
rotation = 2;
} else if ([4, 9, 12, 14, 15, 16, 17, 18].includes(region.systemIndex)) {
rotation = 1;
}
const drop = getRandomRewardByChance(deck[rotation]);
if (drop) {
drops.push(drop);
}
}
}
return drops;
}