• 5471阅读
  • 2回复

超级随机金怪属性奖励程序 [复制链接]

上一主题 下一主题
离线铃铛
 

发帖
59624
金钱
6311
91币
0
信誉
0
资产
0 IST
在线时间
3431 小时
注册时间
2009-08-31
最后登录
2021-02-27
只看楼主 倒序阅读 使用道具 楼主  发表于: 2010-11-08 11:50:45
— 本帖被 铃铛 执行加亮操作(2010-11-08) —
前言: 我想大家都看过ghost9988(2years)在v1.10初期的大作1.10 怪物元素抵抗及免疫的总结分析,从中应该受益良多。

近日,Nefarius公布了对超级和随机金怪防御和抗性相关Mod奖励的解析结果This function handles boss AC and all boss resistance boni,从中我们可以看到一些新的东西。
由于Nefarius基本是直接给出的v1.10各程序段的结论,所以我找到了v1.11b的相关程序,并对每个程序段重新作了较为详细的注释(基本是逐句注释,考虑到其中涉及的基本都是固定的代码及其名称,所以全部用英文注释)。

鉴于我极其有限的汇编水平,如有错误纰漏的地方,勿怪。

*由于从v1.11开始,Blizzard把许多Functions拆开放到不同的地方。对电脑来说,只不过是换了一行内存地址,但对Reader来说实在是增加了许多麻烦。
v1.11b,Blizzard又让其变了一次。
所以,许多Reader都宁可解析v1.10,况且,v1.11/v1.11b各程序只是有些小改动(如某些函数语句的改变),其功能基本都没有改变。
*v1.10的Function由Nefarius解析。


≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈清新脱俗的分割线≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈


程序起始及几个退出设定

CF D2Game.6FD08B10

Copy code6FD08B10 /$ 83EC 0C  SUB ESP,0C
6FD08B13 |. 56      PUSH ESI
6FD08B14 |. 8BF1    MOV ESI,ECX
6FD08B16 |. 85F6    TEST ESI,ESI
6FD08B18 |. 895424 0C  MOV DWORD PTR SS:[ESP+C],EDX
6FD08B1C |. 0F84 82020000 JE D2GAME.6FD08DA4
6FD08B22 |. 8B06    MOV EAX,DWORD PTR DS:[ESI]
6FD08B24 |. 83F8 01  CMP EAX,1
6FD08B27 |. 0F85 77020000 JNZ D2GAME.6FD08DA4
6FD08B2D |. 8B4424 14  MOV EAX,DWORD PTR SS:[ESP+14]
6FD08B31 |. 85C0    TEST EAX,EAX
6FD08B33 |. 0F84 6B020000 JE D2GAME.6FD08DA4

######################################################

Stone Skin AC Function

CF D2Game.6FD08B39

Copy code6FD08B39 |. 83FA 1C  CMP EDX,1C          ; uniquemod 28 (Stone Skin)
6FD08B3C |. 75 17    JNZ SHORT D2GAME.6FD08B55  ; not Stone Skin, jump the Get Monster Quondam Resistances Function
6FD08B3E |. 6A 00    PUSH 0                     
6FD08B40 |. 6A 1F    PUSH 1F          ; StatID 31 (armorclass)
6FD08B42 |. 56      PUSH ESI
6FD08B43 |. E8 A818F2FF  CALL  ; get inherent armorclass
6FD08B48 |. 6A 00    PUSH 0
6FD08B4A |. D1E0    SHL EAX,1          ; EAX ← armorclass*2
6FD08B4C |. 50      PUSH EAX         
6FD08B4D |. 6A 1F    PUSH 1F           
6FD08B4F |. 56      PUSH ESI         
6FD08B50 |. E8 E918F2FF  CALL  ; armorclass = armorclass*2

如果没检测到Stone Skin,则跳到Get Monster Quondam Resistances Function

如果有Stone Skin,则怪物防御=基础防御×2
依序执行D2Game.6FD08B55地址的指令

*Stone Skin仅仅使怪物防御×2,而非AS所言的×3
*CALL 是得到当前属性原有数值的Function
*CALL 是得到当前属性经过增加后的数值的Function
*SHL EAX,1 二进制逻辑左移一位即十进制×2
*16进制1Ch = 十进制28d,1Fh = 31d

######################################################



Get Monster Quondam Resistances Function

CF D2Game.6FD08B55

