示例#1
0
 public override void PostUpdate()
 {
     if (item.lavaWet)
     {
         Player player = Main.player[Player.FindClosest(item.Center, item.width, item.height)];
         for (int i = 0; i < Main.maxPlayers; ++i)
         {
             if (player.active && !player.dead)
             {
                 int bunnyKills = NPC.killCount[Item.NPCtoBanner(NPCID.Bunny)];
                 if (bunnyKills % 100 == 0 && bunnyKills < 1000)
                 {
                     if (Main.netMode != 1)
                     {
                         BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.RoyalRabbitSummoned1"), 107, 137, 179);
                     }
                     Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/Rajah"), player.Center);
                     AAModGlobalNPC.SpawnRajah(player, true, new Vector2(player.Center.X, player.Center.Y - 2000), Language.GetTextValue("Mods.AAMod.Common.RajahRabbit"));
                 }
                 if (bunnyKills % 100 == 0 && bunnyKills >= 1000)
                 {
                     if (Main.netMode != 1)
                     {
                         BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.RoyalRabbitSummoned2") + player.name.ToUpper() + "!", 107, 137, 179);
                     }
                     Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/Rajah"), player.Center);
                     AAModGlobalNPC.SpawnRajah(player, true, new Vector2(player.Center.X, player.Center.Y - 2000), Language.GetTextValue("Mods.AAMod.Common.RajahRabbit"));
                 }
                 ;
             }
         }
         item.active = false;
     }
 }
示例#2
0
 public override bool UseItem(Player player)
 {
     AAWorld.spawnGrips = false;
     if (Main.netMode == 0)
     {
         if (Main.netMode != 1)
         {
             BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Grips.GripsofChaosAwoken"), 175, 75, 255, false);
         }
     }
     else if (Main.netMode == 2)
     {
         if (Main.netMode == NetmodeID.SinglePlayer)
         {
             if (Main.netMode != 1)
             {
                 BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Grips.GripsofChaosAwoken"), 175, 75, 255, false);
             }
         }
         else if (Main.netMode == NetmodeID.Server)
         {
             NetMessage.BroadcastChatMessage(NetworkText.FromLiteral(Language.GetTextValue("Mods.AAMod.Grips.GripsofChaosAwoken")), new Color(175, 75, 255), -1);
         }
     }
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("GripOfChaosBlue"), false, 1, 0);
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("GripOfChaosRed"), false, -1, 0);
     Main.PlaySound(SoundID.Roar, player.position, 0);
     return(true);
 }
示例#3
0
 public override bool UseItem(Player player)
 {
     if (Main.netMode == 0)
     {
         if (Main.netMode != 1)
         {
             BaseMod.BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.EquinoxWormawoken"), 175, 75, 255, false);
         }
     }
     else if (Main.netMode == 2)
     {
         if (Main.netMode == NetmodeID.SinglePlayer)
         {
             if (Main.netMode != 1)
             {
                 BaseMod.BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.EquinoxWormawoken"), 175, 75, 255, false);
             }
         }
         else if (Main.netMode == NetmodeID.Server)
         {
             NetMessage.BroadcastChatMessage(NetworkText.FromLiteral(Language.GetTextValue("Mods.AAMod.Common.EquinoxWormawoken")), new Color(175, 75, 255), -1);
         }
     }
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("DaybringerHead"), false, 0, 0);
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("NightcrawlerHead"), false, 0, 0);
     Main.PlaySound(SoundID.Roar, player.position, 0);
     return(true);
 }
示例#4
0
        public override bool NewRightClick(int i, int j)
        {
            if (NPC.AnyNPCs(mod.NPCType("Greed")) || NPC.AnyNPCs(mod.NPCType("GreedSpawn")) || NPC.AnyNPCs(mod.NPCType("GreedA")) || NPC.AnyNPCs(mod.NPCType("GreedTransition")))
            {
                return(true);
            }
            Player player = Main.LocalPlayer;
            int    type   = ModContent.ItemType <Items.BossSummons.GoldenGrub>();

            if (BasePlayer.HasItem(player, type, 1))
            {
                for (int m = 0; m < 50; m++)
                {
                    Item item = player.inventory[m];
                    if (item != null && item.type == type && item.stack >= 1)
                    {
                        item.stack--;
                        if (AAWorld.downedGreed)
                        {
                            AAModGlobalNPC.SpawnBoss(player, ModContent.NPCType <Greed>(), true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.Greed"));
                        }
                        else
                        {
                            AAModGlobalNPC.SpawnBoss(player, ModContent.NPCType <GreedSpawn>(), false, new Vector2(i * 16, (j * 16) - 200), Language.GetTextValue("Mods.AAMod.Common.Greed"));
                        }
                    }
                }
            }
            return(true);
        }
示例#5
0
        public override bool UseItem(Player player)
        {
            if (!AAWorld.downedRajahsRevenge)
            {
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DiamondCarrotRajahText1"), 107, 137, 179);
                }
            }
            else
            {
                string Name;
                if (Main.netMode != 0)
                {
                    Name = "Terrarians";
                }
                else
                {
                    Name = Main.LocalPlayer.name;
                }
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DiamondCarrotRajahText2") + Name + "!", 107, 137, 179);
                }
            }
            int overrideDirection = Main.rand.Next(2) == 0 ? -1 : 1;

            AAModGlobalNPC.SpawnBoss(player, mod.NPCType("SupremeRajah"), false, player.Center + new Vector2(MathHelper.Lerp(500f, 800f, (float)Main.rand.NextDouble()) * overrideDirection, -1200), Language.GetTextValue("Mods.AAMod.Common.SupremeRajah"));
            return(true);
        }
