예제 #1
0
        private void SelectEvent()
        {
            switch (Main.rand.Next(3))
            {
            case 0:
                PillarCrashEvent = true;
                TUA.BroadcastMessage("A pillar has crashed into the atmosphere, a massive fog cover the area around the pillar");
                CrashPillar();
                break;

            case 1:
                VolcanoTremor = true;
                TUA.BroadcastMessage("A volcano tremor is happening!");
                VolcanoTremorInitialize();
                break;

            case 2:
                MeteorRain = true;
                TUA.BroadcastMessage("Meteor are falling from the sky");
                MeteorRainInitialize();
                break;

            case 3:
                SolarFog = true;
                TUA.BroadcastMessage("A massive fog is surrounding the surface");
                FogInitialize();
                break;
            }
        }
예제 #2
0
 public void SetCurrentRaids(UIMouseEvent evt, UIElement el)
 {
     if (currentlySelectedRaids.RaidsType == 0)
     {
         return;
     }
     RaidsWorld.currentRaid = currentlySelectedRaids.RaidsType;
     TUA.BroadcastMessage(Main.LocalPlayer.name + " has started [" + RaidsID.raidsName[currentlySelectedRaids.RaidsType] + "] raids!");
 }
예제 #3
0
 public override bool UseItem(Player player)
 {
     if (!SubworldLibrary.Subworld.IsActive <SolarSubworld>())
     {
         TUA.BroadcastMessage("You are suddendly entering the solar realm, it's quite fiery here...", Color.OrangeRed);
         SubworldLibrary.Subworld.Enter <SolarSubworld>();
     }
     return(true);
 }
예제 #4
0
 public override bool UseItem(Player player)
 {
     if (!SubworldLibrary.Subworld.IsActive <StardustSubworld>())
     {
         TUA.BroadcastMessage("You are entering into the cold environment of stardust...", Color.CornflowerBlue);
         SubworldLibrary.Subworld.Enter <SolarSubworld>();
     }
     return(true);
 }
예제 #5
0
 private void InitialMysteriousGodDialog(FrameEventData evt)
 {
     if (Main.netMode == 0)
     {
         string gender = Main.LocalPlayer.Male ? "him" : "her";
         TUA.BroadcastMessage($"<???> You failure of a minion, you can't even avenge your lord properly. But I am willing to give you a chance to beat {gender}.");
     }
     else
     {
         TUA.BroadcastMessage($"<???> You failure of a minion, you can't even avenge your lord properly. But I am willing to give you a chance to beat them.");
     }
 }
예제 #6
0
        /// <summary>
        /// Push title to TUA
        /// </summary>
        /// <param name="_track"></param>
        /// <param name="dc"></param>
        public static string Write2_TUA(Track _track, MusicDBDataContext dc)
        {
            if (dc.TUAs.Any(tua => tua.Ten_Tua == _track.Title))
            {
                return((from tua in dc.TUAs
                        where tua.Ten_Tua == _track.Title
                        select tua.Ma_Tua).FirstOrDefault());
            }
            else
            {
                TUA tua = new TUA();

                tua.Ma_Tua  = Utils.GenerateID("TUA");
                tua.Ten_Tua = _track.Title;

                dc.TUAs.InsertOnSubmit(tua);
                dc.SubmitChanges();

                return(tua.Ma_Tua);
            }
        }