Copy code6FD08B55 |> 53      PUSH EBX
6FD08B56 |. 55      PUSH EBP
6FD08B57 |. 57      PUSH EDI
6FD08B58 |. 6A 00    PUSH 0
6FD08B5A |. 6A 27    PUSH 27            ; StatID 39 (fireresist)
6FD08B5C |. 56      PUSH ESI
6FD08B5D |. C74424 2C 0000>MOV DWORD PTR SS:[ESP+2C],0
6FD08B65 |. E8 8618F2FF  CALL  ; get fireresist
6FD08B6A |. 6A 00    PUSH 0
6FD08B6C |. 6A 29    PUSH 29            ; StatID 41 (lightresist)
6FD08B6E |. 56      PUSH ESI
6FD08B6F |. 8BF8    MOV EDI,EAX          ; EDI ← fireresist
6FD08B71 |. E8 7A18F2FF  CALL  ; get lightresist
6FD08B76 |. 6A 00    PUSH 0
6FD08B78 |. 6A 2B    PUSH 2B            ; StatID 43 (coldresist)
6FD08B7A |. 56      PUSH ESI
6FD08B7B |. 894424 1C  MOV DWORD PTR SS:[ESP+1C],EAX  ; ESP+1Ch ← lightresist 
6FD08B7F |. E8 6C18F2FF  CALL  ; get coldresist
6FD08B84 |. 6A 00    PUSH 0
6FD08B86 |. 6A 2D    PUSH 2D            ; StatID 45 (poisonresist)
6FD08B88 |. 56      PUSH ESI
6FD08B89 |. 8BD8    MOV EBX,EAX          ; EBX ← coldresist
6FD08B8B |. E8 6018F2FF  CALL  ; get poisonresist
6FD08B90 |. 6A 00    PUSH 0
6FD08B92 |. 6A 24    PUSH 24            ; StatID 36 (damageresist)
6FD08B94 |. 56      PUSH ESI
6FD08B95 |. 8BE8    MOV EBP,EAX          ; EBP ← poisonresist
6FD08B97 |. E8 5418F2FF  CALL  ; get damageresist
6FD08B9C |. 6A 00    PUSH 0
6FD08B9E |. 6A 25    PUSH 25            ; StatID 37 (magicresist)
6FD08BA0 |. 56      PUSH ESI
6FD08BA1 |. 894424 20  MOV DWORD PTR SS:[ESP+20],EAX  ; ESP+20h ← damageresist
6FD08BA5 |. E8 4618F2FF  CALL  ; get magicresist



得到当前怪物的原有抗性
各抗性存放的寄存器
EDI = fireresist
ESP+1Ch = lightresist
EBX = coldresist
EBP = poisonresist
ESP+20h = damageresist
EAX = magicresist
依序执行D2Game.6FD08BAA地址的指令

*27h = 39d, 29h = 41d, 2Bh = 43d, 2Dh = 45d, 24h = 36d, 25h = 37d


######################################################


Check Immunities Function

CF D2Game.6FD08BAA

Copy code6FD08BAA |. 83FF 64  CMP EDI,64
6FD08BAD |. 7C 08    JL SHORT D2GAME.6FD08BB7  ; fireresist < 100, jump D2GAME.6FD08BB7
6FD08BAF |. C74424 20 0100>MOV DWORD PTR SS:[ESP+20],1  ; immunities = 1
6FD08BB7 |> 837C24 10 64  CMP DWORD PTR SS:[ESP+10],64
6FD08BBC |. 7C 04    JL SHORT D2GAME.6FD08BC2  ; lightresist < 100, jump D2GAME.6FD08BC2
6FD08BBE |. FF4424 20  INC DWORD PTR SS:[ESP+20]  ; immunities+1
6FD08BC2 |> 83FB 64  CMP EBX,64
6FD08BC5 |. 7C 04    JL SHORT D2GAME.6FD08BCB  ; coldresist < 100, jump D2GAME.6FD08BCB
6FD08BC7 |. FF4424 20  INC DWORD PTR SS:[ESP+20]  ; immunities+1
6FD08BCB |> 83FD 64  CMP EBP,64
6FD08BCE |. 7C 04    JL SHORT D2GAME.6FD08BD4  ; poisonresist < 100, jump D2GAME.6FD08BD4
6FD08BD0 |. FF4424 20  INC DWORD PTR SS:[ESP+20]  ; immunities+1
6FD08BD4 |> 8B5424 14  MOV EDX,DWORD PTR SS:[ESP+14]
6FD08BD8 |. 83FA 64  CMP EDX,64
6FD08BDB |. 7C 04    JL SHORT D2GAME.6FD08BE1  ; damageresist < 100, jump D2GAME.6FD08BE1
6FD08BDD |. FF4424 20  INC DWORD PTR SS:[ESP+20]  ; immunities+1
6FD08BE1 |> 83F8 64  CMP EAX,64
6FD08BE4 |. 7C 04    JL SHORT D2GAME.6FD08BEA  ; magicresist < 100, jump
6FD08BE6 |. FF4424 20  INC DWORD PTR SS:[ESP+20]  ; immunities+1
6FD08BEA |> 837C24 20 02  CMP DWORD PTR SS:[ESP+20],2
6FD08BEF |. 0F8D AC010000 JGE D2GAME.6FD08DA1      ; immunities >= 2, jump the Exit Function