示例#6
0
        public override void AI()
        {
            npc.TargetClosest();
            Player player = Main.player[npc.target];

            npc.ai[0]++;

            if (npc.ai[0] % 5 == 0)
            {
                npc.frame.Y += 152;
            }
            if (npc.ai[0] >= 130)
            {
                npc.frame.Y = 152 * 25;
            }
            if (npc.ai[0] >= 135 && !NPC.AnyNPCs(mod.NPCType("ZeroProtocol")) && Main.netMode != 1)
            {
                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("ZeroProtocol"), false, npc.Center, "", false);

                int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer, 0, 0);
                Main.projectile[b].Center = npc.Center;

                npc.netUpdate = true;
                npc.active    = false;
            }
        }
示例#7
0
        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            int thinger = Main.rand.Next(5);

            if (thinger == 0)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop1);
            }
            else if (thinger == 1)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop2);
                Item.NewItem(i * 16, j * 16, 32, 32, ItemID.MusketBall, 100);
            }
            else if (thinger == 2)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop3);
            }
            else if (thinger == 3)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop4);
            }
            else
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop5);
            }

            if (AAWorld.SmashDragonEgg == 2)
            {
                AAWorld.SmashDragonEgg--;
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Lang.TilesInfo("DragonEgg1"), Color.DarkOrange);
                }
            }
            else if (AAWorld.SmashDragonEgg == 1)
            {
                AAWorld.SmashDragonEgg--;
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Lang.TilesInfo("DragonEgg2"), Color.DarkOrange);
                }
            }
            else
            {
                Player player = Main.player[BaseAI.GetPlayer(new Vector2(i, j), -1)];
                AAWorld.SmashDragonEgg = 2;
                if (Main.dayTime)
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Broodmother"), true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.Broodmother"));
                }
                else
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.TilesInfo("DragonEgg3"), Color.DarkOrange);
                    }
                }
            }
        }
示例#8
0
        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            int thinger = Main.rand.Next(5);

            if (thinger == 0)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop1);
            }
            else if (thinger == 1)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop2);
            }
            else if (thinger == 2)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop3);
            }
            else if (thinger == 3)
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop4);
            }
            else
            {
                Item.NewItem(i * 16, j * 16, 32, 32, drop5);
            }

            if (AAWorld.SmashHydraPod == 2)
            {
                AAWorld.SmashHydraPod--;
                if (Main.netMode != 1)
                {
                    BaseMod.BaseUtility.Chat(Lang.TilesInfo("HydraPod1"), Color.Blue);
                }
            }
            else if (AAWorld.SmashHydraPod == 1)
            {
                AAWorld.SmashHydraPod--;
                if (Main.netMode != 1)
                {
                    BaseMod.BaseUtility.Chat(Lang.TilesInfo("HydraPod2"), Color.Blue);
                }
            }
            else
            {
                Player player = Main.player[BaseMod.BaseAI.GetPlayer(new Vector2(i, j), -1)];
                AAWorld.SmashHydraPod = 2;
                if (!Main.dayTime)
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Hydra"), true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.Hydra"));
                }
                else
                {
                    if (Main.netMode != 1)
                    {
                        BaseMod.BaseUtility.Chat("You hear hissing, but it scuttles away into the fog...", Color.Blue);
                    }
                }
            }
        }
示例#9
0
 public override bool UseItem(Player player)
 {
     if (Main.netMode != 1)
     {
         BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DraconianRuneTrue1"), new Color(175, 75, 255));
     }
     if (Main.netMode != 1)
     {
         BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DraconianRuneTrue2"), Color.DeepSkyBlue.R, Color.DeepSkyBlue.G, Color.DeepSkyBlue.B);
     }
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("AkumaA"), false, 0, 0, Language.GetTextValue("Mods.AAMod.Common.AkumaA"), false);
     Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/AkumaRoar"), player.position);
     return(true);
 }
示例#10
0
 public override bool UseItem(Player player)
 {
     if (Main.netMode != 1)
     {
         BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ChaosRuneTrue1"), Color.Magenta.R, Color.Magenta.G, Color.Magenta.B);
     }
     if (Main.netMode != 1)
     {
         BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ChaosRuneTrue2"), Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B);
     }
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("ShenA"), false, 0, 0);
     Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/ShenRoar"), player.position);
     return(true);
 }
示例#11
0
        // SpawnBoss(player, mod.NPCType("MyBoss"), true, 0, 0, "DerpyBoi 2", false);
        public static void SpawnBoss(Player player, int bossType, bool spawnMessage = true, Vector2 Pos = default, int overrideDirection = 0, int overrideDirectionY = 0, string overrideDisplayName = "", bool namePlural = false)
        {
            if (overrideDirection == 0)
            {
                overrideDirection = Main.rand.Next(2) == 0 ? -1 : 1;
            }
            if (overrideDirectionY == 0)
            {
                overrideDirectionY = -1;
            }
            Vector2 npcCenter = Pos + new Vector2(MathHelper.Lerp(500f, 800f, (float)Main.rand.NextDouble()) * overrideDirection, 800f * overrideDirectionY);

            for (int a = 0; a < 8; a++)
            {
                Dust.NewDust(npcCenter, 152, 114, ModContent.DustType <Feather>(), Main.rand.Next(-1, 2), 1, 0);
            }
            AAModGlobalNPC.SpawnBoss(player, bossType, spawnMessage, npcCenter, overrideDisplayName, namePlural);
        }
