Jump to content
  • 0

Max Dmg Reject Sword and Shield Reflect


Question

Posted

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!

  • Upvote 1

5 answers to this question

Recommended Posts

  • 0
Posted

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 {

 

  • 0
Posted
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

  • Upvote 1
  • 0
Posted
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?

  • 0
Posted

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

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