Jump to content
  • 0

Acid demonstration dmg change?


keoco

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  130
  • Reputation:   0
  • Joined:  01/24/12
  • Last Seen:  

The dmg on acid demonstration is too high, how do i make it lower?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

I think here in battle.c

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

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  130
  • Reputation:   0
  • Joined:  01/24/12
  • Last Seen:  

thanks, but which bit do i edit?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  01/17/12
  • Last Seen:  

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...