Replies: 2 comments 4 replies
-
If you want to change how magic works, Using local params = {}
params.diff = dINT
params.skillType = xi.skill.ENFEEBLING_MAGIC
params.bonus = 0
params.effect = xi.effect.SLEEP_I
local resist = applyResistanceEffect(caster, target, spell, params)
if resist >= 0.5 then
if target:addStatusEffect(params.effect, 1, 0, duration * resist) then
spell:setMsg(xi.msg.basic.MAGIC_ENFEEB_IS)
else
spell:setMsg(xi.msg.basic.MAGIC_NO_EFFECT)
end
else
spell:setMsg(xi.msg.basic.MAGIC_RESIST)
end
It looks like returning 0 out of here would force a resist, so adding this to the top of if target:isNM() then
return 0
end |
Beta Was this translation helpful? Give feedback.
-
Do you want resistance or immunity, or damage reduction? we have modifiers for resistance to specific things like bind effect ( immunity (where bind can NEVER land) is handled as a mask in mob_pools.sql and for damage reductions one can add magic defense bonus ( |
Beta Was this translation helpful? Give feedback.
-
I want to weaken the magic, which lua will be modified so that sleep and bind cannot successfully cast spells on NM or mob, or modify NM alone so that it cannot be sleep or bind
How to modify if you want to do this
Beta Was this translation helpful? Give feedback.
All reactions