Heya, after implementing Oliviers code for actually showing the ATK increase for ATK% I eventually figured out that "bonus bAtkRate" does nothing at all for me.
I am currently implementing randomoptions and while trying out 3 different Falchions with 3 different ATK% roll I saw that every single one of them does not change my damage on monster or players at all. no matter if its +20% or +100% ATK.
The Status Window actually updates the ATK number depending on the roll on the weapon thanks to Olivier but the actual damage dealt does not change. any reason why that is?
and yes I know that pre-renewal usually uses bAllClass to increase the damage but I actually want bAtkRate to work. Had a look at the source to see if maybe renewal only but that doesn't seem to be the case.
EDIT:
So I looked at it again and made a TEMPORARY "fix" for my problem. I might have to look at it again later to see if what I did was just a bandaid on another problem.
add this to battle.cpp at:
static int64 battle_calc_base_damage | at the end before return damage; is being send.
tested it and actually increases the damage. I'm too inexperienced with code to know if that should do the trick. If it happens to just be a % damage increase depending on the bonus% you get I might just rename the batkrate to "Final Damage +x%" and call it a day. if somebody has any other ideas I'd appreciate it
Question
b1rbert
Heya, after implementing Oliviers code for actually showing the ATK increase for ATK% I eventually figured out that "bonus bAtkRate" does nothing at all for me.
I am currently implementing randomoptions and while trying out 3 different Falchions with 3 different ATK% roll I saw that every single one of them does not change my damage on monster or players at all. no matter if its +20% or +100% ATK.
The Status Window actually updates the ATK number depending on the roll on the weapon thanks to Olivier but the actual damage dealt does not change. any reason why that is?
and yes I know that pre-renewal usually uses bAllClass to increase the damage but I actually want bAtkRate to work. Had a look at the source to see if maybe renewal only but that doesn't seem to be the case.
EDIT:
So I looked at it again and made a TEMPORARY "fix" for my problem. I might have to look at it again later to see if what I did was just a bandaid on another problem.
add this to battle.cpp at:
static int64 battle_calc_base_damage | at the end before return damage; is being send.
//Finally, add baseatk
if(flag&4)
damage += status->matk_min;
else
damage += status->batk;
//added this)
if (sd && sd->bonus.atk_rate)
damage += damage * sd->bonus.atk_rate / 100;
if (sd)
battle_add_weapon_damage(sd, &damage, type);
#ifdef RENEWAL
Edited by b1rbertif (flag&1)
damage = (damage * 14) / 10;
#endif
return damage;
}
tested it and actually increases the damage. I'm too inexperienced with code to know if that should do the trick. If it happens to just be a % damage increase depending on the bonus% you get I might just rename the batkrate to "Final Damage +x%" and call it a day. if somebody has any other ideas I'd appreciate it
temp fix
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.