Radian Posted April 28, 2017 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
0 Ninja Posted May 10, 2017 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
0 Ajjwidjdneidjenw Posted May 28, 2017 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
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?
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.