XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

fix: nightmare missions rewards (#926)

Closes #416 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/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>

d4c5e367
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

1 个文件 +18 -0
Modified src/services/missionInventoryUpdateService.ts +18 -0
@@ -347,6 +347,24 @@ function getRandomMissionDrops(RewardInfo: IRewardInfo): IRngResult[] {
347 347 }
348 348 }
349 349 }
350
351 if (RewardInfo.nightmareMode) {
352 const deck = ExportRewards["/Lotus/Types/Game/MissionDecks/NightmareModeRewards"];
353 let rotation = 0;
354
355 if (region.missionIndex === 3 && RewardInfo.rewardTier) {
356 rotation = RewardInfo.rewardTier;
357 } else if ([6, 7, 8, 10, 11].includes(region.systemIndex)) {
358 rotation = 2;
359 } else if ([4, 9, 12, 14, 15, 16, 17, 18].includes(region.systemIndex)) {
360 rotation = 1;
361 }
362
363 const drop = getRandomRewardByChance(deck[rotation]);
364 if (drop) {
365 drops.push(drop);
366 }
367 }
350 368 }
351 369 return drops;
352 370 }