Results 1 to 2 of 2

Thread: [Confirmed] The swarm applies -armor before its attack deals damage.

  1. #1
    Basic Member igo95862's Avatar
    Join Date
    Aug 2012

    [Confirmed] The swarm applies -armor before its attack deals damage.

    Dota 1: - armor is applied after unit has been damaged.


    function Func3688 takes nothing returns boolean
    local trigger loc_trigger01=GetTriggeringTrigger()
    local integer loc_integer01=GetHandleId(loc_trigger01)
    local unit loc_unit01=(LoadUnitHandle(hashtable001,(loc_integ er01),(2)))
    local unit loc_unit02=(LoadUnitHandle(hashtable001,(loc_integ er01),(17)))
    if GetTriggerEventId()==EVENT_UNIT_DEATH then
    call UnitRemoveAbility(loc_unit02,'A1QZ')
    call SaveInteger(hashtable001,(GetHandleId((loc_unit02) )),((4290)),(2))
    call FlushChildHashtable(hashtable001,(loc_integer01))
    call Func0035(loc_trigger01)
    if GetTriggerUnit()==loc_unit02 then
    call KillUnit(loc_unit01)
    elseif GetTriggerEventId()==EVENT_UNIT_DAMAGED then
    if GetEventDamageSource()==loc_unit01 then
    call SetUnitAbilityLevel(loc_unit02,'A1QZ',GetUnitAbili tyLevel(loc_unit02,'A1QZ')+1)
    call DestroyEffect(AddSpecialEffectTarget("Abilities\\W eapons\\SkeletalMageMissile\\SkeletalMageMissile.m dl",loc_unit02,"chest"))
    call SetUnitX(loc_unit01,GetUnitX(loc_unit02)-40)
    call SetUnitY(loc_unit01,GetUnitY(loc_unit02)-40)
    if Func0281(loc_unit02)and IsUnitVisible(loc_unit02,GetOwningPlayer(loc_unit0 1))==false then
    call KillUnit(loc_unit01)
    elseif ModuloInteger(GetTriggerEvalCount(loc_trigger01),5 )==0 then
    call IssueTargetOrder(loc_unit01,"attack",loc_unit02)
    set loc_trigger01=null
    set loc_unit01=null
    set loc_unit02=null
    return false

    Against level 1 Wisp (a hero with absolute 0 armor) first attack deals 30 damage

    Dota 2:

    Against level 1 Wisp first attack will deal 31 damage. This proves that The Swarm applies -armor before attack deals damage. If you have other more reliable way to prove or refute please post it here.

  2. #2
    Basic Member
    Join Date
    Apr 2012
    Just to be precise: Triggers that trigger on EVENT_UNIT_DAMAGED actually do run before the actual damage occurs. However, by the time the triggers run, the damage that is to be dealt is "locked in" and cannot be changed by retroactively subtracting armor. Other abilities that deal damage or something based on EVENT_UNIT_DAMAGED will run before the original damage source occurs; minus armor is just weird like that (see: Meld and Desolator oh my).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts