Jump to content
  • 0
Sign in to follow this  
Kuroyama

Need help soul link creator

Question

image.png.14c1eda894a2d0a61b97151b5ace4305.png

How to fix acid demo damage soul link?

 

	// If linked, alchemists will have 15% increase in CR_ACIDDEMONSTRATION's damage
		if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ALCHEMIST )
			md.damage += md.damage*15/100;

I'm using this one but it makes the damage 999999 without link.

 

EDIT: This is for additional 15% dmage for acid demo when soul linked.

Edited by Kuroyama

Share this post


Link to post
Share on other sites

0 answers to this question

Recommended Posts

  • 0

Hm, should be working fine.

 

Did you put that code inside CR_ACIDDEMOSTRATION after the capped md.damaged right?.

 

Spoiler

		// Some monsters have totaldef higher than md.damage in some cases, leading to md.damage < 0
		if( md.damage < 0 )
			md.damage = 0;
		if( 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;

		if( sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_ALCHEMIST )
			md.damage += md.damage*15/100;
		break;

 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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