Beispiel #1
0
 public override void NPCLoot()
 {
     {
         if (Main.rand.Next(2) == 0 && !NPC.downedMechBossAny)
         {
             Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("PearlFragment"), 1);
         }
         {
             if (Main.rand.Next(50) == 0)
             {
                 Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BabyClamper"), 1);
             }
         }
     }
     InvasionWorld.invasionSize -= 1;
     if (InvasionWorld.invasionSize < 0)
     {
         InvasionWorld.invasionSize = 0;
     }
     if (Main.netMode != 1)
     {
         InvasionHandler.ReportInvasionProgress(InvasionWorld.invasionSizeStart - InvasionWorld.invasionSize, InvasionWorld.invasionSizeStart, 0);
     }
     if (Main.netMode != 2)
     {
         return;
     }
     NetMessage.SendData(78, -1, -1, null, InvasionWorld.invasionProgress, (float)InvasionWorld.invasionProgressMax, (float)Main.invasionProgressIcon, 0.0f, 0, 0, 0);
 }
 public override void NPCLoot()
 {
     {
         {
             Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DepthShard"), 1);
         }
         {
             if (Main.rand.Next(50) == 0)
             {
                 Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("Clauncher"), 1);
             }
         }
     }
     InvasionWorld.invasionSize -= 1;
     if (InvasionWorld.invasionSize < 0)
     {
         InvasionWorld.invasionSize = 0;
     }
     if (Main.netMode != 1)
     {
         InvasionHandler.ReportInvasionProgress(InvasionWorld.invasionSizeStart - InvasionWorld.invasionSize, InvasionWorld.invasionSizeStart, 0);
     }
     if (Main.netMode != 2)
     {
         return;
     }
     NetMessage.SendData(78, -1, -1, null, InvasionWorld.invasionProgress, (float)InvasionWorld.invasionProgressMax, (float)Main.invasionProgressIcon, 0.0f, 0, 0, 0);
 }
Beispiel #3
0
 public override void NPCLoot()
 {
     {
         {
             Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("PearlFragment"), 1);
         }
         if (Main.rand.Next(25) == 0)
         {
             Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("BlackTide"), 1);
         }
     }
     {
         InvasionWorld.invasionSize -= 2;
         if (InvasionWorld.invasionSize < 0)
         {
             InvasionWorld.invasionSize = 0;
         }
         if (Main.netMode != 1)
         {
             InvasionHandler.ReportInvasionProgress(InvasionWorld.invasionSizeStart - InvasionWorld.invasionSize, InvasionWorld.invasionSizeStart, 0);
         }
         if (Main.netMode != 2)
         {
             return;
         }
         NetMessage.SendData(78, -1, -1, "", InvasionWorld.invasionProgress, (float)InvasionWorld.invasionProgressMax, (float)Main.invasionProgressIcon, 0.0f, 0, 0, 0);
     }
 }
 public override void NPCLoot()
 {
     {
         Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DepthShard"), 1);
     }
     {
         string[] lootTable = { "FierySoul", "LavaStaff", "LavaSpear", };
         int      loot      = Main.rand.Next(lootTable.Length);
         Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType(lootTable[loot]));
     }
     InvasionWorld.invasionSize -= 1;
     if (InvasionWorld.invasionSize < 0)
     {
         InvasionWorld.invasionSize = 0;
     }
     if (Main.netMode != 1)
     {
         InvasionHandler.ReportInvasionProgress(InvasionWorld.invasionSizeStart - InvasionWorld.invasionSize, InvasionWorld.invasionSizeStart, 0);
     }
     if (Main.netMode != 2)
     {
         return;
     }
     NetMessage.SendData(78, -1, -1, null, InvasionWorld.invasionProgress, (float)InvasionWorld.invasionProgressMax, (float)Main.invasionProgressIcon, 0.0f, 0, 0, 0);
 }
Beispiel #5
0
 public override bool UseItem(Player player)
 {
     InvasionHandler.StartCustomInvasion(SpiritMod.customEvent);
     return(true);
 }