summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 21:37:10 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 21:37:10 +0000
commita92c2e8b2d21660dea89d6c21cc33b5d11744c4f (patch)
tree32b60e479fd9f10785e48d0b953fee6469ba84d6 /src/map/status.c
parent4cbf988c6707a3cfee4376acad2f96c118fbe149 (diff)
downloadhercules-a92c2e8b2d21660dea89d6c21cc33b5d11744c4f.tar.gz
hercules-a92c2e8b2d21660dea89d6c21cc33b5d11744c4f.tar.bz2
hercules-a92c2e8b2d21660dea89d6c21cc33b5d11744c4f.tar.xz
hercules-a92c2e8b2d21660dea89d6c21cc33b5d11744c4f.zip
- Added battle config sc_def_rate which adjusts natural defense of characters against status changes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5275 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 5841c38d9..3efe688be 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3587,16 +3587,19 @@ int status_get_sc_def(struct block_list *bl, int type)
return 0; //Effect that cannot be reduced? Likely a buff.
}
+ sc_def*=100; //Send it on the interval 0->10000
+ if (battle_config.sc_def_rate != 100)
+ sc_def = sc_def*battle_config.sc_def_rate/100;
+
sc = status_get_sc(bl);
if (sc && sc->count)
{
if (sc->data[SC_SCRESIST].timer != -1)
- sc_def += sc->data[SC_SCRESIST].val1; //Status resist
+ sc_def += 100*sc->data[SC_SCRESIST].val1; //Status resist
else if (sc->data[SC_SIEGFRIED].timer != -1)
- sc_def += sc->data[SC_SIEGFRIED].val2; //Status resistance.
+ sc_def += 100*sc->data[SC_SIEGFRIED].val2; //Status resistance.
}
- sc_def*=100; //Send it on the interval 0->10000
if(bl->type == BL_MOB && sc_def > 5000)
sc_def = 5000; //Are mobs really capped to 50% defense?
@@ -3726,6 +3729,7 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
if (race)
rate -= rate*race/10000;
}
+
if (!(rand()%10000 < rate))
return 0;
}