Exemplo n.º 1
0
 internal static void Postfix(Panel_Crafting __instance, BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == "GEAR_GunpowderCan")
     {
         bpi.m_RequiredCraftingLocation = CraftingLocation.Workbench;
     }
 }
Exemplo n.º 2
0
            private static void Postfix(Panel_Crafting __instance)
            {
                //__instance.m_SelectedDescription.color = whiteColor;
                BlueprintItem bpi = __instance.m_SelectedBPI;

                if (bpi)
                {
                    if (bpi.m_CraftedResult == GetGearItemPrefab("GEAR_ArrowShaft") && bpi.m_RequiredGear[0] == GetGearItemPrefab("GEAR_Hardwood"))
                    {
                        int currentArcherySkill  = GameManager.GetSkillArchery().GetCurrentTierNumber() + 1;
                        int requiredArcherySkill = Settings.options.craftArrowFromWoodLevel;
                        if (currentArcherySkill < requiredArcherySkill)
                        {
                            __instance.m_SelectedDescription.text  = "Required Archery skill " + requiredArcherySkill.ToString();
                            __instance.m_SelectedDescription.color = redColor;
                        }
                    }
                    if (bpi.m_CraftedResult == GetGearItemPrefab("GEAR_Arrow") && bpi.m_RequiredGear[1] == GetGearItemPrefab("GEAR_BarkTinder"))
                    {
                        int currentArcherySkill  = GameManager.GetSkillArchery().GetCurrentTierNumber() + 1;
                        int requiredArcherySkill = Settings.options.craftFletchingFromBarkLevel;
                        if (currentArcherySkill < requiredArcherySkill)
                        {
                            __instance.m_SelectedDescription.text  = "Required Archery skill " + requiredArcherySkill.ToString();
                            __instance.m_SelectedDescription.color = redColor;
                        }
                    }
                }
            }
        private static void Postfix(ref CraftingPage __instance, BlueprintItem ___m_BPI)
        {
            __instance.m_DescriptionLabel.color = WhiteColor;
            if (!___m_BPI)
            {
                return;
            }
            if (!___m_BPI.m_CraftedResult)
            {
                return;
            }

            if (!MendingHelper.IsClothing(___m_BPI))
            {
                return;
            }

            var mendingLevel         = MendingHelper.GetCurrentMendingLevel();
            var requiredMendingLevel = MendingHelper.GetRequiredMendingLevel(___m_BPI);

            if (mendingLevel < requiredMendingLevel)
            {
                __instance.m_DescriptionLabel.text  = "REQUIRES MENDING LEVEL " + requiredMendingLevel;
                __instance.m_DescriptionLabel.color = RedColor;
            }
        }
Exemplo n.º 4
0
        internal static void MapBlueprint(ModBlueprint modBlueprint)
        {
            BlueprintItem bpItem = GameManager.GetBlueprints().AddComponent <BlueprintItem>();

            if (bpItem == null)
            {
                throw new Exception("Error creating Blueprint");
            }

            bpItem.m_DurationMinutes = modBlueprint.DurationMinutes;
            bpItem.m_CraftingAudio   = modBlueprint.CraftingAudio;

            bpItem.m_RequiresForge     = modBlueprint.RequiresForge;
            bpItem.m_RequiresWorkbench = modBlueprint.RequiresWorkbench;
            bpItem.m_RequiresLight     = modBlueprint.RequiresLight;

            bpItem.m_Locked = modBlueprint.Locked;

            bpItem.m_CraftedResultCount = modBlueprint.CraftedResultCount;
            bpItem.m_CraftedResult      = ModUtils.GetItem <GearItem>(modBlueprint.CraftedResult);

            if (!string.IsNullOrEmpty(modBlueprint.RequiredTool))
            {
                bpItem.m_RequiredTool = ModUtils.GetItem <ToolsItem>(modBlueprint.RequiredTool);
            }

            bpItem.m_OptionalTools     = ModUtils.NotNull(ModUtils.GetMatchingItems <ToolsItem>(modBlueprint.OptionalTools));
            bpItem.m_RequiredGear      = ModUtils.NotNull(ModUtils.GetMatchingItems <GearItem>(modBlueprint.RequiredGear));
            bpItem.m_RequiredGearUnits = modBlueprint.RequiredGearUnits;
        }
            internal static void Postfix()
            {
                BlueprintItem blueprint = GameManager.GetBlueprints().AddComponent <BlueprintItem>();

                // Inputs
                blueprint.m_RequiredGear = new Il2CppReferenceArray <GearItem>(1)
                {
                    [0] = GetGearItemPrefab(TIN_CAN_NAME)
                };
                blueprint.m_RequiredGearUnits = new Il2CppStructArray <int>(1)
                {
                    [0] = 4
                };
                blueprint.m_KeroseneLitersRequired = 0f;
                blueprint.m_GunpowderKGRequired    = 0f;
                blueprint.m_RequiredTool           = null;
                blueprint.m_OptionalTools          = new Il2CppReferenceArray <ToolsItem>(0);

                // Outputs
                blueprint.m_CraftedResult      = GetGearItemPrefab(SCRAP_METAL_NAME);
                blueprint.m_CraftedResultCount = 1;

                // Process
                blueprint.m_Locked                   = false;
                blueprint.m_AppearsInStoryOnly       = false;
                blueprint.m_RequiresLight            = false;
                blueprint.m_RequiresLitFire          = false;
                blueprint.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                blueprint.m_DurationMinutes          = 20;
                blueprint.m_CraftingAudio            = "PLAY_CRAFTINGGENERIC";
                blueprint.m_AppliedSkill             = SkillType.None;
                blueprint.m_ImprovedSkill            = SkillType.None;
            }
Exemplo n.º 6
0
        public static Dictionary <string, string> SearchItems(string item)
        {
            Dictionary <string, string>      searchResults = new Dictionary <string, string>();
            List <BlueprintScriptableObject> blueprints    = ResourcesLibrary.LibraryObject.GetAllBlueprints();

            if (item != "" && blueprints != null)
            {
                for (int i = 0; i < blueprints.Count; i++)
                {
                    BlueprintScriptableObject blueprintScriptableObject = blueprints[i];
                    if (validItemTypes.Contains(blueprintScriptableObject.GetType().Name))
                    {
                        BlueprintItem blueprintItem = blueprintScriptableObject as BlueprintItem;
                        if (((blueprintItem.Name.IndexOf(item, StringComparison.InvariantCultureIgnoreCase) >= 0) ||
                             (blueprintItem.SubtypeName.IndexOf(item, StringComparison.InvariantCultureIgnoreCase) >= 0)) &&
                            !(blueprintItem.AssetGuid.IndexOf("#CraftMagicItems", StringComparison.InvariantCultureIgnoreCase) >= 00))
                        {
                            if (!(invalidItems.Contains(blueprintItem.AssetGuid)) && !(invalidSubTypes.Contains(blueprintItem.SubtypeName)))
                            {
                                searchResults.Add(blueprintItem.AssetGuid, blueprintItem.Name);
                            }
                        }
                    }
                }
            }
            return(searchResults);
        }
