显示层接线 properties.ts 数据驱动化及 Phase 4 剩余 1.13c 细节对齐 #133
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?
问题描述 (Issue C1, C3 + Phase 4: A6, A8, A9, B4, B7)
Phase 3 — 显示层接线
properties.ts数据驱动化 (C1, C3):src/game/properties.ts(801 行) 已经完整实现了Properties.txt(268 行) 与ItemStatCost.txt(359 行) 的解析(含func1..7、stat1..7、descPriority、descFunc、descVal、dgrp、dgrpFunc、valShift以及resolveProperty),但DropTables与item-tooltip.ts尚未接线。descpriority时原版按ItemStatCost.txt的statId(ID 列) 排序(C3)。Phase 4 — 1.13c 溯源核实与细节对齐 (A6, A8, A9, B4, B7):
D2Game!6FC319D0):1.13c 怪物金币掉落公式为maxGold = nLevel * 6,随机范围1 .. (nLevel * 6)再乘以goldMultiplier(gld,mul=N的N >> 8或N / 256)。ilvl与D = max(0, ilvl - qlvl)钳制D2Game!6FC2FC40):在ItemRatio品质计算中,ilvl上限为99,且D = Math.max(0, Math.min(99, ilvl) - qlvl)(当ilvl < qlvl时不得产生负数D反向减小chance)。effectiveMFmf <= 10分支):经核实D2Game!6FC2E130汇编确有cmp eax, 110; jle(即mf + 100 <= 110时直接返回mf + 100),添加精确汇编注释说明。isRareNameEligible复核):在rollRareAffixes中确保稀有前/后缀名严格通过isRareNameEligible且前缀名与后缀名文本不重复。解决方案
DropTables(src/game/drop-pipeline.ts) 中新增readonly properties?: PropertiesTable与readonly itemStatCost?: ItemStatCostTable,并在loadDropTables中调用loadItemPropertiesAndStats(archives)加载。src/game/item-tooltip.ts中导入并接线properties.ts:PropertiesTable+ItemStatCostTable(如registerRuntimePropertyTables(properties, itemStatCost)或formatItemTooltip(item, options)),动态从ItemStatCostTable查询descPriority、statId(作为同descPriority下的二级排序键 C3)、dgrp与descFunc!PROP_DESC_PRIORITY作为零 I/O 离线默认回退,并在tests/parity-1.13c.test.ts中新增「硬编码PROP_DESC_PRIORITY=== MPQProperties.txt→ItemStatCost.txt实时解析结果」的 100% 一致性校验测试。D = Math.max(0, Math.min(99, ilvl) - qlvl)钳制,并补充对应测试。Fixed in commit
fc63887(merged into main). Verified with tests/parity-1.13c.test.ts (27 passed), tests/properties.test.ts (8 passed), and full drop/affix/tooltip test suites.