Jump to content
  • 0

Resist Capping


Question

6 answers to this question

Recommended Posts

Posted

Maybe it's better if you cap the rate instead of the status def

status.c

rate -= rate*sd->sc.data[sC_COMMONSC_RESIST]->val1/100;
 }
}
+ rate = cap_value(rate, 0, 8000); //capped to 80%
if (!(rnd()%10000 < rate))
 return 0;
//Why would a status start with no duration? Presume it has
//duration defined elsewhere.

oh well, you were asking about def_ele

in status.c

 return ELE_UNDEAD;
if(sc->data[sC_ELEMENTALCHANGE])
 return sc->data[sC_ELEMENTALCHANGE]->val2;
if(sc->data[sC_SHAPESHIFT])
 return sc->data[sC_SHAPESHIFT]->val2;
return (unsigned char)cap_value(element,0,UCHAR_MAX);
}

UCHAR_MAX is the max value return, w/c is 255.. change it to whatever you want to use <255

Posted

Maybe it's better if you cap the rate instead of the status def

status.c

rate -= rate*sd->sc.data[sC_COMMONSC_RESIST]->val1/100;
}
}
+ rate = cap_value(rate, 0, 8000); //capped to 80%
if (!(rnd()%10000 < rate))
 return 0;
//Why would a status start with no duration? Presume it has
//duration defined elsewhere.

oh well, you were asking about def_ele

in status.c

 return ELE_UNDEAD;
if(sc->data[sC_ELEMENTALCHANGE])
 return sc->data[sC_ELEMENTALCHANGE]->val2;
if(sc->data[sC_SHAPESHIFT])
 return sc->data[sC_SHAPESHIFT]->val2;
return (unsigned char)cap_value(element,0,UCHAR_MAX);
}

UCHAR_MAX is the max value return, w/c is 255.. change it to whatever you want to use <255

i think this is what i asking for

rate = cap_value(rate, 0, 8000); //capped to 80%

question.. correct me if im wrong if i put that code. does that mean the max resist of element will be capped to 80%

because its possible to have a 100% resist to a certain element like FIRE ELEMENT, by using combination of cards and equipments.. mostly if i have custom items. and cards..

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...