检测当前怪物是否有免疫
检测顺序为fireresist, lightresist, coldresist, poisonresist, damageresist, magicresist
≥ 100 即标记为免疫
统计其有几系免疫
若免疫数 ≥ 2,则跳到Exit Function
若免疫数〈 2,依序执行D2Game.6FD08BF5地址的指令

*64h = 100d

######################################################


Magic Resistant Function

CF D2Game.6FD08BF5

Copy code6FD08BF5 |. 8B4C24 18  MOV ECX,DWORD PTR SS:[ESP+18]
6FD08BF9 |. 83F9 08  CMP ECX,8          ; uniquemod 8 (Magic Resistant)
6FD08BFC |. 0F85 81000000 JNZ D2GAME.6FD08C83      ; not Magic Resistant, jump the Fire Enchanted Function
6FD08C02 |. 83FB 64  CMP EBX,64
6FD08C05 |. 7D 17    JGE SHORT D2GAME.6FD08C1E    ; EBX >= 100, jump D2GAME.6FD08C1E
6FD08C07 |. 6A 00    PUSH 0
6FD08C09 |. 83C3 28  ADD EBX,28          ; EBX ← EBX+40
6FD08C0C |. 53      PUSH EBX
6FD08C0D |. 6A 2B    PUSH 2B            ; StatID 43 (coldresist)
6FD08C0F |. 56      PUSH ESI
6FD08C10 |. E8 2918F2FF  CALL  ; coldresist = coldresist+40
6FD08C15 |. 83FB 64  CMP EBX,64
6FD08C18 |. 7C 04    JL SHORT D2GAME.6FD08C1E    ; EBX < 100, jump D2GAME.6FD08C1E
6FD08C1A |. FF4424 20  INC DWORD PTR SS:[ESP+20]    ; immunities+1
6FD08C1E |> 837C24 20 02  CMP DWORD PTR SS:[ESP+20],2
6FD08C23 |. 0F8D 78010000 JGE D2GAME.6FD08DA1      ; immunities >= 2, jump the Exit Function
6FD08C29 |. 83FF 64  CMP EDI,64
6FD08C2C |. 7D 17    JGE SHORT D2GAME.6FD08C45    ; EDI >= 100, jump D2GAME.6FD08C45
6FD08C2E |. 6A 00    PUSH 0           
6FD08C30 |. 83C7 28  ADD EDI,28          ; EDI ← EDI+40
6FD08C33 |. 57      PUSH EDI
6FD08C34 |. 6A 27    PUSH 27            ; StatID 39 (fireresist)
6FD08C36 |. 56      PUSH ESI
6FD08C37 |. E8 0218F2FF  CALL  ; fireresist = fireresist+40
6FD08C3C |. 83FF 64  CMP EDI,64
6FD08C3F |. 7C 04    JL SHORT D2GAME.6FD08C45    ; EDI < 100, jump D2GAME.6FD08C45
6FD08C41 |. FF4424 20  INC DWORD PTR SS:[ESP+20]    ; immunities+1
6FD08C45 |> 837C24 20 02  CMP DWORD PTR SS:[ESP+20],2 
6FD08C4A |. 0F8D 51010000 JGE D2GAME.6FD08DA1      ; immunities >= 2, jump the Exit Function
6FD08C50 |. 8B7C24 10  MOV EDI,DWORD PTR SS:[ESP+10] 
6FD08C54 |. 83FF 64  CMP EDI,64         
6FD08C57 |. 0F8D 44010000 JGE D2GAME.6FD08DA1      ; lightresist >= 100, jump the Exit Function
6FD08C5D |. 6A 00    PUSH 0
6FD08C5F |. 83C7 28  ADD EDI,28          ; EDI ← EDI+40
6FD08C62 |. 57      PUSH EDI
6FD08C63 |. 6A 29    PUSH 29            ; StatID 41 (lightresist)
6FD08C65 |. 56      PUSH ESI
6FD08C66 |. E8 D317F2FF  CALL  ; lightresist = lightresist+40
6FD08C6B |. 83FF 64  CMP EDI,64
6FD08C6E |. 0F8C 2D010000 JL D2GAME.6FD08DA1      ; lightresist < 100, jump the Exit Function
6FD08C74 |. 8B4424 20  MOV EAX,DWORD PTR SS:[ESP+20]  ; EAX ← immunities
6FD08C78 |. 5F      POP EDI
6FD08C79 |. 5D      POP EBP
6FD08C7A |. 5B      POP EBX
6FD08C7B |. 40      INC EAX            ; immunities+1
6FD08C7C |. 5E      POP ESI
6FD08C7D |. 83C4 0C  ADD ESP,0C         
6FD08C80 |. C2 0400  RETN 4            ; Exit


如果没有检测到Magic Resistant,则跳到Fire Enchanted Function

