internal void Update()
 {
     if (this.skillToSelectKey != null)
     {
         IEnumerator enumerator = Enum.GetValues(typeof(KeyCode)).GetEnumerator();
         try
         {
             while (enumerator.MoveNext())
             {
                 KeyCode keyCode = (KeyCode)enumerator.Current;
                 if (Input.GetKeyDown(keyCode) && this.skillsToShow != null)
                 {
                     if (keyCode != KeyCode.Mouse0 && keyCode != KeyCode.Mouse1)
                     {
                         KeyCode keyPress = this.skillToSelectKey.Extension.KeyPress;
                         this.skillToSelectKey.Extension.KeyPress = keyCode;
                         GuiBase.ShowToast(this.skillToSelectKey.Name + " is now bound to " + keyCode.ToString());
                         foreach (Skill current in this.skillsToShow)
                         {
                             if (current != this.skillToSelectKey && current.Extension.KeyPress == keyCode)
                             {
                                 current.Extension.KeyPress = keyPress;
                             }
                         }
                     }
                     this.skillToSelectKey = null;
                 }
             }
         }
         finally
         {
             IDisposable disposable;
             if ((disposable = (enumerator as IDisposable)) != null)
             {
                 disposable.Dispose();
             }
         }
     }
     if (!this.Battle.IsFighting)
     {
         return;
     }
     if (this.skillsToShow != null)
     {
         foreach (Skill current2 in this.skillsToShow)
         {
             if (Input.GetKey(current2.Extension.KeyPress))
             {
                 if (!this.Battle.IsFighting)
                 {
                     GuiBase.ShowToast("Start the fight first!");
                 }
                 else if (current2.Extension.CoolDownCurrent <= 0L && current2.IsAvailable)
                 {
                     this.Battle.UseSkill(current2, true);
                 }
             }
         }
     }
 }
예제 #2
0
 private void ResetGame()
 {
     GuiBase.ShowDialog("Everything will be resetted to the base values.", "Do you really want to reset the game?", delegate
     {
         if (App.CurrentPlattform == Plattform.Kongregate)
         {
             MainUi.ExportToClipboard();
             MainUi.ResetGame();
             GuiBase.ShowToast("Game resetted and your gamestate is saved to the clipboard in case you still want to keep it somewhere.");
         }
         else if (App.CurrentPlattform == Plattform.Steam)
         {
             string text = "SaveBeforeReset";
             string str  = Application.dataPath + "\\" + text;
             Storage.SaveGameState(App.State, text);
             MainUi.ResetGame();
             GuiBase.ShowToast("Game resetted and your game is saved to " + str + " in case you still want to keep it somewhere.");
         }
         else
         {
             MainUi.ResetGame();
         }
     }, delegate
     {
     }, "Yes", "No", false, false);
 }
예제 #3
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);
        }
예제 #4
0
 private void LoadOnline()
 {
     if (UpdateStats.TimeSinceLastOnlineRequest < 60L)
     {
         GuiBase.ShowToast("You need to wait another " + (60L - UpdateStats.TimeSinceLastOnlineRequest) + " seconds to load your online save.");
     }
     else
     {
         GuiBase.ShowDialog("This will overwrite your current data.", "Are you sure you want that?", delegate
         {
             UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.UserRequest);
         }, delegate
         {
         }, "Yes", "No", false, false);
     }
 }
예제 #5
0
 private void Import(bool editorImport)
 {
     GuiBase.ShowDialog("This will overwrite your current data.", "Are you sure you want that?", delegate
     {
         TextEditor textEditor = new TextEditor();
         textEditor.Paste();
         string text  = textEditor.text;
         string text2 = "The pasted save is broken. Please try again. Copy an previous exported save to your clipboard first. It also probably won't work if you try to manipulate the save.";
         try
         {
             CDouble count       = App.State.Clones.Count;
             GameState gameState = Storage.FromCompressedString(text);
             gameState.InitAchievementNames();
             if (!string.IsNullOrEmpty(gameState.KongUserId) && !string.IsNullOrEmpty(App.State.KongUserId) && !gameState.KongUserId.Equals(App.State.KongUserId) && !editorImport)
             {
                 GuiBase.ShowToast("This save is from: " + gameState.KongUserName + ". You are not allowed to use a save from a different user!");
                 App.State.Clones.Count = count;
             }
             else if (gameState != null && gameState.Clones.Count > 0)
             {
                 App.State = gameState;
                 this.InitAfterLoad();
             }
             else
             {
                 GuiBase.ShowToast(text2);
                 App.State.Clones.Count = count;
             }
         }
         catch (Exception)
         {
             GuiBase.ShowToast(text2);
         }
     }, delegate
     {
     }, "Yes", "No", false, false);
 }
        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());
            }
        }
        private void show()
        {
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.fontSize  = GuiBase.FontSize(16);
            style.alignment = TextAnchor.UpperLeft;
            GUIStyle style2 = GUI.skin.GetStyle("Button");

            style2.fontSize = GuiBase.FontSize(16);
            GUI.BeginGroup(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)));
            GUI.Box(new Rect(GuiBase.Width(0f), GuiBase.Height(0f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            if (this.Battle.IsBattleFinished)
            {
                this.ShowBattleFinished();
            }
            else
            {
                if (!this.Battle.IsFighting && !App.State.GameSettings.AutoFightIsOn)
                {
                    if (this.moreInfo)
                    {
                        if (GUI.Button(new Rect(GuiBase.Width(520f), GuiBase.Height(10f), GuiBase.Width(90f), GuiBase.Height(30f)), new GUIContent("Back", string.Empty)))
                        {
                            this.moreInfo = false;
                        }
                        style.fontSize = GuiBase.FontSize(14);
                        GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(10f), GuiBase.Width(620f), GuiBase.Height(300f)), "Mystic is useless in this fight.\nEnemy attack and hp is calculated from your power level.\nThe divinity you gain is (divinity gained from battles every second * 2 + divinity gained from generator) * 200 for Jacky, 300 for Cthulhu, 500 for doppel, 500 + 1000 for D.evelope, 4*gods defeated for gods, 10,30,60,100… for shadow clones.\nSkillPower = 1 x skill level until 100k + 0.05 x skill level until 1100k + 0.01 x skill level after 1100k.\nThe damage you do is: SkillPower * base damage * damage increase shown on top (the percent one) * Player attack / 1 billion * number of hits.\n");
                        style.fontSize = GuiBase.FontSize(16);
                    }
                    else
                    {
                        if (GUI.Button(new Rect(GuiBase.Width(40f), GuiBase.Height(100f), GuiBase.Width(180f), GuiBase.Height(30f)), new GUIContent("Fight " + this.Battle.Enemies.Endless.Name, this.Battle.Enemies.Endless.Description)))
                        {
                            this.Battle.StartFight(BattleState.BattleType.endless);
                        }
                        if (GUI.Button(new Rect(GuiBase.Width(240f), GuiBase.Height(100f), GuiBase.Width(180f), GuiBase.Height(30f)), new GUIContent("Fight " + this.Battle.Enemies.Jacky.Name, this.Battle.Enemies.Jacky.Description)))
                        {
                            this.Battle.StartFight(BattleState.BattleType.jacky);
                        }
                        if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(180f), GuiBase.Height(30f)), new GUIContent("Fight " + this.Battle.Enemies.Cthulhu.Name, this.Battle.Enemies.Cthulhu.Description)))
                        {
                            this.Battle.StartFight(BattleState.BattleType.cthulhu);
                        }
                        if (GUI.Button(new Rect(GuiBase.Width(40f), GuiBase.Height(140f), GuiBase.Width(180f), GuiBase.Height(30f)), new GUIContent("Fight " + this.Battle.Enemies.Doppelganger.Name, this.Battle.Enemies.Doppelganger.Description)))
                        {
                            this.Battle.StartFight(BattleState.BattleType.doppel);
                        }
                        if (GUI.Button(new Rect(GuiBase.Width(240f), GuiBase.Height(140f), GuiBase.Width(180f), GuiBase.Height(30f)), new GUIContent("Fight " + this.Battle.Enemies.Developer.Name, this.Battle.Enemies.Developer.Description)))
                        {
                            this.Battle.StartFight(BattleState.BattleType.developer);
                        }
                        if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(180f), GuiBase.Height(30f)), new GUIContent("Fight Gods", "Fight all the other gods. Unlike all other fights, their stats are constant and not scaled by your power.\nThey do not count for any statistic.")))
                        {
                            this.Battle.StartFight(BattleState.BattleType.gods);
                        }
                        GUI.Label(new Rect(GuiBase.Width(40f), GuiBase.Height(10f), GuiBase.Width(470f), GuiBase.Height(100f)), "Using skills 3 times in battle reduces the clone cap of Physical and Skill training of the same tier by one. This means you need less clones for the same power-gain. Lasts through rebirths.");
                        if (GUI.Button(new Rect(GuiBase.Width(520f), GuiBase.Height(10f), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("More Info", string.Empty)))
                        {
                            this.moreInfo = true;
                        }
                    }
                }
                else if (App.State.GameSettings.AutoFightIsOn)
                {
                    style.fontStyle = FontStyle.Bold;
                    style.alignment = TextAnchor.MiddleCenter;
                    long time = SpecialFightUi.timeLeft;
                    if (App.State.CreatingSpeedBoniDuration > 0L)
                    {
                        time = SpecialFightUi.timeLeft / 3L;
                        GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(20f), GuiBase.Width(640f), GuiBase.Height(50f)), "Trainingspeed is 300% for the next " + Conv.MsToGuiText(App.State.CreatingSpeedBoniDuration, true) + "!");
                    }
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(50f), GuiBase.Width(640f), GuiBase.Height(50f)), "Automode is on. \nNext skill training is in " + Conv.MsToGuiSec(time));
                    style.alignment = TextAnchor.UpperLeft;
                    style.fontStyle = FontStyle.Normal;
                }
                else
                {
                    string text = App.State.AvatarName;
                    if (string.IsNullOrEmpty(text))
                    {
                        text = "Guest";
                    }
                    if (GUI.Button(new Rect(GuiBase.Width(10f), GuiBase.Height(10f), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Flee")))
                    {
                        this.Battle.IsFighting = false;
                        this.Battle.ResetSkillCoolDowns(true);
                        GuiBase.ShowToast("You ran away!\nThe cooldowns are resetted to 0 but to prevent exploiting that the usage count of all skills with a higher cooldown than 500 ms is reduced by 1.");
                    }
                    style.fontStyle = FontStyle.Bold;
                    this.CreateProgressBar(120, 11, 185, this.Battle.PlayerHp.Double, App.State.MaxHealth.Double, text, this.Battle.PlayerHp.ToGuiText(true) + " / " + this.Battle.PlayerMaxHP.ToGuiText(true), style);
                    style.fontSize = GuiBase.FontSize(22);
                    GUI.Label(new Rect(GuiBase.Width(325f), GuiBase.Height(10f), GuiBase.Width(60f), GuiBase.Height(30f)), "VS");
                    style.fontSize = GuiBase.FontSize(16);
                    this.CreateProgressBar(375, 11, 185, this.Battle.CurrentEnemy.HP.Double, this.Battle.CurrentEnemy.HPMax.Double, this.Battle.CurrentEnemy.Name, this.Battle.CurrentEnemy.HP.ToGuiText(true) + " / " + this.Battle.CurrentEnemy.HPMax.ToGuiText(true), style);
                    style.fontStyle = FontStyle.Normal;
                    style.fontSize  = GuiBase.FontSize(16);
                    style.fontStyle = FontStyle.Bold;
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(50f), GuiBase.Width(640f), GuiBase.Height(30f)), "Your total Damage: " + this.Battle.TotalPlayerDamage.ToGuiText(true));
                    style.fontStyle = FontStyle.Normal;
                    style.fontSize  = GuiBase.FontSize(14);
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(75f), GuiBase.Width(640f), GuiBase.Height(45f)), "Your Damage: " + this.Battle.DamageIncrease + " %");
                    GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height(75f), GuiBase.Width(640f), GuiBase.Height(45f)), "Enemy Damage: " + this.Battle.DamageDecrease + " %");
                    GUI.Label(new Rect(GuiBase.Width(430f), GuiBase.Height(75f), GuiBase.Width(640f), GuiBase.Height(45f)), "Dodge Chance = " + this.Battle.DodgeChance + " %");
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(95f), GuiBase.Width(640f), GuiBase.Height(45f)), "Counter Chance = " + this.Battle.CounterChance + " %");
                    GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height(95f), GuiBase.Width(640f), GuiBase.Height(45f)), "God Speed: " + this.Battle.GodSpeedModeDuration + " ms");
                    GUI.Label(new Rect(GuiBase.Width(430f), GuiBase.Height(95f), GuiBase.Width(640f), GuiBase.Height(45f)), "Gear Eyes: " + this.Battle.GearEyesDuration + " ms");
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(115f), GuiBase.Width(640f), GuiBase.Height(45f)), "Double Damage = " + this.Battle.DoubleUp);
                    GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height(115f), GuiBase.Width(640f), GuiBase.Height(45f)), "Damage Block = " + this.Battle.DamageBlock);
                    GUI.Label(new Rect(GuiBase.Width(430f), GuiBase.Height(115f), GuiBase.Width(640f), GuiBase.Height(45f)), "Damage Reflect = " + this.Battle.DamageReflect);
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(150f), GuiBase.Width(640f), GuiBase.Height(45f)), this.Battle.SkillUseText);
                    GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(185f), GuiBase.Width(640f), GuiBase.Height(45f)), this.Battle.EnemyDamageText);
                }
                if (!this.Battle.IsFighting)
                {
                    this.showToolTips = GUI.Toggle(new Rect(GuiBase.Width(20f), GuiBase.Height(190f), GuiBase.Width(200f), GuiBase.Height(30f)), this.showToolTips, new GUIContent("Show skill tooltips"));
                    this.sortSkills   = GUI.Toggle(new Rect(GuiBase.Width(220f), GuiBase.Height(190f), GuiBase.Width(140f), GuiBase.Height(30f)), this.sortSkills, new GUIContent("Sort skills", "If this is on, skills are sorted top to bottom in order of damage skills, buff skills, dodge/block skills, other skills."));
                    App.State.GameSettings.AutoFightIsOn = GUI.Toggle(new Rect(GuiBase.Width(370f), GuiBase.Height(190f), GuiBase.Width(200f), GuiBase.Height(30f)), App.State.GameSettings.AutoFightIsOn, new GUIContent("Auto", "If this is on, every skill will be used once a minute while you are online and not fighting."));
                    if (App.State.GameSettings.SpecialFightSkillsSorted != this.sortSkills)
                    {
                        App.State.GameSettings.SpecialFightSkillsSorted = this.sortSkills;
                        this.Init();
                    }
                }
                style2.fontSize = GuiBase.FontSize(13);
                int num  = 220;
                int num2 = 10;
                int num3 = 0;
                this.skillsToShow = App.State.AllSkills;
                if (this.sortSkills)
                {
                    this.skillsToShow = SpecialFightUi.sortedSkills;
                }
                foreach (Skill current in this.skillsToShow)
                {
                    string text2 = "You need to unlock this skill first!";
                    if (current.IsAvailable)
                    {
                        text2 = current.Extension.Description;
                    }
                    if (!this.showToolTips)
                    {
                        text2 = string.Empty;
                    }
                    if (current.Extension.CoolDownCurrent > 0L)
                    {
                        this.CreateProgressBar(num2, num, 160, (double)current.Extension.CoolDownCurrent, (double)current.Extension.CoolDownBase, Conv.MsToGuiSec(current.Extension.CoolDownCurrent), text2, style);
                    }
                    else
                    {
                        string text3 = current.Name;
                        if (App.CurrentPlattform != Plattform.Android)
                        {
                            if (current.TypeEnum == Skill.SkillType.unlimited_creation_works && current.IsAvailable)
                            {
                                text3 = "UCW (" + EnumName.Name(current.Extension.KeyPress) + ")";
                            }
                            else if (current.TypeEnum == Skill.SkillType.elemental_manipulation && current.IsAvailable)
                            {
                                text3 = "Elemental m. (" + EnumName.Name(current.Extension.KeyPress) + ")";
                            }
                            else
                            {
                                text3 = text3 + " (" + EnumName.Name(current.Extension.KeyPress) + ")";
                            }
                        }
                        if (GUI.Button(new Rect(GuiBase.Width((float)num2), GuiBase.Height((float)num), GuiBase.Width(152f), GuiBase.Height(30f)), new GUIContent(text3, text2)))
                        {
                            if (!this.Battle.IsFighting)
                            {
                                if (App.CurrentPlattform == Plattform.Android)
                                {
                                    GuiBase.ShowToast("Start the fight first!");
                                }
                                else
                                {
                                    this.skillToSelectKey = current;
                                    GuiBase.ShowToast("Press a key now to bind it to " + current.Name);
                                }
                            }
                            else if (current.IsAvailable)
                            {
                                this.Battle.UseSkill(current, false);
                            }
                        }
                    }
                    num2 += 161;
                    num3++;
                    if (num3 % 4 == 0)
                    {
                        num2 = 10;
                        num += 35;
                    }
                }
            }
            GUI.EndGroup();
        }
