Jump to content
  • 0

Requesting the code's cap damage for Deathbound and Shadowform.


vijay30393

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

As my topic say's requesting the code's for cap damage of Deathbound and Shadowform.

This both refelecting skill damage's like crazy, need to cap it but i wonder how, please help me out.

Thanks in advance.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

In src/map/battle.c

 if( sc && sc->data[sC__SHADOWFORM] ) {
  struct block_list *s_bl = map_id2bl(sc->data[sC__SHADOWFORM]->val2);
  if( !s_bl ) { // If the shadow form target is not present remove the sc.
status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
  } else if( status_isdead(s_bl) || !battle_check_target(src,s_bl,BCT_ENEMY)) { // If the shadow form target is dead or not your enemy remove the sc in both.
status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
if( s_bl->type == BL_PC )
 ((TBL_PC*)s_bl)->shadowform_id = 0;
  } else {
if( (--sc->data[sC__SHADOWFORM]->val3) < 0 ) { // If you have exceded max hits supported, remove the sc in both.
 status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
 if( s_bl->type == BL_PC )
  ((TBL_PC*)s_bl)->shadowform_id = 0;
} else {
 status_damage(src, s_bl, damage, 0, clif_damage(s_bl, s_bl, gettick(), 500, 500, damage, -1, 0, 0), 0);
 return ATK_NONE;
}
  }
 }

The damage variable in here:

status_damage(src, s_bl, damage, 0, clif_damage(s_bl, s_bl, gettick(), 500, 500, damage, -1, 0, 0), 0);

You could redulce this value before it's passed trought the status_damage function, right after the else.

Something like:

} else {
 damage *= 0.7; //reduces 30% of damage
 status_damage(src, s_bl, damage, 0, clif_damage(s_bl, s_bl, gettick(), 500, 500, damage, -1, 0, 0), 0);
 return ATK_NONE;
}

Edited by MarkZD
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

Damage cap always sound like a stuipid idea for me, I'd suggest lowering the value of each level.

Go to status, and find:

case SC_DEATHBOUND:
  val2 = 500 + 100 * val1;

500 is base value, 100 is value for each level.

As for Shadow Form, it is based on enemy's damage.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

What about that Shadow Form, no way to reduce its reflect damage?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

Thanks mate, the problem is solved.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  114
  • Reputation:   0
  • Joined:  05/10/12
  • Last Seen:  

@MarkZD is there a way to cap the damage for 155k because if a champ/sura uses asura when the shadowform is on the sura/champ will be dead.
Thanks~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  550
  • Reputation:   9
  • Joined:  11/06/12
  • Last Seen:  

bump for the last question?

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