public static void LoadOnlineAfterInit()
        {
            if (!App.GetOnlineSave || !App.SyncWithOnlineSave)
            {
                return;
            }
            bool flag = false;

            if (App.CurrentPlattform == Plattform.Kongregate && Kongregate.APILoaded)
            {
                App.State.KongUserId   = Kongregate.UserId;
                App.State.KongUserName = Kongregate.Username;
                flag = true;
            }
            if (App.CurrentPlattform == Plattform.Steam && SteamManager.Initialized)
            {
                SteamHelper.InitSteamId();
                flag = true;
            }
            if (App.CurrentPlattform == Plattform.Android && Social.localUser.authenticated)
            {
                flag = true;
            }
            if (App.GetOnlineSave && flag)
            {
                App.GetOnlineSave = false;
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.SaveToCompare);
            }
        }
Example #2
0
    // end - members //

    // Start is called before the first frame update
    void Start()
    {
        // init player components
        rb       = gameObject.GetComponent <Rigidbody>();
        renderer = gameObject.GetComponent <Renderer>();

        // init mechanisem members
        hitTime      = DateTime.Now.Ticks;
        _lastHitTime = DateTime.Now.Ticks;

        // init stats
        gameBoard         = GameObject.Find("stats").GetComponent <UpdateStats>();
        distance          = 0;
        timeLeftInSeconds = 45;
        score             = 0;
        startPos          = backWall.transform.position.x;

        // init sounds
        coinSound  = GameObject.Find("coin_sound").GetComponent <AudioSource>();
        clockSound = GameObject.Find("clock_sound").GetComponent <AudioSource>();
        bombSound  = GameObject.Find("bomb_sound").GetComponent <AudioSource>();
        enemySound = GameObject.Find("enemy_sound").GetComponent <AudioSource>();

        // init final message
        finalMessagePanael = GameObject.Find("final_message");

        finalMessagePanael.gameObject.SetActive(false);
    }
Example #3
0
        public void NotifyUpdatedStats(AttackableUnit u, bool partial = true)
        {
            var us      = new UpdateStats(u, partial);
            var channel = Channel.CHL_LOW_PRIORITY;

            _game.PacketHandlerManager.broadcastPacketVision(u, us, channel, ENet.PacketFlags.Unsequenced);
        }
Example #4
0
 public Module()
 {
     Name  = GetType().Name;
     Stats = new UpdateStats {
         Name = Name
     };
     ModuleManager.Add(this);
 }
Example #5
0
 public UpdateStatsViewModel(UpdateStats view)
 {
     _view                 = view;
     CloseCommand          = ReactiveCommand.Create(ExecuteCloseCommand);
     IndeterminateProgress = true;
     ProgressVisible       = false;
     RomSets               = new ObservableCollection <RomSetModel>();
 }
Example #6
0
    /// <summary>
    /// Implement Singleton
    /// Initialize StateMachine
    /// </summary>
    void Awake()
    {
        //Implement a Singleton
        if (gc == null)
        {
            gc = this;                      //first instantiation
        }
        else if (gc != this)
        {
            Destroy(gameObject);        //kill it if another instance exists
        }
        DontDestroyOnLoad(gameObject);  //persist across levels

        ball       = GameObject.Find("baseball_ball").GetComponent("Ball") as Ball;
        stats      = GameObject.Find("Stats").GetComponent("UpdateStats") as UpdateStats;
        dsplyPitch = GameObject.Find("DisplayPitchButton").GetComponent("DisplayPitch") as DisplayPitch;

        audioObject = GameObject.Find("Audio Source");
        audioS      = audioObject.GetComponent <AudioSource>();
        DontDestroyOnLoad(audioObject);

        Strike      = GameObject.Find("AudioStrike");
        audioStrike = Strike.GetComponent <AudioSource>();
        DontDestroyOnLoad(Strike);

        Cheer      = GameObject.Find("AudioCheer");
        audioCheer = Cheer.GetComponent <AudioSource>();
        DontDestroyOnLoad(Cheer);

        startmenu   = GameObject.Find("StartMenu");
        startmenubg = GameObject.Find("SF Scene Elements");

        //Initialize State Machine Engine
        gcFSM = StateMachine <States> .Initialize(this, States.Init);

        hitStats = new List <HitStats>();

        topStats1     = GameObject.Find("Top1").GetComponent <Text>();
        topStats2     = GameObject.Find("Top2").GetComponent <Text>();
        farthestHit   = GameObject.Find("Farthest").GetComponent <Text>();
        averageHit    = GameObject.Find("Average").GetComponent <Text>();
        battingAvgHit = GameObject.Find("BattingAvg").GetComponent <Text>();


        endStats = GameObject.Find("EndStats");


        endStatsCanvas  = endStats.GetComponent <CanvasGroup>();
        gameCanvas      = GameObject.Find("Canvas").GetComponent <CanvasGroup>();
        hitstrikeCanvas = GameObject.Find("Stats").GetComponent <CanvasGroup>();

        video        = GameObject.Find("Video").GetComponent("VideoCompar") as VideoCompar;
        videoCompare = GameObject.Find("VideoCompare").GetComponent("VideoCompar") as VideoCompar;
    }
        /// <summary>
        /// Called when a publisher has committed an event to the <see cref="T:Disruptor.RingBuffer`1"/>
        /// </summary>
        /// <param name="data">Data committed to the <see cref="T:Disruptor.RingBuffer`1"/></param><param name="sequence">Sequence number committed to the <see cref="T:Disruptor.RingBuffer`1"/></param><param name="endOfBatch">flag to indicate if this is the last event in a batch from the <see cref="T:Disruptor.RingBuffer`1"/></param>
        public void OnNext(Execution data, long sequence, bool endOfBatch)
        {
            if (_asyncClassLogger.IsDebugEnabled)
            {
                _asyncClassLogger.Debug("Execution arrived for: " + data.Order.OrderID, _type.FullName, "OnNext");
            }

            // Create new object to be used with Event Aggregator
            UpdateStats updateStats = new UpdateStats(data);

            //Raise event to notify listeners
            EventSystem.Publish <UpdateStats>(updateStats);
        }