예제 #8
0
        private void FightUB()
        {
            int      num   = 10;
            int      num2  = 10;
            GUIStyle style = GUI.skin.GetStyle("Label");

            GUI.BeginGroup(new Rect(GuiBase.Width(280f), GuiBase.Height(110f), GuiBase.Width(670f), GuiBase.Height(480f)));
            GUI.Box(new Rect(GuiBase.Width(10f), GuiBase.Height(0f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            string text = App.State.AvatarName;

            if (string.IsNullOrEmpty(text))
            {
                text = "Guest";
            }
            if (GUI.Button(new Rect(GuiBase.Width(20f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Flee")))
            {
                this.Battle.IsFighting = false;
                GuiBase.ShowToast("You ran away! You gained a new title: Chicken God!");
                App.State.Title = "Chicken God";
                if (App.State.Avatar.IsFemale)
                {
                    App.State.Title = "Chicken Goddess";
                }
                App.State.TitleGod = "nothing, but you were able to run away really fast.";
            }
            style.fontSize  = GuiBase.FontSize(14);
            style.alignment = TextAnchor.UpperCenter;
            GUI.Label(new Rect(GuiBase.Width(385f), GuiBase.Height((float)(num + 35)), GuiBase.Width(185f), GuiBase.Height(30f)), "Damage Reduction: " + this.Battle.Being.DamageReduction.ToGuiText(true) + " %");
            style.fontStyle = FontStyle.Bold;
            style.fontSize  = GuiBase.FontSize(16);
            GuiBase.CreateProgressBar(130, num + 1, 185f, 31f, this.Battle.PlayerHp.Double / App.State.MaxHealth.Double, text, this.Battle.PlayerHp.ToGuiText(true) + " / " + App.State.MaxHealth.ToGuiText(true), GuiBase.progressBg, GuiBase.progressFgRed);
            GuiBase.CreateProgressBar(130, num + 31, 185f, 31f, this.Battle.PlayerEnergy.Double / 1000.0, this.Battle.PlayerEnergy.ToGuiText(true) + " / 1000", "Your energy. You will recover 10 each turn.", GuiBase.progressBg, GuiBase.progressFgBlue);
            string str = this.Battle.Being.HPPercent.ToGuiText(false);

            if (this.Battle.Being.HPPercent < 0.01)
            {
                str = "Less than 0.01";
            }
            GuiBase.CreateProgressBar(385, num + 1, 185f, 31f, this.Battle.Being.HPPercent.Double / 100.0, this.Battle.Being.Name, "Health: " + str + " %", GuiBase.progressBg, GuiBase.progressFgRed);
            style.fontSize = GuiBase.FontSize(22);
            GUI.Label(new Rect(GuiBase.Width(325f), GuiBase.Height((float)num), GuiBase.Width(60f), GuiBase.Height(30f)), "VS");
            style.fontSize  = GuiBase.FontSize(16);
            style.alignment = TextAnchor.UpperLeft;
            num            += 80;
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 10)), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(45f)), "Current Turn: " + this.Battle.TurnCount);
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 160)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), "Clones left: " + App.State.HomePlanet.ShadowCloneCount);
            style.fontStyle = FontStyle.Normal;
            num            += 30;
            style.fontSize  = GuiBase.FontSize(14);
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 430)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), "Dodge Chance = " + this.Battle.DodgeChance + " %");
            num += 20;
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 10)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), new GUIContent("Your Damage: " + this.Battle.Damage.ToGuiText(true) + " %", "The base damage multiplier is 100 + Physical Attack + training in 'Might'."));
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 220)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), new GUIContent("Damage Reduction: " + this.Battle.DamageReduction.ToGuiText(true) + " %", "The base damage reduction is Mystic Defense + training in 'Might' / 10 with a maximum of 75%."));
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 430)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), "Counter Chance = " + this.Battle.CounterChance + " %");
            num += 20;
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 430)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), "Damage Reflect = " + this.Battle.DamageReflect);
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 220)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), "God Speed: " + (this.Battle.GodSpeedModeDuration / 2).Floored + " turns");
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 10)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(45f)), "Double Damage = " + this.Battle.DoubleUp);
            num += 40;
            GUI.Label(new Rect(GuiBase.Width((float)(num2 + 10)), GuiBase.Height((float)num), GuiBase.Width(640f), GuiBase.Height(130f)), this.Battle.InfoText);
            GUIStyle style2 = GUI.skin.GetStyle("Button");

            style2.fontSize = GuiBase.FontSize(13);
            num            += 130;
            num2            = 20;
            int num3 = 0;

            foreach (SkillUB2 current in this.Battle.PlayerSkills)
            {
                if (GUI.Button(new Rect(GuiBase.Width((float)num2), GuiBase.Height((float)num), GuiBase.Width(152f), GuiBase.Height(30f)), new GUIContent(current.Name, current.Desc)))
                {
                    this.Battle.NextTurn(current);
                }
                if (current.TypeEnum == SkillTypeUBV2.FocusedBreathing || current.TypeEnum == SkillTypeUBV2.IonioiHeroSummon)
                {
                    num3++;
                }
                num2 += 161;
                num3++;
                if (num3 % 4 == 0)
                {
                    num2 = 20;
                    num += 35;
                }
            }
            GUI.EndGroup();
        }
