diff options
-rw-r--r-- | src/map/battle.cpp | 641 | ||||
-rw-r--r-- | src/map/clif.cpp | 101 | ||||
-rw-r--r-- | src/map/map.cpp | 3 | ||||
-rw-r--r-- | src/map/map.hpp | 1 | ||||
-rw-r--r-- | src/map/map.t.hpp | 3 | ||||
-rw-r--r-- | src/map/mob.cpp | 101 | ||||
-rw-r--r-- | src/map/pc.cpp | 576 | ||||
-rw-r--r-- | src/map/skill.cpp | 1028 | ||||
-rw-r--r-- | src/map/skill.hpp | 1 | ||||
-rw-r--r-- | src/map/skill.t.hpp | 289 |
10 files changed, 108 insertions, 2636 deletions
diff --git a/src/map/battle.cpp b/src/map/battle.cpp index fe14615..4d98b45 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -129,7 +129,6 @@ int battle_get_max_hp(struct block_list *bl) return ((struct map_session_data *) bl)->status.max_hp; else { - eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); int max_hp = 1; if (bl->type == BL_MOB && ((struct mob_data *) bl)) { @@ -145,14 +144,6 @@ int battle_get_max_hp(struct block_list *bl) max_hp = (max_hp * battle_config.monster_hp_rate) / 100; } } - if (sc_data) - { - if (sc_data[SC_APPLEIDUN].timer != -1) - max_hp += - ((5 + sc_data[SC_APPLEIDUN].val1 * 2 + - ((sc_data[SC_APPLEIDUN].val2 + 1) >> 1) + - sc_data[SC_APPLEIDUN].val3 / 10) * max_hp) / 100; - } if (max_hp < 1) max_hp = 1; return max_hp; @@ -176,23 +167,6 @@ int battle_get_str(struct block_list *bl) else if (bl->type == BL_PC && ((struct map_session_data *) bl)) return ((struct map_session_data *) bl)->paramc[ATTR::STR]; - if (sc_data) - { - if (sc_data[SC_LOUD].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 - && bl->type != BL_PC) - str += 4; - if (sc_data[SC_BLESSING].timer != -1 && bl->type != BL_PC) - { // ブレッシング - int race = battle_get_race(bl); - if (battle_check_undead(race, battle_get_elem_type(bl)) - || race == 6) - str >>= 1; // 悪 魔/不死 - else - str += sc_data[SC_BLESSING].val1; // その他 - } - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - str += 5; - } if (str < 0) str = 0; return str; @@ -216,23 +190,6 @@ int battle_get_agi(struct block_list *bl) else if (bl->type == BL_PC && (struct map_session_data *) bl) agi = ((struct map_session_data *) bl)->paramc[ATTR::AGI]; - if (sc_data) - { - if (sc_data[SC_INCREASEAGI].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1 && bl->type != BL_PC) // 速度増加(PCはpc.cで) - agi += 2 + sc_data[SC_INCREASEAGI].val1; - - if (sc_data[SC_CONCENTRATE].timer != -1 - && sc_data[SC_QUAGMIRE].timer == -1 && bl->type != BL_PC) - agi += agi * (2 + sc_data[SC_CONCENTRATE].val1) / 100; - - if (sc_data[SC_DECREASEAGI].timer != -1) // 速度減少 - agi -= 2 + sc_data[SC_DECREASEAGI].val1; - - if (sc_data[SC_QUAGMIRE].timer != -1) // クァグマイア - agi >>= 1; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - agi += 5; - } if (agi < 0) agi = 0; return agi; @@ -254,13 +211,6 @@ int battle_get_vit(struct block_list *bl) vit = ((struct mob_data *) bl)->stats[MOB_VIT]; else if (bl->type == BL_PC && (struct map_session_data *) bl) vit = ((struct map_session_data *) bl)->paramc[ATTR::VIT]; - if (sc_data) - { - if (sc_data[SC_STRIPARMOR].timer != -1 && bl->type != BL_PC) - vit = vit * 60 / 100; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - vit += 5; - } if (vit < 0) vit = 0; @@ -284,22 +234,6 @@ int battle_get_int(struct block_list *bl) else if (bl->type == BL_PC && (struct map_session_data *) bl) int_ = ((struct map_session_data *) bl)->paramc[ATTR::INT]; - if (sc_data) - { - if (sc_data[SC_BLESSING].timer != -1 && bl->type != BL_PC) - { // ブレッシング - int race = battle_get_race(bl); - if (battle_check_undead(race, battle_get_elem_type(bl)) - || race == 6) - int_ >>= 1; // 悪 魔/不死 - else - int_ += sc_data[SC_BLESSING].val1; // その他 - } - if (sc_data[SC_STRIPHELM].timer != -1 && bl->type != BL_PC) - int_ = int_ * 60 / 100; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - int_ += 5; - } if (int_ < 0) int_ = 0; return int_; @@ -322,27 +256,6 @@ int battle_get_dex(struct block_list *bl) else if (bl->type == BL_PC && (struct map_session_data *) bl) dex = ((struct map_session_data *) bl)->paramc[ATTR::DEX]; - if (sc_data) - { - if (sc_data[SC_CONCENTRATE].timer != -1 - && sc_data[SC_QUAGMIRE].timer == -1 && bl->type != BL_PC) - dex += dex * (2 + sc_data[SC_CONCENTRATE].val1) / 100; - - if (sc_data[SC_BLESSING].timer != -1 && bl->type != BL_PC) - { // ブレッシング - int race = battle_get_race(bl); - if (battle_check_undead(race, battle_get_elem_type(bl)) - || race == 6) - dex >>= 1; // 悪 魔/不死 - else - dex += sc_data[SC_BLESSING].val1; // その他 - } - - if (sc_data[SC_QUAGMIRE].timer != -1) // クァグマイア - dex >>= 1; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - dex += 5; - } if (dex < 0) dex = 0; return dex; @@ -367,12 +280,8 @@ int battle_get_luk(struct block_list *bl) if (sc_data) { - if (sc_data[SC_GLORIA].timer != -1 && bl->type != BL_PC) // グロリア(PCはpc.cで) - luk += 30; if (sc_data[SC_CURSE].timer != -1) // 呪い luk = 0; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - luk += 5; } if (luk < 0) luk = 0; @@ -399,16 +308,8 @@ int battle_get_flee(struct block_list *bl) if (sc_data) { - if (sc_data[SC_WHISTLE].timer != -1 && bl->type != BL_PC) - flee += - flee * (sc_data[SC_WHISTLE].val1 + sc_data[SC_WHISTLE].val2 + - (sc_data[SC_WHISTLE].val3 >> 16)) / 100; if (sc_data[SC_BLIND].timer != -1 && bl->type != BL_PC) flee -= flee * 25 / 100; - if (sc_data[SC_WINDWALK].timer != -1 && bl->type != BL_PC) // ウィンドウォーク - flee += flee * (sc_data[SC_WINDWALK].val2) / 100; - if (sc_data[SC_SPIDERWEB].timer != -1 && bl->type != BL_PC) //スパイダーウェブ - flee -= flee * 50 / 100; if (battle_is_unarmed(bl)) flee += (skill_power_bl(bl, TMW_BRAWLING) >> 3); // +25 for 200 @@ -439,17 +340,8 @@ int battle_get_hit(struct block_list *bl) if (sc_data) { - if (sc_data[SC_HUMMING].timer != -1 && bl->type != BL_PC) // - hit += - hit * (sc_data[SC_HUMMING].val1 * 2 + - sc_data[SC_HUMMING].val2 + - sc_data[SC_HUMMING].val3) / 100; if (sc_data[SC_BLIND].timer != -1 && bl->type != BL_PC) // 呪い hit -= hit * 25 / 100; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) // トゥルーサイト - hit += 3 * (sc_data[SC_TRUESIGHT].val1); - if (sc_data[SC_CONCENTRATION].timer != -1 && bl->type != BL_PC) //コンセントレーション - hit += (hit * (10 * (sc_data[SC_CONCENTRATION].val1))) / 100; if (battle_is_unarmed(bl)) hit += (skill_power_bl(bl, TMW_BRAWLING) >> 4); // +12 for 200 @@ -482,12 +374,7 @@ int battle_get_flee2(struct block_list *bl) else flee2 = battle_get_luk(bl) + 1; - if (sc_data) { - if (sc_data[SC_WHISTLE].timer != -1 && bl->type != BL_PC) - flee2 += (sc_data[SC_WHISTLE].val1 + sc_data[SC_WHISTLE].val2 - + (sc_data[SC_WHISTLE].val3 & 0xffff)) * 10; - if (battle_is_unarmed(bl)) flee2 += (skill_power_bl(bl, TMW_BRAWLING) >> 3); // +25 for 200 flee2 += skill_power_bl(bl, TMW_SPEED) >> 3; @@ -520,17 +407,6 @@ int battle_get_critical(struct block_list *bl) else critical = battle_get_luk(bl) * 3 + 1; - if (sc_data) - { - if (sc_data[SC_FORTUNE].timer != -1 && bl->type != BL_PC) - critical += - (10 + sc_data[SC_FORTUNE].val1 + sc_data[SC_FORTUNE].val2 + - sc_data[SC_FORTUNE].val3) * 10; - if (sc_data[SC_EXPLOSIONSPIRITS].timer != -1 && bl->type != BL_PC) - critical += sc_data[SC_EXPLOSIONSPIRITS].val2; - if (sc_data[SC_TRUESIGHT].timer != -1 && bl->type != BL_PC) //トゥルーサイト - critical += critical * sc_data[SC_TRUESIGHT].val1 / 100; - } if (critical < 1) critical = 1; return critical; @@ -560,12 +436,8 @@ int battle_get_baseatk(struct block_list *bl) } if (sc_data) { //状態異常あり - if (sc_data[SC_PROVOKE].timer != -1 && bl->type != BL_PC) //PCでプロボック(SM_PROVOKE)状態 - batk = batk * (100 + 2 * sc_data[SC_PROVOKE].val1) / 100; //base_atk増加 if (sc_data[SC_CURSE].timer != -1) //呪われていたら batk -= batk * 25 / 100; //base_atkが25%減少 - if (sc_data[SC_CONCENTRATION].timer != -1 && bl->type != BL_PC) //コンセントレーション - batk += batk * (5 * sc_data[SC_CONCENTRATION].val1) / 100; } if (batk < 1) batk = 1; //base_atkは最低でも1 @@ -592,12 +464,8 @@ int battle_get_atk(struct block_list *bl) if (sc_data) { - if (sc_data[SC_PROVOKE].timer != -1 && bl->type != BL_PC) - atk = atk * (100 + 2 * sc_data[SC_PROVOKE].val1) / 100; if (sc_data[SC_CURSE].timer != -1) atk -= atk * 25 / 100; - if (sc_data[SC_CONCENTRATION].timer != -1 && bl->type != BL_PC) //コンセントレーション - atk += atk * (5 * sc_data[SC_CONCENTRATION].val1) / 100; } if (atk < 0) atk = 0; @@ -644,21 +512,8 @@ int battle_get_atk2(struct block_list *bl) atk2 = ((struct mob_data *) bl)->stats[MOB_ATK2]; if (sc_data) { - if (sc_data[SC_IMPOSITIO].timer != -1) - atk2 += sc_data[SC_IMPOSITIO].val1 * 5; - if (sc_data[SC_PROVOKE].timer != -1) - atk2 = atk2 * (100 + 2 * sc_data[SC_PROVOKE].val1) / 100; if (sc_data[SC_CURSE].timer != -1) atk2 -= atk2 * 25 / 100; - 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; - if (sc_data[SC_STRIPWEAPON].timer != -1) - atk2 = atk2 * 90 / 100; - if (sc_data[SC_CONCENTRATION].timer != -1) //コンセントレーション - atk2 += atk2 * (5 * sc_data[SC_CONCENTRATION].val1) / 100; } if (atk2 < 0) @@ -698,9 +553,6 @@ int battle_get_matk1(struct block_list *bl) int matk, int_ = battle_get_int(bl); matk = int_ + (int_ / 5) * (int_ / 5); - if (sc_data) - if (sc_data[SC_MINDBREAKER].timer != -1 && bl->type != BL_PC) - matk = matk * (100 + 2 * sc_data[SC_MINDBREAKER].val1) / 100; return matk; } else if (bl->type == BL_PC && (struct map_session_data *) bl) @@ -717,16 +569,12 @@ int battle_get_matk1(struct block_list *bl) static int battle_get_matk2(struct block_list *bl) { - eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); nullpo_ret(bl); if (bl->type == BL_MOB) { int matk, int_ = battle_get_int(bl); matk = int_ + (int_ / 7) * (int_ / 7); - if (sc_data) - if (sc_data[SC_MINDBREAKER].timer != -1 && bl->type != BL_PC) - matk = matk * (100 + 2 * sc_data[SC_MINDBREAKER].val1) / 100; return matk; } else if (bl->type == BL_PC && (struct map_session_data *) bl) @@ -765,36 +613,14 @@ int battle_get_def(struct block_list *bl) { if (sc_data) { - //キーピング時はDEF100 - if (sc_data[SC_KEEPING].timer != -1) - def = 100; - //プロボック時は減算 - if (sc_data[SC_PROVOKE].timer != -1 && bl->type != BL_PC) - def = (def * (100 - 6 * sc_data[SC_PROVOKE].val1) + 50) / 100; - //戦太鼓の響き時は加算 - if (sc_data[SC_DRUMBATTLE].timer != -1 && bl->type != BL_PC) - def += sc_data[SC_DRUMBATTLE].val3; //毒にかかっている時は減算 if (sc_data[SC_POISON].timer != -1 && bl->type != BL_PC) def = def * 75 / 100; - //ストリップシールド時は減算 - if (sc_data[SC_STRIPSHIELD].timer != -1 && bl->type != BL_PC) - def = def * 85 / 100; - //シグナムクルシス時は減算 - if (sc_data[SC_SIGNUMCRUCIS].timer != -1 && bl->type != BL_PC) - def = def * (100 - sc_data[SC_SIGNUMCRUCIS].val2) / 100; - //永遠の混沌時はDEF0になる - if (sc_data[SC_ETERNALCHAOS].timer != -1 && bl->type != BL_PC) - def = 0; //凍結、石化時は右シフト if (sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0)) def >>= 1; - //コンセントレーション時は減算 - if (sc_data[SC_CONCENTRATION].timer != -1 && bl->type != BL_PC) - def = - (def * (100 - 5 * sc_data[SC_CONCENTRATION].val1)) / 100; } //詠唱中は詠唱時減算率に基づいて減算 if (skilltimer != -1) @@ -837,15 +663,11 @@ int battle_get_mdef(struct block_list *bl) if (mdef > 90) mdef = 90; } - if (sc_data[SC_BARRIER].timer != -1) - mdef = 100; //凍結、石化時は1.25倍 if (sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0)) mdef = mdef * 125 / 100; - if (sc_data[SC_MINDBREAKER].timer != -1 && bl->type != BL_PC) - mdef -= (mdef * 6 * sc_data[SC_MINDBREAKER].val1) / 100; } } if (mdef < 0) @@ -872,15 +694,8 @@ int battle_get_def2(struct block_list *bl) if (sc_data) { - if (sc_data[SC_ANGELUS].timer != -1 && bl->type != BL_PC) - def2 = def2 * (110 + 5 * sc_data[SC_ANGELUS].val1) / 100; - if (sc_data[SC_PROVOKE].timer != -1 && bl->type != BL_PC) - def2 = (def2 * (100 - 6 * sc_data[SC_PROVOKE].val1) + 50) / 100; if (sc_data[SC_POISON].timer != -1 && bl->type != BL_PC) def2 = def2 * 75 / 100; - //コンセントレーション時は減算 - if (sc_data[SC_CONCENTRATION].timer != -1 && bl->type != BL_PC) - def2 = def2 * (100 - 5 * sc_data[SC_CONCENTRATION].val1) / 100; } if (def2 < 1) def2 = 1; @@ -895,7 +710,6 @@ int battle_get_def2(struct block_list *bl) int battle_get_mdef2(struct block_list *bl) { int mdef2 = 0; - eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); nullpo_ret(bl); if (bl->type == BL_MOB) @@ -906,11 +720,7 @@ int battle_get_mdef2(struct block_list *bl) mdef2 = ((struct map_session_data *) bl)->mdef2 + (((struct map_session_data *) bl)->paramc[ATTR::VIT] >> 1); - if (sc_data) - { - if (sc_data[SC_MINDBREAKER].timer != -1 && bl->type != BL_PC) - mdef2 -= (mdef2 * 6 * sc_data[SC_MINDBREAKER].val1) / 100; - } + if (mdef2 < 0) mdef2 = 0; return mdef2; @@ -936,37 +746,8 @@ int battle_get_speed(struct block_list *bl) if (sc_data) { - //速度増加時は25%減算 - if (sc_data[SC_INCREASEAGI].timer != -1 - && sc_data[SC_DONTFORGETME].timer == -1) - speed -= speed * 25 / 100; - //速度減少時は25%加算 - if (sc_data[SC_DECREASEAGI].timer != -1) - speed = speed * 125 / 100; - //クァグマイア時は50%加算 - if (sc_data[SC_QUAGMIRE].timer != -1) - speed = speed * 3 / 2; - //私を忘れないで…時は加算 - if (sc_data[SC_DONTFORGETME].timer != -1) - speed = - speed * (100 + sc_data[SC_DONTFORGETME].val1 * 2 + - sc_data[SC_DONTFORGETME].val2 + - (sc_data[SC_DONTFORGETME].val3 & 0xffff)) / 100; - //金剛時は25%加算 - 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; - //踊り状態は4倍遅い - if (sc_data[SC_DANCING].timer != -1) - speed *= 4; - //呪い時は450加算 if (sc_data[SC_CURSE].timer != -1) speed = speed + 450; - //ウィンドウォーク時はLv*2%減算 - if (sc_data[SC_WINDWALK].timer != -1) - speed -= (speed * (sc_data[SC_WINDWALK].val1 * 2)) / 100; } if (speed < 1) speed = 1; @@ -993,57 +774,11 @@ int battle_get_adelay(struct block_list *bl) if (sc_data) { - //ツーハンドクイッケン使用時でクァグマイアでも私を忘れないで…でもない時は3割減算 - if (sc_data[SC_TWOHANDQUICKEN].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // 2HQ - 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) - { // アドレナリンラッシュ - //使用者とパーティメンバーで格差が出る設定でなければ3割減算 - if (sc_data[SC_ADRENALINE].val2 - || !battle_config.party_skill_penaly) - aspd_rate -= 30; - //そうでなければ2.5割減算 - else - aspd_rate -= 25; - } - //スピアクィッケン時は減算 - if (sc_data[SC_SPEARSQUICKEN].timer != -1 && sc_data[SC_ADRENALINE].timer == -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // スピアクィッケン - aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2; - //夕日のアサシンクロス時は減算 - if (sc_data[SC_ASSNCROS].timer != -1 && // 夕陽のアサシンクロス - sc_data[SC_TWOHANDQUICKEN].timer == -1 - && sc_data[SC_ADRENALINE].timer == -1 - && sc_data[SC_SPEARSQUICKEN].timer == -1 - && sc_data[SC_DONTFORGETME].timer == -1) - aspd_rate -= - 5 + sc_data[SC_ASSNCROS].val1 + - sc_data[SC_ASSNCROS].val2 + sc_data[SC_ASSNCROS].val3; - //私を忘れないで…時は加算 - if (sc_data[SC_DONTFORGETME].timer != -1) // 私を忘れないで - aspd_rate += - sc_data[SC_DONTFORGETME].val1 * 3 + - sc_data[SC_DONTFORGETME].val2 + - (sc_data[SC_DONTFORGETME].val3 >> 16); - //金剛時25%加算 - if (sc_data[SC_STEELBODY].timer != -1) // 金剛 - aspd_rate += 25; - //増速ポーション使用時は減算 - if (sc_data[SC_SPEEDPOTION2].timer != -1) - aspd_rate -= sc_data[SC_SPEEDPOTION2].val1; - else if (sc_data[SC_SPEEDPOTION1].timer != -1) - aspd_rate -= sc_data[SC_SPEEDPOTION2].val1; - else if (sc_data[SC_SPEEDPOTION0].timer != -1) - aspd_rate -= sc_data[SC_SPEEDPOTION2].val1; + if (sc_data[SC_SPEEDPOTION0].timer != -1) + aspd_rate -= sc_data[SC_SPEEDPOTION0].val1; // Fate's `haste' spell works the same as the above if (sc_data[SC_HASTE].timer != -1) aspd_rate -= sc_data[SC_HASTE].val1; - //ディフェンダー時は加算 - if (sc_data[SC_DEFENDER].timer != -1) - adelay += (1100 - sc_data[SC_DEFENDER].val1 * 100); } if (aspd_rate != 100) @@ -1068,46 +803,10 @@ int battle_get_amotion(struct block_list *bl) if (sc_data) { - if (sc_data[SC_TWOHANDQUICKEN].timer != -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // 2HQ - 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) - aspd_rate -= 30; - else - aspd_rate -= 25; - } - if (sc_data[SC_SPEARSQUICKEN].timer != -1 && sc_data[SC_ADRENALINE].timer == -1 && sc_data[SC_TWOHANDQUICKEN].timer == -1 && sc_data[SC_QUAGMIRE].timer == -1 && sc_data[SC_DONTFORGETME].timer == -1) // スピアクィッケン - aspd_rate -= sc_data[SC_SPEARSQUICKEN].val2; - if (sc_data[SC_ASSNCROS].timer != -1 && // 夕陽のアサシンクロス - sc_data[SC_TWOHANDQUICKEN].timer == -1 - && sc_data[SC_ADRENALINE].timer == -1 - && sc_data[SC_SPEARSQUICKEN].timer == -1 - && sc_data[SC_DONTFORGETME].timer == -1) - aspd_rate -= - 5 + sc_data[SC_ASSNCROS].val1 + - sc_data[SC_ASSNCROS].val2 + sc_data[SC_ASSNCROS].val3; - if (sc_data[SC_DONTFORGETME].timer != -1) // 私を忘れないで - aspd_rate += - sc_data[SC_DONTFORGETME].val1 * 3 + - sc_data[SC_DONTFORGETME].val2 + - (sc_data[SC_DONTFORGETME].val3 >> 16); - if (sc_data[SC_STEELBODY].timer != -1) // 金剛 - aspd_rate += 25; - if (sc_data[SC_SPEEDPOTION2].timer != -1) - aspd_rate -= sc_data[SC_SPEEDPOTION2].val1; - else if (sc_data[SC_SPEEDPOTION1].timer != -1) - aspd_rate -= sc_data[SC_SPEEDPOTION1].val1; - else if (sc_data[SC_SPEEDPOTION0].timer != -1) + if (sc_data[SC_SPEEDPOTION0].timer != -1) aspd_rate -= sc_data[SC_SPEEDPOTION0].val1; if (sc_data[SC_HASTE].timer != -1) aspd_rate -= sc_data[SC_HASTE].val1; - if (sc_data[SC_DEFENDER].timer != -1) - amotion += (550 - sc_data[SC_DEFENDER].val1 * 50); } if (aspd_rate != 100) @@ -1140,11 +839,6 @@ int battle_get_dmotion(struct block_list *bl) else return 2000; - if ((sc_data && sc_data[SC_ENDURE].timer != -1) || - (bl->type == BL_PC - && ((struct map_session_data *) bl)->special_state.infinite_endure)) - ret = 0; - return ret; } @@ -1162,8 +856,6 @@ int battle_get_element(struct block_list *bl) if (sc_data) { - if (sc_data[SC_BENEDICTIO].timer != -1) // 聖体降福 - ret = 26; if (sc_data[SC_FREEZE].timer != -1) // 凍結 ret = 21; if (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0) @@ -1173,37 +865,6 @@ int battle_get_element(struct block_list *bl) return ret; } -static -int battle_get_attack_element(struct block_list *bl) -{ - int ret = 0; - eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); - - nullpo_ret(bl); - if (bl->type == BL_MOB && (struct mob_data *) bl) - ret = 0; - else if (bl->type == BL_PC && (struct map_session_data *) bl) - ret = ((struct map_session_data *) bl)->atk_ele; - - if (sc_data) - { - if (sc_data[SC_FROSTWEAPON].timer != -1) // フロストウェポン - ret = 1; - if (sc_data[SC_SEISMICWEAPON].timer != -1) // サイズミックウェポン - ret = 2; - if (sc_data[SC_FLAMELAUNCHER].timer != -1) // フレームランチャー - ret = 3; - if (sc_data[SC_LIGHTNINGLOADER].timer != -1) // ライトニングローダー - ret = 4; - if (sc_data[SC_ENCPOISON].timer != -1) // エンチャントポイズン - ret = 5; - if (sc_data[SC_ASPERSIO].timer != -1) // アスペルシオ - ret = 6; - } - - return ret; -} - int battle_get_party_id(struct block_list *bl) { nullpo_ret(bl); @@ -1369,7 +1030,6 @@ int battle_damage(struct block_list *bl, struct block_list *target, { eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(target); short *sc_count; - int i; nullpo_ret(target); //blはNULLで呼ばれることがあるので他でチェック @@ -1412,26 +1072,6 @@ int battle_damage(struct block_list *bl, struct block_list *target, struct map_session_data *tsd = (struct map_session_data *) target; - if (tsd && tsd->sc_data[SC_DEVOTION].val1) - { // ディボーションをかけられている - struct map_session_data *md = - map_id2sd(tsd->sc_data[SC_DEVOTION].val1); - if (md && skill_devotion3(&md->bl, target->id)) - { - skill_devotion(md, target->id); - } - else if (md && bl) - for (i = 0; i < 5; i++) - if (md->dev.val1[i] == target->id) - { - clif_damage(bl, &md->bl, gettick(), 0, 0, - damage, 0, 0, 0); - pc_damage(&md->bl, md, damage); - - return 0; - } - } - if (tsd && tsd->skilltimer != -1) { // 詠唱妨害 // フェンカードや妨害されないスキルかの検査 @@ -1498,11 +1138,10 @@ int battle_stopwalking(struct block_list *bl, int type) *------------------------------------------ */ static -int battle_calc_damage(struct block_list *src, struct block_list *bl, +int battle_calc_damage(struct block_list *, struct block_list *bl, int damage, int div_, - SkillID skill_num, int, BF flag) + SkillID, int, BF flag) { - struct map_session_data *sd = NULL; struct mob_data *md = NULL; eptr<struct status_change, StatusChange> sc_data; short *sc_count; @@ -1511,8 +1150,6 @@ int battle_calc_damage(struct block_list *src, struct block_list *bl, if (bl->type == BL_MOB) md = (struct mob_data *) bl; - else - sd = (struct map_session_data *) bl; sc_data = battle_get_sc_data(bl); sc_count = battle_get_sc_count(bl); @@ -1541,138 +1178,6 @@ int battle_calc_damage(struct block_list *src, struct block_list *bl, // ニューマ damage = 0; } - - if (sc_data[SC_ROKISWEIL].timer != -1 - && damage > 0 - && bool(flag & BF_MAGIC)) - { - // ニューマ - damage = 0; - } - - if (sc_data[SC_AETERNA].timer != -1 && damage > 0) - { // レックスエーテルナ - damage <<= 1; - skill_status_change_end(bl, SC_AETERNA, -1); - } - - //属性場のダメージ増加 - if (sc_data[SC_VOLCANO].timer != -1) - { // ボルケーノ - if (bool(flag & BF_SKILL) - && skill_get_pl(skill_num) == 3) - damage += damage * sc_data[SC_VOLCANO].val4 / 100; - else if (!bool(flag & BF_SKILL) - && (battle_get_attack_element(bl) == 3)) - damage += damage * sc_data[SC_VOLCANO].val4 / 100; - } - - if (sc_data[SC_VIOLENTGALE].timer != -1) - { // バイオレントゲイル - if (bool(flag & BF_SKILL) - && skill_get_pl(skill_num) == 4) - damage += damage * sc_data[SC_VIOLENTGALE].val4 / 100; - else if (!bool(flag & BF_SKILL) - && (battle_get_attack_element(bl) == 4)) - damage += damage * sc_data[SC_VIOLENTGALE].val4 / 100; - } - - if (sc_data[SC_DELUGE].timer != -1) - { // デリュージ - if (bool(flag & BF_SKILL) - && skill_get_pl(skill_num) == 1) - damage += damage * sc_data[SC_DELUGE].val4 / 100; - else if (!bool(flag & BF_SKILL) - && (battle_get_attack_element(bl) == 1)) - damage += damage * sc_data[SC_DELUGE].val4 / 100; - } - - if (sc_data[SC_ENERGYCOAT].timer != -1 && damage > 0 - && bool(flag & BF_WEAPON)) - { // エナジーコート - if (sd) - { - if (sd->status.sp > 0) - { - int per = sd->status.sp * 5 / (sd->status.max_sp + 1); - sd->status.sp -= sd->status.sp * (per * 5 + 10) / 1000; - if (sd->status.sp < 0) - sd->status.sp = 0; - damage -= damage * ((per + 1) * 6) / 100; - clif_updatestatus(sd, SP_SP); - } - if (sd->status.sp <= 0) - skill_status_change_end(bl, SC_ENERGYCOAT, -1); - } - else - damage -= damage * (sc_data[SC_ENERGYCOAT].val1 * 6) / 100; - } - - if (sc_data[SC_KYRIE].timer != -1 && damage > 0) - { - // キリエエレイソン - struct status_change *sc = &sc_data[SC_KYRIE]; - sc->val2 -= damage; - if (bool(flag & BF_WEAPON)) - { - if (sc->val2 >= 0) - damage = 0; - else - damage = -sc->val2; - } - if ((--sc->val3) <= 0 || (sc->val2 <= 0)) - skill_status_change_end(bl, SC_KYRIE, -1); - } - - if (sc_data[SC_BASILICA].timer != -1 && damage > 0) - { - // ニューマ - damage = 0; - } - if (sc_data[SC_LANDPROTECTOR].timer != -1 && damage > 0 - && bool(flag & BF_MAGIC)) - { - // ニューマ - damage = 0; - } - - if (sc_data[SC_AUTOGUARD].timer != -1 && damage > 0 - && bool(flag & BF_WEAPON)) - { - if (MRAND(100) < sc_data[SC_AUTOGUARD].val2) - { - damage = 0; - if (sd) - sd->canmove_tick = gettick() + 300; - else if (md) - md->canmove_tick = gettick() + 300; - } - } -// -- moonsoul (chance to block attacks with new Lord Knight skill parrying) -// - if (sc_data[SC_PARRYING].timer != -1 && damage > 0 - && bool(flag & BF_WEAPON)) - { - if (MRAND(100) < sc_data[SC_PARRYING].val2) - damage = 0; - } - // リジェクトソード - if (sc_data[SC_REJECTSWORD].timer != -1 && damage > 0 - && bool(flag & BF_WEAPON) - && // the logic was always broken, I've simplfied to what it - // was doing, it's not like this will be sticking around long - ((src->type == BL_PC - && ((struct map_session_data *) src)->status.weapon == 1) - || src->type == BL_MOB)) - { - if (MRAND(100) < (10 + 5 * sc_data[SC_REJECTSWORD].val1)) - { //反射確率は10+5*Lv - damage = damage * 50 / 100; - battle_damage(bl, src, damage, 0); - if ((--sc_data[SC_REJECTSWORD].val2) <= 0) - skill_status_change_end(bl, SC_REJECTSWORD, -1); - } - } } if (battle_config.skill_min_damage @@ -1780,11 +1285,6 @@ struct Damage battle_calc_mob_weapon_attack(struct block_list *src, if (atkmin > atkmax) atkmin = atkmax; - if (sc_data && sc_data[SC_MAXIMIZEPOWER].timer != -1) - { // マキシマイズパワー - atkmin = atkmax; - } - cri = battle_get_critical(src); cri -= battle_get_luk(target) * 3; if (battle_config.enemy_critical_rate != 100) @@ -1819,22 +1319,6 @@ struct Damage battle_calc_mob_weapon_attack(struct block_list *src, damage += atkmin + MRAND((atkmax - atkmin + 1)); else damage += atkmin; - // スキル修正1(攻撃力倍化系) - // オーバートラスト(+5% 〜 +25%),他攻撃系スキルの場合ここで補正 - // バッシュ,マグナムブレイク, - // ボーリングバッシュ,スピアブーメラン,ブランディッシュスピア,スピアスタッブ, - // メマーナイト,カートレボリューション - // ダブルストレイフィング,アローシャワー,チャージアロー, - // ソニックブロー - if (sc_data) - { //状態異常中のダメージ追加 - if (sc_data[SC_OVERTHRUST].timer != -1) // オーバートラスト - damage += damage * (5 * sc_data[SC_OVERTHRUST].val1) / 100; - if (sc_data[SC_TRUESIGHT].timer != -1) // トゥルーサイト - damage += damage * (2 * sc_data[SC_TRUESIGHT].val1) / 100; - if (sc_data[SC_BERSERK].timer != -1) // バーサーク - damage += damage * 50 / 100; - } if (skill_num != SkillID::ZERO && skill_num != SkillID::NEGATIVE) { @@ -1952,29 +1436,10 @@ struct Damage battle_calc_mob_weapon_attack(struct block_list *src, cardfix = cardfix * (100 - tsd->near_attack_def_rate) / 100; damage = damage * cardfix / 100; } - if (t_sc_data) - { - int cardfix = 100; - if (t_sc_data[SC_DEFENDER].timer != -1 - && bool(flag & BF_LONG)) - cardfix = cardfix * (100 - t_sc_data[SC_DEFENDER].val2) / 100; - if (cardfix != 100) - damage = damage * cardfix / 100; - } - if (t_sc_data && t_sc_data[SC_ASSUMPTIO].timer != -1) - { //アシャンプティオ - if (!map[target->m].flag.pvp) - damage = damage / 3; - else - damage = damage / 2; - } if (damage < 0) damage = 0; - if (sc_data && sc_data[SC_AURABLADE].timer != -1) /* オーラブレード 必中 */ - damage += sc_data[SC_AURABLADE].val1 * 10; - // 完全回避の判定 if (skill_num == SkillID::ZERO && skill_lv >= 0 && tsd != NULL && MRAND(1000) < battle_get_flee2(target)) @@ -2182,8 +1647,7 @@ struct Damage battle_calc_pc_weapon_attack(struct block_list *src, atkmax = watk; atkmax_ = watk_; } - if ((sc_data && sc_data[SC_WEAPONPERFECTION].timer != -1) - || (sd->special_state.no_sizefix)) + if (sd->special_state.no_sizefix) { // ウェポンパーフェクション || ドレイクカード atkmax = watk; atkmax_ = watk_; @@ -2194,12 +1658,6 @@ struct Damage battle_calc_pc_weapon_attack(struct block_list *src, if (atkmin_ > atkmax_) atkmin_ = atkmax_; - if (sc_data && sc_data[SC_MAXIMIZEPOWER].timer != -1) - { // マキシマイズパワー - atkmin = atkmax; - atkmin_ = atkmax_; - } - if (sd->double_rate > 0 && skill_num == SkillID::ZERO && skill_lv >= 0) da = MRAND(100) < sd->double_rate; @@ -2310,32 +1768,6 @@ struct Damage battle_calc_pc_weapon_attack(struct block_list *src, } } - // スキル修正1(攻撃力倍化系) - // オーバートラスト(+5% 〜 +25%),他攻撃系スキルの場合ここで補正 - // バッシュ,マグナムブレイク, - // ボーリングバッシュ,スピアブーメラン,ブランディッシュスピア,スピアスタッブ, - // メマーナイト,カートレボリューション - // ダブルストレイフィング,アローシャワー,チャージアロー, - // ソニックブロー - if (sc_data) - { //状態異常中のダメージ追加 - if (sc_data[SC_OVERTHRUST].timer != -1) - { // オーバートラスト - damage += damage * (5 * sc_data[SC_OVERTHRUST].val1) / 100; - damage2 += damage2 * (5 * sc_data[SC_OVERTHRUST].val1) / 100; - } - if (sc_data[SC_TRUESIGHT].timer != -1) - { // トゥルーサイト - damage += damage * (2 * sc_data[SC_TRUESIGHT].val1) / 100; - damage2 += damage2 * (2 * sc_data[SC_TRUESIGHT].val1) / 100; - } - if (sc_data[SC_BERSERK].timer != -1) - { // バーサーク - damage += damage * 50 / 100; - damage2 += damage2 * 50 / 100; - } - } - if (skill_num != SkillID::ZERO && skill_num != SkillID::NEGATIVE) { flag = (flag & ~BF_SKILLMASK) | BF_SKILL; @@ -2517,34 +1949,6 @@ struct Damage battle_calc_pc_weapon_attack(struct block_list *src, } //カードによるダメージ減衰処理ここまで -//対象にステータス異常がある場合のダメージ減算処理ここから - if (t_sc_data) - { - cardfix = 100; - if (t_sc_data[SC_DEFENDER].timer != -1 - && bool(flag & BF_LONG)) //ディフェンダー状態で遠距離攻撃 - cardfix = cardfix * (100 - t_sc_data[SC_DEFENDER].val2) / 100; //ディフェンダーによる減衰 - if (cardfix != 100) - { - damage = damage * cardfix / 100; //ディフェンダー補正によるダメージ減少 - damage2 = damage2 * cardfix / 100; //ディフェンダー補正による左手ダメージ減少 - } - if (t_sc_data[SC_ASSUMPTIO].timer != -1) - { //アスムプティオ - if (!map[target->m].flag.pvp) - { - damage = damage / 3; - damage2 = damage2 / 3; - } - else - { - damage = damage / 2; - damage2 = damage2 / 2; - } - } - } -//対象にステータス異常がある場合のダメージ減算処理ここまで - if (damage < 0) damage = 0; if (damage2 < 0) @@ -2556,12 +1960,6 @@ struct Damage battle_calc_pc_weapon_attack(struct block_list *src, damage += sd->spiritball * 3; damage2 += sd->spiritball * 3; - if (sc_data && sc_data[SC_AURABLADE].timer != -1) - { /* オーラブレード 必中 */ - damage += sc_data[SC_AURABLADE].val1 * 10; - damage2 += sc_data[SC_AURABLADE].val1 * 10; - } - // >二刀流の左右ダメージ計算誰かやってくれぇぇぇぇえええ! // >map_session_data に左手ダメージ(atk,atk2)追加して // >pc_calcstatus()でやるべきかな? @@ -2725,16 +2123,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src, if (sd->status.weapon && sd->status.weapon != 11) { int breakrate = 1; - if (target->type == BL_PC && sd->sc_data[SC_MELTDOWN].timer != -1) - { - breakrate += 100 * sd->sc_data[SC_MELTDOWN].val1; - if (MRAND(10000) < - breakrate * battle_config.equipment_break_rate / 100 - || breakrate >= 10000) - pc_breakweapon((struct map_session_data *) target); - } - if (sd->sc_data[SC_OVERTHRUST].timer != -1) - breakrate += 20 * sd->sc_data[SC_OVERTHRUST].val1; if (wd.type == 0x0a) breakrate *= 2; if (MRAND(10000) < @@ -2751,12 +2139,6 @@ struct Damage battle_calc_weapon_attack(struct block_list *src, && (wd.damage > 0 || wd.damage2 > 0)) { int breakrate = 1; - if (src->type == BL_PC - && ((struct map_session_data *) src)-> - sc_data[SC_MELTDOWN].timer != -1) - breakrate += - 70 * - ((struct map_session_data *) src)->sc_data[SC_MELTDOWN].val1; if (wd.type == 0x0a) breakrate *= 2; if (MRAND(10000) < @@ -3114,13 +2496,6 @@ ATK battle_weapon_attack(struct block_list *src, struct block_list *target, rdamage = 1; } } - if (t_sc_data && t_sc_data[SC_REFLECTSHIELD].timer != -1) - { - rdamage += - damage * t_sc_data[SC_REFLECTSHIELD].val2 / 100; - if (rdamage < 1) - rdamage = 1; - } } else if (bool(wd.flag & BF_LONG)) { @@ -3270,8 +2645,6 @@ ATK battle_weapon_attack(struct block_list *src, struct block_list *target, if (rdamage > 0) battle_damage(target, src, rdamage, 0); - if (t_sc_data && t_sc_data[SC_SPLASHER].timer != -1) //殴ったので対象のベナムスプラッシャー状態を解除 - skill_status_change_end(target, SC_SPLASHER, -1); map_freeblock_unlock(); } diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 7ea7fd3..ba3123a 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -2819,26 +2819,6 @@ int clif_damage(struct block_list *src, struct block_list *dst, sc_data = battle_get_sc_data(dst); - if (type != 4 && dst->type == BL_PC - && ((struct map_session_data *) dst)->special_state.infinite_endure) - type = 9; - if (sc_data) - { - if (type != 4 && sc_data[SC_ENDURE].timer != -1) - type = 9; - if (sc_data[SC_HALLUCINATION].timer != -1) - { - if (damage > 0) - damage = - damage * (5 + sc_data[SC_HALLUCINATION].val1) + - MRAND(100); - if (damage2 > 0) - damage2 = - damage2 * (5 + sc_data[SC_HALLUCINATION].val1) + - MRAND(100); - } - } - WBUFW(buf, 0) = 0x8a; WBUFL(buf, 2) = src->id; WBUFL(buf, 6) = dst->id; @@ -3220,18 +3200,6 @@ int clif_skill_damage(struct block_list *src, struct block_list *dst, sc_data = battle_get_sc_data(dst); - if (type != 5 && dst->type == BL_PC - && ((struct map_session_data *) dst)->special_state.infinite_endure) - type = 9; - if (sc_data) - { - if (type != 5 && sc_data[SC_ENDURE].timer != -1) - type = 9; - if (sc_data[SC_HALLUCINATION].timer != -1 && damage > 0) - damage = - damage * (5 + sc_data[SC_HALLUCINATION].val1) + MRAND(100); - } - WBUFW(buf, 0) = 0x1de; WBUFW(buf, 2) = uint16_t(skill_id); WBUFL(buf, 4) = src->id; @@ -3915,14 +3883,6 @@ void clif_parse_LoadEndAck(int, struct map_session_data *sd) // option clif_changeoption(&sd->bl); - if (sd->sc_data[SC_TRICKDEAD].timer != -1) - skill_status_change_end(&sd->bl, SC_TRICKDEAD, -1); - if (sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 - && !battle_check_undead(7, sd->def_ele)) - skill_status_change_end(&sd->bl, SC_SIGNUMCRUCIS, -1); - if (sd->special_state.infinite_endure - && sd->sc_data[SC_ENDURE].timer == -1) - skill_status_change_start(&sd->bl, SC_ENDURE, 10, 1, 0, 0, 0, 0); for (i = 0; i < MAX_INVENTORY; i++) { if (bool(sd->status.inventory[i].equip) @@ -3988,11 +3948,9 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) return; // ステータス異常やハイディング中(トンネルドライブ無)で動けない - if ((bool(sd->opt1) && sd->opt1 != (Opt1::_stone6)) || - sd->sc_data[SC_ANKLE].timer != -1 || //アンクルスネア - sd->sc_data[SC_TRICKDEAD].timer != -1 || //死んだふり - sd->sc_data[SC_SPIDERWEB].timer != -1 || //スパイダーウェッブ - (sd->sc_data[SC_DANCING].timer != -1 && sd->sc_data[SC_DANCING].val4)) //合奏スキル演奏中は動けない + if ((bool(sd->opt1) && sd->opt1 != (Opt1::_stone6)) + || sd->sc_data[SC_ANKLE].timer != -1 //アンクルスネア + ) return; if (bool(sd->status.option & Option::HIDE2)) return; @@ -4015,7 +3973,6 @@ void clif_parse_WalkToXY(int fd, struct map_session_data *sd) void clif_parse_QuitGame(int fd, struct map_session_data *sd) { unsigned int tick = gettick(); - struct skill_unit_group *sg; nullpo_retv(sd); @@ -4025,10 +3982,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd) || (sd->opt2 != Opt2::ZERO && !(night_flag == 1 && sd->opt2 == Opt2::BLIND)))) || sd->skilltimer != -1 || (DIFF_TICK(tick, sd->canact_tick) < 0) - || (sd->sc_data[SC_DANCING].timer != -1 - && sd->sc_data[SC_DANCING].val4 - && (sg = (struct skill_unit_group *) sd->sc_data[SC_DANCING].val2) - && sg->src_id == sd->bl.id)) + ) { WFIFOW(fd, 2) = 1; WFIFOSET(fd, packet_len_table[0x18b]); @@ -4181,8 +4135,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) } if (is_atcommand(fd, sd, message, 0) - || ((sd->sc_data[SC_BERSERK].timer != -1 //バーサーク時は会話も不可 - || sd->sc_data[SC_NOCHAT].timer != -1)))//チャット禁止 + || (sd->sc_data[SC_NOCHAT].timer != -1)) //チャット禁止 { free(buf); return; @@ -4322,8 +4275,7 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) if (sd->npc_id != 0 || bool(sd->opt1) || bool(sd->status.option & Option::HIDE2) - || sd->state.storage_open - || sd->sc_data[SC_DANCING].timer != -1) + || sd->state.storage_open) return; tick = gettick(); @@ -4338,8 +4290,7 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) { case 0x00: // once attack case 0x07: // continuous attack - if (sd->sc_data[SC_WEDDING].timer != -1 - || bool(sd->status.option & Option::HIDE)) + if (bool(sd->status.option & Option::HIDE)) return; if (!battle_config.sdelay_attack_enable) { @@ -4442,8 +4393,7 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) } if (is_atcommand(fd, sd, message, 0) - || ((sd->sc_data[SC_BERSERK].timer != -1 - || sd->sc_data[SC_NOCHAT].timer != -1))) + || (sd->sc_data[SC_NOCHAT].timer != -1)) { free(buf); return; @@ -4532,10 +4482,7 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) if (sd->npc_id != 0 || sd->opt1 != Opt1::ZERO - || ( - (sd->sc_data[SC_TRICKDEAD].timer != -1 || //死んだふり - sd->sc_data[SC_BERSERK].timer != -1 || //バーサーク - sd->sc_data[SC_NOCHAT].timer != -1))) //会話禁止 + || sd->sc_data[SC_NOCHAT].timer != -1) //会話禁止 return; if (fitem == NULL || fitem->bl.m != sd->bl.m) @@ -4573,8 +4520,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd) return; } if (sd->npc_id != 0 - || sd->opt1 != Opt1::ZERO - || sd->sc_data[SC_BERSERK].timer != -1) //バーサーク + || sd->opt1 != Opt1::ZERO) { clif_displaymessage(sd->fd, "Can't drop items right now."); return; @@ -4602,10 +4548,7 @@ void clif_parse_UseItem(int fd, struct map_session_data *sd) } if (sd->npc_id != 0 || sd->opt1 != Opt1::ZERO - || ( - (sd->sc_data[SC_TRICKDEAD].timer != -1 || //死んだふり - sd->sc_data[SC_BERSERK].timer != -1 || //バーサーク - sd->sc_data[SC_NOCHAT].timer != -1))) //会話禁止 + || sd->sc_data[SC_NOCHAT].timer != -1) //会話禁止 return; if (sd->invincible_timer != -1) @@ -4633,8 +4576,6 @@ void clif_parse_EquipItem(int fd, struct map_session_data *sd) index = RFIFOW(fd, 2) - 2; if (sd->npc_id != 0) return; - if (sd->sc_data[SC_BERSERK].timer != -1) - return; if (sd->status.inventory[index].identify != 1) { // 未鑑定 @@ -4678,8 +4619,6 @@ void clif_parse_UnequipItem(int fd, struct map_session_data *sd) skill_status_change_end(&sd->bl, SC_BROKNWEAPON, -1); if (sd->status.inventory[index].broken == 1 && sd->sc_data[SC_BROKNARMOR].timer != -1) skill_status_change_end(&sd->bl, SC_BROKNARMOR, -1); - if (sd->sc_data[SC_BERSERK].timer != -1) - return; if (sd->npc_id != 0 || sd->opt1 != Opt1::ZERO) @@ -4883,10 +4822,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) return; } - if (sd->sc_data[SC_TRICKDEAD].timer != -1 - || sd->sc_data[SC_BERSERK].timer != -1 - || sd->sc_data[SC_NOCHAT].timer != -1 - || sd->sc_data[SC_WEDDING].timer != -1) + if (sd->sc_data[SC_NOCHAT].timer != -1) return; if (sd->invincible_timer != -1) pc_delinvincibletimer(sd); @@ -4955,10 +4891,7 @@ void clif_parse_UseSkillToPos(int fd, struct map_session_data *sd) return; } - if (sd->sc_data[SC_TRICKDEAD].timer != -1 || - sd->sc_data[SC_BERSERK].timer != -1 - || sd->sc_data[SC_NOCHAT].timer != -1 - || sd->sc_data[SC_WEDDING].timer != -1) + if (sd->sc_data[SC_NOCHAT].timer != -1) return; if (sd->invincible_timer != -1) pc_delinvincibletimer(sd); @@ -4994,10 +4927,7 @@ void clif_parse_UseSkillMap(int fd, struct map_session_data *sd) return; if (sd->npc_id != 0 - || sd->sc_data[SC_TRICKDEAD].timer != -1 - || sd->sc_data[SC_BERSERK].timer != -1 - || sd->sc_data[SC_NOCHAT].timer != -1 - || sd->sc_data[SC_WEDDING].timer != -1) + || sd->sc_data[SC_NOCHAT].timer != -1) return; if (sd->invincible_timer != -1) @@ -5252,8 +5182,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data *sd) } if (is_atcommand(fd, sd, message, 0) - || ((sd->sc_data[SC_BERSERK].timer != -1 //バーサーク時は会話も不可 - || sd->sc_data[SC_NOCHAT].timer != -1))) //チャット禁止 + || (sd->sc_data[SC_NOCHAT].timer != -1)) //チャット禁止 { free(buf); return; diff --git a/src/map/map.cpp b/src/map/map.cpp index 5112ec3..a6aff48 100644 --- a/src/map/map.cpp +++ b/src/map/map.cpp @@ -1083,9 +1083,6 @@ int map_quit(struct map_session_data *sd) skill_castcancel(&sd->bl, 0); // 詠唱を中断する skill_stop_dancing(&sd->bl, 1); // ダンス/演奏中断 - if (sd->sc_data[SC_BERSERK].timer != -1) //バーサーク中の終了はHPを100に - sd->status.hp = 100; - skill_status_change_clear(&sd->bl, 1); // ステータス異常を解除する skill_clear_unitgroup(&sd->bl); // スキルユニットグループの削除 skill_cleartimerskill(&sd->bl); diff --git a/src/map/map.hpp b/src/map/map.hpp index 32194c0..f9754e3 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -197,7 +197,6 @@ struct map_session_data unsigned no_magic_damage:1; unsigned no_weapon_damage:1; unsigned no_gemstone:1; - unsigned infinite_endure:1; unsigned unbreakable_weapon:1; unsigned unbreakable_armor:1; unsigned infinite_autospell:1; diff --git a/src/map/map.t.hpp b/src/map/map.t.hpp index 0776788..0f2e47f 100644 --- a/src/map/map.t.hpp +++ b/src/map/map.t.hpp @@ -437,8 +437,7 @@ enum class SP : uint16_t #define SP_NO_GEMSTONE SP::NO_GEMSTONE NO_CASTCANCEL2 = 2006, #define SP_NO_CASTCANCEL2 SP::NO_CASTCANCEL2 - INFINITE_ENDURE = 2007, -#define SP_INFINITE_ENDURE SP::INFINITE_ENDURE + UNBREAKABLE_WEAPON = 2008, #define SP_UNBREAKABLE_WEAPON SP::UNBREAKABLE_WEAPON SP_UNBREAKABLE_ARMOR = 2009, diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 0170665..f19cd63 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -613,9 +613,7 @@ int mob_can_move(struct mob_data *md) || bool(md->option & Option::HIDE2)) return 0; // アンクル中で動けないとか - if (md->sc_data[SC_ANKLE].timer != -1 || //アンクルスネア - md->sc_data[SC_SPIDERWEB].timer != -1 //スパイダーウェッブ - ) + if (md->sc_data[SC_ANKLE].timer != -1) return 0; return 1; @@ -818,9 +816,9 @@ int mob_check_attack(struct mob_data *md) } if (tsd && !bool(mode & MobMode::BOSS) - && (tsd->sc_data[SC_TRICKDEAD].timer != -1 - || ((pc_ishiding(tsd) || tsd->state.gangsterparadise) - && race != 4 && race != 6))) + && ((pc_ishiding(tsd) || tsd->state.gangsterparadise) + && race != 4 + && race != 6)) { md->target_id = 0; md->state.attackable = false; @@ -879,10 +877,6 @@ int mob_attack(struct mob_data *md, unsigned int tick, int) tbl->m, tbl->x - radius, tbl->y - radius, tbl->x + radius, tbl->y + radius, BL_PC); - if (!(battle_config.monster_cloak_check_type & 2) - && md->sc_data[SC_CLOAKING].timer != -1) - skill_status_change_end(&md->bl, SC_CLOAKING, -1); - md->attackabletime = tick + battle_get_adelay(&md->bl); md->timer = add_timer(md->attackabletime, mob_timer, md->bl.id, 0); @@ -1451,10 +1445,9 @@ int mob_target(struct mob_data *md, struct block_list *bl, int dist) // Coercion is exerted if it is MVPMOB. if (bool(mode & MobMode::BOSS) - || (sc_data && sc_data[SC_TRICKDEAD].timer == -1 - && ((option != NULL && !bool(*option & (Option::CLOAK | Option::HIDE2))) - || race == 4 - || race == 6))) + || ((option != NULL && !bool(*option & (Option::CLOAK | Option::HIDE2))) + || race == 4 + || race == 6)) { if (bl->type == BL_PC) { @@ -1525,10 +1518,10 @@ void mob_ai_sub_hard_activesearch(struct block_list *bl, distance(smd->bl.x, smd->bl.y, tsd->bl.x, tsd->bl.y)) < 9) { if (bool(mode & MobMode::BOSS) - || (tsd->sc_data[SC_TRICKDEAD].timer == -1 - && ((!pc_ishiding(tsd) - && !tsd->state.gangsterparadise) - || race == 4 || race == 6))) + || ((!pc_ishiding(tsd) + && !tsd->state.gangsterparadise) + || race == 4 + || race == 6)) { // 妨害がないか判定 if (mob_can_reach(smd, bl, 12) && // 到達可能性判定 MRAND(1000) < 1000 / (++(*pcc))) @@ -1741,10 +1734,10 @@ int mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) { race = mob_db[md->mob_class].race; - if (bool(mode & MobMode::BOSS) || - (sd->sc_data[SC_TRICKDEAD].timer == -1 && - ((!pc_ishiding(sd) && !sd->state.gangsterparadise) - || race == 4 || race == 6))) + if (bool(mode & MobMode::BOSS) + || ((!pc_ishiding(sd) && !sd->state.gangsterparadise) + || race == 4 + || race == 6)) { // 妨害がないか判定 md->target_id = sd->bl.id; @@ -1756,24 +1749,6 @@ int mob_ai_sub_hard_slavemob(struct mob_data *md, unsigned int tick) } } - // There is the master, the master locks a target and he does not lock. -/* if ((md->target_id>0 && mmd->state.attackable) && (!mmd->target_id || !mmd->state.attackable) ){ - struct map_session_data *sd=map_id2sd(md->target_id); - if (sd!=NULL && !pc_isdead(sd) && sd->invincible_timer == -1 && !pc_isinvisible(sd)){ - - race=mob_db[mmd->mob_class].race; - if (mode&0x20 || - (sd->sc_data[SC_TRICKDEAD].timer == -1 && - (!(sd->status.option&0x06) || race==4 || race==6) - ) ){ // It judges whether there is any disturbance. - - mmd->target_id=sd->bl.id; - mmd->state.attackable = true; - mmd->min_chase=5+distance(mmd->bl.x,mmd->bl.y,sd->bl.x,sd->bl.y); - } - } - }*/ - return 0; } @@ -1992,11 +1967,9 @@ void mob_ai_sub_hard(struct block_list *bl, unsigned int tick) tbl->y)) >= md->min_chase) mob_unlocktarget(md, tick); // 別マップか、視界外 else if (tsd && !bool(mode & MobMode::BOSS) - && (tsd->sc_data[SC_TRICKDEAD].timer != -1 - || - ((pc_ishiding(tsd) + && ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && race != 4 - && race != 6))) + && race != 6)) mob_unlocktarget(md, tick); // スキルなどによる策敵妨害 else if (!battle_check_range(&md->bl, tbl, mob_db[md->mob_class].range)) { @@ -2536,8 +2509,7 @@ int mob_damage(struct block_list *src, struct mob_data *md, int damage, return 0; } - if (md->sc_data[SC_ENDURE].timer == -1) - mob_stop_walking(md, 3); + mob_stop_walking(md, 3); if (damage > max_hp >> 2) skill_stop_dancing(&md->bl, 0); @@ -2629,8 +2601,6 @@ int mob_damage(struct block_list *src, struct mob_data *md, int damage, if (bool(md->option & Option::HIDE2)) skill_status_change_end(&md->bl, SC_HIDING, -1); - if (bool(md->option & Option::CLOAK)) - skill_status_change_end(&md->bl, SC_CLOAKING, -1); if (md->hp > 0) { @@ -3344,12 +3314,7 @@ void mobskill_castend_id(timer_id tid, tick_t tick, custom_id_t id, custom_data_ md->skilltimer = -1; - if (bool(md->opt1) - || md->sc_data[SC_DIVINA].timer != -1 - || md->sc_data[SC_ROKISWEIL].timer != -1 - || md->sc_data[SC_STEELBODY].timer != -1) - return; - if (md->sc_data[SC_BERSERK].timer != -1) //バーサーク + if (bool(md->opt1)) return; if (md->skillid != NPC_EMOTION) @@ -3421,12 +3386,7 @@ void mobskill_castend_pos(timer_id tid, tick_t tick, custom_id_t id, custom_data md->skilltimer = -1; - if (bool(md->opt1) - || md->sc_data[SC_DIVINA].timer != -1 - || md->sc_data[SC_ROKISWEIL].timer != -1 - || md->sc_data[SC_STEELBODY].timer != -1) - return; - if (md->sc_data[SC_BERSERK].timer != -1) //バーサーク + if (bool(md->opt1)) return; if (battle_config.monster_land_skill_limit == 1) @@ -3484,12 +3444,7 @@ int mobskill_use_id(struct mob_data *md, struct block_list *target, skill_id = ms->skill_id; skill_lv = ms->skill_lv; - if (bool(md->opt1) - || md->sc_data[SC_DIVINA].timer != -1 - || md->sc_data[SC_ROKISWEIL].timer != -1 - || md->sc_data[SC_STEELBODY].timer != -1) - return 0; - if (md->sc_data[SC_BERSERK].timer != -1) //バーサーク + if (bool(md->opt1)) return 0; if (bool(md->option & Option::HIDE2)) @@ -3527,10 +3482,6 @@ int mobskill_use_id(struct mob_data *md, struct block_list *target, md->skilllv = skill_lv; md->skillidx = skill_idx; - if (!(battle_config.monster_cloak_check_type & 2) - && md->sc_data[SC_CLOAKING].timer != -1) - skill_status_change_end(&md->bl, SC_CLOAKING, -1); - if (casttime > 0) { md->skilltimer = @@ -3568,12 +3519,7 @@ int mobskill_use_pos(struct mob_data *md, SkillID skill_id = ms->skill_id; skill_lv = ms->skill_lv; - if (bool(md->opt1) - || md->sc_data[SC_DIVINA].timer != -1 - || md->sc_data[SC_ROKISWEIL].timer != -1 - || md->sc_data[SC_STEELBODY].timer != -1) - return 0; - if (md->sc_data[SC_BERSERK].timer != -1) //バーサーク + if (bool(md->opt1)) return 0; if (bool(md->option & Option::HIDE2)) @@ -3609,9 +3555,6 @@ int mobskill_use_pos(struct mob_data *md, md->skillid = skill_id; md->skilllv = skill_lv; md->skillidx = skill_idx; - if (!(battle_config.monster_cloak_check_type & 2) - && md->sc_data[SC_CLOAKING].timer != -1) - skill_status_change_end(&md->bl, SC_CLOAKING, -1); if (casttime > 0) { md->skilltimer = diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 118aa1f..dc7c77c 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -714,22 +714,6 @@ int pc_isequip(struct map_session_data *sd, int n) if (map[sd->bl.m].flag.pvp && (item->flag.no_equip == 1 || item->flag.no_equip == 3)) return 0; - if (bool(item->equip & EPOS::WEAPON) - && sc_data - && sc_data[SC_STRIPWEAPON].timer != -1) - return 0; - if (bool(item->equip & EPOS::SHIELD) - && sc_data - && sc_data[SC_STRIPSHIELD].timer != -1) - return 0; - if (bool(item->equip & EPOS::MISC1) - && sc_data - && sc_data[SC_STRIPARMOR].timer != -1) - return 0; - if (bool(item->equip & EPOS::HAT) - && sc_data - && sc_data[SC_STRIPHELM].timer != -1) - return 0; return 1; } @@ -746,8 +730,6 @@ int pc_breakweapon(struct map_session_data *sd) return -1; if (sd->unbreakable >= MRAND(100)) return 0; - if (sd->sc_data[SC_CP_WEAPON].timer != -1) - return 0; for (i = 0; i < MAX_INVENTORY; i++) { @@ -787,8 +769,6 @@ int pc_breakarmor(struct map_session_data *sd) return -1; if (sd->unbreakable >= MRAND(100)) return 0; - if (sd->sc_data[SC_CP_ARMOR].timer != -1) - return 0; for (int i = 0; i < MAX_INVENTORY; i++) { @@ -1533,58 +1513,6 @@ int pc_calcstatus(struct map_session_data *sd, int first) if (sd->aspd_add_rate != 100) sd->aspd_rate += sd->aspd_add_rate - 100; - // ステータス変化による基本パラメータ補正 - if (sd->sc_count) - { - if (sd->sc_data[SC_CONCENTRATE].timer != -1 - && sd->sc_data[SC_QUAGMIRE].timer == -1) - { // 集中力向上 - sd->paramb[ATTR::AGI] += - (sd->status.attrs[ATTR::AGI] + sd->paramb[ATTR::AGI] + sd->parame[ATTR::AGI] - - sd->paramcard[ATTR::AGI]) * (2 + - sd->sc_data[SC_CONCENTRATE].val1) / 100; - sd->paramb[ATTR::DEX] += - (sd->status.attrs[ATTR::DEX] + sd->paramb[ATTR::DEX] + sd->parame[ATTR::DEX] - - sd->paramcard[ATTR::DEX]) * (2 + - sd->sc_data[SC_CONCENTRATE].val1) / 100; - } - if (sd->sc_data[SC_INCREASEAGI].timer != -1 - && sd->sc_data[SC_QUAGMIRE].timer == -1 - && sd->sc_data[SC_DONTFORGETME].timer == -1) - { // 速度増加 - sd->paramb[ATTR::AGI] += 2 + sd->sc_data[SC_INCREASEAGI].val1; - sd->speed -= sd->speed * 25 / 100; - } - if (sd->sc_data[SC_DECREASEAGI].timer != -1) // 速度減少(agiはbattle.cで) - sd->speed = sd->speed * 125 / 100; - if (sd->sc_data[SC_CLOAKING].timer != -1) - sd->speed = - (sd->speed * (76 + (sd->sc_data[SC_INCREASEAGI].val1 * 3))) / - 100; - if (sd->sc_data[SC_BLESSING].timer != -1) - { // ブレッシング - sd->paramb[ATTR::STR] += sd->sc_data[SC_BLESSING].val1; - sd->paramb[ATTR::INT] += sd->sc_data[SC_BLESSING].val1; - sd->paramb[ATTR::DEX] += sd->sc_data[SC_BLESSING].val1; - } - if (sd->sc_data[SC_GLORIA].timer != -1) // グロリア - sd->paramb[ATTR::LUK] += 30; - if (sd->sc_data[SC_LOUD].timer != -1 && sd->sc_data[SC_QUAGMIRE].timer == -1) // ラウドボイス - sd->paramb[ATTR::STR] += 4; - if (sd->sc_data[SC_QUAGMIRE].timer != -1) - { // クァグマイア - sd->speed = sd->speed * 3 / 2; - sd->paramb[ATTR::AGI] -= - (sd->status.attrs[ATTR::AGI] + sd->paramb[ATTR::AGI] + sd->parame[ATTR::AGI]) / 2; - sd->paramb[ATTR::DEX] -= - (sd->status.attrs[ATTR::DEX] + sd->paramb[ATTR::DEX] + sd->parame[ATTR::DEX]) / 2; - } - if (sd->sc_data[SC_TRUESIGHT].timer != -1) - { // トゥルーサイト - for (auto& p : sd->paramb) - p += 5; - } - } sd->speed -= skill_power(sd, TMW_SPEED) >> 3; sd->aspd_rate -= skill_power(sd, TMW_SPEED) / 10; if (sd->aspd_rate < 20) @@ -1710,18 +1638,6 @@ int pc_calcstatus(struct map_session_data *sd, int first) } sd->max_weight += 1000; - 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; - } bl = sd->status.base_level; @@ -1734,16 +1650,6 @@ int pc_calcstatus(struct map_session_data *sd, int first) if (sd->hprate != 100) sd->status.max_hp = sd->status.max_hp * sd->hprate / 100; - if (sd->sc_data[SC_BERSERK].timer != -1) - { // バーサーク - sd->status.max_hp = sd->status.max_hp * 3; - sd->status.hp = sd->status.hp * 3; - if (sd->status.max_hp > battle_config.max_hp) // removed negative max hp bug by Valaris - sd->status.max_hp = battle_config.max_hp; - if (sd->status.hp > battle_config.max_hp) // removed negative max hp bug by Valaris - sd->status.hp = battle_config.max_hp; - } - if (sd->status.max_hp > battle_config.max_hp) // removed negative max hp bug by Valaris sd->status.max_hp = battle_config.max_hp; if (sd->status.max_hp <= 0) @@ -1783,110 +1689,9 @@ int pc_calcstatus(struct map_session_data *sd, int first) if (sd->sc_count) { // ATK/DEF変化形 - if (sd->sc_data[SC_ANGELUS].timer != -1) // エンジェラス - sd->def2 = - sd->def2 * (110 + 5 * sd->sc_data[SC_ANGELUS].val1) / 100; - if (sd->sc_data[SC_IMPOSITIO].timer != -1) - { // インポシティオマヌス - sd->watk += sd->sc_data[SC_IMPOSITIO].val1 * 5; - index = sd->equip_index[EQUIP::SHIELD]; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->type == ItemType::WEAPON) - sd->watk_ += sd->sc_data[SC_IMPOSITIO].val1 * 5; - } - if (sd->sc_data[SC_PROVOKE].timer != -1) - { // プロボック - sd->def2 = - sd->def2 * (100 - 6 * sd->sc_data[SC_PROVOKE].val1) / 100; - sd->base_atk = - sd->base_atk * (100 + 2 * sd->sc_data[SC_PROVOKE].val1) / 100; - sd->watk = - sd->watk * (100 + 2 * sd->sc_data[SC_PROVOKE].val1) / 100; - index = sd->equip_index[EQUIP::SHIELD]; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->type == ItemType::WEAPON) - sd->watk_ = - sd->watk_ * (100 + - 2 * sd->sc_data[SC_PROVOKE].val1) / 100; - } - if (sd->sc_data[SC_ENDURE].timer != -1) - sd->mdef2 += sd->sc_data[SC_ENDURE].val1; - if (sd->sc_data[SC_MINDBREAKER].timer != -1) - { // プロボック - sd->mdef2 = - sd->mdef2 * (100 - - 6 * sd->sc_data[SC_MINDBREAKER].val1) / 100; - sd->matk1 = - sd->matk1 * (100 + - 2 * sd->sc_data[SC_MINDBREAKER].val1) / 100; - sd->matk2 = - sd->matk2 * (100 + - 2 * sd->sc_data[SC_MINDBREAKER].val1) / 100; - } if (sd->sc_data[SC_POISON].timer != -1) // 毒状態 sd->def2 = sd->def2 * 75 / 100; - if (sd->sc_data[SC_DRUMBATTLE].timer != -1) - { // 戦太鼓の響き - sd->watk += sd->sc_data[SC_DRUMBATTLE].val2; - sd->def += sd->sc_data[SC_DRUMBATTLE].val3; - index = sd->equip_index[EQUIP::SHIELD]; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->type == ItemType::WEAPON) - sd->watk_ += sd->sc_data[SC_DRUMBATTLE].val2; - } - if (sd->sc_data[SC_NIBELUNGEN].timer != -1) - { // ニーベルングの指輪 - index = sd->equip_index[EQUIP::WEAPON]; - 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[EQUIP::SHIELD]; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->wlv == 3) - sd->watk_ += sd->sc_data[SC_NIBELUNGEN].val3; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->wlv == 4) - sd->watk += sd->sc_data[SC_NIBELUNGEN].val2; - index = sd->equip_index[EQUIP::SHIELD]; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->wlv == 4) - sd->watk_ += sd->sc_data[SC_NIBELUNGEN].val2; - } - - if (sd->sc_data[SC_VOLCANO].timer != -1 && sd->def_ele == 3) - { // ボルケーノ - sd->watk += sd->sc_data[SC_VIOLENTGALE].val3; - } - - if (sd->sc_data[SC_SIGNUMCRUCIS].timer != -1) - sd->def = - sd->def * (100 - sd->sc_data[SC_SIGNUMCRUCIS].val2) / 100; - if (sd->sc_data[SC_ETERNALCHAOS].timer != -1) // エターナルカオス - sd->def = 0; - - if (sd->sc_data[SC_CONCENTRATION].timer != -1) - { //コンセントレーション - sd->watk = - sd->watk * (100 + - 5 * sd->sc_data[SC_CONCENTRATION].val1) / 100; - index = sd->equip_index[EQUIP::SHIELD]; - if (index >= 0 && sd->inventory_data[index] - && sd->inventory_data[index]->type == ItemType::WEAPON) - sd->watk_ = - sd->watk * (100 + - 5 * sd->sc_data[SC_CONCENTRATION].val1) / 100; - sd->def = - sd->def * (100 - - 5 * sd->sc_data[SC_CONCENTRATION].val1) / 100; - } - if (sd->sc_data[SC_MAGICPOWER].timer != -1) - { //魔法力増幅 - sd->matk1 = - sd->matk1 * (100 + 2 * sd->sc_data[SC_MAGICPOWER].val1) / 100; - sd->matk2 = - sd->matk2 * (100 + 2 * sd->sc_data[SC_MAGICPOWER].val1) / 100; - } if (sd->sc_data[SC_ATKPOT].timer != -1) sd->watk += sd->sc_data[SC_ATKPOT].val1; if (sd->sc_data[SC_MATKPOT].timer != -1) @@ -1895,48 +1700,9 @@ int pc_calcstatus(struct map_session_data *sd, int first) sd->matk2 += sd->sc_data[SC_MATKPOT].val1; } - // ASPD/移動速度変化系 - if (sd->sc_data[SC_TWOHANDQUICKEN].timer != -1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1) // 2HQ - 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) - aspd_rate -= 30; - else - aspd_rate -= 25; - } - if (sd->sc_data[SC_SPEARSQUICKEN].timer != -1 && 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) // スピアクィッケン - aspd_rate -= sd->sc_data[SC_SPEARSQUICKEN].val2; - if (sd->sc_data[SC_ASSNCROS].timer != -1 && // 夕陽のアサシンクロス - sd->sc_data[SC_TWOHANDQUICKEN].timer == -1 - && sd->sc_data[SC_ADRENALINE].timer == -1 - && sd->sc_data[SC_SPEARSQUICKEN].timer == -1 - && sd->sc_data[SC_DONTFORGETME].timer == -1) - aspd_rate -= - 5 + sd->sc_data[SC_ASSNCROS].val1 + - sd->sc_data[SC_ASSNCROS].val2 + sd->sc_data[SC_ASSNCROS].val3; - if (sd->sc_data[SC_DONTFORGETME].timer != -1) - { // 私を忘れないで - aspd_rate += - sd->sc_data[SC_DONTFORGETME].val1 * 3 + - sd->sc_data[SC_DONTFORGETME].val2 + - (sd->sc_data[SC_DONTFORGETME].val3 >> 16); - sd->speed = - sd->speed * (100 + sd->sc_data[SC_DONTFORGETME].val1 * 2 + - sd->sc_data[SC_DONTFORGETME].val2 + - (sd->sc_data[SC_DONTFORGETME].val3 & 0xffff)) / - 100; - } { - StatusChange i; - if (sd->sc_data[i = SC_SPEEDPOTION2].timer != -1 - || sd->sc_data[i = SC_SPEEDPOTION1].timer != -1 - || sd->sc_data[i = SC_SPEEDPOTION0].timer != -1) - aspd_rate -= sd->sc_data[i].val1; + if (sd->sc_data[SC_SPEEDPOTION0].timer != -1) + aspd_rate -= sd->sc_data[SC_SPEEDPOTION0].val1; } if (sd->sc_data[SC_HASTE].timer != -1) @@ -1948,122 +1714,14 @@ int pc_calcstatus(struct map_session_data *sd, int first) aspd_rate += sd->sc_data[SC_PHYS_SHIELD].val1; // HIT/FLEE変化系 - if (sd->sc_data[SC_WHISTLE].timer != -1) - { // 口笛 - sd->flee += sd->flee * (sd->sc_data[SC_WHISTLE].val1 - + sd->sc_data[SC_WHISTLE].val2 + - (sd->sc_data[SC_WHISTLE].val3 >> 16)) / - 100; - sd->flee2 += - (sd->sc_data[SC_WHISTLE].val1 + sd->sc_data[SC_WHISTLE].val2 + - (sd->sc_data[SC_WHISTLE].val3 & 0xffff)) * 10; - } - if (sd->sc_data[SC_HUMMING].timer != -1) // ハミング - sd->hit += - (sd->sc_data[SC_HUMMING].val1 * 2 + - sd->sc_data[SC_HUMMING].val2 + - sd->sc_data[SC_HUMMING].val3) * sd->hit / 100; - if (sd->sc_data[SC_VIOLENTGALE].timer != -1 && sd->def_ele == 4) - { // バイオレントゲイル - sd->flee += sd->flee * sd->sc_data[SC_VIOLENTGALE].val3 / 100; - } if (sd->sc_data[SC_BLIND].timer != -1) { // 暗黒 sd->hit -= sd->hit * 25 / 100; sd->flee -= sd->flee * 25 / 100; } - if (sd->sc_data[SC_WINDWALK].timer != -1) // ウィンドウォーク - sd->flee += sd->flee * (sd->sc_data[SC_WINDWALK].val2) / 100; - if (sd->sc_data[SC_SPIDERWEB].timer != -1) //スパイダーウェブ - sd->flee -= sd->flee * 50 / 100; - if (sd->sc_data[SC_TRUESIGHT].timer != -1) //トゥルーサイト - sd->hit += 3 * (sd->sc_data[SC_TRUESIGHT].val1); - if (sd->sc_data[SC_CONCENTRATION].timer != -1) //コンセントレーション - sd->hit += (10 * (sd->sc_data[SC_CONCENTRATION].val1)); - - // その他 - if (sd->sc_data[SC_APPLEIDUN].timer != -1) - { // イドゥンの林檎 - sd->status.max_hp += - ((5 + sd->sc_data[SC_APPLEIDUN].val1 * 2 + - ((sd->sc_data[SC_APPLEIDUN].val2 + 1) >> 1) + - sd->sc_data[SC_APPLEIDUN].val3 / 10) * sd->status.max_hp) / - 100; - if (sd->status.max_hp < 0 - || sd->status.max_hp > battle_config.max_hp) - sd->status.max_hp = battle_config.max_hp; - } - if (sd->sc_data[SC_DELUGE].timer != -1 && sd->def_ele == 1) - { // デリュージ - sd->status.max_hp += - sd->status.max_hp * sd->sc_data[SC_DELUGE].val3 / 100; - if (sd->status.max_hp < 0 - || sd->status.max_hp > battle_config.max_hp) - sd->status.max_hp = battle_config.max_hp; - } - if (sd->sc_data[SC_SERVICE4U].timer != -1) - { // サービスフォーユー - sd->status.max_sp += - sd->status.max_sp * (10 + sd->sc_data[SC_SERVICE4U].val1 + - sd->sc_data[SC_SERVICE4U].val2 + - sd->sc_data[SC_SERVICE4U].val3) / 100; - if (sd->status.max_sp < 0 - || sd->status.max_sp > battle_config.max_sp) - sd->status.max_sp = battle_config.max_sp; - sd->dsprate -= - (10 + sd->sc_data[SC_SERVICE4U].val1 * 3 + - sd->sc_data[SC_SERVICE4U].val2 + - sd->sc_data[SC_SERVICE4U].val3); - if (sd->dsprate < 0) - sd->dsprate = 0; - } - - if (sd->sc_data[SC_FORTUNE].timer != -1) // 幸運のキス - sd->critical += - (10 + sd->sc_data[SC_FORTUNE].val1 + - sd->sc_data[SC_FORTUNE].val2 + - sd->sc_data[SC_FORTUNE].val3) * 10; - if (sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1) - { // 爆裂波動 - sd->critical += sd->sc_data[SC_EXPLOSIONSPIRITS].val2; - } - - if (sd->sc_data[SC_STEELBODY].timer != -1) - { // 金剛 - sd->def = 90; - sd->mdef = 90; - aspd_rate += 25; - sd->speed = (sd->speed * 125) / 100; - } - 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; - } - if (sd->sc_data[SC_ENCPOISON].timer != -1) - sd->addeff[BadSC::POISON] += sd->sc_data[SC_ENCPOISON].val2; - - if (sd->sc_data[SC_DANCING].timer != -1) - { // 演奏/ダンス使用中 - sd->speed *= 4; - sd->nhealsp = 0; - sd->nshealsp = 0; - sd->nsshealsp = 0; - } if (sd->sc_data[SC_CURSE].timer != -1) sd->speed += 450; - - if (sd->sc_data[SC_TRUESIGHT].timer != -1) //トゥルーサイト - sd->critical += - sd->critical * (sd->sc_data[SC_TRUESIGHT].val1) / 100; - -/* if (sd->sc_data[SC_VOLCANO].timer!=-1) // エンチャントポイズン(属性はbattle.cで) - sd->addeff[2]+=sd->sc_data[SC_VOLCANO].val2;//% of granting - if (sd->sc_data[SC_DELUGE].timer!=-1) // エンチャントポイズン(属性はbattle.cで) - sd->addeff[0]+=sd->sc_data[SC_DELUGE].val2;//% of granting - */ } if (sd->speed_rate != 100) @@ -2468,10 +2126,6 @@ int pc_bonus(struct map_session_data *sd, SP type, int val) if (sd->state.lr_flag != 2) sd->special_state.no_gemstone = 1; break; - case SP_INFINITE_ENDURE: - if (sd->state.lr_flag != 2) - sd->special_state.infinite_endure = 1; - break; case SP_SPLASH_RANGE: if (sd->state.lr_flag != 2 && sd->splash_range < val) sd->splash_range = val; @@ -3126,7 +2780,7 @@ int pc_useitem(struct map_session_data *sd, int n) amount = sd->status.inventory[n].amount; if (sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 - || sd->sc_data[SC_BERSERK].timer != -1 || !pc_isUseitem(sd, n)) + || !pc_isUseitem(sd, n)) { clif_useitemack(sd, n, 0, 0); return 1; @@ -3328,16 +2982,8 @@ int pc_setpos(struct map_session_data *sd, const char *mapname_org, int x, int y skill_gangsterparadise(sd, 0); } - if (sd->sc_data[SC_TRICKDEAD].timer != -1) - skill_status_change_end(&sd->bl, SC_TRICKDEAD, -1); if (bool(sd->status.option & Option::HIDE2)) skill_status_change_end(&sd->bl, SC_HIDING, -1); - if (bool(sd->status.option & Option::CLOAK)) - skill_status_change_end(&sd->bl, SC_CLOAKING, -1); - if (bool(sd->status.option & (Option::CHASEWALK | Option::HIDE2))) - skill_status_change_end(&sd->bl, SC_CHASEWALK, -1); - if (sd->sc_data[SC_DANCING].timer != -1) // clear dance effect when warping [Valaris] - skill_stop_dancing(&sd->bl, 0); memcpy(mapname, mapname_org, 24); mapname[16] = 0; @@ -3579,11 +3225,6 @@ void pc_walk(timer_id tid, tick_t tick, custom_id_t id, custom_data_t data) if (moveblock) map_addblock(&sd->bl); - if (sd->sc_data[SC_DANCING].timer != -1) - skill_unit_move_unit_group((struct skill_unit_group *) - sd->sc_data[SC_DANCING].val2, - sd->bl.m, dx, dy); - map_foreachinmovearea(std::bind(clif_pcinsight, ph::_1, sd), sd->bl.m, x - AREA_SIZE, y - AREA_SIZE, x + AREA_SIZE, y + AREA_SIZE, @@ -3616,11 +3257,6 @@ void pc_walk(timer_id tid, tick_t tick, custom_id_t id, custom_data_t data) skill_devotion3(&sd->bl, sd->dev.val1[i]); break; } - // 被ディボーション検査 - if (sd->sc_data[SC_DEVOTION].val1) - { - skill_devotion2(&sd->bl, sd->sc_data[SC_DEVOTION].val1); - } skill_unit_move(&sd->bl, tick, 1); // スキルユニットの検査 @@ -3823,74 +3459,6 @@ int pc_checkskill(struct map_session_data *sd, SkillID skill_id) } /*========================================== - * 武器変更によるスキルの継続チェック - * 引数: - * struct map_session_data *sd セッションデータ - * int nameid 装備品ID - * 返り値: - * 0 変更なし - * -1 スキルを解除 - *------------------------------------------ - */ -static -int pc_checkallowskill(struct map_session_data *sd) -{ - nullpo_ret(sd); - - if (sd->sc_data[SC_TWOHANDQUICKEN].timer != -1) - { // 2HQ - skill_status_change_end(&sd->bl, SC_TWOHANDQUICKEN, -1); // 2HQを解除 - return -1; - } - if (sd->sc_data[SC_AURABLADE].timer != -1) - { // オーラブレード - skill_status_change_end(&sd->bl, SC_AURABLADE, -1); // オーラブレードを解除 - return -1; - } - if (sd->sc_data[SC_PARRYING].timer != -1) - { // パリイング - skill_status_change_end(&sd->bl, SC_PARRYING, -1); // パリイングを解除 - return -1; - } - if (sd->sc_data[SC_CONCENTRATION].timer != -1) - { // コンセントレーション - skill_status_change_end(&sd->bl, SC_CONCENTRATION, -1); // コンセントレーションを解除 - return -1; - } - if (sd->sc_data[SC_SPEARSQUICKEN].timer != -1) - { // スピアクィッケン - skill_status_change_end(&sd->bl, SC_SPEARSQUICKEN, -1); // スピアクイッケンを解除 - return -1; - } - if (sd->sc_data[SC_ADRENALINE].timer != -1) - { // アドレナリンラッシュ - skill_status_change_end(&sd->bl, SC_ADRENALINE, -1); // アドレナリンラッシュを解除 - return -1; - } - - if (sd->status.shield <= 0) - { - if (sd->sc_data[SC_AUTOGUARD].timer != -1) - { // オートガード - skill_status_change_end(&sd->bl, SC_AUTOGUARD, -1); - return -1; - } - if (sd->sc_data[SC_DEFENDER].timer != -1) - { // ディフェンダー - skill_status_change_end(&sd->bl, SC_DEFENDER, -1); - return -1; - } - if (sd->sc_data[SC_REFLECTSHIELD].timer != -1) - { //リフレクトシールド - skill_status_change_end(&sd->bl, SC_REFLECTSHIELD, -1); - return -1; - } - } - - return 0; -} - -/*========================================== * 装 備品のチェック *------------------------------------------ */ @@ -3954,11 +3522,6 @@ void pc_attack_timer(timer_id tid, tick_t tick, custom_id_t id, custom_data_t) Option *opt = battle_get_option(bl); if (opt != NULL && bool(*opt & Option::REAL_ANY_HIDE)) return; - if (((sc_data = battle_get_sc_data(bl)) - && sc_data[SC_TRICKDEAD].timer != -1) - || ((sc_data = battle_get_sc_data(bl)) - && sc_data[SC_BASILICA].timer != -1)) - return; if (sd->skilltimer != -1) return; @@ -3998,9 +3561,7 @@ void pc_attack_timer(timer_id tid, tick_t tick, custom_id_t id, custom_data_t) if (dist <= range && !battle_check_range(&sd->bl, bl, range)) { - if (pc_can_reach(sd, bl->x, bl->y) && sd->canmove_tick < tick - && (sd->sc_data[SC_ANKLE].timer == -1 - || sd->sc_data[SC_SPIDERWEB].timer == -1)) + if (pc_can_reach(sd, bl->x, bl->y) && sd->canmove_tick < tick) // TMW client doesn't support this //pc_walktoxy(sd,bl->x,bl->y); clif_movetoattack(sd, bl); @@ -4019,9 +3580,6 @@ void pc_attack_timer(timer_id tid, tick_t tick, custom_id_t id, custom_data_t) pc_stop_walking(sd, 0); sd->attacktarget_lv = battle_weapon_attack(&sd->bl, bl, tick, BCT_ZERO); - if (!(battle_config.pc_cloak_check_type & 2) - && sd->sc_data[SC_CLOAKING].timer != -1) - skill_status_change_end(&sd->bl, SC_CLOAKING, -1); map_freeblock_unlock(); sd->attackabletime = tick + (sd->aspd << 1); } @@ -4219,15 +3777,6 @@ int pc_gainexp_reason(struct map_session_data *sd, int base_exp, int job_exp, }}; MAP_LOG_PC(sd, "GAINXP %d %d %s", base_exp, job_exp, reasons[reason]); - if (sd->sc_data[SC_RICHMANKIM].timer != -1) - { - // added bounds checking [Vaalris] - base_exp += - base_exp * (25 + sd->sc_data[SC_RICHMANKIM].val1 * 25) / 100; - job_exp += - job_exp * (25 + sd->sc_data[SC_RICHMANKIM].val1 * 25) / 100; - } - if (!battle_config.multi_level_up && pc_nextbaseafter(sd)) { while (sd->status.base_exp + base_exp >= pc_nextbaseafter(sd) @@ -4636,24 +4185,15 @@ int pc_damage(struct block_list *src, struct map_session_data *sd, else MAP_LOG_PC(sd, "INJURED-BY null FOR %d", damage); - // 歩 いていたら足を止める - if (sd->sc_data[SC_ENDURE].timer == -1 - && !sd->special_state.infinite_endure) - pc_stop_walking(sd, 3); + pc_stop_walking(sd, 3); // 演奏/ダンスの中断 if (damage > sd->status.max_hp >> 2) skill_stop_dancing(&sd->bl, 0); sd->status.hp -= damage; - if (sd->sc_data[SC_TRICKDEAD].timer != -1) - skill_status_change_end(&sd->bl, SC_TRICKDEAD, -1); if (bool(sd->status.option & Option::HIDE2)) skill_status_change_end(&sd->bl, SC_HIDING, -1); - if (bool(sd->status.option & Option::CLOAK)) - skill_status_change_end(&sd->bl, SC_CLOAKING, -1); - if (bool(sd->status.option & Option::CHASEWALK)) - skill_status_change_end(&sd->bl, SC_CHASEWALK, -1); if (sd->status.hp > 0) { @@ -4699,8 +4239,6 @@ int pc_damage(struct block_list *src, struct map_session_data *sd, for (i = 0; i < 5; i++) if (sd->dev.val1[i]) { - skill_status_change_end(&map_id2sd(sd->dev.val1[i])->bl, - SC_DEVOTION, -1); sd->dev.val1[i] = sd->dev.val2[i] = 0; } @@ -5088,9 +4626,6 @@ int pc_heal(struct map_session_data *sd, int hp, int sp) sp = 0; } - if (sd->sc_data[SC_BERSERK].timer != -1) //バーサーク中は回復させないらしい - return 0; - if (hp + sd->status.hp > sd->status.max_hp) hp = sd->status.max_hp - sd->status.hp; if (sp + sd->status.sp > sd->status.max_sp) @@ -5199,9 +4734,6 @@ int pc_itemheal_effect(struct map_session_data *sd, int hp, int sp) { nullpo_ret(sd); - if (sd->sc_data[SC_GOSPEL].timer != -1) //バーサーク中は回復させないらしい - return 0; - if (sd->state.potionpitcher_flag) { sd->potion_hp = hp; @@ -5858,12 +5390,6 @@ int pc_equipitem(struct map_session_data *sd, int n, EPOS) // -- moonsoul (if player is berserk then cannot equip) // - if (sd->sc_data[SC_BERSERK].timer != -1) - { - clif_equipitemack(sd, n, EPOS::ZERO, 0); // fail - return 0; - } - if (pos == (EPOS::MISC2 | EPOS::CAPE)) { // アクセサリ用例外処理 @@ -5963,7 +5489,6 @@ int pc_equipitem(struct map_session_data *sd, int n, EPOS) } pc_signal_advanced_equipment_change(sd, n); - pc_checkallowskill(sd); // 装備品でスキルか解除されるかチェック if (itemdb_look(sd->status.inventory[n].nameid) == 11 && arrow) { // Added by RoVeRT clif_arrowequip(sd, arrow); @@ -5971,24 +5496,6 @@ int pc_equipitem(struct map_session_data *sd, int n, EPOS) } pc_calcstatus(sd, 0); - if (sd->special_state.infinite_endure) - { - if (sd->sc_data[SC_ENDURE].timer == -1) - skill_status_change_start(&sd->bl, SC_ENDURE, 10, 1, 0, 0, 0, 0); - } - else - { - if (sd->sc_data[SC_ENDURE].timer != -1 && sd->sc_data[SC_ENDURE].val2) - skill_status_change_end(&sd->bl, SC_ENDURE, -1); - } - - if (sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 - && !battle_check_undead(7, sd->def_ele)) - skill_status_change_end(&sd->bl, SC_SIGNUMCRUCIS, -1); - if (sd->sc_data[SC_DANCING].timer != -1 - && (sd->status.weapon != 13 && sd->status.weapon != 14)) - skill_stop_dancing(&sd->bl, 0); - return 0; } @@ -6002,12 +5509,6 @@ int pc_unequipitem(struct map_session_data *sd, int n, CalcStatus type) // -- moonsoul (if player is berserk then cannot unequip) // - if (sd->sc_data[SC_BERSERK].timer != -1) - { - clif_unequipitemack(sd, n, EPOS::ZERO, 0); - return 0; - } - if (battle_config.battle_log) PRINTF("unequip %d %x:%x\n", n, pc_equippoint(sd, n), @@ -6057,10 +5558,6 @@ int pc_unequipitem(struct map_session_data *sd, int n, CalcStatus type) clif_unequipitemack(sd, n, sd->status.inventory[n].equip, 1); sd->status.inventory[n].equip = EPOS::ZERO; - if (type == CalcStatus::NOW) - pc_checkallowskill(sd); - if (sd->weapontype1 == 0 && sd->weapontype2 == 0) - skill_encchant_eremental_end(&sd->bl, StatusChange::NEGATIVE1); } else { @@ -6069,9 +5566,6 @@ int pc_unequipitem(struct map_session_data *sd, int n, CalcStatus type) if (type == CalcStatus::NOW) { pc_calcstatus(sd, 0); - if (sd->sc_data[SC_SIGNUMCRUCIS].timer != -1 - && !battle_check_undead(7, sd->def_ele)) - skill_status_change_end(&sd->bl, SC_SIGNUMCRUCIS, -1); } return 0; @@ -6384,8 +5878,6 @@ int pc_spheal(struct map_session_data *sd) a = natural_heal_diff_tick; if (pc_issit(sd)) a += a; - if (sd->sc_data[SC_MAGNIFICAT].timer != -1) // マグニフィカート - a += a; return a; } @@ -6404,8 +5896,6 @@ int pc_hpheal(struct map_session_data *sd) a = natural_heal_diff_tick; if (pc_issit(sd)) a += a; - if (sd->sc_data[SC_MAGNIFICAT].timer != -1) // Modified by RoVeRT - a += a; return a; } @@ -6414,13 +5904,10 @@ static int pc_natural_heal_hp(struct map_session_data *sd) { int bhp; - int inc_num, bonus, skill; + int inc_num, bonus; nullpo_ret(sd); - if (sd->sc_data[SC_TRICKDEAD].timer != -1) // Modified by RoVeRT - return 0; - if (pc_checkoverhp(sd)) { sd->hp_sub = sd->inchealhptick = 0; @@ -6432,16 +5919,8 @@ int pc_natural_heal_hp(struct map_session_data *sd) if (sd->walktimer == -1) { inc_num = pc_hpheal(sd); - if (sd->sc_data[SC_TENSIONRELAX].timer != -1) - { // テンションリラックス - sd->hp_sub += 2 * inc_num; - sd->inchealhptick += 3 * natural_heal_diff_tick; - } - else - { - sd->hp_sub += inc_num; - sd->inchealhptick += natural_heal_diff_tick; - } + sd->hp_sub += inc_num; + sd->inchealhptick += natural_heal_diff_tick; } else { @@ -6493,30 +5972,6 @@ int pc_natural_heal_hp(struct map_session_data *sd) sd->inchealhptick = 0; return 0; - - if (sd->sc_data[SC_APPLEIDUN].timer != -1) - { // Apple of Idun - if (sd->inchealhptick >= 6000 && sd->status.hp < sd->status.max_hp) - { - bonus = skill * 20; - while (sd->inchealhptick >= 6000) - { - sd->inchealhptick -= 6000; - if (sd->status.hp + bonus <= sd->status.max_hp) - sd->status.hp += bonus; - else - { - bonus = sd->status.max_hp - sd->status.hp; - sd->status.hp = sd->status.max_hp; - sd->hp_sub = sd->inchealhptick = 0; - } - } - } - } - else - sd->inchealhptick = 0; - - return 0; } static @@ -6527,9 +5982,6 @@ int pc_natural_heal_sp(struct map_session_data *sd) nullpo_ret(sd); - if (sd->sc_data[SC_TRICKDEAD].timer != -1) // Modified by RoVeRT - return 0; - if (pc_checkoversp(sd)) { sd->sp_sub = sd->inchealsptick = 0; @@ -6539,8 +5991,7 @@ int pc_natural_heal_sp(struct map_session_data *sd) bsp = sd->status.sp; inc_num = pc_spheal(sd); - if (sd->sc_data[SC_EXPLOSIONSPIRITS].timer == -1) - sd->sp_sub += inc_num; + sd->sp_sub += inc_num; if (sd->walktimer == -1) sd->inchealsptick += natural_heal_diff_tick; else @@ -6669,11 +6120,7 @@ void pc_natural_heal_sub(struct map_session_data *sd) && !pc_ishiding(sd) && sd->sc_data[SC_POISON].timer == -1) { pc_natural_heal_hp(sd); - if (sd->sc_data[SC_EXTREMITYFIST].timer == -1 && //阿修羅状態ではSPが回復しない - sd->sc_data[SC_DANCING].timer == -1 && //ダンス状態ではSPが回復しない - sd->sc_data[SC_BERSERK].timer == -1 //バーサーク状態ではSPが回復しない - ) - pc_natural_heal_sp(sd); + pc_natural_heal_sp(sd); } else { @@ -6844,9 +6291,6 @@ void pc_setstand(struct map_session_data *sd) { nullpo_retv(sd); - if (sd->sc_data[SC_TENSIONRELAX].timer != -1) - skill_status_change_end(&sd->bl, SC_TENSIONRELAX, -1); - sd->state.dead_sit = 0; } diff --git a/src/map/skill.cpp b/src/map/skill.cpp index c963135..aac7e1f 100644 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -1025,8 +1025,6 @@ int skill_attack(BF attack_type, struct block_list *src, if (skill_get_pl(skillid) != 2) //スキルの属性が地属性でなければ何もしない return 0; } - if (sc_data && sc_data[SC_TRICKDEAD].timer != -1) //死んだふり中は何もしない - return 0; if (src->type == BL_PC && ((struct map_session_data *) src)->chatID) //術者がPCでチャット中なら何もしない return 0; if (dsrc->type == BL_PC && ((struct map_session_data *) dsrc)->chatID) //術者がPCでチャット中なら何もしない @@ -1038,34 +1036,6 @@ int skill_attack(BF attack_type, struct block_list *src, lv = (flag >> 20) & 0xf; dmg = battle_calc_attack(attack_type, src, bl, skillid, skilllv, flag & 0xff); //ダメージ計算 -//マジックロッド処理ここから - if (bool(attack_type & BF_MAGIC) - && sc_data - && sc_data[SC_MAGICROD].timer != -1 - && src == dsrc) - { //魔法攻撃でマジックロッド状態でsrc=dsrcなら - dmg.damage = dmg.damage2 = 0; //ダメージ0 - if (bl->type == BL_PC) - { //対象がPCの場合 - int sp = skill_get_sp(skillid, skilllv); //使用されたスキルのSPを吸収 - sp = sp * sc_data[SC_MAGICROD].val2 / 100; //吸収率計算 - if (sp > 0x7fff) - sp = 0x7fff; //SP多すぎの場合は理論最大値 - else if (sp < 1) - sp = 1; //1以下の場合は1 - if (((struct map_session_data *) bl)->status.sp + sp > - ((struct map_session_data *) bl)->status.max_sp) - { //回復SP+現在のSPがMSPより大きい場合 - sp = ((struct map_session_data *) bl)->status.max_sp - ((struct map_session_data *) bl)->status.sp; //SPをMSP-現在SPにする - ((struct map_session_data *) bl)->status.sp = ((struct map_session_data *) bl)->status.max_sp; //現在のSPにMSPを代入 - } - else //回復SP+現在のSPがMSPより小さい場合は回復SPを加算 - ((struct map_session_data *) bl)->status.sp += sp; - ((struct map_session_data *) bl)->canact_tick = tick + skill_delayfix(bl, 0); // - } - } -//マジックロッド処理ここまで - damage = dmg.damage + dmg.damage2; if (lv == 15) @@ -1114,12 +1084,6 @@ int skill_attack(BF attack_type, struct block_list *src, rdamage = 1; } } - if (sc_data && sc_data[SC_REFLECTSHIELD].timer != -1) - { //リフレクトシールド時 - rdamage += damage * sc_data[SC_REFLECTSHIELD].val2 / 100; //跳ね返し計算 - if (rdamage < 1) - rdamage = 1; - } } else if (bool(dmg.flag & BF_LONG)) { //遠距離攻撃時?※ @@ -1708,13 +1672,6 @@ int skill_castend_map(struct map_session_data *sd, SkillID skill_num, || bool(sd->status.option & Option::HIDE2)) return 0; - if (sd->sc_data[SC_DIVINA].timer != -1 - || sd->sc_data[SC_ROKISWEIL].timer != -1 - || sd->sc_data[SC_STEELBODY].timer != -1 - || sd->sc_data[SC_DANCING].timer != -1 - || sd->sc_data[SC_BERSERK].timer != -1) - return 0; - if (skill_num != sd->skillid) /* 不正パケットらしい */ return 0; @@ -1872,15 +1829,14 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, { struct skill_unit *unit2; eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); - StatusChange type = SC_PNEUMA; - if (sc_data && sc_data[type].timer == -1) - skill_status_change_start(bl, type, sg->skill_lv, (int) src, - 0, 0, 0, 0); - else if ((unit2 = (struct skill_unit *) sc_data[type].val2) + if (sc_data && sc_data[SC_PNEUMA].timer == -1) + skill_status_change_start(bl, SC_PNEUMA, sg->skill_lv, + (int) src, 0, 0, 0, 0); + else if ((unit2 = (struct skill_unit *) sc_data[SC_PNEUMA].val2) && unit2 != src) { if (DIFF_TICK(sg->tick, unit2->group->tick) > 0) - skill_status_change_start(bl, type, sg->skill_lv, + skill_status_change_start(bl, SC_PNEUMA, sg->skill_lv, (int) src, 0, 0, 0, 0); ts->tick -= sg->interval; } @@ -1890,15 +1846,14 @@ int skill_unit_onplace(struct skill_unit *src, struct block_list *bl, { struct skill_unit *unit2; eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); - StatusChange type = SC_SAFETYWALL; - if (sc_data && sc_data[type].timer == -1) - skill_status_change_start(bl, type, sg->skill_lv, (int) src, - 0, 0, 0, 0); - else if ((unit2 = (struct skill_unit *) sc_data[type].val2) + if (sc_data && sc_data[SC_SAFETYWALL].timer == -1) + skill_status_change_start(bl, SC_SAFETYWALL, sg->skill_lv, + (int) src, 0, 0, 0, 0); + else if ((unit2 = (struct skill_unit *) sc_data[SC_SAFETYWALL].val2) && unit2 != src) { if (sg->val1 < unit2->group->val1) - skill_status_change_start(bl, type, sg->skill_lv, + skill_status_change_start(bl, SC_SAFETYWALL, sg->skill_lv, (int) src, 0, 0, 0, 0); ts->tick -= sg->interval; } @@ -2255,10 +2210,9 @@ int skill_unit_onout(struct skill_unit *src, struct block_list *bl, { eptr<struct status_change, StatusChange> sc_data = battle_get_sc_data(bl); StatusChange type = - (sg->unit_id == 0x85) ? SC_PNEUMA : - ((sg->unit_id == 0x7e) ? SC_SAFETYWALL : SC_QUAGMIRE); - if ((type != SC_QUAGMIRE || bl->type != BL_MOB) && - sc_data && sc_data[type].timer != -1 + (sg->unit_id == 0x85) ? SC_PNEUMA : SC_SAFETYWALL; + if (sc_data + && sc_data[type].timer != -1 && ((struct skill_unit *) sc_data[type].val2) == src) { skill_status_change_end(bl, type, -1); @@ -2278,17 +2232,11 @@ int skill_unit_onout(struct skill_unit *src, struct block_list *bl, case 0xb5: case 0xb8: { - struct block_list *target = map_id2bl(sg->val2); - if (target == bl) - skill_status_change_end(bl, SC_SPIDERWEB, -1); sg->limit = DIFF_TICK(tick, sg->tick) + 1000; } break; case 0xb6: { - struct block_list *target = map_id2bl(sg->val2); - if (target == bl) - skill_status_change_end(bl, SC_FOGWALL, -1); sg->limit = DIFF_TICK(tick, sg->tick) + 1000; } break; @@ -2341,9 +2289,6 @@ int skill_unit_onout(struct skill_unit *src, struct block_list *bl, break; case 0xb7: /* スパイダーウェッブ */ { - struct block_list *target = map_id2bl(sg->val2); - if (target && target == bl) - skill_status_change_end(bl, SC_SPIDERWEB, -1); sg->limit = DIFF_TICK(tick, sg->tick) + 1000; } break; @@ -2637,14 +2582,7 @@ int skill_check_condition(struct map_session_data *sd, int type) clif_skill_fail(sd, sd->skillid, 0, 0); return 0; } - if (sd->sc_data[SC_DIVINA].timer != -1 - || sd->sc_data[SC_ROKISWEIL].timer != -1 - || sd->sc_data[SC_STEELBODY].timer != -1 - || sd->sc_data[SC_BERSERK].timer != -1) - { - clif_skill_fail(sd, sd->skillid, 0, 0); - return 0; /* 状態異常や沈黙など */ - } + SkillID skill = sd->skillid; lv = sd->skilllv; hp = skill_get_hp(skill, lv); /* 消費HP */ @@ -2710,9 +2648,6 @@ int skill_check_condition(struct map_session_data *sd, int type) if (itemid[i] >= 715 && itemid[i] <= 717 && sd->special_state.no_gemstone) continue; - if (((itemid[i] >= 715 && itemid[i] <= 717) || itemid[i] == 1065) - && sd->sc_data[SC_INTOABYSS].timer != -1) - continue; index[i] = pc_search_inventory(sd, itemid[i]); if (index[i] < 0 || sd->status.inventory[index[i]].amount < amount[i]) @@ -2801,20 +2736,6 @@ int skill_castfix(struct block_list *bl, int time) time = time * battle_config.cast_rate / 100; } - /* サフラギウム */ - if (sc_data && sc_data[SC_SUFFRAGIUM].timer != -1) - { - time = time * (100 - sc_data[SC_SUFFRAGIUM].val1 * 15) / 100; - skill_status_change_end(bl, SC_SUFFRAGIUM, -1); - } - /* ブラギの詩 */ - if (sc_data && sc_data[SC_POEMBRAGI].timer != -1) - time = - time * (100 - - (sc_data[SC_POEMBRAGI].val1 * 3 + - sc_data[SC_POEMBRAGI].val2 + - (sc_data[SC_POEMBRAGI].val3 >> 16))) / 100; - return (time > 0) ? time : 0; } @@ -2842,14 +2763,6 @@ int skill_delayfix(struct block_list *bl, int time) time = time * battle_config.delay_rate / 100; } - /* ブラギの詩 */ - if (sc_data && sc_data[SC_POEMBRAGI].timer != -1) - time = - time * (100 - - (sc_data[SC_POEMBRAGI].val1 * 3 + - sc_data[SC_POEMBRAGI].val2 + - (sc_data[SC_POEMBRAGI].val3 & 0xffff))) / 100; - return (time > 0) ? time : 0; } @@ -2884,31 +2797,9 @@ int skill_use_id(struct map_session_data *sd, int target_id, if (bool(sd->opt1)) return 0; - if (sc_data[SC_CHASEWALK].timer != -1) - return 0; - if (sc_data[SC_VOLCANO].timer != -1) - { - } - if (sc_data[SC_ROKISWEIL].timer != -1) - { - } - if (sd->sc_data[SC_DIVINA].timer != -1 - || sd->sc_data[SC_ROKISWEIL].timer != -1 - || sd->sc_data[SC_STEELBODY].timer != -1 - || sd->sc_data[SC_BERSERK].timer != -1) - { - return 0; /* 状態異常や沈黙など */ - } - if (bool(sd->status.option & Option::HIDE2)) return 0; - /* 演奏/ダンス中 */ - if (sc_data && sc_data[SC_DANCING].timer != -1) - { - return 0; - } - if (skill_get_inf2(skill_num) & 0x200 && sd->bl.id == target_id) return 0; @@ -2931,21 +2822,10 @@ int skill_use_id(struct map_session_data *sd, int target_id, delay = skill_delayfix(&sd->bl, skill_get_delay(skill_num, skill_lv)); sd->state.skillcastcancel = skill_db[skill_num].castcancel; - //メモライズ状態ならキャストタイムが1/3 - if (sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0) - { - casttime = casttime / 3; - if ((--sc_data[SC_MEMORIZE].val2) <= 0) - skill_status_change_end(&sd->bl, SC_MEMORIZE, -1); - } - if (battle_config.pc_skill_log) PRINTF("PC %d skill use target_id=%d skill=%d lv=%d cast=%d\n", sd->bl.id, target_id, skill_num, skill_lv, casttime); -// if(sd->skillitem == skill_num) -// casttime = delay = 0; - if (casttime > 0 || forcecast) { /* 詠唱が必要 */ struct mob_data *md; @@ -2966,14 +2846,11 @@ int skill_use_id(struct map_session_data *sd, int target_id, sd->state.skillcastcancel = 0; sd->skilltarget = target_id; -/* sd->cast_target_bl = bl; */ sd->skillx = 0; sd->skilly = 0; sd->canact_tick = tick + casttime + delay; sd->canmove_tick = tick; - if (!(battle_config.pc_cloak_check_type & 2) && sc_data - && sc_data[SC_CLOAKING].timer != -1) - skill_status_change_end(&sd->bl, SC_CLOAKING, -1); + if (casttime > 0) { sd->skilltimer = add_timer(tick + casttime, skill_castend_id, sd->bl.id, 0); @@ -2985,10 +2862,6 @@ int skill_use_id(struct map_session_data *sd, int target_id, skill_castend_id(sd->skilltimer, tick, sd->bl.id, 0); } - //マジックパワーの効果終了 - if (sc_data && sc_data[SC_MAGICPOWER].timer != -1) - skill_status_change_end(&sd->bl, SC_MAGICPOWER, -1); - return 0; } @@ -3014,15 +2887,6 @@ int skill_use_pos(struct map_session_data *sd, if (bool(sd->opt1)) return 0; - if (sc_data) - { - if (sc_data[SC_DIVINA].timer != -1 || - sc_data[SC_ROKISWEIL].timer != -1 || - sc_data[SC_STEELBODY].timer != -1 || - sc_data[SC_DANCING].timer != -1 || - sc_data[SC_BERSERK].timer != -1) - return 0; /* 状態異常や沈黙など */ - } if (bool(sd->status.option & Option::HIDE2)) return 0; @@ -3056,27 +2920,14 @@ int skill_use_pos(struct map_session_data *sd, sd->bl.id, skill_x, skill_y, skill_num, skill_lv, casttime); -// if(sd->skillitem == skill_num) -// casttime = delay = 0; - //メモライズ状態ならキャストタイムが1/3 - if (sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0) - { - casttime = casttime / 3; - if ((--sc_data[SC_MEMORIZE].val2) <= 0) - skill_status_change_end(&sd->bl, SC_MEMORIZE, -1); - } - if (casttime <= 0) /* 詠唱の無いものはキャンセルされない */ sd->state.skillcastcancel = 0; sd->skilltarget = 0; -/* sd->cast_target_bl = NULL; */ tick = gettick(); sd->canact_tick = tick + casttime + delay; sd->canmove_tick = tick; - if (!(battle_config.pc_cloak_check_type & 2) && sc_data - && sc_data[SC_CLOAKING].timer != -1) - skill_status_change_end(&sd->bl, SC_CLOAKING, -1); + if (casttime > 0) { sd->skilltimer = add_timer(tick + casttime, skill_castend_pos, sd->bl.id, 0); @@ -3087,9 +2938,6 @@ int skill_use_pos(struct map_session_data *sd, sd->skilltimer = -1; skill_castend_pos(sd->skilltimer, tick, sd->bl.id, 0); } - //マジックパワーの効果終了 - if (sc_data && sc_data[SC_MAGICPOWER].timer != -1) - skill_status_change_end(&sd->bl, SC_MAGICPOWER, -1); return 0; } @@ -3169,7 +3017,7 @@ void skill_devotion(struct map_session_data *md, int) struct map_session_data *sd = map_id2sd(md->dev.val1[n]); // 相手が見つからない // 相手をディボしてるのが自分じゃない // 距離が離れてる if (sd == NULL - || (md->bl.id != sd->sc_data[SC_DEVOTION].val1) + || (md->bl.id != 0/* was something else - TODO remove this */) || skill_devotion3(&md->bl, md->dev.val1[n])) { skill_devotion_end(md, sd, n); @@ -3222,13 +3070,6 @@ void skill_devotion_end(struct map_session_data *md, nullpo_retv(sd); md->dev.val1[target] = md->dev.val2[target] = 0; - if (sd) - { - // skill_status_change_end(sd->bl,SC_DEVOTION,-1); - sd->sc_data[SC_DEVOTION].val1 = 0; - sd->sc_data[SC_DEVOTION].val2 = 0; - clif_status_change(&sd->bl, SC_DEVOTION, 0); - } } int skill_gangsterparadise(struct map_session_data *, int) @@ -3357,11 +3198,9 @@ void skill_status_change_timer_sub(struct block_list *bl, switch (type) { case SC_SIGHT: /* サイト */ - case SC_CONCENTRATE: if (bool((*battle_get_option(bl)) & (Option::HIDE2 | Option::CLOAK))) { skill_status_change_end(bl, SC_HIDING, -1); - skill_status_change_end(bl, SC_CLOAKING, -1); } break; } @@ -3429,65 +3268,14 @@ int skill_status_change_end(struct block_list *bl, StatusChange type, int tid) switch (type) { /* 異常の種類ごとの処理 */ - case SC_PROVOKE: /* プロボック */ - case SC_CONCENTRATE: /* 集中力向上 */ - case SC_BLESSING: /* ブレッシング */ - case SC_ANGELUS: /* アンゼルス */ - case SC_INCREASEAGI: /* 速度上昇 */ - case SC_DECREASEAGI: /* 速度減少 */ - case SC_SIGNUMCRUCIS: /* シグナムクルシス */ case SC_HIDING: - case SC_TWOHANDQUICKEN: /* 2HQ */ - case SC_ADRENALINE: /* アドレナリンラッシュ */ - case SC_ENCPOISON: /* エンチャントポイズン */ - case SC_IMPOSITIO: /* インポシティオマヌス */ - case SC_GLORIA: /* グロリア */ - case SC_LOUD: /* ラウドボイス */ - case SC_QUAGMIRE: /* クァグマイア */ - case SC_SPEARSQUICKEN: /* スピアクイッケン */ - case SC_VOLCANO: - case SC_DELUGE: - case SC_VIOLENTGALE: - case SC_ETERNALCHAOS: /* エターナルカオス */ - case SC_DRUMBATTLE: /* 戦太鼓の響き */ - case SC_NIBELUNGEN: /* ニーベルングの指輪 */ - case SC_WHISTLE: /* 口笛 */ - case SC_ASSNCROS: /* 夕陽のアサシンクロス */ - case SC_HUMMING: /* ハミング */ - case SC_DONTFORGETME: /* 私を忘れないで */ - case SC_FORTUNE: /* 幸運のキス */ - case SC_SERVICE4U: /* サービスフォーユー */ - case SC_EXPLOSIONSPIRITS: // 爆裂波動 - case SC_STEELBODY: // 金剛 - case SC_DEFENDER: case SC_SPEEDPOTION0: /* 増速ポーション */ - case SC_SPEEDPOTION1: - case SC_SPEEDPOTION2: - case SC_APPLEIDUN: /* イドゥンの林檎 */ - case SC_RIDING: - case SC_AURABLADE: /* オーラブレード */ - case SC_PARRYING: /* パリイング */ - case SC_CONCENTRATION: /* コンセントレーション */ - case SC_TENSIONRELAX: /* テンションリラックス */ - case SC_ASSUMPTIO: /* アシャンプティオ */ - case SC_WINDWALK: /* ウインドウォーク */ - case SC_TRUESIGHT: /* トゥルーサイト */ - case SC_SPIDERWEB: /* スパイダーウェッブ */ - case SC_MAGICPOWER: /* 魔法力増幅 */ - case SC_CHASEWALK: case SC_ATKPOT: /* attack potion [Valaris] */ case SC_MATKPOT: /* magic attack potion [Valaris] */ - case SC_WEDDING: //結婚用(結婚衣裳になって歩くのが遅いとか) - case SC_MELTDOWN: /* メルトダウン */ case SC_PHYS_SHIELD: case SC_HASTE: calc_flag = 1; break; - case SC_BERSERK: /* バーサーク */ - calc_flag = 1; - clif_status_change(bl, SC_INCREASEAGI, 0); /* アイコン消去 */ - break; - case SC_DEVOTION: /* ディボーション */ { struct map_session_data *md = map_id2sd(sc_data[type].val1); sc_data[type].val1 = sc_data[type].val2 = 0; @@ -3495,35 +3283,8 @@ int skill_status_change_end(struct block_list *bl, StatusChange type, int tid) calc_flag = 1; } break; - case SC_DANCING: - { - struct map_session_data *dsd; - eptr<struct status_change, StatusChange> d_sc_data; - if (sc_data[type].val4 - && (dsd = map_id2sd(sc_data[type].val4))) - { - d_sc_data = dsd->sc_data; - //合奏で相手がいる場合相手のval4を0にする - if (d_sc_data && d_sc_data[type].timer != -1) - d_sc_data[type].val4 = 0; - } - } - calc_flag = 1; - break; case SC_NOCHAT: //チャット禁止状態 break; - case SC_SPLASHER: /* ベナムスプラッシャー */ - { - struct block_list *src = map_id2bl(sc_data[type].val3); - if (src && tid != -1) - { - //自分にダメージ&周囲3*3にダメージ - skill_castend_damage_id(src, bl, - SkillID(sc_data[type].val2), sc_data[type].val1, - gettick(), BCT_ZERO); - } - } - break; case SC_SELFDESTRUCTION: /* 自爆 */ { //自分のダメージは0にして @@ -3587,11 +3348,6 @@ int skill_status_change_end(struct block_list *bl, StatusChange type, int tid) opt_flag = 1; break; - case SC_SIGNUMCRUCIS: - *opt2 &= ~Opt2::_signumcrucis; - opt_flag = 1; - break; - case SC_SPEEDPOTION0: *opt2 &= ~Opt2::_speedpotion0; opt_flag = 1; @@ -3607,52 +3363,10 @@ int skill_status_change_end(struct block_list *bl, StatusChange type, int tid) opt_flag = 1; break; - case SC_CLOAKING: - *option &= ~Option::CLOAK; - opt_flag = 1; - break; - - case SC_CHASEWALK: - *option &= ~Option::CHASEWALK; - opt_flag = 1; - break; - case SC_SIGHT: *option &= ~Option::SIGHT; opt_flag = 1; break; - case SC_WEDDING: //結婚用(結婚衣裳になって歩くのが遅いとか) - *option &= ~Option::_wedding; - opt_flag = 1; - break; - - //opt3 - case SC_TWOHANDQUICKEN: /* 2HQ */ - case SC_SPEARSQUICKEN: /* スピアクイッケン */ - case SC_CONCENTRATION: /* コンセントレーション */ - *opt3 &= ~Opt3::_concentration; - break; - case SC_OVERTHRUST: /* オーバースラスト */ - *opt3 &= ~Opt3::_overthrust; - break; - case SC_ENERGYCOAT: /* エナジーコート */ - *opt3 &= ~Opt3::_energycoat; - break; - case SC_EXPLOSIONSPIRITS: // 爆裂波動 - *opt3 &= ~Opt3::_explosionspirits; - break; - case SC_STEELBODY: // 金剛 - *opt3 &= ~Opt3::_steelbody; - break; - case SC_BERSERK: /* バーサーク */ - *opt3 &= ~Opt3::_berserk; - break; - case SC_MARIONETTE: /* マリオネットコントロール */ - *opt3 &= ~Opt3::_marionette; - break; - case SC_ASSUMPTIO: /* アスムプティオ */ - *opt3 &= ~Opt3::_assumptio; - break; } if (night_flag == 1 @@ -3732,25 +3446,6 @@ void skill_status_change_timer(timer_id tid, tick_t tick, custom_id_t id, custom switch (type) { /* 特殊な処理になる場合 */ - case SC_MAXIMIZEPOWER: /* マキシマイズパワー */ - case SC_CLOAKING: /* クローキング */ - case SC_CHASEWALK: - if (sd) - { - if (sd->status.sp > 0) - { /* SP切れるまで持続 */ - sd->status.sp--; - clif_updatestatus(sd, SP_SP); - sc_data[type].timer = add_timer( /* タイマー再設定 */ - sc_data[type].val2 + - tick, - skill_status_change_timer, - bl->id, data); - return; - } - } - break; - case SC_HIDING: /* ハイディング */ if (sd) { /* SPがあって、時間制限の間は持続 */ @@ -3788,84 +3483,6 @@ void skill_status_change_timer(timer_id tid, tick_t tick, custom_id_t id, custom } break; - case SC_SIGNUMCRUCIS: /* シグナムクルシス */ - { - int race = battle_get_race(bl); - if (race == 6 - || battle_check_undead(race, battle_get_elem_type(bl))) - { - sc_data[type].timer = - add_timer(1000 * 600 + tick, skill_status_change_timer, - bl->id, data); - return; - } - } - break; - - case SC_PROVOKE: /* プロボック/オートバーサーク */ - if (sc_data[type].val2 != 0) - { /* オートバーサーク(1秒ごとにHPチェック) */ - if (sd && sd->status.hp > sd->status.max_hp >> 2) /* 停止 */ - break; - sc_data[type].timer = - add_timer(1000 + tick, skill_status_change_timer, bl->id, - data); - return; - } - break; - - case SC_ENDURE: /* インデュア */ - if (sd && sd->special_state.infinite_endure) - { - sc_data[type].timer = - add_timer(1000 * 600 + tick, skill_status_change_timer, - bl->id, data); - sc_data[type].val2 = 1; - return; - } - break; - - case SC_DISSONANCE: /* 不協和音 */ - if ((--sc_data[type].val2) > 0) - { - struct skill_unit *unit = - (struct skill_unit *) sc_data[type].val4; - struct block_list *src; - - if (!unit || !unit->group) - break; - src = map_id2bl(unit->group->src_id); - if (!src) - break; - skill_attack(BF_MISC, src, &unit->bl, bl, - unit->group->skill_id, sc_data[type].val1, tick, - BCT_ZERO); - 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); - return; - } - break; - - case SC_LULLABY: /* 子守唄 */ - 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) - break; - skill_additional_effect(bl, bl, unit->group->skill_id, - sc_data[type].val1, - BF_LONG | BF_SKILL | BF_MISC, tick); - sc_data[type].timer = - add_timer(skill_get_time(unit->group->skill_id, - unit->group->skill_lv) / 10 + tick, - skill_status_change_timer, bl->id, data); - return; - } - break; - case SC_STONE: if (sc_data[type].val2 != 0) { @@ -3947,37 +3564,9 @@ void skill_status_change_timer(timer_id tid, tick_t tick, custom_id_t id, custom data); break; - case SC_TENSIONRELAX: /* テンションリラックス */ - if (sd) - { /* SPがあって、HPが満タンでなければ継続 */ - if (sd->status.sp > 12 && sd->status.max_hp > sd->status.hp) - { - if (sc_data[type].val2 % (sc_data[type].val1 + 3) == 0) - { - sd->status.sp -= 12; - clif_updatestatus(sd, SP_SP); - } - sc_data[type].timer = add_timer( /* タイマー再設定 */ - 10000 + tick, - skill_status_change_timer, - bl->id, data); - return; - } - if (sd->status.max_hp <= sd->status.hp) - skill_status_change_end(&sd->bl, SC_TENSIONRELAX, -1); - } - break; - /* 時間切れ無し?? */ - case SC_AETERNA: - case SC_TRICKDEAD: - case SC_RIDING: - case SC_FALCON: case SC_WEIGHT50: case SC_WEIGHT90: - case SC_MAGICPOWER: /* 魔法力増幅 */ - case SC_REJECTSWORD: /* リジェクトソード */ - case SC_MEMORIZE: /* メモライズ */ case SC_BROKNWEAPON: case SC_BROKNARMOR: if (sc_data[type].timer == tid) @@ -3986,56 +3575,6 @@ void skill_status_change_timer(timer_id tid, tick_t tick, custom_id_t id, custom bl->id, data); return; - case SC_DANCING: //ダンススキルの時間SP消費 - { - int s = 0; - if (sd) - { - if (sd->status.sp > 0 && (--sc_data[type].val3) > 0) - { - if (s && ((sc_data[type].val3 % s) == 0)) - { - sd->status.sp--; - clif_updatestatus(sd, SP_SP); - } - sc_data[type].timer = add_timer( /* タイマー再設定 */ - 1000 + tick, - skill_status_change_timer, - bl->id, data); - return; - } - } - } - break; - case SC_BERSERK: /* バーサーク */ - if (sd) - { /* HPが100以上なら継続 */ - if ((sd->status.hp - sd->status.hp / 100) > 100) - { - sd->status.hp -= sd->status.hp / 100; - clif_updatestatus(sd, SP_HP); - sc_data[type].timer = add_timer( /* タイマー再設定 */ - 15000 + tick, - skill_status_change_timer, - bl->id, data); - return; - } - } - break; - case SC_WEDDING: //結婚用(結婚衣裳になって歩くのが遅いとか) - if (sd) - { - time_t timer; - if (time(&timer) < ((sc_data[type].val2) + 3600)) - { //1時間たっていないので継続 - sc_data[type].timer = add_timer( /* タイマー再設定 */ - 10000 + tick, - skill_status_change_timer, - bl->id, data); - return; - } - } - break; case SC_NOCHAT: //チャット禁止状態 if (sd && battle_config.muting_players) { @@ -4080,35 +3619,6 @@ void skill_status_change_timer(timer_id tid, tick_t tick, custom_id_t id, custom } /*========================================== - * ステータス異常終了 - *------------------------------------------ - */ -int skill_encchant_eremental_end(struct block_list *bl, StatusChange type) -{ - eptr<struct status_change, StatusChange> sc_data; - - nullpo_ret(bl); - sc_data = battle_get_sc_data(bl); - if (not sc_data) - return 0; - - if (type != SC_ENCPOISON && sc_data[SC_ENCPOISON].timer != -1) /* エンチャントポイズン解除 */ - skill_status_change_end(bl, SC_ENCPOISON, -1); - if (type != SC_ASPERSIO && sc_data[SC_ASPERSIO].timer != -1) /* アスペルシオ解除 */ - skill_status_change_end(bl, SC_ASPERSIO, -1); - if (type != SC_FLAMELAUNCHER && sc_data[SC_FLAMELAUNCHER].timer != -1) /* フレイムランチャ解除 */ - skill_status_change_end(bl, SC_FLAMELAUNCHER, -1); - if (type != SC_FROSTWEAPON && sc_data[SC_FROSTWEAPON].timer != -1) /* フロストウェポン解除 */ - skill_status_change_end(bl, SC_FROSTWEAPON, -1); - if (type != SC_LIGHTNINGLOADER && sc_data[SC_LIGHTNINGLOADER].timer != -1) /* ライトニングローダー解除 */ - skill_status_change_end(bl, SC_LIGHTNINGLOADER, -1); - if (type != SC_SEISMICWEAPON && sc_data[SC_SEISMICWEAPON].timer != -1) /* サイスミックウェポン解除 */ - skill_status_change_end(bl, SC_SEISMICWEAPON, -1); - - return 0; -} - -/*========================================== * ステータス異常開始 *------------------------------------------ */ @@ -4153,10 +3663,6 @@ int skill_status_effect(struct block_list *bl, StatusChange type, elem = battle_get_elem_type(bl); undead_flag = battle_check_undead(race, elem); - if (type == SC_AETERNA - && (sc_data[SC_STONE].timer != -1 || sc_data[SC_FREEZE].timer != -1)) - return 0; - switch (type) { case SC_STONE: @@ -4185,8 +3691,6 @@ int skill_status_effect(struct block_list *bl, StatusChange type, if (bl->type == BL_PC) { sd = (struct map_session_data *) bl; - if (sd && type == SC_ADRENALINE) - return 0; if (SC_STONE <= type && type <= SC_BLIND) { @@ -4215,22 +3719,13 @@ int skill_status_effect(struct block_list *bl, StatusChange type, if (type == SC_FREEZE && undead_flag && !(flag & 1)) return 0; - if ((type == SC_ADRENALINE || type == SC_WEAPONPERFECTION - || type == SC_OVERTHRUST) && sc_data[type].timer != -1 - && sc_data[type].val2 && !val2) - return 0; - if (bool(mode & MobMode::BOSS) && (type == SC_STONE || type == SC_FREEZE || type == SC_STAN || type == SC_SLEEP || type == SC_SILENCE - || type == SC_QUAGMIRE - || type == SC_DECREASEAGI - || type == SC_SIGNUMCRUCIS - || type == SC_PROVOKE - || (type == SC_BLESSING && (undead_flag || race == 6))) + ) && !(flag & 1)) { /* ボスには効かない(ただしカードによる効果は適用される) */ @@ -4242,11 +3737,7 @@ int skill_status_effect(struct block_list *bl, StatusChange type, if (sc_data[type].timer != -1) { /* すでに同じ異常になっている場合タイマ解除 */ if (sc_data[type].val1 > val1 - && type != SC_DANCING - && type != SC_DEVOTION && type != SC_SPEEDPOTION0 - && type != SC_SPEEDPOTION1 - && type != SC_SPEEDPOTION2 && type != SC_ATKPOT && type != SC_MATKPOT) // added atk and matk potions [Valaris] return 0; @@ -4261,296 +3752,13 @@ int skill_status_effect(struct block_list *bl, StatusChange type, switch (type) { /* 異常の種類ごとの処理 */ - case SC_PROVOKE: /* プロボック */ - calc_flag = 1; - if (tick <= 0) - tick = 1000; /* (オートバーサーク) */ - break; - case SC_ENDURE: /* インデュア */ - if (tick <= 0) - tick = 1000 * 60; - break; - case SC_CONCENTRATE: /* 集中力向上 */ - calc_flag = 1; - break; - case SC_BLESSING: /* ブレッシング */ - { - if (bl->type == BL_PC || (!undead_flag && race != 6)) - { - if (sc_data[SC_CURSE].timer != -1) - skill_status_change_end(bl, SC_CURSE, -1); - if (sc_data[SC_STONE].timer != -1 - && sc_data[SC_STONE].val2 == 0) - skill_status_change_end(bl, SC_STONE, -1); - } - calc_flag = 1; - } - break; - case SC_ANGELUS: /* アンゼルス */ - calc_flag = 1; - break; - case SC_INCREASEAGI: /* 速度上昇 */ - calc_flag = 1; - if (sc_data[SC_DECREASEAGI].timer != -1) - skill_status_change_end(bl, SC_DECREASEAGI, -1); - if (sc_data[SC_WINDWALK].timer != -1) /* ウインドウォーク */ - skill_status_change_end(bl, SC_WINDWALK, -1); - break; - case SC_DECREASEAGI: /* 速度減少 */ - calc_flag = 1; - if (sc_data[SC_INCREASEAGI].timer != -1) - skill_status_change_end(bl, SC_INCREASEAGI, -1); - break; - case SC_SIGNUMCRUCIS: /* シグナムクルシス */ - calc_flag = 1; -// val2 = 14 + val1; - val2 = 10 + val1 * 2; - tick = 600 * 1000; - clif_emotion(bl, 4); - break; case SC_SLOWPOISON: if (sc_data[SC_POISON].timer == -1) return 0; break; - case SC_TWOHANDQUICKEN: /* 2HQ */ - *opt3 |= Opt3::_concentration; - calc_flag = 1; - break; - case SC_ADRENALINE: /* アドレナリンラッシュ */ - calc_flag = 1; - break; - case SC_WEAPONPERFECTION: /* ウェポンパーフェクション */ - if (battle_config.party_skill_penaly && !val2) - tick /= 5; - break; - case SC_OVERTHRUST: /* オーバースラスト */ - *opt3 |= Opt3::_overthrust; - if (battle_config.party_skill_penaly && !val2) - tick /= 10; - break; - case SC_MAXIMIZEPOWER: /* マキシマイズパワー(SPが1減る時間,val2にも) */ - if (bl->type == BL_PC) - val2 = tick; - else - tick = 5000 * val1; - break; - case SC_ENCPOISON: /* エンチャントポイズン */ - calc_flag = 1; - val2 = (((val1 - 1) / 2) + 3) * 100; /* 毒付与確率 */ - skill_encchant_eremental_end(bl, SC_ENCPOISON); - break; - case SC_POISONREACT: /* ポイズンリアクト */ - break; - case SC_IMPOSITIO: /* インポシティオマヌス */ - calc_flag = 1; - break; - case SC_ASPERSIO: /* アスペルシオ */ - skill_encchant_eremental_end(bl, SC_ASPERSIO); - break; - case SC_SUFFRAGIUM: /* サフラギム */ - case SC_BENEDICTIO: /* 聖体 */ - case SC_MAGNIFICAT: /* マグニフィカート */ - case SC_AETERNA: /* エーテルナ */ - break; - case SC_ENERGYCOAT: /* エナジーコート */ - *opt3 |= Opt3::_energycoat; - break; - case SC_MAGICROD: - val2 = val1 * 20; - break; - case SC_KYRIE: /* キリエエレイソン */ - val2 = battle_get_max_hp(bl) * (val1 * 2 + 10) / 100; /* 耐久度 */ - val3 = (val1 / 2 + 5); /* 回数 */ -// -- moonsoul (added to undo assumptio status if target has it) - if (sc_data[SC_ASSUMPTIO].timer != -1) - skill_status_change_end(bl, SC_ASSUMPTIO, -1); - break; - case SC_MINDBREAKER: - calc_flag = 1; - if (tick <= 0) - tick = 1000; /* (オートバーサーク) */ - break; - case SC_GLORIA: /* グロリア */ - calc_flag = 1; - break; - case SC_LOUD: /* ラウドボイス */ - calc_flag = 1; - break; - case SC_TRICKDEAD: /* 死んだふり */ - break; - case SC_QUAGMIRE: /* クァグマイア */ - calc_flag = 1; - if (sc_data[SC_CONCENTRATE].timer != -1) /* 集中力向上解除 */ - skill_status_change_end(bl, SC_CONCENTRATE, -1); - if (sc_data[SC_INCREASEAGI].timer != -1) /* 速度上昇解除 */ - skill_status_change_end(bl, SC_INCREASEAGI, -1); - if (sc_data[SC_TWOHANDQUICKEN].timer != -1) - skill_status_change_end(bl, SC_TWOHANDQUICKEN, -1); - if (sc_data[SC_SPEARSQUICKEN].timer != -1) - skill_status_change_end(bl, SC_SPEARSQUICKEN, -1); - if (sc_data[SC_ADRENALINE].timer != -1) - skill_status_change_end(bl, SC_ADRENALINE, -1); - if (sc_data[SC_LOUD].timer != -1) - skill_status_change_end(bl, SC_LOUD, -1); - if (sc_data[SC_TRUESIGHT].timer != -1) /* トゥルーサイト */ - skill_status_change_end(bl, SC_TRUESIGHT, -1); - if (sc_data[SC_WINDWALK].timer != -1) /* ウインドウォーク */ - skill_status_change_end(bl, SC_WINDWALK, -1); - if (sc_data[SC_CARTBOOST].timer != -1) /* カートブースト */ - skill_status_change_end(bl, SC_CARTBOOST, -1); - break; - case SC_FLAMELAUNCHER: /* フレームランチャー */ - skill_encchant_eremental_end(bl, SC_FLAMELAUNCHER); - break; - case SC_FROSTWEAPON: /* フロストウェポン */ - skill_encchant_eremental_end(bl, SC_FROSTWEAPON); - break; - case SC_LIGHTNINGLOADER: /* ライトニングローダー */ - skill_encchant_eremental_end(bl, SC_LIGHTNINGLOADER); - break; - case SC_SEISMICWEAPON: /* サイズミックウェポン */ - skill_encchant_eremental_end(bl, SC_SEISMICWEAPON); - break; - case SC_DEVOTION: /* ディボーション */ - calc_flag = 1; - break; - case SC_REFLECTSHIELD: - val2 = 10 + val1 * 3; - break; - case SC_STRIPWEAPON: - case SC_STRIPSHIELD: - case SC_STRIPARMOR: - case SC_STRIPHELM: - case SC_CP_WEAPON: - case SC_CP_SHIELD: - case SC_CP_ARMOR: - case SC_CP_HELM: - break; - - case SC_VOLCANO: - calc_flag = 1; - val3 = val1 * 10; - val4 = - val1 >= 5 ? 20 : (val1 == - 4 ? 19 : (val1 == - 3 ? 17 : (val1 == 2 ? 14 : 10))); - break; - case SC_DELUGE: - calc_flag = 1; - val3 = - val1 >= 5 ? 15 : (val1 == - 4 ? 14 : (val1 == - 3 ? 12 : (val1 == 2 ? 9 : 5))); - val4 = - val1 >= 5 ? 20 : (val1 == - 4 ? 19 : (val1 == - 3 ? 17 : (val1 == 2 ? 14 : 10))); - break; - case SC_VIOLENTGALE: - calc_flag = 1; - val3 = val1 * 3; - val4 = - val1 >= 5 ? 20 : (val1 == - 4 ? 19 : (val1 == - 3 ? 17 : (val1 == 2 ? 14 : 10))); - break; - - case SC_SPEARSQUICKEN: /* スピアクイッケン */ - calc_flag = 1; - val2 = 20 + val1; - *opt3 |= Opt3::_concentration; - break; - - case SC_LULLABY: /* 子守唄 */ - val2 = 11; - break; - case SC_RICHMANKIM: - break; - case SC_ETERNALCHAOS: /* エターナルカオス */ - calc_flag = 1; - break; - case SC_DRUMBATTLE: /* 戦太鼓の響き */ - calc_flag = 1; - val2 = (val1 + 1) * 25; - val3 = (val1 + 1) * 2; - break; - case SC_NIBELUNGEN: /* ニーベルングの指輪 */ - calc_flag = 1; - val2 = (val1 + 2) * 50; - val3 = (val1 + 2) * 25; - break; - case SC_ROKISWEIL: /* ロキの叫び */ - break; - case SC_INTOABYSS: /* 深淵の中に */ - break; - case SC_DISSONANCE: /* 不協和音 */ - val2 = 10; - break; - case SC_WHISTLE: /* 口笛 */ - calc_flag = 1; - break; - case SC_ASSNCROS: /* 夕陽のアサシンクロス */ - calc_flag = 1; - break; - case SC_POEMBRAGI: /* ブラギの詩 */ - break; - case SC_APPLEIDUN: /* イドゥンの林檎 */ - calc_flag = 1; - break; - case SC_UGLYDANCE: /* 自分勝手なダンス */ - val2 = 10; - break; - case SC_HUMMING: /* ハミング */ - calc_flag = 1; - break; - case SC_DONTFORGETME: /* 私を忘れないで */ - calc_flag = 1; - if (sc_data[SC_INCREASEAGI].timer != -1) /* 速度上昇解除 */ - skill_status_change_end(bl, SC_INCREASEAGI, -1); - if (sc_data[SC_TWOHANDQUICKEN].timer != -1) - skill_status_change_end(bl, SC_TWOHANDQUICKEN, -1); - if (sc_data[SC_SPEARSQUICKEN].timer != -1) - skill_status_change_end(bl, SC_SPEARSQUICKEN, -1); - if (sc_data[SC_ADRENALINE].timer != -1) - skill_status_change_end(bl, SC_ADRENALINE, -1); - if (sc_data[SC_ASSNCROS].timer != -1) - skill_status_change_end(bl, SC_ASSNCROS, -1); - if (sc_data[SC_TRUESIGHT].timer != -1) /* トゥルーサイト */ - skill_status_change_end(bl, SC_TRUESIGHT, -1); - if (sc_data[SC_WINDWALK].timer != -1) /* ウインドウォーク */ - skill_status_change_end(bl, SC_WINDWALK, -1); - if (sc_data[SC_CARTBOOST].timer != -1) /* カートブースト */ - skill_status_change_end(bl, SC_CARTBOOST, -1); - break; - case SC_FORTUNE: /* 幸運のキス */ - calc_flag = 1; - break; - case SC_SERVICE4U: /* サービスフォーユー */ - calc_flag = 1; - break; - case SC_DANCING: /* ダンス/演奏中 */ - calc_flag = 1; - val3 = tick / 1000; - tick = 1000; - break; - - case SC_EXPLOSIONSPIRITS: // 爆裂波動 - calc_flag = 1; - val2 = 75 + 25 * val1; - *opt3 |= Opt3::_explosionspirits; - break; - case SC_STEELBODY: // 金剛 - calc_flag = 1; - *opt3 |= Opt3::_steelbody; - break; - case SC_EXTREMITYFIST: /* 阿修羅覇凰拳 */ - break; case SC_SPEEDPOTION0: /* 増速ポーション */ *opt2 |= Opt2::_speedpotion0; - FALLTHROUGH; - case SC_SPEEDPOTION1: - case SC_SPEEDPOTION2: calc_flag = 1; tick = 1000 * tick; // val2 = 5*(2+type-SC_SPEEDPOTION0); @@ -4564,16 +3772,7 @@ int skill_status_effect(struct block_list *bl, StatusChange type, calc_flag = 1; tick = 1000 * tick; break; - case SC_WEDDING: //結婚用(結婚衣裳になって歩くのが遅いとか) - { - time_t timer; - calc_flag = 1; - tick = 10000; - if (!val2) - val2 = time(&timer); - } - break; case SC_NOCHAT: //チャット禁止状態 { time_t timer; @@ -4678,13 +3877,7 @@ int skill_status_effect(struct block_list *bl, StatusChange type, tick = 1000; } break; - case SC_CHASEWALK: - case SC_CLOAKING: /* クローキング */ - if (bl->type == BL_PC) - val2 = tick; - else - tick = 5000 * val1; - break; + case SC_SIGHT: /* サイト/ルアフ */ val2 = tick / 250; tick = 10; @@ -4700,12 +3893,6 @@ int skill_status_effect(struct block_list *bl, StatusChange type, case SC_ANKLE: break; - /* スキルじゃない/時間に関係しない */ - case SC_RIDING: - calc_flag = 1; - tick = 600 * 1000; - break; - case SC_FALCON: case SC_WEIGHT50: case SC_WEIGHT90: case SC_BROKNWEAPON: @@ -4713,110 +3900,9 @@ int skill_status_effect(struct block_list *bl, StatusChange type, tick = 600 * 1000; break; - case SC_AUTOGUARD: - { - int i, t; - for (i = val2 = 0; i < val1; i++) - { - t = 5 - (i >> 1); - val2 += (t < 0) ? 1 : t; - } - } - break; - - case SC_DEFENDER: - calc_flag = 1; - val2 = 5 + val1 * 15; - break; - - case SC_KEEPING: - case SC_BARRIER: - case SC_HALLUCINATION: - break; - case SC_CONCENTRATION: /* コンセントレーション */ - *opt3 |= Opt3::_concentration; - calc_flag = 1; - break; - case SC_TENSIONRELAX: /* テンションリラックス */ - calc_flag = 1; - if (bl->type == BL_PC) - { - tick = 10000; - } - break; - case SC_AURABLADE: /* オーラブレード */ - case SC_PARRYING: /* パリイング */ -// case SC_ASSUMPTIO: /* */ - case SC_HEADCRUSH: /* ヘッドクラッシュ */ - case SC_JOINTBEAT: /* ジョイントビート */ -// case SC_MARIONETTE: /* マリオネットコントロール */ - - //とりあえず手抜き - break; - -// -- moonsoul (for new upper class related skill status effects) -/* - case SC_AURABLADE: - val2 = val1*10; - break; - case SC_PARRYING: - val2=val1*3; - break; - case SC_CONCENTRATION: - calc_flag=1; - val2=val1*10; - val3=val1*5; - break; - case SC_TENSIONRELAX: -// val2 = 10; -// val3 = 15; - break; - case SC_BERSERK: - calc_flag=1; - break; - case SC_ASSUMPTIO: - if (sc_data[SC_KYRIE].timer!=-1 ) - skill_status_change_end(bl,SC_KYRIE,-1); - break; -*/ - case SC_WINDWALK: /* ウインドウォーク */ - calc_flag = 1; - val2 = (val1 / 2); //Flee上昇率 - break; - case SC_BERSERK: /* バーサーク */ - if (sd) - { - sd->status.sp = 0; - clif_updatestatus(sd, SP_SP); - clif_status_change(bl, SC_INCREASEAGI, 1); /* アイコン表示 */ - } - *opt3 |= Opt3::_berserk; - tick = 1000; - calc_flag = 1; - break; - case SC_ASSUMPTIO: /* アスムプティオ */ - *opt3 |= Opt3::_assumptio; - break; - case SC_MARIONETTE: /* マリオネットコントロール */ - *opt3 |= Opt3::_marionette; - break; - case SC_MELTDOWN: /* メルトダウン */ - case SC_CARTBOOST: /* カートブースト */ - case SC_TRUESIGHT: /* トゥルーサイト */ - case SC_SPIDERWEB: /* スパイダーウェッブ */ - case SC_MAGICPOWER: /* 魔法力増幅 */ - calc_flag = 1; - break; - case SC_REJECTSWORD: /* リジェクトソード */ - val2 = 3; //3回攻撃を跳ね返す - break; - case SC_MEMORIZE: /* メモライズ */ - val2 = 3; //3回詠唱を1/3にする - break; case SC_HASTE: calc_flag = 1; break; - case SC_SPLASHER: /* ベナムスプラッシャー */ case SC_PHYS_SHIELD: case SC_MBARRIER: case SC_HALT_REGENERATE: @@ -4889,32 +3975,15 @@ int skill_status_effect(struct block_list *bl, StatusChange type, *opt2 |= Opt2::_slowpoison; opt_flag = 1; break; - case SC_SIGNUMCRUCIS: - *opt2 |= Opt2::_signumcrucis; - opt_flag = 1; - break; case SC_HIDING: battle_stopattack(bl); /* 攻撃停止 */ *option |= Option::HIDE2; opt_flag = 1; break; - case SC_CLOAKING: - battle_stopattack(bl); /* 攻撃停止 */ - *option |= Option::CLOAK; - opt_flag = 1; - break; - case SC_CHASEWALK: - battle_stopattack(bl); /* 攻撃停止 */ - *option |= Option::CHASEWALK | Option::CLOAK; - opt_flag = 1; - break; case SC_SIGHT: *option |= Option::SIGHT; opt_flag = 1; break; - case SC_WEDDING: - *option |= Option::_wedding; - opt_flag = 1; } if (opt_flag) /* optionの変更 */ @@ -5014,7 +4083,6 @@ int skill_check_cloaking(struct block_list *bl) } if (end) { - skill_status_change_end(bl, SC_CLOAKING, -1); *battle_get_option(bl) &= ~Option::CLOAK; /* 念のための処理 */ } return end; @@ -5032,63 +4100,9 @@ int skill_check_cloaking(struct block_list *bl) * *------------------------------------------ */ -void skill_stop_dancing(struct block_list *src, int flag) +void skill_stop_dancing(struct block_list *, int) { - eptr<struct status_change, StatusChange> sc_data; - struct skill_unit_group *group; - - nullpo_retv(src); - - sc_data = battle_get_sc_data(src); - if (sc_data && sc_data[SC_DANCING].timer == -1) - return; - group = (struct skill_unit_group *) sc_data[SC_DANCING].val2; //ダンスのスキルユニットIDはval2に入ってる - if (group && src->type == BL_PC && sc_data && sc_data[SC_DANCING].val4) - { //合奏中断 - struct map_session_data *dsd = map_id2sd(sc_data[SC_DANCING].val4); //相方のsd取得 - if (flag) - { //ログアウトなど片方が落ちても演奏が継続される - if (dsd && src->id == group->src_id) - { //グループを持ってるPCが落ちる - group->src_id = sc_data[SC_DANCING].val4; //相方にグループを任せる - if (flag & 1) //ログアウト - dsd->sc_data[SC_DANCING].val4 = 0; //相方の相方を0にして合奏終了→通常のダンス状態 - if (flag & 2) //ハエ飛びなど - return; //合奏もダンス状態も終了させない&スキルユニットは置いてけぼり - } - else if (dsd && dsd->bl.id == group->src_id) - { //相方がグループを持っているPCが落ちる(自分はグループを持っていない) - if (flag & 1) //ログアウト - dsd->sc_data[SC_DANCING].val4 = 0; //相方の相方を0にして合奏終了→通常のダンス状態 - if (flag & 2) //ハエ飛びなど - return; //合奏もダンス状態も終了させない&スキルユニットは置いてけぼり - } - skill_status_change_end(src, SC_DANCING, -1); //自分のステータスを終了させる - //そしてグループは消さない&消さないのでステータス計算もいらない? - return; - } - else - { - if (dsd && src->id == group->src_id) - { //グループを持ってるPCが止める - skill_status_change_end((struct block_list *) dsd, SC_DANCING, -1); //相手のステータスを終了させる - } - if (dsd && dsd->bl.id == group->src_id) - { //相方がグループを持っているPCが止める(自分はグループを持っていない) - skill_status_change_end(src, SC_DANCING, -1); //自分のステータスを終了させる - } - } - } - if (flag & 2 && group && src->type == BL_PC) - { //ハエで飛んだときとかはユニットも飛ぶ - struct map_session_data *sd = (struct map_session_data *) src; - skill_unit_move_unit_group(group, sd->bl.m, (sd->to_x - sd->bl.x), - (sd->to_y - sd->bl.y)); - return; - } - skill_delunitgroup(group); - if (src->type == BL_PC) - pc_calcstatus((struct map_session_data *) src, 0); + // TODO remove this } /*========================================== diff --git a/src/map/skill.hpp b/src/map/skill.hpp index 69fccf0..0966d68 100644 --- a/src/map/skill.hpp +++ b/src/map/skill.hpp @@ -126,7 +126,6 @@ int skill_status_effect(struct block_list *bl, StatusChange type, int skill_status_change_start(struct block_list *bl, StatusChange type, int val1, int val2, int val3, int val4, int tick, int flag); int skill_status_change_active(struct block_list *bl, StatusChange type); // [fate] -int skill_encchant_eremental_end(struct block_list *bl, StatusChange type); int skill_status_change_end(struct block_list *bl, StatusChange type, int tid); int skill_status_change_clear(struct block_list *bl, int type); diff --git a/src/map/skill.t.hpp b/src/map/skill.t.hpp index 9040a27..9dadce0 100644 --- a/src/map/skill.t.hpp +++ b/src/map/skill.t.hpp @@ -28,292 +28,67 @@ enum class StatusChange : uint16_t #define CLIF_OPTION_SC_SCRIBE StatusChange::CLIF_OPTION_SC_SCRIBE // the rest are the normal effects - SC_PROVOKE = 0, -#define SC_PROVOKE StatusChange::SC_PROVOKE - SC_ENDURE = 1, -#define SC_ENDURE StatusChange::SC_ENDURE - SC_TWOHANDQUICKEN = 2, -#define SC_TWOHANDQUICKEN StatusChange::SC_TWOHANDQUICKEN - SC_CONCENTRATE = 3, -#define SC_CONCENTRATE StatusChange::SC_CONCENTRATE - SC_HIDING = 4, + SC_HIDING = 4, // ? (opt) ?bad #define SC_HIDING StatusChange::SC_HIDING - SC_CLOAKING = 5, -#define SC_CLOAKING StatusChange::SC_CLOAKING - SC_ENCPOISON = 6, -#define SC_ENCPOISON StatusChange::SC_ENCPOISON - SC_POISONREACT = 7, -#define SC_POISONREACT StatusChange::SC_POISONREACT - SC_QUAGMIRE = 8, -#define SC_QUAGMIRE StatusChange::SC_QUAGMIRE - SC_ANGELUS = 9, -#define SC_ANGELUS StatusChange::SC_ANGELUS - SC_BLESSING = 10, -#define SC_BLESSING StatusChange::SC_BLESSING - SC_SIGNUMCRUCIS = 11, -#define SC_SIGNUMCRUCIS StatusChange::SC_SIGNUMCRUCIS - SC_INCREASEAGI = 12, -#define SC_INCREASEAGI StatusChange::SC_INCREASEAGI - SC_DECREASEAGI = 13, -#define SC_DECREASEAGI StatusChange::SC_DECREASEAGI - SC_SLOWPOISON = 14, // + + SC_SLOWPOISON = 14, // item script #define SC_SLOWPOISON StatusChange::SC_SLOWPOISON - SC_IMPOSITIO = 15, -#define SC_IMPOSITIO StatusChange::SC_IMPOSITIO - SC_SUFFRAGIUM = 16, -#define SC_SUFFRAGIUM StatusChange::SC_SUFFRAGIUM - SC_ASPERSIO = 17, -#define SC_ASPERSIO StatusChange::SC_ASPERSIO - SC_BENEDICTIO = 18, -#define SC_BENEDICTIO StatusChange::SC_BENEDICTIO - SC_KYRIE = 19, -#define SC_KYRIE StatusChange::SC_KYRIE - SC_MAGNIFICAT = 20, -#define SC_MAGNIFICAT StatusChange::SC_MAGNIFICAT - SC_GLORIA = 21, -#define SC_GLORIA StatusChange::SC_GLORIA - SC_AETERNA = 22, -#define SC_AETERNA StatusChange::SC_AETERNA - SC_ADRENALINE = 23, -#define SC_ADRENALINE StatusChange::SC_ADRENALINE - SC_WEAPONPERFECTION = 24, -#define SC_WEAPONPERFECTION StatusChange::SC_WEAPONPERFECTION - SC_OVERTHRUST = 25, -#define SC_OVERTHRUST StatusChange::SC_OVERTHRUST - SC_MAXIMIZEPOWER = 26, -#define SC_MAXIMIZEPOWER StatusChange::SC_MAXIMIZEPOWER - SC_RIDING = 27, -#define SC_RIDING StatusChange::SC_RIDING - SC_FALCON = 28, -#define SC_FALCON StatusChange::SC_FALCON - SC_TRICKDEAD = 29, -#define SC_TRICKDEAD StatusChange::SC_TRICKDEAD - SC_LOUD = 30, -#define SC_LOUD StatusChange::SC_LOUD - SC_ENERGYCOAT = 31, -#define SC_ENERGYCOAT StatusChange::SC_ENERGYCOAT - SC_BROKNARMOR = 32, + + SC_BROKNARMOR = 32, // ? #define SC_BROKNARMOR StatusChange::SC_BROKNARMOR - SC_BROKNWEAPON = 33, + SC_BROKNWEAPON = 33, // ? #define SC_BROKNWEAPON StatusChange::SC_BROKNWEAPON - SC_HALLUCINATION = 34, -#define SC_HALLUCINATION StatusChange::SC_HALLUCINATION - SC_WEIGHT50 = 35, + + SC_WEIGHT50 = 35, // ? sort of used #define SC_WEIGHT50 StatusChange::SC_WEIGHT50 - SC_WEIGHT90 = 36, + SC_WEIGHT90 = 36, // definitely used #define SC_WEIGHT90 StatusChange::SC_WEIGHT90 - SC_SPEEDPOTION0 = 37, // + SC_SPEEDPOTION0 = 37, // item script #define SC_SPEEDPOTION0 StatusChange::SC_SPEEDPOTION0 - SC_SPEEDPOTION1 = 38, -#define SC_SPEEDPOTION1 StatusChange::SC_SPEEDPOTION1 - SC_SPEEDPOTION2 = 39, -#define SC_SPEEDPOTION2 StatusChange::SC_SPEEDPOTION2 - - SC_STRIPWEAPON = 50, -#define SC_STRIPWEAPON StatusChange::SC_STRIPWEAPON - SC_STRIPSHIELD = 51, -#define SC_STRIPSHIELD StatusChange::SC_STRIPSHIELD - SC_STRIPARMOR = 52, -#define SC_STRIPARMOR StatusChange::SC_STRIPARMOR - SC_STRIPHELM = 53, -#define SC_STRIPHELM StatusChange::SC_STRIPHELM - SC_CP_WEAPON = 54, -#define SC_CP_WEAPON StatusChange::SC_CP_WEAPON - SC_CP_SHIELD = 55, -#define SC_CP_SHIELD StatusChange::SC_CP_SHIELD - SC_CP_ARMOR = 56, -#define SC_CP_ARMOR StatusChange::SC_CP_ARMOR - SC_CP_HELM = 57, -#define SC_CP_HELM StatusChange::SC_CP_HELM - SC_AUTOGUARD = 58, -#define SC_AUTOGUARD StatusChange::SC_AUTOGUARD - SC_REFLECTSHIELD = 59, -#define SC_REFLECTSHIELD StatusChange::SC_REFLECTSHIELD - SC_DEVOTION = 60, -#define SC_DEVOTION StatusChange::SC_DEVOTION - - SC_DEFENDER = 62, -#define SC_DEFENDER StatusChange::SC_DEFENDER - - SC_SPEARSQUICKEN = 68, -#define SC_SPEARSQUICKEN StatusChange::SC_SPEARSQUICKEN - - SC_HEALING = 70, // + + SC_HEALING = 70, // item script #define SC_HEALING StatusChange::SC_HEALING - SC_SIGHTTRASHER = 73, -#define SC_SIGHTTRASHER StatusChange::SC_SIGHTTRASHER - - SC_EXPLOSIONSPIRITS = 86, -#define SC_EXPLOSIONSPIRITS StatusChange::SC_EXPLOSIONSPIRITS - SC_STEELBODY = 87, -#define SC_STEELBODY StatusChange::SC_STEELBODY - - SC_FLAMELAUNCHER = 90, -#define SC_FLAMELAUNCHER StatusChange::SC_FLAMELAUNCHER - SC_FROSTWEAPON = 91, -#define SC_FROSTWEAPON StatusChange::SC_FROSTWEAPON - SC_LIGHTNINGLOADER = 92, -#define SC_LIGHTNINGLOADER StatusChange::SC_LIGHTNINGLOADER - SC_SEISMICWEAPON = 93, -#define SC_SEISMICWEAPON StatusChange::SC_SEISMICWEAPON - - SC_AURABLADE = 103, -#define SC_AURABLADE StatusChange::SC_AURABLADE - SC_PARRYING = 104, -#define SC_PARRYING StatusChange::SC_PARRYING - SC_CONCENTRATION = 105, -#define SC_CONCENTRATION StatusChange::SC_CONCENTRATION - SC_TENSIONRELAX = 106, -#define SC_TENSIONRELAX StatusChange::SC_TENSIONRELAX - SC_BERSERK = 107, -#define SC_BERSERK StatusChange::SC_BERSERK - - SC_ASSUMPTIO = 110, -#define SC_ASSUMPTIO StatusChange::SC_ASSUMPTIO - - SC_MAGICPOWER = 113, -#define SC_MAGICPOWER StatusChange::SC_MAGICPOWER - - SC_TRUESIGHT = 115, -#define SC_TRUESIGHT StatusChange::SC_TRUESIGHT - SC_WINDWALK = 116, -#define SC_WINDWALK StatusChange::SC_WINDWALK - SC_MELTDOWN = 117, -#define SC_MELTDOWN StatusChange::SC_MELTDOWN - SC_CARTBOOST = 118, -#define SC_CARTBOOST StatusChange::SC_CARTBOOST - - SC_REJECTSWORD = 120, -#define SC_REJECTSWORD StatusChange::SC_REJECTSWORD - SC_MARIONETTE = 121, -#define SC_MARIONETTE StatusChange::SC_MARIONETTE - - SC_HEADCRUSH = 124, -#define SC_HEADCRUSH StatusChange::SC_HEADCRUSH - SC_JOINTBEAT = 125, -#define SC_JOINTBEAT StatusChange::SC_JOINTBEAT - SC_BASILICA = SC_JOINTBEAT, -#define SC_BASILICA StatusChange::SC_BASILICA - - SC_STONE = 128, + SC_STONE = 128, // ?bad #define SC_STONE StatusChange::SC_STONE - SC_FREEZE = 129, + SC_FREEZE = 129, // ?bad #define SC_FREEZE StatusChange::SC_FREEZE - SC_STAN = 130, + SC_STAN = 130, // ?bad #define SC_STAN StatusChange::SC_STAN - SC_SLEEP = 131, + SC_SLEEP = 131, // ?bad #define SC_SLEEP StatusChange::SC_SLEEP - SC_POISON = 132, // + SC_POISON = 132, // bad; actually used #define SC_POISON StatusChange::SC_POISON - SC_CURSE = 133, + SC_CURSE = 133, // ?bad #define SC_CURSE StatusChange::SC_CURSE - SC_SILENCE = 134, + SC_SILENCE = 134, // ?bad #define SC_SILENCE StatusChange::SC_SILENCE - SC_DIVINA = SC_SILENCE, -#define SC_DIVINA StatusChange::SC_DIVINA - SC_CONFUSION = 135, + SC_CONFUSION = 135, // ?bad #define SC_CONFUSION StatusChange::SC_CONFUSION - SC_BLIND = 136, + SC_BLIND = 136, // ?bad #define SC_BLIND StatusChange::SC_BLIND - SC_SAFETYWALL = 140, + SC_SAFETYWALL = 140, // ?skill.cpp skill_unit thingies #define SC_SAFETYWALL StatusChange::SC_SAFETYWALL - SC_PNEUMA = 141, + SC_PNEUMA = 141, // ?skill.cpp skill_unit thingies #define SC_PNEUMA StatusChange::SC_PNEUMA - SC_ANKLE = 143, + SC_ANKLE = 143, // ?skill.cpp skill_unit thingies #define SC_ANKLE StatusChange::SC_ANKLE - SC_DANCING = 144, -#define SC_DANCING StatusChange::SC_DANCING - SC_KEEPING = 145, -#define SC_KEEPING StatusChange::SC_KEEPING - SC_BARRIER = 146, -#define SC_BARRIER StatusChange::SC_BARRIER - - SC_MAGICROD = 149, -#define SC_MAGICROD StatusChange::SC_MAGICROD - SC_SIGHT = 150, + + SC_SIGHT = 150, // ?unbad #define SC_SIGHT StatusChange::SC_SIGHT - SC_VOLCANO = 153, -#define SC_VOLCANO StatusChange::SC_VOLCANO - SC_DELUGE = 154, -#define SC_DELUGE StatusChange::SC_DELUGE - SC_VIOLENTGALE = 155, -#define SC_VIOLENTGALE StatusChange::SC_VIOLENTGALE - - SC_EXTREMITYFIST = 158, -#define SC_EXTREMITYFIST StatusChange::SC_EXTREMITYFIST - - SC_ENSEMBLE = 159, -#define SC_ENSEMBLE StatusChange::SC_ENSEMBLE - - SC_LULLABY = 160, -#define SC_LULLABY StatusChange::SC_LULLABY - SC_RICHMANKIM = 161, -#define SC_RICHMANKIM StatusChange::SC_RICHMANKIM - SC_ETERNALCHAOS = 162, -#define SC_ETERNALCHAOS StatusChange::SC_ETERNALCHAOS - SC_DRUMBATTLE = 163, -#define SC_DRUMBATTLE StatusChange::SC_DRUMBATTLE - SC_NIBELUNGEN = 164, -#define SC_NIBELUNGEN StatusChange::SC_NIBELUNGEN - SC_ROKISWEIL = 165, -#define SC_ROKISWEIL StatusChange::SC_ROKISWEIL - SC_INTOABYSS = 166, -#define SC_INTOABYSS StatusChange::SC_INTOABYSS - - SC_DISSONANCE = 168, -#define SC_DISSONANCE StatusChange::SC_DISSONANCE - SC_WHISTLE = 169, -#define SC_WHISTLE StatusChange::SC_WHISTLE - SC_ASSNCROS = 170, -#define SC_ASSNCROS StatusChange::SC_ASSNCROS - SC_POEMBRAGI = 171, -#define SC_POEMBRAGI StatusChange::SC_POEMBRAGI - SC_APPLEIDUN = 172, -#define SC_APPLEIDUN StatusChange::SC_APPLEIDUN - SC_UGLYDANCE = 173, -#define SC_UGLYDANCE StatusChange::SC_UGLYDANCE - SC_HUMMING = 174, -#define SC_HUMMING StatusChange::SC_HUMMING - SC_DONTFORGETME = 175, -#define SC_DONTFORGETME StatusChange::SC_DONTFORGETME - SC_FORTUNE = 176, -#define SC_FORTUNE StatusChange::SC_FORTUNE - SC_SERVICE4U = 177, -#define SC_SERVICE4U StatusChange::SC_SERVICE4U - SC_FOGWALL = 178, -#define SC_FOGWALL StatusChange::SC_FOGWALL - SC_GOSPEL = 179, -#define SC_GOSPEL StatusChange::SC_GOSPEL - SC_SPIDERWEB = 180, -#define SC_SPIDERWEB StatusChange::SC_SPIDERWEB - SC_MEMORIZE = 181, -#define SC_MEMORIZE StatusChange::SC_MEMORIZE - SC_LANDPROTECTOR = 182, -#define SC_LANDPROTECTOR StatusChange::SC_LANDPROTECTOR - SC_ADAPTATION = 183, -#define SC_ADAPTATION StatusChange::SC_ADAPTATION - SC_CHASEWALK = 184, -#define SC_CHASEWALK StatusChange::SC_CHASEWALK - SC_ATKPOT = 185, // + SC_ATKPOT = 185, // item script #define SC_ATKPOT StatusChange::SC_ATKPOT - SC_MATKPOT = 186, + SC_MATKPOT = 186, // unused, but kept for parallel #define SC_MATKPOT StatusChange::SC_MATKPOT - SC_WEDDING = 187, -#define SC_WEDDING StatusChange::SC_WEDDING - SC_NOCHAT = 188, + + SC_NOCHAT = 188, // ? something with manner #define SC_NOCHAT StatusChange::SC_NOCHAT - SC_SPLASHER = 189, // ? -#define SC_SPLASHER StatusChange::SC_SPLASHER - SC_SELFDESTRUCTION = 190, + + SC_SELFDESTRUCTION = 190, // see table - maybe used, maybe not #define SC_SELFDESTRUCTION StatusChange::SC_SELFDESTRUCTION - SC_MINDBREAKER = 191, -#define SC_MINDBREAKER StatusChange::SC_MINDBREAKER - SC_SPELLBREAKER = 192, -#define SC_SPELLBREAKER StatusChange::SC_SPELLBREAKER // Added for Fate's spells SC_HIDE = 194, // Hide from `detect' magic (PCs only) |