Esempio n. 1
0
        public int MakeAbilityRoll(AbilityRoll rollType = AbilityRoll.Normal)
        {
            switch (rollType)
            {
            case AbilityRoll.Advantage:
                return(Advantage());

            case AbilityRoll.Disadvantage:
                return(Disadvantage());

            default:
                return(D20());
            }
        }
Esempio n. 2
0
        public bool SavingThrow(AbilityScore score, int dc, AbilityRoll rollType = AbilityRoll.Normal)
        {
            if (Abilities.ContainsKey(score))
            {
                int roll = Dice.MakeAbilityRoll(rollType) + Abilities[score].Save;
                if (HasBless)
                {
                    roll += Dice.D4();
                }

                if (ActiveEffect != null)
                {
                    if (ActiveEffect.Type == SpellEffectType.SynapticStatic)
                    {
                        roll -= Dice.D6();
                    }
                }

                return(roll >= dc);
            }

            return(false);
        }