Example #8
0
 public void NotifyUpdatedStats(IAttackableUnit u, bool partial = true)
 {
     if (u.Replication != null)
     {
         var us      = new UpdateStats(u.Replication, partial);
         var channel = Channel.CHL_LOW_PRIORITY;
         _packetHandlerManager.BroadcastPacketVision(u, us, channel, PacketFlags.Unsequenced);
         if (partial)
         {
             u.Replication.MarkAsUnchanged();
         }
     }
 }
Example #9
0
        private void SB_DoWork_Done_Completed(object sender, object e)
        {
            if (UpdateStats != null)
            {
                UpdateStats?.Invoke(this, null);
            }

            switch (Item.D2CMessagesKind)
            {
            case D2CMessagesConfig.Kind.REG:
                if (DoneUpdateAndClean != null)
                {
                    DoneUpdateAndClean?.Invoke(this, null);
                }
                break;

            case D2CMessagesConfig.Kind.TEL:
                if (DoneAndUpdateStyle != null)
                {
                    DoneAndUpdateStyle?.Invoke(this, null);
                }
                break;

            case D2CMessagesConfig.Kind.ALR:
                if (DoneAndUpdateStyle != null)
                {
                    DoneAndUpdateStyle?.Invoke(this, null);
                }
                break;

            case D2CMessagesConfig.Kind.BREG:
                if (DoneAndUpdate != null)
                {
                    DoneAndUpdate?.Invoke(this, null);
                }
                break;

            default:
                if (Done != null)
                {
                    Done?.Invoke(this, null);
                }
                break;
            }

            Debug.WriteLine($"UC_RunBook_Item -> SB_DoWork_Done_Completed -> {Item.D2CMessagesKind}");
        }
    // Start is called before the first frame update
    void Start()
    {
        this.wallet = GameObject.Find("Wallet").GetComponent <Wallet>();
        gravity     = Math.Round(UnityEngine.Random.Range(4f + 1.5f * wallet.getRound(), 18f + 1.5f * wallet.getRound()), 2);



        renderer    = this.GetComponent <SpriteRenderer>();
        updateStats = FindObjectOfType <UpdateStats>();

        targetAltitude = Math.Round(UnityEngine.Random.Range(500 + 200f * wallet.getRound(), 2000f + 250f * wallet.getRound()), 0);; // in km
        payLoad        = Math.Round(UnityEngine.Random.Range(5f + 3 * wallet.getRound(), 40f + 4 * wallet.getRound()), 2);           //In kg
        //Let's do this metric

        Debug.Log("rocket starting");
        flying = false;
        stages = new List <Stage>();
        stages.Add(new Stage(0, "stage 1", "stage 1", null, null, 100, 10.0D / 60, 100, 100, 1000, 1));
    }
Example #11
0
        public void notifyUpdatedStats(Unit u, bool partial = true)
        {
            //if (u is Monster)
            //    return;
            var us = new UpdateStats(u, partial);

            if (u is BaseTurret)
            {
                _game.PacketHandlerManager.broadcastPacket(us, Channel.CHL_LOW_PRIORITY, ENet.PacketFlags.Unsequenced);
                return;
            }

            if (!partial)
            {
                _game.PacketHandlerManager.broadcastPacketTeam(u.Team, us, Channel.CHL_LOW_PRIORITY, ENet.PacketFlags.Unsequenced);
            }
            else
            {
                _game.PacketHandlerManager.broadcastPacketVision(u, us, Channel.CHL_LOW_PRIORITY, ENet.PacketFlags.Unsequenced);
            }
        }
Example #12
0
 /// <summary>
 /// Update Order Execution Stats on UI on new execution event
 /// </summary>
 /// <param name="updateStats"></param>
 private void UpdateCustomStrategyStats(UpdateStats updateStats)
 {
     try
     {
         if (Logger.IsDebugEnabled)
         {
             Logger.Debug("Updating execution stats for: " + updateStats.Execution.Order.OrderID, _type.FullName, "UpdateCustomStrategyStats");
         }
         _statistics.UpdateCalulcationsOnExecutionMatlab(updateStats.Execution);
         //if (_ordersCollection.Count < 1000)
         {
             _currentDispatcher.Invoke(DispatcherPriority.Background, (Action)(() =>
             {
                 //_ordersCollection.Insert(0, updateStats.Execution);
                 _ordersCollection.Add(updateStats.Execution);
             }));
         }
     }
     catch (Exception exception)
     {
         Logger.Error(exception, _type.FullName, "UpdateCustomStrategyStats");
     }
 }