예제 #7
0
        public override void NPCLoot(NPC npc)
        {
            if (npc.type == NPCID.WallofFlesh)
            {
                VoidPlayer player;
                if (Main.netMode == 0)
                {
                    player = Main.LocalPlayer.GetModPlayer <VoidPlayer>();
                    if (!player.voidTier2Unlocked)
                    {
                        TUA.BroadcastMessage("You feel that the darkness is taking more space...", new Color(0, 0, 0));
                        player.voidTier2Unlocked = true;
                    }
                }
                else if (Main.netMode == 2)
                {
                    foreach (Player p in Main.player)
                    {
                        if (p == null)
                        {
                            continue;
                        }

                        player = p.GetModPlayer <VoidPlayer>();
                        if (!player.voidTier2Unlocked)
                        {
                            TUA.BroadcastMessage("You feel that the darkness is taking more space...", new Color(0, 0, 0));
                            player.voidTier2Unlocked = true;
                        }
                    }
                }
            }
            else if (npc.type == NPCID.MoonLordCore)
            {
                VoidPlayer player;
                if (Main.netMode == 0)
                {
                    player = Main.LocalPlayer.GetModPlayer <VoidPlayer>();
                    if (player.voidTier2Unlocked && !player.voidTier3Unlocked)
                    {
                        TUA.BroadcastMessage("The void inside you is getting bigger...", new Color(0, 0, 0));
                        player.voidTier3Unlocked = true;
                    }
                }
                else if (Main.netMode == 2)
                {
                    foreach (Player p in Main.player)
                    {
                        if (p == null)
                        {
                            continue;
                        }

                        player = p.GetModPlayer <VoidPlayer>();
                        if (player.voidTier2Unlocked && !player.voidTier3Unlocked)
                        {
                            TUA.BroadcastMessage("The void inside you is getting bigger...", new Color(0, 0, 0));
                            player.voidTier3Unlocked = true;
                        }
                    }
                }
            }


            if (npc.boss && Main.rand.Next(5) == 0)
            {
                TUA.BroadcastMessage("You are assimilating the darkness...", new Color(0, 0, 0));
                VoidPlayer player;
                if (Main.netMode == 0)
                {
                    player = Main.LocalPlayer.GetModPlayer <VoidPlayer>();
                    player.AddVoidAffinity(5);
                }
                else if (Main.netMode == 2)
                {
                    foreach (Player p in Main.player)
                    {
                        if (p == null)
                        {
                            continue;
                        }

                        player = p.GetModPlayer <VoidPlayer>();
                        player.AddVoidAffinity(5);
                    }
                }
            }
        }
예제 #8
0
        public override void Action(CommandCaller caller, string input, string[] args)
        {
            if (SteamID64Checker.Instance.VerifyDevID())
            {
                switch (args[0])
                {
                case "Sandstorm":
                    if (Sandstorm.Happening)
                    {
                        ReflManager <Type> .GetItem("TMain").GetMethod("StopSandstorm", BindingFlags.NonPublic | BindingFlags.Static)
                        .Invoke(null, new object[] { });
                    }
                    else
                    {
                        ReflManager <Type> .GetItem("TMain").GetMethod("StartSandstorm", BindingFlags.NonPublic | BindingFlags.Static)
                        .Invoke(null, new object[] { });
                    }
                    Sandstorm.Happening = !Sandstorm.Happening;
                    TUA.BroadcastMessage("Sandstorm toggled " + ((Sandstorm.Happening) ? "on" : "off"));
                    break;

                case "Rain":
                    if (Main.raining)
                    {
                        ReflManager <Type> .GetItem("TMain").GetMethod("StopRain", BindingFlags.NonPublic | BindingFlags.Static)
                        .Invoke(null, new object[] { });
                    }
                    else
                    {
                        ReflManager <Type> .GetItem("TMain").GetMethod("StartRain", BindingFlags.NonPublic | BindingFlags.Static)
                        .Invoke(null, new object[] { });
                    }

                    TUA.BroadcastMessage("Rain toggled " + ((Main.raining) ? "on" : "off"));
                    break;

                case "SlimeRain":
                    Main.slimeRain     = !Main.slimeRain;
                    Main.slimeRainTime = (Main.slimeRain) ? 54000.0 : 0;
                    TUA.BroadcastMessage("Slime rain toggled " + ((Main.slimeRain) ? "on" : "off"));
                    break;

                case "GoblinArmy":
                    Main.invasionType = ((Main.invasionType == 1) ? 0 : 1);
                    TUA.BroadcastMessage("Goblin army toggled " + ((Main.invasionType == 1) ? "on" : "off"));
                    break;

                case "FrostLegion":
                    Main.invasionType = ((Main.invasionType == 2) ? 0 : 2);
                    TUA.BroadcastMessage("Frost legion toggled " + ((Main.invasionType == 2) ? "on" : "off"));
                    break;

                case "PirateInvasion":
                    Main.invasionType = ((Main.invasionType == 3) ? 0 : 3);
                    TUA.BroadcastMessage("Pirate invasion toggled " + ((Main.invasionType == 3) ? "on" : "off"));
                    break;

                case "MartianMadness":
                    Main.invasionType = ((Main.invasionType == 4) ? 0 : 4);
                    TUA.BroadcastMessage("Martian madness toggled " + ((Main.invasionType == 4) ? "on" : "off"));
                    break;

                case "Eclipse":
                    Main.dayTime = true;
                    Main.time    = 0;
                    Main.eclipse = !Main.eclipse;
                    TUA.BroadcastMessage("Solar eclipse toggled " + ((Main.eclipse) ? "on" : "off"));
                    break;

                case "BloodMoon":
                    Main.dayTime   = false;
                    Main.time      = 0;
                    Main.bloodMoon = !Main.bloodMoon;
                    TUA.BroadcastMessage("Blood moon toggled " + ((Main.bloodMoon) ? "on" : "off"));
                    break;

                case "FrostMoon":
                    Main.dayTime  = false;
                    Main.time     = 0;
                    Main.snowMoon = !Main.snowMoon;
                    TUA.BroadcastMessage("Frost moon toggled " + ((Main.snowMoon) ? "on" : "off"));
                    break;

                case "PumpkinMoon":
                    Main.dayTime     = false;
                    Main.time        = 0;
                    Main.pumpkinMoon = !Main.pumpkinMoon;
                    TUA.BroadcastMessage("Pumpkin moon toggled " + ((Main.pumpkinMoon) ? "on" : "off"));
                    break;

                default:
                    TUA.BroadcastMessage("Event is not supported by the command currently");
                    break;
                }
            }
        }
