static void Postfix(WitchHut __instance, int i, ref int __result)
                {
                    SpellDataCustom spellDataCustom = __instance.GetSpellData(i) as SpellDataCustom;

                    if (spellDataCustom != null)
                    {
                        if (spellDataCustom != null && spellDataCustom.scaleCost == false)
                        {
                            __result = spellDataCustom.cost;
                        }
                        else
                        {
                            __result = Mathf.RoundToInt(__result / (1 + i / 10f));
                        }
                    }
                }
                static void Postfix(WitchUI __instance)
                {
                    bool anySpellsAvailable = false;

                    System.Reflection.FieldInfo fieldInfo = typeof(WitchUI).GetField("witch", BindingFlags.NonPublic | BindingFlags.Instance);
                    WitchHut witch = (WitchHut)fieldInfo.GetValue(__instance);

                    fieldInfo = typeof(WitchHut).GetField("spellData", BindingFlags.NonPublic | BindingFlags.Instance);
                    ICollection spellDataCollection = (ICollection)fieldInfo.GetValue(witch);
                    int         spellDataCount      = 0;

                    foreach (object spellData in spellDataCollection)
                    {
                        spellDataCount += 1;
                    }
                    if (spellDataCount == __instance.spellList.transform.childCount)
                    {
                        for (int spellIndex = 0; spellIndex < spellDataCount; spellIndex++)
                        {
                            SpellDataCustom spellDataCustom = witch.GetSpellData(spellIndex) as SpellDataCustom;
                            if (spellDataCustom != null)
                            {
                                bool spellButtonsActive = witch.relationship >= spellDataCustom.relationship;
                                if (!spellButtonsActive)
                                {
                                }
                                __instance.spellList.transform.GetChild(spellIndex).gameObject.SetActive(spellButtonsActive);
                                if (spellButtonsActive)
                                {
                                    anySpellsAvailable = true;
                                }
                            }
                        }
                        if (anySpellsAvailable)
                        {
                            __instance.spellContainer.gameObject.SetActive(true);
                        }
                    }
                }