Index: scripts/globals/utils.lua =================================================================== --- scripts/globals/utils.lua (revision 3801) +++ scripts/globals/utils.lua (working copy) @@ -126,6 +126,8 @@ function utils.magicDmgTaken(target, magicDmg) + local ring1 = target:getEquipID(SLOT_RING1); + local ring2 = target:getEquipID(SLOT_RING2); -- MDT is stored in amount/256 local resist = ((256 + target:getMod(MOD_UDMGMAGIC))/256); @@ -136,6 +138,20 @@ if(resist < 0.5) then resist = 0.5; end + + if(target:getObjType() == TYPE_PC) then + if(((ring1 == 14646) or (ring2 == 14646)) -- Shadow Ring + and (math.random(100) <= 13)) then + magicDmg = 0; + end + + if((((magicDmg * resist) / target:getMaxHP()) * 100) > 50) then + if(((ring1 == 11647) or (ring2 == 11647)) -- Archon Ring + and (math.random(100) <= 5)) then + magicDmg = 0; + end + end + end return magicDmg * resist; end;