summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2015-12-17 06:14:04 +0100
committerHaru <haru@dotalux.com>2015-12-17 06:19:07 +0100
commit8230f5d81baf2647aa49b1cea276c1ada749dc71 (patch)
treec3184d29877d1c3b01e5f09a7fdc27f51e686a28 /src/map
parent1fbbf9b06dd1feb72a0ce746096de222bf93de44 (diff)
downloadhercules-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')
-rw-r--r--src/map/battle.c11
-rw-r--r--src/map/skill.c20
-rw-r--r--src/map/status.c28
-rw-r--r--src/map/status.h6
4 files changed, 53 insertions, 12 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c0c2e29cc..c28aef820 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5833,6 +5833,17 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st
delay += 100;/* gradual increase so the numbers don't clip in the client */
}
+ if (sc->data[SC_MVPCARD_ORCLORD]) {
+ NORMALIZE_RDAMAGE(damage * sc->data[SC_MVPCARD_ORCLORD]->val1 / 100);
+
+ rdelay = clif->delay_damage(tick + delay, src, src, status_get_amotion(src), status_get_dmotion(src), rdamage, 1, BDT_ENDURE);
+
+ if (tsd)
+ battle->drain(tsd, src, rdamage, rdamage, status_get_race(src), 0);
+ battle->delay_damage(tick, wd->amotion, target, src, 0, CR_REFLECTSHIELD, 0, rdamage, ATK_DEF, rdelay, true);
+
+ delay += 100;
+ }
}
if( ( ssc = status->get_sc(src) ) ) {
if( ssc->data[SC_INSPIRATION] ) {
diff --git a/src/map/skill.c b/src/map/skill.c
index 39579156f..8d97409fb 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14343,6 +14343,8 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
req.sp -= req.sp * sc->data[SC_TELEKINESIS_INTENSE]->val2 / 100;
if (sc->data[SC_TARGET_ASPD])
req.sp -= req.sp * sc->data[SC_TARGET_ASPD]->val1 / 100;
+ if (sc->data[SC_MVPCARD_MISTRESS])
+ req.sp -= req.sp * sc->data[SC_MVPCARD_MISTRESS]->val1 / 100;
}
req.zeny = skill->dbs->db[idx].zeny[skill_lv-1];
@@ -14422,22 +14424,24 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
if (itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN) {
if (sd->special_state.no_gemstone) {
// All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card [helvetica]
- if( skill_id != SA_ABRACADABRA )
+ if (skill_id != SA_ABRACADABRA)
req.itemid[i] = req.amount[i] = 0;
- else if( --req.amount[i] < 1 )
+ else if (--req.amount[i] < 1)
req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
}
- if(sc && sc->data[SC_INTOABYSS])
- {
- if( skill_id != SA_ABRACADABRA )
+ if (sc && sc->data[SC_INTOABYSS]) {
+ if (skill_id != SA_ABRACADABRA)
req.itemid[i] = req.amount[i] = 0;
- else if( --req.amount[i] < 1 )
+ else if (--req.amount[i] < 1)
req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
}
+ if (sc && sc->data[SC_MVPCARD_MISTRESS]) {
+ req.itemid[i] = req.amount[i] = 0;
+ }
}
- if( skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0){
+ if (skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0) {
int16 item_index;
- if ((item_index = pc->search_inventory(sd,req.itemid[i])) == INDEX_NOT_FOUND
+ if ((item_index = pc->search_inventory(sd, req.itemid[i])) == INDEX_NOT_FOUND
|| sd->status.inventory[item_index].amount < req.amount[i]
) {
req.itemid[i] = ITEMID_TRAP_ALLOY;
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.
diff --git a/src/map/status.h b/src/map/status.h
index 695b5f3cf..21d2e1035 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -793,6 +793,12 @@ typedef enum sc_type {
SC_CUP_OF_BOZA,
SC_OVERLAPEXPUP,
SC_MORA_BUFF,
+
+ // MVP Scrolls
+ SC_MVPCARD_TAOGUNKA,
+ SC_MVPCARD_MISTRESS,
+ SC_MVPCARD_ORCHERO,
+ SC_MVPCARD_ORCLORD,
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;