void ReleaseDesignerOutlets()
        {
            if (HeroImage != null)
            {
                HeroImage.Dispose();
                HeroImage = null;
            }

            if (Header != null)
            {
                Header.Dispose();
                Header = null;
            }

            if (Content != null)
            {
                Content.Dispose();
                Content = null;
            }

            if (Meta != null)
            {
                Meta.Dispose();
                Meta = null;
            }
        }
예제 #2
0
 public HeroImage GetHeroImage()
 {
     if (this.heroImage == null)
     {
         this.heroImage = GetComponentInChildren <HeroImage>();
     }
     return(this.heroImage);
 }
예제 #3
0
        internal Element_ToastBinding ConvertToElement()
        {
            Element_ToastBinding binding = new(ToastTemplateType.ToastGeneric)
            {
                BaseUri       = BaseUri,
                AddImageQuery = AddImageQuery,
                Language      = Language
            };

            // Add children
            foreach (var child in Children)
            {
                var el = (IElement_ToastBindingChild)AdaptiveHelper.ConvertToElement(child);
                binding.Children.Add(el);
            }

            // Add attribution
            if (Attribution != null)
            {
                binding.Children.Add(Attribution.ConvertToElement());
            }

            // If there's hero, add it
            if (HeroImage != null)
            {
                binding.Children.Add(HeroImage.ConvertToElement());
            }

            // If there's app logo, add it
            if (AppLogoOverride != null)
            {
                binding.Children.Add(AppLogoOverride.ConvertToElement());
            }

            return(binding);
        }
    }
        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();
        }
