summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2015-12-20 14:04:07 +0800
committerJedzkie <jedzkie13@rocketmail.com>2015-12-20 14:04:07 +0800
commit03d6b89105558cfb8f157fcdc8c5e14427f9ffef (patch)
treee728f0d368261ea983fa106fabfab46780627c81
parent55c98b69b783fc9e52116943cb40d13c4462c97c (diff)
downloadhercules-03d6b89105558cfb8f157fcdc8c5e14427f9ffef.tar.gz
hercules-03d6b89105558cfb8f157fcdc8c5e14427f9ffef.tar.bz2
hercules-03d6b89105558cfb8f157fcdc8c5e14427f9ffef.tar.xz
hercules-03d6b89105558cfb8f157fcdc8c5e14427f9ffef.zip
ItemDB Update:
- Added official effect of Combat Pill and Advanced Combat Pill.
-rw-r--r--db/const.txt3
-rw-r--r--db/re/item_db.conf12
-rw-r--r--src/map/status.c22
-rw-r--r--src/map/status.h3
4 files changed, 39 insertions, 1 deletions
diff --git a/db/const.txt b/db/const.txt
index 56437d2e2..a9c15685d 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -1333,6 +1333,9 @@ SC_TIME_ACCESSORY 623
SC_MAGICAL_FEATHER 624
SC_BLOSSOM_FLUTTERING 625
+SC_GM_BATTLE 626
+SC_GM_BATTLE2 627
+
e_gasp 0
e_what 1
e_ho 2
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index f9cb7dd2a..cf587b344 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -86563,14 +86563,22 @@ item_db: (
Type: 2
Buy: 20
Weight: 150
+ Script: <"
+ specialeffect2 EF_POTION_BERSERK;
+ sc_start2 SC_GM_BATTLE, 600000, 5, 3;
+ ">
},
{
Id: 12792
AegisName: "P_Combat_Pill"
Name: "Advanced Magic Battle Serum"
- Type: 11
+ Type: 2
Buy: 20
Weight: 150
+ Script: <"
+ specialeffect2 EF_POTION_BERSERK;
+ sc_start2 SC_GM_BATTLE2, 600000, 10, 5;
+ ">
},
{
Id: 12793
@@ -86578,6 +86586,7 @@ item_db: (
Name: "Magic Battle Serum Box"
Type: 11
Buy: 20
+ Script: <" getitem Combat_Pill, 10; ">
},
{
Id: 12794
@@ -86585,6 +86594,7 @@ item_db: (
Name: "Advanced Magic Battle Serum Box"
Type: 11
Buy: 20
+ Script: <" getitem P_Combat_Pill, 10; ">
},
{
Id: 12795
diff --git a/src/map/status.c b/src/map/status.c
index 5225dd40d..f6a068b98 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -848,6 +848,8 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_ATKER_MOVESPEED] = SI_ATKER_MOVESPEED;
status->dbs->IconChangeTable[SC_CUP_OF_BOZA] = SI_CUP_OF_BOZA;
status->dbs->IconChangeTable[SC_OVERLAPEXPUP] = SI_OVERLAPEXPUP;
+ status->dbs->IconChangeTable[SC_GM_BATTLE] = SI_GM_BATTLE;
+ status->dbs->IconChangeTable[SC_GM_BATTLE2] = SI_GM_BATTLE2;
// Eden Crystal Synthesis
status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1;
@@ -1031,6 +1033,8 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_ATKER_MOVESPEED] |= SCB_MAXSP | SCB_ALL;
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;
+ status->dbs->ChangeFlagTable[SC_GM_BATTLE2] |= SCB_BATK | SCB_MATK | SCB_MAXHP | SCB_MAXSP;
// Cash Items
status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
@@ -4703,6 +4707,11 @@ unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc,
if (sc->data[SC_QUEST_BUFF3])
batk += sc->data[SC_QUEST_BUFF3]->val1;
+ if (sc->data[SC_GM_BATTLE])
+ batk += sc->data[SC_GM_BATTLE]->val1;
+ if (sc->data[SC_GM_BATTLE2])
+ batk += sc->data[SC_GM_BATTLE2]->val1;
+
return (unsigned short)cap_value(batk,0,USHRT_MAX);
}
@@ -4883,6 +4892,11 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc,
if (sc->data[SC_FENRIR_CARD])
matk += sc->data[SC_FENRIR_CARD]->val1;
+ if (sc->data[SC_GM_BATTLE])
+ matk += sc->data[SC_GM_BATTLE]->val1;
+ if (sc->data[SC_GM_BATTLE2])
+ matk += sc->data[SC_GM_BATTLE2]->val1;
+
return (unsigned short)cap_value(matk,0,USHRT_MAX);
}
@@ -5931,6 +5945,10 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc,
maxhp += maxhp * sc->data[SC_ATKER_ASPD]->val1 / 100;
if (sc->data[SC_MVPCARD_TAOGUNKA])
maxhp += maxhp * sc->data[SC_MVPCARD_TAOGUNKA]->val1 / 100;
+ if (sc->data[SC_GM_BATTLE])
+ maxhp -= maxhp * sc->data[SC_GM_BATTLE]->val1 / 100;
+ if (sc->data[SC_GM_BATTLE2])
+ maxhp -= maxhp * sc->data[SC_GM_BATTLE2]->val1 / 100;
return (unsigned int)cap_value(maxhp,1,UINT_MAX);
}
@@ -5964,6 +5982,10 @@ unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc,
maxsp += maxsp * sc->data[SC_SOULSCROLL]->val1 / 100;
if (sc->data[SC_ATKER_MOVESPEED])
maxsp += maxsp * sc->data[SC_ATKER_MOVESPEED]->val1 / 100;
+ if (sc->data[SC_GM_BATTLE])
+ maxsp -= maxsp * sc->data[SC_GM_BATTLE]->val1 / 100;
+ if (sc->data[SC_GM_BATTLE2])
+ maxsp -= maxsp * sc->data[SC_GM_BATTLE2]->val1 / 100;
return cap_value(maxsp,1,UINT_MAX);
}
diff --git a/src/map/status.h b/src/map/status.h
index 2bf3c0a57..df1154794 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -809,6 +809,9 @@ typedef enum sc_type {
SC_MAGICAL_FEATHER,
SC_BLOSSOM_FLUTTERING,
+ SC_GM_BATTLE,
+ SC_GM_BATTLE2,
+
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;