/* -------------------------------------------------------------------------- */
/* Damage Interface */
/* -------------------------------------------------------------------------- */
function RegisterAttackDamageEvent takes code c returns nothing
-> Code will run when a unit attacks another.
function RegisterSpellDamageEvent takes code c returns nothing
-> Code will run when a unit takes spell damage.
function RegisterDamageEvent takes attacktype attack, damagetype damage, code c returns nothing
-> Code will run when the attacktype and damagetype of the
-> damage event match the parameters.
function RegisterAnyDamageEvent takes code c returns nothing
-> Code will run when any damage is dealt.
function RegisterAttackDamagingEvent takes code c returns nothing
-> Code will run when a unit attacks another
-> Before the mitigation.
function RegisterSpellDamagingEvent takes code c returns nothing
-> Code will run when a unit takes spell damage
-> Before the mitigation.
function RegisterDamagingEvent takes attacktype attack, damagetype damage, code c returns nothing
-> Code will run when the attacktype and damagetype of the
-> damage event match the parameters. Before the mitigation.
function RegisterAnyDamagingEvent takes code c returns nothing
-> Code will run when any damage is dealt
-> Before the mitigation.
/* -------------------------------------------------------------------------- */
/* Evasion */
/* -------------------------------------------------------------------------- */
function RegisterEvasionEvent takes code c returns nothing
-> YourFunction will run when a unit evades an attack.
function GetMissingUnit takes nothing returns unit
-> Returns the unit missing the attack
function GetEvadingUnit takes nothing returns unit
-> Returns the unit evading the attack
function GetEvadedDamage takes nothing returns real
-> Returns the amount of evaded damage
function GetUnitEvasionChance takes unit u returns real
-> Returns this system amount of evasion chance given to a unit
function GetUnitMissChance takes unit u returns real
-> Returns this system amount of miss chance given to a unit
function SetUnitEvasionChance takes unit u, real chance returns nothing
-> Sets unit evasion chance to specified amount
function SetUnitMissChance takes unit u, real chance returns nothing
-> Sets unit miss chance to specified amount
function UnitAddEvasionChance takes unit u, real chance returns nothing
-> Add to a unit Evasion chance the specified amount
function UnitAddMissChance takes unit u, real chance returns nothing
-> Add to a unit Miss chance the specified amount
function MakeUnitNeverMiss takes unit u, boolean flag returns nothing
-> Will make a unit never miss attacks no matter the evasion chance of the attacked unit
function DoUnitNeverMiss takes unit u returns boolean
-> Returns true if the unit will never miss an attack
/* -------------------------------------------------------------------------- */
/* Critical */
/* -------------------------------------------------------------------------- */
function RegisterCriticalStrikeEvent takes code c returns nothing
-> YourFunction will run when a unit hits a critical strike.
function GetCriticalSource takes nothing returns unit
-> Returns the unit hitting a critical strike.
function GetCriticalTarget takes nothing returns unit
-> Returns the unit being hit by a critical strike.
function GetCriticalDamage takes nothing returns real
-> Returns the critical strike damage amount.
function GetUnitCriticalChance takes unit u returns real
-> Returns the chance to hit a critical strike to specified unit.
function GetUnitCriticalMultiplier takes unit u returns real
-> Returns the chance to hit a critical strike to specified unit.
function SetUnitCriticalChance takes unit u, real value returns nothing
-> Set's the unit chance to hit a critical strike to specified value.
-> 15.0 = 15%
function SetUnitCriticalMultiplier takes unit u, real value returns nothing
-> Set's the unit multiplier of damage when hitting a critical to value
-> 1.0 = increases the multiplier by 1. all units have a multiplier of 1.0
-> by default, so by adding 1.0, for example, the critical damage will be
-> 2x the normal damage
function SetCriticalEventDamage takes real newValue returns nothing
-> Modify the critical damage dealt to the specified value.
function UnitAddCriticalStrike takes unit u, real chance, real multiplier returns nothing
-> Adds the specified values of chance and multiplier to a unit
/* -------------------------------------------------------------------------- */
/* Spell Power */
/* -------------------------------------------------------------------------- */
function GetUnitSpellPowerFlat takes unit u returns real
-> Returns the Flat bonus of spell power of a unit
function GetUnitSpellPowerPercent takes unit u returns real
-> Returns the Percent bonus of spell power of a unit
function SetUnitSpellPowerFlat takes unit u, real value returns nothing
-> Set's the Flat amount of Spell Power of a unit
function SetUnitSpellPowerPercent takes unit u, real value returns nothing
-> Set's the Flat amount of Spell Power of a unit
function UnitAddSpellPowerFlat takes unit u, real amount returns nothing
-> Add to the Flat amount of Spell Power of a unit
function UnitAddSpellPowerPercent takes unit u, real amount returns nothing
-> Add to the Percent amount of Spell Power of a unit
function GetSpellDamage takes real amount, unit u returns real
-> Returns the amount of spell damage that would be dealt given an initial damage
/* -------------------------------------------------------------------------- */
/* Life Steal */
/* -------------------------------------------------------------------------- */
function SetUnitLifeSteal takes unit u, real amount returns nothing
-> Set the Life Steal amount for a unit
function GetUnitLifeSteal takes unit u returns real
-> Returns the Life Steal amount of a unit
function UnitAddLifeSteal takes unit u, real amount returns nothing
-> Add to the Life Steal amount of a unit the given amount
/* -------------------------------------------------------------------------- */
/* Spell Vamp */
/* -------------------------------------------------------------------------- */
function SetUnitSpellVamp takes unit u, real amount returns nothing
-> Set the Spell Vamp amount for a unit
function GetUnitSpellVamp takes unit u returns real
-> Returns the Spell Vamp amount of a unit
function UnitAddSpellVamp takes unit u, real amount returns nothing
-> Add to the Spell Vamp amount of a unit the given amount
/* -------------------------------------------------------------------------- */
/* Damage Interface Utils */
/* -------------------------------------------------------------------------- */
function UnitAddEvasionChanceTimed takes unit u, real amount, real duration returns nothing
-> Add to a unit Evasion chance the specified amount for a given period
function UnitAddMissChanceTimed takes unit u, real amount, real duration returns nothing
-> Add to a unit Miss chance the specified amount for a given period
function UnitAddCriticalStrikeTimed takes unit u, real chance, real multiplier, real duration returns nothing
-> Adds the specified values of chance and multiplier to a unit for a given period
function UnitAddCriticalChanceTimed takes unit u, real chance, real duration returns nothing
-> Adds the specified values of critical chance to a unit for a given period
function UnitAddCriticalMultiplierTimed takes unit u, real multiplier, real duration returns nothing
-> Adds the specified values of critical multiplier to a unit for a given period
function UnitAddSpellPowerFlatTimed takes unit u, real amount, real duration returns nothing
-> Add to the Flat amount of Spell Power of a unit for a given period
function UnitAddSpellPowerPercentTimed takes unit u, real amount, real duration returns nothing
-> Add to the Percent amount of Spell Power of a unit for a given period
function AbilitySpellDamage takes unit u, integer abilityId, abilityreallevelfield field returns string
-> Given an ability field, will return a string that represents the damage that would be dealt
-> taking into consideration the spell power bonusses of a unit.
function AbilitySpellDamageEx takes real amount, unit u returns string
-> Similar to GetSpellDamage will return the damage that would be dealt but as a string
function UnitAddLifeStealTimed takes unit u, real amount, real duration returns nothing
-> Add to the Life Steal amount of a unit the given amount for a given period
function UnitAddSpellVampTimed takes unit u, real amount, real duration returns nothing
-> Add to the Spell Vamp amount of a unit the given amount for a given period