Exemplo n.º 7
0
 public static Item FromObjectBuilder(BlueprintItem obItem)
 {
     return(new Item()
     {
         Id = obItem.Id,
         Amount = MyFixedPoint.DeserializeStringSafe(obItem.Amount)
     });
 }
 public static Item FromObjectBuilder(BlueprintItem obItem)
 {
     return new Item()
     {
         Id = obItem.Id,
         Amount = MyFixedPoint.DeserializeStringSafe(obItem.Amount)
     };
 }
Exemplo n.º 9
0
        public static int Rating(this BlueprintItem bp, ItemEntity item = null)
        {
            var rating = 0;

            try {
                var itemRating     = 0;
                var itemEnchRating = 0;
                var bpRating       = 0;
                var bpEnchRating   = 0;
                if (item != null)
                {
                    itemRating     = 10 * item.Enchantments.Sum((e) => e.Blueprint.EnchantmentCost);
                    itemEnchRating = item.Enchantments.Sum(e => (int)e.Blueprint.Rating());
                    //Main.Log($"item enchantValue: {enchantValue}");
                    if (Game.Instance?.SelectionCharacter?.CurrentSelectedCharacter is var currentCharacter)
                    {
                        var component = bp.GetComponent <CopyItem>();
                        if (component != null && component.CanCopy(item, currentCharacter))
                        {
                            itemRating = Math.Max(itemRating, 10);
                        }
                    }
                    itemRating = Math.Max(itemRating, itemEnchRating);
                }
                bpRating     = 10 * bp.CollectEnchantments().Sum((e) => e.EnchantmentCost);
                bpEnchRating = bp.CollectEnchantments().Sum((e) => (int)e.Rating());
                bpRating     = Math.Max(bpRating, bpEnchRating);
                //if (enchantValue > 0) Main.Log($"blueprint enchantValue: {enchantValue}");
                rating = Math.Max(itemRating, bpRating);
            }
            catch {
            }
            //var rating = item.EnchantmentValue * 10;
            var cost    = bp.Cost;
            var logCost = cost > 1 ? Math.Log(cost) / Math.Log(5) : 0;

            if (rating == 0 && bp is BlueprintItemEquipmentUsable usableBP)
            {
                rating = Math.Max(rating, (int)(2.5f * Math.Floor(logCost)));
            }
            else if (rating == 0 && bp is BlueprintItemEquipment equipBP)
            {
                rating = Math.Max(rating, (int)(2.5f * Math.Floor(logCost)));
            }
#if false
            Main.Log($"{bp.Name.Rarity(rarity)} : {bp.GetType().Name.grey().bold()} -  enchantValue: {enchantValue} logCost: {logCost} - rating: {rating}");
#endif
            if (bp is BlueprintItemWeapon bpWeap && !bpWeap.IsMagic)
            {
                rating = Math.Min(rating, 9);
            }
            if (bp is BlueprintItemArmor bpArmor && !bpArmor.IsMagic)
            {
                rating = Math.Min(rating, 9);
            }

            return(rating);
        }
Exemplo n.º 10
0
 internal static void Postfix(BlueprintDisplayItem __instance, BlueprintItem bpi)
 {
     //If the blueprint produces a tinder plug
     if (bpi?.m_CraftedResult?.name == TINDER_NAME)
     {
         //Change the crafting audio to our added sound
         bpi.m_CraftingAudio = SOUND_NAME;                     //This is the name of the EVENT I created in WWise
     }
 }
Exemplo n.º 11
0
 internal static void Postfix(BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == "GEAR_CookingPot")
     {
         bpi.m_RequiredGearUnits[0] = (int)(Settings.options.cookingPotWeight * 5 + 1);
     }
     else if (bpi?.m_CraftedResult?.name == "GEAR_Prybar")
     {
         bpi.m_RequiredGearUnits[0] = (int)(Settings.options.prybarWeight * 5 + 1);
     }
 }
Exemplo n.º 12
0
 private static void Postfix(ref bool __result, BlueprintItem __instance)
 {
     if (__instance.m_CraftedResult == GetGearItemPrefab("GEAR_ArrowShaft") && __instance.m_RequiredGear[0] == GetGearItemPrefab("GEAR_Hardwood") && __result)
     {
         int currentArcherySkill  = GameManager.GetSkillArchery().GetCurrentTierNumber() + 1;
         int requiredArcherySkill = Settings.options.craftArrowFromWoodLevel;
         if (currentArcherySkill < requiredArcherySkill)
         {
             __result = false;
         }
     }
 }
Exemplo n.º 13
0
        private void restoreToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // バックアップから元の場所へコピーする
            if (this.histroyListView.SelectedIndices.Count == 0)
            {
                return;
            }

            BlueprintItem item = (BlueprintItem)this.histroyListView.SelectedItems[0].Tag;

            this.backupMgr.RestoreFile(item.Path);
            MessageBox.Show("restore completed.", "info", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
 internal static void Postfix(BlueprintDisplayItem __instance, BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == SCRAP_METAL_NAME)
     {
         Texture2D scrapMetalTexture = Utils.GetCachedTexture(SCRAP_METAL_CRAFTING_ICON_NAME);
         if (!scrapMetalTexture)
         {
             scrapMetalTexture = TinCanImprovementsMod.assetBundle.LoadAsset(SCRAP_METAL_CRAFTING_ICON_NAME).Cast <Texture2D>();
             Utils.CacheTexture(SCRAP_METAL_CRAFTING_ICON_NAME, scrapMetalTexture);
         }
         __instance.m_Icon.mTexture = scrapMetalTexture;
     }
 }
Exemplo n.º 15
0
        private void ViewHistory(BlueprintItem bpi)
        {
            this.histroyListView.BeginUpdate();
            this.histroyListView.Clear();
            var related   = bpi.Path.Substring(this.backupMgr.TargetPath.Length);
            var dirPath   = related.Substring(0, related.Length - ".blueprint".Length);
            var bkDirPath = this.backupMgr.BackupPath + dirPath;
            var bkDir     = new DirectoryInfo(bkDirPath);

            if (!bkDir.Exists)
            {
                this.histroyListView.EndUpdate();
                return;
            }
            this.histroyListView.Columns.Clear();
            this.histroyListView.Columns.Add("Name").Width = 200;
            this.histroyListView.Columns.Add("Version");
            this.histroyListView.Columns.Add("Game Version");
            this.histroyListView.Columns.Add("Last Update Date").Width = 150;

            foreach (var f in bkDir.GetFiles())
            {
                var bp = BlueprintFile.Load(f.FullName);
                if (bp == null)
                {
                    continue;
                }
                var item = new ListViewItem(f.Name);
                item.SubItems.Add("v" + bp.Version.ToString());
                item.SubItems.Add(bp.Blueprint.GameVersion);
                item.SubItems.Add(f.LastWriteTime.ToString("yyyy/MM/dd HH:mm:ss"));

                item.Tag = new BlueprintItem()
                {
                    Path = f.FullName,
                };
                this.histroyListView.Items.Add(item);
                //Task.Factory.StartNew<ListViewItem>(() =>
                //{

                //    return item;
                //}).ContinueWith(res =>
                //{
                //    if (res.Result != null)
                //    {
                //    }
                //}, TaskScheduler.FromCurrentSynchronizationContext());
            }
            this.histroyListView.EndUpdate();
        }
