Beispiel #1
0
 public bool IsCompanionInParty(string companionName, bool includeScroll = false)
 {
     // checks if the companion is present in the party
     if (includeScroll)
     {
         return(PartyDice.Any(d => d.Name == companionName));
     }
     // don't include scrolls
     return(PartyDice.Any(d => d.Companion != CompanionType.Scroll && d.Name == companionName));
 }
Beispiel #2
0
        public string RemoveMonsterCompanions()
        {
            // removes companions that were transfromed from monsters using a hero ability
            if (!PartyDice.Any(d => d.IsFromMonster))
            {
                return(""); // no companions from monsters
            }
            // we have companions from monsters let's grab them
            List <PartyDie> companionsToRemove = PartyDice.Where(d => d.IsFromMonster).ToList();

            PartyDice.RemoveAll(d => d.IsFromMonster);
            if (companionsToRemove.Count == 1)
            {
                return($"A {companionsToRemove[0].Companion} was discarded from your party. ");
            }
            // we have two that we need to remove
            return($"Two{companionsToRemove[0].Companion} companions were discarded from your party. ");
        }