コード例 #1
0
        public override void NPCLoot()
        {
            if (Main.netMode != NetmodeID.SinglePlayer || !SGAmod.SpaceBossActive)
            {
                Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <StarMetalMold>());
                //Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <Glowrock>(),(int)(Main.rand.Next(60,100)*(Main.expertMode ? 0.6 : 1)));
                //Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModContent.ItemType <OverseenCrystal>(), (int)(Main.rand.Next(25, 60) * (Main.expertMode ? 0.6 : 1)));
            }

            if (Main.expertMode)
            {
                Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("TPDCPU"));
            }

            List <int> types = new List <int>();

            types.Insert(types.Count, ItemID.Ectoplasm);
            types.Insert(types.Count, ItemID.ShroomiteBar); types.Insert(types.Count, ItemID.ChlorophyteBar); types.Insert(types.Count, ItemID.SpectreBar);

            DropHelper.DropFixedItemQuanity(types.ToArray(), Main.expertMode ? 100 : 50, npc.Center);

            /*
             * for (int f = 0; f < (Main.expertMode ? 100 : 50); f = f + 1)
             * {
             *      Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, types[Main.rand.Next(0, types.Count)]);
             * }*/

            Achivements.SGAAchivements.UnlockAchivement("TPD", Main.LocalPlayer);
            if (!SGAWorld.downedTPD)
            {
                SGAWorld.downedTPD = true;
                //SgaLib.Chat("You have regained the knowledge to craft a furnace!",150, 150, 70);
            }
        }
コード例 #2
0
        public override void NPCLoot()
        {
            /*WorldGen.oreTier1 = 107;
            *  WorldGen.oreTier3 = 111;*/


            List <int> types = new List <int>();

            types.Insert(types.Count, mod.ItemType("WraithFragment4"));
            int ammount = 0;

            for (ammount = 0; ammount < 1; ammount += 1)
            {
                types.Insert(types.Count, ItemID.Hellstone);
            }
            for (ammount = 0; ammount < 2; ammount += 1)
            {
                types.Insert(types.Count, SGAmod.WorldOres[4, SGAWorld.oretypeshardmode[0] == TileID.Cobalt ? 1 : 0]);
            }
            for (ammount = 0; ammount < 2; ammount += 1)
            {
                types.Insert(types.Count, SGAmod.WorldOres[5, SGAWorld.oretypeshardmode[1] == TileID.Mythril ? 1 : 0]);
            }
            for (ammount = 0; ammount < 1; ammount += 1)
            {
                types.Insert(types.Count, ItemID.SoulofLight);
            }
            for (ammount = 0; ammount < 1; ammount += 1)
            {
                types.Insert(types.Count, SGAmod.WorldOres[6, SGAWorld.oretypeshardmode[2] == TileID.Adamantite ? 1 : 0]);
            }
            for (ammount = 0; ammount < 1; ammount += 1)
            {
                types.Insert(types.Count, ItemID.SoulofNight);
            }

            DropHelper.DropFixedItemQuanity(types.ToArray(), (Main.expertMode ? 100 : 50) * (NPC.downedMoonlord ? 2 : 1), npc.Center);

            /*for (int f = 0; f < (Main.expertMode ? 100 : 50); f = f + 1)
             * {
             *      Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, types[Main.rand.Next(0, types.Count)]);
             * }*/

            Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("WraithFragment4"), Main.expertMode ? 25 : 10);

            Achivements.SGAAchivements.UnlockAchivement("Cobalt Wraith", Main.LocalPlayer);
            if (SGAWorld.downedWraiths < 2)
            {
                SGAWorld.downedWraiths = 2;
            }
        }