示例#12
0
        public override bool UseItem(Player player)
        {
            Main.PlaySound(SoundID.Roar, player.position, 0);

            if (AAWorld.SistersSummoned && !AAWorld.downedSisters)
            {
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.SistersDownedInfo1"), new Color(102, 20, 48));
                }

                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Ashe"), false, -1, 0, "Ashe Akuma", false);

                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.SistersDownedInfo2"), new Color(72, 78, 117));
                }
                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Haruka"), false, 1, 0, "Haruka Yamata", false);
                return(true);
            }
            else if (AAWorld.SistersSummoned && AAWorld.downedSisters)
            {
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.SistersInfo1"), new Color(72, 78, 117));
                }

                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.SistersInfo2"), new Color(102, 20, 48));
                }
                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Ashe"), false, -1, 0, "Ashe Akuma", false);
                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Haruka"), false, 1, 0, "Haruka Yamata", false);
                return(true);
            }
            else
            {
                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("AHSpawn"), false, 0, 0);
                AAWorld.SistersSummoned = true;
                return(true);
            }
        }
示例#13
0
 public override bool UseItem(Player player)
 {
     if (!AAWorld.downedAkuma)
     {
         if (Main.netMode != 1)
         {
             BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DraconianSignalTrue1"), new Color(180, 41, 32));
         }
     }
     if (AAWorld.downedAkuma)
     {
         if (Main.netMode != 1)
         {
             BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DraconianSignalTrue2"), new Color(180, 41, 32));
         }
     }
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Akuma"), true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.Akuma"), false);
     Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/AkumaRoar"), player.position);
     return(true);
 }
示例#14
0
        public override bool UseItem(Player player)
        {
            if (AAWorld.ShenSummoned)
            {
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(AAWorld.downedShen ? Language.GetTextValue("Mods.AAMod.Common.ChaosSigilTrue1") : Language.GetTextValue("Mods.AAMod.Common.ChaosSigilTrue2"), Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B);
                }

                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Shen"), true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.ShenDoragon"), false);
            }
            if (!AAWorld.ShenSummoned)
            {
                AAModGlobalNPC.SpawnBoss(player, mod.NPCType("ShenSpawn"), false, 0, 0);
                AAWorld.ShenSummoned = true;
            }

            Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/ShenRoar"), player.position);
            return(true);
        }
示例#15
0
        public override void NPCLoot()
        {
            Player player     = Main.player[Player.FindClosest(npc.Center, npc.width, npc.height)];
            int    bunnyKills = NPC.killCount[Item.NPCtoBanner(NPCID.Bunny)];

            if (bunnyKills % 100 == 0 && bunnyKills < 1000)
            {
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Lang.BossSummonsInfo("RoyalRabbit1"), 107, 137, 179);
                }
                Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/Rajah"), npc.Center);
                AAModGlobalNPC.SpawnRajah(player, true, new Vector2(npc.Center.X, npc.Center.Y - 2000), Language.GetTextValue("Mods.AAMod.Common.RajahRabbit"));
            }
            if (bunnyKills % 100 == 0 && bunnyKills >= 1000)
            {
                if (Main.netMode != 1)
                {
                    BaseUtility.Chat(Lang.BossSummonsInfo("RoyalRabbit2") + player.name.ToUpper() + "!!!", 107, 137, 179);
                }
                Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/Rajah"), npc.Center);
                AAModGlobalNPC.SpawnRajah(player, true, new Vector2(npc.Center.X, npc.Center.Y - 2000), Language.GetTextValue("Mods.AAMod.Common.RajahRabbit"));
            }
        }
示例#16
0
        public override bool UnlockChest(int i, int j, ref short frameXAdjustment, ref int dustType, ref bool manual)
        {
            bool Greed = NPC.AnyNPCs(mod.NPCType("Greed")) || NPC.AnyNPCs(mod.NPCType("GreedA")) || NPC.AnyNPCs(mod.NPCType("GreedSpawn")) || NPC.AnyNPCs(mod.NPCType("GreedTransition"));

            if (!Greed)
            {
                if (AAWorld.OpenedChest == 2)
                {
                    AAWorld.OpenedChest--;
                    if (Main.netMode != 1)
                    {
                        BaseMod.BaseUtility.Chat(Lang.GreedChest("GreedChest1"), Color.DarkGoldenrod);
                    }
                }
                else if (AAWorld.OpenedChest == 1)
                {
                    AAWorld.OpenedChest--;
                    if (Main.netMode != 1)
                    {
                        BaseMod.BaseUtility.Chat(Lang.GreedChest("GreedChest2"), Color.DarkGoldenrod);
                    }
                }
                else
                {
                    Player player = Main.player[BaseMod.BaseAI.GetPlayer(new Vector2(i, j), -1)];
                    AAWorld.OpenedChest = 2;
                    if (Main.netMode != 1)
                    {
                        BaseMod.BaseUtility.Chat(Lang.GreedChest("GreedChest3"), Color.Goldenrod);
                    }
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Greed"), false, 0, 0, Language.GetTextValue("Mods.AAMod.Common.Greed"));
                }
            }
            dustType = this.dustType;
            return(true);
        }
