Jump to content
  • 0
keoco

Acid demonstration dmg change?

Question

4 answers to this question

Recommended Posts

I think here in battle.c

}
case AM_DEMONSTRATION:
 skillratio += 20*skill_lv;
 break;

sorry...but he is looking for adjustment on this

case CR_ACIDDEMONSTRATION: // updated the formula based on a Japanese formula found to be exact [Reddozen]
 if(tstatus->vit+sstatus->int_) //crash fix
  md.damage = (int)((int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_)));
 else
  md.damage = 0;
 if (tsd) md.damage>>=1;
 if (md.damage < 0 || md.damage > INT_MAX>>1)
   //Overflow prevention, will anyone whine if I cap it to a few billion?
 //Not capped to INT_MAX to give some room for further damage increase.
  md.damage = INT_MAX>>1;
 break;

Link to comment
Share on other sites

md.damage = (int)((int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_)));

That's the formula you have. If you just want to nerf the damage, you can divide it by 2 whatnot.

If you mean that damage gets too high and it goes into healing, then it's already fixed below:

if (md.damage < 0 || md.damage > INT_MAX>>1)
//Overflow prevention, will anyone whine if I cap it to a few billion?
//Not capped to INT_MAX to give some room for further damage increase.
md.damage = INT_MAX>>1;
break;

Instead of INT_MAX/2 you can limit the whole thing to a different cap, like 123456 damage:

if (md.damage < 0 || md.damage > 123456)
//Overflow prevention, will anyone whine if I cap it to a few billion?
//Not capped to INT_MAX to give some room for further damage increase.
md.damage = 123456;
break;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.