Example #13
0
 public void BindStats()
 {
     if (this.InvokeRequired)
     {
         UpdateStats inv = new UpdateStats(this.BindStats);
         this.Invoke(inv, new object[] { });
     }
     else
     {
         Cursor.Current = Cursors.WaitCursor;
         COM.IndexusStatistic stat = CACHE.SharedCache.GetStats();
         // Put the words data in a DataTable so that column sorting works.
         DataTable dataTable = new DataTable();
         dataTable.Columns.Add("IP/Name", typeof(string));
         dataTable.Columns.Add("Amount", typeof(long));
         dataTable.Columns.Add("Size KB", typeof(long));
         foreach (COM.ServerStats st in stat.NodeDate)
         {
             dataTable.Rows.Add(new object[] { st.Name, st.AmountOfObjects, st.CacheSize / 1024 });
         }
         this.GvStats.DataSource = dataTable;
         Cursor.Current          = Cursors.Default;
     }
 }
Example #14
0
 // end - members //
 // Start is called before the first frame update
 void Start()
 {
     stats = GameObject.Find("stats").GetComponent<UpdateStats>();
     player = GameObject.Find("player").GetComponent<Player>();
 }
Example #15
0
        private RichHudDebug() : base(false, true)
        {
            if (instance == null)
            {
                instance = this;
            }
            else
            {
                throw new Exception($"Only one instance of {GetType().Name} can exist at any given time.");
            }

            statsText = new TextPage()
            {
                Name          = "Statistics",
                HeaderText    = "Debug Statistics",
                SubHeaderText = "Update Times and API Usage",
            };

            statsText.TextBuilder.BuilderMode = TextBuilderModes.Lined;
            statsBuilder = new StringBuilder();
            updateTimer  = new Stopwatch();
            updateTimer.Start();

            stats = new UpdateStats();

            overlayPos    = new Vector2(0.5f, 0.5f);
            enableOverlay = false;
            EnableDebug   = false;

            overlay = new TextBoard()
            {
                AutoResize  = true,
                BuilderMode = TextBuilderModes.Lined,
                Scale       = 0.8f,
                Format      = new GlyphFormat(new Color(255, 191, 0))
            };

            pageCategory = new TerminalPageCategory()
            {
                Name          = "Debug",
                Enabled       = false,
                PageContainer =
                {
                    new DemoPage()
                    {
                        Name = "Demo",
                    },

                    statsText,

                    new ControlPage()
                    {
                        Name = "Settings",
                        CategoryContainer =
                        {
                            new ControlCategory()
                            {
                                HeaderText    = "Debug Settings",
                                SubheaderText = "",
                                TileContainer =
                                {
                                    new ControlTile()
                                    {
                                        new TerminalCheckbox()
                                        {
                                            Name  = "Enable Overlay",
                                            Value = enableOverlay,
                                            ControlChangedHandler = (obj, args) =>
                                            {
                                                var element = obj as TerminalCheckbox;
                                                enableOverlay = element.Value;
                                            }
                                        },
                                        new TerminalDragBox()
                                        {
                                            Name                  = "Set Overlay Pos",
                                            Value                 = overlayPos,
                                            AlignToEdge           = true,
                                            ControlChangedHandler = (obj, args) =>
                                            {
                                                var element = obj as TerminalDragBox;
                                                overlayPos = element.Value;
                                            }
                                        }
                                    },
                                }
                            }
                        }
                    }
                }
            };

            RichHudTerminal.Root.Add(pageCategory);
        }
 // Start is called before the first frame update
 void Start()
 {
     wallet = FindObjectOfType <Wallet>();
     popup.SetActive(false);
     updateStats = FindObjectOfType <UpdateStats>();
 }
Example #17
0
		public void BindStats()
		{
			if (this.InvokeRequired)
			{
				UpdateStats inv = new UpdateStats(this.BindStats);
				this.Invoke(inv, new object[] { });
			}
			else
			{
				Cursor.Current = Cursors.WaitCursor;
				COM.IndexusStatistic stat = CACHE.SharedCache.GetStats();
				// Put the words data in a DataTable so that column sorting works.
				DataTable dataTable = new DataTable();
				dataTable.Columns.Add("IP/Name", typeof(string));
				dataTable.Columns.Add("Amount", typeof(long));
				dataTable.Columns.Add("Size KB", typeof(long));
				foreach (COM.ServerStats st in stat.NodeDate)
				{
					dataTable.Rows.Add(new object[] { st.Name, st.AmountOfObjects, st.CacheSize / 1024 });
				}
				this.GvStats.DataSource = dataTable;
				Cursor.Current = Cursors.Default;
			}
		}
Example #18
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);
        }