diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2015-12-17 06:14:04 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-17 06:19:07 +0100 |
commit | 8230f5d81baf2647aa49b1cea276c1ada749dc71 (patch) | |
tree | c3184d29877d1c3b01e5f09a7fdc27f51e686a28 /src/map/status.c | |
parent | 1fbbf9b06dd1feb72a0ce746096de222bf93de44 (diff) | |
download | hercules-8230f5d81baf2647aa49b1cea276c1ada749dc71.tar.gz hercules-8230f5d81baf2647aa49b1cea276c1ada749dc71.tar.bz2 hercules-8230f5d81baf2647aa49b1cea276c1ada749dc71.tar.xz hercules-8230f5d81baf2647aa49b1cea276c1ada749dc71.zip |
Implement official effect of MVP Scrolls
- Ghostring Scroll
- Phreeoni Scroll
- Tao Gunka Scroll
- Mistress Scroll
- Orc Hero Scroll
- Orc Lord Scroll (thanks to Dastgir)
Note: in Aegis, the reflect damage from Orc Lord Scroll is in the user
not in the attacker, but in this commit, the attacker receives the
reflect damage.
- Added New Cash Boxes
* Tao Gunka Scroll Box
* Mistress Scroll Box
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c index f4fd04467..c94794ef6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -860,6 +860,12 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_GEFFEN_MAGIC3] = SI_GEFFEN_MAGIC3; status->dbs->IconChangeTable[SC_FENRIR_CARD] = SI_FENRIR_CARD; + // MVP Scrolls + status->dbs->IconChangeTable[SC_MVPCARD_TAOGUNKA] = SI_MVPCARD_TAOGUNKA; + status->dbs->IconChangeTable[SC_MVPCARD_MISTRESS] = SI_MVPCARD_MISTRESS; + status->dbs->IconChangeTable[SC_MVPCARD_ORCHERO] = SI_MVPCARD_ORCHERO; + status->dbs->IconChangeTable[SC_MVPCARD_ORCLORD] = SI_MVPCARD_ORCLORD; + // Mercenary Bonus Effects status->dbs->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE; status->dbs->IconChangeTable[SC_MER_ATK] = SI_MER_ATK; @@ -1096,6 +1102,12 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC3] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_FENRIR_CARD] |= SCB_MATK | SCB_ALL; + // MVP Scrolls + status->dbs->ChangeFlagTable[SC_MVPCARD_TAOGUNKA] |= SCB_MAXHP | SCB_DEF | SCB_MDEF; + status->dbs->ChangeFlagTable[SC_MVPCARD_MISTRESS] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_MVPCARD_ORCHERO] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_MVPCARD_ORCLORD] |= SCB_ALL; + // Costume status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE; status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE; @@ -5149,14 +5161,16 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def def += sc->data[SC_SHIELDSPELL_REF]->val2; if (sc->data[SC_PRESTIGE]) def += sc->data[SC_PRESTIGE]->val1; - if (sc->data[SC_VOLCANIC_ASH] && (bl->type==BL_MOB)) { - if (status_get_race(bl)==RC_PLANT) + if (sc->data[SC_VOLCANIC_ASH] && (bl->type == BL_MOB)) { + if (status_get_race(bl) == RC_PLANT) def /= 2; } if (sc->data[SC_UNLIMIT]) return 1; if (sc->data[SC_ARMORSCROLL]) def += sc->data[SC_ARMORSCROLL]->val1; + if (sc->data[SC_MVPCARD_TAOGUNKA]) + def -= sc->data[SC_MVPCARD_TAOGUNKA]->val2; return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -5287,6 +5301,8 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md return 1; if (sc->data[SC_FREYJASCROLL]) mdef += sc->data[SC_FREYJASCROLL]->val1; + if (sc->data[SC_MVPCARD_TAOGUNKA]) + mdef -= sc->data[SC_MVPCARD_TAOGUNKA]->val3; return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -5891,6 +5907,8 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, maxhp += maxhp * sc->data[SC_SOULSCROLL]->val1 / 100; if (sc->data[SC_ATKER_ASPD]) maxhp += maxhp * sc->data[SC_ATKER_ASPD]->val1 / 100; + if (sc->data[SC_MVPCARD_TAOGUNKA]) + maxhp += maxhp * sc->data[SC_MVPCARD_TAOGUNKA]->val1 / 100; return (unsigned int)cap_value(maxhp,1,UINT_MAX); } @@ -6754,9 +6772,11 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ if (sc) { if (sc->data[SC_SCRESIST]) - sc_def += sc->data[SC_SCRESIST]->val1*100; //Status resist + sc_def += sc->data[SC_SCRESIST]->val1 * 100; //Status resist else if (sc->data[SC_SIEGFRIED]) - sc_def += sc->data[SC_SIEGFRIED]->val3*100; //Status resistance. + sc_def += sc->data[SC_SIEGFRIED]->val3 * 100; //Status resistance. + if (sc && sc->data[SC_MVPCARD_ORCHERO]) + sc_def += sc->data[SC_MVPCARD_ORCHERO]->val1 * 100; } //When tick def not set, reduction is the same for both. |