Active+ Member Lycawn 502 Posted November 3, 2023 Active+ Member Share Posted November 3, 2023 Hello i would like to know if there's a possible way to code when player has more than 100% critical to turn into dmg Link to comment Share on other sites More sharing options...
AbeilleTurbulante 3 Posted November 3, 2023 Share Posted November 3, 2023 (edited) 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 November 3, 2023 by AbeilleTurbulante 1 Link to comment Share on other sites More sharing options...
Active+ Member Lycawn 502 Posted November 3, 2023 Author Active+ Member Share Posted November 3, 2023 (edited) 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 November 3, 2023 by Lycawn 1 Link to comment Share on other sites More sharing options...
AbeilleTurbulante 3 Posted November 3, 2023 Share Posted November 3, 2023 (edited) 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 November 3, 2023 by AbeilleTurbulante 1 Link to comment Share on other sites More sharing options...
Active+ Member Lycawn 502 Posted November 3, 2023 Author Active+ Member Share Posted November 3, 2023 (edited) 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 November 3, 2023 by Lycawn Link to comment Share on other sites More sharing options...
AbeilleTurbulante 3 Posted November 3, 2023 Share Posted November 3, 2023 16 minutes ago, Lycawn said: What if I double the value The value of what Link to comment Share on other sites More sharing options...
Active+ Member Lycawn 502 Posted November 3, 2023 Author Active+ Member Share Posted November 3, 2023 (edited) 9 minutes ago, AbeilleTurbulante said: The value of what By the way this code doesnt seem to exist in my char_skill.cpp Edited November 3, 2023 by Lycawn Link to comment Share on other sites More sharing options...
AbeilleTurbulante 3 Posted November 3, 2023 Share Posted November 3, 2023 Share your char_skill.cpp. Link to comment Share on other sites More sharing options...
Active+ Member Lycawn 502 Posted November 5, 2023 Author Active+ Member Share Posted November 5, 2023 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 ? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now