[P1][D08] Magic Find 接线:汇总 playerMf 并传入 ItemRatio 品质判定 #417

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

现状

DropPipelineOptions 已定义 playerMf(drop-pipeline.ts),item-ratio.ts:207-228
也已正确实现 1.13c 的 MF 递减公式 100 + trunc((mf * factor) / (mf + factor)),
但 engine.ts:873-881 的调用点根本没有传 playerMf。
→ 全游戏 MF 恒等于 0,装备上的 %增加获得魔法物品机会 完全不生效。

1.13c 真实行为

MF 只作用于 Unique / Set / Rare 三档,且各有递减 factor;Magic 档不递减;
Superior / Normal 不受 MF 影响。MF 来源包含装备、魔法宝石、以及 Goldfind 无关项。

验收标准

  • 从角色已装备物品 + buff 汇总 ITEM_MAGICBONUS 总量,作为 playerMf 传入。
  • vitest:MF = 0 / 100 / 500 / 1000 下,unique/set/rare 的有效 MF 与 1.13c 递减表逐档相等。
  • vitest:Magic 档不应用递减;Superior / Normal 完全不受 MF 影响。
  • 统计学验证:固定 TC 与 ilvl,MF 0 → 300 时 unique 掉率提升幅度落在原版理论曲线 ±1% 内。
## 现状 `DropPipelineOptions` 已定义 `playerMf`(`drop-pipeline.ts`),`item-ratio.ts:207-228` 也已正确实现 1.13c 的 MF 递减公式 `100 + trunc((mf * factor) / (mf + factor))`, **但 `engine.ts:873-881` 的调用点根本没有传 `playerMf`。** → 全游戏 MF 恒等于 0,装备上的 %增加获得魔法物品机会 完全不生效。 ## 1.13c 真实行为 MF 只作用于 Unique / Set / Rare 三档,且各有递减 factor;Magic 档不递减; Superior / Normal 不受 MF 影响。MF 来源包含装备、魔法宝石、以及 `Goldfind` 无关项。 ## 验收标准 - [ ] 从角色已装备物品 + buff 汇总 `ITEM_MAGICBONUS` 总量,作为 `playerMf` 传入。 - [ ] vitest:MF = 0 / 100 / 500 / 1000 下,unique/set/rare 的有效 MF 与 1.13c 递减表逐档相等。 - [ ] vitest:Magic 档不应用递减;Superior / Normal 完全不受 MF 影响。 - [ ] 统计学验证:固定 TC 与 ilvl,MF 0 → 300 时 unique 掉率提升幅度落在原版理论曲线 ±1% 内。
troytt added this to the [M18] 打怪掉落物品:怪物死亡掉落全链路 1.13c 还原 milestone 2026-09-24 03:25:58 +00:00
Author
Owner

Resolution Summary (Issue #417 — Commit 9022579)

  • Aggregated player Magic Find (playerMf) and Gold Find (playerGf) from equipped gear and inventory in src/game/engine.ts and src/scene/act-scene.ts.\n- Verified 1.13c diminishing returns for Unique/Set/Rare and negative MF handling in src/game/item-ratio.ts.

  • 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 #417 — Commit `9022579`) - Aggregated player Magic Find (`playerMf`) and Gold Find (`playerGf`) from equipped gear and inventory in `src/game/engine.ts` and `src/scene/act-scene.ts`.\n- Verified 1.13c diminishing returns for Unique/Set/Rare and negative MF handling in `src/game/item-ratio.ts`. - **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#417
No description provided.