コード例 #1
0
        public void GetLeaderBonusTest(GangerType type, GameType gameType, bool hasWon, bool isAttacker, int expectedValue)
        {
            var ganger = new Ganger()
            {
                GangerType = type
            };

            var result = _experienceService.GetLeaderBonus(ganger, gameType, hasWon, isAttacker);

            Assert.AreEqual(result, expectedValue);
        }
コード例 #2
0
        /// <summary>
        /// Create a ganger with default stats for the specified type
        /// </summary>
        /// <param name="name">Ganger name</param>
        /// <param name="type">Ganger type</param>
        /// <returns>The ganger</returns>
        public Ganger CreateGanger(string name, GangerType type)
        {
            switch (type)
            {
            case GangerType.Leader:
                return(CreateLeader(name));

            case GangerType.Heavy:
                return(CreateHeavy(name));

            case GangerType.Ganger:
                return(CreateGanger(name));

            case GangerType.Juve:
                return(CreateJuve(name));

            default:
                throw new HivemindException($"Invalid GangerType provided: ${type}");
            }
        }
コード例 #3
0
        public void CreateGangerTest(GangerType type, int move, int ws, int bs, int strength, int toughness, int wounds, int initiative, int attack, int leadership, int cost, int startingExperience, GangerTitle title)
        {
            _mockDiceRoller.Setup(m => m.RollDie()).Returns(0);
            var ganger = _gangerManager.CreateGanger("Test Ganger", type);

            Assert.NotNull(ganger);
            Assert.AreEqual(type, ganger.GangerType);
            Assert.AreEqual(move, ganger.Move);
            Assert.AreEqual(ws, ganger.WeaponSkill);
            Assert.AreEqual(bs, ganger.BallisticSkill);
            Assert.AreEqual(strength, ganger.Strength);
            Assert.AreEqual(toughness, ganger.Toughness);
            Assert.AreEqual(wounds, ganger.Wounds);
            Assert.AreEqual(initiative, ganger.Initiative);
            Assert.AreEqual(attack, ganger.Attack);
            Assert.AreEqual(leadership, ganger.Leadership);
            Assert.AreEqual(cost, ganger.Cost);
            Assert.AreEqual(startingExperience, ganger.Experience);
            Assert.AreEqual(title, ganger.Title);
            Assert.IsTrue(ganger.Active);
        }
コード例 #4
0
        public void GetCostTest(GangerType gangerType, int[] weaponCosts, int expectedCost)
        {
            var ganger = new Ganger()
            {
                GangerType = gangerType,
            };

            var weapons = new List <GangerWeapon>();

            foreach (var cost in weaponCosts)
            {
                weapons.Add(new GangerWeapon()
                {
                    Cost = cost
                });
            }

            ganger.Weapons = weapons;
            ganger.GetCost();

            Assert.AreEqual(expectedCost, ganger.Cost);
        }
コード例 #5
0
        private IEnumerable <SkillType> GetGangSkill(GangerType type, GangHouse house)
        {
            SkillType[] skillList = new SkillType[0];
            switch (house)
            {
            case GangHouse.CAWDOR:
                switch (type)
                {
                case GangerType.JUVE:
                    skillList = new[] { SkillType.COMBAT, SkillType.FEROCITY };
                    break;

                case GangerType.GANGER:
                    skillList = new[] { SkillType.COMBAT, SkillType.FEROCITY, SkillType.AGILITY };
                    break;

                case GangerType.HEAVY:
                    skillList = new[] { SkillType.FEROCITY, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.LEADER:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.FEROCITY, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.TECHNO };
                    break;
                }
                break;

            case GangHouse.ESCHER:
                switch (type)
                {
                case GangerType.JUVE:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT };
                    break;

                case GangerType.GANGER:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.STEALTH };
                    break;

                case GangerType.HEAVY:
                    skillList = new[] { SkillType.AGILITY, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.LEADER:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.FEROCITY, SkillType.SHOOTING, SkillType.STEALTH, SkillType.TECHNO };
                    break;
                }
                break;

            case GangHouse.DELAQUE:
                switch (type)
                {
                case GangerType.JUVE:
                    skillList = new[] { SkillType.SHOOTING, SkillType.STEALTH };
                    break;

                case GangerType.GANGER:
                    skillList = new[] { SkillType.AGILITY, SkillType.SHOOTING, SkillType.STEALTH };
                    break;

                case GangerType.HEAVY:
                    skillList = new[] { SkillType.MUSCLE, SkillType.STEALTH, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.LEADER:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.FEROCITY, SkillType.SHOOTING, SkillType.STEALTH, SkillType.TECHNO };
                    break;
                }
                break;

            case GangHouse.GOLIATH:
                switch (type)
                {
                case GangerType.JUVE:
                    skillList = new[] { SkillType.FEROCITY, SkillType.MUSCLE };
                    break;

                case GangerType.GANGER:
                    skillList = new[] { SkillType.FEROCITY, SkillType.MUSCLE, SkillType.COMBAT };
                    break;

                case GangerType.HEAVY:
                    skillList = new[] { SkillType.MUSCLE, SkillType.COMBAT, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.LEADER:
                    skillList = new[] { SkillType.COMBAT, SkillType.FEROCITY, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.STEALTH, SkillType.TECHNO };
                    break;
                }
                break;

            case GangHouse.ORLOCK:
                switch (type)
                {
                case GangerType.JUVE:
                    skillList = new[] { SkillType.FEROCITY, SkillType.SHOOTING };
                    break;

                case GangerType.GANGER:
                    skillList = new[] { SkillType.COMBAT, SkillType.FEROCITY, SkillType.SHOOTING };
                    break;

                case GangerType.HEAVY:
                    skillList = new[] { SkillType.COMBAT, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.LEADER:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.FEROCITY, SkillType.SHOOTING, SkillType.STEALTH, SkillType.TECHNO };
                    break;
                }
                break;

            case GangHouse.VAN_SAAR:
                switch (type)
                {
                case GangerType.JUVE:
                    skillList = new[] { SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.GANGER:
                    skillList = new[] { SkillType.COMBAT, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.HEAVY:
                    skillList = new[] { SkillType.COMBAT, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.TECHNO };
                    break;

                case GangerType.LEADER:
                    skillList = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.FEROCITY, SkillType.SHOOTING, SkillType.STEALTH, SkillType.TECHNO };
                    break;
                }
                break;

            default:
                HivemindException.NoSuchGangHouse();
                break;
            }
            return(skillList);
        }
