summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/_procedures.txt
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-02 15:50:03 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-02 15:50:03 -0400
commit2f97a15b49bf8c43ff9761e058b1a19a13856067 (patch)
treee02bff24797209f1e3c92757e9e585a7ea619ba7 /world/map/npc/magic/_procedures.txt
parent3907bdf50d9d76b7eec0a31bf3c41bd9a59aebf1 (diff)
parent615231b146f22c08eead3ac0b2f0572042f0c4d6 (diff)
downloadserverdata-2f97a15b49bf8c43ff9761e058b1a19a13856067.tar.gz
serverdata-2f97a15b49bf8c43ff9761e058b1a19a13856067.tar.bz2
serverdata-2f97a15b49bf8c43ff9761e058b1a19a13856067.tar.xz
serverdata-2f97a15b49bf8c43ff9761e058b1a19a13856067.zip
Merge pull request #495 from mekolat/injure
make spells use mdef
Diffstat (limited to 'world/map/npc/magic/_procedures.txt')
-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 8ffaa4d0..bdeb6140 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -47,7 +47,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;
}
@@ -57,7 +57,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;
}