it tried to limit the reflect but still exceed the max damage limit bonus.
return cap_value(min(rdamage,max_damage),INT_MIN,INT_MAX);
im also using stormbreaker source mod
bonus bDamageLimit
but when i try to make an item that will chance to deal max pyhiscal damage, it ignores the reflect of it
if (sd) {
for (const auto& it : sd->atkratechance) {
if (it.value2 > rand() % 1000)
ATK_ADDRATE(wd.damage, wd.damage2, it.value1);
}
but when i try it with magic attack the reflect just work fine.
if (sd) {
for (const auto& it : sd->matkratechance) {
if (it.value2 > rand() % 1000)
MATK_ADDRATE(it.value1);
}
TL:DR. i just want to make a damage cap on my files but looking at battle.cpp i cant make it work. I tried to change max damage in cliff.cpp but it was just visual. max damage on my server deals 2.147Billion and i just want to make it to my specific limit.