diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/itemdb.h | 1 | ||||
-rw-r--r-- | src/map/log.h | 2 | ||||
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/mob.h | 2 | ||||
-rw-r--r-- | src/map/pc.c | 8 | ||||
-rw-r--r-- | src/map/script.c | 35 | ||||
-rw-r--r-- | src/map/skill.c | 3 | ||||
-rw-r--r-- | src/map/status.c | 17 | ||||
-rw-r--r-- | src/map/status.h | 8 |
10 files changed, 55 insertions, 24 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 1b8e44cb3..88d83f91b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5812,6 +5812,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t if( --(sc->data[SC_SPELLFIST]->val1) >= 0 ){ struct Damage ad = battle->calc_attack(BF_MAGIC,src,target,sc->data[SC_SPELLFIST]->val3,sc->data[SC_SPELLFIST]->val4,flag|BF_SHORT); wd.damage = ad.damage; + damage_div_fix(wd.damage, wd.div_); }else status_change_end(src,SC_SPELLFIST,INVALID_TIMER); } 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/log.h b/src/map/log.h index 6ab142f87..40dbf6761 100644 --- a/src/map/log.h +++ b/src/map/log.h @@ -98,7 +98,7 @@ struct log_interface { char db_ip[32]; int db_port; char db_id[32]; - char db_pw[32]; + char db_pw[100]; char db_name[32]; Sql* mysql_handle; /* */ diff --git a/src/map/map.h b/src/map/map.h index 11dd6ce82..5468016b4 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -850,7 +850,7 @@ struct map_interface { int server_port; char server_ip[32]; char server_id[32]; - char server_pw[32]; + char server_pw[100]; char server_db[32]; Sql* mysql_handle; 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..f07858ca6 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3102,11 +3102,11 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) } if(sd->skillfixcastrate[i].id == type2) - sd->skillfixcastrate[i].val += val; + sd->skillfixcastrate[i].val -= val; else { sd->skillfixcastrate[i].id = type2; - sd->skillfixcastrate[i].val = val; + sd->skillfixcastrate[i].val -= val; } break; @@ -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 1885c3c2c..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; } @@ -19069,13 +19078,13 @@ void script_parse_builtin(void) { BUILDIN_DEF(checkcart,""), BUILDIN_DEF(setfalcon,"?"), BUILDIN_DEF(checkfalcon,""), - BUILDIN_DEF(setriding,"?"), - BUILDIN_DEF(checkriding,""), + BUILDIN_DEF_DEPRECATED(setriding,"?"), // Deprecated 2014-10-30 [Haru] + BUILDIN_DEF_DEPRECATED(checkriding,""), // Deprecated 2014-10-30 [Haru] BUILDIN_DEF(setmount,"?"), BUILDIN_DEF(checkmount,""), BUILDIN_DEF(checkwug,""), - BUILDIN_DEF(checkmadogear,""), - BUILDIN_DEF(setmadogear,"?"), + BUILDIN_DEF_DEPRECATED(checkmadogear,""), // Deprecated 2014-10-30 [Haru] + BUILDIN_DEF_DEPRECATED(setmadogear,"?"), // Deprecated 2014-10-30 [Haru] BUILDIN_DEF2(savepoint,"save","sii"), BUILDIN_DEF(savepoint,"sii"), BUILDIN_DEF(gettimetick,"i"), @@ -19396,8 +19405,8 @@ void script_parse_builtin(void) { * 3rd-related **/ BUILDIN_DEF(makerune,"i"), - BUILDIN_DEF(checkdragon,""),//[Ind] - BUILDIN_DEF(setdragon,"?"),//[Ind] + BUILDIN_DEF_DEPRECATED(checkdragon,""), // Deprecated 2014-10-30 [Haru] + BUILDIN_DEF_DEPRECATED(setdragon,"?"), // Deprecated 2014-10-30 [Haru] BUILDIN_DEF(hascashmount,""),//[Ind] BUILDIN_DEF(setcashmount,""),//[Ind] BUILDIN_DEF(checkre,"i"), @@ -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/skill.c b/src/map/skill.c index 42aae546d..f762c4b41 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14316,9 +14316,8 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 break; } for( i = 0; i < ARRAYLENGTH(sd->skillfixcastrate) && sd->skillfixcastrate[i].id; i++ ) - if( sd->skillfixcastrate[i].id == skill_id ){ // bonus2 bFixedCastrate - fixcast_r = sd->skillfixcastrate[i].val; // just speculation + fixcast_r = sd->skillfixcastrate[i].val; break; } } diff --git a/src/map/status.c b/src/map/status.c index 824ad1f58..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; @@ -4713,6 +4716,8 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, 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); } @@ -4737,8 +4742,6 @@ 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_MINDBREAKER]) - matk += matk * sc->data[SC_MINDBREAKER]->val2/100; if( sc->data[SC_ZANGETSU] ) matk += sc->data[SC_ZANGETSU]->val3; if (sc->data[SC_MAGICPOWER] && sc->data[SC_MAGICPOWER]->val4) @@ -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]) @@ -11384,7 +11395,7 @@ int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int fl if( !(flag&1) ){ if( max > min ) - max = min + rnd()%(max - min); + max = min + rnd()%(max - min + 1); else max = min; } 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; |