rathena / rathena

rAthena is an open-source cross-platform MMORPG server.
https://rathena.org/board/
GNU General Public License v3.0
2.9k stars 2.33k forks source link

Mob Asura Strike (Chen Bio4) and Ghostring Card effect #3521

Open slyx88 opened 6 years ago

slyx88 commented 6 years ago

screenrathena000 screenrathena001

MathReaper commented 6 years ago

I assume that you just need to call battle_attr_fix for the wd.damage on the battle_calc_skill_base_damage just as it's called for the players.

Like this: wd.damage = battle_calc_base_damage(src, sstatus, &sstatus->rhw, sc, tstatus->size, i); wd.damage = battle_attr_fix(src, target, wd.damage, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv);

wd.damage2 = battle_calc_base_damage(src, sstatus, &sstatus->lhw, sc, tstatus->size, i); wd.damage2 = battle_attr_fix(src, target, wd.damage2, ELE_NEUTRAL, tstatus->def_ele, tstatus->ele_lv);

I did 20 tests for each of these: Without ghostring card: min: 524k max: 713k avarage: 636k

With ghostring card: min: 386k max: 506k avarage: 454k

Approximately 30% of damage reduced after equipping Ghostring Card.

slyx88 commented 6 years ago

Thank you for your respond and solution @MathReaper . But from the battle_attr_fix, wouldn't that make all other mob skills become forced neutral? Correct me if im wrong.I am still in beginner level in programming =D

MathReaper commented 6 years ago

Yeah, probably, you can do alot of things to correct this, like, make a if-statement only for the skill that you want. But, currently, the rAthena is not making any usage of battle_attr_fix for monsters I guess, so maybe every skill is being neutral applied? I don't know.