feat: railjack abandoned caches (#2611)
Some checks failed
Build Docker image / docker-arm64 (push) Waiting to run
Build / build (push) Has been cancelled
Build Docker image / docker-amd64 (push) Has been cancelled

Closes #2602

Reviewed-on: #2611
Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com>
Co-authored-by: VampireKitten <dynamightkobold@gmail.com>
Co-committed-by: VampireKitten <dynamightkobold@gmail.com>
This commit is contained in:
VampireKitten 2025-08-13 07:13:26 -07:00 committed by Sainan
parent fd2ec696a0
commit 261dbd5fdf
2 changed files with 32 additions and 0 deletions

View File

@ -2000,6 +2000,36 @@ function getRandomMissionDrops(
}
});
// Railjack Abandoned Cache Rewards, Rotation A (Mandatory Objectives)
if (RewardInfo.POICompletions) {
if (region.cacheRewardManifest) {
const deck = ExportRewards[region.cacheRewardManifest];
for (let cache = 0; cache != RewardInfo.POICompletions; ++cache) {
const drop = getRandomRewardByChance(deck[0]);
if (drop) {
drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
}
}
} else {
logger.error(`POI completed, but there was no cache reward manifest at ${RewardInfo.node}`);
}
}
// Railjack Abandoned Cache Rewards, Rotation B (Optional Objectives)
if (RewardInfo.LootDungeonCompletions) {
if (region.cacheRewardManifest) {
const deck = ExportRewards[region.cacheRewardManifest];
for (let cache = 0; cache != RewardInfo.LootDungeonCompletions; ++cache) {
const drop = getRandomRewardByChance(deck[1]);
if (drop) {
drops.push({ StoreItem: drop.type, ItemCount: drop.itemCount, FromEnemyCache: true });
}
}
} else {
logger.error(`Loot dungeon completed, but there was no cache reward manifest at ${RewardInfo.node}`);
}
}
if (region.cacheRewardManifest && RewardInfo.EnemyCachesFound) {
const deck = ExportRewards[region.cacheRewardManifest];
for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {

View File

@ -187,6 +187,8 @@ export interface IRewardInfo {
rewardQualifications?: string; // did a Survival for 5 minutes and this was "1"
rewardTierOverrides?: number[]; // Disruption
PurgatoryRewardQualifications?: string;
POICompletions?: number;
LootDungeonCompletions?: number;
rewardSeed?: number | bigint;
periodicMissionTag?: string;
T?: number; // Duviri