Jump to content
  • 0
Sign in to follow this  
Litro

Magic Damage Calc

Question

I have server with level 250/120 & allskills commands (comparing it to 3ceam)magic damage feel unbalanced or have high output damage, i have disabled entire renewal feature, i have compared 3ceam & hercules battle.c but i can't figured it yet, have any one know what make it so high or how the magic calc do it value..

Edited by Litro

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Try to go with:

struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag) {...}

Share this post


Link to post
Share on other sites
  • 0

 

Try to go with:

struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,uint16 skill_id,uint16 skill_lv,int mflag) {...}

 

i was have looked into it and there is something bother me, as in 3CeAM setting there is this setting on battle/skill.conf

 

 

// Set this to the max base level that you would like skills to add extra bonus damage from. // [Pinky] // NOTE: Default level is 150, if you set this to a higher level then you will experience higher/overload damage from many 3rd class skills.// NOTE2: If you set this to a lower level then 100 all skills will suffer penalties higer than 100%, causing damages below the minimun damage.max_highlvl_nerf: 150// Set this to the max job level that you would like 3rd class skills to add extra bonus damage from. // [Pinky] // NOTE: Default 3rd class job_level is 50 (official servers), if you set this to a higher level depending on your server's 3rd classes max job level, then you might experience higher/overload damage/effects from 3rd class skills.// This setting only effects 3rd class skills that uses job level as a bonus multiplicator.// 0 = disabledmax_joblvl_nerf: 50

 

 

and in battle.c on 3CeAM on battle_calc_magic

 

 

s_level = status_get_lv(src);	if( skill_num >= RK_ENCHANTBLADE && skill_num <= LG_OVERBRAND_PLUSATK &&		battle_config.max_highlvl_nerf && s_level > battle_config.max_highlvl_nerf )		s_level = battle_config.max_highlvl_nerf;			// Max Job Level bonus that skills should receive. Acording to battle_config.max_joblvl_nerf [Pinky]	if( sd && battle_config.max_joblvl_nerf)		s_job_level = min(sd->status.job_level,battle_config.max_joblvl_nerf);	else if ( sd )		s_job_level = sd->status.job_level;

 

 

from my understanding, s_level and s_job_level only used on some skill as bonus and it were fall to skillration bonus, as per hercules it was same as RENEWAL_LVDMG right ?

 

and the las part of my suspicious code it fall on damage reduction since hercules code was moved in some palace not on same parent on battle_calc_magic and some other code to go on the palace like

 

 

ad.damage = battle->calc_cardfix(BF_MAGIC, src, target, nk, s_ele, 0, ad.damage, 0, ad.flag);ad.damage = battle->calc_defense(BF_MAGIC, src, target, skill_id, skill_lv, ad.damage, (flag.imdef?1:0), 0);ad.damage=battle->attr_fix(src, target, ad.damage, s_ele, tstatus->def_ele, tstatus->ele_lv);

 

 

on 3CeAM the code was in battle_calc_magic

 

 

if (sd && !(nk&NK_NO_CARDFIX_ATK)) {			short t_class = status_get_class(target);			short cardfix=1000;			cardfix=cardfix*(100+sd->magic_addrace[tstatus->race])/100;			if (!(nk&NK_NO_ELEFIX))				cardfix=cardfix*(100+sd->magic_addele[tstatus->def_ele])/100;			cardfix=cardfix*(100+sd->magic_addsize[tstatus->size])/100;			cardfix=cardfix*(100+sd->magic_addrace[is_boss(target)?RC_BOSS:RC_NONBOSS])/100;			for(i=0; i< ARRAYLENGTH(sd->add_mdmg) && sd->add_mdmg[i].rate;i++) {				if(sd->add_mdmg[i].class_ == t_class) {					cardfix=cardfix*(100+sd->add_mdmg[i].rate)/100;					continue;				}			}			if (cardfix != 1000)				MATK_RATE(cardfix/10);		}		if( tsd && !(nk&NK_NO_CARDFIX_DEF) )	  	{ // Target cards.			short s_race2 = status_get_race2(src);			short s_class= status_get_class(src);			int cardfix=1000;			if (!(nk&NK_NO_ELEFIX))			{				int ele_fix = tsd->subele[s_ele];				for (i = 0; ARRAYLENGTH(tsd->subele2) > i && tsd->subele2[i].rate != 0; i++)				{					if(tsd->subele2[i].ele != s_ele) continue;					if(!(tsd->subele2[i].flag&ad.flag&BF_WEAPONMASK &&						 tsd->subele2[i].flag&ad.flag&BF_RANGEMASK &&						 tsd->subele2[i].flag&ad.flag&BF_SKILLMASK))						continue;					ele_fix += tsd->subele2[i].rate;				}				cardfix=cardfix*(100-ele_fix)/100;			}			cardfix=cardfix*(100-tsd->subsize[sstatus->size])/100;			cardfix=cardfix*(100-tsd->subrace2[s_race2])/100;			cardfix=cardfix*(100-tsd->subrace[sstatus->race])/100;			cardfix=cardfix*(100-tsd->subrace[is_boss(src)?RC_BOSS:RC_NONBOSS])/100;			if( sstatus->race != RC_DEMIHUMAN )				cardfix=cardfix*(100-tsd->subrace[RC_NONDEMIHUMAN])/100;			for(i=0; i < ARRAYLENGTH(tsd->add_mdef) && tsd->add_mdef[i].rate;i++) {				if(tsd->add_mdef[i].class_ == s_class) {					cardfix=cardfix*(100-tsd->add_mdef[i].rate)/100;					break;				}			}			//It was discovered that ranged defense also counts vs magic! [Skotlex]			if (ad.flag&BF_SHORT)				cardfix=cardfix*(100-tsd->near_attack_def_rate)/100;			else				cardfix=cardfix*(100-tsd->long_attack_def_rate)/100;			cardfix=cardfix*(100-tsd->magic_def_rate)/100;			if( tsd->sc.data[SC_MDEF_RATE] )				cardfix=cardfix*(100-tsd->sc.data[SC_MDEF_RATE]->val1)/100;			if (cardfix != 1000)				MATK_RATE(cardfix/10);		}

 

 

 

and the last i test damage with same skill on both emu, there is huge difference on it i will come with ss later, can you kindly recheck it since im not understand it yet, thanks beforehand

Edited by Litro

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.