Example #1
0
        public override string ActivateLevelTwoUltimate(Dungeon dungeon)
        {
            if (IsExhausted)
            {
                return("Your hero is exhausted and cannot use the ultimate ability in this dungeon delve. ");
            }

            if (Experience < 5)
            {
                return("Your hero is still an Occultist and cannot use the Command Dead ultimate. Try saying Animate Dead instead. ");
            }
            // check how many skeletons we have
            int skeletonCount = dungeon.DungeonDice.Count(d => d.DungeonDieType == DungeonDieType.Skeleton);

            if (skeletonCount < 1)
            {
                return("There are no skeletons in this level. Use Command Dead when you encounter skeletons. ");
            }
            // skeletons are present let's remove up to two and add  up to two fighters to our party
            int    skeletonsToTransform = skeletonCount > 2 ? 2 : skeletonCount;
            string plural = skeletonsToTransform == 2 ? "s" : "";

            for (int i = 0; i < skeletonsToTransform; i++)
            {
                dungeon.DungeonDice.RemoveFirst(d => d.DungeonDieType == DungeonDieType.Skeleton);
                PartyDie fighter = new PartyDie();
                fighter.Companion     = CompanionType.Fighter;
                fighter.IsFromMonster = true;
                PartyDice.Insert(0, fighter);
            }


            IsExhausted = true;
            return($"You cast Command Dead and transformed {skeletonsToTransform} skeleton{plural} into fighter{plural}. If not used, {skeletonsToTransform} fighter{plural} will be discarded when you complete the level. ");
        }
        public override string ActivateLevelOneUltimate(Dungeon dungeon)
        {
            if (IsExhausted)
            {
                return("Your hero is exhausted and cannot use the ultimate ability in this dungeon delve. ");
            }

            if (IsLeveledUp)
            {
                return("You are a Chieftain now. To use your new ultimate ability say Pull Rank. ");
            }
            // check if goblin exists
            var goblin = dungeon.DungeonDice.FirstOrDefault(d => d.DungeonDieType == DungeonDieType.Goblin);

            if (goblin == null)
            {
                return("There are no goblins in this level. Use Plea For Help when you encounter goblins. ");
            }
            // goblin detected let's remove it and add a fighter to our party
            dungeon.DungeonDice.Remove(goblin);
            PartyDie thief = new PartyDie();

            thief.Companion     = CompanionType.Thief;
            thief.IsFromMonster = true;
            PartyDice.Insert(0, thief);
            IsExhausted = true;
            return("You Plea For Help and transformed a goblin into a thief. This thief will be discarded when you complete a level. ");
        }
Example #3
0
        public override string ActivateLevelOneUltimate(Dungeon dungeon)
        {
            if (IsExhausted)
            {
                return("Your hero is exhausted and cannot use the ultimate ability in this dungeon delve. ");
            }

            if (Experience > 4)
            {
                return("You are a Necromancer now. To use your new ultimate ability say Command Dead. ");
            }
            // check if skeleton exists
            var skeleton = dungeon.DungeonDice.FirstOrDefault(d => d.DungeonDieType == DungeonDieType.Skeleton);

            if (skeleton == null)
            {
                return("There are no skeletons in this level. Use Animate Dead when you encounter skeletons. ");
            }
            // skeleton detected let's remove it and add a fighter to our party
            dungeon.DungeonDice.Remove(skeleton);
            PartyDie fighter = new PartyDie();

            fighter.Companion     = CompanionType.Fighter;
            fighter.IsFromMonster = true;
            PartyDice.Insert(0, fighter);
            IsExhausted = true;
            return("You cast Animate Dead and transformed a skeleton into a fighter. This fighter will be discarded when you complete a level. ");
        }
        public override string RollPartyDice(Dungeon dungeon, int partySize = 7)
        {
            // roll party dice to create your party
            // transform scrolls to champions for this hero
            string message     = $"Rolling the party dice. {SoundManager.DiceRollSound(true)} Your party consists of: ";
            int    scrollCount = 0;

            for (int i = 0; i < partySize; i++)
            {
                PartyDie die = new PartyDie();
                if (die.Companion == CompanionType.Scroll)
                {
                    die.Companion = CompanionType.Champion;
                    scrollCount++;
                }
                PartyDice.Add(die);
            }
            message += $"{GetPartyAsString()}. ";

            if (scrollCount == 1)
            {
                message += "One scroll was transformed to a champion. ";
            }
            else if (scrollCount > 1)
            {
                message += $"{scrollCount} scrolls were transformed to champions. ";
            }
            return(message);
        }
Example #5
0
        public virtual string RollPartyDice(Dungeon dungeon, int partySize = 7)
        {
            // roll party dice to create your party
            // use the size to determine the size of party as some heroes may have a larger party
            string message = $"Rolling the party dice.{SoundManager.DiceRollSound(true)} Your party consists of: ";

            for (int i = 0; i < partySize; i++)
            {
                PartyDie die = new PartyDie();
                PartyDice.Add(die);
            }
            message += $"{GetPartyAsString()}. ";
            return(message);
        }