示例#17
0
        public override void AI()
        {
            npc.TargetClosest();

            Player player = Main.player[npc.target];

            MoveToPoint(player.Center - new Vector2(0, 300f));

            if (Main.netMode != 2) //clientside stuff
            {
                npc.frameCounter++;

                npc.rotation += .1f;
                Rotation     += .05f;

                if (npc.ai[0] > 175)
                {
                    npc.alpha -= 3;
                    if (npc.alpha < 0)
                    {
                        npc.alpha = 0;
                    }
                }
            }

            if (Main.netMode != 1)
            {
                npc.ai[0]++;

                if (npc.ai[0] == 175)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("GreedTransition1"), Color.Goldenrod);
                    }

                    npc.netUpdate = true;
                }
                else if (npc.ai[0] == 350)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("GreedTransition2"), Color.Goldenrod);
                    }
                }
                else if (npc.ai[0] == 500)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("GreedTransition3"), Color.Goldenrod);
                    }

                    npc.netUpdate = true;
                }
                else if (npc.ai[0] >= 610)
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("GreedA"), true, npc.Center, Lang.BossChat("GreedAName"), false);

                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("GreedTransition4"), Color.Goldenrod);
                    }

                    npc.netUpdate = true;
                    npc.active    = false;
                }
            }
        }
示例#18
0
 public override bool UseItem(Player player)
 {
     AAModGlobalNPC.SpawnBoss(player, NPCID.Plantera, true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.Plantera"), false);
     Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0);
     return(true);
 }
示例#19
0
        public override void AI()
        {
            Vector2 Origin    = new Vector2((int)(Main.maxTilesX * 0.65f), 100) * 16;
            Vector2 Acropolis = new Vector2(Origin.X + (80 * 16), Origin.Y + (79 * 16));

            npc.TargetClosest();
            if (Main.netMode != 1)
            {
                if (Vector2.Distance(npc.Center, Acropolis) < 5 && Main.netMode != 1)
                {
                    npc.velocity.X   *= 0;
                    npc.ai[1]         = 1;
                    npc.noTileCollide = false;
                    npc.noGravity     = false;
                    npc.netUpdate     = true;
                }
                if (npc.ai[1] == 0)
                {
                    MoveToPoint(Acropolis);
                }
                else
                {
                    npc.ai[0]++;
                    if (Main.netMode != 1)
                    {
                        if (npc.ai[2] == 0)
                        {
                            if (npc.ai[0] == 120)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat1"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 240)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat2"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 360)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat("...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 480)
                            {
                                music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/AthenaA");
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat3"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 600)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat4"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 720)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat5"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 840)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat6"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 960)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat7"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 1080)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat8"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] >= 1200)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("AthenaDefeat9"), Color.CornflowerBlue);
                                }
                                AAModGlobalNPC.SpawnBoss(Main.player[npc.target], ModContent.NPCType <Olympian.AthenaA>(), false, npc.Center);

                                int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer);
                                Main.projectile[b].Center = npc.Center;

                                npc.active    = false;
                                npc.netUpdate = true;
                            }
                        }
                        else
                        {
                            if (npc.ai[0] == 120)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat("...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 240)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat1"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 360)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat2"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 480)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat("...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 600)
                            {
                                string s = "";
                                if (Main.ActivePlayersCount > 1)
                                {
                                    s = Lang.BossChat("Athena2Defeat4");
                                }
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat3") + s + "...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 720)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat5"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 840)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat6"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 960)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat7"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 1080)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat8"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] >= 1200)
                            {
                                if (Main.netMode != 1)
                                {
                                    BaseUtility.Chat(Lang.BossChat("Athena2Defeat9"), Color.CornflowerBlue);
                                }
                                AAModGlobalNPC.SpawnBoss(Main.player[npc.target], ModContent.NPCType <AthenaFlee>(), false, npc.Center);
                                npc.active    = false;
                                npc.netUpdate = true;
                            }
                        }
                    }
                }
            }
        }
