public override void FillCongressVotingArguments(CongressVoting voting)
 {
     voting.Argument1 = CreationCost.ToString();
 }
Ejemplo n.º 2
0
 private void CalcDivGen(long timeMS, StringBuilder infoBuilder)
 {
     if (this.State.Generator.ShadowCloneCount > 0 && !this.State.Generator.IsBuilt)
     {
         int     num     = this.State.Generator.ShadowCloneCount.ToInt();
         CDouble cDouble = timeMS * (long)num * (long)this.State.PremiumBoni.MonumentBuildTimeDivider * (100 + this.State.PremiumBoni.BuildingSpeedUpPercent(true)) / 100;
         long    value   = this.State.Generator.DurationInMS(1) - this.State.Generator.CurrentDuration;
         if (cDouble >= value)
         {
             this.State.Generator.CurrentDuration = 0L;
             this.State.Generator.IsPaid          = false;
             this.State.Generator.IsBuilt         = true;
             this.State.Clones.RemoveUsedShadowClones(num);
             this.State.Generator.ShadowCloneCount = 0;
             infoBuilder.Append("- divinity generator was built\n");
         }
         else
         {
             this.State.Generator.CurrentDuration += cDouble.ToLong();
             cDouble = 0;
         }
     }
     foreach (GeneratorUpgrade current in this.State.Generator.Upgrades)
     {
         if (current.ShadowCloneCount > 0)
         {
             int     num2     = current.ShadowCloneCount.ToInt();
             CDouble cDouble2 = timeMS * (long)num2 * (long)this.State.PremiumBoni.MonumentBuildTimeDivider * (100 + this.State.PremiumBoni.BuildingSpeedUpPercent(true)) / 100;
             int     num3     = 0;
             while (cDouble2 > 0)
             {
                 if (current.StopAt != 0 && current.StopAt <= current.Level)
                 {
                     this.State.Clones.RemoveUsedShadowClones(current.ShadowCloneCount);
                     current.ShadowCloneCount = 0;
                     cDouble2 = 0;
                 }
                 else
                 {
                     long value2 = current.DurationInMS(1) - current.CurrentDuration;
                     if (cDouble2 >= value2)
                     {
                         cDouble2 -= value2;
                         current.CurrentDuration = 0L;
                         bool flag = false;
                         if (!current.IsPaid)
                         {
                             foreach (CreationCost current2 in current.RequiredCreations)
                             {
                                 if (!CreationCost.HasCreations(this.State, current2, this.State.GameSettings.AutoBuyCreationsForMonuments))
                                 {
                                     flag = true;
                                     current.CurrentDuration = current.DurationInMS(1);
                                     cDouble2 = 0;
                                     break;
                                 }
                             }
                         }
                         if (!flag)
                         {
                             if (!current.IsPaid)
                             {
                                 using (List <CreationCost> .Enumerator enumerator3 = current.RequiredCreations.GetEnumerator())
                                 {
                                     while (enumerator3.MoveNext())
                                     {
                                         CreationCost cost     = enumerator3.Current;
                                         Creation     creation = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == cost.TypeEnum);
                                         creation.Count -= cost.CountNeeded;
                                     }
                                 }
                             }
                             else
                             {
                                 current.IsPaid = false;
                             }
                             num3++;
                             GeneratorUpgrade expr_3BE = current;
                             expr_3BE.Level = ++expr_3BE.Level;
                             if (this.State.GameSettings.StopDivinityGenBuilding)
                             {
                                 this.State.Clones.RemoveUsedShadowClones(current.ShadowCloneCount);
                                 current.ShadowCloneCount = 0;
                                 current.CurrentDuration  = 0L;
                                 cDouble2 = 0;
                             }
                         }
                     }
                     else
                     {
                         current.CurrentDuration += cDouble2.ToLong();
                         cDouble2 = 0;
                     }
                 }
             }
             if (num3 > 0)
             {
                 infoBuilder.Append("- upgrade: ").Append(current.Name).Append(" was built ").Append(num3).Append(" x\n");
             }
         }
     }
     infoBuilder.Append("After your break, you feel refreshed and your creation speed is tripled for the next ").Append(Conv.MsToGuiText(this.State.CreatingSpeedBoniDuration, true)).Append("!");
 }
