summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-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);