示例#20
0
        public override bool PreAI()
        {
            if (AAConfigClient.Instance.NoBossDialogue)
            {
                npc.TargetClosest();
                Player player = Main.player[npc.target];
                MoveToPoint(player.Center - new Vector2(0, 300f));

                if (Vector2.Distance(npc.Center, player.Center) > 2000)
                {
                    npc.alpha  = 255;
                    npc.Center = player.Center - new Vector2(0, 300f);
                }

                if (Main.netMode != NetmodeID.Server) //clientside stuff
                {
                    npc.frameCounter++;
                    if (npc.frameCounter >= 7)
                    {
                        npc.frameCounter = 0;
                        npc.frame.Y     += 42;
                    }
                    if (npc.frame.Y > 42 * 7)
                    {
                        npc.frame.Y = 0;
                    }
                    if (npc.ai[0] > 180)
                    {
                        npc.alpha -= 5;
                        if (npc.alpha < 0)
                        {
                            npc.alpha = 0;
                        }
                    }
                    if (npc.ai[0] >= 180) //after he says 'heh' on the server, change music on the client
                    {
                        music = ModLoader.GetMod("AAMod").GetSoundSlot(SoundType.Music, "Sounds/Music/Akuma2");
                    }
                    if (npc.ai[0] >= 380)
                    {
                        RVal -= 5;
                        BVal += 5;
                        if (RVal <= 0)
                        {
                            RVal = 0;
                        }
                        if (BVal >= 380)
                        {
                            BVal = 255;
                        }
                    }
                }
                if (Main.netMode != NetmodeID.MultiplayerClient)
                {
                    npc.ai[0]++;
                    if (npc.ai[0] == 180)
                    {
                        npc.netUpdate = true;
                    }
                    else
                    if (npc.ai[0] >= 600 && !NPC.AnyNPCs(mod.NPCType("AkumaA")))
                    {
                        for (int proj = 0; proj < 1000; proj++)
                        {
                            if (Main.projectile[proj].active && Main.projectile[proj].friendly && !Main.projectile[proj].hostile)
                            {
                                Main.projectile[proj].hostile  = true;
                                Main.projectile[proj].friendly = false;
                                Vector2 vector = Main.projectile[proj].Center - npc.Center;
                                vector.Normalize();
                                Vector2 reflectvelocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
                                reflectvelocity.Normalize();
                                reflectvelocity *= vector.Length();
                                reflectvelocity += vector * 20f;
                                reflectvelocity.Normalize();
                                reflectvelocity *= vector.Length();
                                if (reflectvelocity.Length() < 20f)
                                {
                                    reflectvelocity.Normalize();
                                    reflectvelocity *= 20f;
                                }

                                Main.projectile[proj].penetrate = 1;

                                Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().reflectvelocity = reflectvelocity;
                                Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().isReflecting    = true;
                                Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().ReflectConter   = 180;
                            }
                        }

                        AAModGlobalNPC.SpawnBoss(player, mod.NPCType("AkumaA"), false, npc.Center, "", false);
                        if (Main.netMode != NetmodeID.MultiplayerClient)
                        {
                            BaseUtility.Chat(AAMod.Lang.BossChat("AkumaTransition4"), Color.Magenta.R, Color.Magenta.G, Color.Magenta.B);
                        }

                        int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModLoader.GetMod("AAMod").ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer, 0, 0);
                        Main.projectile[b].Center = npc.Center;

                        npc.netUpdate = true;
                        npc.active    = false;
                    }
                }
                return(false);
            }
            return(true);
        }
        public override void AI()
        {
            npc.TargetClosest();
            Player player = Main.player[npc.target];

            MoveToPoint(player.Center - new Vector2(0, 300f));

            if (Vector2.Distance(npc.Center, player.Center) > 2000)
            {
                npc.alpha  = 255;
                npc.Center = player.Center - new Vector2(0, 300f);
            }

            if (Main.netMode != NetmodeID.Server)            //clientside stuff
            {
                npc.frameCounter++;
                if (npc.frameCounter >= 7)
                {
                    npc.frameCounter = 0;
                    npc.frame.Y     += Main.npcTexture[npc.type].Height / 4;
                }

                if (npc.frame.Y > Main.npcTexture[npc.type].Height / 4 * 3)
                {
                    npc.frame.Y = 0;
                }
                if (npc.ai[0] > 375)
                {
                    if (npc.alpha < 0)
                    {
                        npc.alpha = 0;
                    }
                    else
                    {
                        npc.alpha -= 5;
                    }
                    if (npc.scale < 1)
                    {
                        npc.scale += .02f;
                    }
                    else
                    {
                        npc.scale = 1;
                    }
                }
                if (npc.ai[0] >= 375)                 //after he says 'nyeh' on the server, change music on the client
                {
                    music = ModLoader.GetMod("AAMod").GetSoundSlot(SoundType.Music, "Sounds/Music/Yamata2");
                }
                if (npc.ai[0] >= 900)                 //after he says 'as if' on the server, transition color
                {
                    RVal += 5;
                    BVal -= 5;
                    if (RVal <= 90)
                    {
                        BVal = 90;
                    }
                    if (RVal >= 255)
                    {
                        RVal = 255;
                    }
                }
            }
            if (Main.netMode != NetmodeID.MultiplayerClient)
            {
                npc.ai[0]++;

                if (npc.ai[0] == 375)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition1"), new Color(45, 46, 70));
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 650)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition2"), new Color(45, 46, 70));
                    }
                }
                else
                if (npc.ai[0] == 900)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition3"), new Color(45, 46, 70));
                    }
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition7"), Color.PaleVioletRed);
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 1100)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition4"), new Color(146, 30, 68));
                    }
                }
                else
                if (npc.ai[0] >= 1455 && !NPC.AnyNPCs(mod.NPCType("YamataA")))
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("YamataA"), false, npc.Center, "", false);
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition5"), Color.Magenta.R, Color.Magenta.G, Color.Magenta.B);
                    }
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("YamataTransition6"), new Color(146, 30, 68));
                    }

                    int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModLoader.GetMod("AAMod").ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer, 0, 0);
                    Main.projectile[b].Center = npc.Center;

                    for (int proj = 0; proj < 1000; proj++)
                    {
                        if (Main.projectile[proj].active && Main.projectile[proj].friendly && !Main.projectile[proj].hostile)
                        {
                            Main.projectile[proj].hostile  = true;
                            Main.projectile[proj].friendly = false;
                            Vector2 vector = Main.projectile[proj].Center - npc.Center;
                            vector.Normalize();
                            Vector2 reflectvelocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
                            reflectvelocity.Normalize();
                            reflectvelocity *= vector.Length();
                            reflectvelocity += vector * 20f;
                            reflectvelocity.Normalize();
                            reflectvelocity *= vector.Length();
                            if (reflectvelocity.Length() < 20f)
                            {
                                reflectvelocity.Normalize();
                                reflectvelocity *= 20f;
                            }

                            Main.projectile[proj].penetrate = 1;

                            Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().reflectvelocity = reflectvelocity;
                            Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().isReflecting    = true;
                            Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().ReflectConter   = 180;
                        }
                    }

                    Main.PlaySound(ModLoader.GetMod("AAMod").GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/YamataRoar"), npc.position);
                    Vector2 position = npc.Center + (Vector2.One * -20f);
                    int     num84    = 40;
                    int     height3  = num84;
                    for (int num85 = 0; num85 < 3; num85++)
                    {
                        int num86 = Dust.NewDust(position, num84, height3, 240, 0f, 0f, 100, default, 1.5f);
示例#22
0
        public override bool PreAI()
        {
            if (AAConfigClient.Instance.NoBossDialogue)
            {
                npc.TargetClosest();
                Player player = Main.player[npc.target];
                MoveToPoint(player.Center - new Vector2(0, 300f));

                if (Vector2.Distance(npc.Center, player.Center) > 2000)
                {
                    npc.alpha  = 255;
                    npc.Center = player.Center - new Vector2(0, 300f);
                }

                if (Main.netMode != 2) //clientside stuff
                {
                    npc.frameCounter++;
                    if (npc.frameCounter >= 7)
                    {
                        npc.frameCounter = 0;
                        npc.frame.Y     += 52;
                    }
                    if (npc.frame.Y > 52 * 5)
                    {
                        npc.frame.Y = 0;
                    }
                    if (npc.ai[0] > 180)
                    {
                        npc.alpha -= 5;
                        if (npc.alpha < 0)
                        {
                            npc.alpha = 0;
                        }
                    }
                    if (npc.ai[0] >= 180) //after he says 'heh' on the server, change music on the client
                    {
                        music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Akuma2");
                    }
                    if (npc.ai[0] >= 380)
                    {
                        RVal -= 5;
                        BVal += 5;
                        if (RVal <= 0)
                        {
                            RVal = 0;
                        }
                        if (BVal >= 380)
                        {
                            BVal = 255;
                        }
                    }
                }
                if (Main.netMode != 1)
                {
                    npc.ai[0]++;
                    if (npc.ai[0] == 180)
                    {
                        npc.netUpdate = true;
                    }
                    else
                    if (npc.ai[0] >= 600 && !NPC.AnyNPCs(mod.NPCType("AkumaA")))
                    {
                        AAModGlobalNPC.SpawnBoss(player, mod.NPCType("AkumaA"), false, npc.Center, "", false);
                        if (Main.netMode != 1)
                        {
                            BaseUtility.Chat(Lang.BossChat("AkumaTransition4"), Color.Magenta.R, Color.Magenta.G, Color.Magenta.B);
                        }

                        int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer, 0, 0);
                        Main.projectile[b].Center = npc.Center;

                        npc.netUpdate = true;
                        npc.active    = false;
                    }
                }
                return(false);
            }
            return(true);
        }
示例#23
0
        public override void AI()
        {
            npc.TargetClosest();
            Player player = Main.player[npc.target];

            if (Main.netMode != 2)
            {
                if (npc.ai[0] > 175)
                {
                    npc.alpha -= 3;
                    if (npc.alpha < 0)
                    {
                        npc.alpha = 0;
                    }
                }

                if (npc.ai[0] >= 570)
                {
                    music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Greed");
                }
            }
            if (Main.netMode != 1)
            {
                npc.ai[0]++;

                if (npc.ai[0] == 175)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Greed1"), Color.Goldenrod);
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 350)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Greed2"), Color.Goldenrod);
                    }
                }
                else
                if (npc.ai[0] == 500)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Greed3"), Color.Goldenrod);
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 610)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Greed4"), Color.Goldenrod);
                    }
                }
                else
                if (npc.ai[0] >= 755 && !NPC.AnyNPCs(mod.NPCType("Greed")))
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("Greed"), true, npc.Center, Lang.BossChat("GreedName"), false);
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("Greed5"), Color.Goldenrod);
                    }

                    npc.netUpdate = true;
                    npc.active    = false;
                }
            }
        }