예제 #5
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();
        }
        private void UBAttack(bool playerSecondAttack)
        {
            if (playerSecondAttack)
            {
                return;
            }
            int num = UnityEngine.Random.Range(0, 100);

            if (this.Being.DamageReduction < 75 && num > 80)
            {
                this.Being.DamageReduction += 10;
                this.InfoText = this.InfoText + "\n" + this.Being.Name + " concentrated his power. His damage reduction increased by 10%";
            }
            else if (this.Being.HPPercent < 15 && num > 67)
            {
                this.Being.HPPercent += 10;
                this.InfoText         = this.InfoText + "\n" + this.Being.Name + " healed himself for 10% of his hp.";
            }
            else if (num > 85 && !this.Being.PowerUp)
            {
                this.Being.PowerUp = true;
                this.InfoText      = this.InfoText + "\n" + this.Being.Name + " concentrated his power.";
            }
            else
            {
                string  text      = this.Being.SkillName1;
                CDouble rightSide = 1;
                if (num > 50)
                {
                    if (num > 80)
                    {
                        rightSide = 2.5;
                        text      = this.Being.SkillName3;
                    }
                    else
                    {
                        rightSide = 1.5;
                        text      = this.Being.SkillName2;
                    }
                }
                if (this.Being.PowerUp)
                {
                    rightSide          = 2;
                    this.Being.PowerUp = false;
                }
                CDouble cDouble = this.Being.BaseCloneDamage / 100 * (100 - this.DamageReduction) * rightSide;
                cDouble = (double)UnityEngine.Random.Range((float)cDouble.ToInt() * 0.9f, (float)cDouble.ToInt() * 1.1f);
                CDouble cDouble2 = this.Being.BaseDamage / 100 * (100 - this.DamageReduction) * rightSide;
                if (!this.DamageReflect)
                {
                    if (num < this.DodgeChance)
                    {
                        CDouble cDouble3 = 5 * (100 - this.Being.DamageReduction) / 100;
                        if (this.DoubleUp)
                        {
                            cDouble3     *= 2;
                            this.DoubleUp = false;
                        }
                        this.DodgeChance      = 0;
                        this.CounterChance    = 0;
                        cDouble3              = cDouble3 * this.Damage / 100;
                        cDouble3              = (double)UnityEngine.Random.Range((float)cDouble3.ToInt() * 0.9f, (float)cDouble3.ToInt() * 1.1f);
                        this.Being.HPPercent -= cDouble3;
                        this.InfoText         = string.Concat(new string[]
                        {
                            this.InfoText,
                            "\n",
                            this.Being.Name,
                            " used ",
                            text,
                            " and you dodged the attack! \nYou countered for ",
                            cDouble3.ToGuiText(true)
                        });
                    }
                    else
                    {
                        if (cDouble > App.State.HomePlanet.ShadowCloneCount)
                        {
                            cDouble   = App.State.HomePlanet.ShadowCloneCount;
                            cDouble2 *= 2;
                        }
                        else
                        {
                            cDouble2 *= 0.5;
                        }
                        App.State.HomePlanet.ShadowCloneCount -= cDouble.ToInt();
                        App.State.Clones.RemoveUsedShadowClones(cDouble.ToInt());
                        App.State.Clones.Count                    -= cDouble.ToInt();
                        App.State.Clones.TotalClonesKilled        += cDouble.ToInt();
                        App.State.Statistic.TotalShadowClonesDied += cDouble;
                        this.PlayerHp -= App.State.MaxHealth * cDouble2 / 100;
                        this.InfoText  = string.Concat(new string[]
                        {
                            this.InfoText,
                            "\n",
                            this.Being.Name,
                            " used ",
                            text,
                            " and killed ",
                            cDouble.ToGuiText(true),
                            " of your clones!\nYou also lost ",
                            cDouble2.ToGuiText(true),
                            " % of your hp."
                        });
                    }
                }
                else
                {
                    cDouble2 = cDouble2 * (100 - this.Being.DamageReduction) / 250;
                    if (cDouble2 > 5)
                    {
                        cDouble2 = 5;
                    }
                    this.Being.HPPercent -= cDouble2;
                    this.DamageReflect    = false;
                    this.InfoText         = string.Concat(new string[]
                    {
                        this.InfoText,
                        "\n",
                        this.Being.Name,
                        " used ",
                        text,
                        " but the damage is reflected back!\n",
                        this.Being.Name,
                        " took ",
                        cDouble2.ToGuiText(true),
                        " % damage."
                    });
                }
            }
            if (this.PlayerHp <= 0 || App.State.HomePlanet.ShadowCloneCount <= 0)
            {
                App.State.CurrentHealth = 0;
                GuiBase.ShowToast("You lost the fight!");
                this.IsFighting = false;
            }
            if (this.Being.HPPercent <= 0)
            {
                this.Being.IsDefeated = true;
                this.Being.isCreating = false;
                this.Being.TimesDefeated++;
                CDouble multiplier = this.Being.GetMultiplier(App.State.HomePlanet.UBMultiplier);
                App.State.HomePlanet.UBMultiplier        += multiplier;
                App.State.PremiumBoni.GodPower           += this.Being.Tier * 10;
                App.State.HomePlanet.TotalGainedGodPower += this.Being.Tier * 10;
                GuiBase.ShowToast(string.Concat(new object[]
                {
                    "You won the fight and earned ",
                    this.Being.Tier * 10,
                    " God Power!\nYour planet multiplier also increased by ",
                    multiplier.ToGuiText(true)
                }));
                if (this.Being.Tier < 5)
                {
                    App.State.HomePlanet.UltimateBeingsV2[this.Being.Tier].IsAvailable = true;
                }
                App.State.PremiumBoni.CheckGP = true;
                this.IsFighting = false;
                HeroImage.SetTitle();
            }
        }
