Jump to content

Recommended Posts

Hi,
How damage on mobs is calculated?
I tested with couple of mobs and i got weird numbers like:

Mob 1lvl 0 deff 0 status
When i have 10att i hit dog for 9
when i have 20att i hit dog for 15
when i have 50att i hit dog gor 29
when i have 100att i hit dog for 69
how the hell dog reduces so much dmg, i tested with several mobs and the numbers are the same.
I want simple math, my dmg 50, mob def 10 so i hit 40. It seems like % dmg reduction but all resists/deff etc are set to 0. 
how dmg is calculated? is there anything i can change in source?

i just cant balance my server if i cant figure out how dmg works

Edited by Mefarious
Link to comment
https://metin2.dev/topic/33251-damage-calculation/
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Premium

dex difference between victim and attacker makes a huge difference (also called attack rating)
 

float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating)
{
	int iARSrc;
	int iERSrc;

	{
		int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX);
		int attacker_lv = pkAttacker->GetLevel();

		int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX);
		int victim_lv = pkAttacker->GetLevel();

		iARSrc = MIN(90, (attacker_dx * 4	+ attacker_lv * 2) / 6);
		iERSrc = MIN(90, (victim_dx	  * 4	+ victim_lv   * 2) / 6);
	}

	float fAR = ((float) iARSrc + 210.0f) / 300.0f;

	if (bIgnoreTargetRating) {
		return fAR;
	}

	float fER = ((float) (iERSrc * 2 + 5) / (iERSrc + 95)) * 3.0f / 10.0f;

	return fAR - fER;
}

used here

	// level must be ignored when multiply by fAR, so subtract it before calculation.
	iAtk = pkAttacker->GetPoint(POINT_ATT_GRADE) + iDam - (pkAttacker->GetLevel() * 2);
	iAtk = (int) (iAtk * fAR);
	iAtk += pkAttacker->GetLevel() * 2; // and add again

 

Link to comment
https://metin2.dev/topic/33251-damage-calculation/#findComment-168337
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.