Radian Posted April 28, 2017 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 1546 Reputation: 192 Joined: 07/23/14 Last Seen: June 24, 2024 Share Posted April 28, 2017 So while im editing monsters min ~ max damage I noticed that there's a limit. I wonder where can I find or adjust it in the source? Quote Link to comment Share on other sites More sharing options...
0 Ninja Posted May 10, 2017 Group: Members Topic Count: 54 Topics Per Day: 0.01 Content Count: 513 Reputation: 84 Joined: 08/11/12 Last Seen: July 4, 2024 Share Posted May 10, 2017 On 4/29/2017 at 1:37 AM, Radian said: So while im editing monsters min ~ max damage I noticed that there's a limit. I wonder where can I find or adjust it in the source? You try to look at battle.h // Final calculation Damage int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv); int64 battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int64 damage,uint16 skill_id,int flag); int64 battle_calc_bg_damage(struct block_list *src,struct block_list *bl,int64 damage,uint16 skill_id,int flag); simply changing the return type would do it but that would affect a lot of things. Quote Link to comment Share on other sites More sharing options...
0 Ajjwidjdneidjenw Posted May 28, 2017 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 161 Reputation: 31 Joined: 12/06/11 Last Seen: December 25, 2022 Share Posted May 28, 2017 (edited) In const.h add: /** * THe maximum amount of damage a monster can do in Normal circumstances. (Ignoring GvG & BG maps) */ #define MAX_MONSTER_DAMAGE 2147483647 in battle.c find (Battle_calc_damage) if( sd ) { if( pc_ismadogear(sd) && rnd()%100 < 50 ) { short element = skill_get_ele(skill_id, skill_lv); if( !skill_id || element == -1 ) { //Take weapon's element struct status_data *sstatus = NULL; if( src->type == BL_PC && ((TBL_PC*)src)->bonus.arrow_ele ) element = ((TBL_PC*)src)->bonus.arrow_ele; else if( (sstatus = status_get_status_data(src)) ) { element = sstatus->rhw.ele; } } else if( element == -2 ) //Use enchantment's element element = status_get_attack_sc_element(src,status_get_sc(src)); else if( element == -3 ) //Use random element element = rnd()%ELE_ALL; if( element == ELE_FIRE || element == ELE_WATER ) pc_overheat(sd,element == ELE_FIRE ? 1 : -1); } } add This below: if (bl->type == BL_MOB && damage > MAX_MONSTER_DAMAGE) { return MAX_MONSTER_DAMAGE; } I wasn't sure what you were asking. If this isn't what you're looking for, please elaborate. Edited May 14, 2022 by Ajjwidjdneidjenw Quote Link to comment Share on other sites More sharing options...
Question
Radian
So while im editing monsters min ~ max damage I noticed that there's a limit. I wonder where can I find or adjust it in the source?
Link to comment
Share on other sites
2 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.