示例#24
0
        public override void Update(NPC npc, ref int buffIndex)
        {
            AAModGlobalNPC GNPC = npc.GetGlobalNPC <AAModGlobalNPC>();

            GNPC.Spear = true;
        }
示例#25
0
        public override void AI()
        {
            Vector2 Origin    = new Vector2((int)(Main.maxTilesX * 0.65f), 100) * 16;
            Vector2 Acropolis = new Vector2(Origin.X + (80 * 16), Origin.Y + (79 * 16));

            npc.TargetClosest();
            if (Main.netMode != NetmodeID.MultiplayerClient)
            {
                if (Vector2.Distance(npc.Center, Acropolis) < 5 && Main.netMode != NetmodeID.MultiplayerClient)
                {
                    npc.velocity.X   *= 0;
                    npc.ai[1]         = 1;
                    npc.noTileCollide = false;
                    npc.noGravity     = false;
                    npc.netUpdate     = true;
                }
                if (npc.ai[1] == 0)
                {
                    MoveToPoint(Acropolis);
                }
                else
                {
                    npc.ai[0]++;
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        if (npc.ai[2] == 0)
                        {
                            if (npc.ai[0] == 120)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat1"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 240)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat2"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 360)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat("...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 480)
                            {
                                music = ModLoader.GetMod("AAMod").GetSoundSlot(SoundType.Music, "Sounds/Music/AthenaA");
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat3"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 600)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat4"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 720)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat5"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 840)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat6"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 960)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat7"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] == 1080)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat8"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else
                            if (npc.ai[0] >= 1200)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("AthenaDefeat9"), Color.CornflowerBlue);
                                }
                                for (int proj = 0; proj < 1000; proj++)
                                {
                                    if (Main.projectile[proj].active && Main.projectile[proj].friendly && !Main.projectile[proj].hostile)
                                    {
                                        Main.projectile[proj].hostile  = true;
                                        Main.projectile[proj].friendly = false;
                                        Vector2 vector = Main.projectile[proj].Center - npc.Center;
                                        vector.Normalize();
                                        Vector2 reflectvelocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101));
                                        reflectvelocity.Normalize();
                                        reflectvelocity *= vector.Length();
                                        reflectvelocity += vector * 20f;
                                        reflectvelocity.Normalize();
                                        reflectvelocity *= vector.Length();
                                        if (reflectvelocity.Length() < 20f)
                                        {
                                            reflectvelocity.Normalize();
                                            reflectvelocity *= 20f;
                                        }

                                        Main.projectile[proj].penetrate = 1;

                                        Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().reflectvelocity = reflectvelocity;
                                        Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().isReflecting    = true;
                                        Main.projectile[proj].GetGlobalProjectile <AAModEXAIGlobalProjectile>().ReflectConter   = 180;
                                    }
                                }
                                AAModGlobalNPC.SpawnBoss(Main.player[npc.target], mod.NPCType("AthenaA"), false, npc.Center);

                                int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, ModLoader.GetMod("AAMod").ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer);
                                Main.projectile[b].Center = npc.Center;

                                npc.active    = false;
                                npc.netUpdate = true;
                            }
                        }
                        else
                        {
                            if (npc.ai[0] == 120)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat("...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 240)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat1"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 360)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat2"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 480)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat("...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 600)
                            {
                                string s = "";
                                if (Main.ActivePlayersCount > 1)
                                {
                                    s = AAMod.Lang.BossChat("Athena2Defeat4");
                                }
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat3") + s + "...", Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 720)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat5"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 840)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat6"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 960)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat7"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] == 1080)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat8"), Color.CornflowerBlue);
                                }
                                npc.netUpdate = true;
                            }
                            else if (npc.ai[0] >= 1200)
                            {
                                if (Main.netMode != NetmodeID.MultiplayerClient)
                                {
                                    BaseUtility.Chat(AAMod.Lang.BossChat("Athena2Defeat9"), Color.CornflowerBlue);
                                }
                                AAModGlobalNPC.SpawnBoss(Main.player[npc.target], mod.NPCType("AthenaFlee"), false, npc.Center);
                                npc.active    = false;
                                npc.netUpdate = true;
                            }
                        }
                    }
                }
            }
        }
