summaryrefslogtreecommitdiff
path: root/world
diff options
context:
space:
mode:
Diffstat (limited to 'world')
-rw-r--r--world/map/npc/magic/_procedures.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt
index b53aaa7c..aa59905b 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -46,7 +46,7 @@ function|script|elt_damage
set .@source, .caster;
if (!.@source) set .@source, getcharid(3);
- injure .@source, @target_id, .@dmg;
+ injure .@source, @target_id, (.@dmg * (100 - get(MDEF1, @target_id))) / 100;
misceffect getarg(4), @target_id;
return;
}
@@ -56,7 +56,7 @@ function|script|melee_damage
// args are spell power, target id, dmg
if ((getarg(0) - rand(100)) < (get(BaseLevel, getarg(1)) + get(MDEF1, getarg(1))))
injure BL_ID, getarg(1), 0;
- else injure BL_ID, getarg(1), getarg(2);
+ else injure BL_ID, getarg(1), (getarg(2) * (100 - get(MDEF1, @target_id))) / 100;
return;
}