Boss 掉落未传 monsterType,精华/极品底模升级概率按普通怪计算(含 1.13c 差异回归基线) #126

Closed
opened 2026-09-19 09:46:54 +00:00 by troytt · 1 comment
Owner

问题描述 (Issue A1 + Phase 0)

  1. Boss monsterType 缺失 (A1):

    • src/boss.ts 调用 executeDropPipeline 时未传递 monsterType 参数,导致 drop-pipeline.ts 中回退到默认值 monsterType = 1(普通怪物)。
    • 进而 isGood = monsterType > 1 为 false,底模升级(Normal → Exceptional / Elite)错误使用了 DifficultyLevels.txt 中的 UberCodeOddsNormal 与 UltraCodeOddsNormal,而非 Boss / Unique 怪物应使用的 UberCodeOddsGood 与 UltraCodeOddsGood。
    • 在 Diablo II 1.13c 中,Act Boss(Andariel, Duriel, Mephisto, Diablo, Baal)属于 Boss (monsterType = 4),SuperUniques 属于 Unique (monsterType = 3),均应走 isGood = true 分支。
  2. Phase 0 差异回归基线:

    • 建立 tests/parity-1.13c.test.ts 与 scripts/audit-parity.ts,对 1.13c 掉落/生成/显示核心不变量建立自动化回归基线。

解决方案

  1. 在 src/boss.ts 的 BossDefinition 接口中增加 monsterType?: number(默认 4),并在 executeBossKill 调用 executeDropPipeline 时显式传入 monsterType: currentBoss.monsterType ?? 4。
  2. 新建 tests/parity-1.13c.test.ts 验证 Boss 掉落 monsterType=4 触发 Good 档底模升级及 1.13c 核心回归测试。
  3. 新建 scripts/audit-parity.ts 审计脚本。
## 问题描述 (Issue A1 + Phase 0) 1. **Boss `monsterType` 缺失 (A1)**: - `src/boss.ts` 调用 `executeDropPipeline` 时未传递 `monsterType` 参数,导致 `drop-pipeline.ts` 中回退到默认值 `monsterType = 1`(普通怪物)。 - 进而 `isGood = monsterType > 1` 为 `false`,底模升级(Normal → Exceptional / Elite)错误使用了 `DifficultyLevels.txt` 中的 `UberCodeOddsNormal` 与 `UltraCodeOddsNormal`,而非 Boss / Unique 怪物应使用的 `UberCodeOddsGood` 与 `UltraCodeOddsGood`。 - 在 Diablo II 1.13c 中,Act Boss(Andariel, Duriel, Mephisto, Diablo, Baal)属于 Boss (`monsterType = 4`),SuperUniques 属于 Unique (`monsterType = 3`),均应走 `isGood = true` 分支。 2. **Phase 0 差异回归基线**: - 建立 `tests/parity-1.13c.test.ts` 与 `scripts/audit-parity.ts`,对 1.13c 掉落/生成/显示核心不变量建立自动化回归基线。 ## 解决方案 1. 在 `src/boss.ts` 的 `BossDefinition` 接口中增加 `monsterType?: number`(默认 `4`),并在 `executeBossKill` 调用 `executeDropPipeline` 时显式传入 `monsterType: currentBoss.monsterType ?? 4`。 2. 新建 `tests/parity-1.13c.test.ts` 验证 Boss 掉落 `monsterType=4` 触发 Good 档底模升级及 1.13c 核心回归测试。 3. 新建 `scripts/audit-parity.ts` 审计脚本。
Author
Owner

Fixed in commit b31a199 (merged into main). Verified with tests/parity-1.13c.test.ts (5 passed) and tests/boss.test.ts (6 passed).

Fixed in commit b31a199 (merged into main). Verified with tests/parity-1.13c.test.ts (5 passed) and tests/boss.test.ts (6 passed).
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: troytt/diablo2-web#126
No description provided.