summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-12 09:13:29 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-12 09:13:29 +0000
commit62c7a5a3b56f45d22b239009160ca5b4c27a52a8 (patch)
tree9a3ddff3f3621c20a522b9386dfded0eba83f952 /src
parent2f6e6453f6296a6335cf6fccbfe0567584ebdbde (diff)
downloadhercules-62c7a5a3b56f45d22b239009160ca5b4c27a52a8.tar.gz
hercules-62c7a5a3b56f45d22b239009160ca5b4c27a52a8.tar.bz2
hercules-62c7a5a3b56f45d22b239009160ca5b4c27a52a8.tar.xz
hercules-62c7a5a3b56f45d22b239009160ca5b4c27a52a8.zip
- Added SC_INCMDEFRATE, used in Mdef Potions.
- Added the effects of the fireworks items. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11722 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/status.c3
-rw-r--r--src/map/status.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index f0c5b0368..9310e1b57 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -487,6 +487,7 @@ void initChangeTables(void)
StatusChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
StatusChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
StatusChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
+ StatusChangeFlagTable[SC_INCMDEFRATE] |= SCB_MDEF;
StatusChangeFlagTable[SC_INCBASEATK] |= SCB_BATK;
StatusChangeFlagTable[SC_STRFOOD] |= SCB_STR;
StatusChangeFlagTable[SC_AGIFOOD] |= SCB_AGI;
@@ -3662,6 +3663,8 @@ static signed char status_calc_mdef(struct block_list *bl, struct status_change
mdef += 25*mdef/100;
if(sc->data[SC_ENDURE].timer!=-1 && sc->data[SC_ENDURE].val4 == 0)
mdef += sc->data[SC_ENDURE].val1;
+ if(sc->data[SC_INCMDEFRATE].timer!=-1)
+ mdef += mdef * sc->data[SC_INCMDEFRATE].val1/100;
return (char)cap_value(mdef,0,CHAR_MAX);
}
diff --git a/src/map/status.h b/src/map/status.h
index a610ed120..153b7288e 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -280,6 +280,7 @@ enum sc_type {
SC_INCDEF,
SC_INCBASEATK,
SC_FASTCAST,
+ SC_INCMDEFRATE, // Mdef Potion
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
};
int SkillStatusChangeTable(int skill);