Hello,
I just have a short question: is there any way to get item damage on hero?
I have this trigger:
However, this only takes the 'white' damage and calculates/outputs the integer, ignoring the bonus damage. I need some way to get the bonus in order to use it for calculating the output.
( I know I can use another trigger to get the damage by checking the items but I would like to not clog up the map with that if possible)
I just have a short question: is there any way to get item damage on hero?
I have this trigger:
JASS:
function GetUnitDmg takes unit u returns integer
local real baseDamage
local real diceNumber
local real diceSides
local integer minDmg
local integer maxDmg
local integer randomDamageRange
set baseDamage = BlzGetUnitBaseDamage(u, 1)
set diceNumber = BlzGetUnitDiceNumber(u, 1)
set diceSides = BlzGetUnitDiceSides(u, 1)
set minDmg = ( R2I(baseDamage) + R2I(diceNumber) )
set maxDmg = ( R2I(baseDamage) + R2I(diceNumber) * R2I(diceSides) )
set randomDamageRange = GetRandomInt(minDmg, maxDmg)
return randomDamageRange
endfunction
However, this only takes the 'white' damage and calculates/outputs the integer, ignoring the bonus damage. I need some way to get the bonus in order to use it for calculating the output.
( I know I can use another trigger to get the damage by checking the items but I would like to not clog up the map with that if possible)