private GenericCharacter(string name) : base(name) { AddBodyPart(Arm.ArmFactory(true)); AddBodyPart(Arm.ArmFactory(false)); AddBodyPart(Leg.LegFactory(true)); AddBodyPart(Leg.LegFactory(false)); AddBodyPart(Torso.TorsoFactory()); AddBodyPart(Head.HeadFactory()); }
public PlayerCharacter(string name, Dictionary <string, ACharacter> knownCharacters = null, Dictionary <string, BodyPart> bodyParts = null) : base(name, knownCharacters, bodyParts) { AddBodyPart(Arm.ArmFactory(true)); AddBodyPart(Arm.ArmFactory(false)); AddBodyPart(Leg.LegFactory(true)); AddBodyPart(Leg.LegFactory(false)); AddBodyPart(Torso.TorsoFactory()); AddBodyPart(Head.HeadFactory()); }
public BaseMonster(string name, Dictionary <string, ACharacter> knownCharacters = null, Dictionary <string, BodyPart> bodyParts = null) : base(name, knownCharacters, bodyParts) { AddBodyPart(Arm.ArmFactory(true)); AddBodyPart(Arm.ArmFactory(false)); AddBodyPart(Leg.LegFactory(true)); AddBodyPart(Leg.LegFactory(false)); AddBodyPart(Torso.TorsoFactory()); AddBodyPart(Head.HeadFactory()); Inventory = new ObservableCollection <AItem>(); }
public override void ButtonBehavior8() { Session.ReplaceDisplayText("Now giving you armor!"); Session.CurrentPlayer.AddEquipment(ItemFactory.CreateArmor(1, Arm.ArmFactory(false))); Session.CurrentPlayer.AddEquipment(ItemFactory.CreateArmor(1, Arm.ArmFactory(true))); Session.CurrentPlayer.AddEquipment(ItemFactory.CreateArmor(1, Leg.LegFactory(false))); Session.CurrentPlayer.AddEquipment(ItemFactory.CreateArmor(1, Leg.LegFactory(true))); Session.CurrentPlayer.AddEquipment(ItemFactory.CreateArmor(1, Torso.TorsoFactory())); Session.CurrentPlayer.AddEquipment(ItemFactory.CreateArmor(1, Head.HeadFactory())); }
public override void ButtonBehavior8() { Session.ReplaceDisplayText("Searching around..."); if (RandomNumberGenerator.NumberBetween(0, 5) > 1) { Session.AddToDisplayText("\n...you found nothing"); return; } Session.ReplaceDisplayText("You found a piece of armor!"); BaseArmor BA; switch (RandomNumberGenerator.NumberBetween(0, 7)) { case 1: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Arm.ArmFactory(false), true); break; case 2: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Arm.ArmFactory(true), true); break; case 3: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Leg.LegFactory(false), true); break; case 4: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Leg.LegFactory(true), true); break; case 5: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Torso.TorsoFactory(), true); break; case 6: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Torso.TorsoFactory(), true); break; default: BA = ItemFactory.CreateArmor(Session.CurrentPlayer.Level, Head.HeadFactory(), true); break; } Session.AddToDisplayText("\nYou found:\n" + BA.Name); Session.CurrentPlayer.AddEquipment(BA); }
public BaseWeapon(int Id, string name, int price, int level = 1, Dictionary <string, float> equipEffects = null, List <BodyPart> targets = null) : base(Id, name, price, level, equipEffects, targets) { EquipEffects.Add("Strength", 1 * level); TargetBodyParts.Add(Arm.ArmFactory(false)); }
public static BaseMonster CreateBaseMonster(int level, bool allowSpecial = false, bool forceSpecial = false) { string name = MonstersByLevel.RandomMonsterName(RandomNumberGenerator.NumberBetween(0, 20)); string monsterName = ""; if ((allowSpecial && RandomNumberGenerator.NumberBetween(0, 10) <= 2) || forceSpecial) { monsterName = MonstersByLevel.GetNextSpecialMonster(level); forceSpecial = true; } else { monsterName = MonstersByLevel.GetNextMonster(level); } name = name + ", the " + monsterName; BaseMonster BM = Monsters.Find(x => x.Name == name); if (BM != null) { return(BM); } BM = new BaseMonster(name); BM.RewardGold = 6 * (level + 1); BM.RewardExperiencePoints = 4 * (level + 1); if (forceSpecial) { int num = RandomNumberGenerator.NumberBetween(0, 6); BM.RewardExperiencePoints = (int)(BM.RewardExperiencePoints * 1.25); BM.RewardGold = (int)(BM.RewardGold * 1.25); while (num > 0) { int num2 = RandomNumberGenerator.NumberBetween(0, 8); switch (num2) { case 1: BM.AddEquipment(ItemFactory.CreateWeapon(level, true, true)); break; case 2: BM.AddEquipment(ItemFactory.CreateArmor(level, Torso.TorsoFactory(), true, true)); break; case 3: BM.AddEquipment(ItemFactory.CreateArmor(level, Arm.ArmFactory(true), true, true)); break; case 4: BM.AddEquipment(ItemFactory.CreateArmor(level, Arm.ArmFactory(false), true, true)); break; case 5: // TODO THis was the error point BM.AddEquipment(ItemFactory.CreateArmor(level, Leg.LegFactory(false), true, true)); break; case 6: BM.AddEquipment(ItemFactory.CreateArmor(level, Head.HeadFactory(), true, true)); break; case 7: BM.myStats.Strength.Value *= 1.2; break; case 8: BM.myStats.Toughness.Value *= 1.2; break; default: break; } } } Monsters.Add(BM); return(BM); }