summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 15:04:11 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 15:04:11 +0000
commit78748079288acbd6e5fc7513baa70cf5b0a9a330 (patch)
treed2aada8ab9d3f91fbfd8f4453b527d5a1f1c13d9 /src/map/status.c
parent802127420bf94a1f88696eb74feaf8917fa350cf (diff)
downloadhercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.tar.gz
hercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.tar.bz2
hercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.tar.xz
hercules-78748079288acbd6e5fc7513baa70cf5b0a9a330.zip
- NPC_POWERUP now gives +40% atk per level.
- Water elementals can be frozen again. - Fixed the sc_def equation in status_change_start - Fixed an extra semi-colon that broke win32 compiles. - Some rewriting of bounds checks in @baselvup, @joblvup and the # equivalents to prevent signed/unsigned comparisons. - Now slaves give exp/loot (exception: player slaves still stick to the old rules) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5267 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 3818d5b38..56205c02b 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3597,13 +3597,9 @@ int status_get_sc_def(struct block_list *bl, int type)
}
sc_def*=100; //Send it on the interval 0->10000
- if(bl->type == BL_MOB) {
- struct mob_data *md = (struct mob_data *)bl;
- if (md->class_ == MOBID_EMPERIUM)
- return 0;
- if (sc_def > 5000)
- sc_def = 5000;
- }
+ if(bl->type == BL_MOB && sc_def > 5000)
+ sc_def = 5000; //Are mobs really capped to 50% defense?
+
sd = bl->type==BL_PC?(struct map_session_data*)bl:NULL;
if(sd && SC_COMMON_MIN<=type && type<=SC_COMMON_MAX &&
@@ -3724,12 +3720,12 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
//Check rate
if (!(flag&(4|1))) {
+ rate*=100; //Pass to 10000 = 100%
if (flag&8) {
race = status_get_sc_def(bl, type);
if (race)
- rate -= rate*race/100;
- } else
- rate*=100; //Pass to 10000 = 100%
+ rate -= rate*race/10000;
+ }
if (!(rand()%10000 < rate))
return 0;
}
@@ -3742,8 +3738,6 @@ int status_change_start(struct block_list *bl,int type,int rate,int val1,int val
//Check for inmunities / sc fails
switch (type) {
case SC_FREEZE:
- if (elem == 1 && !(flag&1))
- return 0; //Can't freeze water elementals.
case SC_STONE:
//Undead are inmune to Freeze/Stone
if (undead_flag && !(flag&1))