Exemplo n.º 16
0
            static void Postfix(ref bool __result, BlueprintItem __instance)
            {
                if (__result == false)
                {
                    return;
                }

                var mendingLevel         = MendingHelper.GetCurrentMendingLevel();
                var requiredMendingLevel = MendingHelper.GetRequiredMendingLevel(__instance);

                if (mendingLevel < requiredMendingLevel)
                {
                    __result = false;
                }
            }
Exemplo n.º 17
0
 internal static void Postfix(BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == BLANKET_NAME)
     {
         bpi.m_RequiredGearUnits[0] = (int)(Settings.options.blanketWeight * 10 + 1);
     }
     else if (bpi?.m_CraftedResult?.name == BEDROLL_NAME && bpi?.m_RequiredGear[0].name == CLOTH_NAME)
     {
         bpi.m_RequiredGearUnits[0] = (int)(Settings.options.bedrollWeight * 10 + 2);
     }
     else if (bpi?.m_CraftedResult?.name == BEDROLL_NAME && bpi?.m_RequiredGear[0].name == BLANKET_NAME)
     {
         bpi.m_RequiredGearUnits[0] = (int)((Settings.options.bedrollWeight / Settings.options.blanketWeight) + 1);
     }
 }
        static bool Postfix(bool __result, ref BlueprintItem __instance)
        {
            if (__result == false)
            {
                return(false);
            }

            var mendingLevel         = MendingHelper.GetCurrentMendingLevel();
            var requiredMendingLevel = MendingHelper.GetRequiredMendingLevel(__instance);

            if (mendingLevel < requiredMendingLevel)
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 19
0
    public void PopulateAvailable()
    {
        int i = 0;

        foreach (Blueprint b in Blueprints)
        {
            BlueprintItem spawned = Instantiate <BlueprintItem>(ItemPrefab, ItemParent);
            (spawned.transform as RectTransform).anchoredPosition = new Vector2(0, -50 * i);
            spawned.Item      = b.Products[0]; // First product is 'primary' product. Other products are secondary and the recipie is not 'theirs'.
            spawned.Blueprint = b;
            items.Add(spawned);
            i++;
        }

        Contents.anchoredPosition = new Vector2(0, 0);
        Contents.sizeDelta        = new Vector2(0, 50 * i);

        RefreshInventory();
    }
Exemplo n.º 20
0
 public static RarityType Rarity(this BlueprintItem bp)
 {
     if (bp == null)
     {
         return(RarityType.None);
     }
     if (bp.IsNotable)
     {
         return(RarityType.Notable);
     }
     if (bp is BlueprintItemNote noteBP)
     {
         var component = noteBP.GetComponent <AddItemShowInfoCallback>();
         if (component != null)
         {
             return(RarityType.Notable);
         }
     }
     return(Rarity(bp.Rating()));
 }
        public static int GetRequiredMendingLevel(BlueprintItem blueprintItem)
        {
            var gearItem = blueprintItem.m_CraftedResult;

            if (!IsClothing(gearItem))
            {
                return(0);
            }

            var name     = gearItem.name;
            var settings = BetterXPMendingSettings.Instance;

            if (name.StartsWith("GEAR_Rabbit"))
            {
                return(settings.RabbitLevel);
            }

            if (name.StartsWith("GEAR_Deer"))
            {
                return(settings.DeerLevel);
            }

            if (name.StartsWith("GEAR_Moose"))
            {
                return(settings.MooseLevel);
            }

            if (name.StartsWith("GEAR_Wolf"))
            {
                return(settings.WolfLevel);
            }

            if (name.StartsWith("GEAR_Bear"))
            {
                return(settings.BearLevel);
            }

            return(0);
        }
Exemplo n.º 22
0
        internal static void MapBlueprint(ModBlueprint modBlueprint)
        {
            BlueprintItem bpItem = GameManager.GetBlueprints().AddComponent <BlueprintItem>();

            if (bpItem is null)
            {
                throw new Exception("Error creating Blueprint");
            }

            bpItem.m_DurationMinutes = modBlueprint.DurationMinutes;
            bpItem.m_CraftingAudio   = modBlueprint.CraftingAudio;

            bpItem.m_RequiredCraftingLocation = ModComponentUtils.EnumUtils.TranslateEnumValue <CraftingLocation, ModComponentAPI.CraftingLocation>(modBlueprint.RequiredCraftingLocation);
            bpItem.m_RequiresLitFire          = modBlueprint.RequiresLitFire;
            bpItem.m_RequiresLight            = modBlueprint.RequiresLight;

            bpItem.m_Locked             = false;
            bpItem.m_AppearsInStoryOnly = false;

            bpItem.m_CraftedResultCount = modBlueprint.CraftedResultCount;
            bpItem.m_CraftedResult      = ModComponentUtils.ModUtils.GetItem <GearItem>(modBlueprint.CraftedResult);

            if (!string.IsNullOrEmpty(modBlueprint.RequiredTool))
            {
                bpItem.m_RequiredTool = ModComponentUtils.ModUtils.GetItem <ToolsItem>(modBlueprint.RequiredTool);
            }
            bpItem.m_OptionalTools = ModComponentUtils.ModUtils.NotNull(ModComponentUtils.ModUtils.GetMatchingItems <ToolsItem>(modBlueprint.OptionalTools));

            bpItem.m_RequiredGear           = ModComponentUtils.ModUtils.NotNull(ModComponentUtils.ModUtils.GetMatchingItems <GearItem>(modBlueprint.RequiredGear));
            bpItem.m_RequiredGearUnits      = modBlueprint.RequiredGearUnits;
            bpItem.m_KeroseneLitersRequired = modBlueprint.KeroseneLitersRequired;
            bpItem.m_GunpowderKGRequired    = modBlueprint.GunpowderKGRequired;

            bpItem.m_AppliedSkill  = ModComponentUtils.EnumUtils.TranslateEnumValue <SkillType, ModComponentAPI.SkillType>(modBlueprint.AppliedSkill);
            bpItem.m_ImprovedSkill = ModComponentUtils.EnumUtils.TranslateEnumValue <SkillType, ModComponentAPI.SkillType>(modBlueprint.ImprovedSkill);
        }
Exemplo n.º 23
0
            internal static void Postfix(BlueprintItem bpi)
            {
                if (bpi?.m_CraftedResult?.name == "GEAR_GunpowderCan")
                {
                    switch (Settings.instance.gunpowderLocationIndex)
                    {
                    case 0:
                        bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                        break;

                    case 1:
                        bpi.m_RequiredCraftingLocation = CraftingLocation.Workbench;
                        break;

                    case 2:
                        bpi.m_RequiredCraftingLocation = CraftingLocation.AmmoWorkbench;
                        break;

                    default:
                        MelonLoader.MelonLogger.Error("Gunpowder setting returned an unacceptable value");
                        break;
                    }
                }
            }
        public static void Load()
        {
            BlueprintCharacterClass inquisitor            = library.Get <BlueprintCharacterClass>("f1a70d9e1b0b41e49874e1fa9052a1ce"); // Inquisitor
            BlueprintProgression    inquisitorProgression = library.Get <BlueprintProgression>("4e945c2fe5e252f4ea61eee7fb560017");    // InquisitorProgression

            livingGrimoire = Helpers.Create <BlueprintArchetype>(l =>
            {
                l.name                 = "LivingGrimoireArchetype";
                l.LocalizedName        = Helpers.CreateString("LivingGrimoire.Name", "Living Grimoire");
                l.LocalizedDescription = Helpers.CreateString("LivingGrimoire.Description", "The living grimoire literally wields the sacred word of his deity, using his holy tome to smite the foes of his god with divine might. Unlike most inquisitors, a living grimoire focuses on careful study of divine scripture, valuing knowledge over intuition.");
            });

            livingGrimoireArray = new BlueprintArchetype[] { livingGrimoire };
            library.AddAsset(livingGrimoire, Helpers.getGuid("LivingGrimoireArchetype"));
            livingGrimoire.SetIcon(inquisitor.Icon);
            livingGrimoire.BaseAttackBonus = inquisitor.BaseAttackBonus;
            livingGrimoire.FortitudeSave   = inquisitor.FortitudeSave;
            livingGrimoire.ReflexSave      = inquisitor.ReflexSave;
            livingGrimoire.WillSave        = inquisitor.WillSave;

            Helpers.SetField(livingGrimoire, "m_ParentClass", inquisitor);

            livingGrimoire.LocalizedName = Helpers.CreateString("LivingGrimoire.Name", "Living Grimoire");

            BlueprintSpellbook MagusSpellbook      = library.Get <BlueprintSpellbook>("5d8d04e76dff6c5439de99af0d57be63"); // MagusSpellbook
            BlueprintSpellbook InquisitorSpellbook = library.Get <BlueprintSpellbook>("57fab75111f377248810ece84193a5a5"); // InquisitorSpellbook
            BlueprintSpellbook spellbook           = Helpers.Create <BlueprintSpellbook>();

            spellbook.name = "LivingGrimoireSpellbook";
            library.AddAsset(spellbook, Helpers.getGuid("LivingGrimoireSpellbook"));
            spellbook.Name             = livingGrimoire.LocalizedName;
            spellbook.SpellsPerDay     = MagusSpellbook.SpellsPerDay;
            spellbook.SpellList        = InquisitorSpellbook.SpellList;
            spellbook.CharacterClass   = inquisitor;
            spellbook.CastingAttribute = StatType.Intelligence;
            spellbook.Spontaneous      = false;
            spellbook.SpellsPerLevel   = 2;
            spellbook.AllSpellsKnown   = false;
            spellbook.CanCopyScrolls   = true;
            spellbook.IsArcane         = false;
            spellbook.CantripsType     = CantripsType.Orisions;


            livingGrimoire.ReplaceSpellbook = spellbook;

            BlueprintItem[] items = new BlueprintItem[]
            {
                (BlueprintItem)((IList <BlueprintCategoryDefaults.CategoryDefaultEntry>)Game.Instance.BlueprintRoot.Progression.CategoryDefaults.Entries).FirstOrDefault <BlueprintCategoryDefaults.CategoryDefaultEntry>((Func <BlueprintCategoryDefaults.CategoryDefaultEntry, bool>)(p => p.Key == WeaponCategory.LightMace))?.DefaultWeapon,
                library.Get <BlueprintItem>("f4cef3ba1a15b0f4fa7fd66b602ff32b"),
                library.Get <BlueprintItem>("d7963e1fcf260c148877afd3252dbc91"),
                library.Get <BlueprintItem>("ec619484fb1a13441b30f6d08e1c5b6f")
            };

            livingGrimoire.StartingItems = items;


            BlueprintFeature HolyBookFeature = Helpers.CreateFeature(
                "HolyBook",
                "Holy Book",
                "At 1st level, a living grimoire forms a supernatural bond with a large ironbound tome containing the holy text of his deity and learns to use it as a weapon.\n When wielding the holy book as a weapon, he deals base damage as if it were a cold iron light mace(but see Sacred Word below), is considered proficient with the book, takes no improvised weapon penalty, and gains a + 1 bonus on attack rolls with the book.The tome serves as his holy symbol and divine focus, and can be enchanted as a magic weapon. \nHe can replace his bonded tome with another book at any time, though he must perform a 24 - hour binding ritual to attune himself to the new book. \n Dev note: This ability works with all light maces.",
                Helpers.getGuid("HolyBook"),
                null,
                FeatureGroup.None,
                Helpers.Create <HolyBookLogic>()
                );

            BlueprintFeature SacredWordFeature = Helpers.CreateFeature(
                "SacredWord",
                "Sacred Word",
                "At 1st (level, a living grimoire learns to charge his holy book with the power of his faith. The inquisitor gains the benefits of the warpriest’s sacred weapon class ability, but the benefits apply only to his bonded holy book. Like a warpriest’s sacred weapon, the living grimoire’s book deals damage based on the inquisitor’s level, not the book’s base damage (unless the inquisitor chooses to use the book’s base damage).\nAt 4th level, the living grimoire gains the ability to enhance his holy book with divine power as a swift action.This ability grants the holy book a + 1 enhancement bonus.For every 4 inquisitor levels the living grimoire has beyond 4th, this bonus increases by 1(to a maximum of + 5 at 20th level).\nThese bonuses stack with any existing bonuses the holy book might have, to a maximum of + 5.The living grimoire can enhance his holy book to have any of the special abilities listed in the warpriest’s sacred weapon ability, subject to the same alignment restrictions, but adds bane to the general special ability list.Adding any of these special abilities to the holy book consumes an amount of enhancement bonus equal to the special ability’s base price modifier.The holy book must have at least a + 1 enhancement bonus before the living grimoire can add any special abilities to it.The living grimoire can use this ability a number of rounds per day equal to his inquisitor level, but these rounds don’t need to be consecutive.As with the warpriest sacred weapon ability, he determines the enhancement bonus and special abilities the first time he uses the ability each day, and they cannot be changed until the next day. \nThis ability replaces judgment.\n Dev note: This ability works with all light maces.",
                Helpers.getGuid("SacredWordFeature"),
                null,
                FeatureGroup.None,
                Helpers.Create <FocusedWeaponLogic>(x =>
            {
                x.Category = WeaponCategory.LightMace;
                x.Class    = inquisitor;
            })
                );

            BlueprintFeature SacredWordFeature1d8 = Helpers.CreateFeature(
                "SacredWord_1d8",
                "Sacred Word 1d8",
                "The damage of your holy book (light maces) increases to 1d8.",
                Helpers.getGuid("SacredWord_1d8"),
                null,
                FeatureGroup.None
                );

            BlueprintFeature SacredWordFeature1d10 = Helpers.CreateFeature(
                "SacredWord_1d10",
                "Sacred Word 1d10",
                "The damage of your holy book (light maces) increases to 1d10.",
                Helpers.getGuid("SacredWord_1d10"),
                null,
                FeatureGroup.None
                );

            BlueprintFeature SacredWordFeature2d6 = Helpers.CreateFeature(
                "SacredWord_2d6",
                "Sacred Word 2d6",
                "The damage of your holy book (light maces) increases to 2d6.",
                Helpers.getGuid("SacredWord_2d6"),
                null,
                FeatureGroup.None
                );

            BlueprintFeature SacredWordFeature2d8 = Helpers.CreateFeature(
                "SacredWord_2d8",
                "Sacred Word 2d8",
                "The damage of your holy book (light maces) increases to 2d8.",
                Helpers.getGuid("SacredWord_2d8"),
                null,
                FeatureGroup.None
                );


            BlueprintBuff InspireCourageBuff = library.Get <BlueprintBuff>("b4027a834204042409248889cc8abf67");
            BlueprintActivatableAbility InspireCourageToggleAbility = library.Get <BlueprintActivatableAbility>("5250fe10c377fdb49be449dfe050ba70"); // InspireCourageToggleAbility

            BlueprintItemEnchantment[] defaultEnchantments = new BlueprintItemEnchantment[]
            {
                library.Get <BlueprintItemEnchantment>("d704f90f54f813043a525f304f6c0050"),
                library.Get <BlueprintItemEnchantment>("9e9bab3020ec5f64499e007880b37e52"),
                library.Get <BlueprintItemEnchantment>("d072b841ba0668846adeb007f623bd6c"),
                library.Get <BlueprintItemEnchantment>("6a6a0901d799ceb49b33d4851ff72132"),
                library.Get <BlueprintItemEnchantment>("746ee366e50611146821d61e391edf16")
            };

            BlueprintBuff SacredWordBuff = Helpers.CreateBuff(
                "SacredWordBuff",
                "Sacred Word",
                "",
                Helpers.getGuid("SacredWordBuff"),
                null,
                InspireCourageBuff.FxOnStart,
                Helpers.Create <AddSacredWordBonus>(x =>
            {
                x.DefaultEnchantments = defaultEnchantments;
                x.DurationValue       = Helpers.CreateContextDuration(rate: DurationRate.Rounds, bonus: 1);
                x.Group       = ActivatableAbilityGroup.DivineWeaponProperty;
                x.EnchantPool = EnchantPoolType.DivineWeaponBond;
            })
                );

            BlueprintAbilityResource abilityResource = Helpers.CreateAbilityResource(
                "SacredWordResource",
                "Sacred Word Resource",
                "",
                Helpers.getGuid("SacredWordResource"),
                null
                );

            abilityResource.SetIncreasedByLevel(1, 1, new BlueprintCharacterClass[] { inquisitor });

            BlueprintAbility            WeaponBondSwitchAbility = library.Get <BlueprintAbility>("7ff088ab58c69854b82ea95c2b0e35b4"); //WeaponBondSwitchAbility
            BlueprintActivatableAbility SacredWordToggleAbility = Helpers.CreateActivatableAbility(
                "SacredWordSwitchAbility",
                "Sacred Word",
                "",
                Helpers.getGuid("SacredWordSwitchAbility"),
                WeaponBondSwitchAbility.Icon,
                SacredWordBuff,
                AbilityActivationType.WithUnitCommand,
                UnitCommand.CommandType.Swift,
                InspireCourageToggleAbility.ActivateWithUnitAnimation,
                abilityResource.CreateActivatableResourceLogic(ActivatableAbilityResourceLogic.ResourceSpendType.NewRound)
                );

            SacredWordToggleAbility.DeactivateIfCombatEnded   = true;
            SacredWordToggleAbility.DeactivateIfOwnerDisabled = true;


            BlueprintActivatableAbility SacredWordFrost      = library.CopyAndAdd <BlueprintActivatableAbility>("b338e43a8f81a2f43a73a4ae676353a5", "SacredWordFrost", Helpers.getGuid("SacredWordFrost"));           // ArcaneWeaponFrostChoice
            BlueprintActivatableAbility SacredWordShock      = library.CopyAndAdd <BlueprintActivatableAbility>("a3a9e9a2f909cd74e9aee7788a7ec0c6", "SacredWordShock", Helpers.getGuid("SacredWordShock"));           // ArcaneWeaponShockChoice
            BlueprintActivatableAbility SacredWordAnarchic   = library.CopyAndAdd <BlueprintActivatableAbility>("8ed07b0cc56223c46953348f849f3309", "SacredWordAnarchic", Helpers.getGuid("SacredWordAnarchic"));     // ArcaneWeaponAnarchicChoice
            BlueprintActivatableAbility SacredWordGhostTouch = library.CopyAndAdd <BlueprintActivatableAbility>("688d42200cbb2334c8e27191c123d18f", "SacredWordGhostTouch", Helpers.getGuid("SacredWordGhostTouch")); // ArcaneWeaponGhostTouchChoice
            BlueprintActivatableAbility SacredWordUnholy     = library.CopyAndAdd <BlueprintActivatableAbility>("561803a819460f34ea1fe079edabecce", "SacredWordUnholy", Helpers.getGuid("SacredWordUnholy"));         // ArcaneWeaponUnholyChoice
            BlueprintActivatableAbility SacredWordBane       = library.CopyAndAdd <BlueprintActivatableAbility>("3a909d1effa3bbc4084f2b5ac95f5306", "SacredWordBane", Helpers.getGuid("SacredWordBane"));             // ArcaneWeaponUnholyChoice

            SacredWordFrost.Group        = ActivatableAbilityGroup.DivineWeaponProperty;
            SacredWordShock.Group        = ActivatableAbilityGroup.DivineWeaponProperty;
            SacredWordAnarchic.Group     = ActivatableAbilityGroup.DivineWeaponProperty;
            SacredWordGhostTouch.Group   = ActivatableAbilityGroup.DivineWeaponProperty;
            SacredWordUnholy.Group       = ActivatableAbilityGroup.DivineWeaponProperty;
            SacredWordBane.Group         = ActivatableAbilityGroup.DivineWeaponProperty;
            SacredWordBane.WeightInGroup = 1;



            BlueprintFeature SacredWordFeatureLevel4 = Helpers.CreateFeature(
                "SacredWord_FeatureLevel4",
                "Sacred Word",
                "At 4th level, the living grimoire gains the ability to enhance his holy book with divine power as a swift action.This ability grants the holy book a + 1 enhancement bonus.For every 4 inquisitor levels the living grimoire has beyond 4th, this bonus increases by 1(to a maximum of + 5 at 20th level).\nThese bonuses stack with any existing bonuses the holy book might have, to a maximum of + 5.The living grimoire can enhance his holy book to have any of the special abilities listed in the warpriest’s sacred weapon ability, subject to the same alignment restrictions, but adds bane to the general special ability list.Adding any of these special abilities to the holy book consumes an amount of enhancement bonus equal to the special ability’s base price modifier.The holy book must have at least a + 1 enhancement bonus before the living grimoire can add any special abilities to it.The living grimoire can use this ability a number of rounds per day equal to his inquisitor level, but these rounds don’t need to be consecutive.As with the warpriest sacred weapon ability, he determines the enhancement bonus and special abilities the first time he uses the ability each day, and they cannot be changed until the next day. \nThis ability replaces judgment.\n Dev note: This ability works with all light maces.",
                Helpers.getGuid("SacredWord_FeatureLevel4"),
                null,
                FeatureGroup.None,
                Helpers.CreateAddFacts(new BlueprintUnitFact[]
            {
                SacredWordToggleAbility,
                library.Get <BlueprintActivatableAbility>("7902941ef70a0dc44bcfc174d6193386"),    //WeaponBondFlamingChoice
                library.Get <BlueprintActivatableAbility>("27d76f1afda08a64d897cc81201b5218"),    //WeaponBondKeenChoice
                SacredWordFrost,
                SacredWordShock,
                SacredWordGhostTouch,
            }),
                Helpers.Create <AddAbilityResources>(x =>
            {
                x.UseThisAsResource = false;
                x.Resource          = library.Get <BlueprintAbilityResource>("3683d1af071c1744185ff93cba9db10b"); // WeaponBondResourse
                x.Amount            = 0;
                x.RestoreAmount     = true;
                x.RestoreOnLevelUp  = false;
            }),
                abilityResource.CreateAddAbilityResource(),
                Helpers.Create <IncreaseResourcesByClass>(x =>
            {
                x.CharacterClass = inquisitor;
                x.Resource       = abilityResource;
                x.BaseValue      = 1;
            })

                );

            BlueprintFeature SacredWordPlus2 = Helpers.CreateFeature(
                "SacredWord_Plus2",
                "Sacred Word",
                "Increases the enchantment bonus from Sacred Word by 1. Adds the enchantments Anarchic, Axiomatic, Disruption, Holy, Unholy",
                Helpers.getGuid("SacredWord_Plus2"),
                null,
                FeatureGroup.None,
                Helpers.Create <IncreaseActivatableAbilityGroupSize>(x => x.Group = ActivatableAbilityGroup.DivineWeaponProperty),
                Helpers.CreateAddFacts(new BlueprintUnitFact[]
            {
                library.Get <BlueprintActivatableAbility>("d76e8a80ab14ac942b6a9b8aaa5860b1"),    //WeaponBondAxiomaticChoice
                library.Get <BlueprintActivatableAbility>("ce0ece459ebed9941bb096f559f36fa8"),    //WeaponBondHolyChoice
                library.Get <BlueprintActivatableAbility>("8c714fbd564461e4588330aeed2fbe1d"),    //WeaponBondDisruptionChoice
                SacredWordAnarchic,
                SacredWordUnholy,
                SacredWordBane
            }));

            BlueprintFeature SacredWordPlus3 = Helpers.CreateFeature(
                "SacredWord_Plus3",
                "Sacred Word",
                "Increases the enchantment bonus from Sacred Word by 1.",
                Helpers.getGuid("SacredWord_Plus3"),
                null,
                FeatureGroup.None,
                Helpers.Create <IncreaseActivatableAbilityGroupSize>(x => x.Group = ActivatableAbilityGroup.DivineWeaponProperty)
                );

            BlueprintFeature SacredWordPlus4 = Helpers.CreateFeature(
                "SacredWord_Plus4",
                "Sacred Word",
                "Increases the enchantment bonus from Sacred Word by 1. Adds the enchantment Brilliant Energy",
                Helpers.getGuid("SacredWord_Plus4"),
                null,
                FeatureGroup.None,
                Helpers.Create <IncreaseActivatableAbilityGroupSize>(x => x.Group = ActivatableAbilityGroup.DivineWeaponProperty),
                Helpers.CreateAddFacts(new BlueprintUnitFact[]
            {
                library.Get <BlueprintActivatableAbility>("f1eec5cc68099384cbfc6964049b24fa"),    //WeaponBondBrilliantEnergyChoice
            }));

            BlueprintFeature SacredWordPlus5 = Helpers.CreateFeature(
                "SacredWord_Plus5",
                "Sacred Word",
                "Increases the enchantment bonus from Sacred Word by 1.",
                Helpers.getGuid("SacredWord_Plus5"),
                null,
                FeatureGroup.None,
                Helpers.Create <IncreaseActivatableAbilityGroupSize>(x => x.Group = ActivatableAbilityGroup.DivineWeaponProperty)
                );

            BlueprintFeatureSelection BlessedScriptSelection = Helpers.CreateFeatureSelection(
                "BlessedScript",
                "Blessed Script",
                "At 5th level, a living grimoire can permanently tattoo one spell of 2nd level or lower from his holy book onto his body. The tattooed spell cannot have an expensive material component or focus. The living grimoire can cast his tattooed spells as a spell-like ability once per day.",
                Helpers.getGuid("BlessedScript"),
                null,
                FeatureGroup.None
                );

            List <BlueprintFeatureSelection> BlessedScriptSpellLevelSelection = new List <BlueprintFeatureSelection>();

            for (int i = 1; i < 7; i++)
            {
                BlueprintFeatureSelection BlessedScriptSpellSelection = Helpers.CreateFeatureSelection(
                    "BlessedScriptLevel" + (i),
                    "Blessed Script Level " + (i),
                    "At 5th level, a living grimoire can permanently tattoo one spell of 2nd level or lower from his holy book onto his body. The tattooed spell cannot have an expensive material component or focus. The living grimoire can cast his tattooed spells as a spell-like ability once per day.",
                    Helpers.getGuid("BlessedScriptLevel" + (i)),
                    null,
                    FeatureGroup.None,
                    inquisitor.PrerequisiteClassLevel((i - 1) * 4)
                    );
                List <BlueprintFeature> SpellSelection = new List <BlueprintFeature>();
                foreach (BlueprintAbility Spell in InquisitorSpellbook.SpellList.GetSpells(i))
                {
                    if (Spell.MaterialComponent.Item != null)
                    {
                        continue;
                    }

                    BlueprintAbilityResource BlessedScriptAbilityResource = Helpers.CreateAbilityResource(
                        "BlessedScriptAbilityResource" + Spell.name,
                        "",
                        "",
                        Helpers.getGuid("BlessedScriptAbilityResource" + Spell.name),
                        null);
                    BlessedScriptAbilityResource.SetFixedResource(1);


                    BlueprintAbility ability        = library.CopyAndAdd(Spell, "BlessedScriptAbility" + Spell.name, Helpers.getGuid("BlessedScriptAbility" + Spell.name));
                    SpellComponent   spellComponent = ability.GetComponent <SpellComponent>();
                    if (spellComponent != null)
                    {
                        ability.RemoveComponent(spellComponent);
                    }
                    ability.AddComponent(Helpers.Create <AbilityResourceLogic>(x =>
                    {
                        x.Amount           = 1;
                        x.IsSpendResource  = true;
                        x.CostIsCustom     = false;
                        x.RequiredResource = BlessedScriptAbilityResource;
                    }));

                    BlueprintFeature BlessedScriptSpell = Helpers.CreateFeature(
                        "BlessedScript" + Spell.name,
                        "Blessed Script (" + Spell.Name + ")",
                        "You have tattooed the spell \"" + Spell.Name + "\" onto your body. You can  can cast his tattooed spells as a spell-like ability once per day.",
                        Helpers.getGuid("BlessedScript" + Spell.name),
                        null,
                        FeatureGroup.None,
                        Helpers.Create <PrerequisiteKnowsSpell>(x =>
                    {
                        x.Ability        = Spell;
                        x.CharacterClass = inquisitor;
                    }),
                        Helpers.CreateAddFacts(ability),
                        Helpers.CreateAddAbilityResource(BlessedScriptAbilityResource)
                        );
                    BlessedScriptSpell.AddComponent(BlessedScriptSpell.PrerequisiteNoFeature());
                    SpellSelection.Add(BlessedScriptSpell);
                }
                BlessedScriptSpellSelection.SetFeatures(SpellSelection);
                BlessedScriptSpellLevelSelection.Add(BlessedScriptSpellSelection);
            }
            BlessedScriptSelection.SetFeatures(BlessedScriptSpellLevelSelection);


            BlueprintBuff TrueJudgmentCooldownBuff = library.Get <BlueprintBuff>("65058aafc91a12042b158527f9d0506a");

            ContextValue CooldownBuff = new ContextValue();

            CooldownBuff.Value = 24;

            BlueprintAbilityResource WordOfGodAbilityResource = Helpers.CreateAbilityResource(
                "WordOfGodAbilityResource",
                "",
                "",
                Helpers.getGuid("WordOfGodAbilityResource"),
                null);

            WordOfGodAbilityResource.SetFixedResource(7);

            AbilityEffectRunAction   abilityEffectRunAction = Helpers.Create <AbilityEffectRunAction>();
            ContextActionSavingThrow savingThrow            = Helpers.Create <ContextActionSavingThrow>();

            savingThrow.Type = SavingThrowType.Fortitude;

            ContextActionConditionalSaved saved = Helpers.Create <ContextActionConditionalSaved>();

            saved.Succeed = new ActionList
            {
                Actions = new GameAction[]
                {
                    Helpers.Create <ContextActionApplyBuff>(ap =>
                    {
                        ap.Buff          = TrueJudgmentCooldownBuff;
                        ap.DurationValue = Helpers.CreateContextDuration(CooldownBuff, DurationRate.Hours);
                    })
                }
            };
            saved.Failed = new ActionList {
                Actions = new GameAction[] { Helpers.Create <ContextActionKillTarget>() }
            };
            savingThrow.Actions = new ActionList {
                Actions = new GameAction[] { saved }
            };


            Conditional conditional = Helpers.Create <Conditional>();

            conditional.ConditionsChecker = new ConditionsChecker();

            ContextConditionHasBuffFromCaster condition = Helpers.Create <ContextConditionHasBuffFromCaster>();

            condition.Buff = TrueJudgmentCooldownBuff;

            conditional.ConditionsChecker.Conditions = new Condition[] { condition };
            conditional.IfFalse = new ActionList {
                Actions = new GameAction[] { savingThrow }
            };

            abilityEffectRunAction.Actions = new ActionList {
                Actions = new GameAction[] { conditional }
            };

            BlueprintAbility TrueJudgmentAbility = library.Get <BlueprintAbility>("d69715dc0de8f8b44ac9f20188c7c22e");

            BlueprintAbility WordOfGodAbility = Helpers.CreateAbility(
                "WordOfGodAbility",
                "Word of God",
                "At 20th level, a living grimoire can smite his foes with the holy word of his deity. Up to seven times per day, the inquisitor can make a single melee attack with his holy book against a target. If the attack hits, it deals damage normally and the target must succeed at a Fortitude save or die (DC = 10 + 1/2 the living grimoire’s inquisitor level + his Intelligence modifier). Regardless of whether the save is successful, the target creature is immune to the living grimoire’s word of god ability for 24 hours. Once the living grimoire uses this ability, he can’t use it again for 1d4 rounds.\nThis ability replaces true judgment.",
                Helpers.getGuid("WordOfGodAbility"),
                TrueJudgmentAbility.Icon,
                AbilityType.Supernatural,
                UnitCommand.CommandType.Standard,
                AbilityRange.Weapon,
                "Instant",
                "Fortitude",
                abilityEffectRunAction
                ,
                Helpers.Create <AbilityResourceLogic>(x =>
            {
                x.Amount           = 1;
                x.IsSpendResource  = true;
                x.CostIsCustom     = false;
                x.RequiredResource = WordOfGodAbilityResource;
            })
                );

            WordOfGodAbility.CanTargetEnemies = true;
            WordOfGodAbility.CanTargetSelf    = false;

            BlueprintFeature TrueJudgmentFeature = library.Get <BlueprintFeature>("f069b6557a2013544ac3636219186632"); // TrueJudgmentFeature

            BlueprintFeature WordOfGod = Helpers.CreateFeature("WordOfGod",
                                                               "Word of God",
                                                               "At 20th level, a living grimoire can smite his foes with the holy word of his deity. Up to seven times per day, the inquisitor can make a single melee attack with his holy book against a target. If the attack hits, it deals damage normally and the target must succeed at a Fortitude save or die (DC = 10 + 1/2 the living grimoire’s inquisitor level + his Intelligence modifier). Regardless of whether the save is successful, the target creature is immune to the living grimoire’s word of god ability for 24 hours. Once the living grimoire uses this ability, he can’t use it again for 1d4 rounds.\nThis ability replaces true judgment.",
                                                               Helpers.getGuid("WordOfGod"),
                                                               TrueJudgmentFeature.Icon,
                                                               FeatureGroup.None,
                                                               Helpers.CreateAddFacts(WordOfGodAbility),
                                                               Helpers.Create <ReplaceAbilitiesStat>(x =>
            {
                x.Stat    = StatType.Intelligence;
                x.Ability = new BlueprintAbility[] { WordOfGodAbility };
            }),
                                                               Helpers.Create <ReplaceCasterLevelOfAbility>(x =>
            {
                x.Spell = WordOfGodAbility;
                x.Class = inquisitor;
            }),
                                                               WordOfGodAbilityResource.CreateAddAbilityResource()
                                                               );

            List <LevelEntry> addFeatures = new List <LevelEntry>();

            addFeatures.Add(Helpers.LevelEntry(1, HolyBookFeature, SacredWordFeature));
            addFeatures.Add(Helpers.LevelEntry(4, SacredWordFeatureLevel4));
            addFeatures.Add(Helpers.LevelEntry(5, BlessedScriptSelection, SacredWordFeature1d8));
            addFeatures.Add(Helpers.LevelEntry(8, SacredWordPlus2, BlessedScriptSelection));
            addFeatures.Add(Helpers.LevelEntry(10, SacredWordFeature1d10));
            addFeatures.Add(Helpers.LevelEntry(12, SacredWordPlus3, BlessedScriptSelection));
            addFeatures.Add(Helpers.LevelEntry(15, SacredWordFeature2d6));
            addFeatures.Add(Helpers.LevelEntry(16, SacredWordPlus4, BlessedScriptSelection));
            addFeatures.Add(Helpers.LevelEntry(20, SacredWordPlus5, WordOfGod, SacredWordFeature2d8));


            BlueprintFeature JudgmentAdditionalUse = library.Get <BlueprintFeature>("ee50875819478774b8968701893b52f5"); //JudgmentAdditionalUse
            BlueprintFeature SecondJudgment        = library.Get <BlueprintFeature>("33bf0404b70d65f42acac989ec5295b2"); // SecondJudgment
            BlueprintFeature ThirdJudgment         = library.Get <BlueprintFeature>("490c7e92b22cc8a4bb4885a027b355db"); // ThirdJudgment

            List <LevelEntry> removeFeatures = new List <LevelEntry>();

            removeFeatures.Add(Helpers.LevelEntry(1, library.Get <BlueprintFeature>("981def910b98200499c0c8f85a78bde8"))); //JudgmentFeature
            removeFeatures.Add(Helpers.LevelEntry(2, library.Get <BlueprintFeature>("6be8b4031d8b9fc4f879b72b5428f1e0"))); //CunningInitiative
            removeFeatures.Add(Helpers.LevelEntry(4, JudgmentAdditionalUse));
            removeFeatures.Add(Helpers.LevelEntry(5, library.Get <BlueprintFeature>("7ddf7fbeecbe78342b83171d888028cf"))); //InquisitorBaneNormalFeatureAdd
            removeFeatures.Add(Helpers.LevelEntry(7, JudgmentAdditionalUse));
            removeFeatures.Add(Helpers.LevelEntry(8, SecondJudgment));
            removeFeatures.Add(Helpers.LevelEntry(10, JudgmentAdditionalUse));
            removeFeatures.Add(Helpers.LevelEntry(12, library.Get <BlueprintFeature>("6e694114b2f9e0e40a6da5d13736ff33")));//InquisitorBaneGreaterFeature
            removeFeatures.Add(Helpers.LevelEntry(13, JudgmentAdditionalUse));
            removeFeatures.Add(Helpers.LevelEntry(16, JudgmentAdditionalUse, ThirdJudgment));
            removeFeatures.Add(Helpers.LevelEntry(19, JudgmentAdditionalUse));
            removeFeatures.Add(Helpers.LevelEntry(20, TrueJudgmentFeature));

            livingGrimoire.AddFeatures    = addFeatures.ToArray();
            livingGrimoire.RemoveFeatures = removeFeatures.ToArray();

            UIGroup SacredWordGroup = new UIGroup();

            SacredWordGroup.Features.Add(SacredWordFeature);
            SacredWordGroup.Features.Add(SacredWordFeatureLevel4);
            SacredWordGroup.Features.Add(SacredWordPlus2);
            SacredWordGroup.Features.Add(SacredWordPlus3);
            SacredWordGroup.Features.Add(SacredWordPlus4);
            SacredWordGroup.Features.Add(SacredWordPlus5);
            SacredWordGroup.Features.Add(SacredWordFeature1d8);
            SacredWordGroup.Features.Add(SacredWordFeature1d10);
            SacredWordGroup.Features.Add(SacredWordFeature2d6);
            SacredWordGroup.Features.Add(SacredWordFeature2d8);
            inquisitorProgression.UIGroups = inquisitorProgression.UIGroups.AddToArray(SacredWordGroup);
            UIGroup BlessedScriptGroup = new UIGroup();

            BlessedScriptGroup.Features.Add(BlessedScriptSelection);
            inquisitorProgression.UIGroups = inquisitorProgression.UIGroups.AddToArray(BlessedScriptGroup);

            List <BlueprintArchetype> archetypes = inquisitor.Archetypes.ToList();

            archetypes.Insert(0, livingGrimoire);
            inquisitor.Archetypes = archetypes.ToArray();
        }
Exemplo n.º 25
0
 internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == "GEAR_ScrapMetal" && __instance.m_CurrentCategory == Panel_Crafting.Category.Tools)
     {
         __result = true;
     }
 }
