public string AddOfflineExp(long ms, GameState state) { long value = ms / this.FiringTimeMs; CDouble rightSide = this.CloneHp.Level + 1; CDouble leftSide = this.Power.Level * value; CDouble cDouble = 0; if (leftSide > rightSide) { cDouble = (leftSide / rightSide).ToInt(); } if (cDouble > this.CloneCount.Level * value) { cDouble = this.CloneCount.Level * value; } cDouble = cDouble.ToLong(); if (cDouble == 0) { return(string.Empty); } CDouble cDouble2 = Math.Pow(this.CloneHp.Level.Double, 1.1) * Math.Pow(cDouble.Double, 0.9) * this.ExpMulti; this.Exp += cDouble2; this.KilledClones += cDouble; state.Statistic.AfkyClonesKilled += cDouble; if (state.Statistic.AfkyClonesKilled < this.KilledClones) { state.Statistic.AfkyClonesKilled = this.KilledClones; } return(string.Concat(new string[] { "Afky god killed ", cDouble.GuiText, " shadow clones and got ", cDouble2.GuiText, " exp." })); }
public void UpdateDuration(long ms) { if (App.State == null) { return; } if (this.CreationDuration == 0) { this.InitDuration(App.State); } if (this.isCreating) { if (App.State.CreatingPowerBase <= 0) { GuiBase.ShowToast("You need more creating power to create a " + this.CreationName); this.isCreating = false; this.GoBackToCreating(); return; } if (this.CurrentCreationDuration <= 0) { Creation creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == this.CreationNeeded); if (creation.count == 0) { this.isCreating = false; GuiBase.ShowToast("You need one " + creation.Name + " to create a " + this.CreationName); this.GoBackToCreating(); return; } Creation expr_EB = creation; expr_EB.count = --expr_EB.count; } CDouble rightSide = App.State.CreationSpeed(ms); this.CurrentCreationDuration += rightSide; CDouble cDouble = (this.CreationDuration - this.CurrentCreationDuration) * 30 / rightSide; string text = "Time to finish: " + Conv.MsToGuiText(cDouble.ToLong(), true); CDouble cDouble2 = this.CreationLoss / this.CreationDuration * rightSide; App.State.CreatingPowerBase -= cDouble2; if (App.State.CreatingPowerBase < 0) { App.State.CreatingPowerBase = 0; } CDouble cDouble3 = cDouble2 * App.State.Multiplier.CurrentMultiCreating * (100 + App.State.PremiumBoni.GpBoniCreating); cDouble3 = App.State.AdditionalMultis(cDouble3); if (this.CreationDuration > 0 && this.CurrentCreationDuration > this.CreationDuration) { this.CurrentCreationDuration = 0; this.CreationCount = ++this.CreationCount; if (this.CreationCount >= this.StopAt && this.StopAt != 0) { this.isCreating = false; this.GoBackToCreating(); } } this.CreationDescription = string.Concat(new string[] { this.CreationDescriptionBase, "\nYou will lose ", cDouble3.ToGuiText(true), " Creating every second while creating this.\n", text }); } if (this.HPPercent < 100) { this.HPPercent += 1.67E-05 * (double)ms; } }