diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/itemdb.h | 1 | ||||
-rw-r--r-- | src/map/mob.h | 2 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/script.c | 23 | ||||
-rw-r--r-- | src/map/status.c | 11 | ||||
-rw-r--r-- | src/map/status.h | 8 |
6 files changed, 40 insertions, 9 deletions
diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 198d7a542..72572bb97 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -42,6 +42,7 @@ enum item_itemid { ITEMID_WHITE_POTION = 504, ITEMID_BLUE_POTION = 505, ITEMID_HOLY_WATER = 523, + ITEMID_PUMPKIN = 535, ITEMID_RED_SLIM_POTION = 545, ITEMID_YELLOW_SLIM_POTION = 546, ITEMID_WHITE_SLIM_POTION = 547, diff --git a/src/map/mob.h b/src/map/mob.h index 848bfbb2f..f3937c0d1 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -16,7 +16,7 @@ // Change this to increase the table size in your mob_db to accommodate a larger mob database. // Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes. // Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000 -#define MAX_MOB_DB 4000 +#define MAX_MOB_DB 5000 //The number of drops all mobs have and the max drop-slot that the steal skill will attempt to steal from. #define MAX_MOB_DROP 10 diff --git a/src/map/pc.c b/src/map/pc.c index 85dab4559..840891054 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7633,6 +7633,10 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp) // Recovery Potion if( sd->sc.data[SC_HEALPLUS] ) hp += (int)(hp * sd->sc.data[SC_HEALPLUS]->val1/100.); + + // 2014 Halloween Event : Pumpkin Bonus + if ( sd->sc.data[SC_MTF_PUMPKIN] && itemid == ITEMID_PUMPKIN ) + hp += (int)(hp * sd->sc.data[SC_MTF_PUMPKIN]->val1/100); } if(sp) { bonus = 100 + (sd->battle_status.int_<<1) diff --git a/src/map/script.c b/src/map/script.c index 05321561e..f4c343452 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17967,6 +17967,7 @@ BUILDIN(montransform) { struct block_list* bl; char msg[CHAT_SIZE_MAX]; int mob_id, val1, val2, val3, val4; + val1 = val2 = val3 = val4 = 0; if( (bl = map->id2bl(st->rid)) == NULL ) return true; @@ -17986,12 +17987,17 @@ BUILDIN(montransform) { } tick = script_getnum(st, 3); - type = (sc_type)script_getnum(st, 4); - val1 = val2 = val3 = val4 = 0; - if( !(type > SC_NONE && type < SC_MAX) ) { - ShowWarning("buildin_montransform: Unsupported status change id %d\n", type); - return false; + if (script_hasdata(st, 4)) + type = (sc_type)script_getnum(st, 4); + else + type = SC_NONE; + + if (script_hasdata(st, 4)) { + if( !(type > SC_NONE && type < SC_MAX) ) { + ShowWarning("buildin_montransform: Unsupported status change id %d\n", type); + return false; + } } if (script_hasdata(st, 5)) @@ -18027,8 +18033,11 @@ BUILDIN(montransform) { clif->ShowScript(&sd->bl, msg); status_change_end(bl, SC_MONSTER_TRANSFORM, INVALID_TIMER); // Clear previous sc_start2(NULL, bl, SC_MONSTER_TRANSFORM, 100, mob_id, type, tick); - sc_start4(NULL, bl, type, 100, val1, val2, val3, val4, tick); + + if (script_hasdata(st, 4)) + sc_start4(NULL, bl, type, 100, val1, val2, val3, val4, tick); } + return true; } @@ -19460,7 +19469,7 @@ void script_parse_builtin(void) { BUILDIN_DEF(stand, "?"), BUILDIN_DEF(issit, "?"), - BUILDIN_DEF(montransform, "vii????"), // Monster Transform [malufett/Hercules] + BUILDIN_DEF(montransform, "vi?????"), // Monster Transform [malufett/Hercules] /* New BG Commands [Hercules] */ BUILDIN_DEF(bg_create_team,"sii"), diff --git a/src/map/status.c b/src/map/status.c index 7ae6606e3..6c1be1029 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -935,13 +935,16 @@ void initChangeTables(void) { status->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT; status->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE; status->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE; + status->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT|SCB_FLEE; status->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI; status->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD; status->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2; status->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP; status->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP; status->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP; + status->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP; status->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP; + status->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP; status->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK; status->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK; status->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF; @@ -4805,6 +4808,8 @@ signed short status_calc_hit(struct block_list *bl, struct status_change *sc, in if(sc->data[SC_INCHIT]) hit += sc->data[SC_INCHIT]->val1; + if(sc->data[SC_MTF_HITFLEE]) + hit += sc->data[SC_MTF_HITFLEE]->val1; if(sc->data[SC_FOOD_BASICHIT]) hit += sc->data[SC_FOOD_BASICHIT]->val1; if(sc->data[SC_TRUESIGHT]) @@ -4856,6 +4861,8 @@ signed short status_calc_flee(struct block_list *bl, struct status_change *sc, i if(sc->data[SC_INCFLEE]) flee += sc->data[SC_INCFLEE]->val1; + if(sc->data[SC_MTF_HITFLEE]) + flee += sc->data[SC_MTF_HITFLEE]->val2; if(sc->data[SC_FOOD_BASICAVOIDANCE]) flee += sc->data[SC_FOOD_BASICAVOIDANCE]->val1; if(sc->data[SC_WHISTLE]) @@ -5700,6 +5707,8 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc, 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]) + 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]) @@ -5767,6 +5776,8 @@ unsigned int status_calc_maxsp(struct block_list *bl, struct status_change *sc, 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]) + 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]) diff --git a/src/map/status.h b/src/map/status.h index 623ba7eb3..e96894e9f 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -730,7 +730,7 @@ typedef enum sc_type { SC__FEINTBOMB_MASTER, SC_FALLENEMPIRE, - SC_FLASHCOMBO, + SC_FLASHCOMBO, // 580 //Vellum Weapon reductions SC_DEFSET, @@ -738,6 +738,12 @@ typedef enum sc_type { SC_NO_SWITCH_EQUIP, + // 2014 Halloween Event + SC_MTF_MHP, + SC_MTF_MSP, + SC_MTF_PUMPKIN, + SC_MTF_HITFLEE, + SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; |