示例#26
0
        public static void SpawnBoss(Player player, int bossType, bool spawnMessage = true, Vector2 Pos = default, int overrideDirection = 0, int overrideDirectionY = 0, string overrideDisplayName = "", bool namePlural = false)
        {
            Vector2 npcCenter = Pos;

            AAModGlobalNPC.SpawnBoss(player, bossType, spawnMessage, npcCenter, overrideDisplayName, namePlural);
        }
示例#27
0
 public override bool UseItem(Player player)
 {
     AAModGlobalNPC.SpawnBoss(player, mod.NPCType("SerpentHead"), true, 0, 0, Language.GetTextValue("Mods.AAMod.Common.SubzeroSerpent"), false);
     Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0);
     return(true);
 }
示例#28
0
        public override void AI()
        {
            npc.TargetClosest();
            Player player = Main.player[npc.target];

            MoveToPoint(player.Center - new Vector2(0, 300f));

            if (Vector2.Distance(npc.Center, player.Center) > 2000)
            {
                npc.alpha  = 255;
                npc.Center = player.Center - new Vector2(0, 300f);
            }

            if (Main.netMode != 2)            //clientside stuff
            {
                npc.frameCounter++;
                if (npc.frameCounter >= 7)
                {
                    npc.frameCounter = 0;
                    npc.frame.Y     += Main.npcTexture[npc.type].Height / 4;
                }

                if (npc.frame.Y > Main.npcTexture[npc.type].Height / 4 * 3)
                {
                    npc.frame.Y = 0;
                }
                if (npc.ai[0] > 375)
                {
                    if (npc.alpha < 0)
                    {
                        npc.alpha = 0;
                    }
                    else
                    {
                        npc.alpha -= 5;
                    }
                    if (npc.scale < 1)
                    {
                        npc.scale += .02f;
                    }
                    else
                    {
                        npc.scale = 1;
                    }
                }
                if (npc.ai[0] >= 375)                 //after he says 'nyeh' on the server, change music on the client
                {
                    music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Yamata2");
                }
                if (npc.ai[0] >= 900)                 //after he says 'as if' on the server, transition color
                {
                    RVal += 5;
                    BVal -= 5;
                    if (RVal <= 90)
                    {
                        BVal = 90;
                    }
                    if (RVal >= 255)
                    {
                        RVal = 255;
                    }
                }
            }
            if (Main.netMode != 1)
            {
                npc.ai[0]++;

                if (npc.ai[0] == 375)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition1"), new Color(45, 46, 70));
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 650)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition2"), new Color(45, 46, 70));
                    }
                }
                else
                if (npc.ai[0] == 900)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition3"), new Color(45, 46, 70));
                    }
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition7"), Color.PaleVioletRed);
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 1100)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition4"), new Color(146, 30, 68));
                    }
                }
                else
                if (npc.ai[0] >= 1455 && !NPC.AnyNPCs(mod.NPCType("YamataA")))
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("YamataA"), false, npc.Center, "", false);
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition5"), Color.Magenta.R, Color.Magenta.G, Color.Magenta.B);
                    }
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("YamataTransition6"), new Color(146, 30, 68));
                    }

                    int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer, 0, 0);
                    Main.projectile[b].Center = npc.Center;

                    Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Sounds/YamataRoar"), npc.position);
                    Vector2 position = npc.Center + (Vector2.One * -20f);
                    int     num84    = 40;
                    int     height3  = num84;
                    for (int num85 = 0; num85 < 3; num85++)
                    {
                        int num86 = Dust.NewDust(position, num84, height3, 240, 0f, 0f, 100, default, 1.5f);
        public override void AI()
        {
            npc.TargetClosest();

            Player player = Main.player[npc.target];

            MoveToPoint(player.Center - new Vector2(0, 300f));

            if (Main.netMode != NetmodeID.Server) //clientside stuff
            {
                if (npc.ai[0] > 175)
                {
                    npc.alpha -= 3;
                    if (npc.alpha < 0)
                    {
                        npc.alpha = 0;
                    }
                }
            }

            if (Main.netMode != NetmodeID.MultiplayerClient)
            {
                npc.ai[0]++;

                if (npc.ai[0] == 175)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("GreedTransition1"), Color.Goldenrod);
                    }
                    music = ModLoader.GetMod("AAMod").GetSoundSlot(SoundType.Music, "Sounds/Music/GreedA");

                    npc.netUpdate = true;
                }
                else if (npc.ai[0] == 350)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("GreedTransition2"), Color.Goldenrod);
                    }
                }
                else if (npc.ai[0] == 500)
                {
                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("GreedTransition3"), Color.Goldenrod);
                    }

                    npc.netUpdate = true;
                }
                else if (npc.ai[0] >= 610)
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("GreedA"), true, npc.Center, AAMod.Lang.BossChat("GreedAName"), false);

                    if (Main.netMode != NetmodeID.MultiplayerClient)
                    {
                        BaseUtility.Chat(AAMod.Lang.BossChat("GreedTransition4"), Color.Goldenrod);
                    }

                    npc.netUpdate = true;
                    npc.active    = false;
                }
            }
        }
