예제 #1
0
 private void SelectButtonGenetics(UIMouseEvent evt, UIElement listeningElement)
 {
     _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();
 }
예제 #2
0
 private void SelectButtonWealth(UIMouseEvent evt, UIElement listeningElement)
 {
     _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();
 }
예제 #3
0
        private void SelectButtonImmortality(UIMouseEvent evt, UIElement listeningElement)
        {
            MyPlayer modPlayer = Main.LocalPlayer.GetModPlayer <MyPlayer>();

            _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();
            DBZMOD.ActivateWishmenu();
        }
예제 #4
0
        private void SelectButtonPower(UIMouseEvent evt, UIElement listeningElement)
        {
            MyPlayer modPlayer = Main.LocalPlayer.GetModPlayer <MyPlayer>();

            _wishTextValue = "Power";
            _descTextValue = "Wish for a permanent increase in\nMaximum Health, Maximum Ki and Damage.\nWish limit = " + MyPlayer.POWER_WISH_MAXIMUM + ", Wishes left = " + modPlayer.powerWishesLeft;
            wishSelection  = WishSelectionID.Power;
            Main.PlaySound(SoundID.MenuTick);
            Initialize();
            DBZMOD.ActivateWishmenu();
        }
예제 #5
0
        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();
        }
예제 #6
0
 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();
 }
예제 #7
0
        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();
        }
예제 #8
0
        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();
        }