예제 #9
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;
        }
 protected override void ShowScrollViewElements(int marginTop, GUIStyle labelStyle)
 {
     if (MightUi.scrollBarsToZero)
     {
         base.SetScrollbarPosition(Vector2.zero);
         MightUi.scrollBarsToZero = false;
     }
     foreach (Might current in App.State.AllMights)
     {
         if (current.ShadowCloneCount > 0)
         {
             current.ShouldUpdateText = true;
         }
         if (current.TypeEnum == Might.MightType.focused_breathing)
         {
             marginTop           += 35;
             labelStyle.alignment = TextAnchor.UpperCenter;
             labelStyle.fontStyle = FontStyle.Bold;
             labelStyle.fontSize  = GuiBase.FontSize(18);
             GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height((float)marginTop), GuiBase.Width(220f), GuiBase.Height(30f)), "Usable Skills");
             labelStyle.fontStyle = FontStyle.Normal;
             marginTop           += 35;
         }
         labelStyle.fontSize = GuiBase.FontSize(16);
         GuiBase.CreateProgressBar(marginTop, current.getPercent(), current.Name, current.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
         GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), current.Level.CommaFormatted);
         GUI.Label(new Rect(GuiBase.Width(380f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), current.ShadowCloneCount.CommaFormatted);
         if (App.CurrentPlattform == Plattform.Android)
         {
             GUIStyle textField = Gui.ChosenSkin.textField;
             if (GUI.Button(new Rect(GuiBase.Width(315f), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), current.NextAt.ToString(), textField))
             {
                 Might migh = current;
                 base.ShowNumberInput("Next at for " + migh.Name, migh.NextAt, 2147483647, delegate(CDouble x)
                 {
                     migh.NextAt = x.ToInt();
                 });
             }
         }
         else
         {
             int    num = 0;
             string s   = GUI.TextField(new Rect(GuiBase.Width(315f), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), current.NextAt.ToString());
             int.TryParse(s, out num);
             if (num >= 0)
             {
                 current.NextAt = num;
             }
         }
         if (GUI.Button(new Rect(GuiBase.Width(500f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+"))
         {
             current.AddCloneCount(App.State.GameSettings.ClonesToAddCount);
         }
         if (GUI.Button(new Rect(GuiBase.Width(560f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "-"))
         {
             current.RemoveCloneCount(App.State.GameSettings.ClonesToAddCount);
         }
         if (current.IsUsable)
         {
             marginTop += 35;
             if (current.DurationLeft > 0L)
             {
                 float num2 = GuiBase.Width(185f);
                 GUI.BeginGroup(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), num2, GuiBase.Height(25f)));
                 GUI.DrawTexture(new Rect(0f, 0f, num2, GuiBase.Height(25f)), GuiBase.progressBg);
                 float num3  = (float)current.DurationLeft / ((float)current.UseDuration * 1000f);
                 float width = num3 * num2;
                 float x2    = 0f;
                 GUI.DrawTexture(new Rect(x2, 0f, width, GuiBase.Height(25f)), GuiBase.progressFgGreen);
                 GUI.EndGroup();
             }
             else if (current.UseCoolDown > 0L)
             {
                 double percent = (double)current.UseCoolDown / 3600000.0;
                 GuiBase.CreateProgressBar(marginTop, percent, Conv.MsToGuiText(current.UseCoolDown, true), current.UnleashDesc + "\n\nYou can use it again when timer hits zero.", GuiBase.progressBg, GuiBase.progressFgRed);
             }
             else if (GUI.Button(new Rect(GuiBase.Width(60f), GuiBase.Height((float)marginTop), GuiBase.Width(120f), GuiBase.Height(30f)), new GUIContent("Unleash", current.UnleashDesc)))
             {
                 if (SpecialFightUi.IsFighting)
                 {
                     GuiBase.ShowToast("Please finish your special fight first!");
                 }
                 else
                 {
                     current.Unleash();
                 }
             }
         }
         marginTop += 35;
     }
 }
        private void ShowBuyCreations()
        {
            GUIStyle style  = GUI.skin.GetStyle("TextField");
            GUIStyle style2 = GUI.skin.GetStyle("Label");
            GUIStyle style3 = GUI.skin.GetStyle("Button");

            style.fontSize  = GuiBase.FontSize(16);
            style3.fontSize = GuiBase.FontSize(16);
            style.alignment = TextAnchor.MiddleCenter;
            Rect rect = new Rect(GuiBase.Width(365f), GuiBase.Height(360f), GuiBase.Width(500f), GuiBase.Height(150f));

            GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            style2.fontSize  = GuiBase.FontSize(16);
            style2.alignment = TextAnchor.MiddleCenter;
            GUI.Label(new Rect(rect.xMin, rect.yMin + GuiBase.Height(10f), GuiBase.Width(450f), GuiBase.Height(30f)), new GUIContent(string.Empty, "Hello my dear god. Please click twice on the white box and then put a big number into it.\nOnly numbers though! Then finalize with the 'Buy' button. You can ignore the 'Cancel' button"));
            if (string.IsNullOrEmpty(this.countToBuy))
            {
                this.countToBuy = string.Empty;
            }
            this.countToBuy = GUI.TextField(new Rect(rect.xMin + GuiBase.Width(30f), rect.yMin + GuiBase.Height(45f), GuiBase.Width(270f), GuiBase.Height(30f)), this.countToBuy);
            if (GUI.Button(new Rect(rect.xMin + GuiBase.Width(400f), rect.yMin + GuiBase.Height(45f), GuiBase.Width(75f), GuiBase.Height(30f)), "Cancel"))
            {
                this.creationToShow = null;
                return;
            }
            try
            {
                if (!string.IsNullOrEmpty(this.countToBuy) && this.countToBuy.StartsWith("-"))
                {
                    GuiBase.ShowToast("I only sell my creations to you. I won't buy them.");
                    this.countToBuy = string.Empty;
                    return;
                }
                CDouble cDouble = new CDouble(this.countToBuy);
                cDouble.Round();
                this.countToBuy  = cDouble.ToString();
                style2.alignment = TextAnchor.UpperLeft;
                GUI.Label(new Rect(rect.xMin + GuiBase.Width(35f), rect.yMin + GuiBase.Height(85f), GuiBase.Width(450f), GuiBase.Height(30f)), "Divinity cost: " + (this.creationToShow.BuyCost * cDouble).ToGuiText(true));
                GUI.Label(new Rect(rect.xMin + GuiBase.Width(35f), rect.yMin + GuiBase.Height(115f), GuiBase.Width(450f), GuiBase.Height(30f)), "You have: " + App.State.Money.ToGuiText(true) + " divinity");
                GUI.Label(new Rect(rect.xMin + GuiBase.Width(35f), rect.yMin + GuiBase.Height(145f), GuiBase.Width(450f), GuiBase.Height(30f)), "You have: " + this.creationToShow.Count.ToGuiText(true) + " " + this.creationToShow.Name.ToLower());
                style2.alignment = TextAnchor.MiddleCenter;
                if (GUI.Button(new Rect(rect.xMin + GuiBase.Width(315f), rect.yMin + GuiBase.Height(45f), GuiBase.Width(75f), GuiBase.Height(30f)), "Buy"))
                {
                    CDouble cDouble2 = this.creationToShow.BuyCost * cDouble;
                    App.State.Money.Round();
                    cDouble2.Round();
                    if (App.State.Money >= cDouble2)
                    {
                        App.State.Money                     -= cDouble2;
                        this.creationToShow.Count           += cDouble;
                        this.creationToShow                  = null;
                        App.State.Statistic.TotalMoneySpent += cDouble2;
                    }
                    else
                    {
                        GuiBase.ShowToast("Sorry you are way too poor to afford that.\nPlease save up a little more and then come back.");
                    }
                }
            }
            catch (ArgumentOutOfRangeException)
            {
                this.countToBuy = string.Empty;
                GuiBase.ShowToast("Only numbers are allowed! Don't ask why. It's just hard to count money with letters or some weird characters.");
            }
            GUI.BeginGroup(new Rect(GuiBase.Width(280f), GuiBase.Height(120f), GuiBase.Width(670f), GuiBase.Height(480f)));
            if (this.creationToShow != null)
            {
                style2.fontStyle = FontStyle.Bold;
                GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(10f), GuiBase.Width(660f), GuiBase.Height(50f)), "I can sell you a " + this.creationToShow.Name + ". How many do you want to buy? \nPress a button or input a number.");
                style2.fontStyle = FontStyle.Normal;
            }
            this.toggleNumber = GUI.Toolbar(new Rect(GuiBase.Width(55f), GuiBase.Height(70f), GuiBase.Width(245f), GuiBase.Height(35f)), this.toggleNumber, this.toolbarLeftStrings);
            int value = 1;

            if (this.toggleNumber == 1)
            {
                value = 2;
            }
            else if (this.toggleNumber == 2)
            {
                value = 5;
            }
            else if (this.toggleNumber == 3)
            {
                value = 25;
            }
            else if (this.toggleNumber == 4)
            {
                value = 75;
            }
            CDouble cDouble3 = new CDouble("1") * value;

            if (GUI.Button(new Rect(GuiBase.Width(55f), GuiBase.Height(120f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble3.ToGuiText(true)))
            {
                this.BuyCount(cDouble3);
            }
            CDouble cDouble4 = new CDouble("10") * value;

            if (GUI.Button(new Rect(GuiBase.Width(200f), GuiBase.Height(120f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble4.ToGuiText(true)))
            {
                this.BuyCount(cDouble4);
            }
            CDouble cDouble5 = new CDouble("100") * value;

            if (GUI.Button(new Rect(GuiBase.Width(345f), GuiBase.Height(120f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble5.ToGuiText(true)))
            {
                this.BuyCount(cDouble5);
            }
            CDouble cDouble6 = new CDouble("1000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(490f), GuiBase.Height(120f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble6.ToGuiText(true)))
            {
                this.BuyCount(cDouble6);
            }
            CDouble cDouble7 = new CDouble("10000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(55f), GuiBase.Height(155f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble7.ToGuiText(true)))
            {
                this.BuyCount(cDouble7);
            }
            CDouble cDouble8 = new CDouble("100000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(200f), GuiBase.Height(155f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble8.ToGuiText(true)))
            {
                this.BuyCount(cDouble8);
            }
            CDouble cDouble9 = new CDouble("1000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(345f), GuiBase.Height(155f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble9.ToGuiText(true)))
            {
                this.BuyCount(cDouble9);
            }
            CDouble cDouble10 = new CDouble("10000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(490f), GuiBase.Height(155f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble10.ToGuiText(true)))
            {
                this.BuyCount(cDouble10);
            }
            CDouble cDouble11 = new CDouble("100000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(55f), GuiBase.Height(190f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble11.ToGuiText(true)))
            {
                this.BuyCount(cDouble11);
            }
            CDouble cDouble12 = new CDouble("1000000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(200f), GuiBase.Height(190f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble12.ToGuiText(true)))
            {
                this.BuyCount(cDouble12);
            }
            CDouble cDouble13 = new CDouble("10000000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(345f), GuiBase.Height(190f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble13.ToGuiText(true)))
            {
                this.BuyCount(cDouble13);
            }
            CDouble cDouble14 = new CDouble("100000000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(490f), GuiBase.Height(190f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble14.ToGuiText(true)))
            {
                this.BuyCount(cDouble14);
            }
            CDouble cDouble15 = new CDouble("1000000000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(55f), GuiBase.Height(225f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble15.ToGuiText(true)))
            {
                this.BuyCount(cDouble15);
            }
            CDouble cDouble16 = new CDouble("10000000000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(200f), GuiBase.Height(225f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble16.ToGuiText(true)))
            {
                this.BuyCount(cDouble16);
            }
            CDouble cDouble17 = new CDouble("100000000000000") * value;

            if (GUI.Button(new Rect(GuiBase.Width(345f), GuiBase.Height(225f), GuiBase.Width(140f), GuiBase.Height(25f)), cDouble17.ToGuiText(true)))
            {
                this.BuyCount(cDouble17);
            }
            if (GUI.Button(new Rect(GuiBase.Width(490f), GuiBase.Height(225f), GuiBase.Width(140f), GuiBase.Height(25f)), "MAX"))
            {
                CDouble buyCost = this.creationToShow.BuyCost;
                if (buyCost == 0)
                {
                    return;
                }
                CDouble cDouble18 = App.State.Money / this.creationToShow.BuyCost;
                cDouble18.Value = Math.Floor(cDouble18.Value);
                this.BuyCount(cDouble18);
            }
            GUI.EndGroup();
        }
        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();
            }
        }
예제 #13
0
 private void showUBV2s(int marginTop, GUIStyle labelStyle)
 {
     using (List <UltimateBeingV2> .Enumerator enumerator = App.State.HomePlanet.UltimateBeingsV2.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             UltimateBeingV2 being = enumerator.Current;
             if (!being.IsDefeated)
             {
                 labelStyle.fontSize = GuiBase.FontSize(16);
                 if (being.IsAvailable)
                 {
                     string text = being.Description;
                     if (being.HPPercent < 100)
                     {
                         text = text + "\nHp left: " + being.HPPercent.ToGuiText(true) + " %";
                     }
                     GuiBase.CreateProgressBar(marginTop, being.HPPercent.Double / 100.0, being.Name, text, GuiBase.progressBg, GuiBase.progressFgRed);
                     if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Fight", string.Concat(new object[]
                     {
                         "If you win, you will receive ",
                         being.Tier * 10,
                         " God Power and your Multi from Ultimate Beings will increase by ",
                         being.GetMultiplier(App.State.HomePlanet.UBMultiplier).ToGuiText(true),
                         " %"
                     }))))
                     {
                         if (App.State.CurrentHealth * 2 < App.State.MaxHealth || App.State.HomePlanet.ShadowCloneCount < 100000)
                         {
                             GuiBase.ShowToast("Your need at least 50% of your health and 100000 Clones on Powersurge to be able to start a fight.");
                         }
                         else
                         {
                             this.Battle = BattleUBV2.Instance;
                             this.Battle.start(being);
                         }
                     }
                     marginTop += 35;
                     Creation creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == being.CreationNeeded);
                     string   str      = string.Empty;
                     if (creation != null)
                     {
                         str = "\n\nYou have " + creation.Count.GuiText + " x " + creation.Name;
                     }
                     GuiBase.CreateProgressBar(marginTop, being.CurrentCreationDuration.Double / being.CreationDuration.Double, being.CreationName, being.CreationDescription + str, GuiBase.progressBg, GuiBase.progressFgBlue);
                     being.StopAtString = GUI.TextField(new Rect(GuiBase.Width(350f), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), being.StopAtString);
                     if (!being.isCreating)
                     {
                         if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Create", "If you create a " + being.CreationName + ", you can't create anything else until you stop it.")))
                         {
                             being.isCreating = true;
                             being.InitDuration(App.State);
                             foreach (Creation current in App.State.AllCreations)
                             {
                                 current.IsActive = false;
                             }
                         }
                     }
                     else if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Stop"))
                     {
                         being.isCreating = false;
                         being.GoBackToCreating();
                     }
                     GUI.Label(new Rect(GuiBase.Width(235f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), string.Empty + being.CreationCount.ToGuiText(true), labelStyle);
                 }
                 marginTop += 35;
             }
         }
     }
     labelStyle.alignment = TextAnchor.UpperLeft;
     GUI.Label(new Rect(GuiBase.Width(240f), GuiBase.Height((float)(marginTop - 5)), 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 - 5)), 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.ToGuiText(true),
         " %\nMulti from Ultimate Beings: ",
         App.State.HomePlanet.UBMultiplier.ToGuiText(true),
         " %"
     })), labelStyle);
     labelStyle.fontStyle = FontStyle.Normal;
 }
        public void Show()
        {
            if (GodUi.scrollBarsToZero)
            {
                this.scrollPosition    = Vector2.zero;
                GodUi.scrollBarsToZero = false;
            }
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(18);
            GUI.BeginGroup(new Rect(GuiBase.Width(280f), GuiBase.Height(110f), GuiBase.Width(670f), GuiBase.Height(480f)));
            GUI.Box(new Rect(GuiBase.Width(10f), GuiBase.Height(0f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            style.alignment = TextAnchor.UpperCenter;
            int num  = 20;
            int num2 = 400;

            if (App.State.Statistic.HasStartedUltimatePetChallenge)
            {
                GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height((float)num), GuiBase.Width(550f), GuiBase.Height(30f)), new GUIContent("Pet Power: " + App.State.Ext.GetTotalPetPower(false).ToGuiText(true), "The power of all pets who are available to fight gods combined."), style);
                GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height((float)(num + 25)), GuiBase.Width(550f), GuiBase.Height(30f)), new GUIContent("Multi from gods: " + App.State.Ext.PetPowerMultiGods.ToGuiText(true), "This is a multiplier to the pet power and will multiply with 4 for each god defeated. This won't reset after rebirthing."), style);
                GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height((float)(num + 50)), GuiBase.Width(550f), GuiBase.Height(30f)), new GUIContent("Multi from pet pills: " + App.State.Ext.PetPowerMultiCampaigns.ToGuiText(true), "You can find Pet Pills in item campaigns for additional multipliers. This won't reset after rebirthing."), style);
                GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height((float)(num + 75)), GuiBase.Width(550f), GuiBase.Height(30f)), new GUIContent("Multi from monuments: " + App.State.Ext.PetPowerMultiMonuments().ToGuiText(true), "Your monuments will even give multipliers to your pets! Sadly, all of this is lost after rebirthing."), style);
                GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height((float)(num + 100)), GuiBase.Width(550f), GuiBase.Height(30f)), new GUIContent("Total Pet Power: " + App.State.Ext.GetTotalPetPower(true).ToGuiText(true), "The total power your pets have to fight the gods. The damage you do is (total power / 3 - god defense) / 5000 * milliseconds. \nCriticals from TBS are also possible."), style);
                num += 115;
                int num3 = 20;
                int num4 = num;
                int num5 = 0;
                foreach (Pet current in App.State.Ext.AllPets)
                {
                    if (current.CurrentHealth > 0 && !current.IsInCampaign)
                    {
                        GUI.Label(new Rect(GuiBase.Width((float)num3), GuiBase.Height((float)PetUi.GetPetTop(current.TypeEnum, num4)), GuiBase.Width(40f), GuiBase.Height(40f)), new GUIContent(current.Image, "Pets who are available for fighting against the gods. Pets with no health or who are in campaigns can't participate."));
                        num5++;
                        num4 += 5;
                        if (num5 > App.State.Ext.AllPets.Count / 2)
                        {
                            num4 -= 10;
                        }
                        num3 += 20;
                    }
                }
                num  += 120;
                num2 -= 220;
            }
            GUIStyle style2 = GUI.skin.GetStyle("Button");

            style2.fontSize = GuiBase.FontSize(18);
            style.fontStyle = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(25f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), "God");
            GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), "Unlocks", style);
            style.fontStyle = FontStyle.Normal;
            num            += 35;
            if (App.State.PremiumBoni.TotalMightIsUnlocked && GUI.Button(new Rect(GuiBase.Width(520f), GuiBase.Height(10f), GuiBase.Width(140f), GuiBase.Height(30f)), "Unleash Might"))
            {
                if (SpecialFightUi.IsFighting)
                {
                    GuiBase.ShowToast("Please finish your special fight first°");
                }
                else
                {
                    int num6 = 0;
                    foreach (Might current2 in App.State.AllMights)
                    {
                        if (current2.IsUsable && current2.UseCoolDown == 0L && current2.DurationLeft <= 0L)
                        {
                            current2.Unleash();
                            num6++;
                        }
                    }
                    if (num6 > 0)
                    {
                        GuiBase.ShowToast("Multi unleash!");
                    }
                    else
                    {
                        GuiBase.ShowToast("Skills are on cooldown, please wait a bit.");
                    }
                }
            }
            this.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(0f), GuiBase.Height((float)num), GuiBase.Width(650f), GuiBase.Height((float)num2)), this.scrollPosition, new Rect(0f, GuiBase.Height((float)num), GuiBase.Width(620f), GuiBase.Height((float)(this.marginTop - num))));
            if (this.marginTop < 390)
            {
                GUIStyle style3 = GUI.skin.GetStyle("scrollview");
                style3.normal.background = null;
            }
            this.marginTop = num;
            bool flag = true;

            for (int i = 0; i < App.State.AllCreations.Count; i++)
            {
                Creation creation = App.State.AllCreations[i];
                if (!creation.GodToDefeat.IsDefeated)
                {
                    flag = false;
                }
            }
            if (App.State.PrinnyBaal.IsUnlocked && flag)
            {
                style.fontSize = GuiBase.FontSize(16);
                GuiBase.CreateProgressBar(this.marginTop, App.State.PrinnyBaal.getPercentOfHP(), App.State.PrinnyBaal.Name, App.State.PrinnyBaal.Description, GuiBase.progressBg, GuiBase.progressFgRed);
                if (App.State.PrinnyBaal.IsFighting)
                {
                    GUI.Toggle(new Rect(GuiBase.Width(430f), GuiBase.Height((float)this.marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), true, "Fighting...", GUI.skin.GetStyle("Button"));
                    style.alignment = TextAnchor.MiddleLeft;
                    GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)(this.marginTop + 35)), GuiBase.Width(400f), GuiBase.Height(30f)), "Your damage /s: " + App.State.PrinnyBaal.DamageSec.ToGuiText(true), style);
                    style.alignment = TextAnchor.UpperCenter;
                    if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)this.marginTop), GuiBase.Width(70f), GuiBase.Height(30f)), "Stop"))
                    {
                        GodUi.EnableCreating();
                    }
                    this.marginTop += 35;
                }
                else if (GUI.Button(new Rect(GuiBase.Width(430f), GuiBase.Height((float)this.marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), "Fight"))
                {
                    App.State.PrinnyBaal.IsFighting = true;
                    GodUi.DisableCreation();
                }
            }
            else
            {
                for (int j = 0; j < App.State.AllCreations.Count; j++)
                {
                    Creation creation2 = App.State.AllCreations[j];
                    if (!creation2.GodToDefeat.IsDefeated)
                    {
                        style.fontSize = GuiBase.FontSize(16);
                        GuiBase.CreateProgressBar(this.marginTop, creation2.GodToDefeat.getPercentOfHP(), creation2.GodToDefeat.Name, creation2.Description, GuiBase.progressBg, GuiBase.progressFgRed);
                        GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)this.marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), creation2.Name, style);
                        if (creation2.IsActive)
                        {
                            GUI.Toggle(new Rect(GuiBase.Width(430f), GuiBase.Height((float)this.marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), true, "Fighting...", GUI.skin.GetStyle("Button"));
                            style.alignment = TextAnchor.MiddleLeft;
                            GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)(this.marginTop + 35)), GuiBase.Width(400f), GuiBase.Height(30f)), "Your damage /s: " + creation2.GodToDefeat.DamageSec.ToGuiText(true), style);
                            style.alignment = TextAnchor.UpperCenter;
                            if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)this.marginTop), GuiBase.Width(70f), GuiBase.Height(30f)), "Stop"))
                            {
                                GodUi.EnableCreating();
                            }
                            this.marginTop += 35;
                        }
                        else if (GUI.Button(new Rect(GuiBase.Width(430f), GuiBase.Height((float)this.marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), "Fight"))
                        {
                            bool flag2 = true;
                            foreach (Creation current3 in App.State.AllCreations)
                            {
                                if (current3.TypeEnum < creation2.TypeEnum && !current3.GodToDefeat.IsDefeated)
                                {
                                    flag2 = false;
                                }
                            }
                            if (!flag2)
                            {
                                GuiBase.ShowToast("You need to defeat all previous gods first!");
                            }
                            else
                            {
                                App.State.PrinnyBaal.IsFighting = false;
                                bool isActive = creation2.IsActive;
                                GodUi.DisableCreation();
                                creation2.IsActive = !isActive;
                            }
                        }
                        this.marginTop += 35;
                    }
                }
            }
            GUI.EndScrollView();
            GUI.EndGroup();
        }
