private GangerLevelUpReport DoAdvanceRoll(Ganger ganger, GangHouse house) { GangerStatistics stat = 0; int roll = DiceRoller.RollDice(6, 2); int statToIncrease = DiceRoller.RollDie(); switch (roll) { case 2: case 12: return(new GangerLevelUpReport() { Description = "Pick any skill", GangerName = ganger.Name, NewSkillFromCategory = new[] { SkillType.AGILITY, SkillType.COMBAT, SkillType.FEROCITY, SkillType.MUSCLE, SkillType.SHOOTING, SkillType.STEALTH, SkillType.TECHNO } }); case 3: case 4: case 10: case 11: return(new GangerLevelUpReport() { Description = "New gang skill", GangerName = ganger.Name, NewSkillFromCategory = GetGangSkill(ganger.GangerType, house) }); case 5: stat = (statToIncrease <= 3) ? GangerStatistics.STRENGTH : GangerStatistics.ATTACK; _gangerFactory.IncreaseStat(ganger, stat, null); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, NewSkillFromCategory = null }); case 6: case 8: stat = (statToIncrease <= 3) ? GangerStatistics.WEAPON_SKILL : GangerStatistics.BALLISTIC_SKILL; _gangerFactory.IncreaseStat(ganger, stat, null); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, NewSkillFromCategory = null }); case 7: stat = (statToIncrease <= 3) ? GangerStatistics.INITIATIVE : GangerStatistics.LEADERSHIP; _gangerFactory.IncreaseStat(ganger, stat, null); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, NewSkillFromCategory = null }); case 9: stat = (statToIncrease <= 3) ? GangerStatistics.WOUNDS : GangerStatistics.ATTACK; _gangerFactory.IncreaseStat(ganger, stat, null); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, NewSkillFromCategory = null }); } return(null); }
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); }
/// <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); }
/// <summary> /// Do an advance roll /// </summary> /// <param name="ganger">Ganger advancing</param> /// <param name="house">Ganger's house</param> /// <returns>Ganger level up report</returns> public GangerLevelUpReport DoAdvanceRoll(Ganger ganger, GangHouse house) { GangerStatistics stat = 0; int roll = _diceRoller.RollDice(6, 2); int statToIncrease = _diceRoller.RollDie(); switch (roll) { case 2: case 12: var advancementId = _gangerManager.RegisterGangerAdvancement(ganger.GangerId); return(new GangerLevelUpReport() { Description = "Pick any skill", GangerName = ganger.Name, GangerId = ganger.GangerId, NewSkillFromCategory = new[] { SkillType.Agility, SkillType.Combat, SkillType.Ferocity, SkillType.Muscle, SkillType.Shooting, SkillType.Stealth, SkillType.Techno }, AdvancementId = advancementId, }); case 3: case 4: case 10: case 11: advancementId = _gangerManager.RegisterGangerAdvancement(ganger.GangerId); return(new GangerLevelUpReport() { Description = "New gang skill", GangerName = ganger.Name, GangerId = ganger.GangerId, NewSkillFromCategory = GetGangSkill(ganger.GangerType, house), AdvancementId = advancementId, }); case 5: stat = (statToIncrease <= 3) ? GangerStatistics.Strength : GangerStatistics.Attack; _gangerManager.IncreaseStat(ganger, stat); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, GangerId = ganger.GangerId, NewSkillFromCategory = null, }); case 6: case 8: stat = (statToIncrease <= 3) ? GangerStatistics.WeaponSkill : GangerStatistics.BallisticSkill; _gangerManager.IncreaseStat(ganger, stat); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, GangerId = ganger.GangerId, NewSkillFromCategory = null, }); case 7: stat = (statToIncrease <= 3) ? GangerStatistics.Initiative : GangerStatistics.Leadership; _gangerManager.IncreaseStat(ganger, stat); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, GangerId = ganger.GangerId, NewSkillFromCategory = null, }); case 9: stat = (statToIncrease <= 3) ? GangerStatistics.Wounds : GangerStatistics.Attack; _gangerManager.IncreaseStat(ganger, stat); return(new GangerLevelUpReport() { Description = Enum.GetName(typeof(GangerStatistics), stat) + " increased", GangerName = ganger.Name, GangerId = ganger.GangerId, NewSkillFromCategory = null, }); } return(null); }
public void GetGangSkillTest(GangerType gangerType, GangHouse gangHouse, IEnumerable <SkillType> expectedSkillList) { var skillList = _experienceService.GetGangSkill(gangerType, gangHouse); Assert.AreEqual(expectedSkillList, skillList); }