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 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. "); }
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); }
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. "); }
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}. "); }