Skip to content

Commit

Permalink
Fixes RK_DRAGONBREATH/RK_DRAGONBREATH_WATER scaling with 4th job (rat…
Browse files Browse the repository at this point in the history
…hena#7996)

Corrected POW scaling
Corrected P.ATK scaling
Corrected skills scaling with Dragonic Aura buff
  • Loading branch information
datawulf authored Nov 3, 2023
1 parent a8b7f92 commit 66dddb3
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/map/battle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3858,13 +3858,17 @@ static void battle_calc_skill_base_damage(struct Damage* wd, struct block_list *
case RK_DRAGONBREATH_WATER:
{
int damagevalue = (sstatus->hp / 50 + status_get_max_sp(src) / 4) * skill_lv;

if(status_get_lv(src) > 100)
damagevalue = damagevalue * status_get_lv(src) / 100;
if(sd)
damagevalue = damagevalue * ( 90 + 10 * pc_checkskill( sd, RK_DRAGONTRAINING ) + ( pc_checkskill( sd, DK_DRAGONIC_AURA ) >= 1 ? ( sstatus->pow / 4 + sstatus->patk / 2 ) : 0 ) ) / 100;
if (sc && sc->getSCE(SC_DRAGONIC_AURA))// Need official damage increase. [Rytech]
damagevalue += damagevalue * 50 / 100;
if(sd) {
if (pc_checkskill( sd, DK_DRAGONIC_AURA ) >= 1) {
damagevalue = damagevalue * (90 + 10 * pc_checkskill( sd, RK_DRAGONTRAINING ) + sstatus->pow / 5 ) / 100;
} else {
damagevalue = damagevalue * (90 + 10 * pc_checkskill( sd, RK_DRAGONTRAINING )) / 100;
}
}
if (sc && sc->getSCE(SC_DRAGONIC_AURA))
damagevalue += damagevalue * sc->getSCE(SC_DRAGONIC_AURA)->val1 * 10 / 100;
ATK_ADD(wd->damage, wd->damage2, damagevalue);
#ifdef RENEWAL
ATK_ADD(wd->weaponAtk, wd->weaponAtk2, damagevalue);
Expand Down Expand Up @@ -6899,9 +6903,12 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl
battle_attack_sc_bonus(&wd, src, target, skill_id, skill_lv);

if (sd) { //monsters, homuns and pets have their damage computed directly
wd.damage = (int64)floor((float)((wd.statusAtk + wd.weaponAtk + wd.equipAtk + wd.percentAtk) * (100 + sstatus->patk) / 100 + wd.masteryAtk + bonus_damage));
if (is_attack_left_handed(src, skill_id))
wd.damage2 = (int64)floor((float)((wd.statusAtk2 + wd.weaponAtk2 + wd.equipAtk2 + wd.percentAtk2) * (100 + sstatus->patk) / 100 + wd.masteryAtk2 + bonus_damage));
//PATK mod applies to Dragonbreaths if Dragonic Aura is skilled only - [munkrej]
if (!((skill_id == RK_DRAGONBREATH || skill_id == RK_DRAGONBREATH_WATER) && pc_checkskill( sd, DK_DRAGONIC_AURA ) == 0)) {
wd.damage = (int64)floor((float)((wd.statusAtk + wd.weaponAtk + wd.equipAtk + wd.percentAtk) * (100 + sstatus->patk) / 100 + wd.masteryAtk + bonus_damage));
if (is_attack_left_handed(src, skill_id))
wd.damage2 = (int64)floor((float)((wd.statusAtk2 + wd.weaponAtk2 + wd.equipAtk2 + wd.percentAtk2) * (100 + sstatus->patk) / 100 + wd.masteryAtk2 + bonus_damage));
}

// CritAtkRate modifier
if (wd.type == DMG_CRITICAL || wd.type == DMG_MULTI_HIT_CRITICAL) {
Expand Down

0 comments on commit 66dddb3

Please sign in to comment.