diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-13 19:02:17 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-13 19:02:17 +0000 |
commit | b15424b1be7020894f2d530636d77a32ec27e32c (patch) | |
tree | b9a9c25e63cf236354a2275e0bdb2bee42ea6c1e /src/map | |
parent | fd37fb3ca86a5cd557f137ba9d9c002c464e2250 (diff) | |
download | hercules-b15424b1be7020894f2d530636d77a32ec27e32c.tar.gz hercules-b15424b1be7020894f2d530636d77a32ec27e32c.tar.bz2 hercules-b15424b1be7020894f2d530636d77a32ec27e32c.tar.xz hercules-b15424b1be7020894f2d530636d77a32ec27e32c.zip |
* Added nullpo_retb
* Replaced some parts in skill.c with nullpo checks
* Updated most of 12/14's skills patch
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@560 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 195 | ||||
-rw-r--r-- | src/map/battle.h | 18 | ||||
-rw-r--r-- | src/map/pc.c | 53 | ||||
-rw-r--r-- | src/map/skill.c | 105 |
4 files changed, 207 insertions, 164 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 9c6b313cf..8892104b9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -638,7 +638,7 @@ int battle_get_atk2(struct block_list *bl) if(sc_data[SC_DRUMBATTLE].timer!=-1) atk2 += sc_data[SC_DRUMBATTLE].val2; if(sc_data[SC_NIBELUNGEN].timer!=-1 && (battle_get_element(bl)/10) >= 8 ) - atk2 += sc_data[SC_NIBELUNGEN].val2; + atk2 += sc_data[SC_NIBELUNGEN].val3; if(sc_data[SC_STRIPWEAPON].timer!=-1) atk2 = atk2*sc_data[SC_STRIPWEAPON].val2/100; if(sc_data[SC_CONCENTRATION].timer!=-1) //コンセントレーション @@ -921,11 +921,12 @@ int battle_get_speed(struct block_list *bl) if(sc_data[SC_STEELBODY].timer!=-1) speed = speed*125/100; //ディフェンダー時は加算 - if(sc_data[SC_DEFENDER].timer!=-1) - speed = (speed * (155 - sc_data[SC_DEFENDER].val1*5)) / 100; + // removed as of 12/14's patch [celest] + /*if(sc_data[SC_DEFENDER].timer!=-1) + speed = (speed * (155 - sc_data[SC_DEFENDER].val1*5)) / 100;*/ //踊り状態は4倍遅い if(sc_data[SC_DANCING].timer!=-1 ) - speed*=4; + speed *= 6; //呪い時は450加算 if(sc_data[SC_CURSE].timer!=-1) speed = speed + 450; @@ -967,7 +968,7 @@ int battle_get_adelay(struct block_list *bl) if(sc_data[SC_ADRENALINE].timer != -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) { // アドレナリンラッシュ //使用者とパーティメンバーで格差が出る設定でなければ3割減算 - if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penaly) + if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty) aspd_rate -= 30; //そうでなければ2.5割減算 else @@ -1020,7 +1021,7 @@ int battle_get_amotion(struct block_list *bl) aspd_rate -= 30; if(sc_data[SC_ADRENALINE].timer != -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) { // アドレナリンラッシュ - if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penaly) + if(sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty) aspd_rate -= 30; else aspd_rate -= 25; @@ -1579,10 +1580,18 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i if(rand()%100 < sc_data[SC_AUTOGUARD].val2) { damage = 0; clif_skill_nodamage(bl,bl,CR_AUTOGUARD,sc_data[SC_AUTOGUARD].val1,1); + // different delay depending on skill level [celest] + int delay; + if (sc_data[SC_AUTOGUARD].val1 <= 5) + delay = 300; + else if (sc_data[SC_AUTOGUARD].val1 > 5 && sc_data[SC_AUTOGUARD].val1 <= 9) + delay = 200; + else + delay = 100; if(sd) - sd->canmove_tick = gettick() + 300; + sd->canmove_tick = gettick() + delay; else if(md) - md->canmove_tick = gettick() + 300; + md->canmove_tick = gettick() + delay; } } // -- moonsoul (chance to block attacks with new Lord Knight skill parrying) @@ -1838,14 +1847,14 @@ static struct Damage battle_calc_pet_weapon_attack( // 回避率計算、回避判定は後で flee = battle_get_flee(target); - if(battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) - target_count += battle_counttargeted(target,src,battle_config.agi_penaly_count_lv); - if(battle_config.agi_penaly_type > 0) { - if(target_count >= battle_config.agi_penaly_count) { - if(battle_config.agi_penaly_type == 1) - flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num))/100; - else if(battle_config.agi_penaly_type == 2) - flee -= (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num; + if(battle_config.agi_penalty_type > 0 || battle_config.vit_penalty_type > 0) + target_count += battle_counttargeted(target,src,battle_config.agi_penalty_count_lv); + if(battle_config.agi_penalty_type > 0) { + if(target_count >= battle_config.agi_penalty_count) { + if(battle_config.agi_penalty_type == 1) + flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100; + else if(battle_config.agi_penalty_type == 2) + flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num; if(flee < 1) flee = 1; } } @@ -2065,11 +2074,11 @@ static struct Damage battle_calc_pet_weapon_attack( damage = damage*(240+ 60*skill_lv)/100; break; case DC_THROWARROW: // 矢撃ち - damage = damage*(100+ 50 * skill_lv)/100; + damage = damage*(60+ 40 * skill_lv)/100; flag=(flag&~BF_RANGEMASK)|BF_LONG; break; case BA_MUSICALSTRIKE: // ミュージカルストライク - damage = damage*(100+ 50 * skill_lv)/100; + damage = damage*(60+ 40 * skill_lv)/100; flag=(flag&~BF_RANGEMASK)|BF_LONG; break; case CH_TIGERFIST: // 伏虎拳 @@ -2117,18 +2126,18 @@ static struct Damage battle_calc_pet_weapon_attack( // ディバインプロテクション(ここでいいのかな?) if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && def1 < 1000000 ) { //DEF, VIT無視 int t_def; - target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penaly_count_lv); - if(battle_config.vit_penaly_type > 0) { - if(target_count >= battle_config.vit_penaly_count) { - if(battle_config.vit_penaly_type == 1) { - def1 = (def1 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; - def2 = (def2 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; - t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; + target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv); + if(battle_config.vit_penalty_type > 0) { + if(target_count >= battle_config.vit_penalty_count) { + if(battle_config.vit_penalty_type == 1) { + def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; + def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; + t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; } - else if(battle_config.vit_penaly_type == 2) { - def1 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; - def2 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; - t_vit -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; + else if(battle_config.vit_penalty_type == 2) { + def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; + def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; + t_vit -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; } if(def1 < 0) def1 = 0; if(def2 < 1) def2 = 1; @@ -2298,14 +2307,14 @@ static struct Damage battle_calc_mob_weapon_attack( // 回避率計算、回避判定は後で flee = battle_get_flee(target); - if(battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) - target_count += battle_counttargeted(target,src,battle_config.agi_penaly_count_lv); - if(battle_config.agi_penaly_type > 0) { - if(target_count >= battle_config.agi_penaly_count) { - if(battle_config.agi_penaly_type == 1) - flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num))/100; - else if(battle_config.agi_penaly_type == 2) - flee -= (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num; + if(battle_config.agi_penalty_type > 0 || battle_config.vit_penalty_type > 0) + target_count += battle_counttargeted(target,src,battle_config.agi_penalty_count_lv); + if(battle_config.agi_penalty_type > 0) { + if(target_count >= battle_config.agi_penalty_count) { + if(battle_config.agi_penalty_type == 1) + flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100; + else if(battle_config.agi_penalty_type == 2) + flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num; if(flee < 1) flee = 1; } } @@ -2556,11 +2565,11 @@ static struct Damage battle_calc_mob_weapon_attack( div_=4; break; case BA_MUSICALSTRIKE: // ミュージカルストライク - damage = damage*(100+ 50 * skill_lv)/100; + damage = damage*(60+ 40 * skill_lv)/100; flag=(flag&~BF_RANGEMASK)|BF_LONG; break; case DC_THROWARROW: // 矢撃ち - damage = damage*(100+ 50 * skill_lv)/100; + damage = damage*(60+ 40 * skill_lv)/100; flag=(flag&~BF_RANGEMASK)|BF_LONG; break; case MO_COMBOFINISH: // 猛龍拳 @@ -2611,18 +2620,18 @@ static struct Damage battle_calc_mob_weapon_attack( // ディバインプロテクション(ここでいいのかな?) if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && def1 < 1000000) { //DEF, VIT無視 int t_def; - target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penaly_count_lv); - if(battle_config.vit_penaly_type > 0) { - if(target_count >= battle_config.vit_penaly_count) { - if(battle_config.vit_penaly_type == 1) { - def1 = (def1 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; - def2 = (def2 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; - t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; + target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv); + if(battle_config.vit_penalty_type > 0) { + if(target_count >= battle_config.vit_penalty_count) { + if(battle_config.vit_penalty_type == 1) { + def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; + def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; + t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; } - else if(battle_config.vit_penaly_type == 2) { - def1 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; - def2 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; - t_vit -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; + else if(battle_config.vit_penalty_type == 2) { + def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; + def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; + t_vit -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; } if(def1 < 0) def1 = 0; if(def2 < 1) def2 = 1; @@ -2856,14 +2865,14 @@ static struct Damage battle_calc_pc_weapon_attack( // 回避率計算、回避判定は後で flee = battle_get_flee(target); - if(battle_config.agi_penaly_type > 0 || battle_config.vit_penaly_type > 0) //AGI、VITペナルティ設定が有効 - target_count += battle_counttargeted(target,src,battle_config.agi_penaly_count_lv); //対象の数を算出 - if(battle_config.agi_penaly_type > 0) { - if(target_count >= battle_config.agi_penaly_count) { //ペナルティ設定より対象が多い - if(battle_config.agi_penaly_type == 1) //回避率がagi_penaly_num%ずつ減少 - flee = (flee * (100 - (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num))/100; - else if(battle_config.agi_penaly_type == 2) //回避率がagi_penaly_num分減少 - flee -= (target_count - (battle_config.agi_penaly_count - 1))*battle_config.agi_penaly_num; + if(battle_config.agi_penalty_type > 0 || battle_config.vit_penalty_type > 0) //AGI、VITペナルティ設定が有効 + target_count += battle_counttargeted(target,src,battle_config.agi_penalty_count_lv); //対象の数を算出 + if(battle_config.agi_penalty_type > 0) { + if(target_count >= battle_config.agi_penalty_count) { //ペナルティ設定より対象が多い + if(battle_config.agi_penalty_type == 1) //回避率がagi_penalty_num%ずつ減少 + flee = (flee * (100 - (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num))/100; + else if(battle_config.agi_penalty_type == 2) //回避率がagi_penalty_num分減少 + flee -= (target_count - (battle_config.agi_penalty_count - 1))*battle_config.agi_penalty_num; if(flee < 1) flee = 1; //回避率は最低でも1 } } @@ -3365,8 +3374,8 @@ static struct Damage battle_calc_pc_weapon_attack( damage += arr; damage2 += arr; } - damage = damage*(100+ 50 * skill_lv)/100; - damage2 = damage2*(100+ 50 * skill_lv)/100; + damage = damage*(60+ 40 * skill_lv)/100; + damage2 = damage2*(60+ 40 * skill_lv)/100; if(sd->arrow_ele > 0) { s_ele = sd->arrow_ele; s_ele_ = sd->arrow_ele; @@ -3508,18 +3517,18 @@ static struct Damage battle_calc_pc_weapon_attack( // ディバインプロテクション(ここでいいのかな?) if ( skill_num != MO_INVESTIGATE && skill_num != MO_EXTREMITYFIST && skill_num != KN_AUTOCOUNTER && def1 < 1000000) { //DEF, VIT無視 int t_def; - target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penaly_count_lv); - if(battle_config.vit_penaly_type > 0) { - if(target_count >= battle_config.vit_penaly_count) { - if(battle_config.vit_penaly_type == 1) { - def1 = (def1 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; - def2 = (def2 * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; - t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num))/100; + target_count = 1 + battle_counttargeted(target,src,battle_config.vit_penalty_count_lv); + if(battle_config.vit_penalty_type > 0) { + if(target_count >= battle_config.vit_penalty_count) { + if(battle_config.vit_penalty_type == 1) { + def1 = (def1 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; + def2 = (def2 * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; + t_vit = (t_vit * (100 - (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num))/100; } - else if(battle_config.vit_penaly_type == 2) { - def1 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; - def2 -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; - t_vit -= (target_count - (battle_config.vit_penaly_count - 1))*battle_config.vit_penaly_num; + else if(battle_config.vit_penalty_type == 2) { + def1 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; + def2 -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; + t_vit -= (target_count - (battle_config.vit_penalty_count - 1))*battle_config.vit_penalty_num; } if(def1 < 0) def1 = 0; if(def2 < 1) def2 = 1; @@ -5131,14 +5140,14 @@ static const struct { { "undead_detect_type", &battle_config.undead_detect_type }, { "player_auto_counter_type", &battle_config.pc_auto_counter_type }, { "monster_auto_counter_type", &battle_config.monster_auto_counter_type}, - { "agi_penaly_type", &battle_config.agi_penaly_type }, - { "agi_penaly_count", &battle_config.agi_penaly_count }, - { "agi_penaly_num", &battle_config.agi_penaly_num }, - { "agi_penaly_count_lv", &battle_config.agi_penaly_count_lv }, - { "vit_penaly_type", &battle_config.vit_penaly_type }, - { "vit_penaly_count", &battle_config.vit_penaly_count }, - { "vit_penaly_num", &battle_config.vit_penaly_num }, - { "vit_penaly_count_lv", &battle_config.vit_penaly_count_lv }, + { "agi_penalty_type", &battle_config.agi_penalty_type }, + { "agi_penalty_count", &battle_config.agi_penalty_count }, + { "agi_penalty_num", &battle_config.agi_penalty_num }, + { "agi_penalty_count_lv", &battle_config.agi_penalty_count_lv }, + { "vit_penalty_type", &battle_config.vit_penalty_type }, + { "vit_penalty_count", &battle_config.vit_penalty_count }, + { "vit_penalty_num", &battle_config.vit_penalty_num }, + { "vit_penalty_count_lv", &battle_config.vit_penalty_count_lv }, { "player_defense_type", &battle_config.player_defense_type }, { "monster_defense_type", &battle_config.monster_defense_type }, { "pet_defense_type", &battle_config.pet_defense_type }, @@ -5159,7 +5168,7 @@ static const struct { { "monster_attack_direction_change", &battle_config.monster_attack_direction_change }, { "player_land_skill_limit", &battle_config.pc_land_skill_limit }, { "monster_land_skill_limit", &battle_config.monster_land_skill_limit}, - { "party_skill_penaly", &battle_config.party_skill_penaly }, + { "party_skill_penalty", &battle_config.party_skill_penalty }, { "monster_class_change_full_recover", &battle_config.monster_class_change_full_recover }, { "produce_item_name_input", &battle_config.produce_item_name_input }, { "produce_potion_name_input", &battle_config.produce_potion_name_input}, @@ -5365,14 +5374,14 @@ void battle_set_defaults() { battle_config.undead_detect_type = 0; battle_config.pc_auto_counter_type = 1; battle_config.monster_auto_counter_type = 1; - battle_config.agi_penaly_type = 0; - battle_config.agi_penaly_count = 3; - battle_config.agi_penaly_num = 0; - battle_config.agi_penaly_count_lv = ATK_FLEE; - battle_config.vit_penaly_type = 0; - battle_config.vit_penaly_count = 3; - battle_config.vit_penaly_num = 0; - battle_config.vit_penaly_count_lv = ATK_DEF; + battle_config.agi_penalty_type = 0; + battle_config.agi_penalty_count = 3; + battle_config.agi_penalty_num = 0; + battle_config.agi_penalty_count_lv = ATK_FLEE; + battle_config.vit_penalty_type = 0; + battle_config.vit_penalty_count = 3; + battle_config.vit_penalty_num = 0; + battle_config.vit_penalty_count_lv = ATK_DEF; battle_config.player_defense_type = 0; battle_config.monster_defense_type = 0; battle_config.pet_defense_type = 0; @@ -5394,7 +5403,7 @@ void battle_set_defaults() { battle_config.pc_undead_nofreeze = 0; battle_config.pc_land_skill_limit = 1; battle_config.monster_land_skill_limit = 1; - battle_config.party_skill_penaly = 1; + battle_config.party_skill_penalty = 1; battle_config.monster_class_change_full_recover = 0; battle_config.produce_item_name_input = 1; battle_config.produce_potion_name_input = 1; @@ -5534,10 +5543,10 @@ void battle_validate_conf() { battle_config.max_cart_weight = 100; battle_config.max_cart_weight *= 10; - if(battle_config.agi_penaly_count < 2) - battle_config.agi_penaly_count = 2; - if(battle_config.vit_penaly_count < 2) - battle_config.vit_penaly_count = 2; + if(battle_config.agi_penalty_count < 2) + battle_config.agi_penalty_count = 2; + if(battle_config.vit_penalty_count < 2) + battle_config.vit_penalty_count = 2; if(battle_config.guild_exp_limit > 99) battle_config.guild_exp_limit = 99; diff --git a/src/map/battle.h b/src/map/battle.h index 2b901410f..48a543844 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -229,12 +229,12 @@ extern struct Battle_Config { int undead_detect_type; int pc_auto_counter_type; int monster_auto_counter_type; - int agi_penaly_type; - int agi_penaly_count; - int agi_penaly_num; - int vit_penaly_type; - int vit_penaly_count; - int vit_penaly_num; + int agi_penalty_type; + int agi_penalty_count; + int agi_penalty_num; + int vit_penalty_type; + int vit_penalty_count; + int vit_penalty_num; int player_defense_type; int monster_defense_type; int pet_defense_type; @@ -256,7 +256,7 @@ extern struct Battle_Config { int pc_undead_nofreeze; int pc_land_skill_limit; int monster_land_skill_limit; - int party_skill_penaly; + int party_skill_penalty; int monster_class_change_full_recover; int produce_item_name_input; int produce_potion_name_input; @@ -297,8 +297,8 @@ extern struct Battle_Config { int pk_mode; int show_mob_hp; // end additions [Valaris] - int agi_penaly_count_lv; - int vit_penaly_count_lv; + int agi_penalty_count_lv; + int vit_penalty_count_lv; int gx_allhit; int gx_cardfix; diff --git a/src/map/pc.c b/src/map/pc.c index b7c540e1d..3cb78e65a 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1458,7 +1458,7 @@ int pc_calcstatus(struct map_session_data* sd,int first) } if( (skill=pc_checkskill(sd,MC_INCCARRY))>0 ) // skill can be used with an item now, thanks to orn [Valaris] - sd->max_weight += skill*1000; + sd->max_weight += skill*2000; if( (skill=pc_checkskill(sd,AC_OWL))>0 ) // ふくろうの目 sd->paramb[4] += skill; @@ -1467,6 +1467,9 @@ int pc_calcstatus(struct map_session_data* sd,int first) sd->paramb[0] ++; sd->base_atk += 4; } + if((skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){ // Dragonology increases +1 int every 2 levels + sd->paramb[3] += (skill+1)*0.5; + } // New guild skills - Celest if (sd->status.guild_id > 0) { @@ -1656,7 +1659,7 @@ int pc_calcstatus(struct map_session_data* sd,int first) //攻?速度?加 - if( (skill=pc_checkskill(sd,AC_VULTURE))>0){ // ワシの目 + if((skill=pc_checkskill(sd,AC_VULTURE))>0){ // ワシの目 sd->hit += skill; if(sd->status.weapon == 11) sd->attackrange += skill; @@ -1671,27 +1674,17 @@ int pc_calcstatus(struct map_session_data* sd,int first) else if (pc_isriding(sd)) { // ペコペコ?りによる速度?加 sd->speed -= (0.25 * DEFAULT_WALK_SPEED); sd->max_weight += 10000; - } - if(sd->sc_count){ - if(sd->sc_data[SC_WINDWALK].timer!=-1) //ウィンドウォ?ク時はLv*2%減算 - sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100; - if(sd->sc_data[SC_CARTBOOST].timer!=-1) // カ?トブ?スト - sd->speed -= (DEFAULT_WALK_SPEED * 20)/100; - if(sd->sc_data[SC_BERSERK].timer!=-1) //バ?サ?ク中はIAと同じぐらい速い? - sd->speed -= sd->speed *25/100; - if(sd->sc_data[SC_WEDDING].timer!=-1) //結婚中は?くのが?い - sd->speed = 2*DEFAULT_WALK_SPEED; - } - + } if((skill=pc_checkskill(sd,CR_TRUST))>0) { // フェイス sd->status.max_hp += skill*200; sd->subele[6] += skill*5; } - if((skill=pc_checkskill(sd,BS_SKINTEMPER))>0) - { + if((skill=pc_checkskill(sd,BS_SKINTEMPER))>0) { sd->subele[0] += skill; sd->subele[3] += skill*5; } + if((skill=pc_checkskill(sd,SA_ADVANCEDBOOK))>0 ) + aspd_rate -= skill*0.5; bl=sd->status.base_level; @@ -1831,16 +1824,17 @@ int pc_calcstatus(struct map_session_data* sd,int first) } if(sd->sc_data[SC_NIBELUNGEN].timer!=-1) { // ニ?ベルングの指輪 index = sd->equip_index[9]; - if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3) + /*if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3) sd->watk += sd->sc_data[SC_NIBELUNGEN].val3; index = sd->equip_index[8]; if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 3) sd->watk_ += sd->sc_data[SC_NIBELUNGEN].val3; + index = sd->equip_index[9];*/ if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4) - sd->watk += sd->sc_data[SC_NIBELUNGEN].val2; + sd->watk2 += sd->sc_data[SC_NIBELUNGEN].val3; index = sd->equip_index[8]; if(index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->wlv == 4) - sd->watk_ += sd->sc_data[SC_NIBELUNGEN].val2; + sd->watk_2 += sd->sc_data[SC_NIBELUNGEN].val3; } if(sd->sc_data[SC_VOLCANO].timer!=-1 && sd->def_ele==3){ // ボルケ?ノ @@ -1876,7 +1870,7 @@ int pc_calcstatus(struct map_session_data* sd,int first) aspd_rate -= 30; if(sd->sc_data[SC_ADRENALINE].timer != -1 && sd->sc_data[SC_TWOHANDQUICKEN].timer == -1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) { // アドレナリンラッシュ - if(sd->sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penaly) + if(sd->sc_data[SC_ADRENALINE].val2 || !battle_config.party_skill_penalty) aspd_rate -= 30; else aspd_rate -= 25; @@ -1896,6 +1890,14 @@ int pc_calcstatus(struct map_session_data* sd,int first) sd->sc_data[i=SC_SPEEDPOTION1].timer!=-1 || sd->sc_data[i=SC_SPEEDPOTION0].timer!=-1) // ? 速ポ?ション aspd_rate -= sd->sc_data[i].val2; + if(sd->sc_data[SC_WINDWALK].timer!=-1) //ウィンドウォ?ク時はLv*2%減算 + sd->speed -= sd->speed *(sd->sc_data[SC_WINDWALK].val1*2)/100; + if(sd->sc_data[SC_CARTBOOST].timer!=-1) // カ?トブ?スト + sd->speed -= (DEFAULT_WALK_SPEED * 20)/100; + if(sd->sc_data[SC_BERSERK].timer!=-1) //バ?サ?ク中はIAと同じぐらい速い? + sd->speed -= sd->speed *25/100; + if(sd->sc_data[SC_WEDDING].timer!=-1) //結婚中は?くのが?い + sd->speed = 2*DEFAULT_WALK_SPEED; // HIT/FLEE?化系 if(sd->sc_data[SC_WHISTLE].timer!=-1){ // 口笛 @@ -1980,13 +1982,15 @@ int pc_calcstatus(struct map_session_data* sd,int first) } if(sd->sc_data[SC_DEFENDER].timer != -1) { sd->aspd += (550 - sd->sc_data[SC_DEFENDER].val1*50); - sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; + // removed as of 12/14's patch [celest] + //sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; } if(sd->sc_data[SC_ENCPOISON].timer != -1) sd->addeff[4] += sd->sc_data[SC_ENCPOISON].val2; if( sd->sc_data[SC_DANCING].timer!=-1 ){ // 演奏/ダンス使用中 - sd->speed*=4; + sd->speed = (double)sd->speed * (6.- 0.4 * pc_checkskill(sd, ((s_class.job == 19) ? BA_MUSICALLESSON : DC_DANCINGLESSON))); + //sd->speed*=4; sd->nhealsp = 0; sd->nshealsp = 0; sd->nsshealsp = 0; @@ -2175,10 +2179,11 @@ int pc_calcspeed (struct map_session_data *sd) sd->speed = (sd->speed * 125) / 100; } if(sd->sc_data[SC_DEFENDER].timer != -1) { - sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; + // removed as of 12/14's patch [celest] + //sd->speed = (sd->speed * (155 - sd->sc_data[SC_DEFENDER].val1*5)) / 100; } if( sd->sc_data[SC_DANCING].timer!=-1 ){ - sd->speed*=4; + sd->speed = (double)sd->speed * (6.- 0.4 * pc_checkskill(sd, ((s_class.job == 19) ? BA_MUSICALLESSON : DC_DANCINGLESSON))); } if(sd->sc_data[SC_CURSE].timer!=-1) sd->speed += 450; diff --git a/src/map/skill.c b/src/map/skill.c index be23b2234..3cdc4a8f4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1195,6 +1195,11 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s } break; + case AM_ACIDTERROR: + if( rand()%100 < (skilllv*3)*sc_def_vit/100 ) + skill_status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0); + break; + case CR_SHIELDCHARGE: /* シ?ルドチャ?ジ */ if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 ) skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0); @@ -2391,8 +2396,10 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s case AM_ACIDTERROR: /* アシッドテラ? */ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag); - if(bl->type == BL_PC && rand()%100 < skill_get_time(skillid,skilllv) && battle_config.equipment_breaking) + if(bl->type == BL_PC && rand()%100 < skill_get_time(skillid,skilllv) && battle_config.equipment_breaking) { pc_breakarmor((struct map_session_data *)bl); + clif_emotion(bl, 23); + } break; case MO_FINGEROFFENSIVE: /* 指? */ { @@ -3170,7 +3177,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int break; } } - if(rand()%100 > (75+skilllv*1) && (skilllv != 5)) { + if(rand()%100 > (60+skilllv*10) && (skilllv != 5)) { clif_skill_fail(sd,skillid,0,0); clif_skill_nodamage(src,bl,skillid,skilllv,0); if(bl->type==BL_PC && battle_config.equipment_breaking) { @@ -5041,15 +5048,19 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil pc_movepos(sd,x,y); }else if( src->type==BL_MOB ) mob_warp((struct mob_data *)src,-1,x,y,0); + skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,MO_EXTREMITYFIST,0,2000,0 ); break; case AM_CANNIBALIZE: // バイオプラント if(sd){ int mx,my,id=0; + int summons[5] = { 1020, 1068, 1118, 1500, 1368 }; + struct mob_data *md; mx = x;// + (rand()%10 - 5); my = y;// + (rand()%10 - 5); - id=mob_once_spawn(sd,"this",mx,my,"--ja--",1118,1,""); + + id=mob_once_spawn(sd,"this",mx,my,"--ja--", summons[skilllv] ,1,""); if( (md=(struct mob_data *)map_id2bl(id)) !=NULL ){ md->master_id=sd->bl.id; md->hp=2210+skilllv*200; @@ -5069,7 +5080,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil id=mob_once_spawn(sd,"this",mx,my,"--ja--",1142,1,""); if( (md=(struct mob_data *)map_id2bl(id)) !=NULL ){ md->master_id=sd->bl.id; - md->hp=1000+skilllv*200; + md->hp=2000+skilllv*400; md->state.special_mob_ai=2; md->deletetimer=add_timer(gettick()+skill_get_time(skillid,skilllv),mob_timer_delete,id,0); } @@ -5272,7 +5283,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case PR_SANCTUARY: /* サンクチュアリ */ count=21; limit=skill_get_time(skillid,skilllv); - val1=skilllv+3; + val1=(skilllv+3)*2; val2=(skilllv>6)?777:skilllv*100; target=BCT_ALL; range=1; @@ -5390,7 +5401,8 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case SA_DELUGE: /* デリュ?ジ */ case SA_VIOLENTGALE: /* バイオレントゲイル */ limit=skill_get_time(skillid,skilllv); - count=skilllv<=2?25:(skilllv<=4?49:81); + //count=skilllv<=2?25:(skilllv<=4?49:81); + count=49; target=BCT_ALL; break; @@ -5408,7 +5420,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, count=81; limit=skill_get_time(skillid,skilllv); range=5; - target=BCT_ALL; + target=(skillid==BD_ETERNALCHAOS ? BCT_ENEMY : BCT_ALL); break; case BD_RICHMANKIM: case BD_DRUMBATTLEFIELD: /* ?太鼓の響き */ @@ -5897,8 +5909,11 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int clif_skill_nodamage(&src->bl,bl,AL_HEAL,heal,1); battle_heal(NULL,bl,heal,0,0); } - else + else { + // reduce healing count if this was meant for damaging [celest] + sg->val1 /= 2; skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0); + } } break; @@ -7032,6 +7047,10 @@ int skill_check_condition(struct map_session_data *sd,int type) } else sd->spiritball_old = lv; break; + case MO_BODYRELOCATION: + if (sd->sc_count && sd->sc_data[SC_EXPLOSIONSPIRITS].timer!=-1) + spiritball = 0; + break; case MO_CHAINCOMBO: //連打掌 if(sd->sc_data[SC_BLADESTOP].timer==-1){ if(sd->sc_data[SC_COMBO].timer == -1 || sd->sc_data[SC_COMBO].val1 != MO_TRIPLEATTACK) @@ -7094,8 +7113,9 @@ int skill_check_condition(struct map_session_data *sd,int type) case AM_SPHEREMINE: /* スフィア?マイン */ if(type&1){ int c=0; - int maxcount=skill_get_maxcount(skill); - int mob_class=(skill==AM_CANNIBALIZE)?1118:1142; + int summons[5] = { 1020, 1068, 1118, 1500, 1368 }; + int maxcount = (skill==AM_CANNIBALIZE)? 6-lv : skill_get_maxcount(skill); + int mob_class = (skill==AM_CANNIBALIZE)? summons[lv] :1142; if(battle_config.pc_land_skill_limit && maxcount>0) { map_foreachinarea(skill_check_condition_mob_master_sub ,sd->bl.m, 0, 0, map[sd->bl.m].xs, map[sd->bl.m].ys, BL_MOB, sd->bl.id, mob_class,&c ); if(c >= maxcount){ @@ -7657,15 +7677,16 @@ int skill_use_id( struct map_session_data *sd, int target_id, return 0; } break; - case AS_SPLASHER: /* ベナムスプラッシャ? */ - { + // removed on 12/14's patch [celest] + //case AS_SPLASHER: /* ベナムスプラッシャ? */ + /* { struct status_change *t_sc_data = battle_get_sc_data(bl); if(t_sc_data && t_sc_data[SC_POISON].timer==-1){ clif_skill_fail(sd,skill_num,0,10); return 0; } } - break; + break;*/ case PF_MEMORIZE: /* メモライズ */ casttime = 12000; break; @@ -8860,12 +8881,11 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) struct status_change *sc_data; //short *sc_count; //使ってない? - if( (bl=map_id2bl(id)) == NULL ) - return 0; //該?IDがすでに消滅しているというのはいかにもありそうなのでスル?してみる + nullpo_retr(0, bl=map_id2bl(id)); nullpo_retr(0, sc_data=battle_get_sc_data(bl)); if(bl->type==BL_PC) - sd=(struct map_session_data *)bl; + nullpo_retr(0, sd=(struct map_session_data *)bl); //sc_count=battle_get_sc_count(bl); //使ってない? @@ -8975,8 +8995,8 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) case SC_WATERBALL: /* ウォ?タ?ボ?ル */ { struct block_list *target=map_id2bl(sc_data[type].val2); - if(target==NULL || target->prev==NULL) - break; + nullpo_retb(target); + nullpo_retb(target->prev); skill_attack(BF_MAGIC,bl,bl,target,WZ_WATERBALL,sc_data[type].val1,tick,0); if((--sc_data[type].val3)>0) { sc_data[type].timer=add_timer( 150+tick,skill_status_change_timer, bl->id, data ); @@ -9003,12 +9023,14 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) struct skill_unit *unit= (struct skill_unit *)sc_data[type].val4; struct block_list *src; - - if(!unit || !unit->group) + /*if(!unit || !unit->group) break; src=map_id2bl(unit->group->src_id); if(!src) - break; + break;*/ + nullpo_retb(unit); + nullpo_retb(unit->group); + nullpo_retr(0, src=map_id2bl(unit->group->src_id)); skill_attack(BF_MISC,src,&unit->bl,bl,unit->group->skill_id,sc_data[type].val1,tick,0); sc_data[type].timer=add_timer(skill_get_time2(unit->group->skill_id,unit->group->skill_lv)+tick, skill_status_change_timer, bl->id, data ); @@ -9020,7 +9042,9 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) if( (--sc_data[type].val2)>0){ struct skill_unit *unit= (struct skill_unit *)sc_data[type].val4; - if(!unit || !unit->group || unit->group->src_id==bl->id) + nullpo_retb(unit); + nullpo_retb(unit->group); + if(unit->group->src_id == bl->id) break; skill_additional_effect(bl,bl,unit->group->skill_id,sc_data[type].val1,BF_LONG|BF_SKILL|BF_MISC,tick); if (unit->group != 0) @@ -9048,8 +9072,8 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) if((++sc_data[type].val4)%5 == 0 && battle_get_hp(bl) > hp>>2) { hp = hp/100; if(hp < 1) hp = 1; - if(bl->type == BL_PC) - pc_heal((struct map_session_data *)bl,-hp,0); + if(sd) + pc_heal(sd,-hp,0); else if(bl->type == BL_MOB){ struct mob_data *md; if((md=((struct mob_data *)bl)) == NULL) @@ -9072,8 +9096,9 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) } else if(bl->type == BL_MOB) { struct mob_data *md; - if((md=((struct mob_data *)bl)) == NULL) - break; + nullpo_retr(0, md=(struct mob_data *)bl); + /*if((md=((struct mob_data *)bl)) == NULL) + break;*/ hp = 3 + hp/200; md->hp -= hp; } @@ -9088,13 +9113,14 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) if (sc_data[SC_SLOWPOISON].timer == -1 && (--sc_data[type].val3) > 0) { int hp = battle_get_max_hp(bl); if (battle_get_hp(bl) > hp>>2) { - if(bl->type == BL_PC) { + if(sd) { hp = 3 + hp/50; - pc_heal((struct map_session_data *)bl, -hp, 0); + pc_heal(sd, -hp, 0); } else if (bl->type == BL_MOB) { struct mob_data *md; - if ((md=((struct mob_data *)bl)) == NULL) - break; + nullpo_retr(0, md=(struct mob_data *)bl); + /*if ((md=((struct mob_data *)bl)) == NULL) + break;*/ hp = 3 + hp/100; md->hp -= hp; } @@ -9124,14 +9150,15 @@ int skill_status_change_timer(int tid, unsigned int tick, int id, int data) // case SC_BLEEDING: if((--sc_data[type].val3) > 0) { int hp = battle_get_max_hp(bl); - if(bl->type == BL_PC) { + if(sd) { hp = 3 + hp*3/200; - pc_heal((struct map_session_data *)bl,-hp,0); + pc_heal(sd,-hp,0); } else if(bl->type == BL_MOB) { struct mob_data *md; - if((md=((struct mob_data *)bl)) == NULL) - break; + nullpo_retr(0, md=(struct mob_data *)bl); + /*if((md=((struct mob_data *)bl)) == NULL) + break;*/ hp = 3 + hp/200; md->hp -= hp; } @@ -9517,11 +9544,13 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val calc_flag = 1; break; case SC_WEAPONPERFECTION: /* ウェポンパ?フェクション */ - if(battle_config.party_skill_penaly && !val2) tick /= 5; + // Lasting time penalties have been removed on sakray as of 12/14 [celest] + //if(battle_config.party_skill_penalty && !val2) tick /= 5; break; case SC_OVERTHRUST: /* オ?バ?スラスト */ *opt3 |= 2; - if(battle_config.party_skill_penaly && !val2) tick /= 10; + // Lasting time penalties have been removed on sakray as of 12/14 [celest] + //if(battle_config.party_skill_penalty && !val2) tick /= 10; break; case SC_MAXIMIZEPOWER: /* マキシマイズパワ?(SPが1減る時間,val2にも) */ if(bl->type == BL_PC) @@ -9682,7 +9711,7 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val break; case SC_NIBELUNGEN: /* ニ?ベルングの指輪 */ calc_flag = 1; - val2 = (val1+2)*50; + //val2 = (val1+2)*50; val3 = (val1+2)*25; break; case SC_ROKISWEIL: /* ロキの叫び */ @@ -9691,7 +9720,7 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val break; case SC_SIEGFRIED: /* 不死身のジ?クフリ?ド */ calc_flag = 1; - val2 = 40 + val1*5; + val2 = 55 + val1*5; val3 = val1*10; break; case SC_DISSONANCE: /* 不協和音 */ |