feat: conquest progression & rewards #1791

Merged
Sainan merged 10 commits from conquest-progress into main 2025-04-23 11:35:57 -07:00
Showing only changes of commit 38112dcdf4 - Show all commits

View File

@ -789,20 +789,19 @@ export const addMissionRewards = async (
inventory.EchoesHexConquestCacheScoreMission = score; inventory.EchoesHexConquestCacheScoreMission = score;
} else { } else {
inventory.EntratiLabConquestCacheScoreMission ??= 0; inventory.EntratiLabConquestCacheScoreMission ??= 0;
if (score > inventory.EntratiLabConquestCacheScoreMission) {
for (const reward of labConquestRewards) { for (const reward of labConquestRewards) {
if (score >= reward.at && inventory.EntratiLabConquestCacheScoreMission < reward.at) { if (score >= reward.at && inventory.EntratiLabConquestCacheScoreMission < reward.at) {
const rolled = getRandomReward(reward.pool)!; const rolled = getRandomReward(reward.pool)!;
logger.debug(`rolled lab conquest reward for reaching ${reward.at} points`, rolled); logger.debug(`rolled lab conquest reward for reaching ${reward.at} points`, rolled);
MissionRewards.push({ MissionRewards.push({
StoreItem: rolled.type, StoreItem: rolled.type,
ItemCount: rolled.itemCount ItemCount: rolled.itemCount
}); });
}
} }
}
if (score > inventory.EntratiLabConquestCacheScoreMission)
inventory.EntratiLabConquestCacheScoreMission = score; inventory.EntratiLabConquestCacheScoreMission = score;
}
} }
ConquestCompletedMissionsCount = rewardInfo.ConquestCompleted == 2 ? 0 : rewardInfo.ConquestCompleted + 1; ConquestCompletedMissionsCount = rewardInfo.ConquestCompleted == 2 ? 0 : rewardInfo.ConquestCompleted + 1;