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

XFESpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/XFESpaceNinjaServer

fix: also roll A & B when granum void rank 3 was reached (#3429)

Closes #3425 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3429 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

870926cf
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

1 个文件 +15 -10
Modified src/services/missionInventoryUpdateService.ts +15 -10
@@ -2291,21 +2291,26 @@ function getRandomMissionDrops(
2291 2291 if (qualification < 0 || qualification > 8) {
2292 2292 logger.error(`unexpected purgatory reward qualification: ${qualification}`);
2293 2293 } else {
2294 const drop = getRandomRewardByChance(
2294 const purgatoryType = Math.trunc(qualification / 3);
2295 const purgatoryRank = qualification % 3;
2296 const deck =
2295 2297 ExportRewards[
2296 2298 [
2297 2299 "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryBlueTokenRewards",
2298 2300 "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryGoldTokenRewards",
2299 2301 "/Lotus/Types/Game/MissionDecks/PurgatoryMissionRewards/PurgatoryBlackTokenRewards"
2300 ][Math.trunc(qualification / 3)]
2301 ][qualification % 3]
2302 );
2303 if (drop) {
2304 drops.push({
2305 StoreItem: drop.type,
2306 ItemCount: drop.itemCount,
2307 FromEnemyCache: true // to show "identified"
2308 });
2302 ][purgatoryType]
2303 ];
2304 // "Players are awarded for each Rank they qualify for, so qualifying for Rank 3 will additionally roll rewards from Ranks 1 and 2."
2305 for (let i = 0; i <= purgatoryRank; ++i) {
2306 const drop = getRandomRewardByChance(deck[i]);
2307 if (drop) {
2308 drops.push({
2309 StoreItem: drop.type,
2310 ItemCount: drop.itemCount,
2311 FromEnemyCache: true // to show "identified"
2312 });
2313 }
2309 2314 }
2310 2315 }
2311 2316 }