Rebel Posted August 19, 2012 Group: Members Topic Count: 68 Topics Per Day: 0.01 Content Count: 436 Reputation: 32 Joined: 02/19/12 Last Seen: May 22, 2024 Share Posted August 19, 2012 (edited) Just want to ask how can i cap all element resist to 80%?? Edited June 29, 2013 by Rebel Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 20, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted August 20, 2012 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 Quote Link to comment Share on other sites More sharing options...
Rebel Posted August 21, 2012 Group: Members Topic Count: 68 Topics Per Day: 0.01 Content Count: 436 Reputation: 32 Joined: 02/19/12 Last Seen: May 22, 2024 Author Share Posted August 21, 2012 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.. Quote Link to comment Share on other sites More sharing options...
clydelion Posted August 25, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted August 25, 2012 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 Quote Link to comment Share on other sites More sharing options...
Rebel Posted August 25, 2012 Group: Members Topic Count: 68 Topics Per Day: 0.01 Content Count: 436 Reputation: 32 Joined: 02/19/12 Last Seen: May 22, 2024 Author Share Posted August 25, 2012 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.. Quote Link to comment Share on other sites More sharing options...
clydelion Posted August 25, 2012 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 754 Reputation: 186 Joined: 05/22/12 Last Seen: October 15, 2022 Share Posted August 25, 2012 i think so, yes. Quote Link to comment Share on other sites More sharing options...
Rebel Posted June 28, 2013 Group: Members Topic Count: 68 Topics Per Day: 0.01 Content Count: 436 Reputation: 32 Joined: 02/19/12 Last Seen: May 22, 2024 Author Share Posted June 28, 2013 Hi. its not working and I only got this tested just now hahaha.. wearing 2 devilings will have 100% neutral but still cant attack. Quote Link to comment Share on other sites More sharing options...
Question
Rebel
Just want to ask how can i cap all element resist to 80%??
Edited by RebelLink to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.