aguyaguy Posted January 31, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 26 Reputation: 0 Joined: 12/17/11 Last Seen: March 23, 2020 Share Posted January 31, 2012 can someone assist me how to put a cap damage. in all skills . or just give me an example to edit it . thank you help ? bump 55 views and no one could help me @_@ Quote Link to comment Share on other sites More sharing options...
Variant Posted January 31, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 52 Reputation: 6 Joined: 01/06/12 Last Seen: December 12, 2017 Share Posted January 31, 2012 (edited) int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int damage,int skill_num,int skill_lv) Find that in battle.c, go down to the end of the function where it says return damage; and add if(damage > DAMAGECAP) damage = DAMAGECAP; before it. Replace DAMAGECAP with whatever number. Unless there's some function for some obscure skill that doesn't call this function, it should cap all damage. (Do skills like demonstration call this function actually? I'm not really sure, unit skills are weird, but I think they all call this function for damage.) Edited January 31, 2012 by Variant Quote Link to comment Share on other sites More sharing options...
Kenpachi Posted February 7, 2012 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 764 Reputation: 220 Joined: 11/14/11 Last Seen: November 19, 2020 Share Posted February 7, 2012 There is a function called cap_value()... cap_value(value, MIN, MAX) Quote Link to comment Share on other sites More sharing options...
myieee Posted February 24, 2012 Group: Members Topic Count: 34 Topics Per Day: 0.01 Content Count: 83 Reputation: 0 Joined: 12/07/11 Last Seen: November 29, 2020 Share Posted February 24, 2012 regarding on this topic . is there any way to put a max cap damage let say Bowling Bash i want a max cap damage like 36000 is it possible? Quote Link to comment Share on other sites More sharing options...
Variant Posted February 28, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 52 Reputation: 6 Joined: 01/06/12 Last Seen: December 12, 2017 Share Posted February 28, 2012 There is a function called cap_value()... cap_value(value, MIN, MAX) Woops. Forgot about that macro function. Yeah, you could just use: return cap_value(damage,0,DAMAGECAP); //Is it 0 or 1 that's the min here? regarding on this topic . is there any way to put a max cap damage let say Bowling Bash i want a max cap damage like 36000 is it possible? Replace return damage with return (skill_num == KN_BOWLINGBASH)?cap_value(damage,0,36000):damage; Quote Link to comment Share on other sites More sharing options...
Question
aguyaguy
can someone assist me how to put a cap damage. in all skills . or just give me an example to edit it . thank you
help ?
bump
55 views and no one could help me @_@
Link to comment
Share on other sites
4 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.