From ab1fa803a2ead26f8f922b8c1198260a71d70e86 Mon Sep 17 00:00:00 2001 From: Aleos Date: Thu, 14 Dec 2017 18:52:19 -0500 Subject: [PATCH] Fixed Giant Growth damage bonus (#2688) * Fixed Crush Strike damage bonus * Fixes #2684. * Base damage increase should not be affected by a success rate. * Adjusted Crush Strike weapon attack to take from the current indexed value. Thanks to @Badarosk0 and @Paoly28! --- src/map/battle.cpp | 31 +++++++++++++++++-------------- src/map/status.cpp | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/map/battle.cpp b/src/map/battle.cpp index cf189b356a..bda158b337 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -3431,16 +3431,25 @@ static int battle_calc_attack_skill_ratio(struct Damage wd, struct block_list *s if (sc->data[SC_CONCENTRATION] && (skill_id != RK_DRAGONBREATH && skill_id != RK_DRAGONBREATH_WATER)) skillratio += sc->data[SC_CONCENTRATION]->val2; #endif - if (sc->data[SC_CRUSHSTRIKE] && (!skill_id || skill_id == KN_AUTOCOUNTER)) { - if (sd) { //ATK [{Weapon Level * (Weapon Upgrade Level + 6) * 100} + (Weapon ATK) + (Weapon Weight)]% - short index = sd->equip_index[EQI_HAND_R]; + if (!skill_id || skill_id == KN_AUTOCOUNTER) { + if (sc->data[SC_CRUSHSTRIKE]) { + if (sd) { //ATK [{Weapon Level * (Weapon Upgrade Level + 6) * 100} + (Weapon ATK) + (Weapon Weight)]% + short index = sd->equip_index[EQI_HAND_R]; - if (index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON) - skillratio += -100 + sd->inventory_data[index]->weight / 10 + sstatus->rhw.atk + - 100 * sd->inventory_data[index]->wlv * (sd->inventory.u.items_inventory[index].refine + 6); + if (index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON) + skillratio += -100 + sd->inventory_data[index]->weight / 10 + sd->inventory_data[index]->atk + + 100 * sd->inventory_data[index]->wlv * (sd->inventory.u.items_inventory[index].refine + 6); + } + status_change_end(src,SC_CRUSHSTRIKE,INVALID_TIMER); + skill_break_equip(src,src,EQP_WEAPON,2000,BCT_SELF); + } else { + if (sc->data[SC_GIANTGROWTH] && (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) { // Increase damage again if Crush Strike is not active + if (map_flag_vs(src->m)) // Only half of the 2.5x increase on versus-type maps + skillratio += 125; + else + skillratio += 250; + } } - status_change_end(src,SC_CRUSHSTRIKE,INVALID_TIMER); - skill_break_equip(src,src,EQP_WEAPON,2000,BCT_SELF); } } @@ -7309,12 +7318,6 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t if (sc->data[SC_GIANTGROWTH] && (wd.flag&BF_SHORT) && rnd()%100 < sc->data[SC_GIANTGROWTH]->val2 && !is_infinite_defense(target, wd.flag) && !vanish_damage) { wd.damage <<= 1; // Double Damage skill_break_equip(src, src, EQP_WEAPON, 10, BCT_SELF); // Break chance happens on successful damage increase - if (!sc->data[SC_CRUSHSTRIKE] && (sd->class_&MAPID_THIRDMASK) == MAPID_RUNE_KNIGHT) { // Increase damage again if Crush Strike is not active - if (map_flag_vs(src->m)) // Only half of the 2.5x increase on versus-type maps - wd.damage += wd.damage * 125 / 100; - else - wd.damage += wd.damage * 250 / 100; - } } if( sd && battle_config.arrow_decrement && sc->data[SC_FEARBREEZE] && sc->data[SC_FEARBREEZE]->val4 > 0) { diff --git a/src/map/status.cpp b/src/map/status.cpp index 82e02e738d..03efd2041f 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -10248,7 +10248,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty tick_time = 10000; // [GodLesZ] tick time break; case SC_GIANTGROWTH: - val2 = 15; // Triple damage success rate. + val2 = 15; // Double damage success rate. break; /* Arch Bishop */