-
April 24th, 2026, 23:21 #1
EffectManager.hasTag bug (I think)...
I have a target with the effect:
"IMMUNE: fire"
My Improved Critical extension checks for crit immunity by using:
"local bCritImmune = EffectManager.hasTag(rActor, "IMMUNE", { tFilter = { "critical" }, })"
... which results in "true".
If I change the effect to:
"IMMUNE: dkjflskfjs"
... the check results in a "false"
It's like tFilter is being ignored for recognized damage types?
I haven't dug into it tho...is there some other way to check an actor for specific immunity?
Thanks!
-
April 24th, 2026, 23:54 #2SmiteWorks
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 23,349
Damage types don't filter by design; as that would some use cases.
To check whether a creature is immune to the critical damage type, try:
Regards,Code:local bImmuneCritical = false; for _,tEffect in ipairs(EffectManager.getCompsDataByTag(rActor, "IMMUNE", { rTarget = rSource, })) do for _,s in ipairs(tEffect.remainder) do if s == "critical" then bImmuneCritical = true; break; end end end
JPG
-
April 25th, 2026, 00:31 #3
Thanks! I did a similar thing with matching for "IMMUNE" and "critical" in tEffect, but yours is more robust.
-
April 25th, 2026, 03:04 #4SmiteWorks
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 23,349
Another slightly simpler version:
Regards,Code:local bImmuneCritical = false; for _,tCompData in ipairs(EffectManager.getCompsDataByTag(rActor, "IMMUNE", { rTarget = rSource, })) do if StringManager.contains(tCompData.remainder, "critical") then bImmuneCritical = true; break; end end
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)

Reply With Quote

Bookmarks