Exemple #1
0
    private int GetAmountOfResult(bool badRange, int resultWanted)
    {
        int result     = 0;
        int treshold   = dc.CalculateTreshold(Attacker, Defender);
        int diceNumber = dc.CalculateDiceNumber(Attacker, Defender, badRange);

        for (int i = 0; i < TestNumber; i++)
        {
            if (dc.ThrowDice(Attacker, Defender, badRange, treshold, diceNumber) == resultWanted)
            {
                result++;
            }
        }

        return(result);
    }