I don't know if this is the right Forum to ask this but:
- I am looking for a formula for calculating the unit cost of the first trainable non-worker unit (or the basic one, to be exact) in a standard melee.
Well, just a reference based on the gold cost for Footman and Grunt. Doesn't have to...
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