[P0][D06] Act Boss 归类为 monsterType=4(MonsterRank 补 boss 档) #415

Closed
opened 2026-09-24 03:25:57 +00:00 by troytt · 1 comment
Owner

现状

src/game/combat.ts:708-718:

monsterType = rank === 'unique' ? 3 : rank === 'champion' ? 2 : 1

src/game/monsters.ts:876 的 MonsterRank 联合类型里没有 boss。
于是 Andariel / Duriel / Mephisto / Diablo / Baal 这些 MonStats.txt 中 boss=1 的怪
被当成 unique(3)甚至 normal(1),永远拿不到 TreasureClass4。

1.13c 真实行为

boss 标记的单位走 monsterType 4(Quest / Boss 掉落),对应 TreasureClass4 三难度列,
这是 Act Boss 高价值掉落(以及首杀任务掉落)的唯一来源。

验收标准

  • MonsterRank 增加 'boss';怪物生成时依据 MonStats.txt 的 boss 列打标。
  • buildKillEvent 对 boss 单位产出 monsterType: 4。
  • vitest:击杀 diablo / baalcrab / andariel / duriel / mephisto,断言解析出的 TC
    等于 MonStats.txt 中对应难度的 TreasureClass4 值。
  • vitest:确保普通 / champion / unique 的 1 / 2 / 3 分类不被本改动破坏。

依赖 D01。

## 现状 `src/game/combat.ts:708-718`: ```ts monsterType = rank === 'unique' ? 3 : rank === 'champion' ? 2 : 1 ``` `src/game/monsters.ts:876` 的 `MonsterRank` 联合类型里**没有 `boss`**。 于是 Andariel / Duriel / Mephisto / Diablo / Baal 这些 `MonStats.txt` 中 `boss=1` 的怪 被当成 unique(3)甚至 normal(1),永远拿不到 `TreasureClass4`。 ## 1.13c 真实行为 `boss` 标记的单位走 monsterType 4(Quest / Boss 掉落),对应 `TreasureClass4` 三难度列, 这是 Act Boss 高价值掉落(以及首杀任务掉落)的唯一来源。 ## 验收标准 - [ ] `MonsterRank` 增加 `'boss'`;怪物生成时依据 `MonStats.txt` 的 `boss` 列打标。 - [ ] `buildKillEvent` 对 boss 单位产出 `monsterType: 4`。 - [ ] vitest:击杀 `diablo` / `baalcrab` / `andariel` / `duriel` / `mephisto`,断言解析出的 TC 等于 MonStats.txt 中对应难度的 `TreasureClass4` 值。 - [ ] vitest:确保普通 / champion / unique 的 1 / 2 / 3 分类不被本改动破坏。 ## 依赖 D01。
troytt added this to the [M18] 打怪掉落物品:怪物死亡掉落全链路 1.13c 还原 milestone 2026-09-24 03:25:57 +00:00
Author
Owner

Resolution Summary (Issue #415 — Commit 9022579)

  • Added 'boss' to MonsterRank union in src/game/monsters.ts and tagged kind.boss monsters as 'boss'.\n- Mapped rank === 'boss' to monsterType = 4 in src/game/combat.ts and src/game/engine.ts to resolve Act Boss TreasureClass4.

  • Verification: npx tsc --noEmit (0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), and scripts/verify-m5.ts / scripts/verify-net.ts (0 problems).

### Resolution Summary (Issue #415 — Commit `9022579`) - Added `'boss'` to `MonsterRank` union in `src/game/monsters.ts` and tagged `kind.boss` monsters as `'boss'`.\n- Mapped `rank === 'boss'` to `monsterType = 4` in `src/game/combat.ts` and `src/game/engine.ts` to resolve Act Boss `TreasureClass4`. - **Verification**: `npx tsc --noEmit` (0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), and `scripts/verify-m5.ts` / `scripts/verify-net.ts` (0 problems).
Sign in to join this conversation.
No Label
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#415
No description provided.