Ejemplo n.º 3
0
        private void CalcCreations(long timeMS, StringBuilder infoBuilder)
        {
            CDouble cDouble = this.State.CreationSpeed(timeMS) / 3L;
            long    num     = timeMS;
            bool    flag    = false;

            if ((this.State.GameSettings.LastCreation != null && this.State.GameSettings.LastCreation.TypeEnum == Creation.CreationType.Shadow_clone) || (this.State.GameSettings.CreateShadowClonesIfNotMax && this.State.Clones.Count < this.State.Clones.MaxShadowClones))
            {
                flag = true;
            }
            if (flag)
            {
                Creation creation = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Shadow_clone);
                Creation.UpdateDurationMulti(this.State);
                CDouble cDouble2 = cDouble / creation.DurationInMS * (this.State.PremiumBoni.CreationCountBoni(true) + 1);
                if (cDouble2 > timeMS / 30L * (this.State.PremiumBoni.CreationCountBoni(true) + 1))
                {
                    cDouble2 = timeMS / 30L * (this.State.PremiumBoni.CreationCountBoni(true) + 1);
                }
                if (cDouble2 > 0)
                {
                    CDouble cDouble3 = timeMS / cDouble2;
                    bool    flag2    = this.State.GameSettings.LastCreation != null && this.State.GameSettings.LastCreation.TypeEnum == Creation.CreationType.Shadow_clone;
                    if (cDouble2 + creation.Count > this.State.Clones.MaxShadowClones && this.State.GameSettings.CreateShadowClonesIfNotMax && !flag2)
                    {
                        cDouble2 = this.State.Clones.MaxShadowClones - creation.Count;
                        num     -= cDouble2.ToLong() * cDouble3.ToLong();
                    }
                    creation.TotalCreated += cDouble2;
                    this.State.Clones.TotalClonesCreated          += cDouble2;
                    this.State.Statistic.TotalShadowClonesCreated += cDouble2;
                    if (cDouble2 > 0)
                    {
                        infoBuilder.Append("- created ").Append(cDouble2.GuiText).Append(" Shadow Clones\n");
                    }
                    if (this.State.Clones.Count + cDouble2 > this.State.Clones.MaxShadowClones)
                    {
                        cDouble2 = this.State.Clones.MaxShadowClones - this.State.Clones.Count;
                    }
                    this.State.Clones.Count = this.State.Clones.Count + cDouble2.ToInt();
                    if (this.State.Clones.Count < this.State.Clones.MaxShadowClones)
                    {
                        num = 0L;
                    }
                }
            }
            if (this.State.GameSettings.LastCreation != null && this.State.GameSettings.LastCreation.TypeEnum != Creation.CreationType.Shadow_clone && App.CurrentPlattform == Plattform.Android)
            {
                while (num > 0L)
                {
                    cDouble = this.State.CreationSpeed(num) / 3L;
                    Creation creation2 = this.State.GameSettings.LastCreation;
                    CDouble  cDouble4  = creation2.DurationInMS;
                    if (cDouble4 < 30)
                    {
                        cDouble4 = 30;
                    }
                    CDouble cDouble5 = cDouble / cDouble4;
                    if (cDouble5 < 1)
                    {
                        creation2.currentDuration += cDouble.ToLong();
                        break;
                    }
                    cDouble5.Round();
                    cDouble5 *= this.State.PremiumBoni.CreationCountBoni(true) + 1;
                    List <CreationCost> list = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                    bool flag3 = true;
                    foreach (CreationCost current in list)
                    {
                        if (!CreationCost.HasCreations(this.State, current, this.State.GameSettings.AutoBuyCreations))
                        {
                            flag3 = false;
                        }
                    }
                    if (!flag3)
                    {
                        cDouble5 = this.State.GameSettings.CreationToCreateCount;
                        if (cDouble5 == 0)
                        {
                            cDouble5 = 1;
                        }
                        list  = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                        flag3 = true;
                        foreach (CreationCost current2 in list)
                        {
                            if (!CreationCost.HasCreations(this.State, current2, this.State.GameSettings.AutoBuyCreations))
                            {
                                flag3 = false;
                            }
                        }
                        if (flag3)
                        {
                            bool flag4 = true;
                            while (flag4)
                            {
                                cDouble5 *= 2;
                                list      = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                                foreach (CreationCost current3 in list)
                                {
                                    if (!CreationCost.HasCreations(this.State, current3, this.State.GameSettings.AutoBuyCreations))
                                    {
                                        flag4     = false;
                                        cDouble5 /= 2;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    if (!flag3)
                    {
                        infoBuilder.Append("- you failed to create " + creation2.Name + " because of missing prerequisites or divinity, so you created stones instead.\n");
                        list      = new List <CreationCost>();
                        creation2 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Stone);
                        cDouble4  = creation2.DurationInMS;
                        if (cDouble4 < 30)
                        {
                            cDouble4 = 30;
                        }
                        cDouble5 = cDouble / cDouble4 * (this.State.PremiumBoni.CreationCountBoni(true) + 1);
                    }
                    CDouble cDouble6 = cDouble5 + creation2.Count;
                    CDouble cDouble7 = -1;
                    if (creation2.NextAtCount > 0)
                    {
                        if (this.State.GameSettings.CreationsNextAtMode == 1)
                        {
                            cDouble7 = creation2.NextAtCount - creation2.Count;
                        }
                        else if (this.State.GameSettings.CreationsNextAtMode == 2)
                        {
                            cDouble7 = creation2.NextAtCount - creation2.TotalCreated;
                        }
                    }
                    if (cDouble7 != -1 && cDouble5 > cDouble7 && flag3)
                    {
                        if (cDouble7 > 0)
                        {
                            cDouble5 = cDouble7;
                            CDouble cDouble8 = (cDouble5 * cDouble4 / (this.State.PremiumBoni.CreationCountBoni(true) + 1)).ToLong();
                            cDouble8 = cDouble8 / this.State.PremiumBoni.CreationDopingDivider / (100 + this.State.PremiumBoni.CreatingSpeedUpPercent(true)) * 100;
                            num     -= cDouble8.ToLong();
                        }
                        else
                        {
                            cDouble5 = 0;
                        }
                    }
                    else
                    {
                        num = 0L;
                    }
                    if (num > 0L && this.State.GameSettings.LastCreation.TypeEnum != Creation.CreationType.Universe)
                    {
                        Creation creation3 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == this.State.GameSettings.LastCreation.TypeEnum + 1);
                        if (!creation3.GodToDefeat.IsDefeated)
                        {
                            break;
                        }
                        this.State.GameSettings.LastCreation = creation3;
                    }
                    else
                    {
                        num = 0L;
                    }
                    if (cDouble5 > 1)
                    {
                        list = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                        using (List <CreationCost> .Enumerator enumerator4 = list.GetEnumerator())
                        {
                            while (enumerator4.MoveNext())
                            {
                                CreationCost cost      = enumerator4.Current;
                                Creation     creation4 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == cost.TypeEnum);
                                creation4.Count -= cost.CountNeeded;
                                if (creation4.Count < 0)
                                {
                                    Log.Info(string.Concat(new object[]
                                    {
                                        creation4.Name,
                                        " had ",
                                        creation4.Count,
                                        "!"
                                    }));
                                    creation4.Count = 0;
                                }
                            }
                        }
                        cDouble5.Floor();
                        creation2.Count        += cDouble5;
                        creation2.TotalCreated += cDouble5;
                        this.State.CheckForAchievement(creation2);
                        this.State.CheckForAchievement(creation2);
                        this.State.CheckForAchievement(creation2);
                        infoBuilder.Append("- you created ").Append(cDouble5.GuiText).Append(" " + creation2.Name + "\n\n");
                    }
                }
                num = 0L;
            }
            if (this.State.Statistic.HasStartedUniverseChallenge)
            {
                Creation creation5 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Universe);
                creation5.FinishUUC(this.State);
            }
        }
