public static void DisableCreation() { foreach (Creation current in App.State.AllCreations) { current.IsActive = false; } foreach (UltimateBeingV2 current2 in App.State.HomePlanet.UltimateBeingsV2) { if (current2.isCreating) { GodUi.createdEvilCreation = current2; } current2.isCreating = false; } }
public static void EnableCreating() { bool flag = false; if (GodUi.createdEvilCreation != null) { foreach (UltimateBeingV2 current in App.State.HomePlanet.UltimateBeingsV2) { if (current.Name.Equals(GodUi.createdEvilCreation.Name)) { current.isCreating = true; flag = true; } } GodUi.createdEvilCreation = null; } foreach (Creation current2 in App.State.AllCreations) { current2.IsActive = false; } if (!flag) { Creation creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Shadow_clone); if (App.State.GameSettings.LastCreation != null) { creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == App.State.GameSettings.LastCreation.TypeEnum); } if (!creation.GodToDefeat.IsDefeated) { creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Shadow_clone); } if (creation != null) { creation.IsActive = true; } } App.State.PrinnyBaal.IsFighting = false; }
private void showUBV2s(int marginTop, GUIStyle labelStyle) { using (List <UltimateBeingV2> .Enumerator enumerator = App.State.HomePlanet.UltimateBeingsV2.GetEnumerator()) { while (enumerator.MoveNext()) { UltimateBeingV2 being = enumerator.Current; if (!being.IsDefeated) { labelStyle.fontSize = GuiBase.FontSize(16); if (being.IsAvailable) { string text = being.Description; if (being.HPPercent < 100) { text = text + "\nHp left: " + being.HPPercent.ToGuiText(true) + " %"; } GuiBase.CreateProgressBar(marginTop, being.HPPercent.Double / 100.0, being.Name, text, GuiBase.progressBg, GuiBase.progressFgRed); if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Fight", string.Concat(new object[] { "If you win, you will receive ", being.Tier * 10, " God Power and your Multi from Ultimate Beings will increase by ", being.GetMultiplier(App.State.HomePlanet.UBMultiplier).ToGuiText(true), " %" })))) { if (App.State.CurrentHealth * 2 < App.State.MaxHealth || App.State.HomePlanet.ShadowCloneCount < 100000) { GuiBase.ShowToast("Your need at least 50% of your health and 100000 Clones on Powersurge to be able to start a fight."); } else { this.Battle = BattleUBV2.Instance; this.Battle.start(being); } } marginTop += 35; Creation creation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == being.CreationNeeded); string str = string.Empty; if (creation != null) { str = "\n\nYou have " + creation.Count.GuiText + " x " + creation.Name; } GuiBase.CreateProgressBar(marginTop, being.CurrentCreationDuration.Double / being.CreationDuration.Double, being.CreationName, being.CreationDescription + str, GuiBase.progressBg, GuiBase.progressFgBlue); being.StopAtString = GUI.TextField(new Rect(GuiBase.Width(350f), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), being.StopAtString); if (!being.isCreating) { if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Create", "If you create a " + being.CreationName + ", you can't create anything else until you stop it."))) { being.isCreating = true; being.InitDuration(App.State); foreach (Creation current in App.State.AllCreations) { current.IsActive = false; } } } else if (GUI.Button(new Rect(GuiBase.Width(550f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Stop")) { being.isCreating = false; being.GoBackToCreating(); } GUI.Label(new Rect(GuiBase.Width(235f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), string.Empty + being.CreationCount.ToGuiText(true), labelStyle); } marginTop += 35; } } } labelStyle.alignment = TextAnchor.UpperLeft; GUI.Label(new Rect(GuiBase.Width(240f), GuiBase.Height((float)(marginTop - 5)), GuiBase.Width(200f), GuiBase.Height(30f)), (App.State.HomePlanet.PlanetMultiplier + 100).ToGuiText(true) + " %", labelStyle); labelStyle.fontStyle = FontStyle.Bold; labelStyle.fontSize = GuiBase.FontSize(18); GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)(marginTop - 5)), GuiBase.Width(300f), GuiBase.Height(30f)), new GUIContent("Planet Multiplier", string.Concat(new string[] { "This multiplier multiplies directly Physical, Mystic, Battle and Creating. 100% is the base value.lowerTextMulti from Powersurge: ", App.State.HomePlanet.PowerSurgeMultiplier.ToGuiText(true), " %\nMulti from Ultimate Beings: ", App.State.HomePlanet.UBMultiplier.ToGuiText(true), " %" })), labelStyle); labelStyle.fontStyle = FontStyle.Normal; }