Renewal Guillotine Fist, Counter Slash, Shield Press Damage (#8376)

- Fixed the "constant addition" damage bonus being applied before the ratio in renewal, resulting in way too high damage for Guillotine Fist, Rapid Smiting and Shield Press
- Guillotine Fist is now reduced by SoftDEF+HardDEF in renewal
- Guillotine Fist is no longer reduced by Res
- Fixed Counter Slash adding Agi and Job Level to base damage rather than skill ratio
- Fixed Shield Press multiplying the damage by 5 instead of dividing it among 5 hits
- Only base STR of players will increase the Shield Press skill ratio now
- The fixed VIT*REFINE damage bonus of Shield Press is now a bonus that is applied even on MISS
- Fixes https://github.com/rathena/rathena/issues/8363
This commit is contained in:
Playtester 2024-05-28 22:47:06 +02:00 committed by GitHub
parent 3b5b5be574
commit 19f94e18f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 32 deletions

View File

@ -7663,7 +7663,6 @@ Body:
Type: Weapon
TargetType: Attack
DamageFlags:
IgnoreDefense: true
IgnoreFlee: true
Flags:
TargetTrap: true
@ -24520,7 +24519,7 @@ Body:
TargetType: Attack
Range: 1
Hit: Single
HitCount: 5
HitCount: -5
CopyFlags:
Skill:
Reproduce: true

View File

@ -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)]%
skillratio += -100 + 300 + 150 * skill_lv;
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;
case GC_VENOMPRESSURE:
skillratio += 900;
@ -5291,8 +5294,11 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
RE_LVL_DMOD(100);
break;
case LG_SHIELDPRESS:
skillratio += -100 + 200 * skill_lv + sstatus->str;
skillratio += -100 + 200 * skill_lv;
if (sd) {
// Shield Press only considers base STR without job bonus
skillratio += sd->status.str;
if( sc != nullptr && sc->getSCE( SC_SHIELD_POWER ) ){
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);
break;
#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;
}
@ -6641,6 +6634,7 @@ static void battle_calc_defense_reduction(struct Damage* wd, struct block_list *
case RK_DRAGONBREATH_WATER:
case NC_ARMSCANNON:
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))
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))
@ -7369,18 +7363,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
#endif
battle_calc_skill_base_damage(&wd, src, target, skill_id, skill_lv); // base skill damage
int64 ratio = 0;
#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
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
if(skill_id == HW_MAGICCRASHER) { // Add weapon attack for MATK onto Magic Crasher
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 ) ){
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
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);
}
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
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
// is calculated before DEF and other reductions.
// 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 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)
ATK_ADD(wd.damage, wd.damage2, 10 * pc_checkskill(sd, TK_RUN));
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:
// (Tiger Cannon skill level x 240) + (Target Base Level x 40)
if (wd.miscflag&8) {