如有Magic Resistant,若resist < 100,则resist+40
检测顺序coldresist, fireresist, lightresist
coldresist, fireresist步骤若免疫数 ≥ 2,则跳到Exit Function
若免疫数〈 2,依序执行下一地址的指令,在执行到最后的lightresist后,若lightresist < 100,则直接跳到Exit Function,若lightresist >= 100,则在依序执行完免疫数量+1后退出程序

*Magic Resistant依次增加冰冷、火焰、闪电各40%抗性,但前提是怪物当前其抗性 < 100%且免疫数量小于2
*64h = 100d, 28h = 40d, 2Bh = 43d, 27h = 39d, 29h = 41d


######################################################


Fire Enchanted Function

CF D2Game.6FD08C83

Copy code6FD08C83 |> 83F9 09  CMP ECX,9          ; uniquemod 9 (Fire Enchanted)
6FD08C86 |. 75 18    JNZ SHORT D2GAME.6FD08CA0  ; not Fire Enchanted, jump the Cold Enchanted Function
6FD08C88 |. 6A 00    PUSH 0
6FD08C8A |. 83C7 4B  ADD EDI,4B          ; fireresist ← fireresist+75
6FD08C8D |. 57      PUSH EDI         
6FD08C8E |. 6A 27    PUSH 27          ; StatID 39 (fireresist)
6FD08C90 |. 56      PUSH ESI
6FD08C91 |. E8 A817F2FF  CALL  ; fireresist = fireresist+75
6FD08C96 |. 5F      POP EDI
6FD08C97 |. 5D      POP EBP
6FD08C98 |. 5B      POP EBX
6FD08C99 |. 5E      POP ESI
6FD08C9A |. 83C4 0C  ADD ESP,0C
6FD08C9D |. C2 0400  RETN 4          ; Exit

如果没有检测到Fire Enchanted,则跳到Cold Enchanted Function

如有Fire Enchanted,则火焰抗性增加75%
退出程序

*4Bh = 75d, 27h = 39d
=============================================

Cold Enchanted Function
CF D2Game.6FD08CA0

Copy code6FD08CA0 |> 83F9 12  CMP ECX,12          ; uniquemod 18 (Cold Enchanted)     
6FD08CA3 |. 75 18    JNZ SHORT D2GAME.6FD08CBD  ; not Cold Enchanted, jump the Lightning Enchanted Function
6FD08CA5 |. 6A 00    PUSH 0
6FD08CA7 |. 83C3 4B  ADD EBX,4B          ; coldresist ← coldresist+75
6FD08CAA |. 53      PUSH EBX
6FD08CAB |. 6A 2B    PUSH 2B          ; StatID 43 (coldresist)
6FD08CAD |. 56      PUSH ESI
6FD08CAE |. E8 8B17F2FF  CALL  ; coldresist = coldresist+75
6FD08CB3 |. 5F      POP EDI
6FD08CB4 |. 5D      POP EBP
6FD08CB5 |. 5B      POP EBX
6FD08CB6 |. 5E      POP ESI
6FD08CB7 |. 83C4 0C  ADD ESP,0C
6FD08CBA |. C2 0400  RETN 4          ; Exit


如果没有检测到Cold Enchanted,则跳到Lightning Enchanted Function

如有Cold Enchanted,则冰冷抗性增加75%
退出程序

*12h = 18d, 4Bh = 75d, 2Bh = 43d

######################################################

Lightning Enchanted Function

CF D2Game.6FD08CBD


Copy code6FD08CBD |> 83F9 11  CMP ECX,11          ; uniquemod 17 (Lightning Enchanted)
6FD08CC0 |. 75 1C    JNZ SHORT D2GAME.6FD08CDE  ; not Lightning Enchanted, jump the Poison Hit Function
6FD08CC2 |. 8B4424 10  MOV EAX,DWORD PTR SS:[ESP+10]  ; EAX ← lightresist
6FD08CC6 |. 6A 00    PUSH 0
6FD08CC8 |. 83C0 4B  ADD EAX,4B          ; lightresist ← lightresist+75
6FD08CCB |. 50      PUSH EAX
6FD08CCC |. 6A 29    PUSH 29          ; StatID 41 (lightresist)
6FD08CCE |. 56      PUSH ESI
6FD08CCF |. E8 6A17F2FF  CALL  ; lightresist = lightresist+75 
6FD08CD4 |. 5F      POP EDI
6FD08CD5 |. 5D      POP EBP
6FD08CD6 |. 5B      POP EBX
6FD08CD7 |. 5E      POP ESI
6FD08CD8 |. 83C4 0C  ADD ESP,0C
6FD08CDB |. C2 0400  RETN 4          ; Exit


如果没有检测到Lightning Enchanted,则跳到Poison Hit Function

如有Lightning Enchanted,则闪电抗性增加75%
退出程序

*11h = 17d, 4Bh = 75d, 29h = 41d

######################################################

