Пример #1
0
        public void AgeCorrectType()
        {
            //Arrange
            var Age = new Halfling().GetAge();

            // Assert
            Assert.IsType(typeof(int), Age);
        }
Пример #2
0
        public void HalflingAlignmentIsCorrectType()
        {
            // Arrange
            var Alignment = new Halfling().GetAlignment();

            //Assert
            Assert.IsType(typeof(string), Alignment);
        }
Пример #3
0
        public void AgeNotNull()
        {
            //Arrange
            var Age = new Halfling().GetAge();

            // Assert
            Assert.NotNull(Age);
        }
Пример #4
0
        public void SizeIsNotNull()
        {
            // Arrange
            var Size = new Halfling().GetSize();

            // Assert
            Assert.NotNull(Size);
        }
Пример #5
0
        public void HalflingAlignmentNotNull()
        {
            // Arrange
            var Alignment = new Halfling().GetAlignment();

            //Assert
            Assert.NotNull(Alignment);
        }
Пример #6
0
        public void SpeedIsCorrectType()
        {
            // Arrange
            var Size = new Halfling().GetSpeed();

            // Assert
            Assert.IsType(typeof(int), Size);
        }
Пример #7
0
        public void SizeIsCorrectType()
        {
            // Arrange
            var Size = new Halfling().GetSize();

            // Assert
            Assert.IsType(typeof(string), Size);
        }
Пример #8
0
        public void AgeInHalflingRange()
        {
            //Arrange
            var Age = new Halfling().GetAge();

            // Assert
            Assert.InRange(Age, 20, 250);
        }
Пример #9
0
        public void HalflingLanguageIncludesHalfling()
        {
            // Arrange
            var Lang = new Halfling().GetLanguages();

            // Assert
            Assert.Contains("Halfling", Lang);
        }
Пример #10
0
        public void CHAAbilityScoreIncreaseEquals1()
        {
            // Arrange
            var Scores = new Halfling().GetAbilityScoreIncrease();
            // Act
            var CHAValue = Scores["CHA"];

            // Assert
            Assert.Equal(CHAValue, 1);
        }
Пример #11
0
        public void DEXAbilityScoreIncreaseEquals1()
        {
            // Arrange
            var Scores = new Halfling().GetAbilityScoreIncrease();
            // Act
            var DEXValue = Scores["DEX"];

            // Assert
            Assert.Equal(DEXValue, 2);
        }
Пример #12
0
        public void CHAAbilityScoreNotNull()
        {
            // Arrange
            var Scores = new Halfling().GetAbilityScoreIncrease();
            // Act
            var CHA = Scores.TryGetValue("CHA", out var CHAResult);

            // Assert
            Assert.True(CHA);
        }
Пример #13
0
        public void DEXAbilityScoreNotNull()
        {
            // Arrange
            var Scores = new Halfling().GetAbilityScoreIncrease();
            // Act
            var DEX = Scores.TryGetValue("DEX", out var DEXResult);

            // Assert
            Assert.True(DEX);
        }
Пример #14
0
        public void STRAbilityIsNull()
        {
            // Arrange
            var Scores = new Halfling().GetAbilityScoreIncrease();
            // Act
            var STR = Scores.TryGetValue("STR", out var STRResult);

            // Assert
            Assert.False(STR);
        }
Пример #15
0
        public static SlayerRecruit MenAtArms()
        {
            var g = (Dice.HalfChance() ? EGender.Male : EGender.Female);
            var n = (Dice.HalfChance() ? Gnome.Generate(g) : Halfling.Generate(g));

            return(new SlayerRecruit
            {
                Name = n,
                Type = ERecruitType.MenAtArms
            });
        }
Пример #16
0
        public void HalflingLanguageAddedCorrectly()
        {
            // Arrange
            var Lang = new Halfling().GetLanguages();
            // Act
            var actual = Lang.Count;

            // Assert
            // Halflings know two languages at level 1
            // One being Common, the other random
            Assert.Equal(2, actual);
        }
Пример #17
0
        public static string displayRace5e(RACE R)
        {
            List <string> Races = collectRaces(DND5e);

            int irace = (int)R;

            string subRace = "";

            if (R == DRAGONBORN)
            {
                subRace = DragonBorn.getSubRace();
            }
            if (R == DWARF)
            {
                subRace = Dwarf.getSubRace();
            }
            if (R == ELF)
            {
                subRace = Elf.getSubRace();
            }
            if (R == GNOME)
            {
                subRace = Gnome.getSubRace();
            }
            if (R == HALFLING)
            {
                subRace = Halfling.getSubRace();
            }

            if (subRace != "")
            {
                frmref.RaceOutput.Text = Races[irace - 1] + "- " + subRace;
            }
            else
            {
                frmref.RaceOutput.Text = Races[irace - 1];
            }

            return(subRace);
        }
Пример #18
0
        public static void NewRace(Character character)
        {
            switch (character.ChosenRace)
            {
            case "Aasimar(Protector)":
                Aasimar.Protector(character);
                break;

            case "Aasimar(Scourge)":
                Aasimar.Scourge(character);
                break;

            case "Aasimar(Fallen)":
                Aasimar.Fallen(character);
                break;

            case "Cambion":
                Cambion.Base(character);
                break;

            case "Changeling":
                Changeling.Base(character);
                break;

            case "Dhampir":
                Dhampir.Base(character);
                break;

            case "Dragonborn":
                Dragonborn.Base(character);
                break;

            case "Hill Dwarf":
                Dwarf.Hill(character);
                break;

            case "Mountain Dwarf":
                Dwarf.Mountain(character);
                break;

            case "Avariel":
                Elf.Avariel(character);
                break;

            case "Drow":
                Elf.Drow(character);
                break;

            case "Eladrin":
                Elf.Eladrin(character);
                break;

            case "Moon Elf":
                Elf.Moon(character);
                break;

            case "Sea Elf":
                Elf.Sea(character);
                break;

            case "Shadar-Kai":
                Elf.ShadarKai(character);
                break;

            case "High Elf":
                Elf.High(character);
                break;

            case "Wild Elf":
                Elf.Wild(character);
                break;

            case "Wood Elf":
                Elf.Wood(character);
                break;

            case "Forest Gnome":
                Gnome.Forest(character);
                break;

            case "Rock Gnome":
                Gnome.Rock(character);
                break;

            case "Goliath":
                Goliath.Base(character);
                break;

            case "Half-Elf":
                HalfElf.Base(character);
                break;

            case "Half-Orc":
                HalfOrc.Base(character);
                break;

            case "Lightfoot Halfling":
                Halfling.Lightfoot(character);
                break;

            case "Stout Halfling":
                Halfling.Stout(character);
                break;

            case "Human":
                Human.Base(character);
                break;

            case "Variant Human":
                Human.Variant(character);
                break;

            case "Minotaur":
                Minotaur.Base(character);
                break;

            case "Shade":
                Shade.Base(character);
                break;

            case "Tiefling":
                Tiefling.Base(character);
                break;

            case "Feral Tiefling":
                Tiefling.Feral(character);
                break;

            case "Demigod":
                Demigod.Base(character);
                break;
            }
        }