예제 #15
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;
        }
예제 #16
0
 private void Export()
 {
     MainUi.ExportToClipboard();
     GuiBase.ShowToast("Gamestate is saved to the clipboard!");
 }
예제 #17
0
 private void Save(string saveLocation)
 {
     Storage.SaveGameState(App.State, "ManualSave.txt");
     GuiBase.ShowToast("Saved the game to " + saveLocation);
 }
예제 #18
0
        public void OnGUI()
        {
            if (!InfoArea.ShowArea || GuiBase.LeftDialogIsShowing || GuiBase.FullScreenDialogIsShowing || AfkUi.Instance.ShowAfk)
            {
                return;
            }
            GUI.skin            = Gui.ChosenSkin;
            GUI.backgroundColor = SettingsUi.Instance.UiColor;
            GUI.Box(new Rect(InfoArea.Width(10f), InfoArea.Height(110f), InfoArea.Width(275f), InfoArea.Height(480f)), string.Empty);
            int      num   = 60;
            GUIStyle style = GUI.skin.GetStyle("Button");

            style.fontSize  = InfoArea.FontSize(16);
            style.fontStyle = FontStyle.Normal;
            GUIStyle style2 = GUI.skin.GetStyle("Label");

            style2.fontSize  = InfoArea.FontSize(14);
            style2.fontStyle = FontStyle.Normal;
            style2.alignment = TextAnchor.UpperLeft;
            if (this.TouIsShowing)
            {
                this.showTOU(style2);
                return;
            }
            if (this.ImprintIsShowing)
            {
                this.showLegals(style2);
                return;
            }
            if (this.ShowCredits)
            {
                this.showCredits(style2);
                return;
            }
            if (this.PrivacyIsShowing)
            {
                this.showPrivacy(style2);
                return;
            }
            GUI.BeginGroup(new Rect(InfoArea.Width(25f), InfoArea.Height(140f), InfoArea.Width(265f), InfoArea.Height(490f)));
            float x = InfoArea.Width(2f);

            GUI.Label(new Rect(x, InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(50f)), "Version: 2.13.740\nDate: 2017-08-09");
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Connect", "If you want to connect your online save from kongregate to steam, click here for more info.")))
            {
                InfoArea.ShowConnect = !InfoArea.ShowConnect;
            }
            num += 80;
            string text = Application.dataPath + "/Saves/ManualSave.txt";

            if (App.CurrentPlattform == Plattform.Android)
            {
                text = " the internal storage";
            }
            string text2    = "Save";
            string text3    = "Load";
            string tooltip  = "This will save your game to " + text + ".\nYou can load the save with the 'Load' button. The game will never load this automatically.";
            string tooltip2 = "This will load your game from " + text + ". It does nothing, if this is not a valid save or this file does not exist.";

            if (App.CurrentPlattform == Plattform.Kongregate)
            {
                tooltip  = "This will open a dialog where you can save your game data.";
                tooltip2 = "This will open a dialog where you can select previously saved data.";
            }
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(35f)), new GUIContent(text2, tooltip)))
            {
                if (App.CurrentPlattform == Plattform.Kongregate)
                {
                    this.SaveWebGl();
                }
                else
                {
                    this.Save(text);
                }
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent(text3, tooltip2)))
            {
                this.Load();
            }
            num += 45;
            string text4 = "This is an additional online save. The game saves online once every 15 minutes automatically. If you need it to save now, just press the button.";

            if (UpdateStats.LastServerSaveTime > 0L)
            {
                long time = UpdateStats.CurrentTimeMillis() - UpdateStats.LastServerSaveTime;
                text4 = text4 + "\nThe last online save was " + Conv.MsToGuiText(time, true) + " ago.";
            }
            else
            {
                text4 += "\nThe game was not saved online yet since you started the game.";
            }
            text4 = text4 + "\nThe next online save will be in: " + Conv.MsToGuiText(UpdateStats.NextOnlineSaveTime, false);
            string str  = "Kongregate";
            bool   flag = !string.IsNullOrEmpty(App.State.KongUserId);

            if (App.CurrentPlattform == Plattform.Steam)
            {
                str  = "Steam";
                flag = !string.IsNullOrEmpty(App.State.SteamId);
            }
            if (App.CurrentPlattform == Plattform.Android)
            {
                flag = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(35f)), new GUIContent("Save Online", text4)))
            {
                if (!flag)
                {
                    GuiBase.ShowToast("Sorry, you need to be logged in in " + str + " to use this feature.");
                }
                else
                {
                    this.SaveOnline();
                }
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Load Online", "Loads the online save and overwrites your current save. If you lose your local save, this is the way to get back your game state, if there is an online save. You need to do this within 15 minutes, or the autosave will overwrite your online save.")))
            {
                if (!flag)
                {
                    GuiBase.ShowToast("Sorry, you need to be logged in in " + str + " to use this feature.");
                }
                else
                {
                    this.LoadOnline();
                }
            }
            num += 45;
            int num2 = 114;

            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width((float)num2), InfoArea.Height(35f)), new GUIContent("Credits", "A list of contributers to the game.")))
            {
                this.ShowCredits = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Feedback", "Email the developer to give feedback or report bugs.")))
            {
                this.SendEmail();
            }
            num += 45;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("My Other Games", "Opens my website to show the other games I made.\nBecause it only works as either a popup or it would replace the page, it is shown as a popup. So make sure to view blocked popups if your browser blocks it.")))
            {
                App.OpenWebsite("https://shugasu.com/games");
            }
            num += 45;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("Legals")))
            {
                this.ImprintIsShowing = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(85f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("TOU")))
            {
                this.TouIsShowing = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(170f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("Privacy")))
            {
                this.PrivacyIsShowing = true;
            }
            num += 70;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("Reset game", "This will reset all stats and multipliers to the base values.")))
            {
                this.ResetGame();
            }
            GUI.EndGroup();
            InfoArea.InfoAreaTooltip = GUI.tooltip;
        }
예제 #19
0
        protected override void ShowLabels(int marginTop, GUIStyle labelStyle)
        {
            this.SyncScrollbars  = false;
            labelStyle.alignment = TextAnchor.MiddleLeft;
            labelStyle.fontStyle = FontStyle.Normal;
            labelStyle.fontSize  = GuiBase.FontSize(16);
            marginTop           += 5;
            string text = "Info";

            if (this.isFighting || this.showBaalPower || this.showInfo)
            {
                text = "Back";
            }
            if (GUI.Button(new Rect(GuiBase.Width(560f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), text))
            {
                if (this.isFighting)
                {
                    this.isFighting = false;
                }
                else if (this.showBaalPower)
                {
                    this.showBaalPower = false;
                }
                else
                {
                    this.showInfo = !this.showInfo;
                }
            }
            bool flag = App.State.Statistic.UltimateBaalChallengesFinished > 0 || (!this.showInfo && App.State.Statistic.ArtyChallengesFinished > 0);

            if (!App.State.HomePlanet.IsCreated)
            {
                flag = false;
            }
            if (App.State.HomePlanet.IsCreated)
            {
                if (App.State.Statistic.ArtyChallengesFinished > 0 || App.State.Statistic.UltimateBaalChallengesFinished > 0)
                {
                    PlanetUi.ToolbarIntPlanet = GUI.Toolbar(new Rect(GuiBase.Width(320f), GuiBase.Height(45f), GuiBase.Width(330f), GuiBase.Height(25f)), PlanetUi.ToolbarIntPlanet, this.toolbarStringsPlanet);
                    this.showV2 = (PlanetUi.ToolbarIntPlanet == 1 && flag);
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(450f), GuiBase.Height(45f), GuiBase.Width(100f), GuiBase.Height(25f)), new GUIContent("???", "Finish at least one UBC or UAC to unlock"));
                }
            }
            if (!this.showInfo && !this.isFighting && !this.showBaalPower)
            {
                if (App.State.HomePlanet.UpgradeLevel < 5 || !App.State.HomePlanet.IsCreated)
                {
                    string buttonText = "Unlock";
                    if (App.State.HomePlanet.IsCreated)
                    {
                        buttonText = "Upgrade";
                    }
                    if (GUI.Button(new Rect(GuiBase.Width(320f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), buttonText))
                    {
                        int creationTier = 24 + App.State.HomePlanet.UpgradeLevel.ToInt();
                        if (!App.State.HomePlanet.IsCreated)
                        {
                            creationTier = 23;
                        }
                        Creation creationNeeded = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == (Creation.CreationType)creationTier);
                        if (creationNeeded == null || creationNeeded.Count == 0)
                        {
                            if (!App.State.HomePlanet.IsCreated)
                            {
                                GuiBase.ShowToast("You need to defeat Jupiter and create one Planet to unlock your home planet.");
                            }
                            else
                            {
                                GuiBase.ShowToast(string.Concat(new string[]
                                {
                                    "You need 1 ",
                                    creationNeeded.Name,
                                    " to ",
                                    buttonText,
                                    " your Planet!"
                                }));
                            }
                        }
                        else
                        {
                            GuiBase.ShowDialog(buttonText + " Planet", string.Concat(new string[]
                            {
                                "Do you want to ",
                                buttonText.ToLower(),
                                " your Planet and use up 1 ",
                                creationNeeded.Name,
                                "?"
                            }), delegate
                            {
                                App.State.HomePlanet.Upgrade(App.State);
                                creationNeeded.Count -= 1;
                                GuiBase.ShowToast("You successfully " + buttonText + "d your Planet by spending 1 " + creationNeeded.Name);
                            }, delegate
                            {
                            }, "Yes", "No", false, false);
                        }
                    }
                }
                if (App.State.HomePlanet.IsCreated)
                {
                    labelStyle.fontStyle = FontStyle.Bold;
                    labelStyle.fontSize  = GuiBase.FontSize(18);
                    string text2 = string.Concat(new object[]
                    {
                        App.State.HomePlanet.Name,
                        " (level ",
                        App.State.HomePlanet.UpgradeLevel,
                        ")"
                    });
                    if (App.State.HomePlanet.UpgradeLevel == 50)
                    {
                        text2 = string.Concat(new object[]
                        {
                            App.State.HomePlanet.Name,
                            " (level ",
                            App.State.HomePlanet.UpgradeLevel,
                            " MAX)"
                        });
                    }
                    GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(500f), GuiBase.Height(30f)), text2, labelStyle);
                    labelStyle.alignment = TextAnchor.UpperCenter;
                    GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(220f), GuiBase.Height(30f)), "Ultimate Being");
                    if (!this.showV2)
                    {
                        GUI.Label(new Rect(GuiBase.Width(175f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(220f), GuiBase.Height(30f)), "Revert time");
                        GUI.Label(new Rect(GuiBase.Width(355f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(200f), GuiBase.Height(30f)), "Multiplier increase", labelStyle);
                    }
                    else
                    {
                        GUI.Label(new Rect(GuiBase.Width(175f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(220f), GuiBase.Height(30f)), "Count");
                        GUI.Label(new Rect(GuiBase.Width(330f), GuiBase.Height((float)(marginTop + 95)), GuiBase.Width(100f), GuiBase.Height(30f)), "Stop At");
                    }
                }
            }
            labelStyle.fontSize = GuiBase.FontSize(16);
        }