コード例 #6
0
        /// <summary>
        /// Get a gang skill for advance rolls.
        /// </summary>
        /// <param name="type">Ganger type</param>
        /// <param name="house">Gang house</param>
        /// <returns>List of skill types to choose from.</returns>
        public IEnumerable <SkillType> GetGangSkill(GangerType type, GangHouse house)
        {
            SkillType[] skillList = new SkillType[0];
            switch (house)
            {
            case GangHouse.Cawdor:
                switch (type)
                {
                case GangerType.Juve:
                    skillList = new[] { SkillType.Combat, SkillType.Ferocity };
                    break;

                case GangerType.Ganger:
                    skillList = new[] { SkillType.Combat, SkillType.Ferocity, SkillType.Agility };
                    break;

                case GangerType.Heavy:
                    skillList = new[] { SkillType.Ferocity, SkillType.Muscle, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Leader:
                    skillList = new[] { SkillType.Agility, SkillType.Combat, SkillType.Ferocity, SkillType.Muscle, SkillType.Shooting, SkillType.Techno };
                    break;
                }

                break;

            case GangHouse.Escher:
                switch (type)
                {
                case GangerType.Juve:
                    skillList = new[] { SkillType.Agility, SkillType.Combat };
                    break;

                case GangerType.Ganger:
                    skillList = new[] { SkillType.Agility, SkillType.Combat, SkillType.Stealth };
                    break;

                case GangerType.Heavy:
                    skillList = new[] { SkillType.Agility, SkillType.Muscle, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Leader:
                    skillList = new[] { SkillType.Agility, SkillType.Combat, SkillType.Ferocity, SkillType.Shooting, SkillType.Stealth, SkillType.Techno };
                    break;
                }

                break;

            case GangHouse.Delaque:
                switch (type)
                {
                case GangerType.Juve:
                    skillList = new[] { SkillType.Shooting, SkillType.Stealth };
                    break;

                case GangerType.Ganger:
                    skillList = new[] { SkillType.Agility, SkillType.Shooting, SkillType.Stealth };
                    break;

                case GangerType.Heavy:
                    skillList = new[] { SkillType.Muscle, SkillType.Stealth, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Leader:
                    skillList = new[] { SkillType.Agility, SkillType.Combat, SkillType.Ferocity, SkillType.Shooting, SkillType.Stealth, SkillType.Techno };
                    break;
                }

                break;

            case GangHouse.Goliath:
                switch (type)
                {
                case GangerType.Juve:
                    skillList = new[] { SkillType.Ferocity, SkillType.Muscle };
                    break;

                case GangerType.Ganger:
                    skillList = new[] { SkillType.Ferocity, SkillType.Muscle, SkillType.Combat };
                    break;

                case GangerType.Heavy:
                    skillList = new[] { SkillType.Muscle, SkillType.Combat, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Leader:
                    skillList = new[] { SkillType.Combat, SkillType.Ferocity, SkillType.Muscle, SkillType.Shooting, SkillType.Stealth, SkillType.Techno };
                    break;
                }

                break;

            case GangHouse.Orlock:
                switch (type)
                {
                case GangerType.Juve:
                    skillList = new[] { SkillType.Ferocity, SkillType.Shooting };
                    break;

                case GangerType.Ganger:
                    skillList = new[] { SkillType.Combat, SkillType.Ferocity, SkillType.Shooting };
                    break;

                case GangerType.Heavy:
                    skillList = new[] { SkillType.Combat, SkillType.Muscle, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Leader:
                    skillList = new[] { SkillType.Agility, SkillType.Combat, SkillType.Ferocity, SkillType.Shooting, SkillType.Stealth, SkillType.Techno };
                    break;
                }

                break;

            case GangHouse.VanSaar:
                switch (type)
                {
                case GangerType.Juve:
                    skillList = new[] { SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Ganger:
                    skillList = new[] { SkillType.Combat, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Heavy:
                    skillList = new[] { SkillType.Combat, SkillType.Muscle, SkillType.Shooting, SkillType.Techno };
                    break;

                case GangerType.Leader:
                    skillList = new[] { SkillType.Agility, SkillType.Combat, SkillType.Ferocity, SkillType.Shooting, SkillType.Stealth, SkillType.Techno };
                    break;
                }

                break;

            default:
                HivemindException.NoSuchGangHouse();
                break;
            }

            return(skillList);
        }
コード例 #7
0
        public void GetGangSkillTest(GangerType gangerType, GangHouse gangHouse, IEnumerable <SkillType> expectedSkillList)
        {
            var skillList = _experienceService.GetGangSkill(gangerType, gangHouse);

            Assert.AreEqual(expectedSkillList, skillList);
        }