As you may know, iRO implemented the new dragon breath formula, which is stated in the iro wiki as:
So I think the difference is the new formula takes these range, elemental and racial modifiers into account.
It seems this formula was recently implemented in rathena (BF_WEAPON TYPE), while hercules is still using the old formula (BF_MISC TYPE).
I have tried to merge rathena's new formula into Hercules, but encountered several problems.
The changes I have made in code are:
"/src/map/skill.c" , changed BF_MISC to BF_WEAPON
/** * Rune Knight **/ case RK_DRAGONBREATH_WATER: case RK_DRAGONBREATH: { struct status_change *tsc = NULL; if( (tsc = status->get_sc(bl)) && (tsc->data[SC_HIDING] )) { clif->skill_nodamage(src,src,skill_id,skill_lv,1); } else skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); }
"/src/map/battle.c", delete the original formula in misc type, add the new formula in weapon type
old:
struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag) {... case RK_DRAGONBREATH: case RK_DRAGONBREATH_WATER: md.damage = ((status_get_hp(src) / 50) + (status_get_max_sp(src) / 4)) * skill_lv; RE_LVL_MDMOD(150); if (sd) md.damage = md.damage * (95 + 5 * pc->checkskill(sd,RK_DRAGONTRAINING)) / 100; md.flag |= BF_LONG|BF_WEAPON; break;...}
new:
struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int wflag){... case RK_DRAGONBREATH: 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) / 150; if (sd) damagevalue = damagevalue * (100 + 5 * (pc->checkskill(sd, RK_DRAGONTRAINING) - 1)) / 100; ATK_ADD(damagevalue); wd.flag |= BF_LONG; } break;...}
I have also changed the nk (skill type?) of dragonbreath in skill_db to 0x62, thus the skill ignores target's DEF and has no miss.
However, after these changes, the dragon breath seems neutral attack (in skill_db it is still set as fire, or water for the breath water), there is no elemental fix involved in the damage.
It would be greatly appreciated if someone could help me to add the elemental modifier, or pointed out where I have missed for merging this new formula.