diff options
-rw-r--r-- | db/const.txt | 6 | ||||
-rw-r--r-- | db/pre-re/item_db.conf | 92 | ||||
-rw-r--r-- | db/re/item_db.conf | 56 | ||||
-rw-r--r-- | db/sc_config.txt | 6 | ||||
-rw-r--r-- | src/map/battle.c | 11 | ||||
-rw-r--r-- | src/map/skill.c | 20 | ||||
-rw-r--r-- | src/map/status.c | 28 | ||||
-rw-r--r-- | src/map/status.h | 6 |
8 files changed, 199 insertions, 26 deletions
diff --git a/db/const.txt b/db/const.txt index e09200500..d5251799d 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1319,6 +1319,12 @@ SC_CUP_OF_BOZA 611 SC_OVERLAPEXPUP 612 SC_MORA_BUFF 613 +// MVP Scrolls +SC_MVPCARD_TAOGUNKA 614 +SC_MVPCARD_MISTRESS 615 +SC_MVPCARD_ORCHERO 616 +SC_MVPCARD_ORCLORD 617 + e_gasp 0 e_what 1 e_ho 2 diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 2eae02cf0..e9d13f16b 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -86462,6 +86462,74 @@ item_db: ( Script: <" getitem Tyr's_Blessing,50; "> }, { + Id: 14359 + AegisName: "TaogunkaS_Box" + Name: "Tao Gunka Scroll Box" + Type: 18 + Buy: 20 + Trade: { + nodrop: true + notrade: true + nocart: true + noselltonpc: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem TaogunkaS, 10; "> +}, +{ + Id: 14360 + AegisName: "MistressS_Box" + Name: "Mistress Scroll Box" + Type: 18 + Buy: 20 + Trade: { + nodrop: true + notrade: true + nocart: true + noselltonpc: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem MistressS, 10; "> +}, +{ + Id: 14361 + AegisName: "Orc_HeroS_Box" + Name: "Orc Hero Scroll Box" + Type: 18 + Buy: 20 + Trade: { + nodrop: true + notrade: true + nocart: true + noselltonpc: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem Orc_HeroS, 10; "> +}, +{ + Id: 14362 + AegisName: "Orc_LoadS_Box" + Name: "Orc Lord Scroll Box" + Type: 18 + Buy: 20 + Trade: { + nodrop: true + notrade: true + nocart: true + noselltonpc: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem Ord_LoadS, 10; "> +}, +{ Id: 14363 AegisName: "Heart_Scroll" Name: "Heart Scroll" @@ -87938,7 +88006,7 @@ item_db: ( nomail: true noauction: true } - Script: <" sc_start SC_ITEMSCRIPT,180000,4121; "> + Script: <" sc_start SC_FOOD_BASICHIT, 180000, 100; "> }, { Id: 14598 @@ -87956,7 +88024,10 @@ item_db: ( nomail: true noauction: true } - Script: <" sc_start SC_ITEMSCRIPT,60000,4047; "> + Script: <" + specialeffect2 EF_LIGHTSPHERE; + sc_start4 SC_ARMOR_PROPERTY, 60000, 1, Ele_Neutral, 1, 0; + "> }, { Id: 14599 @@ -88030,7 +88101,10 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,180000,4302; "> + Script: <" + specialeffect2 EF_LIGHTSPHERE; + sc_start4 SC_MVPCARD_TAOGUNKA, 180000, 100, 50, 50, 0; + "> }, { Id: 14603 @@ -88048,7 +88122,10 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,180000,4132; "> + Script: <" + specialeffect2 EF_SPELLBREAKER; + sc_start SC_MVPCARD_MISTRESS, 180000, 25; + "> }, { Id: 14604 @@ -88066,7 +88143,7 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,60000,4143; "> + Script: <" sc_start SC_MVPCARD_ORCHERO, 180000, 100; "> }, { Id: 14605 @@ -88084,7 +88161,10 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,180000,4135; "> + Script: <" + specialeffect2 EF_LIGHTSPHERE; + sc_start SC_MVPCARD_ORCLORD, 180000, 30; + "> }, { Id: 14606 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 9f599591a..b6eeba2cf 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -109365,6 +109365,40 @@ item_db: ( Script: <" getitem Tyr's_Blessing,50; "> }, { + Id: 14359 + AegisName: "TaogunkaS_Box" + Name: "Tao Gunka Scroll Box" + Type: 18 + Buy: 20 + Trade: { + nodrop: true + notrade: true + nocart: true + noselltonpc: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem TaogunkaS, 10; "> +}, +{ + Id: 14360 + AegisName: "MistressS_Box" + Name: "Mistress Scroll Box" + Type: 18 + Buy: 20 + Trade: { + nodrop: true + notrade: true + nocart: true + noselltonpc: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem MistressS, 10; "> +}, +{ Id: 14361 AegisName: "Orc_HeroS_Box" Name: "Orc Hero Scroll Box" @@ -110511,7 +110545,7 @@ item_db: ( } Script: <" specialeffect2 EF_CLOAKING; - sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Dark,1,0; + sc_start4 SC_ARMOR_PROPERTY, 1800000, 1, Ele_Dark, 1, 0; "> }, { @@ -110532,7 +110566,7 @@ item_db: ( } Script: <" specialeffect2 EF_BENEDICTIO; - sc_start4 SC_ARMOR_PROPERTY,1800000,1,Ele_Holy,1,0; + sc_start4 SC_ARMOR_PROPERTY, 1800000, 1, Ele_Holy, 1, 0; "> }, { @@ -111648,7 +111682,7 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,180000,4121; "> + Script: <" sc_start SC_FOOD_BASICHIT, 180000, 100; "> }, { Id: 14598 @@ -111666,7 +111700,10 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,60000,4047; "> + Script: <" + specialeffect2 EF_LIGHTSPHERE; + sc_start4 SC_ARMOR_PROPERTY, 60000, 1, Ele_Neutral, 1, 0; + "> }, { Id: 14599 @@ -111750,7 +111787,7 @@ item_db: ( } Script: <" specialeffect2 EF_LIGHTSPHERE; - sc_start SC_ITEMSCRIPT,180000,4302; + sc_start4 SC_MVPCARD_TAOGUNKA, 1800000, 100, 50, 50, 0; "> }, { @@ -111771,7 +111808,7 @@ item_db: ( } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_ITEMSCRIPT,180000,4132; + sc_start SC_MVPCARD_MISTRESS, 180000, 25; "> }, { @@ -111790,7 +111827,7 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,60000,4143; "> + Script: <" sc_start SC_MVPCARD_ORCHERO, 180000, 100; "> }, { Id: 14605 @@ -111808,7 +111845,10 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start SC_ITEMSCRIPT,180000,4135; "> + Script: <" + specialeffect2 EF_LIGHTSPHERE; + sc_start SC_MVPCARD_ORCLORD, 180000, 30; + "> }, { Id: 14606 diff --git a/db/sc_config.txt b/db/sc_config.txt index 06b2bc617..b37afa877 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -424,6 +424,12 @@ SC_GEFFEN_MAGIC3, 2 SC_OVERLAPEXPUP, 12 SC_MORA_BUFF, 2 +// MVP Scrolls +SC_MVPCARD_TAOGUNKA, 60 +SC_MVPCARD_MISTRESS, 60 +SC_MVPCARD_ORCHERO, 60 +SC_MVPCARD_ORCLORD, 60 + // Guild Auras should not be saved SC_LEADERSHIP,78 SC_GLORYWOUNDS,78 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; |