Jump to content

Critical Exceeding maximum % turns to dmg


Recommended Posts

Lol what is the difficulty? You didn't even try, did you? You're lucky I'm nice today.

 

You have this condition inside char_battle.cpp:

if (iCriticalPct)
{
  iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

  if (number(1, 100) <= iCriticalPct)
  {
    IsCritical = true;
    dam *= 2;
    EffectPacket(SE_CRITICAL);
  }
}

 

Just add this part at the end of the condition:

if (IsPC() && iCriticalPct >= 100)
{
  dam += (dam * (iCriticalPct - 100)) / 200;
}

 

It's the same formula for extra piercing hits in the official. With this, 1 critical above 100% turns into 0.5% damages. This is for melee attacks, you can do the same for skills if you want.

Edited by AbeilleTurbulante
  • Metin2 Dev 1
Link to comment
Share on other sites

  • Active+ Member
9 minutes ago, AbeilleTurbulante said:

Lol what is the difficulty? You didn't even try, did you? You're lucky I'm nice today.

 

You have this condition inside char_battle.cpp:

			if (iCriticalPct)
			{
				iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

				if (number(1, 100) <= iCriticalPct)
				{
					IsCritical = true;
					dam *= 2;
					EffectPacket(SE_CRITICAL);
				}
			}

 

Just add this part at the end of the condition:

				if (IsPC() && iCriticalPct >= 100)
				{
					dam += (dam * (iCriticalPct - 100)) / 200;
				}

 

It's the same formula for extra piercing hits in the official. With this, 1 critical above 100% turns into 0.5% damages. This is for melee attacks, you can do the same for skills if you want.

Thank you show much

 

Edited by Lycawn
  • Good 1

spacer.png

Link to comment
Share on other sites

9 minutes ago, Lycawn said:

Thank you show much

what should be changed for skill dmg ?

 

It's just above, in char_skill.cpp, inside this condition:

 

if (iCriticalPct)
{
  if (iCriticalPct >= 10)
    iCriticalPct = 5 + (iCriticalPct - 10) / 4;
  else
    iCriticalPct /= 2;

  iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

  if (number(1, 100) <= iCriticalPct)
  {
    IsCritical = true;
    dam *= 2;
    EffectPacket(SE_CRITICAL);

    if (IsAffectFlag(AFF_MANASHIELD))
    {
      RemoveAffect(AFF_MANASHIELD);
    }
  }
}

 

However, if you kept this code, you will need more than 394% critical to get extra damages with skills.

Edited by AbeilleTurbulante
  • Metin2 Dev 1
Link to comment
Share on other sites

  • Active+ Member
4 minutes ago, AbeilleTurbulante said:

 

It's just above, in char_skill.cpp, inside this condition:

 

if (iCriticalPct)
{
  if (iCriticalPct >= 10)
    iCriticalPct = 5 + (iCriticalPct - 10) / 4;
  else
    iCriticalPct /= 2;

  iCriticalPct -= GetPoint(POINT_RESIST_CRITICAL);

  if (number(1, 100) <= iCriticalPct)
  {
    IsCritical = true;
    dam *= 2;
    EffectPacket(SE_CRITICAL);

    if (IsAffectFlag(AFF_MANASHIELD))
    {
      RemoveAffect(AFF_MANASHIELD);
    }
  }
}

 

However, if you kept this code, you will need more than 394% critical to get extra damages with skills.

What if I double the value

Edited by Lycawn

spacer.png

Link to comment
Share on other sites

  • Active+ Member
On 11/3/2023 at 7:40 PM, AbeilleTurbulante said:

Share your char_skill.cpp.

if (number(1, 100) <= iCriticalPct)
                {
                    IsCritical = true;
                    dam *= 2;
                    EffectPacket(SE_CRITICAL);
                }
                
            }
            if (IsPC() && iCriticalPct >= 100)
                {
                    dam += (dam * (iCriticalPct - 100)) / 200;
                }


  Correct ?

spacer.png

Link to comment
Share on other sites

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.