예제 #1
0
    string ResolveSpeedComparison(Bod b1, Bod b2, out Bod first, out Bod second, int spBonus1 = 0, int spBonus2 = 0)
    {
        int sp1 = RVCalc.RollD20(b1.agility + b1.fighting + spBonus1);
        int sp2 = RVCalc.RollD20(b2.agility + b2.fighting + spBonus2);

        string finalText = b1.name + "'s speed: " + sp1 + " vs. " + b2.name + "'s speed: " + sp2;

        if (sp1 > sp2)
        {
            first  = b1;
            second = b2;
        }
        else if (sp2 > sp1)
        {
            first  = b2;
            second = b1;
        }
        else // sp1 == sp2
        {
            if (RVCalc.GetVal(1, 2) == 1)
            {
                finalText += "\nTie break: " + b1.name;
                first      = b1;
                second     = b2;
            }
            else
            {
                finalText += "\nTie break: " + b2.name;
                first      = b2;
                second     = b1;
            }
        }

        return(finalText);
    }
예제 #2
0
    public PersonalityType GetRandomPersonalityType()
    {
        int val = RVCalc.GetVal(1, 4);

        switch (val)
        {
        case 1:
            return(PersonalityType.RESOLUTE);

        case 2:
            return(PersonalityType.RECKLESS);

        case 3:
            return(PersonalityType.QUIRKY);

        case 4:
            return(PersonalityType.OBSERVANT);

        default:
            return(PersonalityType.NONE);
        }
    }