コード例 #3
0
        public override void OpenBossBag(Player player)
        {
            List <int> types = new List <int>();

            types.Insert(types.Count, ItemID.SharkFin);
            types.Insert(types.Count, ItemID.Seashell);
            types.Insert(types.Count, ItemID.Starfish);
            types.Insert(types.Count, ItemID.SoulofFlight);
            types.Insert(types.Count, ItemID.Coral);

            /*
             * for (int f = 0; f < (Main.expertMode ? 150 : 75); f = f + 1)
             * {
             *      player.QuickSpawnItem(types[Main.rand.Next(0, types.Count)]);
             * }*/

            DropHelper.DropFixedItemQuanity(types.ToArray(), Main.expertMode ? 150 : 75, Vector2.Zero, player);

            player.TryGettingDevArmor();
            int lLoot = (Main.rand.Next(0, 4));

            player.QuickSpawnItem(mod.ItemType("SerratedTooth"));
            if (lLoot == 0)
            {
                player.QuickSpawnItem(mod.ItemType("SkytoothStorm"));
            }
            if (lLoot == 1)
            {
                player.QuickSpawnItem(mod.ItemType("Jaws"));
            }
            if (lLoot == 2)
            {
                player.QuickSpawnItem(mod.ItemType("SnappyShark"));
                player.QuickSpawnItem(mod.ItemType("SharkTooth"), 150);
            }
            if (lLoot == 3)
            {
                player.QuickSpawnItem(mod.ItemType("SharkBait"), Main.rand.Next(60, 150));
            }
            player.QuickSpawnItem(mod.ItemType("SharkTooth"), Main.rand.Next(100, 200));
        }
コード例 #4
0
        public override void NPCLoot()
        {
            List <int> types = new List <int>();

            /*WorldGen.CopperTierOre = 7;
             * WorldGen.IronTierOre = 6;
             * WorldGen.SilverTierOre = 9;
             * WorldGen.GoldTierOre = 8;*/

            if (SGAWorld.craftwarning < 30)
            {
                Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("TrueCopperWraithNotch"));
            }
            if (Main.expertMode)
            {
                Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("WraithTargetingGamepad"));
            }

            int shardtype = ModContent.ItemType <WraithFragment>();

            /*if (SGAWorld.WorldIsTin)
             * {
             *      shardtype = mod.ItemType("WraithFragment2");
             *      //npc.GivenName = "Tin Wraith";
             * }*/



            types.Insert(types.Count, shardtype);
            types.Insert(types.Count, SGAmod.WorldOres[0, SGAWorld.oretypesprehardmode[0] == TileID.Copper ? 1 : 0]); types.Insert(types.Count, SGAmod.WorldOres[0, SGAWorld.oretypesprehardmode[0] == TileID.Copper ? 1 : 0]);
            types.Insert(types.Count, SGAmod.WorldOres[1, SGAWorld.oretypesprehardmode[1] == TileID.Iron ? 1 : 0]); types.Insert(types.Count, SGAmod.WorldOres[1, SGAWorld.oretypesprehardmode[1] == TileID.Iron ? 1 : 0]);
            types.Insert(types.Count, SGAmod.WorldOres[2, SGAWorld.oretypesprehardmode[2] == TileID.Silver ? 1 : 0]); types.Insert(types.Count, SGAmod.WorldOres[2, SGAWorld.oretypesprehardmode[2] == TileID.Silver ? 1 : 0]);
            types.Insert(types.Count, SGAmod.WorldOres[3, SGAWorld.oretypesprehardmode[3] == TileID.Gold ? 1 : 0]);

            DropHelper.DropFixedItemQuanity(types.ToArray(), (Main.expertMode ? 50 : 30) * (Main.hardMode ? 2 : 1), npc.Center);



            if (shardtype > 0)
            {
                Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, shardtype, (Main.expertMode ? 60 : 30) * (Main.hardMode ? 2 : 1));
            }

            /*
             * WeightedItemSet[] sets = {
             *                              new WeightedItemSet(new (int,int)[]{ (ItemID.CopperPlating, 15),(ItemID.CopperBar, 25)  }),
             * new WeightedItemSet(new (int,int)[]{ (ItemID.SunStone, 1) }),
             * new WeightedItemSet(new (int,int)[]{ (ItemID.MoonStone, 1) }),
             * new WeightedItemSet(new (int,int)[]{ (ItemID.FragmentNebula, 10),(ItemID.FragmentSolar, 10),(ItemID.FragmentStardust, 10),(ItemID.FragmentVortex, 10) },3),
             *
             *      };
             *
             * DropHelper.DropFromItemSets(npc.Center, sets,2);
             */



            /*for (int f = 0; f < (Main.expertMode ? 50 : 30); f += 1)
             * {
             *      Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, types[Main.rand.Next(0, types.Count)]);
             * }*/

            Achivements.SGAAchivements.UnlockAchivement("Copper Wraith", Main.LocalPlayer);
            if (SGAWorld.downedWraiths < 1)
            {
                SGAWorld.downedWraiths = 1;
                Idglib.Chat("You may now craft bars without being attacked", 150, 150, 70);
            }
        }