summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-10 15:34:49 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-10 15:34:49 +0000
commit20115c5b2564762b0e9d7c929c38f34c757aac0f (patch)
tree8f7883c8b91d94a1a308d23f9a8403b9f1d63d5b /src/map/skill.c
parent6d4c7182709b758782235857f22fd3632ba8df21 (diff)
downloadhercules-20115c5b2564762b0e9d7c929c38f34c757aac0f.tar.gz
hercules-20115c5b2564762b0e9d7c929c38f34c757aac0f.tar.bz2
hercules-20115c5b2564762b0e9d7c929c38f34c757aac0f.tar.xz
hercules-20115c5b2564762b0e9d7c929c38f34c757aac0f.zip
- Modified status_get_sc_def to handle both rate and tick reductions. This way it can take care of the fact that curse rate/duration reductions are not reduced by the same stats.
- Removed wrong defines status_get_sc_def_[mdef/vit/int/luk], they actually had a rather undefined behaviour. - The pc_max_status_def mob_max_status_def configs are now set on a 1-100% scale instead of 1.00-100.00% git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10206 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 0cf04bbe6..456281d39 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4646,12 +4646,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
{
int i;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- i = status_get_sc_def_mdef(bl);
- if (i >= 10000 ||
+ i = tstatus->mdef;
+ if (i >= 100 ||
(dstsd && (dstsd->class_&MAPID_UPPERMASK) == MAPID_SOUL_LINKER) ||
tsc == NULL || (tsc->data[SC_SPIRIT].timer != -1 && tsc->data[SC_SPIRIT].val2 == SL_ROGUE) || //Rogue's spirit defends againt dispel.
//Fixed & changed to use a proportionnal reduction (no info, but seems far more logical) [DracoRPG]
- rand()%10000 >= (10000-i)*(50+10*skilllv)/100)
+ rand()%100 >= (100-i)*(50+10*skilllv)/100)
{
if (sd)
clif_skill_fail(sd,skillid,0,0);