Status Resistance

Hey, how can use status resistance modifier via a datadriven or lua ability/item. Also: sorry for my bad english.

Comments

  • Posts: 182
    MODIFIER_PROPERTY_STATUS_RESISTANCE
    MODIFIER_PROPERTY_STATUS_RESISTANCE_STACKING
    
  • The last time I check it (which is just now), they were not working. The best thing you can do is to write something like this:

    function CalculateStatusResist(hUnit)
        local fResist = 1
        if not hUnit:IsRealHero() then return fResist end
        if hUnit:GetPrimaryAttribute() == DOTA_ATTRIBUTE_STRENGTH then
            fResist = fResist*(1-hUnit:GetStrength()*0.0015)
        end
        if hUnit:HasModifier("modifier_tiny_grow") then
            fResist = fResist*(1-hUnit:FindModifierByName("modifier_tiny_grow"):GetAbility():GetSpecialValueFor("status_resistance")/100)
        end
        if hUnit:HasItemInInventory("item_aeon_disk") then
            fResist = fResist*(1-0.25)
        end
    
        return fResist
    end
    

    and call this function whenever you need to apply a debuff to a unit.

  • Posts: 182

    it definitely works. maybe not in a datadriven ability, i havent tried.

    example of aeon disk from lod:redux

  • @DankBud Are you sure? Cause when I tested it on my own custom item, it had no effect.