|
@@ -5139,6 +5139,9 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
|
|
//ATK [{(Skill Level x 150) + 300} x Caster's Base Level / 120]% + ATK [(AGI x 2) + (Caster's Job Level x 4)]%
|
|
//ATK [{(Skill Level x 150) + 300} x Caster's Base Level / 120]% + ATK [(AGI x 2) + (Caster's Job Level x 4)]%
|
|
skillratio += -100 + 300 + 150 * skill_lv;
|
|
skillratio += -100 + 300 + 150 * skill_lv;
|
|
RE_LVL_DMOD(120);
|
|
RE_LVL_DMOD(120);
|
|
|
|
+ skillratio += sstatus->agi * 2;
|
|
|
|
+ // If 4th job, job level of your 3rd job counts
|
|
|
|
+ skillratio += (sd ? (sd->class_&JOBL_FOURTH ? sd->change_level_4th : sd->status.job_level) * 4 : 0);
|
|
break;
|
|
break;
|
|
case GC_VENOMPRESSURE:
|
|
case GC_VENOMPRESSURE:
|
|
skillratio += 900;
|
|
skillratio += 900;
|
|
@@ -5291,8 +5294,11 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
|
|
RE_LVL_DMOD(100);
|
|
RE_LVL_DMOD(100);
|
|
break;
|
|
break;
|
|
case LG_SHIELDPRESS:
|
|
case LG_SHIELDPRESS:
|
|
- skillratio += -100 + 200 * skill_lv + sstatus->str;
|
|
|
|
|
|
+ skillratio += -100 + 200 * skill_lv;
|
|
if (sd) {
|
|
if (sd) {
|
|
|
|
+ // Shield Press only considers base STR without job bonus
|
|
|
|
+ skillratio += sd->status.str;
|
|
|
|
+
|
|
if( sc != nullptr && sc->getSCE( SC_SHIELD_POWER ) ){
|
|
if( sc != nullptr && sc->getSCE( SC_SHIELD_POWER ) ){
|
|
skillratio += skill_lv * 15 * pc_checkskill( sd, IG_SHIELD_MASTERY );
|
|
skillratio += skill_lv * 15 * pc_checkskill( sd, IG_SHIELD_MASTERY );
|
|
}
|
|
}
|
|
@@ -6300,19 +6306,6 @@ static int64 battle_calc_skill_constant_addition(struct Damage* wd, struct block
|
|
atk = 40 * pc_checkskill(sd, RA_RESEARCHTRAP);
|
|
atk = 40 * pc_checkskill(sd, RA_RESEARCHTRAP);
|
|
break;
|
|
break;
|
|
#endif
|
|
#endif
|
|
- case GC_COUNTERSLASH:
|
|
|
|
- atk = sstatus->agi * 2 + (sd ? sd->status.job_level * 4 : 0);
|
|
|
|
- break;
|
|
|
|
- case LG_SHIELDPRESS:
|
|
|
|
- if (sd) {
|
|
|
|
- int damagevalue = 0;
|
|
|
|
- short index = sd->equip_index[EQI_HAND_L];
|
|
|
|
-
|
|
|
|
- if (index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_ARMOR)
|
|
|
|
- damagevalue = sstatus->vit * sd->inventory.u.items_inventory[index].refine;
|
|
|
|
- atk = damagevalue;
|
|
|
|
- }
|
|
|
|
- break;
|
|
|
|
}
|
|
}
|
|
return atk;
|
|
return atk;
|
|
}
|
|
}
|
|
@@ -6641,6 +6634,7 @@ static void battle_calc_defense_reduction(struct Damage* wd, struct block_list *
|
|
case RK_DRAGONBREATH_WATER:
|
|
case RK_DRAGONBREATH_WATER:
|
|
case NC_ARMSCANNON:
|
|
case NC_ARMSCANNON:
|
|
case GN_CARTCANNON:
|
|
case GN_CARTCANNON:
|
|
|
|
+ case MO_EXTREMITYFIST:
|
|
if (attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) || attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L))
|
|
if (attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_R) || attack_ignores_def(wd, src, target, skill_id, skill_lv, EQI_HAND_L))
|
|
return;
|
|
return;
|
|
if (is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) || is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L))
|
|
if (is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_R) || is_attack_piercing(wd, src, target, skill_id, skill_lv, EQI_HAND_L))
|
|
@@ -7369,18 +7363,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
|
#endif
|
|
#endif
|
|
battle_calc_skill_base_damage(&wd, src, target, skill_id, skill_lv); // base skill damage
|
|
battle_calc_skill_base_damage(&wd, src, target, skill_id, skill_lv); // base skill damage
|
|
|
|
|
|
- int64 ratio = 0;
|
|
|
|
-
|
|
|
|
#ifndef RENEWAL
|
|
#ifndef RENEWAL
|
|
- ratio = battle_calc_attack_skill_ratio(&wd, src, target, skill_id, skill_lv); // skill level ratios
|
|
|
|
|
|
+ // Skill ratio
|
|
|
|
+ ATK_RATE(wd.damage, wd.damage2, battle_calc_attack_skill_ratio(&wd, src, target, skill_id, skill_lv));
|
|
|
|
|
|
- ATK_RATE(wd.damage, wd.damage2, ratio);
|
|
|
|
|
|
+ // Additive damage bonus
|
|
|
|
+ ATK_ADD(wd.damage, wd.damage2, battle_calc_skill_constant_addition(&wd, src, target, skill_id, skill_lv));
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- int64 bonus_damage = battle_calc_skill_constant_addition(&wd, src, target, skill_id, skill_lv); // other skill bonuses
|
|
|
|
-
|
|
|
|
- ATK_ADD(wd.damage, wd.damage2, bonus_damage);
|
|
|
|
-
|
|
|
|
#ifdef RENEWAL
|
|
#ifdef RENEWAL
|
|
if(skill_id == HW_MAGICCRASHER) { // Add weapon attack for MATK onto Magic Crasher
|
|
if(skill_id == HW_MAGICCRASHER) { // Add weapon attack for MATK onto Magic Crasher
|
|
struct status_data *sstatus = status_get_status_data(src);
|
|
struct status_data *sstatus = status_get_status_data(src);
|
|
@@ -7452,11 +7442,6 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
|
if( is_attack_left_handed( src, skill_id ) ){
|
|
if( is_attack_left_handed( src, skill_id ) ){
|
|
wd.damage2 += wd.masteryAtk2;
|
|
wd.damage2 += wd.masteryAtk2;
|
|
}
|
|
}
|
|
- // Apply bonus damage
|
|
|
|
- wd.damage += bonus_damage;
|
|
|
|
- if( is_attack_left_handed( src, skill_id ) ){
|
|
|
|
- wd.damage2 += bonus_damage;
|
|
|
|
- }
|
|
|
|
|
|
|
|
// CritAtkRate modifier
|
|
// CritAtkRate modifier
|
|
if (wd.type == DMG_CRITICAL || wd.type == DMG_MULTI_HIT_CRITICAL) {
|
|
if (wd.type == DMG_CRITICAL || wd.type == DMG_MULTI_HIT_CRITICAL) {
|
|
@@ -7478,9 +7463,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
|
ATK_ADDRATE(wd.damage, wd.damage2, sd->bonus.long_attack_atk_rate);
|
|
ATK_ADDRATE(wd.damage, wd.damage2, sd->bonus.long_attack_atk_rate);
|
|
}
|
|
}
|
|
|
|
|
|
- ratio = battle_calc_attack_skill_ratio(&wd, src, target, skill_id, skill_lv); // skill level ratios
|
|
|
|
|
|
+ // Skill ratio
|
|
|
|
+ ATK_RATE(wd.damage, wd.damage2, battle_calc_attack_skill_ratio(&wd, src, target, skill_id, skill_lv));
|
|
|
|
|
|
- ATK_RATE(wd.damage, wd.damage2, ratio);
|
|
|
|
|
|
+ // Additive damage bonus
|
|
|
|
+ ATK_ADD(wd.damage, wd.damage2, battle_calc_skill_constant_addition(&wd, src, target, skill_id, skill_lv));
|
|
|
|
|
|
// Advance Katar Mastery
|
|
// Advance Katar Mastery
|
|
if (sd) {
|
|
if (sd) {
|
|
@@ -7493,7 +7480,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
|
// Res reduces physical damage by a percentage and
|
|
// Res reduces physical damage by a percentage and
|
|
// is calculated before DEF and other reductions.
|
|
// is calculated before DEF and other reductions.
|
|
// This should be the official formula. [Rytech]
|
|
// This should be the official formula. [Rytech]
|
|
- if ((wd.damage + wd.damage2) && tstatus->res > 0) {
|
|
|
|
|
|
+ if ((wd.damage + wd.damage2) && tstatus->res > 0 && skill_id != MO_EXTREMITYFIST) {
|
|
short res = tstatus->res;
|
|
short res = tstatus->res;
|
|
short ignore_res = 0;// Value used as a percentage.
|
|
short ignore_res = 0;// Value used as a percentage.
|
|
|
|
|
|
@@ -7578,6 +7565,16 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
|
|
if(sd && sd->weapontype1 == W_FIST && sd->weapontype2 == W_FIST)
|
|
if(sd && sd->weapontype1 == W_FIST && sd->weapontype2 == W_FIST)
|
|
ATK_ADD(wd.damage, wd.damage2, 10 * pc_checkskill(sd, TK_RUN));
|
|
ATK_ADD(wd.damage, wd.damage2, 10 * pc_checkskill(sd, TK_RUN));
|
|
break;
|
|
break;
|
|
|
|
+ case LG_SHIELDPRESS:
|
|
|
|
+ if (sd) {
|
|
|
|
+ int damagevalue = 0;
|
|
|
|
+ short index = sd->equip_index[EQI_HAND_L];
|
|
|
|
+
|
|
|
|
+ if (index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_ARMOR)
|
|
|
|
+ damagevalue = sstatus->vit * sd->inventory.u.items_inventory[index].refine;
|
|
|
|
+ ATK_ADD(wd.damage, wd.damage2, damagevalue);
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
case SR_TIGERCANNON:
|
|
case SR_TIGERCANNON:
|
|
// (Tiger Cannon skill level x 240) + (Target Base Level x 40)
|
|
// (Tiger Cannon skill level x 240) + (Target Base Level x 40)
|
|
if (wd.miscflag&8) {
|
|
if (wd.miscflag&8) {
|