Jump to content
  • 0

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


Question

Posted

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.

6 answers to this question

Recommended Posts

Posted (edited)

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
Posted

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.

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