[P0][D05] 删除 rollDrop 合成掉落死代码路径 #414
Labels
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: troytt/diablo2-web#414
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
现状
src/game/engine.ts:896-914保留了一条else if (this.opts.itemBases && this.opts.itemBases.length > 0)分支,调用
items.ts的合成掉落rollDrop(...),参数是编造的{ level: player.level + 2, dropChance: 0.8, goldChance: 0.3, goldRange: [5, 40] }。这些数字与 1.13c 毫无关系。M10 的 #107 已经宣告「用 TC 树替换 rollDrop」,但旧路径并未删除。
验收标准
engine.ts中的rollDrop分支。src/game/items.ts中的rollDrop及其仅服务于它的 demo 类型 / 常量。EngineOptions中随之失效的itemBases/prefixAffixes/suffixAffixes(若无其他消费者)。npx tsc --noEmit+npm test+npm run build零错误;确认产物体积下降。Resolution Summary (Issue #414 — Commit
9022579)Deleted legacy synthetic
rollDrop,DropOptions, andDropResultfromsrc/game/items.tsandsrc/game/engine.ts.\n- Migratedtests/items.test.ts,tests/m5.test.ts, andscripts/verify-m5.tsto canonical item creation.Verification:
npx tsc --noEmit(0 errors), full Vitest drop/combat/item/E2E parity suites (100% pass), andscripts/verify-m5.ts/scripts/verify-net.ts(0 problems).