private void SelectButtonGenetics(UIMouseEvent evt, UIElement listeningElement) { _wishTextValue = "Genetic Reshuffle"; _descTextValue = "Wish for a new [guaranteed] genetic trait.\nAll traits have an equal chance of being rolled.\nWish limit = ∞, Wishes left = ∞"; wishSelection = WishSelectionID.Genetic; Main.PlaySound(SoundID.MenuTick); Initialize(); }
private void SelectButtonWealth(UIMouseEvent evt, UIElement listeningElement) { _wishTextValue = "Wealth"; _descTextValue = "Wish for money beyond your wildest dreams,\n5 Platinum coins in pre-hardmode,\n50 Platinum coins + lucky coin in hardmode.\nWish limit = ∞, Wishes left = ∞"; wishSelection = WishSelectionID.Wealth; Main.PlaySound(SoundID.MenuTick); Initialize(); }
private void SelectButtonImmortality(UIMouseEvent evt, UIElement listeningElement) { DBTPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DBTPlayer>(); _wishTextValue = "Immortality"; _descTextValue = "Wish for infinite life, reviving at full life\nfor the next 3 deaths.\nWish limit = 1, Wishes left = " + modPlayer.ImmortalityWishesLeft; wishSelection = WishSelectionID.Immortality; Main.PlaySound(SoundID.MenuTick); Initialize(); }
private void SelectButtonPower(UIMouseEvent evt, UIElement listeningElement) { DBTPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DBTPlayer>(); _wishTextValue = "Power"; _descTextValue = "Wish for a permanent increase in\nMaximum Health, Maximum Ki and Damage.\nWish limit = " + DBTPlayer.POWER_WISH_MAXIMUM + ", Wishes left = " + modPlayer.PowerWishesLeft; wishSelection = WishSelectionID.Power; Main.PlaySound(SoundID.MenuTick); Initialize(); }
private void SelectButtonAwakening(UIMouseEvent evt, UIElement listeningElement) { DBTPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DBTPlayer>(); _wishTextValue = "Awakening"; _descTextValue = "Wish to awaken your latent power,\n.Instantly masters your strongest form.\nWish limit = 5, Wishes left = " + modPlayer.AwakeningWishesLeft; wishSelection = WishSelectionID.Awakening; Main.PlaySound(SoundID.MenuTick); Initialize(); }
private void SelectButtonSkill(UIMouseEvent evt, UIElement listeningElement) { DBTPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DBTPlayer>(); _wishTextValue = "Technique"; _descTextValue = "Wish for a powerful attack. What you get depends on\nhow many times you have wished this.\nWish limit = 3, Wishes left = " + modPlayer.SkillWishesLeft; wishSelection = WishSelectionID.Skill; Main.PlaySound(SoundID.MenuTick); Initialize(); }
private void SelectButtonRitual(UIMouseEvent evt, UIElement listeningElement) { Deactivate(); Initialize(); DBTPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DBTPlayer>(); _wishTextValue = "Summon Recollection"; _descTextValue = RitualWishText; wishSelection = WishSelectionID.Ritual; Main.PlaySound(SoundID.MenuTick); }
private void SelectButtonAwakening(UIMouseEvent evt, UIElement listeningElement) { MyPlayer modPlayer = Main.LocalPlayer.GetModPlayer <MyPlayer>(); _wishTextValue = "Awakening"; _descTextValue = "Wish to awaken your latent power,\nUnlocks the next available form.\nWish limit = 3, Wishes left = " + modPlayer.awakeningWishesLeft; wishSelection = WishSelectionID.Awakening; Main.PlaySound(SoundID.MenuTick); Initialize(); DBZMOD.ActivateWishmenu(); }
private void SelectButtonSkill(UIMouseEvent evt, UIElement listeningElement) { _wishTextValue = "Not Added Yet"; _descTextValue = ""; //wishTextValue = "Skill"; //descTextValue = "Wish for a powerful attack. What you get depends on\nhow many times you have wished this.\nWish limit = 3, Wishes left = " + modplayer.SkillWishesLeft; wishSelection = WishSelectionID.Skill; Main.PlaySound(SoundID.MenuTick); Initialize(); DBZMOD.ActivateWishmenu(); }
private void SelectButtonWealth(UIMouseEvent evt, UIElement listeningelement) { MyPlayer modplayer = Main.LocalPlayer.GetModPlayer <MyPlayer>(); wishTextValue = "Wealth"; descTextValue = "Wish for money beyond your wildest dreams,\n10 Platinum coins + lucky coin.\nWish limit = ∞, Wishes left = ∞"; WishSelection = WishSelectionID.Wealth; Main.PlaySound(SoundID.MenuTick); Initialize(); DBZMOD.ActivateWishmenu(); }
private void SelectButtonGenetics(UIMouseEvent evt, UIElement listeningelement) { MyPlayer modplayer = Main.LocalPlayer.GetModPlayer <MyPlayer>(); wishTextValue = "Genetic Reroll"; descTextValue = "Wish for a new [guaranteed] genetic trait.\nAll traits have an equal chance of being rolled.\nWish limit = ∞, Wishes left = ∞"; WishSelection = WishSelectionID.Genetic; Main.PlaySound(SoundID.MenuTick); Initialize(); DBZMOD.ActivateWishmenu(); }
private void GrantWish(UIMouseEvent evt, UIElement listeningElement) { Player player = Main.LocalPlayer; DBTPlayer modPlayer = Main.LocalPlayer.GetModPlayer <DBTPlayer>(); bool usedWish = false; switch (wishSelection) { case WishSelectionID.Power: if (modPlayer.PowerWishesLeft > 0) { usedWish = true; DoPowerWish(); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Wealth: usedWish = true; DoWealthWish(); break; case WishSelectionID.Immortality: if (modPlayer.ImmortalityWishesLeft > 0) { usedWish = true; DoImmortalityWish(); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Genetic: usedWish = true; DoGeneticWish(); break; case WishSelectionID.Awakening: if (modPlayer.AwakeningWishesLeft > 0) { usedWish = true; DoAwakeningWish(); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Ritual: usedWish = true; DoRitualWish(); break; default: break; } if (usedWish) { wishSelection = WishSelectionID.None; modPlayer.WishActive = false; Main.PlaySound(SoundID.MenuClose); } Initialize(); }
private void GrantWish(UIMouseEvent evt, UIElement listeningElement) { Player player = Main.LocalPlayer; MyPlayer modPlayer = Main.LocalPlayer.GetModPlayer <MyPlayer>(); bool usedWish = false; switch (wishSelection) { case WishSelectionID.Power: if (modPlayer.powerWishesLeft > 0) { usedWish = true; DoPowerWish(); SoundHelper.PlayCustomSound("Sounds/WishGranted", player.Center); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Wealth: usedWish = true; DoWealthWish(); SoundHelper.PlayCustomSound("Sounds/WishGranted", player.Center); break; case WishSelectionID.Immortality: if (modPlayer.immortalityWishesLeft > 0) { usedWish = true; DoImmortalityWish(); SoundHelper.PlayCustomSound("Sounds/WishGranted", player.Center); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Genetic: usedWish = true; DoGeneticWish(); SoundHelper.PlayCustomSound("Sounds/WishGranted", player.Center); break; case WishSelectionID.Awakening: if (modPlayer.awakeningWishesLeft > 0) { usedWish = true; DoAwakeningWish(); SoundHelper.PlayCustomSound("Sounds/WishGranted", player.Center); } else { Main.PlaySound(SoundID.MenuClose); } break; default: break; } if (usedWish) { wishSelection = WishSelectionID.None; modPlayer.player.DestroyOneOfEachDragonBall(); modPlayer.wishActive = false; Main.PlaySound(SoundID.MenuClose); } Initialize(); DBZMOD.ActivateWishmenu(); }
private void GrantWish(UIMouseEvent evt, UIElement listeningelement) { Player player = Main.LocalPlayer; MyPlayer modplayer = Main.LocalPlayer.GetModPlayer <MyPlayer>(); bool UsedWish = false; switch (WishSelection) { case WishSelectionID.Power: if (modplayer.PowerWishesLeft > 0) { UsedWish = true; DoPowerWish(); SoundUtil.PlayCustomSound("Sounds/WishGranted", player.Center); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Wealth: UsedWish = true; DoWealthWish(); SoundUtil.PlayCustomSound("Sounds/WishGranted", player.Center); break; case WishSelectionID.Immortality: if (modplayer.ImmortalityWishesLeft > 0) { UsedWish = true; DoImmortalityWish(); SoundUtil.PlayCustomSound("Sounds/WishGranted", player.Center); } else { Main.PlaySound(SoundID.MenuClose); } break; case WishSelectionID.Genetic: UsedWish = true; DoGeneticWish(); SoundUtil.PlayCustomSound("Sounds/WishGranted", player.Center); break; case WishSelectionID.Awakening: if (modplayer.AwakeningWishesLeft > 0) { UsedWish = true; DoAwakeningWish(); SoundUtil.PlayCustomSound("Sounds/WishGranted", player.Center); } else { Main.PlaySound(SoundID.MenuClose); } break; default: break; } if (UsedWish) { DebugUtil.Log("Wish has been used."); WishSelection = WishSelectionID.None; DBZWorld.DestroyAndRespawnDragonBalls(); modplayer.WishActive = false; Main.PlaySound(SoundID.MenuClose); } Initialize(); DBZMOD.ActivateWishmenu(); }