Poison Hit Function

CF D2Game.6FD08CDE


Copy code6FD08CDE |> 83F9 17  CMP ECX,17          ; uniquemod 23 (Poison Hit)   
6FD08CE1 |. 75 18    JNZ SHORT D2GAME.6FD08CFB  ; not Poison Hit, jump the Mana Burn Function
6FD08CE3 |. 6A 00    PUSH 0       
6FD08CE5 |. 83C5 4B  ADD EBP,4B          ; poisonresist ← poisonresist+75
6FD08CE8 |. 55      PUSH EBP
6FD08CE9 |. 6A 2D    PUSH 2D          ; StatID 45 (poisonresist)
6FD08CEB |. 56      PUSH ESI
6FD08CEC |. E8 4D17F2FF  CALL  ; poisonresist = poisonresist+75
6FD08CF1 |. 5F      POP EDI
6FD08CF2 |. 5D      POP EBP
6FD08CF3 |. 5B      POP EBX
6FD08CF4 |. 5E      POP ESI
6FD08CF5 |. 83C4 0C  ADD ESP,0C
6FD08CF8 |. C2 0400  RETN 4          ; Exit



如果没有检测到Poison Hit,则跳到Mana Burn Function

如有Poison Hit,则毒素抗性增加75%
退出程序

*17h = 23d, 4Bh = 75d, 2Dh = 45d

######################################################


Mana Burn Function

CF D2Game.6FD08CFB


Copy code6FD08CFB |> 83F9 19  CMP ECX,19          ; uniquemod 25(Mana Burn)
6FD08CFE |. 75 18    JNZ SHORT D2GAME.6FD08D18  ; not Mana Burn, jump the Spectral Hit Function
6FD08D00 |. 6A 00    PUSH 0         
6FD08D02 |. 83C0 14  ADD EAX,14          ; magicresist ← magicresist+20
6FD08D05 |. 50      PUSH EAX
6FD08D06 |. 6A 25    PUSH 25          ; StatID 37 (magicresist)
6FD08D08 |. 56      PUSH ESI
6FD08D09 |. E8 3017F2FF  CALL  ; magicresist = magicresist+20
6FD08D0E |. 5F      POP EDI
6FD08D0F |. 5D      POP EBP
6FD08D10 |. 5B      POP EBX
6FD08D11 |. 5E      POP ESI
6FD08D12 |. 83C4 0C  ADD ESP,0C
6FD08D15 |. C2 0400  RETN 4          ; Exit


如果没有检测到Mana Burn,则跳到Spectral Hit Function

如有Mana Burn,则魔法抗性增加20%
退出程序

*19h = 25d, 14h = 20d, 25h = 37d

######################################################

Spectral Hit Function

CF D2Game.6FD08D18



