From 1ac1500a6761378abc8323d7a341b8ccdd88b08e Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 08:37:29 +0800 Subject: Item Update: - Added official Buche De Noel item effect. - Minor white space adjustments. --- db/const.txt | 1 + db/pre-re/item_db.conf | 5 +---- db/re/item_db.conf | 5 +---- db/sc_config.txt | 2 +- 4 files changed, 4 insertions(+), 9 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index 94fc566d1..d27d68a78 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1341,6 +1341,7 @@ SC_INT_SCROLL 630 SC_STEAMPACK 631 SC_MOVHASTE_POTION 632 SC_MOVESLOW_POTION 633 +SC_BUCHEDENOEL 634 e_gasp 0 e_what 1 diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 84a4d98d2..4d892840c 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -66394,10 +66394,7 @@ item_db: ( BuyingStore: true Script: <" specialeffect2 EF_ANGELUS; - sc_start SC_INCMHPRATE,600000,3; - sc_start SC_INCMSPRATE,600000,3; - sc_start SC_INCHITRATE,600000,3; - sc_start SC_CRITICALPERCENT,600000,7; + sc_start4 SC_BUCHEDENOEL, 600000, 3, 3, 3, 7; "> }, { diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 9cabeb1d3..48560c134 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -81459,10 +81459,7 @@ item_db: ( BuyingStore: true Script: <" specialeffect2 EF_ANGELUS; - sc_start SC_INCMHPRATE,600000,3; - sc_start SC_INCMSPRATE,600000,3; - sc_start SC_INCHITRATE,600000,3; - sc_start SC_CRITICALPERCENT,600000,7; + sc_start4 SC_BUCHEDENOEL, 600000, 3, 3, 3, 7; "> }, { diff --git a/db/sc_config.txt b/db/sc_config.txt index 814d30667..395500e3a 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -294,7 +294,7 @@ SC_SPL_MATK, 28 SC_STR_SCROLL, 61 SC_INT_SCROLL, 61 SC_FORCEOFVANGUARD, 28 -//SC_BUCHEDENOEL, 28 +SC_BUCHEDENOEL, 60 SC__AUTOSHADOWSPELL, 16 SC__SHADOWFORM, 30 SC_RAID, 28 -- cgit v1.2.3-60-g2f50 From f7f6f3da94a9dffc7e7b9ecd2c82914945b48269 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 08:46:04 +0800 Subject: Item Update: - Added official item effect for Ancient Spirit Agimat. --- db/const.txt | 1 + db/re/item_db.conf | 4 ++++ src/map/status.c | 8 ++++++++ src/map/status.h | 1 + 4 files changed, 14 insertions(+) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index d27d68a78..e2cff732b 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1342,6 +1342,7 @@ SC_STEAMPACK 631 SC_MOVHASTE_POTION 632 SC_MOVESLOW_POTION 633 SC_BUCHEDENOEL 634 +SC_PHI_DEMON 635 e_gasp 0 e_what 1 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 48560c134..00935594e 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -86572,6 +86572,10 @@ item_db: ( Type: 2 Buy: 20 Weight: 600 + Script: <" + specialeffect2 EF_PROVIDENCE; + sc_start SC_PHI_DEMON, 1200000, 10; + "> }, { Id: 12776 diff --git a/src/map/status.c b/src/map/status.c index 2e5734e90..33e664f3f 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -823,6 +823,7 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_FOOD_CRITICALSUCCESSVALUE] = SI_FOOD_CRITICALSUCCESSVALUE; status->dbs->IconChangeTable[SC_MORA_BUFF] = SI_MORA_BUFF; status->dbs->IconChangeTable[SC_BUCHEDENOEL] = SI_BUCHEDENOEL; + status->dbs->IconChangeTable[SC_PHI_DEMON] = SI_PHI_DEMON; // Cash Items status->dbs->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH; @@ -1049,6 +1050,7 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_INT_SCROLL] |= SCB_INT; status->dbs->ChangeFlagTable[SC_STEAMPACK] |= SCB_BATK | SCB_ASPD | SCB_ALL; status->dbs->ChangeFlagTable[SC_BUCHEDENOEL] |= SCB_REGEN | SCB_HIT | SCB_CRI; + status->dbs->ChangeFlagTable[SC_PHI_DEMON] |= SCB_ALL; // Cash Items status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] |= SCB_STR; @@ -3115,6 +3117,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { } if (sc->data[SC_CUP_OF_BOZA]) sd->subele[ELE_FIRE] += sc->data[SC_CUP_OF_BOZA]->val2; + if (sc->data[SC_PHI_DEMON]) { + sd->right_weapon.addrace[RC_DEMON] += sc->data[SC_PHI_DEMON]->val1; + sd->left_weapon.addrace[RC_DEMON] += sc->data[SC_PHI_DEMON]->val1; + } } status_cpy(&sd->battle_status, bstatus); @@ -3496,6 +3502,8 @@ void status_calc_regen_rate(struct block_list *bl, struct regen_data *regen, str regen->rate.hp *= 2; if (sc->data[SC_VITALITYACTIVATION]) regen->flag &=~RGN_SP; + + // Recovery Items if (sc->data[SC_EXTRACT_WHITE_POTION_Z]) regen->rate.hp += regen->rate.hp * sc->data[SC_EXTRACT_WHITE_POTION_Z]->val1 / 100; if (sc->data[SC_VITATA_500]) diff --git a/src/map/status.h b/src/map/status.h index 43041e316..bc93abc1e 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -818,6 +818,7 @@ typedef enum sc_type { SC_MOVHASTE_POTION, SC_MOVESLOW_POTION, SC_BUCHEDENOEL, + SC_PHI_DEMON, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -- cgit v1.2.3-60-g2f50 From 9dc44927ccf5ae88a40e92be5c7c2146cdb5eb06 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 11:30:24 +0800 Subject: Item Update: - Update the Genetic Sling / Food items - AegisNames - iRO Names - Prices - Weight - Added official effect for HP Increase Potions and SP Increase Potions. - Fix Banana Bomb sitting behavior. --- db/const.txt | 2 + db/pre-re/item_db.conf | 300 +++++++++++++++++++++++-------------------------- db/re/item_db.conf | 145 +++++++++--------------- db/sc_config.txt | 13 +++ src/map/clif.c | 7 ++ src/map/status.c | 185 ++++++++++++++++++------------ src/map/status.h | 2 + 7 files changed, 332 insertions(+), 322 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index e2cff732b..4837b3898 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1343,6 +1343,8 @@ SC_MOVHASTE_POTION 632 SC_MOVESLOW_POTION 633 SC_BUCHEDENOEL 634 SC_PHI_DEMON 635 +SC_PROMOTE_HEALTH_RESERCH 636 +SC_ENERGY_DRINK_RESERCH 637 e_gasp 0 e_what 1 diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 4d892840c..6bf556304 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -67306,6 +67306,7 @@ item_db: ( Type: 2 Buy: 100 Weight: 50 + Script: <" sc_start SC_BOOST500, 500000, 10; "> }, { Id: 12418 @@ -67315,210 +67316,200 @@ item_db: ( Buy: 100 Weight: 50 BuyingStore: true + Script: <" sc_start SC_FULL_SWING_K, 500000, 50; "> }, { Id: 12419 AegisName: "Mana_Plus" - Name: "Mana Plus" + Name: "Mana +" Type: 2 Buy: 100 Weight: 50 BuyingStore: true + Script: <" sc_start SC_MANA_PLUS, 500000, 50; "> }, { Id: 12420 AegisName: "Stamina_Up_M" - Name: "Stamina Up M" + Name: "Muramura(M)" Type: 2 Buy: 100 Weight: 50 + Script: <" sc_start SC_MUSTLE_M, 500000, 5; "> }, { Id: 12421 AegisName: "Digestive_F" - Name: "Falmons F" - Type: 3 - Buy: 10 - Weight: 10 + Name: "Falmons(F)" + Type: 2 + Buy: 100 + Weight: 50 + Script: <" sc_start SC_LIFE_FORCE_F, 500000, 5; "> }, { Id: 12422 - AegisName: "HP_Increase_Potion_(Small)" - Name: "HP Increase Potion (Small)" - Type: 0 - Buy: 10 - Weight: 10 + AegisName: "HP_Increase_PotionS" + Name: "HP Increase Potion(Small)" + Type: 2 + Buy: 100 + Weight: 20 BuyingStore: true - Script: <" - sc_start SC_INCMHPRATE,500000,1; - sc_start SC_INCMHP,500000,(500+(10/3)*BaseLevel); - percentheal 2,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 1, 1, 500, 2; "> }, { Id: 12423 - AegisName: "HP_Increase_Potion_(Medium)" - Name: "HP Increase Potion (Medium)" - Type: 0 - Buy: 10 - Weight: 10 + AegisName: "HP_Increase_PotionM" + Name: "HP Increase Potion(Mid)" + Type: 2 + Buy: 100 + Weight: 40 BuyingStore: true - Script: <" - sc_start SC_INCMHPRATE,500000,2; - sc_start SC_INCMHP,500000,(1500+(10/3)*BaseLevel); - percentheal 3,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 1, 2, 1500, 3; "> }, { Id: 12424 - AegisName: "HP_Increase_Potion_(Large)" - Name: "HP Increase Potion (Large)" - Type: 0 - Buy: 10 - Weight: 10 + AegisName: "HP_Increase_PotionL" + Name: "HP Increase Potion(Large)" + Type: 2 + Buy: 100 + Weight: 80 BuyingStore: true - Script: <" - sc_start SC_INCMHPRATE,500000,5; - sc_start SC_INCMHP,500000,(2500+(10/3)*BaseLevel); - percentheal 5,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 1, 3, 2500, 5; "> }, { Id: 12425 - AegisName: "SP_Increase_Potion_(Small)" - Name: "SP Increase Potion (Small)" - Type: 0 - Buy: 10 - Weight: 10 + AegisName: "SP_Increase_PotionS" + Name: "SP Increase Potion(Small)" + Type: 2 + Buy: 100 + Weight: 20 BuyingStore: true - Script: <" - sc_start SC_INCMSPRATE,500000,2; - percentheal 0,2; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 1, 1, 0, 2; "> }, { Id: 12426 - AegisName: "SP_Increase_Potion_(Medium)" - Name: "SP Increase Potion (Medium)" - Type: 0 - Buy: 10 - Weight: 10 + AegisName: "SP_Increase_PotionM" + Name: "SP Increase Potion(Mid)" + Type: 2 + Buy: 100 + Weight: 40 BuyingStore: true - Script: <" - sc_start SC_INCMSPRATE,500000,4; - percentheal 0,4; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 1, 2, 0, 4; "> }, { Id: 12427 - AegisName: "SP_Increase_Potion_(Large)" - Name: "SP Increase Potion (Large)" - Type: 0 - Buy: 10 - Weight: 10 + AegisName: "SP_Increase_PotionL" + Name: "SP Increase Potion(Large)" + Type: 2 + Buy: 100 + Weight: 80 BuyingStore: true - Script: <" - sc_start SC_INCMSPRATE,500000,8; - percentheal 0,8; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 1, 3, 0, 8; "> }, { Id: 12428 AegisName: "Enrich_White_PotionZ" - Name: "Concentrated White Potion Z" - Type: 0 - Buy: 10 - Weight: 10 + Name: "Enriched White PotionZ" + Type: 2 + Buy: 100 + Weight: 70 BuyingStore: true Script: <" - sc_start SC_EXTRACT_WHITE_POTION_Z,500000,20; - heal 1000,0; + sc_start SC_EXTRACT_WHITE_POTION_Z, 500000, 20; + heal 1000, 0; "> }, { Id: 12429 AegisName: "Savage_BBQ" - Name: "Savage Full Roast" + Name: "Savage BBQ" Type: 2 + Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_SAVAGE_STEAK,300000,20; "> + Script: <" sc_start SC_SAVAGE_STEAK, 300000, 20; "> }, { Id: 12430 AegisName: "Wug_Blood_Cocktail" - Name: "Cocktail Warg Blood" + Name: "Warg Blood Cocktail" Type: 2 + Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_COCKTAIL_WARG_BLOOD,300000,20; "> + Script: <" sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20; "> }, { Id: 12431 AegisName: "Minor_Brisket" - Name: "Minor Stew" + Name: "Minor Brisket" Type: 2 + Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_MINOR_BBQ,300000,20; "> + Script: <" sc_start SC_MINOR_BBQ, 300000, 20; "> }, { Id: 12432 AegisName: "Siroma_Icetea" - Name: "Siroma Iced Tea" + Name: "Siroma Icetea" Type: 2 + Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_SIROMA_ICE_TEA,300000,20; "> + Script: <" sc_start SC_SIROMA_ICE_TEA, 300000, 20; "> }, { Id: 12433 AegisName: "Drocera_Herb_Stew" - Name: "Drosera Herb Salad" + Name: "Drosera Herb Stew" Type: 2 + Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_DROCERA_HERB_STEAMED,300000,20; "> + Script: <" sc_start SC_DROCERA_HERB_STEAMED, 300000, 20; "> }, { Id: 12434 AegisName: "Petti_Tail_Noodle" Name: "Petite Tail Noodles" Type: 2 + Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_PUTTI_TAILS_NOODLES,300000,20; "> + Script: <" sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20; "> }, { Id: 12435 AegisName: "Black_Thing" - Name: "Black Mass" + Name: "Black Thing" Type: 2 + Buy: 1000 Weight: 50 - Script: <" sc_start2 SC_STOMACHACHE,60000,rand(5,10),75; "> + Script: <" sc_start2 SC_STOMACHACHE, 60000, rand(5,10), 75; "> }, { Id: 12436 AegisName: "Vitata500" - Name: "Vitata 500" - Type: 0 - Buy: 10 - Weight: 10 + Name: "Vitata500" + Type: 2 + Buy: 100 + Weight: 50 BuyingStore: true Script: <" - sc_start2 SC_VITATA_500,500000,20,5; - itemheal 0,200; + sc_start2 SC_VITATA_500,500000, 20, 5; + heal 0, 200; "> }, { Id: 12437 AegisName: "Enrich_Celermine_Juice" - Name: "Concentrated Ceromain Soup" + Name: "Enrich Celermine Juice" Type: 2 - Buy: 10 - Weight: 10 + Buy: 100 + Weight: 50 BuyingStore: true - Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10; "> + Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE, 500000, 10; "> }, { Id: 12438 @@ -73851,7 +73842,7 @@ item_db: ( { Id: 13266 AegisName: "Black_Hard_Lump" - Name: "Hard Black Lump" + Name: "Black Hard Lump" Type: 10 Buy: 100 Weight: 50 @@ -73864,7 +73855,7 @@ item_db: ( { Id: 13267 AegisName: "Very_Hard_Lump" - Name: "Extremely Hard Black Lump" + Name: "Very Hard Lump" Type: 10 Buy: 100 Weight: 50 @@ -73886,12 +73877,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MYSTERIOUS_POWDER,10000,2; "> + Script: <" sc_start SC_MYSTERIOUS_POWDER, 10000, 2; "> }, { Id: 13269 AegisName: "Boost500_To_Throw" - Name: "Throwing Boost 500" + Name: "Throwing Boost500" Type: 10 Buy: 100 Weight: 10 @@ -73900,12 +73891,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_BOOST500,500000,10; "> + Script: <" sc_start SC_BOOST500, 500000, 10; "> }, { Id: 13270 AegisName: "Full_SwingK_To_Throw" - Name: "Throwing Full Swing K" + Name: "Full SwingK Throw" Type: 10 Buy: 100 Weight: 50 @@ -73914,12 +73905,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_FULL_SWING_K,500000,50; "> + Script: <" sc_start SC_FULL_SWING_K, 500000, 50; "> }, { Id: 13271 AegisName: "Mana_Plus_To_Throw" - Name: "Throwing Mana Plus" + Name: "Mana + Throw" Type: 10 Buy: 100 Weight: 50 @@ -73928,12 +73919,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MANA_PLUS,500000,50; "> + Script: <" sc_start SC_MANA_PLUS, 500000, 50; "> }, { Id: 13272 AegisName: "Cure_Free_To_Throw" - Name: "Throwing Cure Free" + Name: "Cure Free Throw" Type: 10 Buy: 100 Weight: 50 @@ -73943,16 +73934,19 @@ item_db: ( EquipLv: 99 View: 9 Script: <" + sc_end SC_SILENCE; sc_end SC_BLOODING; + sc_end SC_POISON; sc_end SC_CURSE; - sc_end SC_SILENCE; - itemheal rand(1000,1200),0; + sc_end SC_ORCISH; + sc_end SC_PROPERTYUNDEAD; + heal 500, 0; "> }, { Id: 13273 AegisName: "Stamina_Up_M_To_Throw" - Name: "Throwing Muramura M" + Name: "Throwing Muramura(M)" Type: 10 Buy: 100 Weight: 10 @@ -73961,12 +73955,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MUSTLE_M,500000,5; "> + Script: <" sc_start SC_MUSTLE_M, 500000, 5; "> }, { Id: 13274 AegisName: "Digestive_F_To_Throw" - Name: "Throwing Falmons F" + Name: "Throwing Falmons(F)" Type: 10 Buy: 100 Weight: 10 @@ -73975,12 +73969,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_LIFE_FORCE_F,500000,5; "> + Script: <" sc_start SC_LIFE_FORCE_F, 500000, 5; "> }, { Id: 13275 AegisName: "HP_Inc_PotS_To_Throw" - Name: "Throwing Increase HP Potion (Small)" + Name: "HP Increase Potion(Small) Throw" Type: 10 Buy: 100 Weight: 20 @@ -73989,15 +73983,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMHPRATE,500000,1; - percentheal 1,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2, 1, 500, 2; "> }, { Id: 13276 AegisName: "HP_Inc_PotM_To_Throw" - Name: "Throwing Increase HP Potion (Medium)" + Name: "HP Increase Potion(Mid) Throw" Type: 10 Buy: 100 Weight: 40 @@ -74006,15 +73997,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMHPRATE,500000,2; - percentheal 2,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2, 2, 1500, 3; "> }, { Id: 13277 AegisName: "HP_Inc_PotL_To_Throw" - Name: "Throwing Increase HP Potion (Large)" + Name: "HP Increase Potion(Large) Throw" Type: 10 Buy: 100 Weight: 80 @@ -74023,15 +74011,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMHPRATE,500000,5; - percentheal 5,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2 3, 2500, 5; "> }, { Id: 13278 AegisName: "SP_Inc_PotS_To_Throw" - Name: "Throwing Increase SP Potion (Small)" + Name: "SP Increase Potion(Small) Throw" Type: 10 Buy: 100 Weight: 20 @@ -74040,15 +74025,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMSPRATE,500000,2; - percentheal 0,2; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 2, 1, 0, 2; "> }, { Id: 13279 AegisName: "SP_Inc_PotM_To_Throw" - Name: "Throwing Increase SP Potion (Medium)" + Name: "SP Increase Potion(Mid) Throw" Type: 10 Buy: 100 Weight: 40 @@ -74057,15 +74039,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMSPRATE,500000,4; - percentheal 0,4; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 2, 2, 0, 4; "> }, { Id: 13280 AegisName: "SP_Inc_PotL_To_Throw" - Name: "Throwing Increase SP Potion (Large)" + Name: "SP Increase Potion(Large) Throw" Type: 10 Buy: 100 Weight: 80 @@ -74074,15 +74053,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMSPRATE,500000,8; - percentheal 0,8; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 2, 3, 0, 8; "> }, { Id: 13281 AegisName: "En_White_PotZ_To_Throw" - Name: "Throwing Concentrated White Potion Z" + Name: "Enriched White PotionZ Throw" Type: 10 Buy: 100 Weight: 70 @@ -74092,14 +74068,14 @@ item_db: ( EquipLv: 99 View: 9 Script: <" - sc_start SC_EXTRACT_WHITE_POTION_Z,500000,20; - itemheal rand(1500,1600),0; + sc_start SC_EXTRACT_WHITE_POTION_Z, 500000, 20; + heal 1000, 0; "> }, { Id: 13282 AegisName: "Vitata500_To_Throw" - Name: "Throwing Vitata 500" + Name: "Vitata50 Throw0" Type: 10 Buy: 100 Weight: 50 @@ -74108,12 +74084,15 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_VITATA_500,500000,20; "> + Script: <" + sc_start2 SC_VITATA_500, 500000, 20, 5; + heal 0, 200; + "> }, { Id: 13283 AegisName: "En_Cel_Juice_To_Throw" - Name: "Throwing Ceromain Soup" + Name: "Enrich Celermine Juice Throw" Type: 10 Buy: 100 Weight: 50 @@ -74122,15 +74101,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10; - itemheal rand(1500,1600),0; - "> + Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE, 500000, 10; "> }, { Id: 13284 AegisName: "Savage_BBQ_To_Throw" - Name: "Throwing Savage Full Roast" + Name: "Savage BBQ Throw" Type: 10 Buy: 100 Weight: 50 @@ -74139,12 +74115,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_SAVAGE_STEAK,300000,20; "> + Script: <" sc_start SC_SAVAGE_STEAK, 300000, 20; "> }, { Id: 13285 AegisName: "Wug_Cocktail_To_Throw" - Name: "Throwing Cocktail Warg Blood" + Name: "Warg Cocktail To Throw" Type: 10 Buy: 100 Weight: 50 @@ -74153,12 +74129,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_COCKTAIL_WARG_BLOOD,300000,20; "> + Script: <" sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20; "> }, { Id: 13286 AegisName: "M_Brisket_To_Throw" - Name: "Throwing Minor Stew" + Name: "M Brisket To Throw" Type: 10 Buy: 100 Weight: 50 @@ -74167,12 +74143,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MINOR_BBQ,300000,20; "> + Script: <" sc_start SC_MINOR_BBQ, 300000, 20; "> }, { Id: 13287 AegisName: "Siroma_Icetea_To_Throw" - Name: "Throwing Siroma Iced Tea" + Name: "Siroma Icetea To Throw" Type: 10 Buy: 100 Weight: 50 @@ -74181,12 +74157,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_SIROMA_ICE_TEA,300000,20; "> + Script: <" sc_start SC_SIROMA_ICE_TEA, 300000, 20; "> }, { Id: 13288 AegisName: "Drocera_Stew_To_Throw" - Name: "Throwing Drosera Herb Salad" + Name: "Drosera Stew To Throw" Type: 10 Buy: 100 Weight: 50 @@ -74195,12 +74171,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_DROCERA_HERB_STEAMED,300000,20; "> + Script: <" sc_start SC_DROCERA_HERB_STEAMED, 300000, 20; "> }, { Id: 13289 AegisName: "Petti_Noodle_To_Throw" - Name: "Throwing Petite Tail Soup" + Name: "Petite Noodle To Throw" Type: 10 Buy: 100 Weight: 50 @@ -74209,12 +74185,12 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_PUTTI_TAILS_NOODLES,300000,20; "> + Script: <" sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20; "> }, { Id: 13290 AegisName: "Black_Thing_To_Throw" - Name: "Throwing Black Mass" + Name: "Black Thing To Throw" Type: 10 Buy: 100 Weight: 50 @@ -74223,7 +74199,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start2 SC_STOMACHACHE,60000,rand(5,10),75; "> + Script: <" sc_start2 SC_STOMACHACHE, 60000, rand(5,10), 75; "> }, //== Ninja Fuuma Shurikens ================================= diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 00935594e..1f8e54a9c 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -82383,6 +82383,7 @@ item_db: ( Type: 2 Buy: 100 Weight: 50 + Script: <" sc_start SC_BOOST500, 500000, 10; "> }, { Id: 12418 @@ -82392,6 +82393,7 @@ item_db: ( Buy: 100 Weight: 50 BuyingStore: true + Script: <" sc_start SC_FULL_SWING_K, 500000, 50; "> }, { Id: 12419 @@ -82401,6 +82403,7 @@ item_db: ( Buy: 100 Weight: 50 BuyingStore: true + Script: <" sc_start SC_MANA_PLUS, 500000, 50; "> }, { Id: 12420 @@ -82409,39 +82412,36 @@ item_db: ( Type: 2 Buy: 100 Weight: 50 + Script: <" sc_start SC_MUSTLE_M, 500000, 5; "> }, { Id: 12421 AegisName: "Digestive_F" Name: "Falmons(F)" + Type: 2 Buy: 100 Weight: 50 + Script: <" sc_start SC_LIFE_FORCE_F, 500000, 5; "> }, { Id: 12422 AegisName: "HP_Increase_PotionS" Name: "HP Increase Potion(Small)" - Type: 0 + Type: 2 Buy: 100 Weight: 20 BuyingStore: true - Script: <" - sc_start SC_INCMHP,500000,(500+(10/3)*BaseLevel); - percentheal 2,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 1, 1, 500, 2; "> }, { Id: 12423 AegisName: "HP_Increase_PotionM" Name: "HP Increase Potion(Mid)" - Type: 0 + Type: 2 Buy: 100 Weight: 40 BuyingStore: true - Script: <" - sc_start SC_INCMHP,500000,(1500+(10/3)*BaseLevel); - percentheal 3,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 1, 2, 1500, 3; "> }, { Id: 12424 @@ -82451,61 +82451,49 @@ item_db: ( Buy: 100 Weight: 80 BuyingStore: true - Script: <" - sc_start SC_INCMHP,500000,(2500+(10/3)*BaseLevel); - percentheal 5,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 1, 3, 2500, 5; "> }, { Id: 12425 AegisName: "SP_Increase_PotionS" Name: "SP Increase Potion(Small)" - Type: 0 + Type: 2 Buy: 100 Weight: 20 BuyingStore: true - Script: <" - sc_start SC_INCMSPRATE,500000,((BaseLevel/10)-5); - percentheal 0,2; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 1, 1, 0, 2; "> }, { Id: 12426 AegisName: "SP_Increase_PotionM" Name: "SP Increase Potion(Mid)" - Type: 0 + Type: 2 Buy: 100 Weight: 40 BuyingStore: true - Script: <" - sc_start SC_INCMSPRATE,500000,(BaseLevel/10); - percentheal 0,4; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 1, 2, 0, 4; "> }, { Id: 12427 AegisName: "SP_Increase_PotionL" Name: "SP Increase Potion(Large)" - Type: 0 + Type: 2 Buy: 100 Weight: 80 BuyingStore: true - Script: <" - sc_start SC_INCMSPRATE,500000,((BaseLevel/10)+5); - percentheal 0,8; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 1, 3, 0, 8; "> }, { Id: 12428 AegisName: "Enrich_White_PotionZ" Name: "Enriched White PotionZ" - Type: 0 + Type: 2 Buy: 100 Weight: 70 BuyingStore: true Script: <" - sc_start SC_EXTRACT_WHITE_POTION_Z,500000,20; - heal 1000,0; + sc_start SC_EXTRACT_WHITE_POTION_Z, 500000, 20; + heal 1000, 0; "> }, { @@ -82516,7 +82504,7 @@ item_db: ( Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_SAVAGE_STEAK,300000,20; "> + Script: <" sc_start SC_SAVAGE_STEAK, 300000, 20; "> }, { Id: 12430 @@ -82526,7 +82514,7 @@ item_db: ( Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_COCKTAIL_WARG_BLOOD,300000,20; "> + Script: <" sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20; "> }, { Id: 12431 @@ -82536,7 +82524,7 @@ item_db: ( Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_MINOR_BBQ,300000,20; "> + Script: <" sc_start SC_MINOR_BBQ, 300000, 20; "> }, { Id: 12432 @@ -82546,7 +82534,7 @@ item_db: ( Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_SIROMA_ICE_TEA,300000,20; "> + Script: <" sc_start SC_SIROMA_ICE_TEA, 300000, 20; "> }, { Id: 12433 @@ -82556,7 +82544,7 @@ item_db: ( Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_DROCERA_HERB_STEAMED,300000,20; "> + Script: <" sc_start SC_DROCERA_HERB_STEAMED, 300000, 20; "> }, { Id: 12434 @@ -82566,7 +82554,7 @@ item_db: ( Buy: 1000 Weight: 50 BuyingStore: true - Script: <" sc_start SC_PUTTI_TAILS_NOODLES,300000,20; "> + Script: <" sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20; "> }, { Id: 12435 @@ -82575,19 +82563,19 @@ item_db: ( Type: 2 Buy: 1000 Weight: 50 - Script: <" sc_start2 SC_STOMACHACHE,60000,rand(5,10),75; "> + Script: <" sc_start2 SC_STOMACHACHE, 60000, rand(5,10), 75; "> }, { Id: 12436 AegisName: "Vitata500" Name: "Vitata500" - Type: 0 + Type: 2 Buy: 100 Weight: 50 BuyingStore: true Script: <" - sc_start2 SC_VITATA_500,500000,20,5; - heal 0,200; + sc_start2 SC_VITATA_500, 500000, 20, 5; + heal 0, 200; "> }, { @@ -82598,7 +82586,7 @@ item_db: ( Buy: 100 Weight: 50 BuyingStore: true - Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10; "> + Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE, 500000, 10; "> }, { Id: 12438 @@ -92956,7 +92944,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MYSTERIOUS_POWDER,10000,2; "> + Script: <" sc_start SC_MYSTERIOUS_POWDER, 10000, 2; "> }, { Id: 13269 @@ -92969,7 +92957,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_BOOST500,500000,10; "> + Script: <" sc_start SC_BOOST500, 500000, 10; "> }, { Id: 13270 @@ -92982,7 +92970,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_FULL_SWING_K,500000,50; "> + Script: <" sc_start SC_FULL_SWING_K, 500000, 50; "> }, { Id: 13271 @@ -92995,7 +92983,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MANA_PLUS,500000,50; "> + Script: <" sc_start SC_MANA_PLUS, 500000, 50; "> }, { Id: 13272 @@ -93015,7 +93003,7 @@ item_db: ( sc_end SC_CURSE; sc_end SC_ORCISH; sc_end SC_PROPERTYUNDEAD; - heal 500,0; + heal 500, 0; "> }, { @@ -93029,7 +93017,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MUSTLE_M,500000,5; "> + Script: <" sc_start SC_MUSTLE_M, 500000, 5; "> }, { Id: 13274 @@ -93042,7 +93030,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_LIFE_FORCE_F,500000,5; "> + Script: <" sc_start SC_LIFE_FORCE_F, 500000, 5; "> }, { Id: 13275 @@ -93055,11 +93043,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMHPRATE,500000,1; - sc_start SC_INCMHP,500000,(500+(10/3)*BaseLevel); - percentheal 2,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2, 1, 500, 2; "> }, { Id: 13276 @@ -93072,11 +93056,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMHPRATE,500000,2; - sc_start SC_INCMHP,500000,(1500+(10/3)*BaseLevel); - percentheal 3,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2, 2, 1500, 3; "> }, { Id: 13277 @@ -93089,11 +93069,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMHPRATE,500000,5; - sc_start SC_INCMHP,500000,(2500+(10/3)*BaseLevel); - percentheal 5,0; - "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2, 3, 2500, 5; "> }, { Id: 13278 @@ -93106,10 +93082,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMSPRATE,500000,2; - percentheal 0,2; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 2, 1, 0, 2; "> }, { Id: 13279 @@ -93122,10 +93095,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMSPRATE,500000,4; - percentheal 0,4; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 2, 2, 0, 4; "> }, { Id: 13280 @@ -93138,10 +93108,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" - sc_start SC_INCMSPRATE,500000,8; - percentheal 0,8; - "> + Script: <" sc_start4 SC_ENERGY_DRINK_RESERCH, 500000, 2, 3, 0, 8; "> }, { Id: 13281 @@ -93155,8 +93122,8 @@ item_db: ( EquipLv: 99 View: 9 Script: <" - sc_start SC_EXTRACT_WHITE_POTION_Z,500000,0; - heal 1000,0; + sc_start SC_EXTRACT_WHITE_POTION_Z, 500000, 20; + heal 1000, 0; "> }, { @@ -93171,8 +93138,8 @@ item_db: ( EquipLv: 99 View: 9 Script: <" - sc_start SC_VITATA_500,500000,0; - heal 0,200; + sc_start2 SC_VITATA_500, 500000, 20, 5; + heal 0, 200; "> }, { @@ -93186,7 +93153,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE,500000,10; "> + Script: <" sc_start SC_EXTRACT_SALAMINE_JUICE, 500000, 10; "> }, { Id: 13284 @@ -93199,7 +93166,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_SAVAGE_STEAK,300000,20; "> + Script: <" sc_start SC_SAVAGE_STEAK, 300000, 20; "> }, { Id: 13285 @@ -93212,7 +93179,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_COCKTAIL_WARG_BLOOD,300000,20; "> + Script: <" sc_start SC_COCKTAIL_WARG_BLOOD, 300000, 20; "> }, { Id: 13286 @@ -93225,7 +93192,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_MINOR_BBQ,300000,20; "> + Script: <" sc_start SC_MINOR_BBQ, 300000, 20; "> }, { Id: 13287 @@ -93238,7 +93205,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_SIROMA_ICE_TEA,300000,20; "> + Script: <" sc_start SC_SIROMA_ICE_TEA, 300000, 20; "> }, { Id: 13288 @@ -93251,7 +93218,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_DROCERA_HERB_STEAMED,300000,20; "> + Script: <" sc_start SC_DROCERA_HERB_STEAMED, 300000, 20; "> }, { Id: 13289 @@ -93264,7 +93231,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start SC_PUTTI_TAILS_NOODLES,300000,20; "> + Script: <" sc_start SC_PUTTI_TAILS_NOODLES, 300000, 20; "> }, { Id: 13290 @@ -93277,7 +93244,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start2 SC_STOMACHACHE,60000,rand(5,10),75; "> + Script: <" sc_start2 SC_STOMACHACHE, 60000, rand(5,10), 75; "> }, //== More Shurikens & Kunais =============================== diff --git a/db/sc_config.txt b/db/sc_config.txt index 395500e3a..a521dd8ed 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -190,6 +190,19 @@ SC_MINOR_BBQ, 76 SC_SIROMA_ICE_TEA, 76 SC_DROCERA_HERB_STEAMED, 76 SC_PUTTI_TAILS_NOODLES, 76 +SC_MELON_BOMB, 12 +SC_BANANA_BOMB_SITDOWN_POSTDELAY, 12 +SC_BANANA_BOMB, 12 +SC_PROMOTE_HEALTH_RESERCH, 12 +SC_ENERGY_DRINK_RESERCH, 12 +SC_EXTRACT_WHITE_POTION_Z, 12 +SC_VITATA_500, 12 +SC_EXTRACT_SALAMINE_JUICE, 12 +SC_BOOST500, 12 +SC_FULL_SWING_K, 12 +SC_MANA_PLUS, 12 +SC_MUSTLE_M, 12 +SC_LIFE_FORCE_F, 12 SC_MER_FLEE, 28 SC_MER_ATK, 28 SC_MER_HP, 28 diff --git a/src/map/clif.c b/src/map/clif.c index 63a36fa62..0cf31fccb 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9969,6 +9969,9 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, break; } + if (sd->sc.data[SC_SITDOWN_FORCE] || sd->sc.data[SC_BANANA_BOMB_SITDOWN_POSTDELAY]) + return; + if(pc_issit(sd)) { //Bugged client? Just refresh them. clif->sitting(&sd->bl); @@ -9992,6 +9995,10 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, clif->sitting(&sd->bl); break; case 0x03: // standup + + if (sd->sc.data[SC_SITDOWN_FORCE] || sd->sc.data[SC_BANANA_BOMB_SITDOWN_POSTDELAY]) + return; + if (!pc_issit(sd)) { //Bugged client? Just refresh them. clif->standing(&sd->bl); diff --git a/src/map/status.c b/src/map/status.c index 33e664f3f..d721e7eb1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -899,11 +899,13 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6; status->dbs->IconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7; + // Mechanic status icon status->dbs->IconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER; status->dbs->IconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER; status->dbs->IconChangeTable[SC_OVERHEAT] = SI_OVERHEAT; status->dbs->IconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT; + // Guillotine Cross status icons status->dbs->IconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY; status->dbs->IconChangeTable[SC_TOXIN] = SI_TOXIN; status->dbs->IconChangeTable[SC_PARALYSE] = SI_PARALYSE; @@ -914,27 +916,22 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE; status->dbs->IconChangeTable[SC_LEECHESEND] = SI_LEECHESEND; + // Royal Guard status icons status->dbs->IconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF; status->dbs->IconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF; status->dbs->IconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF; status->dbs->IconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE; + // Sura status icon status->dbs->IconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER; - status->dbs->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE; - status->dbs->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER; - status->dbs->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB; - status->dbs->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB; - status->dbs->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY; - - // Genetics New Food Items Status Icons + // Genetics Food items / Throwable items status icons status->dbs->IconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK; status->dbs->IconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD; status->dbs->IconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ; status->dbs->IconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA; status->dbs->IconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED; status->dbs->IconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES; - status->dbs->IconChangeTable[SC_BOOST500] |= SI_BOOST500; status->dbs->IconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K; status->dbs->IconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS; @@ -943,6 +940,13 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z; status->dbs->IconChangeTable[SC_VITATA_500] |= SI_VITATA_500; status->dbs->IconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE; + status->dbs->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE; + status->dbs->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER; + status->dbs->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB; + status->dbs->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB; + status->dbs->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY; + status->dbs->IconChangeTable[SC_PROMOTE_HEALTH_RESERCH] = SI_PROMOTE_HEALTH_RESERCH; + status->dbs->IconChangeTable[SC_ENERGY_DRINK_RESERCH] = SI_ENERGY_DRINK_RESERCH; // Elemental Spirit's 'side' status change icons. status->dbs->IconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE; @@ -1009,16 +1013,13 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT; status->dbs->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE; status->dbs->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE; - status->dbs->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT | SCB_FLEE; status->dbs->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI; status->dbs->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD; status->dbs->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2; status->dbs->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP; status->dbs->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP; status->dbs->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP; - status->dbs->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP; status->dbs->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP; - status->dbs->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP; status->dbs->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK | SCB_WATK; status->dbs->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK; status->dbs->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF; @@ -1033,6 +1034,8 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_BATKFOOD] |= SCB_BATK; status->dbs->ChangeFlagTable[SC_WATKFOOD] |= SCB_WATK; status->dbs->ChangeFlagTable[SC_MATKFOOD] |= SCB_MATK; + status->dbs->ChangeFlagTable[SC_ALL_RIDING] |= SCB_SPEED; + status->dbs->ChangeFlagTable[SC_WEDDING] |= SCB_SPEED; status->dbs->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL; @@ -1041,6 +1044,7 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_TARGET_ASPD] |= SCB_MAXSP; status->dbs->ChangeFlagTable[SC_ATKER_ASPD] |= SCB_MAXHP | SCB_ALL; status->dbs->ChangeFlagTable[SC_ATKER_MOVESPEED] |= SCB_MAXSP | SCB_ALL; + status->dbs->ChangeFlagTable[SC_ACARAJE] |= SCB_HIT | SCB_ASPD; status->dbs->ChangeFlagTable[SC_FOOD_CRITICALSUCCESSVALUE] |= SCB_CRI; status->dbs->ChangeFlagTable[SC_CUP_OF_BOZA] |= SCB_VIT | SCB_ALL; status->dbs->ChangeFlagTable[SC_GM_BATTLE] |= SCB_BATK | SCB_MATK | SCB_MAXHP | SCB_MAXSP; @@ -1075,13 +1079,19 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_PYREXIA] |= SCB_HIT | SCB_FLEE; status->dbs->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN; - // RG status + // Royal Guard status status->dbs->ChangeFlagTable[SC_SHIELDSPELL_DEF] |= SCB_WATK; status->dbs->ChangeFlagTable[SC_SHIELDSPELL_REF] |= SCB_DEF; - // Meca status + // Mechanic status status->dbs->ChangeFlagTable[SC_STEALTHFIELD_MASTER] |= SCB_SPEED; + // Other skills status + status->dbs->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED | SCB_REGEN; + status->dbs->ChangeFlagTable[SC_DEFSET] |= SCB_DEF | SCB_DEF2; + status->dbs->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF | SCB_MDEF2; + + // Geneticist Foods / Throwable items status->dbs->ChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR; status->dbs->ChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT; status->dbs->ChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT; @@ -1096,12 +1106,10 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN; status->dbs->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN | SCB_MAXSP; status->dbs->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD; - status->dbs->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED | SCB_REGEN; - status->dbs->ChangeFlagTable[SC_DEFSET] |= SCB_DEF | SCB_DEF2; - status->dbs->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF | SCB_MDEF2; status->dbs->ChangeFlagTable[SC_MYSTERIOUS_POWDER] |= SCB_MAXHP; - status->dbs->ChangeFlagTable[SC_ACARAJE] |= SCB_HIT | SCB_ASPD; status->dbs->ChangeFlagTable[SC_STOMACHACHE] |= SCB_STR | SCB_AGI | SCB_VIT | SCB_INT | SCB_DEX | SCB_LUK | SCB_SPEED; + status->dbs->ChangeFlagTable[SC_PROMOTE_HEALTH_RESERCH] |= SCB_MAXHP | SCB_ALL; + status->dbs->ChangeFlagTable[SC_ENERGY_DRINK_RESERCH] |= SCB_MAXSP | SCB_ALL; // Geffen Scrolls status->dbs->ChangeFlagTable[SC_SKELSCROLL] |= SCB_ALL; @@ -1114,12 +1122,13 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_FREYJASCROLL] |= SCB_MDEF | SCB_FLEE2; status->dbs->ChangeFlagTable[SC_SOULSCROLL] |= SCB_MAXHP | SCB_MAXSP; - status->dbs->ChangeFlagTable[SC_ALL_RIDING] |= SCB_SPEED; - status->dbs->ChangeFlagTable[SC_WEDDING] |= SCB_SPEED; - + // Monster Transform status->dbs->ChangeFlagTable[SC_MTF_ASPD] |= SCB_ASPD | SCB_HIT; status->dbs->ChangeFlagTable[SC_MTF_MATK] |= SCB_MATK; status->dbs->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT | SCB_FLEE; + status->dbs->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP; + status->dbs->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP; // Eden Crystal Synthesis status->dbs->ChangeFlagTable[SC_QUEST_BUFF1] |= SCB_BATK | SCB_MATK; @@ -5937,66 +5946,68 @@ unsigned short status_calc_dmotion(struct block_list *bl, struct status_change * unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { - if(!sc || !sc->count) - return (unsigned int)cap_value(maxhp,1,UINT_MAX); + if (!sc || !sc->count) + return (unsigned int)cap_value(maxhp, 1, UINT_MAX); - if(sc->data[SC_INCMHPRATE]) - maxhp += maxhp * sc->data[SC_INCMHPRATE]->val1/100; - if(sc->data[SC_INCMHP]) + if (sc->data[SC_INCMHPRATE]) + maxhp += maxhp * sc->data[SC_INCMHPRATE]->val1 / 100; + if (sc->data[SC_INCMHP]) maxhp += (sc->data[SC_INCMHP]->val1); - if(sc->data[SC_MTF_MHP]) + if (sc->data[SC_MTF_MHP]) maxhp += (sc->data[SC_MTF_MHP]->val1); - if(sc->data[SC_APPLEIDUN]) - maxhp += maxhp * sc->data[SC_APPLEIDUN]->val2/100; - if(sc->data[SC_DELUGE]) - maxhp += maxhp * sc->data[SC_DELUGE]->val2/100; - if(sc->data[SC_BERSERK]) + if (sc->data[SC_APPLEIDUN]) + maxhp += maxhp * sc->data[SC_APPLEIDUN]->val2 / 100; + if (sc->data[SC_DELUGE]) + maxhp += maxhp * sc->data[SC_DELUGE]->val2 / 100; + if (sc->data[SC_BERSERK]) maxhp += maxhp * 2; - if(sc->data[SC_MARIONETTE_MASTER]) + if (sc->data[SC_MARIONETTE_MASTER]) maxhp -= 1000; - if(sc->data[SC_SOLID_SKIN_OPTION]) + if (sc->data[SC_SOLID_SKIN_OPTION]) maxhp += 2000;// Fix amount. - if(sc->data[SC_POWER_OF_GAIA]) + if (sc->data[SC_POWER_OF_GAIA]) maxhp += 3000; - if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) + if (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) maxhp += 500; - if(sc->data[SC_MER_HP]) - maxhp += maxhp * sc->data[SC_MER_HP]->val2/100; - if(sc->data[SC_EPICLESIS]) + if (sc->data[SC_MER_HP]) + maxhp += maxhp * sc->data[SC_MER_HP]->val2 / 100; + if (sc->data[SC_EPICLESIS]) maxhp += maxhp * 5 * sc->data[SC_EPICLESIS]->val1 / 100; - if(sc->data[SC_VENOMBLEED]) + if (sc->data[SC_VENOMBLEED]) maxhp -= maxhp * 15 / 100; - if(sc->data[SC__WEAKNESS]) + if (sc->data[SC__WEAKNESS]) maxhp -= maxhp * sc->data[SC__WEAKNESS]->val2 / 100; - if(sc->data[SC_LERADS_DEW]) + if (sc->data[SC_LERADS_DEW]) maxhp += sc->data[SC_LERADS_DEW]->val3; - if(sc->data[SC_BEYOND_OF_WARCRY]) + if (sc->data[SC_BEYOND_OF_WARCRY]) maxhp -= maxhp * sc->data[SC_BEYOND_OF_WARCRY]->val4 / 100; - if(sc->data[SC_FORCEOFVANGUARD]) + if (sc->data[SC_FORCEOFVANGUARD]) maxhp += maxhp * 3 * sc->data[SC_FORCEOFVANGUARD]->val1 / 100; - if(sc->data[SC_INSPIRATION]) + if (sc->data[SC_INSPIRATION]) maxhp += maxhp * 5 * sc->data[SC_INSPIRATION]->val1 / 100 + 600 * sc->data[SC_INSPIRATION]->val1; - if(sc->data[SC_RAISINGDRAGON]) + if (sc->data[SC_RAISINGDRAGON]) maxhp += maxhp * (2 + sc->data[SC_RAISINGDRAGON]->val1) / 100; - if(sc->data[SC_GENTLETOUCH_CHANGE]) // Max HP decrease: [Skill Level x 4] % + if (sc->data[SC_GENTLETOUCH_CHANGE]) // Max HP decrease: [Skill Level x 4] % maxhp -= maxhp * (4 * sc->data[SC_GENTLETOUCH_CHANGE]->val1) / 100; - if(sc->data[SC_GENTLETOUCH_REVITALIZE])// Max HP increase: [Skill Level x 2] % + if (sc->data[SC_GENTLETOUCH_REVITALIZE])// Max HP increase: [Skill Level x 2] % maxhp += maxhp * (2 * sc->data[SC_GENTLETOUCH_REVITALIZE]->val1) / 100; - if(sc->data[SC_MUSTLE_M]) - maxhp += maxhp * sc->data[SC_MUSTLE_M]->val1/100; - if(sc->data[SC_MYSTERIOUS_POWDER]) - maxhp -= sc->data[SC_MYSTERIOUS_POWDER]->val1 / 100; - if(sc->data[SC_PETROLOGY_OPTION]) + if (sc->data[SC_MUSTLE_M]) + maxhp += maxhp * sc->data[SC_MUSTLE_M]->val1 / 100; + if (sc->data[SC_PROMOTE_HEALTH_RESERCH]) + maxhp += sc->data[SC_PROMOTE_HEALTH_RESERCH]->val3; + if (sc->data[SC_MYSTERIOUS_POWDER]) + maxhp -= maxhp * sc->data[SC_MYSTERIOUS_POWDER]->val1 / 100; + if (sc->data[SC_PETROLOGY_OPTION]) maxhp += maxhp * sc->data[SC_PETROLOGY_OPTION]->val2 / 100; - if(sc->data[SC_CURSED_SOIL_OPTION]) + if (sc->data[SC_CURSED_SOIL_OPTION]) maxhp += maxhp * sc->data[SC_CURSED_SOIL_OPTION]->val2 / 100; - if(sc->data[SC_UPHEAVAL_OPTION]) + if (sc->data[SC_UPHEAVAL_OPTION]) maxhp += maxhp * sc->data[SC_UPHEAVAL_OPTION]->val3 / 100; if (sc->data[SC_ANGRIFFS_MODUS]) maxhp += maxhp * 5 * sc->data[SC_ANGRIFFS_MODUS]->val1 /100; if (sc->data[SC_GOLDENE_FERSE]) maxhp += maxhp * sc->data[SC_GOLDENE_FERSE]->val2 / 100; - if(sc->data[SC_FRIGG_SONG]) + if (sc->data[SC_FRIGG_SONG]) maxhp += maxhp * sc->data[SC_FRIGG_SONG]->val2 / 100; if (sc->data[SC_SOULSCROLL]) maxhp += maxhp * sc->data[SC_SOULSCROLL]->val1 / 100; @@ -6009,32 +6020,34 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, if (sc->data[SC_GM_BATTLE2]) maxhp -= maxhp * sc->data[SC_GM_BATTLE2]->val1 / 100; - return (unsigned int)cap_value(maxhp,1,UINT_MAX); + return (unsigned int)cap_value(maxhp, 1, UINT_MAX); } unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { - if(!sc || !sc->count) - return cap_value(maxsp,1,UINT_MAX); + if (!sc || !sc->count) + return cap_value(maxsp, 1, UINT_MAX); - if(sc->data[SC_INCMSPRATE]) - maxsp += maxsp * sc->data[SC_INCMSPRATE]->val1/100; - if(sc->data[SC_INCMSP]) + if (sc->data[SC_INCMSPRATE]) + maxsp += maxsp * sc->data[SC_INCMSPRATE]->val1 / 100; + if (sc->data[SC_INCMSP]) maxsp += (sc->data[SC_INCMSP]->val1); - if(sc->data[SC_MTF_MSP]) + if (sc->data[SC_MTF_MSP]) maxsp += (sc->data[SC_MTF_MSP]->val1); - if(sc->data[SC_SERVICEFORYOU]) - maxsp += maxsp * sc->data[SC_SERVICEFORYOU]->val2/100; - if(sc->data[SC_MER_SP]) - maxsp += maxsp * sc->data[SC_MER_SP]->val2/100; - if(sc->data[SC_RAISINGDRAGON]) + if (sc->data[SC_SERVICEFORYOU]) + maxsp += maxsp * sc->data[SC_SERVICEFORYOU]->val2 / 100; + if (sc->data[SC_MER_SP]) + maxsp += maxsp * sc->data[SC_MER_SP]->val2 / 100; + if (sc->data[SC_RAISINGDRAGON]) maxsp += maxsp * (2 + sc->data[SC_RAISINGDRAGON]->val1) / 100; - if(sc->data[SC_LIFE_FORCE_F]) - maxsp += maxsp * sc->data[SC_LIFE_FORCE_F]->val1/100; - if(sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3) + if (sc->data[SC_LIFE_FORCE_F]) + maxsp += maxsp * sc->data[SC_LIFE_FORCE_F]->val1 / 100; + if (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 3) maxsp += 50; if (sc->data[SC_VITATA_500]) maxsp += maxsp * sc->data[SC_VITATA_500]->val2 / 100; + if (sc->data[SC_ENERGY_DRINK_RESERCH]) + maxsp += maxsp * sc->data[SC_ENERGY_DRINK_RESERCH]->val3 / 100; if (sc->data[SC_TARGET_ASPD]) maxsp += maxsp * sc->data[SC_TARGET_ASPD]->val1 / 100; if (sc->data[SC_SOULSCROLL]) @@ -6046,7 +6059,7 @@ unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, if (sc->data[SC_GM_BATTLE2]) maxsp -= maxsp * sc->data[SC_GM_BATTLE2]->val1 / 100; - return cap_value(maxsp,1,UINT_MAX); + return cap_value(maxsp, 1, UINT_MAX); } unsigned char status_calc_element(struct block_list *bl, struct status_change *sc, int element) @@ -9243,6 +9256,30 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t tick_time = 10000; sc_start(src, bl, SC_ENDURE, 100, 10, tick); // Endure effect break; + case SC_PROMOTE_HEALTH_RESERCH: + // Val1: 1 = Regular Potion, 2 = Thrown Potion + // Val2: 1 = Small Potion, 2 = Medium Potion, 3 = Large Potion + // Val3: MaxHP Increase By Fixed Amount + // Val4: MaxHP Heal Percentage + if (val1 == 1) // If potion was normally used, take the user's BaseLv. + val3 = 1000 * val2 - 500 + status->get_lv(bl) * 10 / 3; + else if (val1 == 2) // If potion was thrown at someone, take the thrower's BaseLv. + val3 = 1000 * val2 - 500 + status->get_lv(src) * 10 / 3; + if (val3 <= 0) // Prevents a negeative value from happening. + val3 = 0; + break; + case SC_ENERGY_DRINK_RESERCH: + // Val1: 1 = Regular Potion, 2 = Thrown Potion + // Val2: 1 = Small Potion, 2 = Medium Potion, 3 = Large Potion + // Val3: MaxSP Increase By Fixed Amount + // Val4: MaxSP Heal Percentage + if (val1 == 1) // If potion was normally used, take the user's BaseLv. + val3 = status->get_lv(bl) / 10 + 5 * val2 - 10; + else if (val1 == 2) // If potion was thrown at someone, take the thrower's BaseLv. + val3 = status->get_lv(src) / 10 + 5 * val2 - 10; + if (val3 <= 0) // Prevents a negeative value from happening. + val3 = 0; + break; case SC_KYOUGAKU: { int min = val1*2; int max = val1*3; @@ -9867,6 +9904,12 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t case SC_MER_SP: status_percent_heal(bl, 0, 100); // Recover Full SP break; + case SC_PROMOTE_HEALTH_RESERCH: + status_percent_heal(bl, sce->val4, 0); + break; + case SC_ENERGY_DRINK_RESERCH: + status_percent_heal(bl, 0, sce->val4); + break; /** * Ranger **/ diff --git a/src/map/status.h b/src/map/status.h index bc93abc1e..e1585aabd 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -819,6 +819,8 @@ typedef enum sc_type { SC_MOVESLOW_POTION, SC_BUCHEDENOEL, SC_PHI_DEMON, + SC_PROMOTE_HEALTH_RESERCH, + SC_ENERGY_DRINK_RESERCH, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -- cgit v1.2.3-60-g2f50 From 23b06569296e0f0f791f110df9723f27c60e65a3 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 13:10:57 +0800 Subject: Item Updates: - Fix Speed Up Potion and Guyak Pudding effect, only movement speed reduction will not affect when in Quagmire, Decrease AGI and Slow Grace state. (thanks to kyeme) - Follow up https://github.com/Jedzkie/Hercules/commit/9dc44927ccf5ae88a40e92be5c7c2146cdb5eb06 - Remove Yggdrasilberry and Yggdrasil Seed item re-use delay. --- db/pre-re/item_db.conf | 4 +--- src/map/status.c | 11 +++++------ 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'db') diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 6bf556304..d5ccd7e97 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -1190,7 +1190,6 @@ item_db: ( Buy: 5000 Weight: 300 BuyingStore: true - Delay: 5000 Script: <" percentheal 100,100; "> }, { @@ -1201,7 +1200,6 @@ item_db: ( Buy: 5000 Weight: 300 BuyingStore: true - Delay: 3000 Script: <" percentheal 50,50; "> }, { @@ -74011,7 +74009,7 @@ item_db: ( Loc: 32768 EquipLv: 99 View: 9 - Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2 3, 2500, 5; "> + Script: <" sc_start4 SC_PROMOTE_HEALTH_RESERCH, 500000, 2, 3, 2500, 5; "> }, { Id: 13278 diff --git a/src/map/status.c b/src/map/status.c index d721e7eb1..039315659 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5553,6 +5553,11 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc if( sc->data[SC_MARSHOFABYSS] ) // It stacks to other statuses so always put this at the end. val = max( 50, val + 10 * sc->data[SC_MARSHOFABYSS]->val1 ); + if (sc->data[SC_MOVHASTE_POTION]) { // Doesn't affect the movement speed by Quagmire, Decrease Agi, Slow Grace [Frost] + if (sc->data[SC_DEC_AGI] || sc->data[SC_QUAGMIRE] || sc->data[SC_DONTFORGETME]) + return 0; + } + if( sd && sd->bonus.speed_rate + sd->bonus.speed_add_rate > 0 ) // permanent item-based speedup val = max( val, sd->bonus.speed_rate + sd->bonus.speed_add_rate ); } @@ -7225,12 +7230,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if (sc->data[SC_QUAGMIRE] || sc->data[SC_DEC_AGI]) return 0; break; - case SC_QUAGMIRE: - case SC_DEC_AGI: - case SC_DONTFORGETME: - if (sc->data[SC_MOVHASTE_POTION]) // Doesn't affect by Quagmire, Decrease Agi, Slow Grace [Frost] - return 0; - break; case SC_MAGNIFICAT: if (sc->data[SC_OFFERTORIUM] || sc->option&OPTION_MADOGEAR) // Mado is immune to magnificat return 0; -- cgit v1.2.3-60-g2f50 From 5954bf53cac41cac2fd1eb3bb3d91783f0f9644e Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 14:10:12 +0800 Subject: Item Update: - Remove the hard coded entry of Monster Transform Scrolls - Change mob names into mob constants. --- db/re/item_db.conf | 30 +++++++++++++++--------------- src/map/battle.c | 4 ++-- src/map/status.c | 8 ++++---- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'db') diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 1f8e54a9c..c63e71bc5 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -76469,8 +76469,8 @@ item_db: ( Type: 0 Weight: 30 Script: <" - itemheal rand(45,65),0; - montransform "Bloody Murderer",600000,SC_MTF_MHP,1000; + itemheal rand(45,65), 0; + montransform BLOODY_MURDERER, 600000, SC_MTF_MHP, 1000; "> }, { @@ -76480,8 +76480,8 @@ item_db: ( Type: 0 Weight: 30 Script: <" - itemheal rand(45,65),0; - montransform "Bathory",600000,SC_MTF_MSP,100; + itemheal rand(45,65), 0; + montransform BATHORY, 600000, SC_MTF_MSP, 100; "> }, { @@ -76492,7 +76492,7 @@ item_db: ( Weight: 30 Script: <" itemheal rand(45,65),0; - montransform "Jakk",600000,SC_MTF_PUMPKIN,2000; + montransform JAKK, 600000, SC_MTF_PUMPKIN, 2000; "> }, { @@ -76503,7 +76503,7 @@ item_db: ( Weight: 30 Script: <" itemheal rand(45,65),0; - montransform "Quve",600000,SC_MTF_HITFLEE,10,20; + montransform QUVE, 600000, SC_MTF_HITFLEE, 10, 20; "> }, { @@ -85192,7 +85192,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Deviruchi",1200000,SC_MTF_ASPD; "> + Script: <" montransform DEVIRUCHI, 1200000, SC_MTF_ASPD, 10, 5; "> }, { Id: 12659 @@ -85210,7 +85210,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Raydric Archer",1200000,SC_MTF_RANGEATK; "> + Script: <" montransform RAYDRIC_ARCHER, 1200000, SC_MTF_RANGEATK, 25; "> }, { Id: 12660 @@ -85228,7 +85228,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Mavka",1200000,SC_MTF_RANGEATK; "> + Script: <" montransform MAVKA, 1200000, SC_MTF_RANGEATK, 25; "> }, { Id: 12661 @@ -85246,7 +85246,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Marduk",1200000,SC_MTF_MATK; "> + Script: <" montransform MARDUK, 1200000, SC_MTF_MATK, 25; "> }, { Id: 12662 @@ -85264,7 +85264,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Banshee",1200000,SC_MTF_MATK; "> + Script: <" montransform BANSHEE, 1200000, SC_MTF_MATK, 25; "> }, { Id: 12663 @@ -85282,7 +85282,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Poring",1200000,SC_MTF_CRIDAMAGE; "> + Script: <" montransform PORING, 1200000, SC_MTF_CRIDAMAGE, 5; "> }, { Id: 12664 @@ -85300,7 +85300,7 @@ item_db: ( nomail: true noauction: true } - Script: <" montransform "Golem",1200000,SC_MTF_MLEATKED; "> + Script: <" montransform GOLEM, 1200000, SC_MTF_MLEATKED, 2; "> }, { Id: 12665 @@ -135207,8 +135207,8 @@ item_db: ( Loc: 64 Script: <" skill ALL_CATCRY, 1; - bonus bUnbreakableShoes,0; - autobonus3 "{ }",1000,7000,ALL_CATCRY,"{ montransform 1505,420000; }"; + bonus bUnbreakableShoes, 1; + autobonus3 "{ }", 1000, 7000, ALL_CATCRY, "{ montransform LOLI_RURI, 420000; }"; "> }, diff --git a/src/map/battle.c b/src/map/battle.c index b19e13438..88037b042 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4905,7 +4905,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if(flag.cri && sd->bonus.crit_atk_rate) ATK_ADDRATE(sd->bonus.crit_atk_rate); if(flag.cri && sc && sc->data[SC_MTF_CRIDAMAGE]) - ATK_ADDRATE(25);// temporary it should be 'bonus.crit_atk_rate' + ATK_ADDRATE(sc->data[SC_MTF_CRIDAMAGE]->val1);// temporary it should be 'bonus.crit_atk_rate' #ifndef RENEWAL if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){ @@ -5218,7 +5218,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list if( wd.flag&BF_LONG ) ATK_ADDRATE(sd->bonus.long_attack_atk_rate); if( sc && sc->data[SC_MTF_RANGEATK] ) - ATK_ADDRATE(25);// temporary it should be 'bonus.long_attack_atk_rate' + ATK_ADDRATE(sc->data[SC_MTF_RANGEATK]->val1);// temporary it should be 'bonus.long_attack_atk_rate' #endif if( (i=pc->checkskill(sd,AB_EUCHARISTICA)) > 0 && (tstatus->race == RC_DEMON || tstatus->def_ele == ELE_DARK) ) diff --git a/src/map/status.c b/src/map/status.c index 039315659..9348307b3 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3074,7 +3074,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { sd->subele[ELE_FIRE] -= i; } if (sc->data[SC_MTF_MLEATKED]) - sd->subele[ELE_NEUTRAL] += 2; + sd->subele[ELE_NEUTRAL] += sc->data[SC_MTF_MLEATKED]->val1; if (sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 3) sd->magic_addele[ELE_FIRE] += 25; if (sc->data[SC_WATER_INSIGNIA] && sc->data[SC_WATER_INSIGNIA]->val1 == 3) @@ -4932,7 +4932,7 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, if (sc->data[SC_MOONLIT_SERENADE]) matk += matk * sc->data[SC_MOONLIT_SERENADE]->val2/100; if (sc->data[SC_MTF_MATK]) - matk += matk * 25 / 100; + matk += matk * sc->data[SC_MTF_MATK]->val1 / 100; if (sc->data[SC_MYSTICSCROLL]) matk += matk * sc->data[SC_MYSTICSCROLL]->val1 / 100; @@ -5008,7 +5008,7 @@ signed short status_calc_hit(struct block_list *bl, struct status_change *sc, in if (!viewable) { /* some statuses that are hidden in the status window */ if (sc->data[SC_MTF_ASPD]) - hit += 5; + hit += sc->data[SC_MTF_ASPD]->val2; return (short)cap_value(hit, 1, SHRT_MAX); } @@ -5780,7 +5780,7 @@ short status_calc_fix_aspd(struct block_list *bl, struct status_change *sc, int if (sc->data[SC_FIGHTINGSPIRIT] && sc->data[SC_FIGHTINGSPIRIT]->val2) aspd -= (bl->type==BL_PC?pc->checkskill((TBL_PC *)bl, RK_RUNEMASTERY):10) / 10 * 40; if (sc->data[SC_MTF_ASPD]) - aspd -= 10; + aspd -= sc->data[SC_MTF_ASPD]->val1; if (sc->data[SC_OVERED_BOOST]) // should be final and unmodifiable by any means aspd = (200 - sc->data[SC_OVERED_BOOST]->val3) * 10; -- cgit v1.2.3-60-g2f50 From c0afd048169aa9d66c739ac548df05ed498a0a34 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 14:41:23 +0800 Subject: Item Update: - Fix typo MOBID_GUARIDAN to MOBID_GUARDIAN - Added official item effect for Magic Candy. --- db/const.txt | 1 + db/re/item_db.conf | 15 +++++++++++---- db/sc_config.txt | 2 +- src/map/map.h | 4 ++-- src/map/skill.c | 6 ++++-- src/map/status.c | 43 +++++++++++++++++++++++++++++-------------- src/map/status.h | 1 + 7 files changed, 49 insertions(+), 23 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index 4837b3898..a77a612bf 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1345,6 +1345,7 @@ SC_BUCHEDENOEL 634 SC_PHI_DEMON 635 SC_PROMOTE_HEALTH_RESERCH 636 SC_ENERGY_DRINK_RESERCH 637 +SC_MAGIC_CANDY 638 e_gasp 0 e_what 1 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index c63e71bc5..b85203710 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -84462,18 +84462,23 @@ item_db: ( Id: 12596 AegisName: "Magic_Candy" Name: "Magic Candy" - Type: 11 + Type: 2 Buy: 0 Weight: 10 + Delay: 180000 Trade: { nodrop: true notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } + Script: <" + specialeffect2 EF_HASTEUP; + sc_start2 SC_MAGIC_CANDY, 60000, 30, 70; + "> }, { Id: 12597 @@ -116556,17 +116561,19 @@ item_db: ( Id: 16666 AegisName: "Magic_Candy_Box10" Name: "Magic Candy Box(10)" - Type: 2 + Type: 18 Buy: 20 + Weight: 10 Trade: { nodrop: true notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } + Script: <" getitem Magic_Candy, 10; "> }, { Id: 16673 diff --git a/db/sc_config.txt b/db/sc_config.txt index a521dd8ed..afc75b8e5 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -399,7 +399,7 @@ SC_LIGHT_OF_REGENE, 1 //SC_CBC, 2 //SC_CBC_POSTDELAY, 2 //SC_EQC, 2 -//SC_MAGIC_CANDY, 92 +SC_MAGIC_CANDY, 92 //SC_ALL_RIDING_REUSE_LIMIT, 1 //SC_HANDICAPSTATE_DEEP_SLEEP, 80 SC_MONSTER_TRANSFORM, 12 diff --git a/src/map/map.h b/src/map/map.h index 84af04f77..db03727f5 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -70,8 +70,8 @@ enum MOBID { MOBID_TREAS40 = 1363, MOBID_BARRICADE1 = 1905, MOBID_BARRICADE2, - MOBID_GUARIDAN_STONE1, - MOBID_GUARIDAN_STONE2, + MOBID_GUARDIAN_STONE1, + MOBID_GUARDIAN_STONE2, MOBID_FOOD_STOR, MOBID_BLUE_CRYST = 1914, MOBID_PINK_CRYST, diff --git a/src/map/skill.c b/src/map/skill.c index 9b06591f4..f82cdee71 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7623,7 +7623,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // Slim Pitcher case CR_SLIMPITCHER: // Updated to block Slim Pitcher from working on barricades and guardian stones. - if( dstmd && (dstmd->class_ == MOBID_EMPERIUM || (dstmd->class_ >= MOBID_BARRICADE1 && dstmd->class_ <= MOBID_GUARIDAN_STONE2)) ) + if( dstmd && (dstmd->class_ == MOBID_EMPERIUM || (dstmd->class_ >= MOBID_BARRICADE1 && dstmd->class_ <= MOBID_GUARDIAN_STONE2)) ) break; if (script->potion_hp || script->potion_sp) { int hp = script->potion_hp, sp = script->potion_sp; @@ -13667,7 +13667,7 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id case SR_CURSEDCIRCLE: if (map_flag_gvg2(sd->bl.m)) { if (map->foreachinrange(mob->count_sub, &sd->bl, skill->get_splash(skill_id, skill_lv), BL_MOB, - MOBID_EMPERIUM, MOBID_GUARIDAN_STONE1, MOBID_GUARIDAN_STONE2)) { + MOBID_EMPERIUM, MOBID_GUARDIAN_STONE1, MOBID_GUARDIAN_STONE2)) { char output[128]; sprintf(output, "You're too close to a stone or emperium to do this skill"); /* TODO official response? or message.conf it */ clif->messagecolor_self(sd->fd, COLOR_RED, output); @@ -14778,6 +14778,8 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 } if (sc->data[SC_FENRIR_CARD]) fixcast_r = max(fixcast_r, sc->data[SC_FENRIR_CARD]->val2); + if (sc->data[SC_MAGIC_CANDY]) + fixcast_r = max(fixcast_r, sc->data[SC_MAGIC_CANDY]->val2); // Fixed cast non percentage bonuses if( sc->data[SC_MANDRAGORA] ) diff --git a/src/map/status.c b/src/map/status.c index 9348307b3..108f3d72d 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -858,6 +858,7 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_STR_SCROLL] = SI_STR_SCROLL; status->dbs->IconChangeTable[SC_INT_SCROLL] = SI_INT_SCROLL; status->dbs->IconChangeTable[SC_STEAMPACK] = SI_STEAMPACK; + status->dbs->IconChangeTable[SC_MAGIC_CANDY] = SI_MAGIC_CANDY; // Eden Crystal Synthesis status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1; @@ -1055,6 +1056,7 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_STEAMPACK] |= SCB_BATK | SCB_ASPD | SCB_ALL; status->dbs->ChangeFlagTable[SC_BUCHEDENOEL] |= SCB_REGEN | SCB_HIT | SCB_CRI; status->dbs->ChangeFlagTable[SC_PHI_DEMON] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_MAGIC_CANDY] |= SCB_MATK | SCB_ALL; // Cash Items status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] |= SCB_STR; @@ -4890,16 +4892,16 @@ unsigned short status_calc_ematk(struct block_list *bl, struct status_change *sc return 0; #endif } -unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) -{ - if(!sc || !sc->count) +unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, int matk, bool viewable) { + + if (!sc || !sc->count) return cap_value(matk,0,USHRT_MAX); - if( !viewable ){ + if (!viewable) { /* some statuses that are hidden in the status window */ if (sc->data[SC_MINDBREAKER]) - matk += matk * sc->data[SC_MINDBREAKER]->val2/100; - return (unsigned short)cap_value(matk,0,USHRT_MAX); + matk += matk * sc->data[SC_MINDBREAKER]->val2 / 100; + return (unsigned short)cap_value(matk, 0, USHRT_MAX); } #ifndef RENEWAL @@ -4914,7 +4916,7 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, matk += sc->data[SC_AQUAPLAY_OPTION]->val2; if (sc->data[SC_CHILLY_AIR_OPTION]) matk += sc->data[SC_CHILLY_AIR_OPTION]->val2; - if(sc->data[SC_COOLER_OPTION]) + if (sc->data[SC_COOLER_OPTION]) matk += sc->data[SC_COOLER_OPTION]->val2; if (sc->data[SC_FIRE_INSIGNIA] && sc->data[SC_FIRE_INSIGNIA]->val1 == 3) matk += 50; @@ -4923,14 +4925,14 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, if (sc->data[SC_IZAYOI]) matk += 25 * sc->data[SC_IZAYOI]->val1; #endif - if( sc->data[SC_ZANGETSU] ) + if (sc->data[SC_ZANGETSU]) matk += sc->data[SC_ZANGETSU]->val3; if (sc->data[SC_MAGICPOWER] && sc->data[SC_MAGICPOWER]->val4) - matk += matk * sc->data[SC_MAGICPOWER]->val3/100; + matk += matk * sc->data[SC_MAGICPOWER]->val3 / 100; if (sc->data[SC_INCMATKRATE]) - matk += matk * sc->data[SC_INCMATKRATE]->val1/100; + matk += matk * sc->data[SC_INCMATKRATE]->val1 / 100; if (sc->data[SC_MOONLIT_SERENADE]) - matk += matk * sc->data[SC_MOONLIT_SERENADE]->val2/100; + matk += matk * sc->data[SC_MOONLIT_SERENADE]->val2 / 100; if (sc->data[SC_MTF_MATK]) matk += matk * sc->data[SC_MTF_MATK]->val1 / 100; if (sc->data[SC_MYSTICSCROLL]) @@ -4954,8 +4956,10 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, matk += matk * sc->data[SC_GM_BATTLE2]->val1 / 100; if (sc->data[SC_2011RWC]) matk += matk * sc->data[SC_2011RWC]->val2 / 100; + if (sc->data[SC_MAGIC_CANDY]) + matk += sc->data[SC_MAGIC_CANDY]->val1; - return (unsigned short)cap_value(matk,0,USHRT_MAX); + return (unsigned short)cap_value(matk, 0, USHRT_MAX); } signed short status_calc_critical(struct block_list *bl, struct status_change *sc, int critical, bool viewable) { @@ -9255,11 +9259,16 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t tick_time = 10000; sc_start(src, bl, SC_ENDURE, 100, 10, tick); // Endure effect break; + case SC_MAGIC_CANDY: // [Frost] + val3 = 90; // SP Consume. + val4 = tick / 10000; + tick_time = 10000; + break; case SC_PROMOTE_HEALTH_RESERCH: // Val1: 1 = Regular Potion, 2 = Thrown Potion // Val2: 1 = Small Potion, 2 = Medium Potion, 3 = Large Potion // Val3: MaxHP Increase By Fixed Amount - // Val4: MaxHP Heal Percentage + // Val4: HP Heal Percentage if (val1 == 1) // If potion was normally used, take the user's BaseLv. val3 = 1000 * val2 - 500 + status->get_lv(bl) * 10 / 3; else if (val1 == 2) // If potion was thrown at someone, take the thrower's BaseLv. @@ -9271,7 +9280,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t // Val1: 1 = Regular Potion, 2 = Thrown Potion // Val2: 1 = Small Potion, 2 = Medium Potion, 3 = Large Potion // Val3: MaxSP Increase By Fixed Amount - // Val4: MaxSP Heal Percentage + // Val4: SP Heal Percentage if (val1 == 1) // If potion was normally used, take the user's BaseLv. val3 = status->get_lv(bl) / 10 + 5 * val2 - 10; else if (val1 == 2) // If potion was thrown at someone, take the thrower's BaseLv. @@ -11589,6 +11598,12 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { sc_timer_next(10000 + tick, status->change_timer, bl->id, data); } break; + case SC_MAGIC_CANDY: + if (--(sce->val4) > 0) { + status->charge(bl, 0, sce->val3); // Reduce 100 SP every 10 seconds. + sc_timer_next(10000 + tick, status->change_timer, bl->id, data); + } + break; case SC_LEADERSHIP: case SC_GLORYWOUNDS: case SC_SOULCOLD: diff --git a/src/map/status.h b/src/map/status.h index e1585aabd..dfc914849 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -821,6 +821,7 @@ typedef enum sc_type { SC_PHI_DEMON, SC_PROMOTE_HEALTH_RESERCH, SC_ENERGY_DRINK_RESERCH, + SC_MAGIC_CANDY, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -- cgit v1.2.3-60-g2f50 From 248f245f078ddba531cf771dcd42ad9e0bd0f7c7 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 15:27:20 +0800 Subject: Item Update: - Added official effect for Rapid Life Water. - Added new items: - Fruit Salad (http://www.divine-pride.net/database/item/11715) - Shepherd Salad (http://www.divine-pride.net/database/item/11716) - Yogurt (http://www.divine-pride.net/database/item/11717) - Bisket Dessert (http://www.divine-pride.net/database/item/11718) --- db/const.txt | 2 + db/pre-re/item_db.conf | 44 ++++++++++---------- db/re/item_db.conf | 109 ++++++++++++++++++++++++++++++++++++++----------- db/sc_config.txt | 3 +- src/map/skill.c | 2 +- src/map/status.c | 20 ++++++--- src/map/status.h | 2 + 7 files changed, 128 insertions(+), 54 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index a77a612bf..98883e9cc 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1346,6 +1346,8 @@ SC_PHI_DEMON 635 SC_PROMOTE_HEALTH_RESERCH 636 SC_ENERGY_DRINK_RESERCH 637 SC_MAGIC_CANDY 638 +SC_M_LIFEPOTION 639 +SC_G_LIFEPOTION 640 e_gasp 0 e_what 1 diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index d5ccd7e97..8d4c99379 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -87070,13 +87070,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_HEAL3; - sc_start4 SC_S_LIFEPOTION,600000,-5,5,0,0; + sc_start2 SC_S_LIFEPOTION, 600000, -5, 5; "> }, { @@ -87091,13 +87091,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_HEAL3; - sc_start4 SC_L_LIFEPOTION,600000,-7,4,0,0; + sc_start2 SC_L_LIFEPOTION, 600000, -7, 4; "> }, { @@ -87112,13 +87112,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_MAGICALATTHIT; - sc_start SC_CRITICALPERCENT,300000,30; + sc_start SC_CRITICALPERCENT, 300000, 30; "> }, { @@ -87133,13 +87133,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_LIGHTSPHERE; - sc_start SC_HEALPLUS,1800000,20; + sc_start SC_HEALPLUS, 1800000, 20; "> }, { @@ -87155,13 +87155,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_STEAL; - sc_start SC_PLUSAVOIDVALUE,60000,20; + sc_start SC_PLUSAVOIDVALUE, 60000, 20; "> }, { @@ -87176,13 +87176,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } 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; "> }, { @@ -87197,13 +87197,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } 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; "> }, { @@ -87218,13 +87218,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_GUARD; - sc_start SC_PROTECT_DEF,60000,3; + sc_start SC_PROTECT_DEF, 60000, 3; "> }, { @@ -87239,13 +87239,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_GUARD; - sc_start SC_PROTECT_DEF,180000,3; + sc_start SC_PROTECT_DEF, 180000, 3; "> }, { @@ -87260,13 +87260,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_PROTECT_MDEF,60000,3; + sc_start SC_PROTECT_MDEF, 60000, 3; "> }, { @@ -87281,13 +87281,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_PROTECT_MDEF,180000,3; + sc_start SC_PROTECT_MDEF, 180000, 3; "> }, { diff --git a/db/re/item_db.conf b/db/re/item_db.conf index b85203710..56eb0e27b 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -76625,6 +76625,63 @@ item_db: ( Weight: 30 Script: <" itemheal rand(40,45),0; "> }, +{ + Id: 11715 + AegisName: "Fruit_Salad" + Name: "Fruit Salad" + Type: 0 + Buy: 0 + Weight: 10 + Script: <" + specialeffect2 EF_SPELLBREAKER; + sc_start SC_TARGET_ASPD, 180000, 10; + "> +}, +{ + Id: 11716 + AegisName: "Shepherd_Salad" + Name: "Shepherd Salad" + Type: 0 + Buy: 0 + Weight: 10 + Script: <" + specialeffect2 EF_LIGHTSPHERE; + sc_start SC_HEALPLUS, 180000, 20; + "> +}, +{ + Id: 11717 + AegisName: "Yogurt" + Name: "Yogurt" + Type: 0 + Buy: 0 + Weight: 140 + Script: <" + specialeffect2 EF_HEAL3; + sc_start2 SC_ATKER_MOVESPEED, 180000, 5, 10; + "> +}, +{ + Id: 11718 + AegisName: "Sushi_Kebab" + Name: "Sushi Kebab" + Type: 0 + Buy: 0 + Weight: 60 + Script: <" + specialeffect2 EF_HEAL3; + sc_start2 SC_M_LIFEPOTION, 180000, -4, 4; + "> +}, +{ + Id: 11719 + AegisName: "Bisket_Dessert" + Name: "Bisket Dessert" + Type: 0 + Buy: 0 + Weight: 200 + Script: <" sc_start SC_CASH_PLUSEXP, 1800000, 100;"> +}, { Id: 12000 AegisName: "Cold_Scroll_2_5" @@ -80268,7 +80325,7 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start2 SC_ATKER_ASPD,3600000,5,10; "> + Script: <" sc_start2 SC_ATKER_ASPD, 3600000, 5, 10; "> }, { Id: 12275 @@ -80287,7 +80344,7 @@ item_db: ( noauction: true nogstorage: true } - Script: <" sc_start2 SC_ATKER_MOVESPEED,3600000,5,10; "> + Script: <" sc_start2 SC_ATKER_MOVESPEED, 3600000, 5, 10; "> }, { Id: 12276 @@ -80647,7 +80704,7 @@ item_db: ( } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_ATKER_BLOOD,3600000,15; + sc_start SC_ATKER_BLOOD, 3600000, 15; "> }, { @@ -80669,7 +80726,7 @@ item_db: ( } Script: <" specialeffect2 EF_GUARD; - sc_start SC_TARGET_BLOOD,3600000,10; + sc_start SC_TARGET_BLOOD, 3600000, 10; "> }, { @@ -84252,10 +84309,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } + Script: <" + specialeffect2 EF_HEAL; + sc_start2 SC_G_LIFEPOTION, 600000, -6, 3; + "> }, { Id: 12579 @@ -110922,13 +110983,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_HEAL3; - sc_start4 SC_S_LIFEPOTION,600000,-5,5,0,0; + sc_start2 SC_S_LIFEPOTION, 600000, -5, 5; "> }, { @@ -110943,13 +111004,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_HEAL3; - sc_start4 SC_L_LIFEPOTION,600000,-7,4,0,0; + sc_start2 SC_L_LIFEPOTION, 600000, -7, 4; "> }, { @@ -110964,13 +111025,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_MAGICALATTHIT; - sc_start SC_CRITICALPERCENT,300000,30; + sc_start SC_CRITICALPERCENT, 300000, 30; "> }, { @@ -110985,13 +111046,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_LIGHTSPHERE; - sc_start SC_HEALPLUS,1800000,20; + sc_start SC_HEALPLUS, 1800000, 20; "> }, { @@ -111007,13 +111068,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_STEAL; - sc_start SC_PLUSAVOIDVALUE,60000,20; + sc_start SC_PLUSAVOIDVALUE, 60000, 20; "> }, { @@ -111070,13 +111131,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_GUARD; - sc_start SC_PROTECT_DEF,60000,3; + sc_start SC_PROTECT_DEF, 60000, 3; "> }, { @@ -111091,13 +111152,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_GUARD; - sc_start SC_PROTECT_DEF,180000,3; + sc_start SC_PROTECT_DEF, 180000, 3; "> }, { @@ -111112,13 +111173,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_PROTECT_MDEF,60000,3; + sc_start SC_PROTECT_MDEF, 60000, 3; "> }, { @@ -111133,13 +111194,13 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_PROTECT_MDEF,180000,3; + sc_start SC_PROTECT_MDEF, 180000, 3; "> }, { @@ -112235,7 +112296,7 @@ item_db: ( } Script: <" specialeffect2 EF_SPELLBREAKER; - sc_start SC_TARGET_ASPD,1800000,10; + sc_start SC_TARGET_ASPD, 1800000, 10; "> }, { diff --git a/db/sc_config.txt b/db/sc_config.txt index afc75b8e5..ac65a6677 100644 --- a/db/sc_config.txt +++ b/db/sc_config.txt @@ -388,7 +388,7 @@ SC_MORA_BUFF, 2 //SC_REUSE_LIMIT_H, 29 SC_NEEDLE_OF_PARALYZE, 1 SC_PAIN_KILLER, 1 -//SC_G_LIFEPOTION, 68 +SC_G_LIFEPOTION, 68 //SC_VITALIZE_POTION, 4 SC_LIGHT_OF_REGENE, 1 //SC_SONIC_CLAW_POSTDELAY, 2 @@ -434,6 +434,7 @@ SC_GEFFEN_MAGIC2, 14 SC_GEFFEN_MAGIC3, 14 SC_OVERLAPEXPUP, 12 +SC_M_LIFEPOTION, 68 // Guild Auras should not be saved SC_LEADERSHIP,78 diff --git a/src/map/skill.c b/src/map/skill.c index f82cdee71..f870524fa 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7623,7 +7623,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin // Slim Pitcher case CR_SLIMPITCHER: // Updated to block Slim Pitcher from working on barricades and guardian stones. - if( dstmd && (dstmd->class_ == MOBID_EMPERIUM || (dstmd->class_ >= MOBID_BARRICADE1 && dstmd->class_ <= MOBID_GUARDIAN_STONE2)) ) + if (dstmd && (dstmd->class_ == MOBID_EMPERIUM || (dstmd->class_ >= MOBID_BARRICADE1 && dstmd->class_ <= MOBID_GUARDIAN_STONE2))) break; if (script->potion_hp || script->potion_sp) { int hp = script->potion_hp, sp = script->potion_sp; diff --git a/src/map/status.c b/src/map/status.c index 108f3d72d..5c2d1d2f5 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -859,6 +859,8 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_INT_SCROLL] = SI_INT_SCROLL; status->dbs->IconChangeTable[SC_STEAMPACK] = SI_STEAMPACK; status->dbs->IconChangeTable[SC_MAGIC_CANDY] = SI_MAGIC_CANDY; + status->dbs->IconChangeTable[SC_M_LIFEPOTION] = SI_M_LIFEPOTION; + status->dbs->IconChangeTable[SC_G_LIFEPOTION] = SI_G_LIFEPOTION; // Eden Crystal Synthesis status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1; @@ -7751,6 +7753,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t break; case SC_S_LIFEPOTION: case SC_L_LIFEPOTION: + case SC_M_LIFEPOTION: + case SC_G_LIFEPOTION: case SC_CASH_BOSS_ALARM: case SC_STUN: case SC_SLEEP: @@ -8135,12 +8139,14 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t break; case SC_S_LIFEPOTION: case SC_L_LIFEPOTION: - if( val1 == 0 ) return 0; + case SC_M_LIFEPOTION: + case SC_G_LIFEPOTION: + if (val1 == 0) return 0; // val1 = heal percent/amout // val2 = seconds between heals // val4 = total of heals - if( val2 < 1 ) val2 = 1; - if( (val4 = tick/(val2 * 1000)) < 1 ) + if (val2 < 1) val2 = 1; + if ((val4 = tick / (val2 * 1000)) < 1) val4 = 1; tick_time = val2 * 1000; // [GodLesZ] tick time break; @@ -10982,10 +10988,12 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { case SC_S_LIFEPOTION: case SC_L_LIFEPOTION: - if( sd && --(sce->val4) >= 0 ) { + case SC_M_LIFEPOTION: + case SC_G_LIFEPOTION: + if (sd && --(sce->val4) >= 0) { // val1 < 0 = per max% | val1 > 0 = exact amount int hp = 0; - if( st->hp < st->max_hp ) + if (st->hp < st->max_hp) hp = (sce->val1 < 0) ? (int)(sd->status.max_hp * -1 * sce->val1 / 100.) : sce->val1 ; status->heal(bl, hp, 0, 2); sc_timer_next((sce->val2 * 1000) + tick, status->change_timer, bl->id, data); @@ -11600,7 +11608,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { break; case SC_MAGIC_CANDY: if (--(sce->val4) > 0) { - status->charge(bl, 0, sce->val3); // Reduce 100 SP every 10 seconds. + status->charge(bl, 0, sce->val3); // Reduce 90 SP every 10 seconds. sc_timer_next(10000 + tick, status->change_timer, bl->id, data); } break; diff --git a/src/map/status.h b/src/map/status.h index dfc914849..b5597dd45 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -822,6 +822,8 @@ typedef enum sc_type { SC_PROMOTE_HEALTH_RESERCH, SC_ENERGY_DRINK_RESERCH, SC_MAGIC_CANDY, + SC_M_LIFEPOTION, + SC_G_LIFEPOTION, // 640 SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -- cgit v1.2.3-60-g2f50 From b4a5a9fc744074ff46a58b5fccfe4a218577385f Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 18:05:19 +0800 Subject: Item Update: - Added official item effect for Mystic Powder. - Added Mystic Powder Box30 - Added effect for WOB_Amatsu - Added Songpyun_Box50 - White space adjustments --- db/const.txt | 1 + db/pre-re/item_db.conf | 14 ++--- db/re/item_db.conf | 69 +++++++++++++++++---- src/map/status.c | 160 +++++++++++++++++++++++++------------------------ src/map/status.h | 1 + 5 files changed, 151 insertions(+), 94 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index 98883e9cc..cca14517f 100644 --- a/db/const.txt +++ b/db/const.txt @@ -1348,6 +1348,7 @@ SC_ENERGY_DRINK_RESERCH 637 SC_MAGIC_CANDY 638 SC_M_LIFEPOTION 639 SC_G_LIFEPOTION 640 +SC_MYSTICPOWDER 641 e_gasp 0 e_what 1 diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 8d4c99379..e836d55fe 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -69972,10 +69972,10 @@ item_db: ( noauction: true } Script: <" - getitem Red_Slim_Potion,100; - getitem Yellow_Slim_Potion,100; - getitem White_Slim_Potion,100; - getitem Blue_Potion,100; + getitem Red_Slim_Potion, 100; + getitem Yellow_Slim_Potion, 100; + getitem White_Slim_Potion, 100; + getitem Blue_Potion, 100; "> }, { @@ -69986,9 +69986,9 @@ item_db: ( Buy: 0 Weight: 10 Script: <" - if(getskilllv(HT_FALCON)) { - if(checkoption(Option_Wug) || checkoption(Option_Wugrider)) end; - if(checkfalcon() == 1) { + if (getskilllv(HT_FALCON)) { + if (checkoption(Option_Wug) || checkoption(Option_Wugrider)) end; + if (checkfalcon() == 1) { setfalcon 0; } else { diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 56eb0e27b..d0339ef46 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -86889,6 +86889,27 @@ item_db: ( Weight: 10 Script: <" mercenary_create MER_EDDGA, 1800000; "> }, +{ + Id: 12805 + AegisName: "Mystic_Powder" + Name: "Mystic Powder" + Type: 2 + Buy: 20 + Weight: 10 + Trade: { + nodrop: true + notrade: true + noselltonpc: true + nocart: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" + specialeffect2 EF_WIND; + sc_start2 SC_MYSTICPOWDER, 300000, 20, 10; + "> +}, { Id: 12806 AegisName: "Antler_Scaraba_Scroll" @@ -87035,6 +87056,15 @@ item_db: ( Weight: 10 Script: <" mercenary_create MER_LOLI_RURI, 1800000; "> }, +{ + Id: 12822 + AegisName: "Sungpyun_Box50" + Name: "Korea Rice Cake 50 Box" + Type: 18 + Buy: 20 + Weight: 10 + Script: <" getitem Korea_Rice_Cake, 50; "> +}, { Id: 12823 AegisName: "Sedora_Scroll" @@ -87065,30 +87095,31 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" - getitem Red_Slim_Potion,100; - getitem Yellow_Slim_Potion,100; - getitem White_Slim_Potion,100; - getitem Blue_Potion,100; + getitem Red_Slim_Potion, 100; + getitem Yellow_Slim_Potion, 100; + getitem White_Slim_Potion, 100; + getitem Blue_Potion, 100; "> }, { Id: 12845 - AegisName: "Amatsu_Butterfly_Wing" + AegisName: "WOB_Amatsu" Name: "Amatsu Butterfly Wing" Trade: { nodrop: true notrade: true nocart: true nostorage: true - nogstorage: true nomail: true noauction: true + nogstorage: true } + Script: <" warp "iz_ng01",26,57; "> }, { Id: 12846 @@ -87126,9 +87157,9 @@ item_db: ( Type: 11 Buy: 0 Script: <" - if(getskilllv(HT_FALCON)) { - if(checkoption(Option_Wug) || checkoption(Option_Wugrider)) end; - if(checkfalcon() == 1) { + if (getskilllv(HT_FALCON)) { + if (checkoption(Option_Wug) || checkoption(Option_Wugrider)) end; + if (checkfalcon() == 1) { setfalcon 0; } else { @@ -118671,6 +118702,24 @@ item_db: ( Buy: 20 Weight: 10 }, +{ + Id: 17163 + AegisName: "Mystic_Powder_Box30" + Name: "Mystic Powder Box(30)" + Type: 18 + Buy: 20 + Weight: 10 + Trade: { + nodrop: true + notrade: true + noselltonpc: true + nocart: true + nomail: true + noauction: true + nogstorage: true + } + Script: <" getitem Mystic_Powder, 30; "> +}, { Id: 17165 AegisName: "Challenge_Kit" diff --git a/src/map/status.c b/src/map/status.c index b154c0283..d7a216c97 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -861,6 +861,7 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_MAGIC_CANDY] = SI_MAGIC_CANDY; status->dbs->IconChangeTable[SC_M_LIFEPOTION] = SI_M_LIFEPOTION; status->dbs->IconChangeTable[SC_G_LIFEPOTION] = SI_G_LIFEPOTION; + status->dbs->IconChangeTable[SC_MYSTICPOWDER] = SI_MYSTICPOWDER; // Eden Crystal Synthesis status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1; @@ -1059,6 +1060,7 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_BUCHEDENOEL] |= SCB_REGEN | SCB_HIT | SCB_CRI; status->dbs->ChangeFlagTable[SC_PHI_DEMON] |= SCB_ALL; status->dbs->ChangeFlagTable[SC_MAGIC_CANDY] |= SCB_MATK | SCB_ALL; + status->dbs->ChangeFlagTable[SC_MYSTICPOWDER] |= SCB_FLEE | SCB_LUK; // Cash Items status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] |= SCB_STR; @@ -4630,55 +4632,57 @@ unsigned short status_calc_dex(struct block_list *bl, struct status_change *sc, return (unsigned short)cap_value(dex,0,USHRT_MAX); } -unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) -{ - if(!sc || !sc->count) - return cap_value(luk,0,USHRT_MAX); +unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc, int luk) { - if(sc->data[SC_FULL_THROTTLE]) + if (!sc || !sc->count) + return cap_value(luk, 0, USHRT_MAX); + + if (sc->data[SC_FULL_THROTTLE]) luk += luk * 20 / 100; - if(sc->data[SC_HARMONIZE]) { + if (sc->data[SC_HARMONIZE]) { luk -= sc->data[SC_HARMONIZE]->val2; - return (unsigned short)cap_value(luk,0,USHRT_MAX); + return (unsigned short)cap_value(luk, 0, USHRT_MAX); } - if(sc->data[SC_CURSE]) + if (sc->data[SC_CURSE]) return 0; - if(sc->data[SC_INCALLSTATUS]) + if (sc->data[SC_INCALLSTATUS]) luk += sc->data[SC_INCALLSTATUS]->val1; - if(sc->data[SC_INCLUK]) + if (sc->data[SC_INCLUK]) luk += sc->data[SC_INCLUK]->val1; - if(sc->data[SC_FOOD_LUK]) + if (sc->data[SC_FOOD_LUK]) luk += sc->data[SC_FOOD_LUK]->val1; - if(sc->data[SC_FOOD_LUK_CASH]) + if (sc->data[SC_FOOD_LUK_CASH]) luk += sc->data[SC_FOOD_LUK_CASH]->val1; - if(sc->data[SC_TRUESIGHT]) + if (sc->data[SC_TRUESIGHT]) luk += 5; - if(sc->data[SC_GLORIA]) + if (sc->data[SC_GLORIA]) luk += 30; - if(sc->data[SC_MARIONETTE_MASTER]) + if (sc->data[SC_MARIONETTE_MASTER]) luk -= sc->data[SC_MARIONETTE_MASTER]->val4&0xFF; - if(sc->data[SC_MARIONETTE]) + if (sc->data[SC_MARIONETTE]) luk += sc->data[SC_MARIONETTE]->val4&0xFF; - if(sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) + if (sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_HIGH) luk += sc->data[SC_SOULLINK]->val4&0xFF; - if(sc->data[SC_PUTTI_TAILS_NOODLES]) + if (sc->data[SC_PUTTI_TAILS_NOODLES]) luk += sc->data[SC_PUTTI_TAILS_NOODLES]->val1; - if(sc->data[SC_INSPIRATION]) + if (sc->data[SC_INSPIRATION]) luk += sc->data[SC_INSPIRATION]->val3; - if(sc->data[SC_STOMACHACHE]) + if (sc->data[SC_STOMACHACHE]) luk -= sc->data[SC_STOMACHACHE]->val1; - if(sc->data[SC_KYOUGAKU]) + if (sc->data[SC_KYOUGAKU]) luk -= sc->data[SC_KYOUGAKU]->val3; - if(sc->data[SC_LAUDARAMUS]) + if (sc->data[SC_LAUDARAMUS]) luk += 4 + sc->data[SC_LAUDARAMUS]->val1; - if(sc->data[SC__STRIPACCESSARY] && bl->type != BL_PC) + if (sc->data[SC__STRIPACCESSARY] && bl->type != BL_PC) luk -= luk * sc->data[SC__STRIPACCESSARY]->val2 / 100; - if(sc->data[SC_BANANA_BOMB]) + if (sc->data[SC_BANANA_BOMB]) luk -= luk * sc->data[SC_BANANA_BOMB]->val1 / 100; if (sc->data[SC_2011RWC]) luk += sc->data[SC_2011RWC]->val1; + if (sc->data[SC_MYSTICPOWDER]) + luk += sc->data[SC_MYSTICPOWDER]->val2; - return (unsigned short)cap_value(luk,0,USHRT_MAX); + return (unsigned short)cap_value(luk, 0, USHRT_MAX); } unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, int batk, bool viewable) { @@ -5061,96 +5065,98 @@ signed short status_calc_hit(struct block_list *bl, struct status_change *sc, in } signed short status_calc_flee(struct block_list *bl, struct status_change *sc, int flee, bool viewable) { - if( bl->type == BL_PC ) { - if( map_flag_gvg2(bl->m) ) - flee -= flee * battle_config.gvg_flee_penalty/100; + + if (bl->type == BL_PC) { + if (map_flag_gvg2(bl->m)) + flee -= flee * battle_config.gvg_flee_penalty / 100; else if( map->list[bl->m].flag.battleground ) - flee -= flee * battle_config.bg_flee_penalty/100; + flee -= flee * battle_config.bg_flee_penalty / 100; } - if(!sc || !sc->count) - return cap_value(flee,1,SHRT_MAX); + if (!sc || !sc->count) + return cap_value(flee, 1, SHRT_MAX); - if( !viewable ){ + if (!viewable) { /* some statuses that are hidden in the status window */ - return (short)cap_value(flee,1,SHRT_MAX); + return (short)cap_value(flee, 1, SHRT_MAX); } - if(sc->data[SC_INCFLEE]) + if (sc->data[SC_INCFLEE]) flee += sc->data[SC_INCFLEE]->val1; - if(sc->data[SC_MTF_HITFLEE]) + if (sc->data[SC_MTF_HITFLEE]) flee += sc->data[SC_MTF_HITFLEE]->val2; - if(sc->data[SC_FOOD_BASICAVOIDANCE]) + if (sc->data[SC_FOOD_BASICAVOIDANCE]) flee += sc->data[SC_FOOD_BASICAVOIDANCE]->val1; - if(sc->data[SC_WHISTLE]) + if (sc->data[SC_WHISTLE]) flee += sc->data[SC_WHISTLE]->val2; - if(sc->data[SC_WINDWALK]) + if (sc->data[SC_WINDWALK]) flee += sc->data[SC_WINDWALK]->val2; - if(sc->data[SC_VIOLENTGALE]) + if (sc->data[SC_VIOLENTGALE]) flee += sc->data[SC_VIOLENTGALE]->val2; - if(sc->data[SC_MOON_COMFORT]) //SG skill [Komurka] + if (sc->data[SC_MOON_COMFORT]) // SG skill [Komurka] flee += sc->data[SC_MOON_COMFORT]->val2; - if(sc->data[SC_RG_CCONFINE_M]) + if (sc->data[SC_RG_CCONFINE_M]) flee += 10; if (sc->data[SC_ANGRIFFS_MODUS]) flee -= sc->data[SC_ANGRIFFS_MODUS]->val3; - if(sc->data[SC_GS_ADJUSTMENT]) + if (sc->data[SC_GS_ADJUSTMENT]) flee += 30; - if(sc->data[SC_HLIF_SPEED]) + if (sc->data[SC_HLIF_SPEED]) flee += 10 + sc->data[SC_HLIF_SPEED]->val1 * 10; - if(sc->data[SC_GS_GATLINGFEVER]) + if (sc->data[SC_GS_GATLINGFEVER]) flee -= sc->data[SC_GS_GATLINGFEVER]->val4; - if(sc->data[SC_PARTYFLEE]) + if (sc->data[SC_PARTYFLEE]) flee += sc->data[SC_PARTYFLEE]->val1 * 10; - if(sc->data[SC_MER_FLEE]) + if (sc->data[SC_MER_FLEE]) flee += sc->data[SC_MER_FLEE]->val2; - if( sc->data[SC_HALLUCINATIONWALK] ) + if (sc->data[SC_HALLUCINATIONWALK]) flee += sc->data[SC_HALLUCINATIONWALK]->val2; - if( sc->data[SC_WATER_BARRIER] ) + if (sc->data[SC_WATER_BARRIER]) flee -= sc->data[SC_WATER_BARRIER]->val3; #ifdef RENEWAL - if( sc->data[SC_SPEARQUICKEN] ) - flee += 2 * sc->data[SC_SPEARQUICKEN]->val1; + if (sc->data[SC_SPEARQUICKEN]) + flee += sc->data[SC_SPEARQUICKEN]->val1 * 2; #endif - - if(sc->data[SC_INCFLEERATE]) - flee += flee * sc->data[SC_INCFLEERATE]->val1/100; - if(sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1) - flee -= flee * 50/100; + if (sc->data[SC_INCFLEERATE]) + flee += flee * sc->data[SC_INCFLEERATE]->val1 / 100; + if (sc->data[SC_SPIDERWEB] && sc->data[SC_SPIDERWEB]->val1) + flee -= flee * 50 / 100; if (sc->data[SC_BERSERK]) - flee -= flee * 50/100; - if(sc->data[SC_BLIND]) - flee -= flee * 25/100; - if(sc->data[SC_FEAR]) + flee -= flee * 50 / 100; + if (sc->data[SC_BLIND]) + flee -= flee * 25 / 100; + if (sc->data[SC_FEAR]) flee -= flee * 20 / 100; - if(sc->data[SC_PARALYSE]) + if (sc->data[SC_PARALYSE]) flee -= flee / 10; // 10% Flee reduction - if(sc->data[SC_INFRAREDSCAN]) + if (sc->data[SC_INFRAREDSCAN]) flee -= flee * 30 / 100; - if( sc->data[SC__LAZINESS] ) + if (sc->data[SC__LAZINESS]) flee -= flee * sc->data[SC__LAZINESS]->val3 / 100; - if( sc->data[SC_GLOOMYDAY] ) + if (sc->data[SC_GLOOMYDAY]) flee -= flee * ( 20 + 5 * sc->data[SC_GLOOMYDAY]->val1 ) / 100; - if( sc->data[SC_SATURDAY_NIGHT_FEVER] ) + if (sc->data[SC_SATURDAY_NIGHT_FEVER]) flee -= flee * (40 + 10 * sc->data[SC_SATURDAY_NIGHT_FEVER]->val1) / 100; - if ( sc->data[SC_FIRE_EXPANSION_SMOKE_POWDER] ) + if (sc->data[SC_FIRE_EXPANSION_SMOKE_POWDER]) flee += flee * 20 / 100; - if ( sc->data[SC_FIRE_EXPANSION_TEAR_GAS] ) + if (sc->data[SC_FIRE_EXPANSION_TEAR_GAS]) flee -= flee * 50 / 100; - if( sc->data[SC_WIND_STEP_OPTION] ) + if (sc->data[SC_WIND_STEP_OPTION]) flee += flee * sc->data[SC_WIND_STEP_OPTION]->val2 / 100; - if( sc->data[SC_ZEPHYR] ) + if (sc->data[SC_ZEPHYR]) flee += sc->data[SC_ZEPHYR]->val2; - if(sc->data[SC_VOLCANIC_ASH] && (bl->type==BL_MOB)){ //mob - if(status_get_element(bl) == ELE_WATER) //water type + if (sc->data[SC_VOLCANIC_ASH] && (bl->type == BL_MOB)) { // mob + if(status_get_element(bl) == ELE_WATER) // water type flee /= 2; } - if( sc->data[SC_OVERED_BOOST] ) // should be final and unmodifiable by any means + if (sc->data[SC_OVERED_BOOST]) // should be final and unmodifiable by any means flee = sc->data[SC_OVERED_BOOST]->val2; if (sc->data[SC_ARMORSCROLL]) flee += sc->data[SC_ARMORSCROLL]->val2; + if (sc->data[SC_MYSTICPOWDER]) + flee += sc->data[SC_MYSTICPOWDER]->val2; - return (short)cap_value(flee,1,SHRT_MAX); + return (short)cap_value(flee, 1, SHRT_MAX); } signed short status_calc_flee2(struct block_list *bl, struct status_change *sc, int flee2, bool viewable) @@ -5955,8 +5961,8 @@ unsigned short status_calc_dmotion(struct block_list *bl, struct status_change * return (unsigned short)cap_value(dmotion,0,USHRT_MAX); } -unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) -{ +unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, uint64 maxhp) { + if (!sc || !sc->count) return (unsigned int)cap_value(maxhp, 1, UINT_MAX); @@ -5975,7 +5981,7 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, if (sc->data[SC_MARIONETTE_MASTER]) maxhp -= 1000; if (sc->data[SC_SOLID_SKIN_OPTION]) - maxhp += 2000;// Fix amount. + maxhp += 2000; // Fix amount. if (sc->data[SC_POWER_OF_GAIA]) maxhp += 3000; if (sc->data[SC_EARTH_INSIGNIA] && sc->data[SC_EARTH_INSIGNIA]->val1 == 2) @@ -6034,8 +6040,8 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, return (unsigned int)cap_value(maxhp, 1, UINT_MAX); } -unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) -{ +unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, unsigned int maxsp) { + if (!sc || !sc->count) return cap_value(maxsp, 1, UINT_MAX); diff --git a/src/map/status.h b/src/map/status.h index b5597dd45..5996e8c2e 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -824,6 +824,7 @@ typedef enum sc_type { SC_MAGIC_CANDY, SC_M_LIFEPOTION, SC_G_LIFEPOTION, // 640 + SC_MYSTICPOWDER, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; -- cgit v1.2.3-60-g2f50 From b0326af6dad68fa89f49df5748fcbd04973f7676 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Wed, 23 Dec 2015 23:40:14 +0800 Subject: PetDB Update: - Change PetID's to Constants - On Official Servers, if you don't have Pet Eggs in your inventory, if you use Pet Incubator item, the Pet Entry list will not show. --- db/pre-re/item_db.conf | 152 +++++++++++++++++------------------ db/re/item_db.conf | 214 +++++++++++++++++++++++++++---------------------- src/map/clif.c | 27 ++++--- 3 files changed, 207 insertions(+), 186 deletions(-) (limited to 'db') diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index e836d55fe..7b9c30839 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -1311,7 +1311,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1002; "> + Script: <" pet PORING; "> }, { Id: 620 @@ -1324,7 +1324,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1113; "> + Script: <" pet DROPS; "> }, { Id: 621 @@ -1337,7 +1337,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1031; "> + Script: <" pet POPORING; "> }, { Id: 622 @@ -1350,7 +1350,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1063; "> + Script: <" pet LUNATIC; "> }, { Id: 623 @@ -1363,7 +1363,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1049; "> + Script: <" pet PICKY; "> }, { Id: 624 @@ -1376,7 +1376,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1011; "> + Script: <" pet CHONCHON; "> }, { Id: 625 @@ -1389,7 +1389,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1042; "> + Script: <" pet STEEL_CHONCHON; "> }, { Id: 626 @@ -1402,7 +1402,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1035; "> + Script: <" pet HUNTER_FLY; "> }, { Id: 627 @@ -1415,7 +1415,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1167; "> + Script: <" pet SAVAGE_BABE; "> }, { Id: 628 @@ -1428,7 +1428,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1107; "> + Script: <" pet DESERT_WOLF_B; "> }, { Id: 629 @@ -1441,7 +1441,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1052; "> + Script: <" pet ROCKER; "> }, { Id: 630 @@ -1454,7 +1454,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1014; "> + Script: <" pet SPORE; "> }, { Id: 631 @@ -1467,7 +1467,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1077; "> + Script: <" pet POISON_SPORE; "> }, { Id: 632 @@ -1480,7 +1480,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1019; "> + Script: <" pet PECOPECO; "> }, { Id: 633 @@ -1493,7 +1493,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1056; "> + Script: <" pet SMOKIE; "> }, { Id: 634 @@ -1506,7 +1506,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1057; "> + Script: <" pet YOYO; "> }, { Id: 635 @@ -1519,7 +1519,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1023; "> + Script: <" pet ORK_WARRIOR; "> }, { Id: 636 @@ -1532,7 +1532,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1026; "> + Script: <" pet MUNAK; "> }, { Id: 637 @@ -1545,7 +1545,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1110; "> + Script: <" pet DOKEBI; "> }, { Id: 638 @@ -1558,7 +1558,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1170; "> + Script: <" pet SOHEE; "> }, { Id: 639 @@ -1571,7 +1571,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1029; "> + Script: <" pet ISIS; "> }, { Id: 640 @@ -1584,7 +1584,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1155; "> + Script: <" pet PETIT; "> }, { Id: 641 @@ -1597,7 +1597,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1109; "> + Script: <" pet DEVIRUCHI; "> }, { Id: 642 @@ -1610,7 +1610,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1101; "> + Script: <" pet BAPHOMET_; "> }, { Id: 643 @@ -1687,7 +1687,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1188; "> + Script: <" pet BON_GUN; "> }, { Id: 660 @@ -1700,7 +1700,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1200; "> + Script: <" pet ZHERLTHSH; "> }, { Id: 661 @@ -1713,7 +1713,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1275; "> + Script: <" pet ALICE; "> }, { Id: 662 @@ -64474,7 +64474,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1245; "> + Script: <" pet GOBLIN_XMAS; "> }, { Id: 12226 @@ -66139,16 +66139,16 @@ item_db: ( Trade: { nodrop: true notrade: true - nocart: true nostorage: true - nogstorage: true + nocart: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1815; "> + Script: <" pet EVENT_RICECAKE; "> }, { Id: 12341 @@ -66422,7 +66422,7 @@ item_db: ( Type: 2 Buy: 20 Weight: 50 - Script: <" pet 1630; "> + Script: <" pet BACSOJIN_; "> }, { Id: 12358 @@ -66435,7 +66435,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1513; "> + Script: <" pet CIVIL_SERVANT; "> }, { Id: 12359 @@ -66448,7 +66448,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1586; "> + Script: <" pet LEAF_CAT; "> }, { Id: 12360 @@ -66461,7 +66461,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1505; "> + Script: <" pet LOLI_RURI; "> }, { Id: 12361 @@ -66472,17 +66472,17 @@ item_db: ( Trade: { nodrop: true notrade: true + nostorage: true noselltonpc: true nocart: true - nostorage: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1143; "> + Script: <" pet MARIONETTE; "> }, { Id: 12362 @@ -66495,7 +66495,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1401; "> + Script: <" pet SHINOBI; "> }, { Id: 12363 @@ -66506,17 +66506,17 @@ item_db: ( Trade: { nodrop: true notrade: true + nostorage: true noselltonpc: true nocart: true - nostorage: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1179; "> + Script: <" pet WHISPER; "> }, { Id: 12364 @@ -66529,7 +66529,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1299; "> + Script: <" pet GOBLIN_LEADER; "> }, { Id: 12365 @@ -66542,7 +66542,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1416; "> + Script: <" pet WICKED_NYMPH; "> }, { Id: 12366 @@ -66555,7 +66555,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1404; "> + Script: <" pet MIYABI_NINGYO; "> }, { Id: 12367 @@ -66568,7 +66568,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1504; "> + Script: <" pet DULLAHAN; "> }, { Id: 12368 @@ -66581,7 +66581,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1148; "> + Script: <" pet MEDUSA; "> }, { Id: 12369 @@ -66594,7 +66594,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1495; "> + Script: <" pet STONE_SHOOTER; "> }, { Id: 12370 @@ -66605,17 +66605,17 @@ item_db: ( Trade: { nodrop: true notrade: true + nostorage: true noselltonpc: true nocart: true - nostorage: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1374; "> + Script: <" pet INCUBUS; "> }, { Id: 12371 @@ -66628,7 +66628,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1040; "> + Script: <" pet GOLEM; "> }, { Id: 12372 @@ -66641,7 +66641,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1379; "> + Script: <" pet NIGHTMARE_TERROR; "> }, { Id: 12373 @@ -66654,7 +66654,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1370; "> + Script: <" pet SUCCUBUS; "> }, { Id: 12374 @@ -66667,7 +66667,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1837; "> + Script: <" pet IMP; "> }, { Id: 12375 @@ -67013,7 +67013,7 @@ item_db: ( Buy: 20 Weight: 50 BuyingStore: true - Script: <" pet 1519; "> + Script: <" pet CHUNG_E; "> }, { Id: 12396 @@ -67213,7 +67213,7 @@ item_db: ( Name: "Leaf Cat Ball" Type: 2 Buy: 0 - Script: <" pet 2081; "> + Script: <" pet E_HYDRA; "> }, { Id: 12409 @@ -69967,9 +69967,9 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Red_Slim_Potion, 100; @@ -78196,7 +78196,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14569,10; "> + Script: <" getitem Knife_Goblin_Ring, 10; "> }, { Id: 13816 @@ -78210,7 +78210,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14570,10; "> + Script: <" getitem Flail_Goblin_Ring, 10; "> }, { Id: 13817 @@ -78224,7 +78224,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14571,10; "> + Script: <" getitem Hammer_Goblin_Ring, 10; "> }, { Id: 13818 @@ -78238,7 +78238,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14572,10; "> + Script: <" getitem Holy_Marble, 10; "> }, { Id: 13819 @@ -78252,7 +78252,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14573,10; "> + Script: <" getitem Red_Burning_Stone, 10; "> }, { Id: 13820 @@ -78266,7 +78266,7 @@ item_db: ( noselltonpc: true nogstorage: true } - Script: <" getitem 14574,10; "> + Script: <" getitem Skull_Of_Vagabond, 10; "> }, { Id: 13821 @@ -87572,11 +87572,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1122; "> + Script: <" pet GOBLIN_1; "> }, { Id: 14570 @@ -87590,11 +87590,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1123; "> + Script: <" pet GOBLIN_2; "> }, { Id: 14571 @@ -87608,11 +87608,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1125; "> + Script: <" pet GOBLIN_4; "> }, { Id: 14572 @@ -87626,11 +87626,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1385; "> + Script: <" pet DELETER_; "> }, { Id: 14573 @@ -87644,11 +87644,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1382; "> + Script: <" pet DIABOLIC; "> }, { Id: 14574 @@ -87662,11 +87662,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1208; "> + Script: <" pet WANDER_MAN; "> }, { Id: 14575 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index d0339ef46..1a354e683 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -1337,7 +1337,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1002; "> + Script: <" pet PORING; "> }, { Id: 620 @@ -1350,7 +1350,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1113; "> + Script: <" pet DROPS; "> }, { Id: 621 @@ -1363,7 +1363,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1031; "> + Script: <" pet POPORING; "> }, { Id: 622 @@ -1376,7 +1376,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1063; "> + Script: <" pet LUNATIC; "> }, { Id: 623 @@ -1389,7 +1389,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1049; "> + Script: <" pet PICKY; "> }, { Id: 624 @@ -1402,7 +1402,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1011; "> + Script: <" pet CHONCHON; "> }, { Id: 625 @@ -1415,7 +1415,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1042; "> + Script: <" pet STEEL_CHONCHON; "> }, { Id: 626 @@ -1428,7 +1428,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1035; "> + Script: <" pet HUNTER_FLY; "> }, { Id: 627 @@ -1441,7 +1441,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1167; "> + Script: <" pet SAVAGE; "> }, { Id: 628 @@ -1454,7 +1454,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1107; "> + Script: <" pet DESERT_WOLF_B; "> }, { Id: 629 @@ -1467,7 +1467,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1052; "> + Script: <" pet ROCKER; "> }, { Id: 630 @@ -1480,7 +1480,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1014; "> + Script: <" pet SPORE; "> }, { Id: 631 @@ -1493,7 +1493,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1077; "> + Script: <" pet POISON_SPORE; "> }, { Id: 632 @@ -1506,7 +1506,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1019; "> + Script: <" pet PECOPECO; "> }, { Id: 633 @@ -1519,7 +1519,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1056; "> + Script: <" pet SMOKIE; "> }, { Id: 634 @@ -1532,7 +1532,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1057; "> + Script: <" pet YOYO; "> }, { Id: 635 @@ -1545,7 +1545,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1023; "> + Script: <" pet ORK_WARRIOR; "> }, { Id: 636 @@ -1558,7 +1558,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1026; "> + Script: <" pet MUNAK; "> }, { Id: 637 @@ -1571,7 +1571,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1110; "> + Script: <" pet DOKEBI; "> }, { Id: 638 @@ -1584,7 +1584,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1170; "> + Script: <" pet SOHEE; "> }, { Id: 639 @@ -1597,7 +1597,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1029; "> + Script: <" pet ISIS; "> }, { Id: 640 @@ -1610,7 +1610,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1155; "> + Script: <" pet PETIT; "> }, { Id: 641 @@ -1623,7 +1623,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1109; "> + Script: <" pet DEVIRUCHI; "> }, { Id: 642 @@ -1636,7 +1636,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1101; "> + Script: <" pet BAPHOMET_; "> }, { Id: 643 @@ -1713,7 +1713,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1188; "> + Script: <" pet BONGUN; "> }, { Id: 660 @@ -1726,7 +1726,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1200; "> + Script: <" pet ZHERLTHSH; "> }, { Id: 661 @@ -1739,7 +1739,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1275; "> + Script: <" pet ALICE; "> }, { Id: 662 @@ -79614,7 +79614,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1245; "> + Script: <" pet GOBLIN_XMAS; "> }, { Id: 12226 @@ -81339,16 +81339,16 @@ item_db: ( Trade: { nodrop: true notrade: true - nocart: true nostorage: true - nogstorage: true + nocart: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1815; "> + Script: <" pet EVENT_RICECAKE; "> }, { Id: 12341 @@ -81546,7 +81546,7 @@ item_db: ( Type: 2 Buy: 20 Weight: 50 - Script: <" pet 1630; "> + Script: <" pet BACSOJIN_; "> }, { Id: 12358 @@ -81559,7 +81559,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1513; "> + Script: <" pet CIVIL_SERVANT; "> }, { Id: 12359 @@ -81572,7 +81572,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1586; "> + Script: <" pet LEAF_CAT; "> }, { Id: 12360 @@ -81585,7 +81585,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1505; "> + Script: <" pet LOLI_RURI; "> }, { Id: 12361 @@ -81598,14 +81598,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1143; "> + Script: <" pet MARIONETTE; "> }, { Id: 12362 @@ -81618,7 +81618,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1401; "> + Script: <" pet SHINOBI; "> }, { Id: 12363 @@ -81631,14 +81631,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1179; "> + Script: <" pet WHISPER; "> }, { Id: 12364 @@ -81651,7 +81651,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1299; "> + Script: <" pet GOBLIN_LEADER; "> }, { Id: 12365 @@ -81664,7 +81664,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1416; "> + Script: <" pet WICKED_NYMPH; "> }, { Id: 12366 @@ -81677,7 +81677,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1404; "> + Script: <" pet MIYABI_NINGYO; "> }, { Id: 12367 @@ -81690,7 +81690,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1504; "> + Script: <" pet DULLAHAN; "> }, { Id: 12368 @@ -81703,7 +81703,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1148; "> + Script: <" pet MEDUSA; "> }, { Id: 12369 @@ -81716,7 +81716,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1495; "> + Script: <" pet STONE_SHOOTER; "> }, { Id: 12370 @@ -81729,14 +81729,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } - Script: <" pet 1374; "> + Script: <" pet INCUBUS; "> }, { Id: 12371 @@ -81749,7 +81749,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1040; "> + Script: <" pet GOLEM; "> }, { Id: 12372 @@ -81762,7 +81762,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1379; "> + Script: <" pet NIGHTMARE_TERROR; "> }, { Id: 12373 @@ -81775,7 +81775,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1370; "> + Script: <" pet SUCCUBUS; "> }, { Id: 12374 @@ -81788,7 +81788,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 1837; "> + Script: <" pet IMP; "> }, { Id: 12375 @@ -82122,7 +82122,7 @@ item_db: ( Buy: 20 Weight: 50 BuyingStore: true - Script: <" pet 1519; "> + Script: <" pet CHUNG_E; "> }, { Id: 12396 @@ -82331,7 +82331,7 @@ item_db: ( Name: "Hydra Ball" Type: 2 Buy: 0 - Script: <" pet 2081; "> + Script: <" pet E_HYDRA; "> }, { Id: 12409 @@ -85254,11 +85254,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform DEVIRUCHI, 1200000, SC_MTF_ASPD, 10, 5; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform DEVIRUCHI, 1200000, SC_MTF_ASPD, 10, 5; + "> }, { Id: 12659 @@ -85272,11 +85275,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform RAYDRIC_ARCHER, 1200000, SC_MTF_RANGEATK, 25; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform RAYDRIC_ARCHER, 1200000, SC_MTF_RANGEATK, 25; + "> }, { Id: 12660 @@ -85290,11 +85296,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform MAVKA, 1200000, SC_MTF_RANGEATK, 25; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform MAVKA, 1200000, SC_MTF_RANGEATK, 25; + "> }, { Id: 12661 @@ -85308,11 +85317,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform MARDUK, 1200000, SC_MTF_MATK, 25; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform MARDUK, 1200000, SC_MTF_MATK, 25; + "> }, { Id: 12662 @@ -85326,11 +85338,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform BANSHEE, 1200000, SC_MTF_MATK, 25; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform BANSHEE, 1200000, SC_MTF_MATK, 25; + "> }, { Id: 12663 @@ -85344,11 +85359,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform PORING, 1200000, SC_MTF_CRIDAMAGE, 5; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform PORING, 1200000, SC_MTF_CRIDAMAGE, 5; + "> }, { Id: 12664 @@ -85362,11 +85380,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" montransform GOLEM, 1200000, SC_MTF_MLEATKED, 2; "> + Script: <" + specialeffect2 EF_CLOAKING; + montransform GOLEM, 1200000, SC_MTF_MLEATKED, 2; + "> }, { Id: 12665 @@ -85433,11 +85454,11 @@ item_db: ( Trade: { nodrop: true notrade: true - nocart: true nostorage: true - nogstorage: true + nocart: true nomail: true noauction: true + nogstorage: true } Script: <" getitem Old_Violet_Box, 2; @@ -85697,7 +85718,7 @@ item_db: ( Type: 2 Buy: 20 Weight: 50 - Script: <" pet 2313; "> + Script: <" pet TIKBALANG; "> }, { Id: 12700 @@ -87131,7 +87152,7 @@ item_db: ( Nouse: { sitting: true } - Script: <" pet 2398; "> + Script: <" pet LITTLE_PORING; "> }, { Id: 12847 @@ -100665,11 +100686,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" getitem 14569,10; "> + Script: <" getitem Knife_Goblin_Ring, 10; "> }, { Id: 13816 @@ -100683,11 +100704,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" getitem 14570,10; "> + Script: <" getitem Flail_Goblin_Ring, 10; "> }, { Id: 13817 @@ -100701,11 +100722,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" getitem 14571,10; "> + Script: <" getitem Hammer_Goblin_Ring, 10; "> }, { Id: 13818 @@ -100719,11 +100740,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" getitem 14572,10; "> + Script: <" getitem Holy_Marble, 10; "> }, { Id: 13819 @@ -100737,11 +100758,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" getitem 14573,10; "> + Script: <" getitem Red_Burning_Stone, 10; "> }, { Id: 13820 @@ -100755,11 +100776,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" getitem 14574,10; "> + Script: <" getitem Skull_Of_Vagabond, 10; "> }, { Id: 13821 @@ -111711,8 +111732,7 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true - nomail: true + nogstorage: true nomail: true noauction: true } Script: <" @@ -111732,11 +111752,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1122; "> + Script: <" pet GOBLIN_1; "> }, { Id: 14570 @@ -111750,11 +111770,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1123; "> + Script: <" pet GOBLIN_2; "> }, { Id: 14571 @@ -111768,11 +111788,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1125; "> + Script: <" pet GOBLIN_4; "> }, { Id: 14572 @@ -111786,11 +111806,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1385; "> + Script: <" pet DELETER_; "> }, { Id: 14573 @@ -111804,11 +111824,11 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } - Script: <" pet 1382; "> + Script: <" pet DIABOLIC; "> }, { Id: 14574 @@ -111817,7 +111837,7 @@ item_db: ( Type: 2 Buy: 0 Weight: 10 - Script: <" pet 1208; "> + Script: <" pet WANDER_MAN; "> }, { Id: 14575 diff --git a/src/map/clif.c b/src/map/clif.c index 0cf31fccb..687303e38 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6738,29 +6738,30 @@ void clif_pet_roulette(struct map_session_data *sd,int data) /// Presents a list of pet eggs that can be hatched (ZC_PETEGG_LIST). /// 01a6 .W { .W }* -void clif_sendegg(struct map_session_data *sd) -{ - int i,n=0,fd; +void clif_sendegg(struct map_session_data *sd) { + int i, n, fd; nullpo_retv(sd); - fd=sd->fd; + fd = sd->fd; if (battle_config.pet_no_gvg && map_flag_gvg2(sd->bl.m)) { //Disable pet hatching in GvG grounds during Guild Wars [Skotlex] - clif->message(fd, msg_sd(sd,866)); // "Pets are not allowed in Guild Wars." + clif->message(fd, msg_sd(sd, 866)); // "Pets are not allowed in Guild Wars." return; } + WFIFOHEAD(fd, MAX_INVENTORY * 2 + 4); - WFIFOW(fd,0)=0x1a6; - for(i=0,n=0;istatus.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL || - sd->inventory_data[i]->type!=IT_PETEGG || - sd->status.inventory[i].amount<=0) + WFIFOW(fd,0) = 0x1a6; + for (i = n = 0; i < MAX_INVENTORY; i++) { + if (sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL || sd->inventory_data[i]->type!=IT_PETEGG || sd->status.inventory[i].amount <= 0) continue; - WFIFOW(fd,n*2+4)=i+2; + WFIFOW(fd, n * 2 + 4) = i + 2; n++; } - WFIFOW(fd,2)=4+n*2; - WFIFOSET(fd,WFIFOW(fd,2)); + + if (!n) return; + + WFIFOW(fd, 2) = 4 + n * 2; + WFIFOSET(fd, WFIFOW(fd, 2)); sd->menuskill_id = SA_TAMINGMONSTER; sd->menuskill_val = -1; -- cgit v1.2.3-60-g2f50 From 9c137f8d979f9cde9f3c54c754d0a26912f4f208 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 24 Dec 2015 00:49:52 +0800 Subject: Item Update: - Added Cup of Mintlemon item effect - Added Job_Manual25 item effect --- db/pre-re/item_db.conf | 3 ++- db/re/item_db.conf | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'db') diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 7b9c30839..1185bc70a 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -88165,13 +88165,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } + Script: <" sc_start SC_CASH_PLUSONLYJOBEXP, 1800000, 25; "> }, { Id: 14607 diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 1a354e683..6c1b4c481 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -112466,13 +112466,14 @@ item_db: ( notrade: true noselltonpc: true nocart: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Nouse: { sitting: true } + Script: <" sc_start SC_CASH_PLUSONLYJOBEXP, 1800000, 25; "> }, { Id: 14607 @@ -112729,8 +112730,20 @@ item_db: ( Type: 2 Buy: 20 Weight: 10 + Script: <" sc_start2 SC_CUP_OF_BOZA, 120000, 10, 5; "> +}, +{ + Id: 14680 + AegisName: "Cup_Of_Mintlemon" + Name: "Cup Of Mintlemon" + Type: 2 + Buy: 0 + Weight: 10 Script: <" - sc_start2 SC_CUP_OF_BOZA, 120000, 10, 5; + sc_start SC_FOOD_VIT, 180000, 15; + specialeffect2 EF_GUARD; + sc_start SC_PROTECT_DEF, 60000, 3; + sc_start SC_PROTECT_MDEF, 60000, 3; "> }, -- cgit v1.2.3-60-g2f50 From 3f13598714f2d6cecb1c1e5c382592a904798624 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 24 Dec 2015 10:43:11 +0800 Subject: Item Update: - Fix items that uses SPVanishRate bonus are not working properly. - Fix Velum Katzbalger item effect. - Added HPVanishRate bonus. --- db/const.txt | 1 + db/pre-re/item_db.conf | 20 ++++++++++---------- db/re/item_db.conf | 50 +++++++++++++++++++++++++------------------------- doc/item_bonus.txt | 3 +++ src/map/battle.c | 38 ++++++++++++++++++++++++++------------ src/map/map.h | 2 +- src/map/pc.c | 26 ++++++++++++++++++++------ src/map/pc.h | 2 ++ 8 files changed, 88 insertions(+), 54 deletions(-) (limited to 'db') diff --git a/db/const.txt b/db/const.txt index cca14517f..efdad29bc 100644 --- a/db/const.txt +++ b/db/const.txt @@ -529,6 +529,7 @@ bSkillHeal2 1088 bAddEffOnSkill 1089 bHealPower 1090 bHealPower2 1091 +bHPVanishRate 1092 bRestartFullRecover 2000 bNoCastCancel 2001 diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index 1185bc70a..27a80f4ee 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -5108,10 +5108,10 @@ item_db: ( EquipLv: 40 View: 2 Script: <" - bonus bAtkEle,Ele_Ghost; - bonus2 bSPVanishRate,30,30; - bonus bSPDrainValue,-1; - bonus bUnbreakableWeapon,0; + bonus bAtkEle, Ele_Ghost; + bonus2 bSPVanishRate, 30, 30; + bonus bSPDrainValue, -1; + bonus bUnbreakableWeapon, 1; "> }, { @@ -27330,8 +27330,8 @@ item_db: ( Weight: 10 Loc: 2 Script: <" - bonus2 bSPVanishRate,50,10; - if(BaseJob==Job_Sage) bonus bSPDrainValue,1; + bonus2 bSPVanishRate, 50, 10; + if (BaseJob == Job_Sage) bonus bSPDrainValue, 1; "> }, { @@ -74660,10 +74660,10 @@ item_db: ( Refine: false View: 2 Script: <" - bonus bAtkEle,Ele_Ghost; - bonus2 bSPVanishRate,45,30; - bonus bSPDrainValue,-1; - bonus bUnbreakableWeapon,0; + bonus bAtkEle, Ele_Ghost; + bonus2 bSPVanishRate, 45, 30; + bonus bSPDrainValue, -1; + bonus bUnbreakableWeapon, 1; "> }, { diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 6c1b4c481..adf25baa8 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -4882,10 +4882,10 @@ item_db: ( EquipLv: 40 View: 2 Script: <" - bonus bAtkEle,Ele_Ghost; - bonus2 bSPVanishRate,30,30; - bonus bSPDrainValue,-1; - bonus bUnbreakableWeapon,0; + bonus bAtkEle, Ele_Ghost; + bonus2 bSPVanishRate, 30, 30; + bonus bSPDrainValue, -1; + bonus bUnbreakableWeapon, 1; "> }, { @@ -7874,7 +7874,7 @@ item_db: ( WeaponLv: 4 EquipLv: 95 View: 16 - Script: <" bonus3 bSPVanishRate,10000,10,BF_NORMAL; "> + Script: <" bonus3 bSPVanishRate, 1000, 10, BF_NORMAL; "> }, { Id: 1295 @@ -9370,8 +9370,8 @@ item_db: ( EquipLv: 95 View: 7 Script: <" - bonus bUnbreakableWeapon,0; - bonus3 bSPVanishRate,10000,10,BF_NORMAL; + bonus bUnbreakableWeapon, 1; + bonus3 bSPVanishRate, 1000, 10, BF_NORMAL; "> }, { @@ -14771,13 +14771,13 @@ item_db: ( EquipLv: 95 View: 10 Script: <" - bonus bInt,10; - bonus bUnbreakableWeapon,0; - bonus bUseSPrate,100; - bonus bMdef,20; - bonus3 bSPVanishRate,10000,5,BF_NORMAL|BF_SKILL; - if(getrefine()>5) { - bonus3 bSPVanishRate,10000,10,BF_NORMAL|BF_SKILL; + bonus bInt, 10; + bonus bUnbreakableWeapon, 0; + bonus bUseSPrate, 100; + bonus bMdef, 20; + bonus3 bSPVanishRate, 1000, 5, BF_NORMAL | BF_SKILL; + if (getrefine() >= 6) { + bonus3 bSPVanishRate, 1000, 10, BF_NORMAL | BF_SKILL; } "> }, @@ -35916,8 +35916,8 @@ item_db: ( Weight: 10 Loc: 2 Script: <" - bonus2 bSPVanishRate,50,10; - if(BaseJob==Job_Sage) bonus bSPDrainValue,1; + bonus2 bSPVanishRate, 50, 10; + if (BaseJob == Job_Sage) bonus bSPDrainValue, 1; "> }, { @@ -94221,18 +94221,18 @@ item_db: ( Trade: { nodrop: true notrade: true + nostorage: true noselltonpc: true nocart: true - nostorage: true - nogstorage: true nomail: true noauction: true + nogstorage: true } Script: <" - bonus bAtkEle,Ele_Ghost; - bonus2 bSPVanishRate,45,30; - bonus bSPDrainValue,-1; - bonus bUnbreakableWeapon,0; + bonus bAtkEle, Ele_Ghost; + bonus2 bSPVanishRate, 45, 30; + bonus bSPDrainValue, -1; + bonus bUnbreakableWeapon, 1; "> }, { @@ -119609,8 +119609,8 @@ item_db: ( EquipLv: 95 View: 11 Script: <" - bonus3 bSPVanishRate,10000,4,BF_NORMAL; - bonus bAspd,-5; + bonus3 bSPVanishRate, 1000, 4, BF_NORMAL; + bonus bAspd, -5; "> }, { @@ -134357,7 +134357,7 @@ item_db: ( WeaponLv: 4 EquipLv: 95 View: 3 - Script: <" bonus3 bSPVanishRate,10000,8,BF_NORMAL; "> + Script: <" bonus3 bHPVanishRate, 1000, 8, BF_NORMAL; "> }, { Id: 21003 diff --git a/doc/item_bonus.txt b/doc/item_bonus.txt index 6aeca16ea..f588921cd 100644 --- a/doc/item_bonus.txt +++ b/doc/item_bonus.txt @@ -353,7 +353,10 @@ bonus3 bSPDrainRateRace,r,n,x; Adds a n/10% chance to receive x% of damage deal HP/SP Vanish ------------ +bonus2 bHPVanishRate,n,x; Add the (n/10)% chance of decreasing enemy HP amount by x% when attacking bonus2 bSPVanishRate,n,x; Add the (n/10)% chance of decreasing enemy SP amount by x% when attacking + +bonus3 bHPVanishRate,n,x,bf; Add the (n/10)% chance of decreasing enemy HP amount by x% when attacking for criteria bf bonus3 bSPVanishRate,n,x,bf; Add the (n/10)% chance of decreasing enemy SP amount by x% when attacking for criteria bf HP/SP Gain diff --git a/src/map/battle.c b/src/map/battle.c index 96289fcc8..6c0e57863 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5668,11 +5668,20 @@ struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct bl } else // Some skills like Weaponry Research will cause damage even if attack is dodged d.dmg_lv = ATK_DEF; - if(sd && d.damage+d.damage2>1) { - if(sd->bonus.sp_vanish_rate && sd->bonus.sp_vanish_trigger && rnd()%10000bonus.sp_vanish_rate && - ( (d.flag&sd->bonus.sp_vanish_trigger&BF_WEAPONMASK) || (d.flag&sd->bonus.sp_vanish_trigger&BF_RANGEMASK) - || (d.flag&sd->bonus.sp_vanish_trigger&BF_SKILLMASK) )) - status_percent_damage(&sd->bl,target,0,-sd->bonus.sp_vanish_per,false); + // HPVanishRate + if (sd && d.damage + d.damage2 > 1) { + if (sd->bonus.hp_vanish_rate && sd->bonus.hp_vanish_trigger && rnd() % 1000 < sd->bonus.hp_vanish_rate && + ((d.flag&sd->bonus.hp_vanish_trigger&BF_WEAPONMASK) || (d.flag&sd->bonus.hp_vanish_trigger&BF_RANGEMASK) + || (d.flag&sd->bonus.hp_vanish_trigger&BF_SKILLMASK))) + status_percent_damage(&sd->bl, target, -sd->bonus.hp_vanish_per, 0, false); + } + + // SPVanishRate + if (sd && d.damage + d.damage2 > 1) { + if (sd->bonus.sp_vanish_rate && sd->bonus.sp_vanish_trigger && rnd() % 1000 < sd->bonus.sp_vanish_rate && + ((d.flag&sd->bonus.sp_vanish_trigger&BF_WEAPONMASK) || (d.flag&sd->bonus.sp_vanish_trigger&BF_RANGEMASK) + || (d.flag&sd->bonus.sp_vanish_trigger&BF_SKILLMASK))) + status_percent_damage(&sd->bl, target, 0, -sd->bonus.sp_vanish_per, false); } return d; } @@ -5902,7 +5911,7 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldama if (i == 0 || i == 2) type = race; else - type = boss?RC_BOSS:RC_NONBOSS; + type = boss ? RC_BOSS : RC_NONBOSS; hp = wd->hp_drain[type].value; if (wd->hp_drain[type].rate) @@ -5912,6 +5921,14 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldama if (wd->sp_drain[type].rate) sp += battle->calc_drain(*damage, wd->sp_drain[type].rate, wd->sp_drain[type].per); + // HPVanishRate + if (sd->bonus.hp_vanish_rate && rnd() % 1000 < sd->bonus.hp_vanish_rate && !sd->bonus.hp_vanish_trigger) + status_percent_damage(&sd->bl, tbl, (unsigned char)sd->bonus.hp_vanish_per, 0, false); + + // SPVanishRate + if (sd->bonus.sp_vanish_rate && rnd() % 1000 < sd->bonus.sp_vanish_rate && !sd->bonus.sp_vanish_trigger) + status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->bonus.sp_vanish_per, false); + if (hp) { if (wd->hp_drain[type].type) rhp += hp; @@ -5924,17 +5941,14 @@ void battle_drain(TBL_PC *sd, struct block_list *tbl, int64 rdamage, int64 ldama } } - if (sd->bonus.sp_vanish_rate && rnd()%1000 < sd->bonus.sp_vanish_rate && !sd->bonus.sp_vanish_trigger) - status_percent_damage(&sd->bl, tbl, 0, (unsigned char)sd->bonus.sp_vanish_per, false); - - if( sd->sp_gain_race_attack[race] ) + if (sd->sp_gain_race_attack[race]) tsp += sd->sp_gain_race_attack[race]; - if( sd->hp_gain_race_attack[race] ) + if (sd->hp_gain_race_attack[race]) thp += sd->hp_gain_race_attack[race]; if (!thp && !tsp) return; - status->heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain?3:1); + status->heal(&sd->bl, thp, tsp, battle_config.show_hp_sp_drain ? 3 : 1); if (rhp || rsp) status_zap(tbl, rhp, rsp); diff --git a/src/map/map.h b/src/map/map.h index dacd81f71..bc479cdcf 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -465,7 +465,7 @@ enum status_point_types { SP_WEAPON_ATK,SP_WEAPON_ATK_RATE, // 1081-1082 SP_DELAYRATE,SP_HP_DRAIN_RATE_RACE,SP_SP_DRAIN_RATE_RACE, // 1083-1085 SP_IGNORE_MDEF_RATE,SP_IGNORE_DEF_RATE,SP_SKILL_HEAL2,SP_ADDEFF_ONSKILL, //1086-1089 - SP_ADD_HEAL_RATE,SP_ADD_HEAL2_RATE, //1090-1091 + SP_ADD_HEAL_RATE, SP_ADD_HEAL2_RATE, SP_HP_VANISH_RATE, //1090-1092 SP_RESTART_FULL_RECOVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005 SP_NO_CASTCANCEL2,SP_NO_MISC_DAMAGE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR, SP_UNBREAKABLE_HELM, // 2006-2010 diff --git a/src/map/pc.c b/src/map/pc.c index 157f7faab..59232cc7b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3168,11 +3168,18 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) sd->left_weapon.sp_drain[RC_BOSS].type = val; } break; + case SP_HP_VANISH_RATE: + if (sd->state.lr_flag != 2) { + sd->bonus.hp_vanish_rate += type2; + sd->bonus.hp_vanish_per = max(sd->bonus.hp_vanish_per, val); + sd->bonus.hp_vanish_trigger = 0; + } + break; case SP_SP_VANISH_RATE: - if(sd->state.lr_flag != 2) { + if (sd->state.lr_flag != 2) { sd->bonus.sp_vanish_rate += type2; - sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per,val); - sd->bonus.sp_vanish_trigger=0; + sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per, val); + sd->bonus.sp_vanish_trigger = 0; } break; case SP_GET_ZENY_NUM: @@ -3812,11 +3819,18 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val) } } break; + case SP_HP_VANISH_RATE: + if (sd->state.lr_flag != 2) { + sd->bonus.hp_vanish_rate += type2; + sd->bonus.hp_vanish_per = max(sd->bonus.hp_vanish_per, type3); + sd->bonus.hp_vanish_trigger = val; + } + break; case SP_SP_VANISH_RATE: - if(sd->state.lr_flag != 2) { + if (sd->state.lr_flag != 2) { sd->bonus.sp_vanish_rate += type2; - sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per,type3); - sd->bonus.sp_vanish_trigger=val; + sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per, type3); + sd->bonus.sp_vanish_trigger = val; } break; diff --git a/src/map/pc.h b/src/map/pc.h index 93173f6c8..97f339bf6 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -377,6 +377,8 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st short add_steal_rate; short add_heal_rate, add_heal2_rate; short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value; + short hp_vanish_rate; + short hp_vanish_per, hp_vanish_trigger; short sp_vanish_rate; short sp_vanish_per, sp_vanish_trigger; unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest] -- cgit v1.2.3-60-g2f50