Jump to content
  • 0

Resist Capping


Rebel

Question


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

Just want to ask how can i cap all element resist to 80%??
 

Edited by Rebel
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


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

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/conf/battle/status.conf

// Maximum resistance to status changes. (100 = 100%)
// NOTE: Cards and equipment can go over this limit, so it only applies to natural resist.
pc_max_status_def: 100
mob_max_status_def: 100

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

https://rathena.svn....tle/status.conf

// Maximum resistance to status changes. (100 = 100%)
// NOTE: Cards and equipment can go over this limit, so it only applies to natural resist.
pc_max_status_def: 100
mob_max_status_def: 100

I want all resist not just natural resist..

all resist = including cards and equipments..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

i think so, yes.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  68
  • Topics Per Day:  0.02
  • Content Count:  436
  • Reputation:   31
  • Joined:  02/19/12
  • Last Seen:  

Hi. its not working and I only got this tested just now hahaha..

 

wearing 2 devilings will have 100% neutral but still cant attack.

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