public Template(string nameId, string description, List <string> tags, List <Formula> formulas, SlotsConfig allowedSlots) { // Defined in templates _nameId = nameId; _description = description; _tags = tags; _formulas = formulas; _allowedSlots = allowedSlots; }
private void constructCurrentItemTemplate() // Constructs a new ItemTemplate according to whatever is shown in the fields. After this // method is finished this ItemTemplate could be added to database as a new ItemTemplate or just // modify one that already exists (in this case destroys the old ItemTemplate in database // and adds the new one) { itemTags = new List <string>(); for (int i = 0; i < itemTagsCount; i++) { string tag = itemTagsInDatabaseArray[selectedItemTag[i]]; itemTags.Add(tag); } itemFormulas = new List <Formula>(); for (int i = 0; i < formulaCount; i++) { Formula formula = new Formula(attribsInDatabaseArray[selectedAttribInEachFormula[i]], formulasArray[i], 1); itemFormulas.Add(formula); } itemAllowedSlots = new SlotsConfig(); List <Dictionary <string, string> > passiveCfg = new List <Dictionary <string, string> >(); List <ItemConfig> itemCfg = new List <ItemConfig>(); List <SpecConfig> specCfg = new List <SpecConfig>(); for (int i = 0; i < slotsCount; i++) { if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Passive") { Dictionary <string, string> actual = new Dictionary <string, string>(); actual.Add("When", passiveWhenTagsInDatabaseArray[selectedWhenPassive[i]]); actual.Add("To whom", passiveToWhomTagsInDatabaseArray[selectedToWhomPassive[i]]); passiveCfg.Add(actual); } else if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Item") { ItemConfig ic; ic.itemMask = itemTagMasks[i]; List <string> auxItemIds = new List <string>(); for (int j = 0; j < itemTagsInDatabaseList.Count; j++) { int layer = 1 << j; if ((ic.itemMask & layer) != 0) { auxItemIds.Add(itemTagsInDatabaseList[j]); } } ic.itemIds = auxItemIds; itemCfg.Add(ic); } else if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Specialization") { } } itemAllowedSlots.PassiveCfg = passiveCfg; itemAllowedSlots.ItemCfg = itemCfg; itemAllowedSlots.SpecCfg = specCfg; currentItemTemplate = ScriptableObject.CreateInstance <ItemTemplate>().Init(itemNameId, itemDescription, itemTags, itemFormulas, itemAllowedSlots); }
protected Template Init(string nameId, string description, List <string> tags, List <Formula> formulas, SlotsConfig allowedSlots) { // Defined in templates name = _nameId = nameId; _description = description; _tags = tags; _formulas = formulas; _allowedSlots = allowedSlots; return(this); }
private void loadSelectedItemTemplate() // Called when you select a stored Item on Item Popup. Then loads every Item related info from // database into local structures so GUI can show the info for selected Item { itemNameId = d.Items[itemsInDatabaseArray[selectedItem]].NameId; itemDescription = d.Items[itemsInDatabaseArray[selectedItem]].Description; itemTags = d.Items[itemsInDatabaseArray[selectedItem]].Tags; itemFormulas = d.Items[itemsInDatabaseArray[selectedItem]].Formulas; itemAllowedSlots = d.Items[itemsInDatabaseArray[selectedItem]].AllowedSlots; }
private void loadselectedPassiveTemplate() // Called when you select a stored Passive on Passive Popup. Then loads every Passive related info from // database into local structures so GUI can show the info for selected Passive { passiveNameId = d.Passives[passivesInDatabaseArray[selectedPassive]].NameId; passiveDescription = d.Passives[passivesInDatabaseArray[selectedPassive]].Description; passiveTags = d.Passives[passivesInDatabaseArray[selectedPassive]].Tags; passiveFormulas = d.Passives[passivesInDatabaseArray[selectedPassive]].Formulas; passiveAllowedSlots = d.Passives[passivesInDatabaseArray[selectedPassive]].AllowedSlots; }
private void loadSelectedSpecTemplate() // Called when you select a stored Spec on Spec Popup. Then loads every Spec related info from // database into local structures so GUI can show the info for selected Spec { specNameId = d.Specs[specsInDatabaseArray[selectedSpec]].NameId; specDescription = d.Specs[specsInDatabaseArray[selectedSpec]].Description; specIsBasicClass = d.Specs[specsInDatabaseArray[selectedSpec]].IsBasicClass; specFormulas = d.Specs[specsInDatabaseArray[selectedSpec]].Formulas; specAllowedSlots = d.Specs[specsInDatabaseArray[selectedSpec]].AllowedSlots; }
private void constructCurrentSpecTemplate() // Constructs a new SpecTemplate according to whatever is shown in the fields. After this // method is finished this SpecTemplate could be added to database as a new SpecTemplate or just // modify one that already exists (in this case destroys the old SpecTemplate in database // and adds the new one) { /* * specTags=new List<string>(); * for (int i=0; i<specTagsCount; i++) * { * string tag=specTagsInDatabaseArray[selectedSpecTag[i]]; * specTags.Add(tag); * } */ specFormulas = new List <Formula>(); for (int i = 0; i < formulaCount; i++) { Formula formula = new Formula(attribsInDatabaseArray[selectedAttribInEachFormula[i]], formulasArray[i], 1); specFormulas.Add(formula); } specAllowedSlots = new SlotsConfig(); List <Dictionary <string, string> > passiveCfg = new List <Dictionary <string, string> >(); List <ItemConfig> itemCfg = new List <ItemConfig>(); List <SpecConfig> specCfg = new List <SpecConfig>(); for (int i = 0; i < slotsCount; i++) { if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Passive") { Dictionary <string, string> actual = new Dictionary <string, string>(); actual.Add("When", passiveWhenTagsInDatabaseArray[selectedWhenPassive[i]]); actual.Add("To whom", passiveToWhomTagsInDatabaseArray[selectedToWhomPassive[i]]); passiveCfg.Add(actual); } else if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Item") { ItemConfig ic; ic.itemMask = itemTagMasks[i]; ic.itemIds = itemTagsInDatabaseList; itemCfg.Add(ic); } else if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Specialization") { SpecConfig sc; sc.specMask = specTagMasks[i]; sc.specIds = specsInDatabaseForSlotsList; specCfg.Add(sc); } } specAllowedSlots.PassiveCfg = passiveCfg; specAllowedSlots.ItemCfg = itemCfg; specAllowedSlots.SpecCfg = specCfg; currentSpecTemplate = new SpecTemplate(specNameId, specDescription, specIsBasicClass, specFormulas, specAllowedSlots); }
private void constructcurrentPassiveTemplate() // Constructs a new PassiveTemplate according to whatever is shown in the fields. After this // method is finished this PassiveTemplate could be added to database as a new PassiveTemplate or just // modify one that already exists (in this case destroys the old PassiveTemplate in database // and adds the new one) { passiveTags = new List <string>(); for (int i = 0; i < passiveTagsCount; i++) { string tag = passiveTagsInDatabaseArray[selectedPassiveTag[i]]; passiveTags.Add(tag); } passiveFormulas = new List <Formula>(); for (int i = 0; i < formulaCount; i++) { Formula formula = new Formula(attribsInDatabaseArray[selectedAttribInEachFormula[i]], formulasArray[i], 1); passiveFormulas.Add(formula); } passiveAllowedSlots = new SlotsConfig(); List <Dictionary <string, string> > passiveCfg = new List <Dictionary <string, string> >(); List <ItemConfig> itemCfg = new List <ItemConfig>(); List <SpecConfig> specCfg = new List <SpecConfig>(); for (int i = 0; i < slotsCount; i++) { if (slotTypesAllowedArray[selectedTemplateTypeInEachSlot[i]] == "Passive") { Dictionary <string, string> actual = new Dictionary <string, string>(); actual.Add("When", passiveWhenTagsInDatabaseArray[selectedWhenPassive[i]]); actual.Add("To whom", passiveToWhomTagsInDatabaseArray[selectedToWhomPassive[i]]); passiveCfg.Add(actual); } } passiveAllowedSlots.PassiveCfg = passiveCfg; passiveAllowedSlots.ItemCfg = itemCfg; passiveAllowedSlots.SpecCfg = specCfg; currentPassiveTemplate = ScriptableObject.CreateInstance <PassiveTemplate>().Init(passiveNameId, passiveDescription, passiveTags, passiveFormulas, passiveAllowedSlots); }
public PassiveTemplate(string nameId, string description, List <string> tags, List <Formula> formulas, SlotsConfig allowedSlots) : base(nameId, description, tags, formulas, allowedSlots) { // Attributes defined in templates // ... // Attributes defined in instances // ... }
public SpecTemplate(string nameId, string description, bool isBasicClass, List <Formula> formulas, SlotsConfig allowedSlots) : base(nameId, description, null, formulas, allowedSlots) { this.isBasicClass = isBasicClass; // Attributes defined in templates // ... // Attributes defined in instances }
public PassiveTemplate Init(string nameId, string description, List <string> tags, List <Formula> formulas, SlotsConfig allowedSlots) { base.Init(nameId, description, tags, formulas, allowedSlots); return(this); }
public SpecTemplate Init(string nameId, string description, bool isBasicClass, List <Formula> formulas, SlotsConfig allowedSlots) { base.Init(nameId, description, null, formulas, allowedSlots); this.isBasicClass = isBasicClass; return(this); }
private void createTestDatabase() // Creates an Example Database for testing purpouses. Typically called from constructor. It follows // the way an user would create things from editor. { // Filling the tags and options fillTags("test"); // Filling core core '_attributes' (exist in every RPG) Attribute experience = new Attribute(true, "EXP", "Experience", "Experience acumulated", 1, 100000000); Attribute hp = new Attribute(true, "HPS", "HealthPoints", "Character health points", 0, 1000); Attribute mp = new Attribute(true, "MPS", "MagicPoints", "Character magic points", 0, 1000); _attributes.Add("EXP", experience); _attributes.Add("HPS", hp); _attributes.Add("MPS", mp); // Filling core '_attributes' (exist in every RPG slitghtly different) Attribute strength = new Attribute(true, "STR", "Strength", "Strength necessary to fisical strikes", 1, 100); Attribute intelligence = new Attribute(true, "INT", "Intelligence", "Intelligence to trade and find things", 1, 100); Attribute wisdom = new Attribute(true, "WIS", "Wisdom", "Wisdom helps you interacting and upgrading things", 1, 100); Attribute dexterity = new Attribute(true, "DEX", "Dexterity", "Dexterity helps in a lot of things", 1, 100); Attribute constitution = new Attribute(true, "CON", "Constitution", "Constitution is for wearing things", 1, 100); Attribute charisma = new Attribute(true, "CHA", "Charisma", "Charisma could save you without using a weapon", 1, 100); _attributes.Add("STR", strength); _attributes.Add("INT", intelligence); _attributes.Add("WIS", wisdom); _attributes.Add("DEX", dexterity); _attributes.Add("CON", constitution); _attributes.Add("CHA", charisma); // Filling derived '_attributes' Attribute level = new Attribute(false, "lvl", "Level", "Character level", 1, 100); Attribute damage = new Attribute(false, "dmg", "Damage", "Base damage for a weapon", 1, 10000); Attribute critical = new Attribute(false, "cri", "Critical", "Chance of a crtical strike", 1, 10000); Attribute trading = new Attribute(false, "tra", "Trading", "Trading capabilities", 1, 10000); Attribute dodging = new Attribute(false, "dod", "Dodging", "Dodging probability", 1, 10000); Attribute defense = new Attribute(false, "def", "Defense", "Defense probability", 1, 10000); Attribute fireDamage = new Attribute(false, "fdg", "Fire damage", "Fire damage for a weapon", 1, 10000); _attributes.Add("lvl", level); _attributes.Add("dmg", damage); _attributes.Add("cri", critical); _attributes.Add("tra", trading); _attributes.Add("dod", dodging); _attributes.Add("def", defense); _attributes.Add("fdg", fireDamage); // Filling '_passives' /* * // Kindness passive * List<Formula> kindnessFormula=new List<Formula>(); * kindnessFormula.Add(new Formula("CHA","CHA+3",1)); * PassiveTemplate kindness=new PassiveTemplate("Kindness","More charisma for being kind",kindnessFormula,null); * passives.Add("kindness",kindness); * // Doping passive * List<Formula> dopingFormula=new List<Formula>(); * dopingFormula.Add(new Formula("HPS","HPS+10",1)); * PassiveTemplate doping=new PassiveTemplate("Doping","Gets a health boost",dopingFormula,null); * passives.Add("doping",doping); * // Tired passive * List<Formula> tiredFormula=new List<Formula>(); * tiredFormula.Add(new Formula("HPS","HPS-10",1)); * PassiveTemplate tired=new PassiveTemplate("Tired","Gets tired",tiredFormula,null); * passives.Add("tired",tired); * // Tenacity passive * List<Formula> tenacityFormula=new List<Formula>(); * tenacityFormula.Add(new Formula("def","STR*2+DEX*3",1)); * PassiveTemplate tenacity=new PassiveTemplate("Tenacity","Resilence to endure strikes",tenacityFormula,null); * passives.Add("tenacity",tenacity); */ // Filling '_items' // Club item List <Formula> clubFormulas = new List <Formula>(); clubFormulas.Add(new Formula("dmg", "2", 1)); List <string> clubTags = new List <string>(); clubTags.Add("Wearable"); clubTags.Add("Weapon"); clubTags.Add("Melee"); clubTags.Add("Common"); SlotsConfig clubSlotsConfig = new SlotsConfig(); ItemTemplate club = new ItemTemplate("Club", "Common melee weapon", clubTags, clubFormulas, clubSlotsConfig); _items.Add("Club", club); // Sword item List <Formula> swordFormulas = new List <Formula>(); swordFormulas.Add(new Formula("DEX", "DEX+3", 1)); swordFormulas.Add(new Formula("dmg", "6", 1)); List <string> swordTags = new List <string>(); swordTags.Add("Wearable"); swordTags.Add("Weapon"); swordTags.Add("Melee"); swordTags.Add("Sword"); SlotsConfig swordSlotsConfig = new SlotsConfig(); List <ItemConfig> listSwordIc = new List <ItemConfig>(); ItemConfig swordIc; swordIc.itemIds = new List <string> { "Wearable", "Weapon", "Melee", "Addon" }; swordIc.itemMask = 4103; listSwordIc.Add(swordIc); swordSlotsConfig.ItemCfg = listSwordIc; ItemTemplate sword = new ItemTemplate("Sword", "Normal sword", swordTags, swordFormulas, swordSlotsConfig); _items.Add("Sword", sword); // Fire Sword item List <Formula> fireSwordFormulas = new List <Formula>(); fireSwordFormulas.Add(new Formula("DEX", "DEX+3", 1)); fireSwordFormulas.Add(new Formula("dmg", "6", 1)); fireSwordFormulas.Add(new Formula("fdg", "3", 1)); List <string> fireSwordTags = new List <string>(); fireSwordTags.Add("Wearable"); fireSwordTags.Add("Weapon"); fireSwordTags.Add("Melee"); fireSwordTags.Add("Sword"); SlotsConfig fireSwordSlotsConfig = new SlotsConfig(); List <ItemConfig> listFireSwordIc = new List <ItemConfig>(); ItemConfig fireSwordIc; fireSwordIc.itemIds = new List <string> { "Wearable", "Weapon", "Melee", "Addon" }; fireSwordIc.itemMask = 4103; listFireSwordIc.Add(fireSwordIc); fireSwordSlotsConfig.ItemCfg = listFireSwordIc; List <Dictionary <string, string> > listFireSwordPc = new List <Dictionary <string, string> >(); Dictionary <string, string> fireSwordPc = new Dictionary <string, string>(); fireSwordPc.Add("When", "Turn"); fireSwordPc.Add("To whom", "Enemy"); listFireSwordPc.Add(fireSwordPc); fireSwordSlotsConfig.PassiveCfg = listFireSwordPc; ItemTemplate fireSword = new ItemTemplate("Fire sword", "Fire sword", fireSwordTags, fireSwordFormulas, fireSwordSlotsConfig); _items.Add("Fire sword", fireSword); // Axe item List <Formula> axeFormulas = new List <Formula>(); axeFormulas.Add(new Formula("dmg", "8", 1)); List <string> axeTags = new List <string>(); axeTags.Add("Wearable"); axeTags.Add("Weapon"); axeTags.Add("Melee"); axeTags.Add("Axe"); SlotsConfig axeSlotsConfig = new SlotsConfig(); List <ItemConfig> listAxeIc = new List <ItemConfig>(); ItemConfig axeIc; axeIc.itemIds = new List <string> { "Wearable", "Weapon", "Melee", "Addon" }; axeIc.itemMask = 4103; listAxeIc.Add(axeIc); axeSlotsConfig.ItemCfg = listAxeIc; ItemTemplate axe = new ItemTemplate("Axe", "Normal axe", axeTags, axeFormulas, axeSlotsConfig); _items.Add("Axe", axe); // Bow item List <Formula> bowFormulas = new List <Formula>(); bowFormulas.Add(new Formula("dmg", "2", 1)); List <string> bowTags = new List <string>(); bowTags.Add("Wearable"); bowTags.Add("Weapon"); bowTags.Add("Ranged"); bowTags.Add("Bow"); SlotsConfig bowSlotsConfig = new SlotsConfig(); List <ItemConfig> listBowIc = new List <ItemConfig>(); ItemConfig bowIc; bowIc.itemIds = new List <string> { "Wearable", "Weapon", "Ranged", "Addon" }; bowIc.itemMask = 4107; listBowIc.Add(bowIc); bowSlotsConfig.ItemCfg = listBowIc; ItemTemplate bow = new ItemTemplate("Bow", "Normal bow", bowTags, bowFormulas, bowSlotsConfig); _items.Add("Bow", bow); // Filling basic 'specs' // Human spec List <Formula> humanFormulas = new List <Formula>(); humanFormulas.Add(new Formula("cri", "STR*3", 1)); humanFormulas.Add(new Formula("tra", "INT*2+WIS*3+CHA", 2)); SlotsConfig humanSlotsConfig = new SlotsConfig(); List <ItemConfig> listHumanIc = new List <ItemConfig>(); ItemConfig humanIc1; humanIc1.itemIds = new List <string> { "Wearable", "Weapon", "Melee" }; humanIc1.itemMask = 7; listHumanIc.Add(humanIc1); ItemConfig humanIc2; humanIc2.itemIds = new List <string> { "Wearable", "Weapon", "Ranged" }; humanIc2.itemMask = 11; listHumanIc.Add(humanIc2); ItemConfig humanIc3; humanIc3.itemIds = new List <string> { "Wearable", "Cloth", "Head" }; humanIc3.itemMask = 49; listHumanIc.Add(humanIc3); ItemConfig humanIc4; humanIc4.itemIds = new List <string> { "Wearable", "Cloth", "Chest" }; humanIc4.itemMask = 81; listHumanIc.Add(humanIc4); ItemConfig humanIc5; humanIc5.itemIds = new List <string> { "Wearable", "Cloth", "Neck" }; humanIc5.itemMask = 145; listHumanIc.Add(humanIc5); ItemConfig humanIc6; humanIc6.itemIds = new List <string> { "Wearable", "Cloth", "Arms" }; humanIc6.itemMask = 273; listHumanIc.Add(humanIc6); ItemConfig humanIc7; humanIc7.itemIds = new List <string> { "Wearable", "Cloth", "Hands" }; humanIc7.itemMask = 529; listHumanIc.Add(humanIc7); ItemConfig humanIc8; humanIc8.itemIds = new List <string> { "Wearable", "Cloth", "Finger" }; humanIc8.itemMask = 1041; listHumanIc.Add(humanIc8); ItemConfig humanIc9; humanIc9.itemIds = new List <string> { "Wearable", "Cloth", "Feet" }; humanIc9.itemMask = 2065; listHumanIc.Add(humanIc9); ItemConfig humanIc10; humanIc10.itemIds = new List <string> { "Wearable", "Cloth", "Legs" }; humanIc10.itemMask = 4113; listHumanIc.Add(humanIc10); humanSlotsConfig.ItemCfg = listHumanIc; SpecTemplate human = new SpecTemplate("Human", "Humans are flesh and bones", true, humanFormulas, humanSlotsConfig); _specs.Add("Human", human); // Elf spec List <Formula> elfFormulas = new List <Formula>(); elfFormulas.Add(new Formula("cri", "cri+1", 1)); elfFormulas.Add(new Formula("tra", "INT*2+WIS*3+CHA", 2)); SlotsConfig elfSlotsConfig = new SlotsConfig(); List <ItemConfig> listElfIc = new List <ItemConfig>(); ItemConfig elfIc1; elfIc1.itemIds = new List <string> { "Wearable", "Weapon", "Melee" }; elfIc1.itemMask = 7; listElfIc.Add(elfIc1); ItemConfig elfIc2; elfIc2.itemIds = new List <string> { "Wearable", "Weapon", "Ranged" }; elfIc2.itemMask = 11; listElfIc.Add(elfIc2); ItemConfig elfIc3; elfIc3.itemIds = new List <string> { "Wearable", "Cloth", "Head" }; elfIc3.itemMask = 49; listElfIc.Add(elfIc3); ItemConfig elfIc4; elfIc4.itemIds = new List <string> { "Wearable", "Cloth", "Chest" }; elfIc4.itemMask = 81; listElfIc.Add(elfIc4); ItemConfig elfIc5; elfIc5.itemIds = new List <string> { "Wearable", "Cloth", "Neck" }; elfIc5.itemMask = 145; listElfIc.Add(elfIc5); ItemConfig elfIc6; elfIc6.itemIds = new List <string> { "Wearable", "Cloth", "Arms" }; elfIc6.itemMask = 273; listElfIc.Add(elfIc6); ItemConfig elfIc7; elfIc7.itemIds = new List <string> { "Wearable", "Cloth", "Hands" }; elfIc7.itemMask = 529; listElfIc.Add(elfIc7); ItemConfig elfIc8; elfIc8.itemIds = new List <string> { "Wearable", "Cloth", "Finger" }; elfIc8.itemMask = 1041; listElfIc.Add(elfIc8); ItemConfig elfIc9; elfIc9.itemIds = new List <string> { "Wearable", "Cloth", "Feet" }; elfIc9.itemMask = 2065; listElfIc.Add(elfIc9); ItemConfig elfIc10; elfIc10.itemIds = new List <string> { "Wearable", "Cloth", "Legs" }; elfIc10.itemMask = 4113; listElfIc.Add(elfIc10); elfSlotsConfig.ItemCfg = listElfIc; SpecTemplate elf = new SpecTemplate("Elf", "Elves have pointy ears", true, elfFormulas, elfSlotsConfig); _specs.Add("Elf", elf); // Orc spec List <Formula> orcFormulas = new List <Formula>(); orcFormulas.Add(new Formula("cri", "STR*10", 1)); orcFormulas.Add(new Formula("tra", "INT*2+WIS*4+CHA*2", 2)); SlotsConfig orcSlotsConfig = new SlotsConfig(); List <ItemConfig> listOrcIc = new List <ItemConfig>(); ItemConfig orcIc1; orcIc1.itemIds = new List <string> { "Wearable", "Weapon", "Melee" }; orcIc1.itemMask = 7; listOrcIc.Add(orcIc1); ItemConfig orcIc2; orcIc2.itemIds = new List <string> { "Wearable", "Weapon", "Ranged" }; orcIc2.itemMask = 11; listOrcIc.Add(orcIc2); ItemConfig orcIc3; orcIc3.itemIds = new List <string> { "Wearable", "Cloth", "Head" }; orcIc3.itemMask = 49; listOrcIc.Add(orcIc3); ItemConfig orcIc4; orcIc4.itemIds = new List <string> { "Wearable", "Cloth", "Chest" }; orcIc4.itemMask = 81; listOrcIc.Add(orcIc4); ItemConfig orcIc5; orcIc5.itemIds = new List <string> { "Wearable", "Cloth", "Neck" }; orcIc5.itemMask = 145; listOrcIc.Add(orcIc5); ItemConfig orcIc6; orcIc6.itemIds = new List <string> { "Wearable", "Cloth", "Arms" }; orcIc6.itemMask = 273; listOrcIc.Add(orcIc6); ItemConfig orcIc7; orcIc7.itemIds = new List <string> { "Wearable", "Cloth", "Hands" }; orcIc7.itemMask = 529; listOrcIc.Add(orcIc7); ItemConfig orcIc8; orcIc8.itemIds = new List <string> { "Wearable", "Cloth", "Finger" }; orcIc8.itemMask = 1041; listOrcIc.Add(orcIc8); ItemConfig orcIc9; orcIc9.itemIds = new List <string> { "Wearable", "Cloth", "Feet" }; orcIc9.itemMask = 2065; listOrcIc.Add(orcIc9); ItemConfig orcIc10; orcIc10.itemIds = new List <string> { "Wearable", "Cloth", "Legs" }; orcIc10.itemMask = 4113; listOrcIc.Add(orcIc10); orcSlotsConfig.ItemCfg = listOrcIc; SpecTemplate orc = new SpecTemplate("Orc", "Orcs are typically green and ugly", true, orcFormulas, orcSlotsConfig); _specs.Add("Orc", orc); // Filling derived 'specs' // Swordman spec List <Formula> swordmanFormulas = new List <Formula>(); swordmanFormulas.Add(new Formula("dod", "CON*3", 1)); SlotsConfig swordmanSlotsConfig = new SlotsConfig(); List <ItemConfig> listSwordmanIc = new List <ItemConfig>(); ItemConfig swordmanIc1; swordmanIc1.itemIds = new List <string> { "Wearable", "Weapon", "Melee", "Sword" }; swordmanIc1.itemMask = 65543; listSwordmanIc.Add(swordmanIc1); swordmanSlotsConfig.ItemCfg = listSwordmanIc; SpecTemplate swordman = new SpecTemplate("Swordman", "Swordman is a human/elf spec in which they can use swords", false, swordmanFormulas, swordmanSlotsConfig); _specs.Add("Swordman", swordman); Debug.Log("Test database created!"); }