private static void InitArmors(EntityFactory ef) { #region Shoes ef.Inherits("shoes", "base_item", new Sprite("SHOES", Sprite.ItemsLayer), new Identifier("Shoes", "A pair of plain shoes."), new Item(new Item.Template { Value = 3500, Weight = 20, Size = 2, StackType = StackType.None, }), Equipable.SingleSlot("Feet"), new ArmorComponent( new ArmorComponent.Template { DonTime = 1, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Feet", 50, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 2 }, { Combat.DamageTypes["crush"], 2 }, { Combat.DamageTypes["impale"], 2 }, { Combat.DamageTypes["pierce_small"], 2 }, { Combat.DamageTypes["pierce"], 2 }, { Combat.DamageTypes["pierce_large"], 2 }, { Combat.DamageTypes["pierce_huge"], 2 }, { Combat.DamageTypes["burn"], 2 }, }) } })); ef.Inherits("sneakers", "shoes", new Identifier("Sneakers", "A pair of sneakers."), new Item(new Item.Template { Value = 4000, Weight = 17, Size = 2, StackType = StackType.None, }), new EquippedBonus(new EquippedBonus.Template { Bonuses = new Dictionary <string, int> { { "skill_stealth", 2 } } })); ef.Inherits("flipflop", "shoes", new Identifier("Flip-flops", "A pair of thong flip-flops."), new Item(new Item.Template { Value = 3000, Weight = 12, Size = 2, StackType = StackType.None, }), new EquippedBonus(new EquippedBonus.Template { Bonuses = new Dictionary <string, int> { // {"skill_run", -5} } })); ef.Inherits("heels", "shoes", new Identifier("Heels", "A pair of women's high heel shoes."), new Item(new Item.Template { Value = 9000, Weight = 13, Size = 2, StackType = StackType.None, }), // reaction? influence? appearence? new EquippedBonus(new EquippedBonus.Template { Bonuses = new Dictionary <string, int> { // {"skill_run", -10} } })); ef.Inherits("cleats", "sneakers", new Identifier("Cleats", "A pair of atheltic shoes fitted with spiked cleats."), new Item(new Item.Template { Value = 5000, Weight = 20, Size = 2, StackType = StackType.None, }), new EquippedBonus(new EquippedBonus.Template { Bonuses = new Dictionary <string, int> { { "skill_stealth", -2 } } })); ef.Inherits("boots", "shoes", new Identifier("Boots", "A pair of good boots."), new Item(new Item.Template { Value = 2700, Weight = 25, Size = 2, StackType = StackType.None, }), new ArmorComponent( new ArmorComponent.Template { DonTime = 1, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Feet", 65, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 7 }, { Combat.DamageTypes["crush"], 7 }, { Combat.DamageTypes["impale"], 7 }, { Combat.DamageTypes["pierce_small"], 5 }, { Combat.DamageTypes["pierce"], 5 }, { Combat.DamageTypes["pierce_large"], 6 }, { Combat.DamageTypes["pierce_huge"], 6 }, { Combat.DamageTypes["burn"], 7 }, }) } })); ef.Inherits("ruggedboots", "base_item", new Identifier("Rugged boots", "A pair of rugged work boots with a steel toe."), new Item(new Item.Template { Value = 8000, Weight = 30, Size = 2, StackType = StackType.None, }), new ArmorComponent( new ArmorComponent.Template { DonTime = 1, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Feet", 70, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 9 }, { Combat.DamageTypes["crush"], 9 }, { Combat.DamageTypes["impale"], 9 }, { Combat.DamageTypes["pierce_small"], 9 }, { Combat.DamageTypes["pierce"], 9 }, { Combat.DamageTypes["pierce_large"], 9 }, { Combat.DamageTypes["pierce_huge"], 9 }, { Combat.DamageTypes["burn"], 9 }, }) } })); #endregion #region Gloves ef.Inherits("gloves", "base_item", new Sprite("GLOVES", Sprite.ItemsLayer), new Identifier("Gloves", "A pair of normal gloves."), new Item(new Item.Template { Value = 3500, Weight = 5, Size = 1, StackType = StackType.None, }), Equipable.SingleSlot("Hands"), new ArmorComponent( new ArmorComponent.Template { DonTime = 1, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Hands", 50, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 1 }, { Combat.DamageTypes["crush"], 1 }, { Combat.DamageTypes["impale"], 1 }, { Combat.DamageTypes["pierce_small"], 1 }, { Combat.DamageTypes["pierce"], 1 }, { Combat.DamageTypes["pierce_large"], 1 }, { Combat.DamageTypes["pierce_huge"], 1 }, { Combat.DamageTypes["burn"], 1 }, }) } })); #endregion #region Pants ef.Inherits("pants", "base_item", new Sprite("PANTS", Sprite.ItemsLayer), new Identifier("Pants", "A pair of khaki pants."), new Item(new Item.Template { Value = 4000, Weight = 15, Size = 3, StackType = StackType.None, }), Equipable.SingleSlot("Legs"), new ArmorComponent( new ArmorComponent.Template { DonTime = 1, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Feet", 50, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 1 }, { Combat.DamageTypes["crush"], 1 }, { Combat.DamageTypes["impale"], 1 }, { Combat.DamageTypes["pierce_small"], 1 }, { Combat.DamageTypes["pierce"], 1 }, { Combat.DamageTypes["pierce_large"], 1 }, { Combat.DamageTypes["pierce_huge"], 1 }, { Combat.DamageTypes["burn"], 1 }, }) } })); ef.Inherits("skirt", "pants", new Identifier("Skirt", "A short cotton skirt."), new Item(new Item.Template { Value = 5000, Weight = 12, Size = 3, StackType = StackType.None, })); ef.Inherits("jeans", "pants", new Sprite("PANTS", Sprite.ItemsLayer), new Identifier("Jeans", "A pair of blue jeans."), new Item(new Item.Template { Value = 5000, Weight = 15, Size = 3, StackType = StackType.None, })); #endregion #region Shirts ef.Inherits("shirt", "base_item", new Sprite("SHIRT", Sprite.ItemsLayer), new Identifier("Shirt", "A hawaiian shirt."), new Item(new Item.Template { Value = 2000, Weight = 10, Size = 11, StackType = StackType.None, }), Equipable.SingleSlot("Torso"), new ArmorComponent( new ArmorComponent.Template { DonTime = 1, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Torso", 20, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 1 }, { Combat.DamageTypes["crush"], 1 }, { Combat.DamageTypes["impale"], 1 }, { Combat.DamageTypes["pierce_small"], 1 }, { Combat.DamageTypes["pierce"], 1 }, { Combat.DamageTypes["pierce_large"], 1 }, { Combat.DamageTypes["pierce_huge"], 1 }, { Combat.DamageTypes["burn"], 1 }, }) } })); ef.Inherits("footballpads", "shirt", new Sprite("FOOTBALL_SHOULDER_PADS", Sprite.ItemsLayer), new Identifier("Football Shoulder Pads", "Shoulder pads for football players. Jersey not included."), new Item(new Item.Template { Value = 5000, Weight = 50, Size = 11, StackType = StackType.None, }), Equipable.MultipleSlots("Torso", "Arms"), new ArmorComponent( new ArmorComponent.Template { DonTime = 10, Defenses = new List <ArmorComponent.Part> { new ArmorComponent.Part("Torso", 40, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 8 }, { Combat.DamageTypes["crush"], 15 }, { Combat.DamageTypes["impale"], 6 }, { Combat.DamageTypes["pierce_small"], 4 }, { Combat.DamageTypes["pierce"], 4 }, { Combat.DamageTypes["pierce_large"], 4 }, { Combat.DamageTypes["pierce_huge"], 4 }, { Combat.DamageTypes["burn"], 5 }, }), new ArmorComponent.Part("Left Arm", 30, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 5 }, { Combat.DamageTypes["crush"], 8 }, { Combat.DamageTypes["impale"], 5 }, { Combat.DamageTypes["pierce_small"], 4 }, { Combat.DamageTypes["pierce"], 4 }, { Combat.DamageTypes["pierce_large"], 4 }, { Combat.DamageTypes["pierce_huge"], 4 }, { Combat.DamageTypes["burn"], 4 }, }), new ArmorComponent.Part("Right Arm", 30, new Dictionary <DamageType, int> { { Combat.DamageTypes["true"], 0 }, { Combat.DamageTypes["cut"], 5 }, { Combat.DamageTypes["crush"], 8 }, { Combat.DamageTypes["impale"], 5 }, { Combat.DamageTypes["pierce_small"], 4 }, { Combat.DamageTypes["pierce"], 4 }, { Combat.DamageTypes["pierce_large"], 4 }, { Combat.DamageTypes["pierce_huge"], 4 }, { Combat.DamageTypes["burn"], 4 }, }), } })); #endregion }
public void SetUp() { Item0 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new ReferenceId("item"), new VisibleComponent(10), new Sprite("ITEM", Sprite.ItemsLayer), new Identifier("Junk", "A piece of junk."), new Item(0, 0, 0, 0, StackType.None) }); Item1 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new ReferenceId("item"), new VisibleComponent(10), new Sprite("ITEM", Sprite.ItemsLayer), new Identifier("Junk", "A piece of junk."), new Item(0, 0, 0, 0, StackType.None) }); Item2 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new ReferenceId("item"), new VisibleComponent(10), new Sprite("ITEM", Sprite.ItemsLayer), new Identifier("Junk", "A piece of junk."), new Item(0, 0, 0, 0, StackType.None) }); StackedItem0 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new ReferenceId("stackeditem"), new VisibleComponent(10), new Sprite("ITEM", Sprite.ItemsLayer), new Identifier("Junk", "A piece of junk."), new Item(0, 0, 0, 0, StackType.Hard) }); StackedItem1 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new ReferenceId("stackeditem"), new VisibleComponent(10), new Sprite("ITEM", Sprite.ItemsLayer), new Identifier("Junk", "A piece of junk."), new Item(0, 0, 0, 0, StackType.Hard) }); Slot1Item0 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new Item(new Item.Template { StackType = StackType.None, Size = 1, Weight = 1, Value = 1 }), Equipable.SingleSlot("slot1") }); Slot1Item1 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new Item(new Item.Template { StackType = StackType.None, Size = 1, Weight = 1, Value = 1 }), Equipable.SingleSlot("slot1") }); Slot1Item2StealthBonus = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new Item(new Item.Template { StackType = StackType.None, Size = 1, Weight = 1, Value = 1 }), Equipable.SingleSlot("slot1"), new EquippedBonus(new EquippedBonus.Template { Bonuses = new Dictionary <string, int> { { "skill_stealth", 1 } } }) }); Slot2Item0 = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new Item(new Item.Template { StackType = StackType.None, Size = 1, Weight = 1, Value = 1 }), Equipable.SingleSlot("slot2") }); OccupiesSlotsItem = EntityManager.Create(new List <Component> { new GameObject(-1, -1, null), new Item(new Item.Template { StackType = StackType.None, Size = 1, Weight = 1, Value = 1 }), Equipable.MultipleSlots("slot1", "slot2"), }); }
private static void InitMelees(EntityFactory ef) { ef.Inherits("base_meleeweapon", "base_item", new Sprite("WEAPON", Sprite.ItemsLayer), Equipable.SingleSlot("Main Hand", "Off Hand"), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "hit", ActionDescriptionPlural = "hits", Skill = "skill_unarmed", HitBonus = 0, Damage = Rand.Constant(-10), DamageType = Combat.DamageTypes["crush"], Penetration = 1, AttackSpeed = World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 1, Parry = -3 })); ef.Inherits("base_2hmelee", "base_meleeweapon", Equipable.MultipleSlots("Main Hand", "Off Hand")); ef.Inherits("largeknife", "base_meleeweapon", //new Sprite("LARGE_KNIFE", Sprite.ITEMS_LAYER), new Identifier("Knife, Large", "A large knife."), new Item( new Item.Template { Value = 4000, Weight = 10, Size = 2, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "slash", ActionDescriptionPlural = "slashes", Skill = "skill_knife", HitBonus = 0, Damage = Rand.Constant(-5), DamageType = Combat.DamageTypes["cut"], Penetration = 1, AttackSpeed = 1.1 * World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 6, Parry = -1 })); ef.Inherits("axe", "base_meleeweapon", //new Sprite("AXE", Sprite.ITEMS_LAYER), new Identifier("Axe", "An axe."), new Item( new Item.Template { Value = 5000, Weight = 40, Size = 3, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "hack", ActionDescriptionPlural = "hacks", Skill = "skill_axe", HitBonus = 0, Damage = Rand.Constant(10), DamageType = Combat.DamageTypes["cut"], Penetration = 1, AttackSpeed = .9 * World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 11, Parry = 0 })); ef.Inherits("hatchet", "base_meleeweapon", //new Sprite("HATCHET", Sprite.ITEMS_LAYER), new Identifier("Hatchet", "A hatchet."), new Item( new Item.Template { Value = 4000, Weight = 20, Size = 2, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "hack", ActionDescriptionPlural = "hacks", Skill = "skill_axe", HitBonus = 0, Damage = Rand.Constant(0), DamageType = Combat.DamageTypes["cut"], Penetration = 1, AttackSpeed = .92 * World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 8, Parry = 0 })); ef.Inherits("brassknuckles", "base_meleeweapon", //new Sprite("BRASS_KNUCKLES", Sprite.ITEMS_LAYER), new Identifier("Brass Knuckles"), new Item( new Item.Template { Value = 1000, Weight = 20, Size = 1, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "punch", ActionDescriptionPlural = "punches", Skill = "skill_unarmed", HitBonus = 0, Damage = Rand.Constant(0), DamageType = Combat.DamageTypes["crush"], Penetration = 1, AttackSpeed = World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 0, Strength = 1, Parry = -1 })); ef.Inherits("smallknife", "base_meleeweapon", //new Sprite("SMALL_KNIFE", Sprite.ITEMS_LAYER), new Identifier("Knife", "A knife."), new Item( new Item.Template { Value = 3000, Weight = 5, Size = 1, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "jab", ActionDescriptionPlural = "jabs", Skill = "skill_knife", HitBonus = 0, Damage = Rand.Constant(0), DamageType = Combat.DamageTypes["impale"], Penetration = 1, AttackSpeed = 1.2 * World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 6, Parry = -1 })); ef.Inherits("club", "base_meleeweapon", new Identifier("Club", "A good size club."), new Item(new Item.Template { Value = 3000, Weight = 30, Size = 3, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "club", ActionDescriptionPlural = "clubs", Skill = "skill_axe", HitBonus = 0, Damage = Rand.Constant(7), DamageType = Combat.DamageTypes["crush"], Penetration = 1, AttackSpeed = .92 * World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 10, Parry = 0 })); ef.Inherits("baseball_bat", "base_2hmelee", new Identifier("Baseball bat", "A baseball bat."), new Item(new Item.Template { Value = 4000, Weight = 40, Size = 4, StackType = StackType.None, }), new MeleeComponent( new MeleeComponent.Template { ActionDescription = "club", ActionDescriptionPlural = "clubs", Skill = "skill_2haxe", HitBonus = 0, Damage = Rand.Constant(12), DamageType = Combat.DamageTypes["crush"], Penetration = 1, AttackSpeed = .88 * World.OneSecondInSpeed, APToReady = World.SecondsToActionPoints(1f), Reach = 1, Strength = 10, Parry = 0 })); }