Need help soul link creator

Kuroyama

New member
Messages
128
Points
0
image.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.

 
Last edited by a moderator:
Hm, should be working fine.

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

Code:
		// 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;

 
Back
Top