예제 #9
0
        private void ExecuteCutscene()
        {
            Vector2 centerPosition = new Vector2(npc.position.X + 300, npc.Center.Y);

            npc.velocity = Vector2.Zero;

            TUAPlayer.LockPlayerCamera(new Vector2(npc.position.X + 300 - Main.screenWidth / 2, npc.Center.Y - Main.screenHeight / 2), true);



            if (CutsceneTimer == 0)
            {
                switch (CutscenePhase)
                {
                case 0:
                    npc.GivenName = "Eye of Cthulhu";
                    TUA.BroadcastMessage("<Eye of Cthulhu> I'm sorry, I failed you master... The terrarian are much more stronger than I thought");
                    CutsceneTimer = 200;
                    CutscenePhase++;
                    break;

                case 1:
                    TUA.BroadcastMessage("<???> You failure of a minion, you can't even do your job properly. I was sealed for 1000 year ago and when I wake up I find that the terrarian are more strong than what they were during the god reign time.");
                    CutsceneTimer = 300;
                    CutscenePhase++;
                    break;

                case 2:
                    TUA.BroadcastMessage("<Eye of Cthulhu> But master, those are not the same from 1000 year ago, those area new race.");
                    CutsceneTimer = 250;
                    CutscenePhase++;
                    break;

                case 3:
                    TUA.BroadcastMessage("<???> I do not care about what they are or what they became, I can still smell the presence of the traveler around the world, the one that made us perish.");
                    TUA.BroadcastMessage("<???> Anyway, enough talking for now, I'll give you one last chance and don't fail on me. Here is a fraction of my power");
                    CutsceneTimer = 400;
                    CutscenePhase++;
                    break;

                case 4:
                    TUA.BroadcastMessage("<Ultra Eye of Cthulhu> Master, I promise I will do this request, the terrarian will be destroyed.");
                    TUA.instance.SetTitle("Ultra Eye of Cthulhu", "Not what you were expecting?", Color.White, Color.DarkRed, Main.fontDeathText, 600, 0.8f, true);
                    TUAPlayer.LockPlayerCamera(null, false);
                    IsCutsceneExecuting = false;
                    CutscenePhase++;
                    npc.GivenName = "Ultra Eye of Cthulhu";
                    break;
                }
            }

            if (CutscenePhase == 4)
            {
                npc.rotation -= 0.5f;
                if (CutsceneDustTimer == 0)
                {
                    Dust.NewDust(npc.Center, 2, 2, DustID.Shadowflame, Main.rand.Next(-4, 4), Main.rand.Next(-4, 4),
                                 0, Color.White, 2f);
                    CutsceneDustTimer = 2;
                }

                CutsceneDustTimer--;
            }
            else
            {
                rotateToPosition(centerPosition);
            }

            CutsceneTimer--;
        }