예제 #7
0
        public void GetAttacked(CDouble attackPower, long millisecs)
        {
            int     value = UnityEngine.Random.Range(1, 100);
            CDouble cDouble;

            if (value <= App.State.Crits.CriticalPercent(App.State.GameSettings.TBSEyesIsMirrored))
            {
                attackPower = attackPower * App.State.Crits.CriticalDamage / 100;
                cDouble     = attackPower / 5000 * millisecs;
            }
            else
            {
                cDouble = (attackPower - this.Defense) / 5000 * millisecs;
            }
            this.DamageSec = cDouble * 33;
            if (cDouble > 0)
            {
                this.CurrentHealth -= cDouble;
            }
            if (this.CurrentHealth <= 0)
            {
                App.State.Title    = EnumName.Title(App.State.Avatar.IsFemale, this.TypeEnum);
                App.State.TitleGod = this.Name;
                if (App.State.Statistic.HighestGodDefeated < (int)this.TypeEnum)
                {
                    App.State.Statistic.HighestGodDefeated = (int)this.TypeEnum;
                }
                if (App.State.Statistic.HasStartedArtyChallenge && App.State.Statistic.HighestGodInUAC < (int)this.TypeEnum)
                {
                    App.State.Statistic.HighestGodInUAC = (int)this.TypeEnum;
                }
                this.IsDefeated = true;
                if (this.TypeEnum > God.GodType.Diana || !this.IsDefeatedForFirstTime)
                {
                    this.IsDefeatedForFirstTime = true;
                    App.State.PremiumBoni.GodPower++;
                    GuiBase.ShowToast("Your god power is increased by 1!");
                    App.State.PremiumBoni.CheckIfGPIsAdjusted();
                }
                Statistic expr_212 = App.State.Statistic;
                expr_212.TotalGodsDefeated = ++expr_212.TotalGodsDefeated;
                StoryUi.SetUnlockedStoryParts(App.State);
                Leaderboards.SubmitStat(LeaderBoardType.GodsDefeated, App.State.Statistic.TotalGodsDefeated.ToInt(), false);
                Leaderboards.SubmitStat(LeaderBoardType.HighestGodDefeated, App.State.Statistic.HighestGodDefeated.ToInt(), false);
                HeroImage.Init(true);
                if (this.TypeEnum == God.GodType.Diana)
                {
                    App.State.IsMonumentUnlocked = true;
                    GuiBase.ShowContentUnlocked("You can now build monuments.");
                }
                else if (this.TypeEnum == God.GodType.Nephthys)
                {
                    App.State.IsBuyUnlocked = true;
                    App.State.GameSettings.AutoBuyCreationsForMonuments = App.State.GameSettings.AutoBuyCreationsForMonumentsBeforeRebirth;
                    GuiBase.ShowContentUnlocked("You can now buy creations after you created at least one.");
                }
                else if (this.TypeEnum == God.GodType.Poseidon && App.CurrentPlattform == Plattform.Android && !App.State.Ext.RateDialogShown)
                {
                    App.State.Ext.RateDialogShown = true;
                    GuiBase.ShowDialog("Rate ItRtG", "If you like the game, please rate it on google play. Good ratings helps to get more players, and more players will lead to more success of the game, and more time for me to work on updates or future games.", delegate
                    {
                        App.OpenWebsite("https://play.google.com/store/apps/details?id=de.shugasu.itrtg");
                    }, delegate
                    {
                    }, "Rate it", "Cancel", true, true);
                }
                else if (this.TypeEnum == God.GodType.Freya)
                {
                    App.State.IsUpgradeUnlocked = true;
                    GuiBase.ShowContentUnlocked("You can now upgrade your monuments!");
                }
                else if (this.TypeEnum == God.GodType.Chronos && App.State.Statistic.HasStartedArtyChallenge)
                {
                    UpdateStats.SaveToServer(UpdateStats.ServerSaveType.UAChallengeSave2);
                }
                else if (this.TypeEnum == God.GodType.Tyrant_Overlord_Baal)
                {
                    if (App.State.Statistic.HasStartedDoubleRebirthChallenge)
                    {
                        App.State.Statistic.HasStartedDoubleRebirthChallenge = false;
                        if (App.State.Statistic.FastestDRCallenge <= 0 || App.State.Statistic.FastestDRCallenge > App.State.Statistic.TimeAfterDRCStarted)
                        {
                            App.State.Statistic.FastestDRCallenge = App.State.Statistic.TimeAfterDRCStarted;
                            Leaderboards.SubmitStat(LeaderBoardType.FastestDRCallenge, App.State.Statistic.FastestDRCallenge.ToInt() / 1000, false);
                        }
                        App.State.Statistic.TimeAfterDRCStarted = 0;
                        Statistic expr_493 = App.State.Statistic;
                        expr_493.DoubleRebirthChallengesFinished = ++expr_493.DoubleRebirthChallengesFinished;
                        int num = 10;
                        if (App.State.Statistic.DoubleRebirthChallengesFinished > 50)
                        {
                            num += 10;
                        }
                        App.State.PremiumBoni.GodPower += num;
                        App.State.PremiumBoni.CheckIfGPIsAdjusted();
                        App.SaveGameState();
                        GuiBase.ShowToast("Your god power is increased by " + num + " because you beat the double rebirth challenge!");
                    }
                    if (App.State.Statistic.HasStarted1kChallenge)
                    {
                        App.State.Statistic.HasStarted1kChallenge = false;
                        if (App.State.Statistic.Fastest1KCCallenge <= 0 || App.State.Statistic.Fastest1KCCallenge > App.State.Statistic.TimeAfter1KCStarted)
                        {
                            App.State.Statistic.Fastest1KCCallenge = App.State.Statistic.TimeAfter1KCStarted;
                            Leaderboards.SubmitStat(LeaderBoardType.Fastest1KCCallenge, App.State.Statistic.Fastest1KCCallenge.ToInt() / 1000, false);
                        }
                        App.State.Statistic.TimeAfter1KCStarted = 0;
                        Statistic expr_5DA = App.State.Statistic;
                        expr_5DA.OnekChallengesFinished  = ++expr_5DA.OnekChallengesFinished;
                        App.State.Clones.MaxShadowClones = App.State.Clones.AbsoluteMaximum;
                        App.State.PremiumBoni.GodPower  += 20;
                        App.State.PremiumBoni.CheckIfGPIsAdjusted();
                        App.SaveGameState();
                        GuiBase.ShowToast("Your god power is increased by " + 20 + " because you beat the 1k challenge!");
                    }
                    if (App.State.Statistic.HasStartedUltimatePetChallenge)
                    {
                        App.State.Statistic.HasStartedUltimatePetChallenge = false;
                        if (App.State.Statistic.FastestUPCallenge <= 0 || App.State.Statistic.FastestUPCallenge > App.State.Statistic.TimeAfterUPCStarted)
                        {
                            App.State.Statistic.FastestUPCallenge = App.State.Statistic.TimeAfterUPCStarted;
                            Leaderboards.SubmitStat(LeaderBoardType.FastestUPCallenge, App.State.Statistic.FastestUPCallenge.ToInt() / 1000, false);
                        }
                        App.State.Statistic.TimeAfterUPCStarted = 0;
                        Statistic expr_71F = App.State.Statistic;
                        expr_71F.UltimatePetChallengesFinished = ++expr_71F.UltimatePetChallengesFinished;
                        App.SaveGameState();
                        GuiBase.ShowToast("You have finished the ultimate pet challenge! The rewards you can get from pet campaigns are increased by 5%!");
                    }
                    if (App.State.Statistic.HasStartedNoRbChallenge)
                    {
                        App.State.Statistic.HasStartedNoRbChallenge = false;
                        if (App.State.Statistic.FastestNoRbCCallenge <= 0 || App.State.Statistic.FastestNoRbCCallenge > App.State.Statistic.TimeAfterNoRbStarted)
                        {
                            App.State.Statistic.FastestNoRbCCallenge = App.State.Statistic.TimeAfterNoRbStarted;
                            Leaderboards.SubmitStat(LeaderBoardType.FastestNRChallenge, App.State.Statistic.FastestNoRbCCallenge.ToInt() / 1000, false);
                        }
                        App.State.Statistic.TimeAfterNoRbStarted = 0;
                        Statistic expr_809 = App.State.Statistic;
                        expr_809.NoRbChallengesFinished = ++expr_809.NoRbChallengesFinished;
                        App.State.PremiumBoni.GodPower += 250;
                        App.State.PremiumBoni.CheckIfGPIsAdjusted();
                        App.SaveGameState();
                        GuiBase.ShowToast("Your god power is increased by " + 250 + " because you beat the no rebirth challenge!");
                    }
                    if (App.State.Statistic.HasStartedUltimateBaalChallenge)
                    {
                        App.State.Statistic.HasStartedUltimateBaalChallenge = false;
                        if (App.State.Statistic.FastestUBCallenge <= 0 || App.State.Statistic.FastestUBCallenge > App.State.Statistic.TimeAfterUBCStarted)
                        {
                            App.State.Statistic.FastestUBCallenge = App.State.Statistic.TimeAfterUBCStarted;
                            if (App.State.ShouldSubmitScore)
                            {
                                long num2 = 0L;
                                long.TryParse((App.State.Statistic.FastestUBCallenge.Double / 1000.0).ToString(), out num2);
                                if (num2 == 0L)
                                {
                                    num2 = App.State.Statistic.FastestUBCallenge.ToLong() / 1000L;
                                }
                                Leaderboards.SubmitStat(LeaderBoardType.FastestUBCallenge, (int)num2, false);
                            }
                        }
                        App.State.Statistic.TimeAfterUBCStarted = 0;
                        Statistic expr_983 = App.State.Statistic;
                        expr_983.UltimateBaalChallengesFinished = ++expr_983.UltimateBaalChallengesFinished;
                        if (App.State.Statistic.MinRebirthsAfterUBC == -1 || App.State.Statistic.MinRebirthsAfterUBC > App.State.Statistic.RebirthsAfterUBC)
                        {
                            App.State.Statistic.MinRebirthsAfterUBC = App.State.Statistic.RebirthsAfterUBC;
                        }
                        App.State.Statistic.RebirthsAfterUBC = 0;
                        App.State.HomePlanet.UltimateBeingsV2[0].IsAvailable = true;
                        Premium premiumBoni = App.State.PremiumBoni;
                        App.State.PremiumBoni = Premium.FromString(App.State.Statistic.PremiumStatsBeforeUBCChallenge);
                        App.State.PremiumBoni.AddPremiumAfterChallenge(premiumBoni);
                        App.State.Statistic.PremiumStatsBeforeUBCChallenge = string.Empty;
                        App.State.Clones.AbsoluteMaximum = App.State.Statistic.AbsoluteMaxClonesBeforeUBCChallenge.ToInt();
                        App.State.Clones.MaxShadowClones = App.State.Statistic.MaxClonesBeforeUBCChallenge.ToInt();
                        App.State.PremiumBoni.GodPower  += 100;
                        App.State.PremiumBoni.CheckIfGPIsAdjusted();
                        App.SaveGameState();
                        GuiBase.ShowToast("Your god power is increased by 100 because you beat the ultimate baal challenge!");
                    }
                    if (App.State.Statistic.HasStartedArtyChallenge)
                    {
                        App.State.Statistic.HasStartedArtyChallenge = false;
                        long num3 = 0L;
                        if (App.State.Statistic.FastestUACallenge <= 0 || App.State.Statistic.FastestUACallenge > App.State.Statistic.TimeAfterUACStarted)
                        {
                            App.State.Statistic.FastestUACallenge = App.State.Statistic.TimeAfterUACStarted;
                            num3 = (long)(App.State.Statistic.FastestUACallenge.Double / 1000.0);
                            if (App.State.ShouldSubmitScore)
                            {
                                if (num3 == 0L)
                                {
                                    num3 = App.State.Statistic.FastestUACallenge.ToLong() / 1000L;
                                }
                                if (num3 > 2000000L || App.State.PremiumBoni.HasPurchasedGodPowerOnce)
                                {
                                    Leaderboards.SubmitStat(LeaderBoardType.FastestUACallenge, (int)num3, false);
                                }
                            }
                        }
                        else
                        {
                            num3 = (long)(App.State.Statistic.TimeAfterUACStarted.Double / 1000.0);
                        }
                        App.State.Statistic.TimeAfterUACStarted = 0;
                        Statistic expr_C4C = App.State.Statistic;
                        expr_C4C.ArtyChallengesFinished = ++expr_C4C.ArtyChallengesFinished;
                        App.State.HomePlanet.IsCreated  = true;
                        if (App.State.HomePlanet.UpgradeLevelArtyChallenge > App.State.HomePlanet.UpgradeLevel)
                        {
                            App.State.HomePlanet.UpgradeLevel = App.State.HomePlanet.UpgradeLevelArtyChallenge;
                        }
                        if (App.State.Statistic.UniverseChallengesFinished > 0 && App.State.HomePlanet.UpgradeLevel < App.State.Statistic.UniverseChallengesFinished + 5)
                        {
                            App.State.HomePlanet.UpgradeLevel = App.State.Statistic.UniverseChallengesFinished + 5;
                        }
                        App.State.HomePlanet.UpgradeLevelArtyChallenge = 0;
                        foreach (UltimateBeing current in App.State.HomePlanet.UltimateBeings)
                        {
                            if (current.Tier <= App.State.HomePlanet.UpgradeLevel)
                            {
                                current.IsAvailable = true;
                            }
                        }
                        App.State.HomePlanet.UltimateBeingsV2[0].IsAvailable = true;
                        if (App.State.Statistic.MinRebirthsAfterUAC <= 0 || App.State.Statistic.MinRebirthsAfterUAC > App.State.Statistic.RebirthsAfterUAC)
                        {
                            App.State.Statistic.MinRebirthsAfterUAC = App.State.Statistic.RebirthsAfterUAC;
                        }
                        App.State.Statistic.RebirthsAfterUAC = 0;
                        Premium premiumBoni2 = App.State.PremiumBoni;
                        App.State.PremiumBoni = Premium.FromString(App.State.Statistic.PremiumStatsBeforeUBCChallenge);
                        App.State.PremiumBoni.AddPremiumAfterChallenge(premiumBoni2);
                        App.State.Statistic.PremiumStatsBeforeUBCChallenge = string.Empty;
                        App.State.Statistic.HighestGodInUAC = 0;
                        App.State.Clones.AbsoluteMaximum    = App.State.Statistic.AbsoluteMaxClonesBeforeUBCChallenge.ToInt();
                        App.State.Clones.MaxShadowClones    = App.State.Statistic.MaxClonesBeforeUBCChallenge.ToInt();
                        string[] array = App.State.Statistic.SkillUsageCountBeforeUAC.Split(new char[]
                        {
                            ','
                        });
                        for (int i = 0; i < array.Length; i++)
                        {
                            int num4 = 0;
                            int.TryParse(array[i], out num4);
                            if (App.State.AllSkills.Count > i)
                            {
                                App.State.AllSkills[i].Extension.UsageCount += (long)num4;
                            }
                        }
                        App.State.Statistic.SkillUsageCountBeforeUAC = string.Empty;
                        App.State.PremiumBoni.GodPower += 200;
                        App.State.PremiumBoni.CheckIfGPIsAdjusted();
                        App.SaveGameState();
                        if (num3 < 2000000L)
                        {
                            GuiBase.ShowBigMessage("Contratulations, you have beaten the Ultimate Arty Challenge!\nHowever your time doesn't seem to be legit, you won't get the Pet Token Reward.\nIf you really beat the challenge in this time without cheating, please report to [email protected], so I can look at it.");
                        }
                        else if (App.State.Statistic.ArtyChallengesFinished == 1)
                        {
                            GuiBase.ShowBigMessage("Contratulations, you have beaten the Ultimate Arty Challenge!\nYour god power is increased by 200, you unlocked the turtle with the 'Arty was here' sign and you received the turtle pet!");
                        }
                        else if (App.State.Statistic.ArtyChallengesFinished == 2)
                        {
                            Premium expr_1032 = App.State.PremiumBoni;
                            expr_1032.PetToken = ++expr_1032.PetToken;
                            GuiBase.ShowBigMessage("Contratulations, you have beaten the Ultimate Arty Challenge!\nYour god power is increased by 200, and you received a pet token!");
                        }
                    }
                    App.State.PrinnyBaal.IsUnlocked = true;
                }
            }
            Log.Info("CurrentHealth: " + this.CurrentHealth);
        }
예제 #8
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();
        }