Example #6
0
        public string ReviveCompanion(CompanionType companion)
        {
            // move a party die from graveyard to party dice then set the companion value
            Graveyard--;
            var partyDie = new PartyDie();

            partyDie.Companion = companion;
            PartyDice.Add(partyDie);
            RevivalsRemaining--;
            if (RevivalsRemaining > 0)
            {
                return($"You added a {companion} to your party. Say revive to revive another companion. ");
            }

            // no more revivals
            return($"You added a {companion} to your party. ");
        }
Example #7
0
        public string UseCompanionTreasure(TreasureItem treasure)
        {
            // we used a treasure item, remove it from inventory
            Inventory.Remove(treasure);
            string   message  = "";
            PartyDie partyDie = new PartyDie();

            partyDie.IsFromTreasureOrHeroAbility = true;

            switch (treasure.TreasureType)
            {
            case TreasureType.VorpalSword:
                message            = "You used your vorpal sword and added a fighter to your party. ";
                partyDie.Companion = CompanionType.Fighter;
                break;

            case TreasureType.Talisman:
                message            = "You used your talisman and added a cleric to your party. ";
                partyDie.Companion = CompanionType.Cleric;
                break;

            case TreasureType.ScepterOfPower:
                message            = "You used your scepter of power and added a mage to your party. ";
                partyDie.Companion = CompanionType.Mage;
                break;

            case TreasureType.ThievesTools:
                message            = "You used your thieves tools and added a thief to your party. ";
                partyDie.Companion = CompanionType.Thief;
                break;

            case TreasureType.Scroll:
                message            = "You used your scroll treasure item and added a scroll to your party. ";
                partyDie.Companion = CompanionType.Scroll;
                break;
            }
// insert the new companion in the beginning of the party dice
            PartyDice.Insert(0, partyDie);
            return(message);
        }
Example #8
0
        public override string ActivateLevelOneUltimate(CompanionType?companion = null, Dungeon dungeon = null)
        {
            if (IsExhausted)
            {
                return("Your hero is exhausted and cannot use the ultimate ability in this dungeon delve. ");
            }
            if (Experience > 4)
            {
                return("You are a Battlemage now. To use your new ultimate ability say Arcane Fury. ");
            }
            // lets check if valid companion is provided
            if (companion == null || companion.Value != CompanionType.Fighter && companion.Value != CompanionType.Mage)
            {
                return("Invalid action. To use your hero as a fighter say arcane blade fighter. To use your hero as a mage, say arcane blade mage. ");
            }

            PartyDie die = new PartyDie();

            die.Companion = companion.Value;
            die.IsFromTreasureOrHeroAbility = true;
            PartyDice.Insert(0, die);
            IsExhausted = true;
            return($"You used your Arcane Blade. Your hero has been added to your party as a {companion.Value}. ");
        }
        public override string ActivateLevelTwoUltimate(Dungeon dungeon)
        {
            if (IsExhausted)
            {
                return("Your hero is exhausted and cannot use the ultimate ability in this dungeon delve. ");
            }

            if (!IsLeveledUp)
            {
                return("Your hero is still a Half-Goblin and cannot use the Pull Rank ultimate. Try saying Plea For Help instead. ");
            }
            // check how many goblins we have
            int goblinCount = dungeon.DungeonDice.Count(d => d.DungeonDieType == DungeonDieType.Goblin);

            if (goblinCount < 1)
            {
                return("There are no goblins in this level. Use Pull Rank when you encounter goblins. ");
            }
            // goblins are present let's remove up to two and add  up to two thieves to our party
            int    goblinsToTransform = goblinCount > 2 ? 2 : goblinCount;
            string plural             = goblinsToTransform == 2 ? "s" : "";
            string pluralThief        = goblinsToTransform == 2 ? "thieves" : "a thief";

            for (int i = 0; i < goblinsToTransform; i++)
            {
                dungeon.DungeonDice.RemoveFirst(d => d.DungeonDieType == DungeonDieType.Goblin);
                PartyDie thief = new PartyDie();
                thief.Companion     = CompanionType.Thief;
                thief.IsFromMonster = true;
                PartyDice.Insert(0, thief);
            }


            IsExhausted = true;
            return($"You Pull Rank and transformed {goblinsToTransform} goblin{plural} into {pluralThief}, which will be discarded when you complete this level. ");
        }
Example #10
0
        public override string ActivateLevelOneUltimate(CompanionType?companion = null, Dungeon dungeon = null)
        {
            if (IsExhausted)
            {
                return("Your hero is exhausted and cannot use the ultimate ability in this dungeon delve. ");
            }
            if (IsLeveledUp)
            {
                return("You are a Paladin now. To use your new ultimate ability say Divine Intervention. ");
            }
            // lets check if valid companion is provided
            if (companion == null || companion.Value != CompanionType.Fighter && companion.Value != CompanionType.Cleric)
            {
                return("Invalid action. To use your hero as a fighter say Holy Strike fighter. To use your hero as a cleric, say Holy Strike cleric. ");
            }

            PartyDie die = new PartyDie();

            die.Companion = companion.Value;
            die.IsFromTreasureOrHeroAbility = true;
            PartyDice.Insert(0, die);
            IsExhausted = true;
            return($"You used Holy Strike. Your hero has been added to your party as a {companion.Value}. ");
        }