From 30bc17337f25120862fa3114983ebb4ed7ba1350 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 17 Dec 2015 06:07:19 +0100 Subject: Change ID to Constants in the item db Signed-off-by: Haru --- db/pre-re/item_db.conf | 16 ++++++++-------- db/re/item_db.conf | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index a4f3a96da..aaa5ffad5 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -77414,7 +77414,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14539,5; "> + Script: <" getitem Shadow_Armor_S, 5; "> }, { Id: 13741 @@ -77428,7 +77428,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14539,10; "> + Script: <" getitem Shadow_Armor_S, 10; "> }, { Id: 13742 @@ -77442,7 +77442,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14539,30; "> + Script: <" getitem Shadow_Armor_S, 30; "> }, { Id: 13743 @@ -77456,7 +77456,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14540,5; "> + Script: <" getitem Holy_Armor_S, 5; "> }, { Id: 13744 @@ -77470,7 +77470,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14540,10; "> + Script: <" getitem Holy_Armor_S, 10; "> }, { Id: 13745 @@ -77484,7 +77484,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14540,30; "> + Script: <" getitem Holy_Armor_S, 30; "> }, { Id: 13746 @@ -86300,7 +86300,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14597,10; "> + Script: <" getitem PhreeoniS, 10; "> }, { Id: 14315 @@ -86317,7 +86317,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14598,10; "> + Script: <" getitem GhostringS, 10; "> }, { Id: 14316 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 30f235c90..587be6fa0 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -98712,7 +98712,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14539,5; "> + Script: <" getitem Shadow_Armor_S, 5; "> }, { Id: 13741 @@ -98730,7 +98730,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14539,10; "> + Script: <" getitem Shadow_Armor_S, 10; "> }, { Id: 13742 @@ -98748,7 +98748,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14539,30; "> + Script: <" getitem Shadow_Armor_S, 30; "> }, { Id: 13743 @@ -98766,7 +98766,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14540,5; "> + Script: <" getitem Holy_Armor_S, 5; "> }, { Id: 13744 @@ -98784,7 +98784,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14540,10; "> + Script: <" getitem Holy_Armor_S, 10; "> }, { Id: 13745 @@ -98802,7 +98802,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14540,30; "> + Script: <" getitem Holy_Armor_S, 30; "> }, { Id: 13746 @@ -109179,7 +109179,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14597,10; "> + Script: <" getitem PhreeoniS, 10; "> }, { Id: 14315 @@ -109196,7 +109196,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14598,10; "> + Script: <" getitem GhostringS, 10; "> }, { Id: 14316 @@ -109375,7 +109375,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14604,10; "> + Script: <" getitem Orc_HeroS, 10; "> }, { Id: 14362 @@ -109392,7 +109392,7 @@ item_db: ( nomail: true noauction: true } - Script: <" getitem 14605,10; "> + Script: <" getitem Ord_LoadS, 10; "> }, { Id: 14363 -- cgit v1.2.3-70-g09d2 From 86f70dc9722fedf8a4e73d4037c8477b1e7fb75c Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 17 Dec 2015 06:08:57 +0100 Subject: Reordered trade restrictions for certain items Signed-off-by: Haru --- db/pre-re/item_db.conf | 28 ++++++++++----------- db/re/item_db.conf | 68 +++++++++++++++++++++++++------------------------- 2 files changed, 48 insertions(+), 48 deletions(-) diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index aaa5ffad5..69caf3b34 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -67190,11 +67190,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } }, { @@ -86294,11 +86294,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem PhreeoniS, 10; "> }, @@ -86311,11 +86311,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem GhostringS, 10; "> }, @@ -88020,11 +88020,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,180000,4302; "> }, @@ -88038,11 +88038,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,180000,4132; "> }, @@ -88056,11 +88056,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,60000,4143; "> }, @@ -88074,11 +88074,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,180000,4135; "> }, diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 587be6fa0..780d7c2ea 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -82079,11 +82079,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } }, { @@ -98706,11 +98706,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Shadow_Armor_S, 5; "> }, @@ -98724,11 +98724,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Shadow_Armor_S, 10; "> }, @@ -98742,11 +98742,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Shadow_Armor_S, 30; "> }, @@ -98760,11 +98760,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Holy_Armor_S, 5; "> }, @@ -98778,11 +98778,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Holy_Armor_S, 10; "> }, @@ -98796,11 +98796,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Holy_Armor_S, 30; "> }, @@ -109369,11 +109369,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Orc_HeroS, 10; "> }, @@ -109386,11 +109386,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Ord_LoadS, 10; "> }, @@ -110499,11 +110499,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_CLOAKING; @@ -110520,11 +110520,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_BENEDICTIO; @@ -111638,11 +111638,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,180000,4121; "> }, @@ -111656,11 +111656,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,60000,4047; "> }, @@ -111738,11 +111738,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_LIGHTSPHERE; @@ -111759,11 +111759,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_SPELLBREAKER; @@ -111780,11 +111780,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,60000,4143; "> }, @@ -111798,11 +111798,11 @@ item_db: ( Trade: { nodrop: true notrade: true - noselltonpc: true nocart: true - nogstorage: true + noselltonpc: true nomail: true noauction: true + nogstorage: true } Script: <" sc_start SC_ITEMSCRIPT,180000,4135; "> }, -- cgit v1.2.3-70-g09d2 From 1fbbf9b06dd1feb72a0ce746096de222bf93de44 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 17 Dec 2015 06:11:39 +0100 Subject: Update the item script of the Osychic Armor Scroll item to match official ehavior. Signed-off-by: Haru --- db/pre-re/item_db.conf | 4 ++++ db/re/item_db.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 69caf3b34..2eae02cf0 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -67196,6 +67196,10 @@ item_db: ( noauction: true nogstorage: true } + Script: <" + specialeffect2 EF_ENERGYCOAT; + sc_start4 SC_ARMOR_PROPERTY, 10000, 1, Ele_Neutral, 1, 0; + "> }, { Id: 12407 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 780d7c2ea..9f599591a 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -82085,6 +82085,10 @@ item_db: ( noauction: true nogstorage: true } + Script: <" + specialeffect2 EF_ENERGYCOAT; + sc_start4 SC_ARMOR_PROPERTY, 10000, 1, Ele_Neutral, 1, 0; + "> }, { Id: 12407 -- cgit v1.2.3-70-g09d2 From 8230f5d81baf2647aa49b1cea276c1ada749dc71 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 17 Dec 2015 06:14:04 +0100 Subject: 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 --- db/const.txt | 6 ++++ db/pre-re/item_db.conf | 92 ++++++++++++++++++++++++++++++++++++++++++++++---- db/re/item_db.conf | 56 +++++++++++++++++++++++++----- db/sc_config.txt | 6 ++++ src/map/battle.c | 11 ++++++ src/map/skill.c | 20 ++++++----- src/map/status.c | 28 ++++++++++++--- 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 @@ -86461,6 +86461,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" @@ -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 @@ -109364,6 +109364,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" @@ -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; -- cgit v1.2.3-70-g09d2 From 7e083f9ae7688b2ee1d98246af0ba60c914d0f88 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Tue, 15 Dec 2015 21:18:08 +0800 Subject: Removal of SC_ITEMSCRIPT. --- db/const.txt | 1 - src/map/status.c | 56 -------------------------------------------------------- src/map/status.h | 4 ++-- 3 files changed, 2 insertions(+), 59 deletions(-) diff --git a/db/const.txt b/db/const.txt index d5251799d..100ee1e7a 100644 --- a/db/const.txt +++ b/db/const.txt @@ -987,7 +987,6 @@ SC_MER_SP 282 SC_MER_HIT 283 SC_MER_QUICKEN 284 SC_REBIRTH 285 -SC_ITEMSCRIPT 290 SC_S_LIFEPOTION 291 SC_L_LIFEPOTION 292 SC_CASH_PLUSONLYJOBEXP 293 diff --git a/src/map/status.c b/src/map/status.c index c94794ef6..841f9c855 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1014,7 +1014,6 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED; - status->dbs->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_TARGET_BLOOD] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_TARGET_ASPD] |= SCB_MAXSP; status->dbs->ChangeFlagTable[SC_ATKER_ASPD] |= SCB_MAXHP | SCB_ALL; @@ -2542,12 +2541,6 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { } } - if( sc->count && sc->data[SC_ITEMSCRIPT] ) { - struct item_data *data = itemdb->exists(sc->data[SC_ITEMSCRIPT]->val1); - if( data && data->script ) - script->run_use_script(sd, data, 0); - } - status->calc_pc_additional(sd, opt); if( sd->pd ) { // Pet Bonus @@ -9494,31 +9487,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if (battle_config.sc_castcancel&bl->type) unit->skillcastcancel(bl, 0); break; - /* */ - case SC_ITEMSCRIPT: - if( sd ) { - switch( val1 ) { - case ITEMID_PHREEONI_CARD: - clif->status_change(bl, SI_FOOD_BASICHIT, 1, tick, 0, 0, 0); - break; - case ITEMID_GHOSTRING_CARD: - clif->status_change(bl,SI_ARMOR_PROPERTY,1,tick,0,0,0); - break; - case ITEMID_TAO_GUNKA_CARD: - clif->status_change(bl,SI_MVPCARD_TAOGUNKA,1,tick,0,0,0); - break; - case ITEMID_MISTRESS_CARD: - clif->status_change(bl,SI_MVPCARD_MISTRESS,1,tick,0,0,0); - break; - case ITEMID_ORC_HERO_CARD: - clif->status_change(bl,SI_MVPCARD_ORCHERO,1,tick,0,0,0); - break; - case ITEMID_ORC_LOAD_CARD: - clif->status_change(bl,SI_MVPCARD_ORCLORD,1,tick,0,0,0); - break; - } - } - break; } // Set option as needed. @@ -10385,30 +10353,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const if( sce->val2 ) status_change_end(bl, (sc_type)sce->val2, INVALID_TIMER); break; - case SC_ITEMSCRIPT: - if( sd ) { - switch( sce->val1 ) { - case ITEMID_PHREEONI_CARD: - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_FOOD_BASICHIT); - break; - case ITEMID_GHOSTRING_CARD: - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_ARMOR_PROPERTY); - break; - case ITEMID_TAO_GUNKA_CARD: - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_TAOGUNKA); - break; - case ITEMID_MISTRESS_CARD: - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_MISTRESS); - break; - case ITEMID_ORC_HERO_CARD: - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCHERO); - break; - case ITEMID_ORC_LOAD_CARD: - clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCLORD); - break; - } - } - break; case SC_OVERED_BOOST: switch( bl->type ){ case BL_HOM: diff --git a/src/map/status.h b/src/map/status.h index 21d2e1035..d44cc9bca 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -390,8 +390,8 @@ typedef enum sc_type { //SC_DEFRATIOATK, //SC_HPDRAIN, //SC_SKILLATKBONUS, - SC_ITEMSCRIPT = 290, - SC_S_LIFEPOTION, + //SC_ITEMSCRIPT, + SC_S_LIFEPOTION = 291, SC_L_LIFEPOTION, SC_CASH_PLUSONLYJOBEXP, //SC_IGNOREDEF, -- cgit v1.2.3-70-g09d2