public Item CreateItem(string name) { { Item item; switch (name) { case "BroadAxe": item = new BroadAxe(); break; case "Flail": item = new Flail(); break; case "Scepter": item = new Scepter(); break; case "ShortSword": item = new ShortSword(); break; case "Occulus": item = new Occulus(); break; case "BoneShield": item = new BoneShield(); break; default: throw new ArgumentException($"invalid item \"{name}\""); } return(item); } }
public static PlayerClass ClericClass() { var cleric = new PlayerClass { Name = "Cleric", IsBaseClass = true, ExperienceModifier = 2000, HelpText = new Help(), Skills = new List <Skill>(), ReclassOptions = new List <PlayerClass>(), MaxHpGain = 15, MinHpGain = 10, MaxManaGain = 15, MinManaGain = 10, MaxEnduranceGain = 15, MinEnduranceGain = 11, StatBonusStr = 1, StatBonusCon = 1 }; #region Lvl 1 skills var blunt = BluntWeapons.BluntWeaponsAb(); blunt.Learned = true; blunt.Proficiency = 25; cleric.Skills.Add(blunt); var causeLight = CauseLight.causeLightAb(); causeLight.Learned = true; causeLight.Proficiency = 50; cleric.Skills.Add(causeLight); #endregion #region Lvl 2 skills var cureLight = CureLight.CureLightAb(); cureLight.Learned = true; cureLight.Proficiency = 50; cleric.Skills.Add(cureLight); #endregion #region Lvl 3 skills var detectInvis = DetectInvis.DetectInvisAb(); detectInvis.Learned = true; detectInvis.Proficiency = 50; cleric.Skills.Add(detectInvis); #endregion #region Lvl 5 skills var armour = Armour.ArmourAb(); armour.Learned = true; armour.LevelObtained = 1; armour.Proficiency = 50; cleric.Skills.Add(armour); var flail = Flail.FlailAb(); flail.Learned = true; flail.LevelObtained = 1; flail.Proficiency = 50; cleric.Skills.Add(flail); var mount = Mount.MountAb(); mount.Learned = true; mount.LevelObtained = 1; mount.Proficiency = 50; cleric.Skills.Add(mount); #endregion #region Lvl 6 skills var cureBlind = CureBlindness.CureBlindnessAb(); cureBlind.Learned = true; cureBlind.LevelObtained = 1; cureBlind.Proficiency = 50; cleric.Skills.Add(cureBlind); #endregion cleric.ReclassOptions.Add(Ranger.RangerClass()); return(cleric); }
public static void Weapon() { string prefixName; int prefixValue; string prefixStat; (prefixName, prefixStat, prefixValue) = Prefix.Generate("Weapon"); string suffixName; string suffixStat; int suffixValue; (suffixName, suffixStat, suffixValue) = Suffix.Generate("Weapon"); int _weaponType = random.Next(1, 27); //26 weapons switch (_weaponType) { case 1: Axe axe = new Axe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); // Console.WriteLine("prefixName: " + prefixName + ", prefixStat: " + prefixStat + ", prefixValue: " + prefixValue + ", suffixName: " + suffixName + ", suffixStat: " + suffixStat + ", suffixVallue: " + suffixValue); axe.WeaponAddToInventory(); break; case 2: BastardSword bastardSword = new BastardSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); bastardSword.WeaponAddToInventory(); break; case 3: BattleAxe battleAxe = new BattleAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); battleAxe.WeaponAddToInventory(); break; case 4: Blade blade = new Blade(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); blade.WeaponAddToInventory(); break; case 5: BroadAxe broadAxe = new BroadAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); broadAxe.WeaponAddToInventory(); break; case 6: BroadSword broadSword = new BroadSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); broadSword.WeaponAddToInventory(); break; case 7: Claymore claymore = new Claymore(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); claymore.WeaponAddToInventory(); break; case 8: Club club = new Club(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); club.WeaponAddToInventory(); break; case 9: Dagger dagger = new Dagger(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); dagger.WeaponAddToInventory(); break; case 10: Falchion falchion = new Falchion(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); falchion.WeaponAddToInventory(); break; case 11: Flail flail = new Flail(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); flail.WeaponAddToInventory(); break; case 12: GreatAxe greatAxe = new GreatAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); greatAxe.WeaponAddToInventory(); break; case 13: GreatSword greatSword = new GreatSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); greatSword.WeaponAddToInventory(); break; case 14: LargeAxe largeAxe = new LargeAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); largeAxe.WeaponAddToInventory(); break; case 15: LongSword longSword = new LongSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); longSword.WeaponAddToInventory(); break; case 16: Mace mace = new Mace(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); mace.WeaponAddToInventory(); break; case 17: Maul maul = new Maul(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); maul.WeaponAddToInventory(); break; case 19: MorningStar morningStar = new MorningStar(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); morningStar.WeaponAddToInventory(); break; case 20: Sabre sabre = new Sabre(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); sabre.WeaponAddToInventory(); break; case 21: Scimitar scimitar = new Scimitar(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); scimitar.WeaponAddToInventory(); break; case 22: ShortSword shortSword = new ShortSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); shortSword.WeaponAddToInventory(); break; case 23: SmallAxe smallAxe = new SmallAxe(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); smallAxe.WeaponAddToInventory(); break; case 24: SpikedClub spikedClub = new SpikedClub(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); spikedClub.WeaponAddToInventory(); break; case 25: TwoHandedSword twoHandedSword = new TwoHandedSword(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); twoHandedSword.WeaponAddToInventory(); break; case 26: WarHammer warHammer = new WarHammer(prefixName, prefixStat, prefixValue, suffixName, suffixStat, suffixValue); warHammer.WeaponAddToInventory(); break; } }
public IWeapon Create(int value) { var random = new Random(); IWeapon Weapon = null; if (value == 1) { switch (random.Next(1, 3)) { case 1: Weapon = new Dagger(); break; case 2: Weapon = new Flail(); break; case 3: Weapon = new Warhammer(); break; } } else if (value == 2) { switch (random.Next(1, 3)) { case 1: Weapon = new Flail(); break; case 2: Weapon = new Warhammer(); break; case 3: Weapon = new Sword(); break; } } else if (value == 3) { switch (random.Next(1, 3)) { case 1: Weapon = new Warhammer(); break; case 2: Weapon = new Sword(); break; case 3: Weapon = new EnchantedDagger(); break; } } else if (value == 4) { switch (random.Next(1, 3)) { case 1: Weapon = new Sword(); break; case 2: Weapon = new EnchantedDagger(); break; case 3: Weapon = new EnchantedFlail(); break; } } else if (value == 5) { switch (random.Next(1, 3)) { case 1: Weapon = new EnchantedDagger(); break; case 2: Weapon = new EnchantedFlail(); break; case 3: Weapon = new EnchantedWarhammer(); break; } } else if (value > 5) { switch (random.Next(1, 3)) { case 1: Weapon = new EnchantedFlail(); break; case 2: Weapon = new EnchantedWarhammer(); break; case 3: Weapon = new EnchantedSword(); break; } } return(Weapon); }