Пример #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 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"));
            }
        }