Copy code6FD08D18 |> 83F9 1B  CMP ECX,1B          ; uniquemod 27 (Spectral Hit)
6FD08D1B |. 75 71    JNZ SHORT D2GAME.6FD08D8E    ; not Spectral Hit, jump the Stone Skin Function
6FD08D1D |. 83FB 4B  CMP EBX,4B
6FD08D20 |. 7D 17    JGE SHORT D2GAME.6FD08D39    ; coldresist >= 75, jump D2GAME.6FD08D39
6FD08D22 |. 6A 00    PUSH 0
6FD08D24 |. 83C3 14  ADD EBX,14          ; coldresist ← coldresist+20
6FD08D27 |. 53      PUSH EBX
6FD08D28 |. 6A 2B    PUSH 2B            ; StatID 43 (coldresist)
6FD08D2A |. 56      PUSH ESI
6FD08D2B |. E8 0E17F2FF  CALL  ; coldresist = coldresist+20
6FD08D30 |. 83FB 64  CMP EBX,64
6FD08D33 |. 7C 04    JL SHORT D2GAME.6FD08D39    ; coldresist < 100, jump D2GAME.6FD08D39
6FD08D35 |. FF4424 20  INC DWORD PTR SS:[ESP+20]    ; immunities+1
6FD08D39 |> 837C24 20 02  CMP DWORD PTR SS:[ESP+20],2 
6FD08D3E |. 7D 61    JGE SHORT D2GAME.6FD08DA1    ; immunities >= 2, jump the Exit Function
6FD08D40 |. 83FF 4B  CMP EDI,4B
6FD08D43 |. 7D 17    JGE SHORT D2GAME.6FD08D5C    ; fireresist >= 75, jump D2GAME.6FD08D5C
6FD08D45 |. 6A 00    PUSH 0
6FD08D47 |. 83C7 14  ADD EDI,14          ; fireresist ← fireresist+20 
6FD08D4A |. 57      PUSH EDI
6FD08D4B |. 6A 27    PUSH 27            ; StatID 39 (fireresist)
6FD08D4D |. 56      PUSH ESI
6FD08D4E |. E8 EB16F2FF  CALL  ; fireresist = fireresist+20
6FD08D53 |. 83FF 64  CMP EDI,64
6FD08D56 |. 7C 04    JL SHORT D2GAME.6FD08D5C    ; fireresist < 100, jump D2GAME.6FD08D5C
6FD08D58 |. FF4424 20  INC DWORD PTR SS:[ESP+20]    ; immunities+1
6FD08D5C |> 837C24 20 02  CMP DWORD PTR SS:[ESP+20],2
6FD08D61 |. 7D 3E    JGE SHORT D2GAME.6FD08DA1    ; immunities >= 2 , jump the Exit Function
6FD08D63 |. 8B7C24 10  MOV EDI,DWORD PTR SS:[ESP+10]  ; EDI ← lightresist
6FD08D67 |. 83FF 4B  CMP EDI,4B
6FD08D6A |. 7D 35    JGE SHORT D2GAME.6FD08DA1    ; lightresist >= 75, jump the Exit Function
6FD08D6C |. 6A 00    PUSH 0
6FD08D6E |. 83C7 14  ADD EDI,14          ; lightresist ← lightresist+20
6FD08D71 |. 57      PUSH EDI
6FD08D72 |. 6A 29    PUSH 29            ; StatID 41 (lightresist)
6FD08D74 |. 56      PUSH ESI
6FD08D75 |. E8 C416F2FF  CALL  ; lightresist = lightresist+20
6FD08D7A |. 83FF 64  CMP EDI,64
6FD08D7D |. 7C 22    JL SHORT D2GAME.6FD08DA1    ; lightresist < 100, jump the Exit Function
6FD08D7F |. 8B4424 20  MOV EAX,DWORD PTR SS:[ESP+20]  ; EAX ← immunities
6FD08D83 |. 5F      POP EDI           
6FD08D84 |. 5D      POP EBP           
6FD08D85 |. 5B      POP EBX           
6FD08D86 |. 40      INC EAX            ; immunities+1
6FD08D87 |. 5E      POP ESI
6FD08D88 |. 83C4 0C  ADD ESP,0C
6FD08D8B |. C2 0400  RETN 4            ; Exit



如果没有检测到Spectral Hit,则跳到Stone Skin Res Function

如有Spectral Hit,若resist < 75,则resist+20
检测顺序coldresist, fireresist, lightresist
coldresist, fireresist步骤若免疫数 ≥ 2,则跳到Exit Function
若免疫数〈 2,依序执行下一地址的指令,在执行到最后的lightresist后,若lightresist < 100,则直接跳到Exit Function,若lightresist >= 100,则在依序执行完免疫数量+1后退出程序

*Spectral Hit增加冰冷、火焰、闪电各20%抗性,但前提是怪物当前抗性 < 75。这也是为什么大部分情况下Spectral Hit不能增加抗性的原因。
*1Bh = 27d, 4Bh = 75d, 14h = 20d, 2Bh = 43d, 64h = 100d, 27h = 39d, 29h = 41d

######################################################

Stone Skin Res Function

CF D2Game.6FD08D8E


Copy code6FD08D8E |> 83F9 1C  CMP ECX,1C          ; uniquemod 28 (Stone Skin)
6FD08D91 |. 75 0E    JNZ SHORT D2GAME.6FD08DA1  ; not Stone Skin , jump the Exit Function
6FD08D93 |. 6A 00    PUSH 0
6FD08D95 |. 83C2 32  ADD EDX,32          ; damageresist ← damageresist+50
6FD08D98 |. 52      PUSH EDX
6FD08D99 |. 6A 24    PUSH 24          ; StatID 36 (damageresist)
6FD08D9B |. 56      PUSH ESI
6FD08D9C |. E8 9D16F2FF  CALL  ; damageresist = damageresist+50



如果没有检测到Stone Skin,则跳到Exit Function

如有Stone Skin,则物理抗性增加50%
依序执行下一地址D2Game.6FD08DA1的指令

*1Ch = 28d, 32h = 50d, 24h = 36d

######################################################

Exit Function

CF D2Game.6FD08DA1


Copy code6FD08DA1 |> 5F      POP EDI
6FD08DA2 |. 5D      POP EBP
6FD08DA3 |. 5B      POP EBX
6FD08DA4 |> 5E      POP ESI
6FD08DA5 |. 83C4 0C  ADD ESP,0C
6FD08DA8 \\. C2 0400  RETN 4



退出程序段
*这里的POP/ADD和程序最初的PUSH/SUB相对应

由以上的解析我们可以看到,对金怪的Mod奖励检测是周而复始的,也就是说每检测到一个Mod奖励,执行后退出程序 → 然后检测到下一个Mod奖励,再执行再退出程序 → 再检测到下一个Mod奖励,再执行再退出程序…………

