- Joined
- Mar 29, 2012
- Messages
- 542
JASS:
function hAI_GetUnitFightPowerAgainstUnit takes unit u1, unit u2 returns real
local real sourceHp = GetWidgetLife(u1)
local real targetHp = GetWidgetLife(u2)
local real sourceWeaponDamage = hAI_GetUnitWeaponDamageToUnit(u1, 1, u2) // u1 weapon damage against u2
local real targetWeaponDamage = hAI_GetUnitWeaponDamageToUnit(u2, 1, u1) // u2 weapon damage against u1
local real sourceAttackInterval = BlzGetUnitAttackCooldown(u1, 1)
local real targetAttackInterval = BlzGetUnitAttackCooldown(u2, 1)
local real fightPower = 0.
set fightPower = ?
return fightPower
endfunction
JASS:
function hAI_GetGroupFightPowerAgainstGroup takes group g1, group g2 returns real
local real fightPower = 0.
return fightPower
endfunction
Last edited: