예제 #1
0
        public static bool SpendGodPower(CDouble cdCount)
        {
            int num = cdCount.ToInt();

            if (App.State.PremiumBoni.GodPower >= num)
            {
                CDouble cDouble  = num;
                CDouble cDouble2 = App.State.PremiumBoni.GodPower - App.State.PremiumBoni.GpBoniPhysical - App.State.PremiumBoni.GpBoniMystic - App.State.PremiumBoni.GpBoniBattle - App.State.PremiumBoni.GpBoniCreating;
                cDouble2.Round();
                if (cDouble2 > 0)
                {
                    cDouble = num - cDouble2;
                    if (cDouble < 0)
                    {
                        cDouble = 0;
                    }
                }
                App.State.PremiumBoni.GpBoniPhysical -= cDouble;
                cDouble = 0;
                if (App.State.PremiumBoni.GpBoniPhysical < 0)
                {
                    cDouble = App.State.PremiumBoni.GpBoniPhysical * -1;
                    App.State.PremiumBoni.GpBoniPhysical = 0;
                }
                App.State.PremiumBoni.GpBoniMystic -= cDouble;
                cDouble = 0;
                if (App.State.PremiumBoni.GpBoniMystic < 0)
                {
                    cDouble = App.State.PremiumBoni.GpBoniMystic * -1;
                    App.State.PremiumBoni.GpBoniMystic = 0;
                }
                App.State.PremiumBoni.GpBoniBattle -= cDouble;
                cDouble = 0;
                if (App.State.PremiumBoni.GpBoniBattle < 0)
                {
                    cDouble = App.State.PremiumBoni.GpBoniBattle * -1;
                    App.State.PremiumBoni.GpBoniBattle = 0;
                }
                App.State.PremiumBoni.GpBoniCreating -= cDouble;
                cDouble = 0;
                if (App.State.PremiumBoni.GpBoniCreating < 0)
                {
                    cDouble = App.State.PremiumBoni.GpBoniCreating * -1;
                    App.State.PremiumBoni.GpBoniCreating = 0;
                }
                App.State.PremiumBoni.TotalGodPowerSpent += num;
                App.State.PremiumBoni.GodPower           -= num;
                App.State.PremiumBoni.permanentGPSpent    = 0;
                return(true);
            }
            GuiBase.ShowToast("You don't have enough god power!");
            return(false);
        }
예제 #2
0
        private static void addTextField(ref CDouble value, int godPowerleft)
        {
            int    num  = value.ToInt();
            string s    = GUI.TextField(new Rect(GuiBase.Width(180f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(60f), GuiBase.Height(25f)), value.ToString());
            int    num2 = 0;

            int.TryParse(s, out num2);
            if (num2 >= 0 && num2 <= godPowerleft + num)
            {
                value = num2;
            }
        }
예제 #3
0
        private static void addSpendPointsButton(ref int marginTop, KredOffersUi.Reward reward, string text, CDouble pointCost, string description = "")
        {
            GUI.Label(new Rect(GuiBase.Width(305f), GuiBase.Height((float)(marginTop + 5)), GuiBase.Width(400f), GuiBase.Height(30f)), new GUIContent(text, description));
            App.State.Ext.AdPoints.Round();
            if (GUI.Button(new Rect(GuiBase.Width(725f), GuiBase.Height((float)marginTop), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Buy for " + pointCost.ToInt())))
            {
                if (App.State.Ext.AdPoints >= pointCost)
                {
                    switch (reward)
                    {
                    case KredOffersUi.Reward.physical:
                        App.State.Multiplier.DrawMultiPhysical = App.State.Multiplier.DrawMultiPhysical * 1.1;
                        GuiBase.ShowToast("Your Physical was increased by 10%!");
                        break;

                    case KredOffersUi.Reward.mystic:
                        App.State.Multiplier.DrawMultiMystic = App.State.Multiplier.DrawMultiMystic * 1.1;
                        GuiBase.ShowToast("Your Mystic was increased by 10%!");
                        break;

                    case KredOffersUi.Reward.battle:
                        App.State.Multiplier.DrawMultiBattle = App.State.Multiplier.DrawMultiBattle * 1.1;
                        GuiBase.ShowToast("Your Battle was increased by 10%!");
                        break;

                    case KredOffersUi.Reward.creating:
                        App.State.Multiplier.DrawMultiCreating = App.State.Multiplier.DrawMultiCreating * 1.1;
                        GuiBase.ShowToast("Your Creating was increased by 10%!");
                        break;

                    case KredOffersUi.Reward.all:
                        App.State.Multiplier.DrawMultiPhysical = App.State.Multiplier.DrawMultiPhysical * 1.1;
                        App.State.Multiplier.DrawMultiMystic   = App.State.Multiplier.DrawMultiMystic * 1.1;
                        App.State.Multiplier.DrawMultiCreating = App.State.Multiplier.DrawMultiCreating * 1.1;
                        App.State.Multiplier.DrawMultiBattle   = App.State.Multiplier.DrawMultiBattle * 1.1;
                        GuiBase.ShowToast("All 4 stats were increased by 10%!");
                        break;

                    case KredOffersUi.Reward.div1:
                    {
                        CDouble cDouble = App.State.DivinityGainSec(true) * 1200;
                        App.State.Money += cDouble;
                        GuiBase.ShowToast("You received " + cDouble.GuiText + " divinity!");
                        break;
                    }

                    case KredOffersUi.Reward.div2:
                    {
                        CDouble cDouble = App.State.DivinityGainSec(true) * 1200 * 2.5;
                        App.State.Money += cDouble;
                        GuiBase.ShowToast("You received " + cDouble.GuiText + " divinity!");
                        break;
                    }

                    case KredOffersUi.Reward.creatingSpeed:
                        App.State.CreatingSpeedBoniDuration += 600000L;
                        GuiBase.ShowToast("Your creating speed is increased to 300% for another 10 minutes!");
                        break;

                    case KredOffersUi.Reward.puny:
                    {
                        State2 expr_3A8 = App.State.Ext;
                        expr_3A8.PunyFood = ++expr_3A8.PunyFood;
                        GuiBase.ShowToast("You received one Puny Food!");
                        break;
                    }

                    case KredOffersUi.Reward.strong:
                    {
                        State2 expr_3D1 = App.State.Ext;
                        expr_3D1.StrongFood = ++expr_3D1.StrongFood;
                        GuiBase.ShowToast("You received one Strong Food!");
                        break;
                    }

                    case KredOffersUi.Reward.mighty:
                    {
                        State2 expr_3FA = App.State.Ext;
                        expr_3FA.MightyFood = ++expr_3FA.MightyFood;
                        GuiBase.ShowToast("You received one Mighty Food!");
                        break;
                    }

                    case KredOffersUi.Reward.lucky:
                    {
                        Premium expr_423 = App.State.PremiumBoni;
                        expr_423.LuckyDraws = ++expr_423.LuckyDraws;
                        GuiBase.ShowToast("You received one Lucky Draw!");
                        break;
                    }
                    }
                    App.State.Ext.AdPoints -= pointCost;
                }
                else
                {
                    GuiBase.ShowToast("You don't have enough Ad points!");
                }
            }
            marginTop += 30;
        }
        private void UpdateAllStats()
        {
            long num = UpdateStats.CurrentTimeMillis() - this.lastUpdateStats;

            this.timerStack     += num;
            this.lastUpdateStats = UpdateStats.CurrentTimeMillis();
            if (this.timerStack < 30L || OfflineCalc.IsCalculating)
            {
                return;
            }
            num              = 30L;
            this.timerStack -= num;
            if (App.State == null)
            {
                return;
            }
            if (UpdateStats.TimeLeftForEvent > 0L)
            {
                App.State.Statistic.TimeUntilNextChocolate -= num;
                if (App.State.Statistic.TimeUntilNextChocolate < 0L)
                {
                    App.State.Statistic.TimeUntilNextChocolate = 1200000L;
                    State2 expr_B4 = App.State.Ext;
                    expr_B4.Chocolate = ++expr_B4.Chocolate;
                    GuiBase.ShowToast("You received 1 chocolate!");
                }
            }
            App.State.Ext.AfkGame.Update(num);
            foreach (Training current in App.State.AllTrainings)
            {
                current.UpdateDuration(num);
            }
            foreach (Skill current2 in App.State.AllSkills)
            {
                current2.UpdateDuration(num);
            }
            foreach (Fight current3 in App.State.AllFights)
            {
                current3.UpdateDuration(num);
            }
            foreach (Creation current4 in App.State.AllCreations)
            {
                current4.UpdateDuration(num);
            }
            foreach (Might current5 in App.State.AllMights)
            {
                current5.UpdateDuration(num);
            }
            App.State.RecoverHealth(num);
            App.State.PremiumBoni.UpdateDuration(num);
            App.State.Generator.UpdateDuration(num);
            App.State.PrinnyBaal.Fight(num);
            App.State.Battle.UpdateData(num);
            SpecialFightUi.UpdateAutoMode(num);
            App.State.CreatingSpeedBoniDuration -= num;
            if (App.State.CreatingSpeedBoniDuration < 0L)
            {
                App.State.CreatingSpeedBoniDuration = 0L;
            }
            if (!App.State.PremiumBoni.TotalMightIsUnlocked)
            {
                App.State.PremiumBoni.TotalMightIsUnlocked = (App.State.AllTrainings[App.State.AllTrainings.Count - 1].IsAvailable && App.State.AllSkills[App.State.AllSkills.Count - 1].IsAvailable);
                if (App.State.PremiumBoni.TotalMightIsUnlocked && !App.State.Statistic.HasStartedArtyChallenge && !App.State.Statistic.HasStartedUltimateBaalChallenge)
                {
                    foreach (Might current6 in App.State.AllMights)
                    {
                        CDouble cDouble = App.State.Statistic.DoubleRebirthChallengesFinished;
                        if (cDouble > 50)
                        {
                            cDouble = 50;
                        }
                        current6.Level += cDouble;
                        App.State.PremiumBoni.TotalMight += (long)cDouble.ToInt();
                    }
                }
            }
            foreach (Monument current7 in App.State.AllMonuments)
            {
                current7.UpdateDuration(num);
                if (App.State.Statistic.HasStartedBlackHoleChallenge && current7.TypeEnum == Monument.MonumentType.black_hole)
                {
                    MonumentUpgrade upgrade = current7.Upgrade;
                    if (current7.Level > 0 && upgrade.Level > 0)
                    {
                        App.State.Statistic.HasStartedBlackHoleChallenge = false;
                        if (App.State.Statistic.FastestBHCallenge <= 0 || App.State.Statistic.FastestBHCallenge > App.State.Statistic.TimeAfterBHCStarted)
                        {
                            App.State.Statistic.FastestBHCallenge = App.State.Statistic.TimeAfterBHCStarted;
                            Leaderboards.SubmitStat(LeaderBoardType.FastestBHCallenge, (int)(App.State.Statistic.FastestBHCallenge.ToLong() / 1000L), false);
                        }
                        App.State.Statistic.TimeAfterBHCStarted = 0;
                        Statistic expr_542 = App.State.Statistic;
                        expr_542.BlackHoleChallengesFinished = ++expr_542.BlackHoleChallengesFinished;
                        App.SaveGameState();
                        GuiBase.ShowToast("You finished your black hole challenge!");
                    }
                }
            }
            foreach (Pet current8 in App.State.Ext.AllPets)
            {
                current8.UpdateDuration(num);
            }
            App.State.HomePlanet.UpdateDuration(num);
            if (HeroImage.ShouldInitRessources)
            {
                //base.StartCoroutine(this.InitAvatarImages());
            }
        }
예제 #5
0
        protected override void ShowScrollViewElements(int marginTop, GUIStyle labelStyle)
        {
            if (this.showInfo)
            {
                labelStyle.alignment = TextAnchor.UpperLeft;
                string text = "\r\nYou can adjust defender clones who will defend against incoming ultimate beings. This fight is just like if you attack them by yourself, but you won't lose hp.\r\nIf you win, you will receive Energy. If you lose, they will steal level 1 crystals (1 - 5 or each kind depending on the UB who attacks) and energy. With energy you can upgrade your modules. If you have upgraded modules, you can adjust shadow clones and they will produce crystals every 10 minutes with the same kind of the module.\r\nYour modules will still generate crystals when you are offline, but UBs won't attack you.\r\n\r\nThey will always produce level 1 crystals which can be upgraded if you have enough of them. You will lose crystals depending on a percentage basis which increases by 5% after every upgrade.\r\nWhen you upgrade crystals, there are two buttons. 'Upgrade Opt' will upgrade your crystals so you won't lose any crystal. For example an ultimate crystal starts at 60%. That means if you have have 8 crystals, only the 'Upgrade All' button is available.  After clicking it, you will lose 4 crystals because 60% of 8 is 4.8 and the number is rounded down.\r\nIf you have at least 10, the 'Upgrade Opt' will appear and would upgrade 6 out of 10 with 4 crystals lost. If you have 11, it would upgrade still 10 with 4 lost and it keeps 1 left over.\r\n\r\nIf you equip crystals, you will get a boost which is shown in their tooltip. You can only equip one of a kind, and the highest grade will be equipped. If you upgrade a crystal of the same kind later to a higher grade, you need to unequip your old one and equip it again for the higher grade to take effect.\r\nYou can only equip 2 different crystals at the beginning. This can be increased if you buy a slot upgrade until at most 6 slots. There is also a very rare chance to receive a slot upgrade with a lucky draw.\r\nWhen you rebirth, all your equipped crystals will give you crystal power depending on their grade. Your crystal power increases various stats which is shown in the god power page.\r\n";
                this.scrollViewHeight = (int)labelStyle.CalcHeight(new GUIContent(text), GuiBase.Width(600f));
                GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)(marginTop - 2)), GuiBase.Width(600f), (float)this.scrollViewHeight), text, labelStyle);
                return;
            }
            double percent = 1.0;

            if (App.State.Ext.Factory.TimeUntilAttack > 0L)
            {
                percent = 1.0 - (double)App.State.Ext.Factory.TimeUntilAttack / 3600000.0;
            }
            string str = string.Empty;

            if (App.State.PremiumBoni.CrystalBonusDefender > 0)
            {
                str = "\nDefender clones will only take " + (100 - App.State.PremiumBoni.CrystalBonusDefender) + " % damage because of equipped crystals.";
            }
            GuiBase.CreateProgressBar(marginTop, percent, "Defender Clones", "Ultimate beings will attack your crystal factory 10 minutes after they become available to fight in the UBs-Tab.\nIf two are available at the same time, there will be a pause of 10 minutes after each fight.\nIf your clones defeat them, you will get the same boost as if you would fight them yourself.\nIf you lose, they will steal some of your energy or level 1 crystals!" + str, GuiBase.progressBg, GuiBase.progressFgRed);
            if (App.State.Ext.Factory.DefenderFightsText.Length > 0 && GUI.Button(new Rect(GuiBase.Width(260f), GuiBase.Height((float)marginTop), GuiBase.Width(60f), GuiBase.Height(30f)), new GUIContent("Log", "Shows a short log of the last UB battles vs your defender clones.")))
            {
                GuiBase.ShowBigMessage(App.State.Ext.Factory.DefenderFightsText.ToString());
                App.State.Ext.Factory.DefenderFightsText = new StringBuilder();
            }
            labelStyle.alignment = TextAnchor.MiddleCenter;
            GUI.Label(new Rect(GuiBase.Width(340f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), App.State.Ext.Factory.DefenderClones.CommaFormatted, labelStyle);
            labelStyle.alignment = TextAnchor.UpperLeft;
            if (GUI.Button(new Rect(GuiBase.Width(450f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+"))
            {
                App.State.Ext.Factory.AddCloneCount(App.State.GameSettings.ClonesToAddCount);
            }
            if (GUI.Button(new Rect(GuiBase.Width(500f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "-"))
            {
                App.State.Ext.Factory.RemoveCloneCount(App.State.GameSettings.ClonesToAddCount);
            }
            marginTop += 35;
            if (App.State.Statistic.HasStarted1kChallenge)
            {
                GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(500f), GuiBase.Height(30f)), "UBs won't attack in 1KC.", labelStyle);
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(500f), GuiBase.Height(30f)), "Next UB attack in: " + Conv.MsToGuiText(App.State.Ext.Factory.TimeUntilAttack, true), labelStyle);
            }
            App.State.GameSettings.AutofillDefenders = GUI.Toggle(new Rect(GuiBase.Width(340f), GuiBase.Height((float)(marginTop + 5)), GuiBase.Width(100f), GuiBase.Height(30f)), App.State.GameSettings.AutofillDefenders, new GUIContent("Autofill", "Automatically fills up your defender clones if you have enough idle clones up to this number"));
            int num = (App.State.Clones.MaxShadowClones - App.State.GameSettings.SavedClonesForFight).ToInt();

            if (App.CurrentPlattform == Plattform.Android)
            {
                GUIStyle textField = Gui.ChosenSkin.textField;
                if (GUI.Button(new Rect(GuiBase.Width(480f), GuiBase.Height((float)(marginTop + 3)), GuiBase.Width(100f), GuiBase.Height(25f)), App.State.GameSettings.MaxDefenderClones.ToString(), textField))
                {
                    base.ShowNumberInput("Maximum number of clones to autofill", App.State.GameSettings.MaxDefenderClones, num, delegate(CDouble x)
                    {
                        App.State.GameSettings.MaxDefenderClones = x.ToInt();
                    });
                }
            }
            else
            {
                string s = GUI.TextField(new Rect(GuiBase.Width(480f), GuiBase.Height((float)(marginTop + 5)), GuiBase.Width(100f), GuiBase.Height(25f)), App.State.GameSettings.MaxDefenderClones.ToString());
                int.TryParse(s, out App.State.GameSettings.MaxDefenderClones);
                if (App.State.GameSettings.MaxDefenderClones > num)
                {
                    App.State.GameSettings.MaxDefenderClones = num;
                }
                if (App.State.GameSettings.MaxDefenderClones < 0)
                {
                    App.State.GameSettings.MaxDefenderClones = 0;
                }
            }
            marginTop           += 40;
            labelStyle.fontSize  = GuiBase.FontSize(18);
            labelStyle.fontStyle = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent("Energy", "Each UB you defeat will give you energy. You can use this energy to upgrade your modules."));
            GUI.Label(new Rect(GuiBase.Width(320f), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent(App.State.Ext.Factory.Energy.GuiText, string.Empty));
            labelStyle.fontStyle = FontStyle.Normal;
            labelStyle.fontSize  = GuiBase.FontSize(16);
            marginTop           += 40;
            labelStyle.alignment = TextAnchor.MiddleCenter;
            labelStyle.fontStyle = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(185f), GuiBase.Height(30f)), new GUIContent("Modules", "You can produce crystals with each module. The count of the produced crystal to be produced is the same as the module level."));
            GUI.Label(new Rect(GuiBase.Width(227f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Level", "A module can only create level 1 crystals. For each level one crystal is produced for each progressbar filled.\nEach level also increases the upgrade chance of crystals of this kind by 1%. This increase is capped at 25% for god or ultimate modules, no cap for the others. The chance can't go lower than 5%, or higher is 95%"));
            GUI.Label(new Rect(GuiBase.Width(340f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Clones", "Adjusted clones will fill the module constantly with light, air and water so the module can produce crystals.\nThe first 4 modules need 10k clones,the ultimate module needs 30k, and the god module 50k for every level.\nClicking + or - will fill in all you need or remove all clones."));
            App.State.GameSettings.AutoBuyForCrystal = GUI.Toggle(new Rect(GuiBase.Width(450f), GuiBase.Height((float)(marginTop + 4)), GuiBase.Width(300f), GuiBase.Height(25f)), App.State.GameSettings.AutoBuyForCrystal, new GUIContent("Autobuy", "If this is on, and you have defeated Nephthys, the game will automatically buy the creations you need to produce crystals."));
            labelStyle.fontStyle = FontStyle.Normal;
            marginTop           += 35;
            foreach (FactoryModule current in App.State.Ext.Factory.AllModules)
            {
                if (current.Crystals.Count > 0)
                {
                }
                GuiBase.CreateProgressBar(marginTop, (double)current.CurrentDuration / (double)current.BaseDuration, current.Name + " Module", current.InfoText, GuiBase.progressBg, GuiBase.progressFgGreen);
                GUI.Label(new Rect(GuiBase.Width(227f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), string.Empty + current.LevelText, labelStyle);
                if (current.Level < current.MaxLevel && GUI.Button(new Rect(GuiBase.Width(225f), GuiBase.Height((float)marginTop), GuiBase.Width(35f), GuiBase.Height(30f)), "+"))
                {
                    current.ChangeLevel(true);
                    current.AddNeededClones();
                }
                if (current.Level > 1 && GUI.Button(new Rect(GuiBase.Width(300f), GuiBase.Height((float)marginTop), GuiBase.Width(35f), GuiBase.Height(30f)), "-"))
                {
                    current.ChangeLevel(false);
                    current.AddNeededClones();
                }
                if (current.MaxLevel > 0)
                {
                    GUI.Label(new Rect(GuiBase.Width(340f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), current.ShadowClones.CommaFormatted, labelStyle);
                    if (GUI.Button(new Rect(GuiBase.Width(450f), GuiBase.Height((float)marginTop), GuiBase.Width(35f), GuiBase.Height(30f)), "+"))
                    {
                        current.AddNeededClones();
                    }
                    if (GUI.Button(new Rect(GuiBase.Width(495f), GuiBase.Height((float)marginTop), GuiBase.Width(35f), GuiBase.Height(30f)), "-"))
                    {
                        current.RemoveAllClones();
                    }
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(365f), GuiBase.Height((float)marginTop), GuiBase.Width(150f), GuiBase.Height(30f)), "Please upgrade first", labelStyle);
                }
                if (GUI.Button(new Rect(GuiBase.Width(540f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Upgrade", "You need " + current.UpgradeCost.GuiText + " Energy to upgrade this module.")))
                {
                    if (current.Upgrade(ref App.State.Ext.Factory.Energy))
                    {
                        GuiBase.ShowToast(current.Name + " has now a max level of " + current.MaxLevel.GuiText + "!");
                    }
                    else
                    {
                        GuiBase.ShowToast("You don't have enough energy!");
                    }
                }
                marginTop += 35;
            }
            marginTop += 35;
            GUI.Label(new Rect(GuiBase.Width(450f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Show All", "If this is off, it will show only the crystals with the highest grade."), labelStyle);
            this.showAll = GUI.Toggle(new Rect(GuiBase.Width(543f), GuiBase.Height((float)(marginTop + 4)), GuiBase.Width(60f), GuiBase.Height(30f)), this.showAll, string.Empty);
            using (List <FactoryModule> .Enumerator enumerator2 = App.State.Ext.Factory.AllModules.GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    FactoryModule module  = enumerator2.Current;
                    Crystal       crystal = App.State.Ext.Factory.EquippedCrystals.FirstOrDefault((Crystal x) => x.Type == module.Type);
                    if (module.Crystals.Count > 0 || crystal != null)
                    {
                        labelStyle.alignment = TextAnchor.UpperLeft;
                        GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent(module.Type + " Crystals"), labelStyle);
                        labelStyle.alignment = TextAnchor.MiddleCenter;
                        if (crystal == null)
                        {
                            if (GUI.Button(new Rect(GuiBase.Width(230f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Equip", "Equip the highest grade of your " + module.Type + " Crystals.")))
                            {
                                if (SpecialFightUi.IsFighting)
                                {
                                    GuiBase.ShowToast("Please finish your special fight first!");
                                }
                                else
                                {
                                    App.State.PremiumBoni.MaxCrystals.Round();
                                    if (App.State.PremiumBoni.MaxCrystals <= App.State.Ext.Factory.EquippedCrystals.Count)
                                    {
                                        GuiBase.ShowToast("You can only equip " + App.State.PremiumBoni.MaxCrystals + " crystals at once!");
                                    }
                                    else
                                    {
                                        Crystal crystal2 = module.Crystals[module.Crystals.Count - 1];
                                        crystal2.Count.Round();
                                        if (crystal2.Count == 0)
                                        {
                                            GuiBase.ShowToast("You don't have any crystals you can equip...");
                                        }
                                        else
                                        {
                                            if (crystal2.Count > 1)
                                            {
                                                crystal2.Count -= 1;
                                            }
                                            else
                                            {
                                                module.Crystals.RemoveAt(module.Crystals.Count - 1);
                                            }
                                            App.State.Ext.Factory.EquippedCrystals.Add(crystal2);
                                        }
                                    }
                                    App.State.PremiumBoni.CheckCrystalBonus(App.State);
                                    if (App.State.GameSettings.MaxAfterEquipCrystal)
                                    {
                                        App.State.GameSettings.CreationToCreateCount = App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1;
                                    }
                                }
                            }
                        }
                        else if (GUI.Button(new Rect(GuiBase.Width(230f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Unequip", "Equip the highest grade of your " + module.Type + " Crystals.")))
                        {
                            App.State.Ext.Factory.EquippedCrystals.Remove(crystal);
                            module.AddCrystal(crystal, 1);
                        }
                        marginTop += 35;
                    }
                    for (int i = 0; i < module.Crystals.Count; i++)
                    {
                        if (i < module.Crystals.Count)
                        {
                            if (this.showAll || i >= module.Crystals.Count - 1)
                            {
                                Crystal crystal3 = module.Crystals[i];
                                if (crystal3.Count > 0)
                                {
                                    GUI.Label(new Rect(GuiBase.Width(60f), GuiBase.Height((float)marginTop), GuiBase.Width(50f), GuiBase.Height(30f)), new GUIContent(crystal3.Image, crystal3.Description));
                                    GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)marginTop), GuiBase.Width(50f), GuiBase.Height(30f)), string.Empty + crystal3.Level.GuiText + "*", labelStyle);
                                    GUI.Label(new Rect(GuiBase.Width(90f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), " x " + crystal3.Count.GuiText, labelStyle);
                                    int maxLevel = crystal3.MaxLevel;
                                    if (crystal3.Level < maxLevel)
                                    {
                                        CDouble cDouble               = crystal3.GetOptimalCount(App.State, module.MaxLevel);
                                        string  text2                 = string.Empty;
                                        CDouble cDouble2              = crystal3.UpgradeChance(App.State, module.MaxLevel, true);
                                        CDouble cDouble3              = crystal3.UpgradeChance(App.State, module.MaxLevel, false);
                                        CDouble countKeepLeftovers    = crystal3.GetCountKeepLeftovers(App.State, module.MaxLevel, crystal3.Count);
                                        CDouble crystalsAfterUpgrade  = crystal3.GetCrystalsAfterUpgrade(App.State, module.MaxLevel, cDouble);
                                        CDouble crystalsAfterUpgrade2 = crystal3.GetCrystalsAfterUpgrade(App.State, module.MaxLevel, countKeepLeftovers);
                                        if (cDouble2.ToInt() > cDouble3)
                                        {
                                            text2 = cDouble3.GuiText + " (capped out of your total chance of " + cDouble2.GuiText + ")";
                                        }
                                        else
                                        {
                                            text2 = cDouble3.GuiText;
                                        }
                                        labelStyle.alignment = TextAnchor.MiddleLeft;
                                        GUI.Label(new Rect(GuiBase.Width(200f), GuiBase.Height((float)marginTop), GuiBase.Width(150f), GuiBase.Height(30f)), " upgrade: " + cDouble3.GuiText + "%", labelStyle);
                                        if (cDouble <= crystal3.Count)
                                        {
                                            if (GUI.Button(new Rect(GuiBase.Width(370f), GuiBase.Height((float)marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), new GUIContent("Upgrade Opt", string.Concat(new object[]
                                            {
                                                "If you upgrade your grade ",
                                                crystal3.Level,
                                                " ",
                                                crystal3.Type,
                                                " crystals to the next grade, ",
                                                text2,
                                                " % of your crystals can be upgraded, the others are lost. This upgrades your crystals with losing the least amount and keeps a left over. You will use ",
                                                cDouble,
                                                " crystals which will be upgraded to ",
                                                crystalsAfterUpgrade.GuiText,
                                                " of the next grade.\nMaxed with grade ",
                                                maxLevel,
                                                ".\n"
                                            }))))
                                            {
                                                module.UpgradeCrystal(App.State, crystal3, module.MaxLevel, cDouble);
                                            }
                                            GUI.Label(new Rect(GuiBase.Width(310f), GuiBase.Height((float)marginTop), GuiBase.Width(210f), GuiBase.Height(30f)), "(" + crystalsAfterUpgrade.GuiText + ")", labelStyle);
                                        }
                                        else if (countKeepLeftovers <= crystal3.Count && countKeepLeftovers > 0)
                                        {
                                            if (GUI.Button(new Rect(GuiBase.Width(370f), GuiBase.Height((float)marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), new GUIContent("Upgrade Keep", string.Concat(new object[]
                                            {
                                                "If you upgrade your grade ",
                                                crystal3.Level,
                                                " ",
                                                crystal3.Type,
                                                " crystals to the next grade, ",
                                                text2,
                                                " % of your crystals can be upgraded, the others are lost. This upgrades your crystals similar to 'Upgrade All', keeps the left over instead of wasting it. You will use ",
                                                countKeepLeftovers,
                                                " crystals which will be upgraded to ",
                                                crystalsAfterUpgrade2.GuiText,
                                                " of the next grade.\nMaxed with grade ",
                                                maxLevel,
                                                ".\n"
                                            }))))
                                            {
                                                module.UpgradeCrystal(App.State, crystal3, module.MaxLevel, countKeepLeftovers);
                                            }
                                            GUI.Label(new Rect(GuiBase.Width(310f), GuiBase.Height((float)marginTop), GuiBase.Width(220f), GuiBase.Height(30f)), "(" + crystalsAfterUpgrade2.GuiText + ")", labelStyle);
                                        }
                                        labelStyle.alignment = TextAnchor.MiddleCenter;
                                        CDouble crystalsAfterUpgrade3 = crystal3.GetCrystalsAfterUpgrade(App.State, module.MaxLevel, crystal3.Count);
                                        if (crystalsAfterUpgrade3 >= 1)
                                        {
                                            if (GUI.Button(new Rect(GuiBase.Width(490f), GuiBase.Height((float)marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), new GUIContent("Upgrade All", string.Concat(new object[]
                                            {
                                                "If you upgrade your grade ",
                                                crystal3.Level,
                                                " ",
                                                crystal3.Type,
                                                " crystals to the next grade, ",
                                                text2,
                                                " % of your crystals can be upgraded, the others are lost. This will use up all your crystals of this grade and keeps no left over. You will use ",
                                                crystal3.Count.GuiText,
                                                " crystals which will be upgraded to ",
                                                crystalsAfterUpgrade3,
                                                " of the next grade.\nMaxed with grade ",
                                                maxLevel,
                                                ".\n"
                                            }))))
                                            {
                                                module.UpgradeCrystal(App.State, crystal3, module.MaxLevel, crystal3.Count);
                                            }
                                        }
                                        else
                                        {
                                            GUI.Label(new Rect(GuiBase.Width(370f), GuiBase.Height((float)marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Not enough crystals.", string.Concat(new object[]
                                            {
                                                cDouble3,
                                                " % of the crystals can be upgraded, the others are lost.\nYou need to have at least ",
                                                crystal3.GetMinimumNeeded(App.State, module.MaxLevel),
                                                " grade ",
                                                crystal3.Level,
                                                " ",
                                                crystal3.Type,
                                                " crystals to be able to upgrade them."
                                            })), labelStyle);
                                        }
                                    }
                                    marginTop += 35;
                                }
                            }
                        }
                    }
                }
            }
            this.scrollViewHeight = marginTop - 140;
        }
예제 #6
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);
            }
        }
예제 #7
0
 protected override void ShowScrollViewElements(int marginTop, GUIStyle labelStyle)
 {
     if (PlanetUi.scrollBarsToZero)
     {
         base.SetScrollbarPosition(Vector2.zero);
         PlanetUi.scrollBarsToZero = false;
     }
     if (this.showInfo)
     {
         labelStyle.alignment = TextAnchor.UpperLeft;
         string text = "Here at your planet you get an extra multiplier. At first your clones can increase the multiplier with powersurge. If you upgrade your planet, you can increase the multiplier faster and fight ultimate beings.\nIf you defeat an ultimate being, your multiplier for physical, mystic, battle and creating will increase, however after each kill the effect will decrease. Tier 1 drops one GP every 5 times, Tier 2 drops once GP twice every 5 times up to once GP every kill for the highest UB! (The counter will reset after rebirthing)\nFighting the ultimate beings works like this: \nFirst you adjust clones, then you press the 'Fight' button and then the fight will be calculated.\nIn the fight some or all your clones might die, so take this into consideration!\nThe power of the ultimate beings is adjusted to your own power. So the number of clones you use is the most important!\nIt is advisable to use more than 100k clones for the first fight and more for the later ones.\nIf you lose a fight, the health the ultimate being lost will stay and it won't recover it's hp. However each ultimate being has a timer. When the timer reaches zero, it will be back to full health. If you killed it, it will also be back and you can fight it again.";
         this.scrollViewHeight = (int)labelStyle.CalcHeight(new GUIContent(text), GuiBase.Width(600f));
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)(marginTop - 2)), GuiBase.Width(600f), (float)this.scrollViewHeight), text, labelStyle);
         return;
     }
     if (this.showV2)
     {
         marginTop += 10;
         this.addPowerSurge(marginTop, labelStyle);
         marginTop += 80;
         this.showUBV2s(marginTop, labelStyle);
         return;
     }
     if (this.showBaalPower)
     {
         labelStyle.alignment = TextAnchor.UpperLeft;
         marginTop           += 2;
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(50f)), "Here you can spend Baal Power to increase your chances to beat UBs. The increased Attack / Defense will last for one fight.", labelStyle);
         marginTop += 50;
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(340f)), "You have " + (App.State.HomePlanet.BaalPower - this.bPAttackUsage - this.bPDefUsage) + " Baal Power", labelStyle);
         marginTop += 50;
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(340f)), "Clone Attack: " + (App.State.ClonesPlanetMod + this.bPAttackUsage * 50) + " %", labelStyle);
         if (App.State.HomePlanet.BaalPower > this.bPAttackUsage + this.bPDefUsage && GUI.Button(new Rect(GuiBase.Width(300f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+"))
         {
             this.bPAttackUsage++;
         }
         if (this.bPAttackUsage > 0 && GUI.Button(new Rect(GuiBase.Width(350f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "-"))
         {
             this.bPAttackUsage--;
         }
         if (this.bPAttackUsage + this.bPDefUsage > App.State.HomePlanet.BaalPower)
         {
             this.bPAttackUsage = 0;
             this.bPDefUsage    = 0;
         }
         marginTop += 50;
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(340f)), "Clone Defense: " + (App.State.ClonesPlanetMod + this.bPDefUsage * 50) + " %", labelStyle);
         if (App.State.HomePlanet.BaalPower > this.bPAttackUsage + this.bPDefUsage && GUI.Button(new Rect(GuiBase.Width(300f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+"))
         {
             this.bPDefUsage++;
         }
         if (this.bPDefUsage > 0 && GUI.Button(new Rect(GuiBase.Width(350f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "-"))
         {
             this.bPDefUsage--;
         }
         marginTop += 50;
         int num = App.State.HomePlanet.PowerSurgeBoni / 2;
         this.useUpPowerSurge = GUI.Toggle(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(280f), GuiBase.Height(30f)), this.useUpPowerSurge, new GUIContent("Use Powersurge (" + num + " %)", "If this is on, your get additional % to Attack and Defense for this fight and the bonus from Powersurge will reset."));
         if (GUI.Button(new Rect(GuiBase.Width(560f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Fight"))
         {
             this.showBaalPower = false;
             if (this.useUpPowerSurge)
             {
                 this.fightLog = this.selectedBeing.Fight(App.State, this.bPAttackUsage, this.bPDefUsage, num, App.State.HomePlanet.ShadowCloneCount, false);
                 App.State.HomePlanet.PowerSurgeBoni = 0;
             }
             else
             {
                 this.fightLog = this.selectedBeing.Fight(App.State, this.bPAttackUsage, this.bPDefUsage, 0, App.State.HomePlanet.ShadowCloneCount, false);
             }
             this.bPDefUsage    = 0;
             this.bPAttackUsage = 0;
             this.isFighting    = true;
         }
         return;
     }
     if (this.isFighting)
     {
         this.scrollViewHeight = this.fightLog.Split(new char[]
         {
             '\n'
         }).Length * 35 + 40;
         labelStyle.alignment = TextAnchor.UpperLeft;
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height((float)(this.scrollViewHeight - 40))), this.fightLog, labelStyle);
         marginTop += this.scrollViewHeight - 40;
         return;
     }
     this.scrollViewHeight = 320;
     if (App.State.HomePlanet.IsCreated)
     {
         marginTop += 10;
         this.addPowerSurge(marginTop, labelStyle);
         marginTop += 80;
         bool flag = false;
         foreach (UltimateBeing current in App.State.HomePlanet.UltimateBeings)
         {
             labelStyle.fontSize = GuiBase.FontSize(16);
             if (current.IsAvailable)
             {
                 GuiBase.CreateProgressBar(marginTop, current.HPPercent / 100.0, current.Name, current.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                 GUI.Label(new Rect(GuiBase.Width(230f), GuiBase.Height((float)marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), string.Empty + Conv.MsToGuiText(current.TimeUntilComeBack, true), labelStyle);
                 GUI.Label(new Rect(GuiBase.Width(355f), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), string.Empty + current.NextMultiplier.ToGuiText(false) + " %", labelStyle);
                 if (current.HPPercent > 0.0 && GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Fight"))
                 {
                     if (App.State.HomePlanet.ShadowCloneCount > 0)
                     {
                         if (App.State.HomePlanet.BaalPower == 0 && App.State.HomePlanet.PowerSurgeBoni < 2)
                         {
                             this.fightLog   = current.Fight(App.State, 0, 0, 0, App.State.HomePlanet.ShadowCloneCount, false);
                             this.isFighting = true;
                         }
                         else
                         {
                             this.showBaalPower = true;
                             this.selectedBeing = current;
                         }
                     }
                     else
                     {
                         GuiBase.ShowToast("You need to add clones to powersurge before starting a fight!");
                     }
                 }
                 if (current.Tier == 5 && current.TimesDefeated > 0)
                 {
                     flag = true;
                 }
             }
             else
             {
                 labelStyle.alignment = TextAnchor.UpperLeft;
                 GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(450f), GuiBase.Height(30f)), "Your planet has to be level " + current.Tier + " to unlock this ultimate being.", labelStyle);
             }
             marginTop += 35;
         }
         labelStyle.alignment = TextAnchor.UpperLeft;
         GUI.Label(new Rect(GuiBase.Width(240f), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), (App.State.HomePlanet.PlanetMultiplier + 100).ToGuiText(true) + " %", labelStyle);
         labelStyle.fontStyle = FontStyle.Bold;
         labelStyle.fontSize  = GuiBase.FontSize(18);
         GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Planet Multiplier", string.Concat(new string[]
         {
             "This multiplier multiplies directly Physical, Mystic, Battle and Creating. 100% is the base value.lowerTextMulti from Powersurge: ",
             App.State.HomePlanet.PowerSurgeMultiplier.GuiText,
             " %\nMulti from Ultimate Beings: ",
             App.State.HomePlanet.UBMultiplier.ToGuiText(true),
             " %"
         })), labelStyle);
         labelStyle.fontStyle = FontStyle.Normal;
         marginTop           += 30;
         if (flag)
         {
             CDouble cDouble = App.State.Statistic.MonumentsCreated;
             cDouble += App.State.Statistic.HighestGodDefeated * 10000;
             cDouble += App.State.Statistic.TotalAchievements * 10;
             cDouble += App.State.Statistic.TotalGodsDefeated * 100;
             cDouble += App.State.Statistic.MostDefeatedShadowClones * 5000;
             cDouble += App.State.Statistic.TBSScore * 100;
             cDouble += App.State.Statistic.TotalTrainingLevels / 100000;
             cDouble += App.State.Statistic.TotalSkillLevels / 100000;
             cDouble += App.State.Statistic.TotalEnemiesDefeated / 200000;
             cDouble += App.State.Statistic.TotalShadowClonesCreated / 5000;
             cDouble += App.State.Statistic.TotalCreations / 10000;
             cDouble += App.State.Clones.MaxShadowClones / 10;
             cDouble += App.State.Statistic.UBsDefeated * 250;
             cDouble += App.State.Statistic.TimePlayed / 50000L;
             cDouble += App.State.PremiumBoni.CrystalPower * 100;
             GUI.Label(new Rect(GuiBase.Width(240f), GuiBase.Height((float)marginTop), GuiBase.Width(150f), GuiBase.Height(30f)), string.Empty + cDouble.ToGuiText(true), labelStyle);
             labelStyle.fontStyle = FontStyle.Bold;
             labelStyle.fontSize  = GuiBase.FontSize(18);
             GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(220f), GuiBase.Height(30f)), new GUIContent("Game Points", "Congratulation for reaching this far! This is calculated from your stats in this game. In Steam you can export the score and keep it. It might be useful in one of my next games.\nFor other plattforms it is just a score you can compare with others currently."), labelStyle);
             labelStyle.fontStyle = FontStyle.Normal;
             if (App.CurrentPlattform == Plattform.Steam && GUI.Button(new Rect(GuiBase.Width(450f), GuiBase.Height((float)marginTop), GuiBase.Width(180f), GuiBase.Height(30f)), "I win"))
             {
                 string        password      = "******";
                 StringBuilder stringBuilder = new StringBuilder();
                 Conv.AppendValue(stringBuilder, "a", UnityEngine.Random.Range(0, 9999999).ToString());
                 Conv.AppendValue(stringBuilder, "b", cDouble.ToInt().ToString());
                 Conv.AppendValue(stringBuilder, "c", App.State.KongUserId.ToString());
                 Conv.AppendValue(stringBuilder, "d", UnityEngine.Random.Range(0, 9999999).ToString());
                 Conv.AppendValue(stringBuilder, "e", App.State.KongUserName.ToString());
                 Conv.AppendValue(stringBuilder, "f", UnityEngine.Random.Range(0, 9999999).ToString());
                 string     plainText  = Conv.ToBase64(stringBuilder.ToString(), string.Empty);
                 string     plainText2 = Vertifier.Encrypt(plainText, password);
                 string     text2      = Conv.ToBase64(plainText2, string.Empty);
                 TextEditor textEditor = new TextEditor();
                 textEditor.text = text2;
                 textEditor.SelectAll();
                 textEditor.Copy();
                 GuiBase.ShowToast("Your data is copied to your clipboard. Please paste it to a text-editor and keep it save until it is of use in one of my next games!");
             }
         }
     }
 }