皮肤硬化(Stone Skin)增加怪物1倍的防御值,即防御值 = 原基础防御值×2
魔法抵抗(Magic Resistant)当前相关抗性小于100%,则依次增加怪物 40% 冰抗、火抗、电抗
火焰强化(Fire Enchanted)增加怪物 75% 火抗
冰冷强化(Cold Enchanted)增加怪物 75% 冰抗
闪电强化(Lightning Enchanted)增加怪物 75% 电抗
毒素一击(PoisonHit) 增加怪物 75% 毒抗,这个Mod名称不显示在怪物名字下方
燃烧法力(Mana Burn)增加怪物 20% 魔抗
幽灵一击(Special Hit)当前相关抗性小于75%,则依次增加怪物 20% 冰抗、火抗、电抗
皮肤硬化(Stone Skin)增加怪物 50% 物抗

以上只要即时检测到免疫数≥2即退出程序




≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈清新脱俗的分割线≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈




我们来举些例子
①Hell难度的Pindleskin 基础抗性 火抗 0% , 电抗 33% ,冰抗 50% ,毒抗 100%,物抗 50%,魔抗 50%
固定奖励技能是Fire Enchanted
随机奖励依次为Spectral Hit、Cold Enchanted
Fire Enchanted作用:冰抗 50% ,火抗 0%+75% = 75% ,电抗 33% ,毒抗 100%,物抗 50%,魔抗 50%
Spectral Hit作用:冰抗 50%+20% = 70% ,火抗 ≥ 75% 不加,电抗 33%+20% = 53%,毒抗 100%,物抗 50%,魔抗 50%
Cold Enchanted作用:冰抗 70%+75% = 145% ,火抗 75% ,电抗 53%,毒抗 100%,物抗 50%,魔抗 50%
最终抗性为 冰抗 145% ,火抗 75% ,电抗 53%,毒抗 100%,物抗 50%,魔抗 50%,冰毒两系免疫

②还是Hell难度的Pindleskin基础抗性 火抗 0% , 电抗 33% ,冰抗 50% ,毒抗 100%,物抗 50%,魔抗 50%
固定奖励技能是Fire Enchanted
随机奖励依次为Cold Enchanted、Spectral Hit
Fire Enchanted作用:冰抗 50% ,火抗 0%+75% = 75% ,电抗 33% ,毒抗 100%,物抗 50%,魔抗 50%
Cold Enchanted作用:冰抗 50%+75% = 125% ,火抗 75% ,电抗 33%,毒抗 100%,物抗 50%,魔抗 50%
检测到免疫 ≥ 2
不进行Spectral Hit的抗性奖励
最终抗性为 冰抗 125% ,火抗 75% ,电抗 33%,毒抗 100%,物抗 50%,魔抗 50%,冰毒两系免疫

③假设Hell难度的某随机金怪
基础抗性 火抗 60% ,电抗 60% ,冰抗 60% ,毒抗 50%,物抗 50%,魔抗 50%
奖励依次为Cold Enchanted、Magic Resistant、Special Hit
Cold Enchanted作用:冰抗 60%+75% = 135% ,火抗 60% ,电抗 60%,毒抗 50%,物抗 50%,魔抗 50%
Magic Resistant作用: 冰抗 ≥ 100% 不加,火抗 60%+40% = 100%
检测到免疫 ≥ 2
不进行Magic Resistant对电抗的奖励
不进行Spectral Hit的抗性奖励
最终抗性为 冰抗 135% ,火抗 100% ,电抗 60%,毒抗 50%,物抗 50%,魔抗 50%,冰火两系免疫





≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈清新脱俗的分割线≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈




附1: StatID List
CF ItemStatCost

Copy codeStat    ID
armorclass  31
damageresist  36
magicresist  37
fireresist  39
lightresist  41
coldresist  43
poisonresist  45


附2: UniquemodID List
CF MonUMod

Copy codeuniquemod  id
resist    8
fire    9
lightning  17
cold    18
poisonhit  23
manahit  25
spectralhit  27
stoneskin  28

附3: D2Common.#10590 Function
CF D2Common.6FD5CDA0


