Esempio n. 1
0
        /// <summary>
        /// Rolls one die that currently has the specified companion.
        /// </summary>
        /// <param name="companion"></param>
        /// <returns></returns>
        public string RollPartyDie(CompanionType companion)
        {
            string message = "";
            var    die     = PartyDice.FirstOrDefault(d => d.Companion == companion);

            if (die == null)
            {
                message = $"You do not have a {companion} in your party.Choose another companion to roll.  ";
            }
            else
            {
                die.Roll();
                message = $"You rolled your {companion} and now got a {die.Companion} in your party. ";
            }
            return(message);
        }