Strand Posted December 29, 2019 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 102 Reputation: 2 Joined: 07/01/13 Last Seen: May 23, 2021 Share Posted December 29, 2019 Hello community, How can I set the maximum damage reflected by Reflect Shield and Reject Sword? I want to set the maximum damage to equal to the caster's HP. Thanks! 1 Quote Link to comment Share on other sites More sharing options...
0 Naruto Posted December 30, 2019 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 416 Reputation: 74 Joined: 05/16/19 Last Seen: January 24, 2021 Share Posted December 30, 2019 Id love to do it for you but take a look at the RG version and try and sorrt things out the damage seems to be linked through the SC_RECLECTSHIELD if( sc->data[SC_REFLECTDAMAGE] && !(skill_get_inf2(skill_id)&INF2_TRAP)) { if( rnd()%100 <= sc->data[SC_REFLECTDAMAGE]->val1*10 + 30 ){ max_damage = (int64)max_damage * status_get_lv(bl) / 100; rdamage = (*dmg) * sc->data[SC_REFLECTDAMAGE]->val2 / 100; if( --(sc->data[SC_REFLECTDAMAGE]->val3) < 1) status_change_end(bl,SC_REFLECTDAMAGE,INVALID_TIMER); } } else { Quote Link to comment Share on other sites More sharing options...
0 Strand Posted January 4, 2020 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 102 Reputation: 2 Joined: 07/01/13 Last Seen: May 23, 2021 Author Share Posted January 4, 2020 Hello @Naruto where precisely do I to look at? I can't really understand how the formula works. Do you think you can help me out? Quote Link to comment Share on other sites More sharing options...
0 Naruto Posted January 4, 2020 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 416 Reputation: 74 Joined: 05/16/19 Last Seen: January 24, 2021 Share Posted January 4, 2020 if( rnd()%100 <= sc->data[SC_REFLECTDAMAGE]->val1*10 + 30 ){ we open with this which is the chance, val1 is the level of the skill max_damage = (int64)max_damage * status_get_lv(bl) / 100; max_damage , if you scroll up we declared it int max_damage = status_get_max_hp(bl); Im saying its an easy formula to work with but.... Looking a bit at SC_REFLECTSHIELD AGAIN, Its actually written different and the damage is simplified obviously due to the nature of the attack : In your status.c case SC_REFLECTSHIELD: val2 = 10+val1*3; // %Dmg reflected Depending on what you want you can either re write it to be just like deathbound and the others, or just reduce it this way..... I know what your problem is 1 Quote Link to comment Share on other sites More sharing options...
0 PsyOps Posted July 1, 2020 Group: Members Topic Count: 6 Topics Per Day: 0.00 Content Count: 150 Reputation: 12 Joined: 12/03/18 Last Seen: Wednesday at 10:33 PM Share Posted July 1, 2020 On 1/5/2020 at 1:41 AM, Naruto said: if( rnd()%100 <= sc->data[SC_REFLECTDAMAGE]->val1*10 + 30 ){ we open with this which is the chance, val1 is the level of the skill max_damage = (int64)max_damage * status_get_lv(bl) / 100; max_damage , if you scroll up we declared it int max_damage = status_get_max_hp(bl); Im saying its an easy formula to work with but.... Looking a bit at SC_REFLECTSHIELD AGAIN, Its actually written different and the damage is simplified obviously due to the nature of the attack : In your status.c case SC_REFLECTSHIELD: val2 = 10+val1*3; // %Dmg reflected Depending on what you want you can either re write it to be just like deathbound and the others, or just reduce it this way..... I know what your problem is In the line int max_damage = status_get_max_hp(bl); what does (bl) represent? Quote Link to comment Share on other sites More sharing options...
0 Eross Posted July 11, 2020 Group: Members Topic Count: 166 Topics Per Day: 0.09 Content Count: 377 Reputation: 12 Joined: 04/05/20 Last Seen: Yesterday at 08:11 AM Share Posted July 11, 2020 Hi sorry for bringing up old discussions but im also looking on how to aleast make the reflects max damage = to casters hp or atleast disable reflect on MVP monsters caused by paladin and stalker Quote Link to comment Share on other sites More sharing options...
Question
Strand
Hello community,
How can I set the maximum damage reflected by Reflect Shield and Reject Sword? I want to set the maximum damage to equal to the caster's HP.
Thanks!
Link to comment
Share on other sites
5 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.