Copy code6FD5CDA0 >/$ 8B4424 0C  MOV EAX,DWORD PTR SS:[ESP+C]
6FD5CDA4 |. 53      PUSH EBX
6FD5CDA5 |. 8B5C24 0C  MOV EBX,DWORD PTR SS:[ESP+C]
6FD5CDA9 |. 56      PUSH ESI
6FD5CDAA |. 8B7424 0C  MOV ESI,DWORD PTR SS:[ESP+C]
6FD5CDAE |. 8B4E 5C  MOV ECX,DWORD PTR DS:[ESI+5C]
6FD5CDB1 |. 57      PUSH EDI
6FD5CDB2 |. 8B7C24 1C  MOV EDI,DWORD PTR SS:[ESP+1C]
6FD5CDB6 |. 57      PUSH EDI
6FD5CDB7 |. 50      PUSH EAX
6FD5CDB8 |. 53      PUSH EBX
6FD5CDB9 |. 51      PUSH ECX
6FD5CDBA |. E8 21FBFFFF  CALL D2COMMON.#10564
6FD5CDBF |. 85C0    TEST EAX,EAX
6FD5CDC1 |. 74 17    JE SHORT D2COMMON.6FD5CDDA
6FD5CDC3 |. 833E 00  CMP DWORD PTR DS:[ESI],0
6FD5CDC6 |. 75 12    JNZ SHORT D2COMMON.6FD5CDDA
6FD5CDC8 |. 8BC3    MOV EAX,EBX
6FD5CDCA |. 8B5E 5C  MOV EBX,DWORD PTR DS:[ESI+5C]
6FD5CDCD |. 0FB7D7    MOVZX EDX,DI
6FD5CDD0 |. C1E0 10  SHL EAX,10
6FD5CDD3 |. 03C2    ADD EAX,EDX
6FD5CDD5 |. E8 A6DEFFFF  CALL D2COMMON.6FD5AC80
6FD5CDDA |> 5F      POP EDI
6FD5CDDB |. 5E      POP ESI
6FD5CDDC |. 5B      POP EBX
6FD5CDDD \\. C2 1000  RETN 10


附4: D2Common.#10061 Function
CF D2Common.6FD5B2A0



Copy code6FD5B2A0 >/$ 8B4424 04  MOV EAX,DWORD PTR SS:[ESP+4]
6FD5B2A4 |. 85C0    TEST EAX,EAX
6FD5B2A6 |. 75 03    JNZ SHORT D2COMMON.6FD5B2AB
6FD5B2A8 |. C2 0C00  RETN 0C
6FD5B2AB |> 53      PUSH EBX
6FD5B2AC |. 8B58 5C  MOV EBX,DWORD PTR DS:[EAX+5C]
6FD5B2AF |. 85DB    TEST EBX,EBX
6FD5B2B1 |. 75 06    JNZ SHORT D2COMMON.6FD5B2B9
6FD5B2B3 |. 33C0    XOR EAX,EAX
6FD5B2B5 |. 5B      POP EBX
6FD5B2B6 |. C2 0C00  RETN 0C
6FD5B2B9 |> 57      PUSH EDI
6FD5B2BA |. 8B7C24 10  MOV EDI,DWORD PTR SS:[ESP+10]
6FD5B2BE |. 85FF    TEST EDI,EDI
6FD5B2C0 |. 7C 20    JL SHORT D2COMMON.6FD5B2E2
6FD5B2C2 |. 8B0D 8CEEDE6F MOV ECX,DWORD PTR DS:[sgptDataTables]  ; D2COMMON.6FDF0790
6FD5B2C8 |. 3BB9 D40B0000 CMP EDI,DWORD PTR DS:[ECX+BD4]
6FD5B2CE |. 7D 12    JGE SHORT D2COMMON.6FD5B2E2
6FD5B2D0 |. 8B91 CC0B0000 MOV EDX,DWORD PTR DS:[ECX+BCC]
6FD5B2D6 |. 8BC7    MOV EAX,EDI
6FD5B2D8 |. 69C0 44010000 IMUL EAX,EAX,144
6FD5B2DE |. 03C2    ADD EAX,EDX
6FD5B2E0 |. 75 07    JNZ SHORT D2COMMON.6FD5B2E9
6FD5B2E2 |> 5F      POP EDI
6FD5B2E3 |. 33C0    XOR EAX,EAX
6FD5B2E5 |. 5B      POP EBX
6FD5B2E6 |. C2 0C00  RETN 0C
6FD5B2E9 |> 50      PUSH EAX
6FD5B2EA |. 0FB74424 18  MOVZX EAX,WORD PTR SS:[ESP+18]
6FD5B2EF |. C1E7 10  SHL EDI,10
6FD5B2F2 |. 03F8    ADD EDI,EAX
6FD5B2F4 |. E8 97FDFFFF  CALL D2COMMON.6FD5B090
6FD5B2F9 |. 5F      POP EDI
6FD5B2FA |. 5B      POP EBX
6FD5B2FB \\. C2 0C00  RETN 0C
离线missyounoo
发帖
170
金钱
238
91币
0
信誉
0
资产
0 IST
在线时间
139 小时
注册时间
2011-02-05
最后登录
2011-08-30
只看该作者 沙发  发表于: 2011-07-17 09:30:45
能用中文吗??这样我看的懂吗??
离线邪恶蝴蝶
发帖
4144
金钱
5177
91币
67
信誉
0
资产
0 IST
在线时间
1632 小时
注册时间
2007-12-23
最后登录
2024-04-13
只看该作者 板凳  发表于: 2019-03-04 14:42:54
看不懂看不懂看不懂看不懂
快速回复
限100 字节
 
上一个 下一个