Strand Posted December 29, 2019 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
0 Naruto Posted December 30, 2019 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
0 Strand Posted January 4, 2020 Author 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
0 Naruto Posted January 4, 2020 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
0 PsyOps Posted July 1, 2020 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
0 Eross Posted July 11, 2020 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
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!
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.