← Back to all addons

Random Critical Damage Multiplier

Posted by Gyvr on May 8, 2024 at 3:27 PM

FeatureGameplay1.3 Verified1.4 Verified
💡 3

In Mythril2D, critical damage typically doubles post-mitigation damages (damages after resistances and bonuses are applied). This add-on modifies the critical damage formula to introduce variability in its scaling factor.

DamageSolver.cs (lines 17 to 20), replace DamageSolver.CalculateCriticalDamage with:

public static int CalculateCriticalDamage(int damage)
{
    return (int)Math.Round(damage * UnityEngine.Random.Range(1.5f, 2.5f));
}

💬 Comments (0)

Be the first to comment! Join our Discord to share your thoughts.

Want to continue the conversation?