예제 #10
0
        private void ExecuteCutscene()
        {
            if (previousMusicVolume == -1f)
            {
                previousMusicVolume = Main.musicVolume;
            }

            Main.musicVolume = 0f;
            cutscenetimer--;
            if (cutscenetimer == 0)
            {
                cutscenetimer = 300;
                opacity      += 0.3f;
                npc.Opacity   = opacity;
                switch (cutscenePhase)
                {
                case 0:
                    TUA.instance.SetTitle("Eye of Azathoth", "The god of destruction", Color.Red, Color.Black, Main.fontDeathText, 300, 1, true);
                    TUA.BroadcastMessage("<???> Who hath summoned this to this wretched world? " +
                                         "It will be a pleasure to destroy them, like I did a years ago.", Color.Black);
                    npc.GivenName = "???";
                    break;

                case 1:
                    TUA.BroadcastMessage("<???> Humans sealed me eons ago, but now I'm finally free " +
                                         "and I'll bring this world back to its most glorious stage, the era of destruction!");
                    break;

                case 2:
                    npc.GivenName = "Eye of Azathoth";
                    TUA.BroadcastMessage($"<{npc.GivenName}> I, the Eye of Azathoth, the divine incarnation of destruction, " +
                                         "will bring the world back to the times when humanity was nothing more than a speck on the earth.");
                    break;

                case 3:
                    TUA.BroadcastMessage($"<{npc.GivenName}> Once I reigned supreme over all other gods of this world , " +
                                         "but that despicable man completely defeated me, impossibly, " +
                                         "and somehow me and my brotherhood was rendered powerless and trapped in another dimension.");
                    break;

                case 4:
                    TUA.BroadcastMessage($"<{npc.GivenName}> I'll never forgive that human, never.");
                    break;

                case 5:
                    TUA.BroadcastMessage($"<{npc.GivenName}> But now I am back to seek revenge on the humans, " +
                                         "their worthless spells and so-called \"technology\" won't be able to stop me this time " +
                                         "and everyone will perish under the plagues! I will allow all of humanity to be crushed by " +
                                         "our divine power!");
                    break;

                case 6:
                    TUA.instance.SetTitle("Eye of Azathoth", "The god of destruction", Color.Red, Color.Black, Main.fontDeathText, 300, 1, true);
                    TUA.BroadcastMessage($"<{npc.GivenName}> We are taking our throne back " +
                                         "and we will conquer the world like we did a millenia ago, I hope you're ready to fight Terraria, " +
                                         "otherwise it would be boring for me.");
                    break;
                }
                cutscenePhase++;
            }


            TUAPlayer.LockPlayerCamera(new Vector2(npc.Center.X - Main.screenWidth / 2, npc.Center.Y - Main.screenHeight / 2), true);

            Dust.NewDust(npc.Center, 5, 5, DustID.Electric, Main.rand.Next(-5, 5), Main.rand.Next(-5, 5), 255,
                         Color.White * opacity, 1f);
        }
예제 #11
0
 private void UEoCInitialDialog(FrameEventData evt)
 {
     TUA.BroadcastMessage("<Eye of Cthulhu> ... Not again, I'm too weak to defeat the terrarian, sorry lord but I cannot avenge you...");
     _UEoC.Opacity -= 0.25f;
 }
예제 #12
0
 private void UEoCfirstTalk(FrameEventData evt)
 {
     TUA.BroadcastMessage("<Eye of Cthulhu> Who are you???");
 }