Ejemplo n.º 4
0
 private void CalcMonuments(long timeMS, StringBuilder infoBuilder)
 {
     foreach (Monument current in this.State.AllMonuments)
     {
         if (current.ShadowCloneCount > 0)
         {
             int     num     = current.ShadowCloneCount.ToInt();
             CDouble cDouble = timeMS * (long)num * (long)this.State.PremiumBoni.MonumentBuildTimeDivider * (100 + this.State.PremiumBoni.BuildingSpeedUpPercent(true)) / 100;
             long    num2    = current.DurationInMS(1);
             long    num3    = num2 / (current.Level.ToLong() + 1L);
             if (num2 < 30L)
             {
                 num2 = 30L;
             }
             if (num3 < 30L)
             {
                 num3 = 30L;
             }
             CDouble rightSide = current.Level * (num2 - num3) / 2;
             CDouble leftSide  = cDouble + rightSide;
             CDouble cDouble2  = Math.Sqrt((leftSide / num3).Double) * 1.414215;
             cDouble2.Floor();
             if (cDouble2 < current.Level)
             {
                 cDouble2 = current.Level;
             }
             if (cDouble2 > current.StopAt && current.StopAt != 0)
             {
                 cDouble2 = current.StopAt;
             }
             if (this.State.GameSettings.StopMonumentBuilding && cDouble2 > current.Level)
             {
                 cDouble2 = current.Level + 1;
             }
             int num4 = (cDouble2 - current.Level).ToInt();
             if (num4 > 20000)
             {
                 num4 = 20000;
             }
             CDouble cDouble3 = 1;
             if (num4 == 0)
             {
                 current.CurrentDuration += cDouble.ToLong();
             }
             else
             {
                 bool    flag     = false;
                 CDouble cDouble4 = cDouble2;
                 if ((num4 + current.Level).ToInt() == current.StopAt && current.StopAt != 0)
                 {
                     current.CurrentDuration = 0L;
                     cDouble4 = --cDouble4;
                 }
                 if (num4 > 1)
                 {
                     cDouble3 = cDouble4 * cDouble4 / 2 + cDouble4 / 2;
                     cDouble3 = cDouble3 - current.Level * current.Level / 2 + current.Level / 2;
                     foreach (CreationCost current2 in current.RequiredCreations(cDouble3))
                     {
                         if (!CreationCost.HasCreations(this.State, current2, this.State.GameSettings.AutoBuyCreationsForMonuments))
                         {
                             flag    = true;
                             cDouble = 0;
                             break;
                         }
                     }
                     while (flag)
                     {
                         flag     = false;
                         num4    /= 2;
                         cDouble2 = num4 + current.Level;
                         if (num4 < 1)
                         {
                             break;
                         }
                         cDouble3 = cDouble2 * cDouble2 / 2 + cDouble2 / 2;
                         cDouble3 = cDouble3 - current.Level * current.Level / 2 + current.Level / 2;
                         foreach (CreationCost current3 in current.RequiredCreations(cDouble3))
                         {
                             if (!CreationCost.HasCreations(this.State, current3, this.State.GameSettings.AutoBuyCreationsForMonuments))
                             {
                                 flag    = true;
                                 cDouble = 0;
                                 break;
                             }
                         }
                     }
                 }
                 if (!flag)
                 {
                     if (num4 > 1)
                     {
                         using (List <CreationCost> .Enumerator enumerator4 = current.RequiredCreations(cDouble3).GetEnumerator())
                         {
                             while (enumerator4.MoveNext())
                             {
                                 CreationCost cost     = enumerator4.Current;
                                 Creation     creation = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == cost.TypeEnum);
                                 creation.Count -= cost.CountNeeded;
                                 if (creation.count < 0)
                                 {
                                     creation.count = 0;
                                 }
                             }
                         }
                     }
                     current.Level += num4;
                     this.State.Statistic.MonumentsCreated += num4;
                     current.AddStatBoni();
                     if (this.State.GameSettings.StopMonumentBuilding)
                     {
                         this.State.Clones.RemoveUsedShadowClones(current.ShadowCloneCount);
                         current.ShadowCloneCount = 0;
                         current.CurrentDuration  = 0L;
                         cDouble = 0;
                     }
                     if (current.TypeEnum == Monument.MonumentType.temple_of_god)
                     {
                         this.State.Generator.IsAvailable = true;
                     }
                 }
             }
             if (current.CurrentDuration < 0L)
             {
                 current.CurrentDuration = 0L;
             }
             if (num4 > 0)
             {
                 infoBuilder.Append("- monument: ").Append(current.Name).Append(" was built ").Append(num4).Append(" x\n");
             }
         }
         if (current.Upgrade.ShadowCloneCount > 0)
         {
             int     num5     = current.Upgrade.ShadowCloneCount.ToInt();
             CDouble cDouble5 = timeMS * (long)num5 * (long)this.State.PremiumBoni.MonumentBuildTimeDivider * (100 + this.State.PremiumBoni.BuildingSpeedUpPercent(true)) / 100;
             int     num6     = 0;
             while (cDouble5 > 0)
             {
                 long value = current.Upgrade.DurationInMS(1) - current.Upgrade.CurrentDuration;
                 if (cDouble5 >= value && current.Upgrade.Level >= current.Upgrade.StopAt && current.Upgrade.StopAt != 0)
                 {
                     this.State.Clones.RemoveUsedShadowClones(current.Upgrade.ShadowCloneCount);
                     current.Upgrade.ShadowCloneCount = 0;
                     current.Upgrade.CurrentDuration  = 0L;
                     cDouble5 = 0;
                 }
                 else if (cDouble5 >= value)
                 {
                     cDouble5 -= value;
                     current.Upgrade.CurrentDuration = 0L;
                     bool flag2 = false;
                     if (!current.Upgrade.IsPaid)
                     {
                         foreach (CreationCost current4 in current.Upgrade.RequiredCreations)
                         {
                             if (!CreationCost.HasCreations(this.State, current4, this.State.GameSettings.AutoBuyCreationsForMonuments))
                             {
                                 flag2    = true;
                                 cDouble5 = 0;
                                 break;
                             }
                         }
                     }
                     if (!flag2)
                     {
                         if (!current.Upgrade.IsPaid)
                         {
                             using (List <CreationCost> .Enumerator enumerator6 = current.Upgrade.RequiredCreations.GetEnumerator())
                             {
                                 while (enumerator6.MoveNext())
                                 {
                                     CreationCost cost      = enumerator6.Current;
                                     Creation     creation2 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == cost.TypeEnum);
                                     creation2.Count -= cost.CountNeeded;
                                     if (creation2.count < 0)
                                     {
                                         creation2.count = 0;
                                     }
                                 }
                             }
                         }
                         else
                         {
                             current.Upgrade.IsPaid = false;
                         }
                         num6++;
                         current.AddUpgradeLevel();
                         if (this.State.GameSettings.StopMonumentBuilding)
                         {
                             this.State.Clones.RemoveUsedShadowClones(current.Upgrade.ShadowCloneCount);
                             current.Upgrade.ShadowCloneCount = 0;
                             current.Upgrade.CurrentDuration  = 0L;
                             cDouble5 = 0;
                         }
                     }
                 }
                 else
                 {
                     current.Upgrade.CurrentDuration += cDouble5.ToLong();
                     cDouble5 = 0;
                 }
             }
             if (num6 > 0)
             {
                 infoBuilder.Append("- upgrade for ").Append(current.Name).Append(" was built ").Append(num6).Append(" x\n");
             }
         }
     }
 }
        private void Show()
        {
            if (CreatingUi.scrollBarsToZero)
            {
                this.scrollPosition         = Vector2.zero;
                CreatingUi.scrollBarsToZero = false;
            }
            if (this.IsAchievement)
            {
                GuiBase.ShowAchievements(App.State.CreatingAchievements, "creating");
                return;
            }
            GUIStyle style = GUI.skin.GetStyle("Label");

            if (this.showAutoBuyOptions)
            {
                this.ShowAutoBuyOptions();
            }
            else if (this.creationToShow != null)
            {
                this.ShowBuyCreations();
            }
            else
            {
                style.fontSize = GuiBase.FontSize(16);
                GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
                GUI.BeginGroup(new Rect(GuiBase.Width(280f), GuiBase.Height(110f), GuiBase.Width(670f), GuiBase.Height(480f)));
                int num = 20;
                GUI.Label(new Rect(GuiBase.Width(345f), GuiBase.Height((float)(num - 7)), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent("Create Clones if not max", "If this is on, shadow clones will be created instead of the selected creation if they are not maxed already."));
                App.State.GameSettings.CreateShadowClonesIfNotMax = GUI.Toggle(new Rect(GuiBase.Width(580f), GuiBase.Height((float)(num - 5)), GuiBase.Width(70f), GuiBase.Height(30f)), App.State.GameSettings.CreateShadowClonesIfNotMax, new GUIContent(string.Empty));
                if (App.State.IsBuyUnlocked)
                {
                    string text = "If this is on, missing creations will be bought automatically if you have enough divinity.";
                    if (App.State.PremiumBoni.AutoBuyCostReduction < 20)
                    {
                        text = string.Concat(new object[]
                        {
                            text,
                            "\nBut beware: there is an additional ",
                            20 - App.State.PremiumBoni.AutoBuyCostReduction,
                            "% transaction fee!"
                        });
                    }
                    App.State.GameSettings.AutoBuyCreations = GUI.Toggle(new Rect(GuiBase.Width(580f), GuiBase.Height((float)(num + 22)), GuiBase.Width(70f), GuiBase.Height(30f)), App.State.GameSettings.AutoBuyCreations, new GUIContent(string.Empty));
                    if (GUI.Button(new Rect(GuiBase.Width(345f), GuiBase.Height((float)(num + 20)), GuiBase.Width(220f), GuiBase.Height(30f)), new GUIContent("Auto buy missing creations", text + "\nClick this button for more advanced settings.")))
                    {
                        this.showAutoBuyOptions = true;
                    }
                }
                num += 50;
                if (App.State.PremiumBoni.CreationCountBoni(true) > 0)
                {
                    num -= 25;
                    if (App.State.GameSettings.CreationToCreateCount == 0)
                    {
                        App.State.GameSettings.CreationToCreateCount = 1;
                    }
                    int num2 = App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1;
                    GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height(15f), GuiBase.Width(155f), GuiBase.Height(30f)), new GUIContent("Creations to create: ", "Cost of resources to create one creation with 1 = 100%, 2 = 195% ... 10 = 775%, 11 = 825%, 12 = 875%..., Creation/s is 100% + 5% for each more than one."));
                    if (App.State.IsCrystalFactoryAvailable)
                    {
                        App.State.GameSettings.MaxAfterEquipCrystal = GUI.Toggle(new Rect(GuiBase.Width(240f), GuiBase.Height((float)(num - 25)), GuiBase.Width(70f), GuiBase.Height(30f)), App.State.GameSettings.MaxAfterEquipCrystal, new GUIContent(string.Empty, "If this is on, your creation count will be adjusted to your maximum count after equipping crystals."));
                    }
                    if (App.CurrentPlattform == Plattform.Android)
                    {
                        GUIStyle textField = Gui.ChosenSkin.textField;
                        if (GUI.Button(new Rect(GuiBase.Width(185f), GuiBase.Height(15f), GuiBase.Width(45f), GuiBase.Height(25f)), App.State.GameSettings.CreationToCreateCount.ToString(), textField))
                        {
                            base.ShowNumberInput("Creations to create (Max = " + (App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1) + ")", App.State.GameSettings.CreationToCreateCount, App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1, delegate(CDouble x)
                            {
                                App.State.GameSettings.CreationToCreateCount = x.ToInt();
                            });
                        }
                    }
                    else
                    {
                        this.CreationInput = GUI.TextField(new Rect(GuiBase.Width(185f), GuiBase.Height(15f), GuiBase.Width(45f), GuiBase.Height(25f)), App.State.GameSettings.CreationToCreateCount.ToString());
                    }
                    Rect position = new Rect(GuiBase.Width(30f), GuiBase.Height(50f), GuiBase.Width(200f), GuiBase.Height(30f));
                    if (position.Contains(Event.current.mousePosition) && this.creationCount != App.State.GameSettings.CreationToCreateCount)
                    {
                        this.creationCount = App.State.GameSettings.CreationToCreateCount;
                        foreach (Creation current in App.State.AllCreations)
                        {
                            current.InitSubItemCost(0);
                        }
                    }
                    App.State.GameSettings.CreationToCreateCount = (int)GUI.HorizontalSlider(position, (float)App.State.GameSettings.CreationToCreateCount, 1f, (float)num2);
                    num += 25;
                }
                style.alignment = TextAnchor.UpperCenter;
                style.fontStyle = FontStyle.Bold;
                GUI.Label(new Rect(GuiBase.Width(25f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), "You are creating:");
                if (App.State.CreatingSpeedBoniDuration > 0L)
                {
                    GUI.Label(new Rect(GuiBase.Width(235f), GuiBase.Height((float)num), GuiBase.Width(400f), GuiBase.Height(30f)), "300% creation speed for the next " + Conv.MsToGuiText(App.State.CreatingSpeedBoniDuration, true) + "!");
                }
                style.fontStyle = FontStyle.Normal;
                num            += 35;
                Creation activeCreation = App.State.GameSettings.LastCreation;
                if (activeCreation == null)
                {
                    activeCreation = App.State.AllCreations.FirstOrDefault((Creation x) => x.IsActive);
                }
                if (activeCreation == null)
                {
                    activeCreation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Shadow_clone);
                }
                GuiBase.CreateProgressBar(num, activeCreation.getPercent(), activeCreation.Name, activeCreation.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                style.alignment = TextAnchor.UpperLeft;
                GUI.Label(new Rect(GuiBase.Width(255f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), "You have: " + activeCreation.Count.ToGuiText(true));
                string text2 = "Change creation";
                if (this.ChooseCreationIsOpen)
                {
                    text2 = "More Info";
                }
                if (GUI.Button(new Rect(GuiBase.Width(485f), GuiBase.Height((float)(num + 10)), GuiBase.Width(140f), GuiBase.Height(30f)), text2))
                {
                    this.ChooseCreationIsOpen = !this.ChooseCreationIsOpen;
                    if (this.ChooseCreationIsOpen)
                    {
                        this.scrollPosition = this.scrollPositionAllCreations;
                    }
                    else
                    {
                        this.scrollPositionAllCreations = this.scrollPosition;
                        this.scrollPosition             = Vector2.zero;
                    }
                }
                num += 25;
                GUI.Label(new Rect(GuiBase.Width(255f), GuiBase.Height((float)num), GuiBase.Width(250f), GuiBase.Height(30f)), "You created: " + activeCreation.TotalCreated.ToGuiText(true));
                num += 35;
                List <CreationCost> list = CreationCost.RequiredCreations(activeCreation.TypeEnum, 0L, false);
                int num3 = 290;
                if (this.ChooseCreationIsOpen)
                {
                    style.fontStyle = FontStyle.Bold;
                    GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(30f)), "Creation");
                    GUI.Label(new Rect(GuiBase.Width(160f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Count", style);
                    GUI.Label(new Rect(GuiBase.Width(290f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Next At", style);
                    GUI.Label(new Rect(GuiBase.Width(375f), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(30f)), "Achieve.", style);
                    style.fontStyle = FontStyle.Normal;
                    GUI.Label(new Rect(GuiBase.Width(475f), GuiBase.Height((float)num), GuiBase.Width(40f), GuiBase.Height(30f)), new GUIContent("N A", "Off will ignore the next at. 1 will go to the next creation if the current number reached the count. 2 will go to the next creation if you created the count by yourself."), style);
                    App.State.GameSettings.CreationsNextAtMode = GUI.Toolbar(new Rect(GuiBase.Width(510f), GuiBase.Height((float)(num - 5)), GuiBase.Width(135f), GuiBase.Height(30f)), App.State.GameSettings.CreationsNextAtMode, this.toolbarNextAt);
                    num  += 35;
                    num3 -= 35;
                }
                this.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(0f), GuiBase.Height((float)num), GuiBase.Width(660f), GuiBase.Height((float)num3)), this.scrollPosition, new Rect(0f, GuiBase.Height((float)num), GuiBase.Width(620f), GuiBase.Height((float)this.svHeight)));
                Achievement first = null;
                if (this.ChooseCreationIsOpen)
                {
                    for (int i = 0; i < App.State.AllCreations.Count; i++)
                    {
                        Creation creation = App.State.AllCreations[i];
                        if (creation.IsActive)
                        {
                            style.fontStyle = FontStyle.Bold;
                        }
                        GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)num), GuiBase.Width(145f), GuiBase.Height(30f)), new GUIContent(creation.Name, creation.Description), style);
                        GUI.Label(new Rect(GuiBase.Width(160f), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(35f)), creation.Count.ToGuiText(true), style);
                        if (App.CurrentPlattform == Plattform.Android && creation.TypeEnum != Creation.CreationType.Shadow_clone)
                        {
                            GUIStyle textField2 = Gui.ChosenSkin.textField;
                            if (GUI.Button(new Rect(GuiBase.Width(290f), GuiBase.Height((float)num), GuiBase.Width(70f), GuiBase.Height(25f)), creation.NextAtCount + string.Empty, textField2))
                            {
                                base.ShowNumberInput("Next at for " + creation.Name, creation.NextAtCount, 2147483647, delegate(CDouble x)
                                {
                                    creation.NextAtCount = x.ToInt();
                                });
                            }
                        }
                        else if (creation.TypeEnum != Creation.CreationType.Shadow_clone)
                        {
                            creation.NextAtString = GUI.TextField(new Rect(GuiBase.Width(290f), GuiBase.Height((float)num), GuiBase.Width(70f), GuiBase.Height(25f)), creation.NextAtCount.ToString());
                        }
                        if (!creation.GodToDefeat.IsDefeated)
                        {
                            GUI.Label(new Rect(GuiBase.Width(365f), GuiBase.Height((float)num), GuiBase.Width(300f), GuiBase.Height(30f)), "Defeat " + creation.GodToDefeat.Name + " to unlock", style);
                        }
                        else
                        {
                            first = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.IntEnum == (int)creation.TypeEnum);
                            if (first != null)
                            {
                                this.AddAchievementImg(first, 370, num, 25);
                                Achievement achievement = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 1);
                                this.AddAchievementImg(achievement, 405, num, 25);
                                Achievement achievement2 = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 2);
                                this.AddAchievementImg(achievement2, 440, num, 25);
                            }
                            if (App.State.IsBuyUnlocked && creation.CanBuy && creation.TypeEnum != Creation.CreationType.Shadow_clone && GUI.Button(new Rect(GuiBase.Width(565f), GuiBase.Height((float)num), GuiBase.Width(60f), GuiBase.Height(25f)), "Buy"))
                            {
                                this.creationToShow = creation;
                            }
                            if (GUI.Button(new Rect(GuiBase.Width(475f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(25f)), "Create"))
                            {
                                bool flag = false;
                                foreach (Creation current2 in App.State.AllCreations)
                                {
                                    if (!current2.GodToDefeat.IsDefeated && current2.IsActive)
                                    {
                                        flag = true;
                                    }
                                }
                                if (App.State.PrinnyBaal.IsFighting)
                                {
                                    flag = true;
                                }
                                if (flag)
                                {
                                    GuiBase.ShowToast("You can't create something while you fight a god!");
                                    App.State.GameSettings.LastCreation = creation;
                                }
                                else
                                {
                                    foreach (Creation current3 in App.State.AllCreations)
                                    {
                                        current3.IsActive = false;
                                    }
                                    creation.IsActive = true;
                                    App.State.GameSettings.LastCreation = creation;
                                    foreach (UltimateBeingV2 current4 in App.State.HomePlanet.UltimateBeingsV2)
                                    {
                                        current4.isCreating = false;
                                    }
                                }
                            }
                        }
                        if (creation.IsActive)
                        {
                            style.fontStyle = FontStyle.Normal;
                        }
                        num += 30;
                    }
                }
                else
                {
                    first = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.IntEnum == (int)activeCreation.TypeEnum);
                    if (first != null)
                    {
                        GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)(num + 10)), GuiBase.Width(200f), GuiBase.Height(50f)), "Achievements for " + activeCreation.Name + ":");
                        this.AddAchievementImg(first, 255, num, 40);
                        Achievement achievement3 = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 1);
                        this.AddAchievementImg(achievement3, 315, num, 40);
                        Achievement achievement4 = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 2);
                        this.AddAchievementImg(achievement4, 375, num, 40);
                        num += 70;
                    }
                    if (list.Count > 0)
                    {
                        style.fontStyle = FontStyle.Bold;
                        int num4 = App.State.GameSettings.CreationToCreateCount;
                        if (num4 == 0)
                        {
                            num4 = 1;
                        }
                        GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)num), GuiBase.Width(210f), GuiBase.Height(50f)), string.Concat(new object[]
                        {
                            "Creations for ",
                            num4,
                            " x ",
                            activeCreation.Name
                        }));
                        if (activeCreation.Name.Length > 8)
                        {
                            num += 20;
                        }
                        style.alignment = TextAnchor.UpperCenter;
                        GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), " you need");
                        GUI.Label(new Rect(GuiBase.Width(335f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), " you have");
                        style.fontStyle = FontStyle.Normal;
                        num            += 30;
                        using (List <CreationCost> .Enumerator enumerator5 = list.GetEnumerator())
                        {
                            while (enumerator5.MoveNext())
                            {
                                CreationCost requirement = enumerator5.Current;
                                Creation     creation3   = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == requirement.TypeEnum);
                                GuiBase.CreateProgressBar(num, creation3.getPercent(), EnumName.Name(requirement.TypeEnum), creation3.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                                GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), requirement.CountNeeded.ToGuiText(true));
                                GUI.Label(new Rect(GuiBase.Width(335f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), creation3.Count.ToGuiText(true));
                                if (App.State.IsBuyUnlocked && creation3.CanBuy && creation3.TypeEnum != Creation.CreationType.Shadow_clone && GUI.Button(new Rect(GuiBase.Width(545f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Buy"))
                                {
                                    this.creationToShow = creation3;
                                }
                                num += 35;
                            }
                        }
                        if (activeCreation.SubItemCreationCost.Count > 0)
                        {
                            num            += 10;
                            style.alignment = TextAnchor.UpperLeft;
                            style.fontStyle = FontStyle.Bold;
                            GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent("Prerequisite Creations", "All creations needed to create the creations you need to create one." + activeCreation.Name));
                            style.alignment = TextAnchor.UpperCenter;
                            style.fontStyle = FontStyle.Normal;
                            num            += 30;
                            using (List <CreationCost> .Enumerator enumerator6 = activeCreation.SubItemCreationCost.GetEnumerator())
                            {
                                while (enumerator6.MoveNext())
                                {
                                    CreationCost requirement = enumerator6.Current;
                                    Creation     creation2   = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == requirement.TypeEnum);
                                    GuiBase.CreateProgressBar(num, creation2.getPercent(), EnumName.Name(requirement.TypeEnum), creation2.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                                    GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), requirement.CountNeeded.ToGuiText(true));
                                    GUI.Label(new Rect(GuiBase.Width(335f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), creation2.Count.ToGuiText(true));
                                    if (App.State.IsBuyUnlocked && creation2.CanBuy && creation2.TypeEnum != Creation.CreationType.Shadow_clone && GUI.Button(new Rect(GuiBase.Width(545f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Buy"))
                                    {
                                        this.creationToShow = creation2;
                                    }
                                    num += 35;
                                }
                            }
                        }
                    }
                }
                this.svHeight = num - 150;
                GUI.EndScrollView();
                GUI.EndGroup();
            }
        }