Get unit stat
Code
D2Common.#10973
arg1: ptUnit
arg2: stat ID in ISC.txt
arg3: (always 0?)
Get base defense value:
Code
D2Common.#10672
arg1: ptUnit
[/code]
Hit/miss test for attack:
Code
Code: Select all
D2Game.0177DE90
arg1: defender ptUnit
arg2: AR%
arg3: attack type, 1=ranged, 0=melee
EAX: attacker ptUnit
return: 0 for miss, 1 for hit.
* rand(100) and 5/95% capping are all inlined here
Get skill AR%:
Code
Code: Select all
D2Game.#10653
arg1: ptUnit
arg2: skill id
arg3: skill level
Get item type by row id:
Code
Code: Select all
D2Common.#10082
arg1: row index in combined weapons/armo/misc
returns: row index in itemtypes.txt
Check if item is of itemtype:
Code
Code: Select all
D2Common.#10744
arg1: item unit ptr
arg2: itemtype row idx (e.g. weapon = 2d)
Code
returns: 1 if arg1 is of type arg2, 0 otherwise