Jump to content
  • 0

Max Dmg Reject Sword and Shield Reflect


Strand

Question


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

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
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  416
  • Reputation:   73
  • Joined:  05/16/19
  • Last Seen:  

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 {

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  102
  • Reputation:   2
  • Joined:  07/01/13
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  416
  • Reputation:   73
  • Joined:  05/16/19
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  150
  • Reputation:   11
  • Joined:  12/03/18
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.11
  • Content Count:  349
  • Reputation:   12
  • Joined:  04/05/20
  • Last Seen:  

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

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