public override bool NewRightClick(int i, int j) { for (int z = 0; z < Main.maxNPCs; z++) { if (Main.npc[z].active && Main.npc[z].boss) { string text1 = "Unable to use while a Boss is alive"; Color textColor1 = Color.Purple; ExtinctionUtils.DisplayLocalText(text1, new Color?(textColor1)); return(false); } } if (Main.netMode != NetmodeID.MultiplayerClient) { Main.time = 0; Main.dayTime = !Main.dayTime; if (Main.dayTime && ++Main.moonPhase >= 8) { Main.moonPhase = 0; } ExtinctionNet.SyncMultiplayer(); } Main.PlaySound(SoundID.Item60); return(true); }
public override void NPCLoot() { if (!ExtinctionWorld.brillianceOreGen) { string text = "A light from the sky spread trough your world."; Color textColor = Color.Yellow; ExtinctionUtils.DisplayLocalText(text, new Color?(textColor)); ExtinctionWorld.brillianceOreGen = true; for (double num = 0.0; num < (Main.maxTilesX - 200) * (Main.maxTilesY - 150 - (int)Main.rockLayer) / 8000.0; ++num) { WorldGen.OreRunner(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next((int)Main.rockLayer, Main.maxTilesY - 150), WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(5, 8), (ushort)ModContent.TileType <BrillianceOreTile>()); } ExtinctionNet.SyncMultiplayer(); } if (Main.expertMode) { npc.DropBossBags(); return; } int choice = Main.rand.Next(4); Item.NewItem(npc.getRect(), ModContent.ItemType <BrillianceOre>(), Main.rand.Next(15, 26)); if (choice == 0) { Item.NewItem(npc.getRect(), ModContent.ItemType <RuneBlade>()); } if (choice == 1) { Item.NewItem(npc.getRect(), ModContent.ItemType <PossessedPike>()); } }
public override bool UseItem(Player player) { if (Main.netMode == NetmodeID.MultiplayerClient) { return(true); } if (!Main.expertMode) { Main.expertMode = true; string text1 = "Expert Mode is now ON"; Color textColor1 = Color.Purple; ExtinctionUtils.DisplayLocalText(text1, new Color?(textColor1)); } else { Main.expertMode = false; string text2 = "Expert Mode is now OFF"; Color textColor2 = Color.Purple; ExtinctionUtils.DisplayLocalText(text2, new Color?(textColor2)); } ExtinctionNet.SyncMultiplayer(); Main.PlaySound(SoundID.Roar, player.Center, 0); return(true); }
public override bool UseItem(Player player) { if (Main.netMode == NetmodeID.MultiplayerClient) { return(true); } if (!ExtinctionWorld.ExterminatorMode) { ExtinctionWorld.ExterminatorMode = true; Main.expertMode = true; string text1 = "The unholy souls triggers upon your world..."; Color textColor1 = Color.Crimson; ExtinctionUtils.DisplayLocalText(text1, new Color?(textColor1)); } else { ExtinctionWorld.ExterminatorMode = false; string text2 = "The virtuous Ancients bless your path."; Color textColor2 = Color.Crimson; ExtinctionUtils.DisplayLocalText(text2, new Color?(textColor2)); } ExtinctionNet.SyncMultiplayer(); Main.PlaySound(SoundID.Roar, player.Center, 0); return(true); }
public override void NPCLoot(NPC npc) { switch (npc.type) { case NPCID.SkeletronHead: Item.NewItem(npc.getRect(), ItemID.Bone, Main.rand.Next(10, 21)); break; case NPCID.Demon: case NPCID.VoodooDemon: case NPCID.BoneSerpentHead: if (Main.rand.NextBool(3)) { Item.NewItem(npc.getRect(), ModContent.ItemType <MagmaCrystal>(), Main.rand.Next(2, 6)); if (Main.hardMode) { Item.NewItem(npc.getRect(), ModContent.ItemType <MagmaCrystal>(), Main.rand.Next(4, 7)); } } break; case NPCID.Necromancer: case NPCID.RaggedCaster: case NPCID.DiabolistRed: case NPCID.DiabolistWhite: if (Main.rand.NextBool(8)) { Item.NewItem(npc.getRect(), ModContent.ItemType <HopelessSoulsTome>()); } break; case NPCID.Plantera: if (!ExtinctionWorld.chargedGraniteGen) { string text = "The Granite empowers."; Color textColor = Color.Blue; ExtinctionUtils.DisplayLocalText(text, new Color?(textColor)); ExtinctionWorld.chargedGraniteGen = true; for (double num = 0.0; num < (Main.maxTilesX - 200) * (Main.maxTilesY - 150 - (int)Main.rockLayer) / 8000.0; ++num) { WorldGen.OreRunner(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next((int)Main.rockLayer, Main.maxTilesY - 150), WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(5, 8), (ushort)ModContent.TileType <ChargedGraniteTile>()); } ExtinctionNet.SyncMultiplayer(); } if (!ExtinctionWorld.ancientMarbleGen) { string text = "The Ancient Marble recovers its essence."; Color textColor = Color.Silver; ExtinctionUtils.DisplayLocalText(text, new Color?(textColor)); ExtinctionWorld.ancientMarbleGen = true; for (double num = 0.0; num < (Main.maxTilesX - 200) * (Main.maxTilesY - 150 - (int)Main.rockLayer) / 8000.0; ++num) { WorldGen.OreRunner(WorldGen.genRand.Next(100, Main.maxTilesX - 100), WorldGen.genRand.Next((int)Main.rockLayer, Main.maxTilesY - 150), WorldGen.genRand.Next(5, 8), WorldGen.genRand.Next(5, 8), (ushort)ModContent.TileType <AncientMarbleTile>()); } ExtinctionNet.SyncMultiplayer(); } break; case NPCID.WallofFlesh: if (Main.rand.NextBool(8)) { Item.NewItem(npc.getRect(), ModContent.ItemType <ZwillCrossblade>()); } break; case NPCID.GraniteFlyer: case NPCID.GraniteGolem: if (Main.rand.NextBool(4)) { Item.NewItem(npc.getRect(), ModContent.ItemType <ElementalGraniteCharge>(), Main.rand.Next(4, 9)); } break; case NPCID.Zombie: case NPCID.SlimedZombie: case NPCID.ZombieRaincoat: case NPCID.FemaleZombie: if (Main.rand.NextBool(6)) { Item.NewItem(npc.getRect(), ModContent.ItemType <Nugget>(), Main.rand.Next(1, 3)); } break; case NPCID.Medusa: case NPCID.GreekSkeleton: if (Main.rand.NextBool(4)) { Item.NewItem(npc.getRect(), ModContent.ItemType <ElementalMarblePieces>(), Main.rand.Next(4, 9)); } break; } }