Wycademy/src/Wycademy/Commands/Services/DamageCalculatorService.cs
/// <summary>
/// Calculates and makes a string out of the inputted message, using Monster Hunter Generations numbers.
/// </summary>
/// <param name="message">The data message to calculate from.</param>
/// <returns>The message to show the user.</returns>
Calculates and makes a string out of the inputted message, using Monster Hunter Generations numbers.
Calculates and makes a string out of the inputted message using Monster Hunter Generations numbers .
private string GetResponseMessageGen(DamageCalculatorMessage message)
        {
            var modifiers = message.GetSharpnessModifiers();
            float expectedRaw = (message.RawDamage * (1 + 0.25f * (message.Affinity / 100.0f))) * modifiers.RawModifier;
            float expectedRawCritBoost = (message.RawDamage * (1 + 0.4f * (message.Affinity / 100.0f))) * modifiers.RawModifier;
            float expectedElement = message.ElementDamage * modifiers.ElementModifier;
            var sb = new StringBuilder();
            sb.AppendLine("```");
            sb.AppendLine($"Expected raw: {expectedRaw}");
            sb.AppendLine($"Expected raw with Crit Boost: {expectedRawCritBoost}");
            sb.AppendLine($"Expected element: {expectedElement}");
            sb.AppendLine("Note: these numbers do not take into account motion values, hitzones, rank modifiers, and individual quest modifiers.");
            sb.AppendLine("```");
            return sb.ToString();
        }
private string GetResponseMessageGen ( DamageCalculatorMessage message ) { var modifiers = message . GetSharpnessModifiers ( ) ; float expectedRaw = ( message . RawDamage * ( 1 + 0.25f * ( message . Affinity / 100.0f ) ) ) * modifiers . RawModifier ; float expectedRawCritBoost = ( message . RawDamage * ( 1 + 0.4f * ( message . Affinity / 100.0f ) ) ) * modifiers . RawModifier ; float expectedElement = message . ElementDamage * modifiers . ElementModifier ; var sb = new StringBuilder ( ) ; sb . AppendLine ( " " ) ; sb . AppendLine ( $" Expected raw:  { expectedRaw } " ) ; sb . AppendLine ( $" Expected raw with Crit Boost:  { expectedRawCritBoost } " ) ; sb . AppendLine ( $" Expected element:  { expectedElement } " ) ; sb . AppendLine ( " " ) ; sb . AppendLine ( " " ) ; return sb . ToString ( ) ; }
Calculates and makes a string out of the inputted message, using Monster Hunter Generations numbers.
Calculates and makes a string out of the inputted message using Monster Hunter Generations numbers .
// Expected raw follows the following formula: (Attack * (1 + Crit Modifier * (Affinity / 100))) * Raw Sharpness Modifier. // The crit modifier is 0.25, or 0.4 with crit boost. // Expected element/status is simply: Attack * Elemental/Status Sharpness Modifier.
The message to show the user.
The message to show the user .
message
DamageCalculatorMessage
The data message to calculate from.
The data message to calculate from .