示例#30
0
        public override void AI()
        {
            npc.TargetClosest();
            Player player = Main.player[npc.target];

            MoveToPoint(player.Center - new Vector2(0, 300f));

            if (Vector2.Distance(npc.Center, player.Center) > 2000)
            {
                npc.alpha  = 255;
                npc.Center = player.Center - new Vector2(0, 300f);
            }

            if (Main.netMode != 2)            //clientside stuff
            {
                npc.frameCounter++;
                if (npc.frameCounter >= 7)
                {
                    npc.frameCounter = 0;
                    npc.frame.Y     += 52;
                }
                if (npc.frame.Y > 52 * 5)
                {
                    npc.frame.Y = 0;
                }
                if (npc.ai[0] > 300)
                {
                    npc.alpha -= 5;
                    if (npc.alpha < 0)
                    {
                        npc.alpha = 0;
                    }
                }
                if (npc.ai[0] >= 375)                 //after he says 'heh' on the server, change music on the client
                {
                    music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Akuma2");
                }
                if (npc.ai[0] >= 660)                 //after 660 on the server, transition color
                {
                    RVal -= 5;
                    BVal += 5;
                    if (RVal <= 0)
                    {
                        RVal = 0;
                    }
                    if (BVal >= 255)
                    {
                        BVal = 255;
                    }
                }
            }
            if (Main.netMode != 1)
            {
                npc.ai[0]++;
                if (npc.ai[0] == 300)
                {
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 375)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("AkumaTransition1"), new Color(180, 41, 32));
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 560)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("AkumaTransition2"), new Color(180, 41, 32));
                    }
                }
                else
                if (npc.ai[0] == 660)                //sync so the color transition occurs
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("AkumaTransition6"), new Color(175, 75, 255));
                    }
                    npc.netUpdate = true;
                }
                else
                if (npc.ai[0] == 900)
                {
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("AkumaTransition3"), Color.DeepSkyBlue);
                    }
                }
                else
                if (npc.ai[0] >= 1100 && !NPC.AnyNPCs(mod.NPCType("AkumaA")))
                {
                    AAModGlobalNPC.SpawnBoss(player, mod.NPCType("AkumaA"), false, npc.Center, "", false);
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("AkumaTransition4"), Color.Magenta.R, Color.Magenta.G, Color.Magenta.B);
                    }
                    if (Main.netMode != 1)
                    {
                        BaseUtility.Chat(Lang.BossChat("AkumaTransition5"), Color.DeepSkyBlue.R, Color.DeepSkyBlue.G, Color.DeepSkyBlue.B);
                    }

                    int b = Projectile.NewProjectile(npc.Center.X, npc.Center.Y, 0f, 0f, mod.ProjectileType("ShockwaveBoom"), 0, 1, Main.myPlayer, 0, 0);
                    Main.projectile[b].Center = npc.Center;

                    npc.netUpdate = true;
                    npc.active    = false;
                }
            }
        }