#how to disable magic resist for intellect

1 messages · Page 1 of 1 (latest)

cloud wadi
#

code in addon_game_mode function InitGameMode

local GameMode = GameRules:GetGameModeEntity()
GameMode:SetCustomAttributeDerivedStatValue(DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESISTANCE_PERCENT, 0)
marsh pumice
#

DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESIST instead of DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESISTANCE_PERCENT

cloud wadi
#

oh fuck

#

thx

#

not work

marsh pumice
#

then apply a modifier that applies negative magic resist based on INT

cloud wadi
#

modifier name its- DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESIST

marsh pumice
#

DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESIST this is not a modifier name, and not a modifier property

cloud wadi
#

what exactly should I do next?

marsh pumice
#

Do you know how to recreate anti-mage passive or viper passive?

cloud wadi
#

I need intellect to stop giving magic resistance to all heroes

marsh pumice
#

and: lua function modifier_antimage_spell_shield_lua:GetModifierMagicalResistanceBonus() return - 0.1 * self:GetParent():GetIntellect() end

#

this new modifier you will apply to every hero on spawn

#

do you understand the idea?

cloud wadi
#

but then why need it GameMode:SetCustomAttributeDerivedStatValue(DOTA_ATTRIBUTE_INTELLIGENCE_MAGIC_RESIST, 0)

marsh pumice
#

you said it yourself that it doesnt work, so you dont need it lmao

cloud wadi
cloud wadi
#

NO

marsh pumice
#

dota 2 modding is lovely xD

cloud wadi
#

ok thanks good luck going to make this work

marsh pumice
#

You will just need to adjust the math, because magic resistance bonuses stack in a multiplicative way. (1-total/100) = (1-base_magic_resist/100) * (1-bonus/100)

cloud wadi
#

not working properly

cloud wadi
cloud wadi
marsh pumice
#

everything good now?

gentle anvil
#

Its base magoc resist it goes past 100%

#

How I did it was SetBaseMagicalResist and make it negative

#

BaseMR - valveIntBonus + yourIntBonus (if any)