forked from OpenWF/SpaceNinjaServer
		
	feat: railjack abandoned caches (#2611)
Closes #2602 Reviewed-on: OpenWF/SpaceNinjaServer#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:
		
							parent
							
								
									fd2ec696a0
								
							
						
					
					
						commit
						261dbd5fdf
					
				@ -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) {
 | 
					        if (region.cacheRewardManifest && RewardInfo.EnemyCachesFound) {
 | 
				
			||||||
            const deck = ExportRewards[region.cacheRewardManifest];
 | 
					            const deck = ExportRewards[region.cacheRewardManifest];
 | 
				
			||||||
            for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
 | 
					            for (let rotation = 0; rotation != RewardInfo.EnemyCachesFound; ++rotation) {
 | 
				
			||||||
 | 
				
			|||||||
@ -187,6 +187,8 @@ export interface IRewardInfo {
 | 
				
			|||||||
    rewardQualifications?: string; // did a Survival for 5 minutes and this was "1"
 | 
					    rewardQualifications?: string; // did a Survival for 5 minutes and this was "1"
 | 
				
			||||||
    rewardTierOverrides?: number[]; // Disruption
 | 
					    rewardTierOverrides?: number[]; // Disruption
 | 
				
			||||||
    PurgatoryRewardQualifications?: string;
 | 
					    PurgatoryRewardQualifications?: string;
 | 
				
			||||||
 | 
					    POICompletions?: number;
 | 
				
			||||||
 | 
					    LootDungeonCompletions?: number;
 | 
				
			||||||
    rewardSeed?: number | bigint;
 | 
					    rewardSeed?: number | bigint;
 | 
				
			||||||
    periodicMissionTag?: string;
 | 
					    periodicMissionTag?: string;
 | 
				
			||||||
    T?: number; // Duviri
 | 
					    T?: number; // Duviri
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user