Exemplo n.º 26
0
 private IRegistrationBuilder <object, ConcreteReflectionActivatorData, SingleRegistrationStyle> RegisterType(ContainerBuilder builder, BlueprintItem item)
 {
     return(builder.RegisterType(item.Type)
            .WithProperty("Feature", item.Feature)
            .WithMetadata("Feature", item.Feature));
 }
 public static bool IsClothing(BlueprintItem blueprintItem)
 {
     return(IsClothing(blueprintItem.m_CraftedResult));
 }
Exemplo n.º 28
0
 internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == "GEAR_FlintAndSteel" && __instance.m_CurrentCategory == Panel_Crafting.Category.FireStarting)
     {
         __result = true;
     }
 }
 internal static void Postfix(Panel_Crafting __instance, ref bool __result, BlueprintItem bpi)
 {
     if (bpi?.m_CraftedResult?.name == SCRAP_METAL_NAME && __instance.m_CurrentCategory == Panel_Crafting.Category.Tools)
     {
         __result = true;
     }
 }
Exemplo n.º 30
0
            internal static void Postfix(BlueprintItem bpi)
            {
                if (Settings.options.arrowAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Arrow")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.arrowheadAnywhere && bpi?.m_CraftedResult?.name == "GEAR_ArrowHead")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.arrowShaftAnywhere && bpi?.m_CraftedResult?.name == "GEAR_ArrowShaft")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.bearskinBedrollAnywhere && bpi?.m_CraftedResult?.name == "GEAR_BearSkinBedRoll")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.bearskinCoatAnywhere && bpi?.m_CraftedResult?.name == "GEAR_BearSkinCoat")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.bedrollAnywhere && bpi?.m_CraftedResult?.name == "GEAR_BedRoll")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.bowAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Bow")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.bulletAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Bullet")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.patchworkBlanketAnywhere && bpi?.m_CraftedResult?.name == "GEAR_ClothSheet")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.deerskinBootsAnywhere && bpi?.m_CraftedResult?.name == "GEAR_DeerSkinBoots")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.deerskinPantsAnywhere && bpi?.m_CraftedResult?.name == "GEAR_DeerSkinPants")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.gunpowderAnywhere && bpi?.m_CraftedResult?.name == "GEAR_GunpowderCan")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.improvisedHatchetAnywhere && bpi?.m_CraftedResult?.name == "GEAR_HatchetImprovised")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.hookAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Hook")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.improvisedKnifeAnywhere && bpi?.m_CraftedResult?.name == "GEAR_KnifeImprovised")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.lineAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Line")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.moosehideSatchelAnywhere && bpi?.m_CraftedResult?.name == "GEAR_MooseHideBag")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.moosehideCloakAnywhere && bpi?.m_CraftedResult?.name == "GEAR_MooseHideCloak")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.rabbitskinHatAnywhere && bpi?.m_CraftedResult?.name == "GEAR_RabbitskinHat")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.rabbitskinMittsAnywhere && bpi?.m_CraftedResult?.name == "GEAR_RabbitSkinMittens")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.revolverAmmunitionAnywhere && bpi?.m_CraftedResult?.name == "GEAR_RevolverAmmoSingle")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.rifleAmmunitionAnywhere && bpi?.m_CraftedResult?.name == "GEAR_RifleAmmoSingle")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.snareAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Snare")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.waterskinAnywhere && bpi?.m_CraftedResult?.name == "GEAR_Waterskin")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }

                else if (Settings.options.wolfskinCoatAnywhere && bpi?.m_CraftedResult?.name == "GEAR_WolfSkinCape")
                {
                    bpi.m_RequiredCraftingLocation = CraftingLocation.Anywhere;
                }
            }
Exemplo n.º 31
0
 public static MyBlueprintDefinitionBase.Item FromObjectBuilder(BlueprintItem obItem) =>
 new MyBlueprintDefinitionBase.Item
 {
     Id     = obItem.Id,
     Amount = MyFixedPoint.DeserializeStringSafe(obItem.Amount)
 };