예제 #20
0
        public static void Show()
        {
            if (KredOffersUi.ShowAds)
            {
                KredOffersUi.ShowAdUi();
                return;
            }
            GUIStyle style  = GUI.skin.GetStyle("Label");
            GUIStyle style2 = GUI.skin.GetStyle("Button");

            style2.fontSize = GuiBase.FontSize(16);
            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(15);
            GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            if (Kongregate.IsWaitingForPurchase)
            {
                GUI.Label(new Rect(GuiBase.Width(310f), GuiBase.Height(130f), GuiBase.Width(630f), GuiBase.Height(70f)), "Waiting for the result...");
                return;
            }
            KredOffersUi.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(280f), GuiBase.Height(120f), GuiBase.Width(660f), GuiBase.Height(430f)), KredOffersUi.scrollPosition, new Rect(0f, GuiBase.Height(20f), GuiBase.Width(620f), GuiBase.Height((float)KredOffersUi.marginTop)));
            KredOffersUi.marginTop      = 25;
            GUI.Label(new Rect(GuiBase.Width(25f), GuiBase.Height((float)(KredOffersUi.marginTop + 5)), GuiBase.Width(400f), GuiBase.Height(30f)), "Want some rewards without spending Kreds?");
            if (GUI.Button(new Rect(GuiBase.Width(445f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Click here")))
            {
                KredOffersUi.ShowAds = true;
            }
            KredOffersUi.marginTop += 55;
            if (!App.State.PremiumBoni.HasPurchasedGodPowerOnce)
            {
                style.fontStyle = FontStyle.Bold;
                style.fontSize  = GuiBase.FontSize(18);
                GUI.Label(new Rect(GuiBase.Width(25f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(630f), GuiBase.Height(70f)), "For your first 'God Power' purchase you will receive twice the amount!");
                style.fontSize          = GuiBase.FontSize(15);
                style.fontStyle         = FontStyle.Normal;
                KredOffersUi.marginTop += 35;
            }
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            KredOffersUi.AddHeader("God Power", 20, style);
            int num = App.State.PremiumBoni.GodPowerPurchaseBonusPercent();

            if (num > 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(120f)), "The more you play and the more you purchase, the more God Power you will receive from purchases.\nCurrent bonus: " + num + "%\nYou will receive what is shown on the buttons, even if the purchase dialog afterwards shows less.");
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Gain the power of gods!\nWith god power you can buy various permanent bonuses in the god power page.");
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(170f), GuiBase.Width(150f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodPower);
            GUI.Label(new Rect(GuiBase.Width(150f), GuiBase.Height(162f), GuiBase.Width(40f), GuiBase.Height(40f)), KredOffersUi.godPower);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            int num2 = 5 * (num + 100) / 100;

            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy " + num2 + " for 25")))
            {
                Kongregate.PurchaseItem(Premium.ID_GOD_POWER5);
            }
            num2 = 25 * (num + 100) / 100;
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(100f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy " + num2 + " for 110")))
            {
                Kongregate.PurchaseItem(Premium.ID_GOD_POWER25);
            }
            num2 = 50 * (num + 100) / 100;
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy " + num2 + " for 210")))
            {
                Kongregate.PurchaseItem("jeahitsmine");
            }
            num2 = 100 * (num + 100) / 100;
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(180f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(180f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy " + num2 + " for 399")))
            {
                Kongregate.PurchaseItem(Premium.ID_GOD_POWER100);
            }
            KredOffersUi.marginTop += 225;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(250f)));
            KredOffersUi.AddHeader("Lucky Draws", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Try out your luck!");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(185f), GuiBase.Width(400f), GuiBase.Height(35f)), "You have: " + App.State.PremiumBoni.LuckyDraws.GuiText);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(210f), GuiBase.Width(400f), GuiBase.Height(35f)), "You can open up at most 50 a day.");
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 10")))
            {
                Kongregate.PurchaseItem(Premium.ID_LUCKY_DRAW);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(100f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 10 for 90")))
            {
                Kongregate.PurchaseItem(Premium.ID_LUCKY_DRAW10);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 50 for 398")))
            {
                Kongregate.PurchaseItem(Premium.ID_LUCKY_DRAW50);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(180f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.luckyDraw);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(180f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Open one")))
            {
                GuiBase.ShowToast(App.State.PremiumBoni.UseLuckyDraw());
            }
            if (App.State.PremiumBoni.TimeForNextLuckyDraw < 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(95f), GuiBase.Width(200f), GuiBase.Height(25f)), "Get your free draw now!");
                if (GUI.Button(new Rect(GuiBase.Width(240f), GuiBase.Height(100f), GuiBase.Width(130f), GuiBase.Height(32f)), new GUIContent("Get free draw!")))
                {
                    App.State.PremiumBoni.GetFreeLuckyDraw();
                }
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(95f), GuiBase.Width(200f), GuiBase.Height(50f)), "Time until your free draw is ready: " + Conv.MsToGuiText(App.State.PremiumBoni.TimeForNextLuckyDraw.ToLong(), true));
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(450f), GuiBase.Height(50f)), App.State.Ext.Lucky.LastDrawText);
            KredOffersUi.marginTop += 240;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(220f)));
            KredOffersUi.AddHeader("Daily Packs", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Get one additional Lucky Draw and 2 God Power once a day for 15 or 30 days!");
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 15 for 50")))
            {
                Kongregate.PurchaseItem(Premium.ID_DAILY_PACK_15);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(100f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 30 for 90")))
            {
                Kongregate.PurchaseItem(Premium.ID_DAILY_PACK);
            }
            int num3 = 110;

            if (App.State.PremiumBoni.DailyPackDaysLeft > 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(400f), GuiBase.Height(30f)), "Packs Left: " + App.State.PremiumBoni.DailyPackDaysLeft.GuiText);
                if (App.State.PremiumBoni.TimeForNextDailyPack <= 0L)
                {
                    GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(150f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.dailyPack);
                    if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(150f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Open Pack")))
                    {
                        App.State.PremiumBoni.GetDailyPack();
                    }
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(110f), GuiBase.Width(260f), GuiBase.Height(50f)), "Time until the next pack arrives: " + Conv.MsToGuiText(App.State.PremiumBoni.TimeForNextDailyPack, true));
                }
                num3 = 180;
            }
            KredOffersUi.marginTop += num3;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            KredOffersUi.AddHeader("Pet Token", 20, style);
            int num4 = 60;

            if (!App.State.PremiumBoni.BoughtLimitedPetToken)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)num4), GuiBase.Width(400f), GuiBase.Height(100f)), "Limited Offer. You can only buy this once!");
                GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height((float)num4), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height((float)num4), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 49")))
                {
                    Kongregate.PurchaseItem(Premium.ID_PET_TOKEN_LIMITED);
                }
                KredOffersUi.marginTop += 40;
                num4 += 40;
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)num4), GuiBase.Width(400f), GuiBase.Height(100f)), "Unlock special Pets!\nYou can see the pets in Fight -> Pets.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)(num4 + 70)), GuiBase.Width(150f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.PetToken.GuiText);
            GUI.Label(new Rect(GuiBase.Width(150f), GuiBase.Height((float)(num4 + 62)), GuiBase.Width(50f), GuiBase.Height(50f)), KredOffersUi.imgPetToken);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height((float)num4), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height((float)num4), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 150")))
            {
                Kongregate.PurchaseItem(Premium.ID_PET_TOKEN);
            }
            num4 += 40;
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height((float)num4), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height((float)num4), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 3 for 399")))
            {
                Kongregate.PurchaseItem(Premium.ID_PET_TOKEN3);
            }
            KredOffersUi.marginTop += 180;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            KredOffersUi.AddHeader("Improved Crystal Upgrade", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Adds 25% to the starting upgrade chance for all crystals (can't go higher than 95%)!\nYou can get this only once.");
            if (App.State.PremiumBoni.HasCrystalImprovement)
            {
                GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "You own this already!");
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy for 135")))
                {
                    Kongregate.PurchaseItem(Premium.ID_CRYSTAL_CHANCE);
                }
            }
            KredOffersUi.marginTop += 120;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            KredOffersUi.AddHeader("Crystal Equip Slot", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Adds one more equip slot for your crystals!\n");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(83f), GuiBase.Width(400f), GuiBase.Height(100f)), "Currently you can equip " + App.State.PremiumBoni.MaxCrystals.GuiText + " crystals at once.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(106f), GuiBase.Width(400f), GuiBase.Height(100f)), "You can buy up to " + (6 - App.State.PremiumBoni.MaxCrystals).GuiText + " more slots.");
            if (App.State.PremiumBoni.MaxCrystals >= 6)
            {
                GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Your slots are maxed!");
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy for 90")))
                {
                    Kongregate.PurchaseItem(Premium.ID_CRYSTAL_SLOT);
                }
            }
            KredOffersUi.marginTop += 135;
            GUI.EndGroup();
            if (App.State.PremiumBoni.ImprovedNextAt)
            {
                GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
                KredOffersUi.AddHeader("Improved Next At for challenges", 20, style);
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "If you buy this, improved next at will also work in challenges!\n");
                if (App.State.PremiumBoni.ChallengeImprovedNextAt)
                {
                    GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "You own this already!");
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
                    if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy for 175")))
                    {
                        Kongregate.PurchaseItem(Premium.ID_CHALLENGE_NEXT_AT);
                    }
                }
                KredOffersUi.marginTop += 100;
                GUI.EndGroup();
            }
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            KredOffersUi.AddHeader("Refrigerator", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Keeps your food save. If you buy this, you won't lose your pet food after rebirthing!\n");
            if (App.State.PremiumBoni.PetFoodAfterRebirth)
            {
                GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "You own this already!");
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy for 175")))
                {
                    Kongregate.PurchaseItem(Premium.ID_FOOD_AFTER_REBIRTH);
                }
            }
            KredOffersUi.marginTop += 110;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            KredOffersUi.AddHeader("Unlimited Gender Change", 20, style);
            if (App.State.PremiumBoni.HasUnlimitedGenderChange)
            {
                string str = "male";
                if (App.State.Avatar.IsFemale)
                {
                    str = "female";
                }
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(390f), GuiBase.Height(100f)), "Change your gender. Your current gender is " + str);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Change")))
                {
                    App.State.Avatar.GenderChosen = false;
                    HeroImage.Init(true);
                }
                KredOffersUi.marginTop += 20;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(100f), GuiBase.Width(390f), GuiBase.Height(100f)), "Change your name. Your current name is " + App.State.AvatarName);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Change")))
                {
                    App.State.ChangeAvatarName = true;
                }
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "If you buy this, you can change your name and gender for free as often as you want!\n");
                GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy for 149")))
                {
                    Kongregate.PurchaseItem(Premium.ID_UGC);
                }
            }
            KredOffersUi.marginTop += 150;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(180f)));
            KredOffersUi.AddHeader("Ultimate shadow summon", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Creating shadow clones is too slow? With this you will max them instantly!");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.UltimateShadowSummonCount);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 15")))
            {
                Kongregate.PurchaseItem(Premium.ID_SHADOW_SUMMON);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(100f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 10 for 120")))
            {
                Kongregate.PurchaseItem(Premium.ID_SHADOW_SUMMON10);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.imgShadowSummon);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseUltimateShadowSummon();
            }
            KredOffersUi.marginTop += 170;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(180f)));
            KredOffersUi.AddHeader("Godly liquid", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Doubles your speed when creating creations (and clones) for 90 minutes. (Multiplies with godly liquid V2)");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(110f), GuiBase.Width(400f), GuiBase.Height(30f)), "Duration left: " + Conv.MsToGuiText(App.State.PremiumBoni.GodlyLiquidDuration, true));
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodlyLiquidCount);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 10")))
            {
                Kongregate.PurchaseItem("nightmare");
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(100f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 10 for 90")))
            {
                Kongregate.PurchaseItem("myfirstid");
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.imgGodlyLiquid);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseGodlyLiquid();
            }
            KredOffersUi.marginTop += 170;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(180f)));
            KredOffersUi.AddHeader("Godly liquid V2", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Doubles your speed when creating creations (and clones) until your next rebirth.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(110f), GuiBase.Width(400f), GuiBase.Height(30f)), "Is in use: " + App.State.PremiumBoni.GodlyLiquidV2InUse);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodlyLiquidV2Count);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(60f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 33")))
            {
                Kongregate.PurchaseItem(Premium.ID_GODLY_LIQUID_REBIRTH);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(100f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 10 for 299")))
            {
                Kongregate.PurchaseItem(Premium.ID_GODLY_LIQUID_REBIRTH10);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.imgGodlyLiquidV2);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseGodlyLiquidRebirth();
            }
            KredOffersUi.marginTop += 170;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(180f)));
            KredOffersUi.AddHeader("Chakra pill", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(65f)), "Increases your chakra to let your clones build faster.\nDoubles the speed to build monuments and upgrades for 90 minutes. (Multiplies with chakra pill V2)");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(120f), GuiBase.Width(400f), GuiBase.Height(30f)), "Duration left: " + Conv.MsToGuiText(App.State.PremiumBoni.ChakraPillDuration, true));
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.ChakraPillCount);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(70f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(70f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 10")))
            {
                Kongregate.PurchaseItem("xzp");
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(110f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(110f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 10 for 90")))
            {
                Kongregate.PurchaseItem("helloworld");
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(150f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.imgChakraPill);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(150f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseChakraPill();
            }
            KredOffersUi.marginTop += 180;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)KredOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(180f)));
            KredOffersUi.AddHeader("Chakra pill V2", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(65f)), "Increases your chakra to let your clones build faster.\nDoubles the speed to build monuments and upgrades until your next rebirth.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(120f), GuiBase.Width(400f), GuiBase.Height(30f)), "Is in use: " + App.State.PremiumBoni.ChakraPillV2InUse);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.ChakraPillV2Count);
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(70f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(70f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 1 for 33")))
            {
                Kongregate.PurchaseItem(Premium.ID_CHAKRA_PILL_REBIRTH);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(110f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.kreds);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(110f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Buy 10 for 299")))
            {
                Kongregate.PurchaseItem(Premium.ID_CHAKRA_PILL_REBIRTH10);
            }
            GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height(150f), GuiBase.Width(32f), GuiBase.Height(32f)), KredOffersUi.imgChakraPillV2);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(150f), GuiBase.Width(140f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseChakraPillRebirth();
            }
            KredOffersUi.marginTop += 180;
            GUI.EndGroup();
            GUI.EndScrollView();
        }
예제 #21
0
        public static void Show()
        {
            GUIStyle style  = GUI.skin.GetStyle("Label");
            GUIStyle style2 = GUI.skin.GetStyle("Button");

            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(16);
            style2.fontSize = GuiBase.FontSize(16);
            App.State.PremiumBoni.CheckIfGPIsAdjusted();
            GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            GodPowerUi.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(280f), GuiBase.Height(120f), GuiBase.Width(660f), GuiBase.Height(430f)), GodPowerUi.scrollPosition, new Rect(0f, GuiBase.Height(20f), GuiBase.Width(620f), GuiBase.Height((float)GodPowerUi.marginTop)));
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(30f), GuiBase.Width(400f), GuiBase.Height(30f)), "Here you can buy various offers with your god power.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(68f), GuiBase.Width(150f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodPower);
            GUI.Label(new Rect(GuiBase.Width(150f), GuiBase.Height(60f), GuiBase.Width(40f), GuiBase.Height(40f)), GodPowerUi.godPower);
            GodPowerUi.marginTop = 105;
            string tooltip = string.Empty;

            if (App.State.Statistic.UltimateBaalChallengesFinished > 0 || App.State.Statistic.ArtyChallengesFinished > 0)
            {
                tooltip = "The value in brackets is the total boost with your crystal power included.";
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(600f), GuiBase.Height(30f)), new GUIContent("You can adjust unused god power for additional stat multiplier.", tooltip));
            GodPowerUi.marginTop += 30;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Bonus Physical: "));
            GUI.Label(new Rect(GuiBase.Width(250f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent(" % (" + (App.State.PremiumBoni.GpBoniPhysical * (1 + App.State.PremiumBoni.CrystalPower / 1000)).GuiText + ")"));
            App.State.PremiumBoni.GpBoniPhysical = (int)GUI.HorizontalSlider(new Rect(GuiBase.Width(340f), GuiBase.Height((float)(GodPowerUi.marginTop + 2)), GuiBase.Width(200f), GuiBase.Height(30f)), (float)App.State.PremiumBoni.GpBoniPhysical.ToInt(), 0f, (float)App.State.PremiumBoni.MaxBoniPhysical);
            GodPowerUi.addTextField(ref App.State.PremiumBoni.GpBoniPhysical, App.State.PremiumBoni.GodPower);
            GodPowerUi.marginTop += 30;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Bonus Mystic: "));
            GUI.Label(new Rect(GuiBase.Width(250f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent(" % (" + (App.State.PremiumBoni.GpBoniMystic * (1 + App.State.PremiumBoni.CrystalPower / 1000)).GuiText + ")"));
            App.State.PremiumBoni.GpBoniMystic = (int)GUI.HorizontalSlider(new Rect(GuiBase.Width(340f), GuiBase.Height((float)(GodPowerUi.marginTop + 2)), GuiBase.Width(200f), GuiBase.Height(30f)), (float)App.State.PremiumBoni.GpBoniMystic.ToInt(), 0f, (float)App.State.PremiumBoni.MaxBoniMystic);
            GodPowerUi.addTextField(ref App.State.PremiumBoni.GpBoniMystic, App.State.PremiumBoni.GodPower);
            GodPowerUi.marginTop += 30;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Bonus Battle: "));
            GUI.Label(new Rect(GuiBase.Width(250f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent(" % (" + (App.State.PremiumBoni.GpBoniBattle * (1 + App.State.PremiumBoni.CrystalPower / 1000)).GuiText + ")"));
            App.State.PremiumBoni.GpBoniBattle = (int)GUI.HorizontalSlider(new Rect(GuiBase.Width(340f), GuiBase.Height((float)(GodPowerUi.marginTop + 2)), GuiBase.Width(200f), GuiBase.Height(30f)), (float)App.State.PremiumBoni.GpBoniBattle.ToInt(), 0f, (float)App.State.PremiumBoni.MaxBoniBattle);
            GodPowerUi.addTextField(ref App.State.PremiumBoni.GpBoniBattle, App.State.PremiumBoni.GodPower);
            GodPowerUi.marginTop += 30;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Bonus Creating: "));
            GUI.Label(new Rect(GuiBase.Width(250f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent(" % (" + (App.State.PremiumBoni.GpBoniCreating * (1 + App.State.PremiumBoni.CrystalPower / 1000)).GuiText + ")"));
            App.State.PremiumBoni.GpBoniCreating = (int)GUI.HorizontalSlider(new Rect(GuiBase.Width(340f), GuiBase.Height((float)(GodPowerUi.marginTop + 2)), GuiBase.Width(200f), GuiBase.Height(30f)), (float)App.State.PremiumBoni.GpBoniCreating.ToInt(), 0f, (float)App.State.PremiumBoni.MaxBoniCreating);
            GodPowerUi.addTextField(ref App.State.PremiumBoni.GpBoniCreating, App.State.PremiumBoni.GodPower);
            GodPowerUi.marginTop += 35;
            style.fontStyle       = FontStyle.Bold;
            if (App.State.PremiumBoni.CrystalPower > 0 || App.State.PremiumBoni.CrystalBonusBuilding > 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(450f), GuiBase.Height(30f)), new GUIContent(string.Concat(new object[]
                {
                    "Your current creating speed multiplier: ",
                    App.State.PremiumBoni.CreatingSpeedUpPercent(false),
                    " % (",
                    App.State.PremiumBoni.CreatingSpeedUpPercent(true),
                    ")"
                }), string.Concat(new object[]
                {
                    "The higher your multiplier, the faster you can create things.\n",
                    App.State.PremiumBoni.CreatingSpeedUpPercent(false),
                    " from god power and ",
                    App.State.PremiumBoni.CrystalPower / 2,
                    " from crystal power."
                })));
                string text = ".";
                if (App.State.PremiumBoni.CrystalBonusBuilding > 0)
                {
                    text = ", increased by " + App.State.PremiumBoni.CrystalBonusBuilding.GuiText + " % from equipped crystals.";
                }
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)(GodPowerUi.marginTop + 28)), GuiBase.Width(450f), GuiBase.Height(30f)), new GUIContent(string.Concat(new object[]
                {
                    "Your current building speed multiplier: ",
                    App.State.PremiumBoni.BuildingSpeedUpPercent(false),
                    " % (",
                    App.State.PremiumBoni.BuildingSpeedUpPercent(true),
                    ")"
                }), string.Concat(new object[]
                {
                    "The higher your multiplier, the faster you can build monuments and upgrades.\n",
                    App.State.PremiumBoni.BuildingSpeedUpPercent(false),
                    " from god power and ",
                    App.State.PremiumBoni.CrystalPower / 2,
                    " from crystal power",
                    text
                })));
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(450f), GuiBase.Height(30f)), new GUIContent("Your current creating speed multiplier: " + App.State.PremiumBoni.CreatingSpeedUpPercent(true) + " %", "The higher your multiplier, the faster you can create things.\n"));
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)(GodPowerUi.marginTop + 28)), GuiBase.Width(450f), GuiBase.Height(30f)), new GUIContent("Your current building speed multiplier: " + App.State.PremiumBoni.BuildingSpeedUpPercent(true) + " %", "The higher your multiplier, the faster you can build monuments and upgrades."));
            }
            if (App.State.Statistic.UltimateBaalChallengesFinished > 0 || App.State.Statistic.ArtyChallengesFinished > 0)
            {
                GodPowerUi.marginTop += 30;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)(GodPowerUi.marginTop + 28)), GuiBase.Width(400f), GuiBase.Height(30f)), new GUIContent("Crystal Power: " + App.State.PremiumBoni.CrystalPower.GuiText, "If you have crystals equipped when you rebirth, you will receive 1 crystal power for each grade (2 for ultimate crystals, 3 for god crystals).\nEach crystal power will add 0.5% to your creating speed, building speed multiplier, and increases the effectiveness of unused godpower adjusted by 0.1%."));
            }
            if (App.State.Statistic.HighestGodDefeated >= 28 && !App.State.Statistic.HasStartedArtyChallenge)
            {
                GodPowerUi.marginTop += 61;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(600f), GuiBase.Height(30f)), new GUIContent("Your current chance to lose levels on a miss in the TBS - Game: " + (100 - App.State.PremiumBoni.TbsMissreduction) + " %", "The lower the chance, the less likely you will lose a level when you miss on the TBS - Game. (20% is minimum)"));
                GodPowerUi.marginTop += 28;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(600f), GuiBase.Height(30f)), new GUIContent("The progress from the TBS - Game you keep after rebirthing: " + App.State.PremiumBoni.TbsProgressAfterRebirth + " %", "After rebirthing you will keep the shown % of your levels in the TBS - Game. (80% is maximum)"));
                GodPowerUi.marginTop += 28;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(600f), GuiBase.Height(30f)), new GUIContent("Chance for double points in TBS: " + App.State.PremiumBoni.TbsDoublePoints + " %", "If you hit the white bar in TBS, this is your chance to get twice as much points. (100% is maximum)"));
                GodPowerUi.marginTop += 28;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(600f), GuiBase.Height(30f)), new GUIContent("Extra Pixels for the white area: " + App.State.PremiumBoni.TbsExtraPixels, "The current (and also the minimum) width of the white area is increased by " + App.State.PremiumBoni.TbsExtraPixels + " pixels. (3 is maximum)"));
                GodPowerUi.marginTop -= 20;
            }
            style.fontStyle       = FontStyle.Normal;
            GodPowerUi.marginTop += 70;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase creating speed permanently by 2%", " increases your creating speed permanently by 2%.", GodPowerUi.marginTop, 1, style, delegate
            {
                App.State.PremiumBoni.AddCreationSpeed(2);
                GuiBase.ShowToast("Your creating speed multiplier is now increased by 2%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase creating speed permanently by 5%", " increases your creating speed permanently by 5%.", GodPowerUi.marginTop, 2, style, delegate
            {
                App.State.PremiumBoni.AddCreationSpeed(5);
                GuiBase.ShowToast("Your creating speed multiplier is now increased by 5%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase creating speed permanently by 15%", " increases your creating speed permanently by 15%.", GodPowerUi.marginTop, 5, style, delegate
            {
                App.State.PremiumBoni.AddCreationSpeed(15);
                GuiBase.ShowToast("Your creating speed multiplier is now increased by 15%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase creating speed permanently by 35%", " increases your creating speed permanently by 35%.", GodPowerUi.marginTop, 10, style, delegate
            {
                App.State.PremiumBoni.AddCreationSpeed(35);
                GuiBase.ShowToast("Your creating speed multiplier is now increased by 35%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase creating speed permanently by 350%", " increases your creating speed permanently by 350%.", GodPowerUi.marginTop, 100, style, delegate
            {
                App.State.PremiumBoni.AddCreationSpeed(350);
                GuiBase.ShowToast("Your creating speed multiplier is now increased by 350%!");
            });
            GodPowerUi.marginTop += 20;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase building speed permanently by 2%", " increases your building speed permanently by 2%.", GodPowerUi.marginTop, 1, style, delegate
            {
                App.State.PremiumBoni.AddBuildingSpeed(2);
                GuiBase.ShowToast("Your building speed multiplier is now increased by 2%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase building speed permanently by 5%", " increases your building speed permanently by 5%.", GodPowerUi.marginTop, 2, style, delegate
            {
                App.State.PremiumBoni.AddBuildingSpeed(5);
                GuiBase.ShowToast("Your building speed multiplier is now increased by 5%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase building speed permanently by 15%", " increases your building speed permanently by 15%.", GodPowerUi.marginTop, 5, style, delegate
            {
                App.State.PremiumBoni.AddBuildingSpeed(15);
                GuiBase.ShowToast("Your building speed multiplier is now increased by 15%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase building speed permanently by 35%", " increases your building speed permanently by 35%.", GodPowerUi.marginTop, 10, style, delegate
            {
                App.State.PremiumBoni.AddBuildingSpeed(35);
                GuiBase.ShowToast("Your building speed multiplier is now increased by 35%!");
            });
            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase building speed permanently by 350%", " increases your building speed permanently by 350%.", GodPowerUi.marginTop, 100, style, delegate
            {
                App.State.PremiumBoni.AddBuildingSpeed(350);
                GuiBase.ShowToast("Your building speed multiplier is now increased by 350%!");
            });
            GodPowerUi.marginTop += 20;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Double your statistic multi (currently: " + App.State.PremiumBoni.StatisticMulti.GuiText + " x)", "your statistic multi will double. (It still can't be higher than your god multi, so only buy it, if you feel like your god multi outruns your statistic multi by far)", GodPowerUi.marginTop, 50, style, delegate
            {
                App.State.PremiumBoni.StatisticMulti = App.State.PremiumBoni.StatisticMulti * 2;
                GuiBase.ShowToast("Your statistic multi is now twice as high!");
            });
            GodPowerUi.marginTop += 20;
            GodPowerUi.marginTop  = GodPowerUi.AddItem(string.Concat(new object[]
            {
                "Increase the count of creations per bar by one. \nYou need to be able to afford it or nothing will be created.\nCurrently you can create up to ",
                App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1,
                " (",
                App.State.PremiumBoni.CreationCountBoni(false).ToInt() + 1,
                " from god power) at once."
            }), "increases the count you create for each progressbar in 'Create' by one.", GodPowerUi.marginTop, 50, style, delegate
            {
                App.State.PremiumBoni.AddCreationCountBoni(1);
                GuiBase.ShowToast("You can now create more items for each progress!");
            });
            GodPowerUi.marginTop += 100;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase your maximum Clones by 1 instantly.\nAlso increases your soft cap by 1.", "increases your maximum clones by 1.", GodPowerUi.marginTop, 1, style, delegate
            {
                App.State.Clones.MaxShadowClones += 1;
                App.State.Clones.AbsoluteMaximum++;
                GuiBase.ShowToast("Your maximum clones are increased by 1!");
            });
            GodPowerUi.marginTop += 25;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase your maximum Clones by 1000 instantly.\nAlso increases your soft cap by 1000.", "increases your maximum clones by 1000.", GodPowerUi.marginTop, 3, style, delegate
            {
                App.State.Clones.MaxShadowClones += 1000;
                App.State.Clones.AbsoluteMaximum += 1000;
                GuiBase.ShowToast("Your maximum clones are increased by 1000!");
            });
            GodPowerUi.marginTop += 25;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase your maximum Clones by 10000 instantly.\nAlso increases your soft cap by 10000.", "increases your maximum clones by 10000.", GodPowerUi.marginTop, 25, style, delegate
            {
                App.State.Clones.MaxShadowClones += 10000;
                App.State.Clones.AbsoluteMaximum += 10000;
                GuiBase.ShowToast("Your maximum clones are increased by 10000!");
            });
            GodPowerUi.marginTop += 25;
            GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase your maximum Clones by 100,000 instantly.\nAlso increases your soft cap by 100,000.", "increases your maximum clones by 100,000.", GodPowerUi.marginTop, 250, style, delegate
            {
                App.State.Clones.MaxShadowClones += 100000;
                App.State.Clones.AbsoluteMaximum += 100000;
                GuiBase.ShowToast("Your maximum clones are increased by 100,000!");
            });
            if (App.State.Statistic.HighestGodDefeated >= 28)
            {
                if (App.State.PremiumBoni.TbsMissreduction < 80)
                {
                    GodPowerUi.marginTop += 25;
                    GodPowerUi.marginTop  = GodPowerUi.AddItem("Reduce the chance to lose a level on the TBS - Game when you miss by 5%.", "decreases the chance to lose points after a miss in the TBS - Game by 5%. (20% is minimum).", GodPowerUi.marginTop, 10, style, delegate
                    {
                        App.State.PremiumBoni.TbsMissreduction += 5;
                        GuiBase.ShowToast("The chance to lose a level if you miss in the TBS - Game is reduced by 5%!");
                    });
                }
                if (App.State.PremiumBoni.TbsProgressAfterRebirth < 80)
                {
                    GodPowerUi.marginTop += 25;
                    GodPowerUi.marginTop  = GodPowerUi.AddItem("Keep 10% of your levels from the TBS - Game even after rebirthing.", "you will Keep 10% more of your levels from the TBS - Game after rebirthing. (80% is maximum)", GodPowerUi.marginTop, 10, style, delegate
                    {
                        App.State.PremiumBoni.TbsProgressAfterRebirth += 10;
                        GuiBase.ShowToast("You keep 10% more of your levels after rebirthing!");
                    });
                }
                if (App.State.PremiumBoni.TbsDoublePoints < 100)
                {
                    GodPowerUi.marginTop += 25;
                    GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase the chance to score twice as much points in TBS by 5%.", "your chance to score double points in TBS after a hit will increase by 5 %", GodPowerUi.marginTop, 5, style, delegate
                    {
                        App.State.PremiumBoni.TbsDoublePoints += 5;
                        GuiBase.ShowToast("Your chance to score double points in TBS is increased by 5%!");
                    });
                }
                if (App.State.PremiumBoni.TbsExtraPixels < 3)
                {
                    GodPowerUi.marginTop += 25;
                    GodPowerUi.marginTop  = GodPowerUi.AddItem("Increase the white area for TBS by 1 pixel.", "the current (and also the minimum) width of the white area in the TBS-Game will be increased by 1 pixel", GodPowerUi.marginTop, 33, style, delegate
                    {
                        App.State.PremiumBoni.TbsExtraPixels++;
                        GuiBase.ShowToast("The current (and also the minimum) width of the white area in TBS is increased by 1 pixel!");
                    });
                }
            }
            string str = "male";

            if (App.State.Avatar.IsFemale)
            {
                str = "female";
            }
            GodPowerUi.marginTop += 20;
            if (!App.State.PremiumBoni.HasUnlimitedGenderChange)
            {
                GodPowerUi.marginTop = GodPowerUi.AddItem("Change your gender. Your current gender is " + str, "you can choose your gender again.", GodPowerUi.marginTop, 20, style, delegate
                {
                    App.State.Avatar.GenderChosen    = false;
                    App.State.GameSettings.AvaScaled = false;
                    HeroImage.Init(true);
                });
                GodPowerUi.marginTop += 30;
                GodPowerUi.marginTop  = GodPowerUi.AddItem("Change your name. Your current name is " + App.State.AvatarName, "you can rename your character.", GodPowerUi.marginTop, 20, style, delegate
                {
                    App.State.ChangeAvatarName = true;
                });
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(390f), GuiBase.Height(100f)), "Change your gender. Your current gender is " + str);
                if (GUI.Button(new Rect(GuiBase.Width(420f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Change")))
                {
                    App.State.Avatar.GenderChosen    = false;
                    App.State.GameSettings.AvaScaled = false;
                    HeroImage.Init(true);
                }
                GodPowerUi.marginTop += 40;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(390f), GuiBase.Height(100f)), "Change your name. Your current name is " + App.State.AvatarName);
                if (GUI.Button(new Rect(GuiBase.Width(420f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Change")))
                {
                    App.State.ChangeAvatarName = true;
                }
            }
            GodPowerUi.marginTop += 40;
            if (App.State.PremiumBoni.AutoBuyCostReduction < 20)
            {
                GodPowerUi.marginTop += 10;
                GodPowerUi.marginTop  = GodPowerUi.AddItem("Decrease Auto buy cost. Currently you pay " + (120 - App.State.PremiumBoni.AutoBuyCostReduction) + " %.", "decreases the cost for auto buy by 1%.", GodPowerUi.marginTop, 3, style, delegate
                {
                    App.State.PremiumBoni.AutoBuyCostReduction++;
                });
            }
            if (!App.State.PremiumBoni.HasPetHalfStats)
            {
                GodPowerUi.marginTop += 20;
                GodPowerUi.marginTop  = GodPowerUi.AddItem("Pet half stats. This will unlock a button to create clones with half the stats of your pets.", "adds a button 'Half stats' and 'Half stats for all' to the clone creation screen of your pets.", GodPowerUi.marginTop, 100, style, delegate
                {
                    App.State.PremiumBoni.HasPetHalfStats = true;
                    GuiBase.ShowToast("You can now adjust the stats of your clones with one button! It might not be the most effective way but its fast and easy.");
                });
                GodPowerUi.marginTop += 20;
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(550f), GuiBase.Height(50f)), "Pet half stats is already bought");
                GodPowerUi.marginTop += 20;
            }
            if (!App.State.PremiumBoni.ImprovedNextAt)
            {
                GodPowerUi.marginTop += 20;
                GodPowerUi.marginTop  = GodPowerUi.AddItem("Improved 'Next at'. With this your clones will stay at the current skill until a next one is available!", "the 'Next at'-option won't remove clones if there is no skill unlocked.", GodPowerUi.marginTop, 99, style, delegate
                {
                    App.State.PremiumBoni.ImprovedNextAt = true;
                    GuiBase.ShowToast("Now you can say good bye to micromanaging skills. Just have 'Next at' on with a low value until all skills / trainings are unlocked.");
                });
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(550f), GuiBase.Height(50f)), "Improved 'Next at' is already bought");
                GodPowerUi.marginTop += 20;
            }
            if (!App.State.PremiumBoni.CanShowAlerts)
            {
                GodPowerUi.marginTop += 20;
                GodPowerUi.marginTop  = GodPowerUi.AddItem("Show an alert button if your divinity generator is empty or you can feed your pets.", "a button will show up below the achievement toggle, if your divinity generator is empty or your pets can be fed.", GodPowerUi.marginTop, 50, style, delegate
                {
                    App.State.PremiumBoni.CanShowAlerts = true;
                    GuiBase.ShowToast("Now a button will be shown, if your divinity generator is empty or your pets can be fed.");
                });
            }
            else
            {
                GodPowerUi.marginTop += 20;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(550f), GuiBase.Height(50f)), "The alert button is already bought");
                GodPowerUi.marginTop += 20;
            }
            GodPowerUi.marginTop += 35;
            style.fontStyle       = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(550f), GuiBase.Height(50f)), "The offers below are temporary and lost when you rebirth.");
            style.fontStyle       = FontStyle.Normal;
            GodPowerUi.marginTop += 35;
            CDouble newClones = App.State.Clones.MaxShadowClones - App.State.Clones.Count;

            if (newClones > 99999)
            {
                newClones = 99999;
            }
            GodPowerUi.marginTop = GodPowerUi.AddItem("Create up to 99999 Shadow Clones at once! \nThis can't be higher than your maximum clones.", " will let you create " + newClones + " shadow clones at once.", GodPowerUi.marginTop, 3, style, delegate
            {
                App.State.Clones.Count += newClones;
                App.State.Clones.TotalClonesCreated          += newClones;
                App.State.Statistic.TotalShadowClonesCreated += newClones;
                if (App.State.Clones.Count > App.State.Clones.MaxShadowClones)
                {
                    App.State.Clones.Count = App.State.Clones.MaxShadowClones;
                }
                GuiBase.ShowToast("You created " + newClones + " shadow clones at once!");
            });
            GodPowerUi.marginTop += 20;
            CDouble divinityToGet = App.State.DivinityGainSec(true) * 3600;

            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase your 'Divinity' by " + divinityToGet.ToGuiText(true), " will increase your current 'Divinity' by " + divinityToGet.ToGuiText(true), GodPowerUi.marginTop, 1, style, delegate
            {
                App.State.Money += divinityToGet;
                GuiBase.ShowToast("Your 'Divinity' is increased by " + divinityToGet.ToGuiText(true));
            });
            CDouble divinityV2 = divinityToGet * 4;

            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase your 'Divinity' by " + divinityV2.ToGuiText(true), " will increase your current 'Divinity' by " + divinityV2.ToGuiText(true), GodPowerUi.marginTop, 3, style, delegate
            {
                App.State.Money += divinityV2;
                GuiBase.ShowToast("Your 'Divinity' is increased by " + divinityV2.ToGuiText(true));
            });
            CDouble divinityV3 = divinityToGet * 8;

            GodPowerUi.marginTop = GodPowerUi.AddItem("Increase your 'Divinity' by " + divinityV3.ToGuiText(true), " will increase your current 'Divinity' by " + divinityV3.ToGuiText(true), GodPowerUi.marginTop, 5, style, delegate
            {
                App.State.Money += divinityV3;
                GuiBase.ShowToast("Your 'Divinity' is increased by " + divinityV3.ToGuiText(true));
            });
            GUI.EndScrollView();
        }
        public static void Show()
        {
            GUIStyle style  = GUI.skin.GetStyle("Label");
            GUIStyle style2 = GUI.skin.GetStyle("Button");

            style2.fontSize = GuiBase.FontSize(16);
            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(15);
            GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            if (SteamHelper.IsWaitingForPurchase || App.State.PremiumBoni.ItemIdToPurchase != Purchase.None)
            {
                GUI.Label(new Rect(GuiBase.Width(310f), GuiBase.Height(130f), GuiBase.Width(630f), GuiBase.Height(70f)), "Waiting for the result...");
                return;
            }
            SteamOffersUi.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(280f), GuiBase.Height(120f), GuiBase.Width(660f), GuiBase.Height(430f)), SteamOffersUi.scrollPosition, new Rect(0f, GuiBase.Height(20f), GuiBase.Width(620f), GuiBase.Height((float)SteamOffersUi.marginTop)));
            SteamOffersUi.marginTop      = 20;
            if (!App.State.PremiumBoni.HasPurchasedGodPowerOnce)
            {
                style.fontStyle = FontStyle.Bold;
                style.fontSize  = GuiBase.FontSize(18);
                GUI.Label(new Rect(GuiBase.Width(25f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(630f), GuiBase.Height(70f)), "For your first 'God Power' purchase you will receive twice the amount!");
                style.fontSize           = GuiBase.FontSize(15);
                style.fontStyle          = FontStyle.Normal;
                SteamOffersUi.marginTop += 40;
            }
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            SteamOffersUi.AddHeader("God Power", 20, style);
            int num = App.State.PremiumBoni.GodPowerPurchaseBonusPercent();

            if (num > 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(120f)), "The more you play and the more you purchase, the more God Power you will receive from purchases.\nCurrent bonus: " + num + "%\nYou will receive what is shown on the buttons, even if the purchase dialog afterwards shows less.");
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Gain the power of gods!\nWith god power you can buy various permanent bonuses in the god power page.");
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(180f), GuiBase.Width(150f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodPower);
            GUI.Label(new Rect(GuiBase.Width(150f), GuiBase.Height(162f), GuiBase.Width(40f), GuiBase.Height(40f)), SteamOffersUi.godPower);
            int count = 5 * (num + 100) / 100;

            SteamOffersUi.addPurchaseButton(440, 60, Purchase.GodPower5, count);
            count = 25 * (num + 100) / 100;
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.GodPower25, count);
            count = 50 * (num + 100) / 100;
            SteamOffersUi.addPurchaseButton(440, 140, Purchase.GodPower50, count);
            count = 100 * (num + 100) / 100;
            SteamOffersUi.addPurchaseButton(440, 180, Purchase.GodPower100, count);
            SteamOffersUi.marginTop += 225;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(260f)));
            SteamOffersUi.AddHeader("Lucky Draws", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Try out your luck!");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(185f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.LuckyDraws.GuiText);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(210f), GuiBase.Width(400f), GuiBase.Height(35f)), "You can open up at most 50 a day.");
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.LuckyDraw, 1);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.LuckyDraw10, 10);
            SteamOffersUi.addPurchaseButton(440, 140, Purchase.LuckyDraw50, 50);
            GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(180f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.luckyDraw);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(180f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Open one")))
            {
                GuiBase.ShowToast(App.State.PremiumBoni.UseLuckyDraw());
            }
            if (App.State.PremiumBoni.TimeForNextLuckyDraw < 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(95f), GuiBase.Width(200f), GuiBase.Height(25f)), "Get your free draw now!");
                if (GUI.Button(new Rect(GuiBase.Width(240f), GuiBase.Height(100f), GuiBase.Width(130f), GuiBase.Height(32f)), new GUIContent("Get free draw!")))
                {
                    App.State.PremiumBoni.GetFreeLuckyDraw();
                }
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(95f), GuiBase.Width(200f), GuiBase.Height(50f)), "Time until your free draw is ready: " + Conv.MsToGuiText(App.State.PremiumBoni.TimeForNextLuckyDraw.ToLong(), true));
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(450f), GuiBase.Height(50f)), App.State.Ext.Lucky.LastDrawText);
            SteamOffersUi.marginTop += 220;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(220f)));
            SteamOffersUi.AddHeader("Daily Packs", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Get one additional Lucky Draw and 2 God Power once a day for 15 or 30 days!");
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.DailyPack15, 15);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.DailyPack, 30);
            int num2 = 110;

            if (App.State.PremiumBoni.DailyPackDaysLeft > 0)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(400f), GuiBase.Height(30f)), "Packs Left: " + App.State.PremiumBoni.DailyPackDaysLeft.GuiText);
                if (App.State.PremiumBoni.TimeForNextDailyPack < 0L)
                {
                    GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(150f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.dailyPack);
                    if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(150f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Open Pack")))
                    {
                        App.State.PremiumBoni.GetDailyPack();
                    }
                }
                else
                {
                    GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(110f), GuiBase.Width(260f), GuiBase.Height(50f)), "Time until the next pack arrives: " + Conv.MsToGuiText(App.State.PremiumBoni.TimeForNextDailyPack, true));
                }
                num2 = 180;
            }
            SteamOffersUi.marginTop += num2;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            SteamOffersUi.AddHeader("Pet Token", 20, style);
            int num3 = 60;

            if (!App.State.PremiumBoni.BoughtLimitedPetToken)
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)num3), GuiBase.Width(400f), GuiBase.Height(100f)), "Limited Offer. You can only buy this once!");
                SteamOffersUi.addPurchaseButton(440, num3, Purchase.PetTokenLimited, 1);
                SteamOffersUi.marginTop += 40;
                num3 += 40;
            }
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)num3), GuiBase.Width(400f), GuiBase.Height(100f)), "Unlock special Pets!\nYou can see the pets in Fight -> Pets.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)(num3 + 70)), GuiBase.Width(150f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.PetToken.GuiText);
            GUI.Label(new Rect(GuiBase.Width(150f), GuiBase.Height((float)(num3 + 62)), GuiBase.Width(50f), GuiBase.Height(50f)), SteamOffersUi.imgPetToken);
            SteamOffersUi.addPurchaseButton(440, num3, Purchase.PetToken, 1);
            num3 += 40;
            SteamOffersUi.addPurchaseButton(440, num3, Purchase.PetToken3, 3);
            SteamOffersUi.marginTop += 180;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            SteamOffersUi.AddHeader("Improved Crystal Upgrade", 20, style);
            num3 = 60;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Adds 25% to the starting upgrade chance for all crystals (can't go higher than 95%)!\nYou can get this only once.");
            if (App.State.PremiumBoni.HasCrystalImprovement)
            {
                GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "You own this already!");
            }
            else
            {
                SteamOffersUi.addPurchaseButton(440, num3, Purchase.CrystalUpgradeChance, 1);
            }
            SteamOffersUi.marginTop += 120;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            SteamOffersUi.AddHeader("Crystal Equip Slot", 20, style);
            num3 = 60;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Adds one more equip slot for your crystals!\n");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(83f), GuiBase.Width(400f), GuiBase.Height(100f)), "Currently you can equip " + App.State.PremiumBoni.MaxCrystals.GuiText + " crystals at once.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(106f), GuiBase.Width(400f), GuiBase.Height(100f)), "You can buy up to " + (6 - App.State.PremiumBoni.MaxCrystals).GuiText + " more slots.");
            if (App.State.PremiumBoni.MaxCrystals >= 6)
            {
                GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Your slots are maxed!");
            }
            else
            {
                SteamOffersUi.addPurchaseButton(440, num3, Purchase.CrystalSlot, 1);
            }
            SteamOffersUi.marginTop += 135;
            GUI.EndGroup();
            if (App.State.PremiumBoni.ImprovedNextAt || App.State.Statistic.HasStartedArtyChallenge || App.State.Statistic.HasStartedUltimateBaalChallenge)
            {
                num3 = 60;
                GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
                SteamOffersUi.AddHeader("Improved Next At for challenges", 20, style);
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "If you buy this, improved next at will also work in challenges!\n");
                if (App.State.PremiumBoni.ChallengeImprovedNextAt)
                {
                    GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "You own this already!");
                }
                else
                {
                    SteamOffersUi.addPurchaseButton(440, num3, Purchase.ChallengeNext, 1);
                }
                SteamOffersUi.marginTop += 100;
                GUI.EndGroup();
            }
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            SteamOffersUi.AddHeader("Refrigerator", 20, style);
            num3 = 60;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "Keeps your food safe. If you buy this, you won't lose your pet food after rebirthing!\n");
            if (App.State.PremiumBoni.PetFoodAfterRebirth)
            {
                GUI.Label(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "You own this already!");
            }
            else
            {
                SteamOffersUi.addPurchaseButton(440, num3, Purchase.FoodRebirth, 1);
            }
            SteamOffersUi.marginTop += 120;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(300f)));
            SteamOffersUi.AddHeader("Unlimited Gender Change", 20, style);
            if (App.State.PremiumBoni.HasUnlimitedGenderChange)
            {
                string str = "male";
                if (App.State.Avatar.IsFemale)
                {
                    str = "female";
                }
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(390f), GuiBase.Height(100f)), "Change your gender. Your current gender is " + str);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(60f), GuiBase.Width(120f), GuiBase.Height(28f)), new GUIContent("Change")))
                {
                    App.State.Avatar.GenderChosen = false;
                    HeroImage.Init(true);
                }
                SteamOffersUi.marginTop += 20;
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(100f), GuiBase.Width(390f), GuiBase.Height(100f)), "Change your name. Your current name is " + App.State.AvatarName);
                if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(100f), GuiBase.Width(120f), GuiBase.Height(28f)), new GUIContent("Change")))
                {
                    App.State.ChangeAvatarName = true;
                }
            }
            else
            {
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(100f)), "If you buy this, you can change your name and gender for free as often as you want!\n");
                SteamOffersUi.addPurchaseButton(440, 60, Purchase.GenderChange, 1);
            }
            SteamOffersUi.marginTop += 150;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(185f)));
            SteamOffersUi.AddHeader("Ultimate shadow summon", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Creating shadow clones is too slow? With this you will max them instantly!");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.UltimateShadowSummonCount);
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.ShadowSummon, 1);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.ShadowSummon10, 10);
            GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.imgShadowSummon);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseUltimateShadowSummon();
            }
            SteamOffersUi.marginTop += 170;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(185f)));
            SteamOffersUi.AddHeader("Godly liquid", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Doubles your speed when creating creations (and clones) for 90 minutes. (Multiplies with godly liquid V2)");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(110f), GuiBase.Width(400f), GuiBase.Height(30f)), "Duration left: " + Conv.MsToGuiText(App.State.PremiumBoni.GodlyLiquidDuration, true));
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodlyLiquidCount);
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.GodlyLiquid, 1);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.GodlyLiquid10, 10);
            GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.imgGodlyLiquid);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseGodlyLiquid();
            }
            SteamOffersUi.marginTop += 170;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(185f)));
            SteamOffersUi.AddHeader("Godly liquid V2", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(55f)), "Doubles your speed when creating creations (and clones) until your next rebirth.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(110f), GuiBase.Width(400f), GuiBase.Height(30f)), "Is in use: " + App.State.PremiumBoni.GodlyLiquidV2InUse);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(140f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.GodlyLiquidV2Count);
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.GodlyLiquidRebirth, 1);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.GodlyLiquidRebirth10, 10);
            GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(140f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.imgGodlyLiquidV2);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(140f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseGodlyLiquidRebirth();
            }
            SteamOffersUi.marginTop += 170;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(185f)));
            SteamOffersUi.AddHeader("Chakra pill", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(65f)), "Increases your chakra to let your clones build faster.\nDoubles the speed to build monuments and upgrades for 90 minutes. (Multiplies with chakra pill V2)");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(120f), GuiBase.Width(400f), GuiBase.Height(30f)), "Duration left: " + Conv.MsToGuiText(App.State.PremiumBoni.ChakraPillDuration, true));
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.ChakraPillCount);
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.ChakraPill, 1);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.ChakraPill10, 10);
            GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(150f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.imgChakraPill);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(150f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseChakraPill();
            }
            SteamOffersUi.marginTop += 180;
            GUI.EndGroup();
            GUI.BeginGroup(new Rect(GuiBase.Width(5f), GuiBase.Height((float)SteamOffersUi.marginTop), GuiBase.Width(670f), GuiBase.Height(185f)));
            SteamOffersUi.AddHeader("Chakra pill V2", 20, style);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(60f), GuiBase.Width(400f), GuiBase.Height(65f)), "Increases your chakra to let your clones build faster.\nDoubles the speed to build monuments and upgrades until your next rebirth.");
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(120f), GuiBase.Width(400f), GuiBase.Height(30f)), "Is in use: " + App.State.PremiumBoni.ChakraPillV2InUse);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(400f), GuiBase.Height(30f)), "You have: " + App.State.PremiumBoni.ChakraPillV2Count);
            SteamOffersUi.addPurchaseButton(440, 60, Purchase.ChakraPillRebirth, 1);
            SteamOffersUi.addPurchaseButton(440, 100, Purchase.ChakraPillRebirth10, 10);
            GUI.Label(new Rect(GuiBase.Width(580f), GuiBase.Height(150f), GuiBase.Width(32f), GuiBase.Height(32f)), SteamOffersUi.imgChakraPillV2);
            if (GUI.Button(new Rect(GuiBase.Width(440f), GuiBase.Height(150f), GuiBase.Width(120f), GuiBase.Height(32f)), new GUIContent("Use 1")))
            {
                App.State.PremiumBoni.UseChakraPillRebirth();
            }
            SteamOffersUi.marginTop += 180;
            GUI.EndGroup();
            GUI.EndScrollView();
        }
예제 #23
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!");
             }
         }
     }
 }