public void TestGiantBat() { Monster giantBat = AllMonsters.GetByKind("Giant Bat"); Assert.AreEqual(13, giantBat.ArmorClass); Assert.AreEqual(22, giantBat.maxHitPoints); Assert.AreEqual(CreatureSize.Large, giantBat.creatureSize); Assert.AreEqual(CreatureKinds.Beast, giantBat.kind); Assert.AreEqual(Alignment.Unaligned, giantBat.Alignment); Assert.AreEqual("unaligned", giantBat.alignmentStr); Assert.AreEqual(10, giantBat.baseWalkingSpeed); Assert.AreEqual(60, giantBat.flyingSpeed); Assert.AreEqual(15, giantBat.baseStrength); Assert.AreEqual(2, giantBat.strengthMod); Assert.AreEqual(16, giantBat.baseDexterity); Assert.AreEqual(3, giantBat.dexterityMod); Assert.AreEqual(11, giantBat.baseConstitution); Assert.AreEqual(0, giantBat.constitutionMod); Assert.AreEqual(2, giantBat.baseIntelligence); Assert.AreEqual(-4, giantBat.intelligenceMod); Assert.AreEqual(12, giantBat.baseWisdom); Assert.AreEqual(1, giantBat.wisdomMod); Assert.AreEqual(6, giantBat.baseCharisma); Assert.AreEqual(-2, giantBat.charismaMod); Assert.AreEqual(0, giantBat.darkvisionRadius); Assert.AreEqual(60, giantBat.blindsightRadius); Assert.AreEqual(11, giantBat.passivePerception); Assert.AreEqual(1 / 4, giantBat.challengeRating); Assert.AreEqual(DamageType.None, giantBat.damageImmunities); Assert.AreEqual(Conditions.None, giantBat.conditionImmunities); }
public void TestGiantApe() { Monster giantApe = AllMonsters.GetByKind("Giant Ape"); Assert.AreEqual(12, giantApe.ArmorClass); Assert.AreEqual(157, giantApe.maxHitPoints); Assert.AreEqual(CreatureSize.Huge, giantApe.creatureSize); Assert.AreEqual(CreatureKinds.Beast, giantApe.kind); Assert.AreEqual(Alignment.Unaligned, giantApe.Alignment); Assert.AreEqual("unaligned", giantApe.alignmentStr); Assert.AreEqual(40, giantApe.baseWalkingSpeed); Assert.AreEqual(0, giantApe.flyingSpeed); Assert.AreEqual(40, giantApe.climbingSpeed); Assert.AreEqual(23, giantApe.baseStrength); Assert.AreEqual(6, giantApe.strengthMod); Assert.AreEqual(14, giantApe.baseDexterity); Assert.AreEqual(2, giantApe.dexterityMod); Assert.AreEqual(18, giantApe.baseConstitution); Assert.AreEqual(4, giantApe.constitutionMod); Assert.AreEqual(7, giantApe.baseIntelligence); Assert.AreEqual(-2, giantApe.intelligenceMod); Assert.AreEqual(12, giantApe.baseWisdom); Assert.AreEqual(1, giantApe.wisdomMod); Assert.AreEqual(7, giantApe.baseCharisma); Assert.AreEqual(-2, giantApe.charismaMod); Assert.AreEqual(0, giantApe.darkvisionRadius); Assert.AreEqual(0, giantApe.blindsightRadius); Assert.AreEqual(14, giantApe.passivePerception); Assert.AreEqual(9, giantApe.GetOverridingSkillMod(Skills.athletics)); Assert.AreEqual(4, giantApe.GetOverridingSkillMod(Skills.perception)); Assert.AreEqual(7, giantApe.challengeRating); }
public void TestSkeleton() { Monster skeleton = AllMonsters.GetByKind("Skeleton"); Assert.AreEqual(13, skeleton.ArmorClass); Assert.AreEqual(13, skeleton.maxHitPoints); Assert.AreEqual(CreatureSize.Medium, skeleton.creatureSize); Assert.AreEqual(CreatureKinds.Undead, skeleton.kind); Assert.AreEqual(Alignment.LawfulEvil, skeleton.Alignment); Assert.AreEqual("lawful evil", skeleton.alignmentStr); Assert.AreEqual(30, skeleton.baseWalkingSpeed); Assert.AreEqual(10, skeleton.baseStrength); Assert.AreEqual(0, skeleton.strengthMod); Assert.AreEqual(14, skeleton.baseDexterity); Assert.AreEqual(2, skeleton.dexterityMod); Assert.AreEqual(15, skeleton.baseConstitution); Assert.AreEqual(2, skeleton.constitutionMod); Assert.AreEqual(6, skeleton.baseIntelligence); Assert.AreEqual(-2, skeleton.intelligenceMod); Assert.AreEqual(8, skeleton.baseWisdom); Assert.AreEqual(-1, skeleton.wisdomMod); Assert.AreEqual(5, skeleton.baseCharisma); Assert.AreEqual(-3, skeleton.charismaMod); Assert.AreEqual(60, skeleton.darkvisionRadius); Assert.AreEqual(9, skeleton.passivePerception); Assert.AreEqual(1 / 4, skeleton.challengeRating); Assert.AreEqual(DamageType.Poison, skeleton.damageImmunities); Assert.AreEqual(Conditions.Fatigued, skeleton.conditionImmunities); }
public void AddSavingThrowFor(Ability savingThrowAbility, InGameCreature inGameCreature) { Monster creature = AllMonsters.GetByKind(inGameCreature.Kind); if (creature != null) { VantageKind vantage = creature.GetVantage(DiceRollType.SavingThrow, savingThrowAbility); double modifier = creature.GetSavingThrowModifier(savingThrowAbility); AddDice(1, 20, inGameCreature.Name, modifier, vantage, InGameCreature.GetUniversalIndex(inGameCreature.Index)); } }
public void TestDruidWildSenses() { Character druid = GetTestDruid(); druid.proficientSkills = Skills.athletics; Assert.AreEqual(0, druid.blindsightRadius); druid.WildShape = AllMonsters.GetByKind("Giant Bat"); Assert.AreEqual(60, druid.blindsightRadius); Assert.AreEqual(11, druid.PassivePerception); }
public void TestDruidWildShapeSkillChecks() { Character druid = GetTestDruid(); druid.proficientSkills = Skills.athletics; Assert.AreEqual(1, druid.strengthMod); Assert.AreEqual(3, druid.skillModAthletics); druid.WildShape = AllMonsters.GetByKind("Giant Ape"); Assert.AreEqual(6, druid.strengthMod); Assert.AreEqual(9, druid.skillModAthletics); }
public void TestDruidWildShapeAbilityScoresAndBonuses() { Character druid = GetTestDruid(); druid.proficiencyBonus = 0; Assert.AreEqual(12, druid.Strength); Assert.AreEqual(10, druid.PassivePerception); Assert.AreEqual(11, druid.Dexterity); Assert.AreEqual(9, druid.Constitution); Assert.AreEqual(-1, druid.constitutionMod); Assert.AreEqual(2, druid.intelligenceMod); druid.WildShape = AllMonsters.GetByKind("Giant Badger"); Assert.AreEqual(13, druid.Strength); Assert.AreEqual(10, druid.Dexterity); Assert.AreEqual(15, druid.Constitution); Assert.AreEqual(11, druid.PassivePerception); Assert.AreEqual(2, druid.constitutionMod); Assert.AreEqual(2, druid.intelligenceMod); }
public static void GetBattleMenu(Player player, AllMonsters monster) { bool roomDone = false; do { Console.WriteLine("Choose Your Action:\n" + "1) Attack\n" + "2) Check Stats\n" + "3) Examine Monster\n" + "X) Flee from the Room\n"); ConsoleKey userBattleChoice = Console.ReadKey().Key; Console.Clear(); switch (userBattleChoice) { case ConsoleKey.D1: case ConsoleKey.NumPad1: Combat.DoCombat(player, monster); if (monster.Character.Life < 1) { roomDone = true; Console.Clear(); } else if (monster.WillFlee()) { Combat.DoCombat(player, monster, true); //add that number thing roomDone = true; Console.Clear(); } else { Combat.DoCombat(monster, player); } break; case ConsoleKey.D2: case ConsoleKey.NumPad2: Console.WriteLine(player.GetInfo()); break; case ConsoleKey.D3: case ConsoleKey.NumPad3: Console.WriteLine(monster.GetInfo()); break; case ConsoleKey.X: roomDone = true; Console.WriteLine("Fleeing for your pathetic life, you make a dash for the door!\n"); Console.WriteLine($"{monster} tries to attack while your back is turned!"); Combat.DoCombat(monster, player, true); break; default: Console.WriteLine("Tis not an option, my dear. Try again."); break; } } while (!roomDone); }