public override bool CanUseItem(Player player) { if (player.ZoneGlowshroom) { return(true); } if (!player.ZoneGlowshroom) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ConfusingMushroomFalse1"), Color.SkyBlue, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <NPCs.Bosses.FeudalFungus.FeudalFungus>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ConfusingMushroomFalse2"), Color.SkyBlue, false); } } return(false); } return(false); }
public override bool UseItem(Player player) { if (Main.netMode == 0) { if (Main.netMode != 1) { 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) { 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); }
public override bool CanUseItem(Player player) { if (!player.ZoneDesert) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DjinnLampDesertFalse1"), Color.Goldenrod.R, Color.Goldenrod.G, Color.Goldenrod.B, false); } } return(false); } if (NPC.AnyNPCs(mod.NPCType("Djinn"))) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.DjinnLampDesertFalse2"), Color.Goldenrod.R, Color.Goldenrod.G, Color.Goldenrod.B, false); } } return(false); } return(true); }
public override bool NewRightClick(int i, int j) { Player player = Main.LocalPlayer; int type = ModContent.ItemType <Items.BossSummons.WormIdol>(); bool Worms = NPC.AnyNPCs(ModContent.NPCType <WormSpawn>()); if (BasePlayer.HasItem(player, type, 1) && !Worms) { if (AAWorld.StarActive && AAWorld.GravActive) { for (int m = 0; m < 50; m++) { Item item = player.inventory[m]; if (item != null && item.type == type && item.stack >= 1) { item.stack--; player.QuickSpawnItem(mod.ItemType("EquinoxWorm")); if (!AAWorld.WormActive) { BaseUtility.Chat(Lang.TheEquinox("WormAltarOK"), new Color(75, 175, 255)); SpawnBoss(player, ModContent.NPCType <WormSpawn>(), false, player.Center); } } } } else { BaseUtility.Chat(Lang.TheEquinox("WormAltar"), new Color(75, 175, 255)); } } return(true); }
public override bool NewRightClick(int i, int j) { Player player = Main.LocalPlayer; Tile tile = Main.tile[i, j]; int spawnX = i - (tile.frameX / 18); int spawnY = j + 2; spawnX += tile.frameX >= 72 ? 5 : 2; if (tile.frameY % 38 != 0) { spawnY--; } player.FindSpawn(); if (player.SpawnX == spawnX && player.SpawnY == spawnY) { player.RemoveSpawn(); if (Main.netMode != 1) { BaseUtility.Chat(Lang.TilesInfo("Spawnpointremoved"), 255, 240, 20, false); } } else if (Player.CheckSpawn(spawnX, spawnY)) { player.ChangeSpawn(spawnX, spawnY); if (Main.netMode != 1) { BaseUtility.Chat(Lang.TilesInfo("Spawnpointset"), 255, 240, 20, false); } } return(true); }
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; } }
public override void BossLoot(ref string name, ref int potionType) { if (Main.expertMode) { potionType = ItemID.SuperHealingPotion; } else { if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("YamataA5"), new Color(146, 30, 68)); } } if (!AAWorld.downedYamata) { if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("YamataA2"), new Color(146, 30, 68)); } if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("YamataA3"), Color.Indigo); } } else { if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("YamataA4"), new Color(146, 30, 68)); } } }
// We use the CanUseItem hook to prevent a player from using this item while the boss is present in the world. public override bool CanUseItem(Player player) { if (player.GetModPlayer <AAPlayer>(mod).ZoneVoid) { if (NPC.AnyNPCs(mod.NPCType("Zero"))) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("ERR0R. ZER0 UNIT ALREADY ACTIVE. PLEASE TRY AGAIN LATER.", new Color(255, 0, 0), false); } return(false); } if (NPC.AnyNPCs(mod.NPCType("ZeroAwakened"))) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("ERR0R. ZER0 UNIT ALREADY ACTIVE. PLEASE TRY AGAIN LATER.", new Color(255, 0, 0), false); } return(false); } return(true); } if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("ERR0R. PLAYER.GETM0DPLAYER<AAPLAYER>(M0D).Z0NEV0ID == FALSE. PLEASE TRY AGAIN LATER.", new Color(255, 0, 0), false); } return(false); }
public override bool CanUseItem(Player player) { if (NPC.AnyNPCs(ModContent.NPCType <GripOfChaosBlue>()) || NPC.AnyNPCs(ModContent.NPCType <GripOfChaosRed>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.InterestingClawFalse1"), Color.Indigo, false); } } return(false); } if (Main.dayTime) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.InterestingClawFalse2"), Color.Indigo, false); } } return(false); } return(true); }
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); }
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); }
public override bool CanUseItem(Player player) { if (!Main.dayTime) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.IntimidatingMushroomFalse1"), new Color(216, 110, 40), false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <MushroomMonarch>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.IntimidatingMushroomFalse2"), new Color(216, 110, 40), false); } } return(false); } return(true); }
public override void NPCLoot() { Dead = true; if (!Tag) { npc.DropLoot(Items.Vanity.Mask.YamataMask.type, 1f / 7f); if (!Main.expertMode) { AAWorld.downedYamata = true; npc.DropLoot(mod.ItemType("DreadScale"), 20, 30); string[] lootTable = { "Flairdra", "Crescent", "Hydraslayer", "AbyssArrow", "HydraStabber", "MidnightWrath", "YamataTerratool" }; int loot = Main.rand.Next(lootTable.Length); npc.DropLoot(mod.ItemType(lootTable[loot])); npc.DropLoot(Items.Boss.Yamata.YamataTrophy.type, 1f / 10); if (Main.netMode != 1) BaseUtility.Chat(Lang.BossChat("Yamata1"), new Color(45, 46, 70)); npc.DropLoot(Items.Vanity.Mask.YamataMask.type, 1f / 7); if (!AAWorld.downedYamata) { if (Main.netMode != 1) BaseUtility.Chat(Lang.BossChat("Yamata2"), Color.Indigo); } } if (Main.expertMode) { int npcID = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("YamataTransition"), 0, 0, 0, 0, 0, npc.target); Main.npc[npcID].Center = npc.Center; Main.npc[npcID].netUpdate2 = true; Main.npc[npcID].netUpdate = true; } npc.value = 0f; npc.boss = false; } }
public override bool CanUseItem(Player player) { if (!player.ZoneGlowshroom) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ToadstoolFalse1"), Color.Blue, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <TruffleToad>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ToadstoolFalse2"), Color.Blue, false); } } return(false); } return(true); }
public override bool CanUseItem(Player player) { if (!Main.dayTime) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("The bell rings on deaf ears. The dragons are asleep now.", Color.DarkOrange.R, Color.DarkOrange.G, Color.DarkOrange.B, false); } return(false); } if (player.GetModPlayer <AAPlayer>(mod).ZoneInferno) { if (NPC.AnyNPCs(mod.NPCType("Broodmother"))) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("The Broodmother has already been called", Color.DarkOrange.R, Color.DarkOrange.G, Color.DarkOrange.B, false); } return(false); } return(true); } if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("The bell rings on deaf ears. The dragons are not here.", Color.DarkOrange.R, Color.DarkOrange.G, Color.DarkOrange.B, false); } return(false); }
public override bool CanUseItem(Player player) { if (Main.dayTime) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("Nothing is coming. The creatures of the Mire sleep.", Color.Indigo.R, Color.Indigo.G, Color.Indigo.B, false); } return(false); } if (player.GetModPlayer <AAPlayer>(mod).ZoneMire) { if (NPC.AnyNPCs(mod.NPCType("Hydra"))) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("The Hydra wants that food.", Color.Indigo.R, Color.Indigo.G, Color.Indigo.B, false); } return(false); } return(true); } if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("Nothing is coming. Now you look dumb holding out this smelly ball of gunk.", Color.Indigo.R, Color.Indigo.G, Color.Indigo.B, false); } return(false); }
public override void NPCLoot() { int Ashe = NPC.CountNPCS(mod.NPCType("Ashe")); if (Ashe == 0) { NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType <AHDeath>()); if (Main.expertMode) { npc.DropBossBags(); } } if (!Main.expertMode) { string[] lootTableH = { "HarukaKunai", "Masamune", "MizuArashi", "HarukaBox" }; int lootH = Main.rand.Next(lootTableH.Length); npc.DropLoot(mod.ItemType(lootTableH[lootH])); } if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("HarukaTrophy")); } NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType <HarukaVanish>()); if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("HarukaDowned"), new Color(72, 78, 117)); } npc.value = 0f; npc.boss = false; }
public override void NPCLoot() { if (Main.expertMode) { if (!AAWorld.downedZero) { if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("ZeroAwakened1"), Color.PaleVioletRed); } Item.NewItem((int)npc.Center.X, (int)npc.Center.Y, npc.width, npc.height, mod.ItemType("ZeroRune")); } AAWorld.downedZero = true; if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ZeroTrophy")); } if (Main.rand.Next(7) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ZeroMask")); } if (Main.rand.Next(50) == 0 && AAWorld.downedAllAncients) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EXSoul")); } npc.DropBossBags(); return; } }
public override void NPCLoot() { if (Main.expertMode) { if (!AAWorld.downedZero) { if (Main.netMode != NetmodeID.MultiplayerClient) { BaseUtility.Chat(AAMod.Lang.BossChat("ZeroAwakened1"), Color.PaleVioletRed); } Item.NewItem((int)npc.Center.X, (int)npc.Center.Y, npc.width, npc.height, ModLoader.GetMod("AAMod").ItemType("ZeroRune")); } AAWorld.downedZero = true; if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModLoader.GetMod("AAMod").ItemType("ZeroTrophy")); } if (Main.rand.Next(7) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModLoader.GetMod("AAMod").ItemType("ZeroMask")); } if (Main.rand.Next(50) == 0 && AAWorld.downedShen) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModLoader.GetMod("AAMod").ItemType("EXSoul")); } for (int i = 0; i < 10; i++) { npc.DropBossBags(); } return; } }
public override bool CanUseItem(Player player) { if (!player.ZoneGlowshroom) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat("Stop waving a bunch of shrooms around in the middle of nowhere like a nutcase.", Color.SkyBlue, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <MushroomMonarch>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ConfusingMushroomFalse2"), Color.SkyBlue, false); } } return(false); } return(true); }
public override bool CanUseItem(Player player) { if (!player.ZoneSnow) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.SubzeroCrystalSnowZoneFalse"), Color.Cyan.R, Color.Cyan.G, Color.Cyan.B, false); } } return(false); } if (NPC.AnyNPCs(mod.NPCType("SerpentHead"))) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.SubzeroCrystalFalse"), Color.Cyan.R, Color.Cyan.G, Color.Cyan.B, false); } } return(false); } return(true); }
public void SpawnBoss(Player player, string name, string displayName) { if (Main.netMode != 1) { int bossType = mod.NPCType(name); if (NPC.AnyNPCs(bossType)) { return; } //don't spawn if there's already a boss! int npcID = NPC.NewNPC((int)player.Center.X, (int)player.Center.Y, bossType, 0); Main.npc[npcID].Center = player.Center - new Vector2(MathHelper.Lerp(-2000, 2000, (float)Main.rand.NextDouble()), 1200f); Main.npc[npcID].netUpdate2 = true; string npcName = !string.IsNullOrEmpty(Main.npc[npcID].GivenName) ? Main.npc[npcID].GivenName : displayName; if (Main.netMode == NetmodeID.SinglePlayer) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Announcement.HasAwoken", npcName), 175, 75, 255, false); } } else if (Main.netMode == NetmodeID.Server) { NetMessage.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", new object[] { NetworkText.FromLiteral(npcName) }), new Color(175, 75, 255), -1); } } }
// We use the CanUseItem hook to prevent a player from using this item while the boss is present in the world. public override bool CanUseItem(Player player) { if (NPC.AnyNPCs(mod.NPCType <ShenDoragon>())) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("HAH! I WISH there were two of me to smash you into the ground!", Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B, false); } return(false); } if (NPC.AnyNPCs(mod.NPCType <ShenA>())) { if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("HAH! I WISH there were two of me to smash you into the ground!", Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B, false); } return(false); } for (int m = 0; m < Main.maxProjectiles; m++) { Projectile p = Main.projectile[m]; if (p != null && p.active && p.type == mod.ProjectileType("ShenTransition")) { return(false); } } return(true); }
public override void NPCLoot() { int Ashe = NPC.CountNPCS(mod.NPCType("Ashe")); if (Ashe == 0) { NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("AHDeath")); if (Main.expertMode) { for (int i = 0; i < 10; i++) { npc.DropBossBags(); } } } if (!Main.expertMode) { string[] lootTableH = { "HarukaKunai", "Masamune", "MizuArashi", "HarukaBox" }; int lootH = Main.rand.Next(lootTableH.Length); npc.DropLoot(ModLoader.GetMod("AAMod").ItemType(lootTableH[lootH])); } if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ModLoader.GetMod("AAMod").ItemType("HarukaTrophy")); } if (Main.netMode != NetmodeID.MultiplayerClient) { BaseUtility.Chat(AAMod.Lang.BossChat("HarukaDowned"), new Color(72, 78, 117)); } NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, mod.NPCType("HarukaVanish")); }
public override bool CanUseItem(Player player) { int num = 0; float num2 = Main.maxTilesX / 4200; int num3 = (int)(400f * num2); for (int j = 5; j < Main.maxTilesX - 5; j++) { int num4 = 5; while (num4 < Main.worldSurface) { if (Main.tile[j, num4].active() && Main.tile[j, num4].type == (ushort)ModContent.TileType <Tiles.CometOre>()) { num++; if (num > num3) { BaseUtility.Chat("Another comet exists in this world in some form or another already...", new Color(136, 151, 255), true); return(false); } } num4++; } } CWorld.DropMeteor(); return(true); }
public override void NPCLoot() { int Haruka = NPC.CountNPCS(mod.NPCType("Haruka")); if (Haruka == 0) { NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType <AHDeath>()); if (Main.expertMode) { npc.DropBossBags(); } } if (!Main.expertMode) { string[] lootTableA = { "AshRain", "FuryFlame", "FireSpiritStaff", "AsheSatchel" }; int lootA = Main.rand.Next(lootTableA.Length); npc.DropLoot(mod.ItemType(lootTableA[lootA])); } if (Main.rand.Next(10) == 0) { Item.NewItem((int)npc.Center.X, (int)npc.Center.Y, npc.width, npc.height, mod.ItemType("AsheTrophy")); } int DeathAnim = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType <AsheVanish>(), 0); Main.npc[DeathAnim].velocity = npc.velocity; if (Main.netMode != 1) { BaseUtility.Chat(Lang.BossChat("AsheDowned"), new Color(102, 20, 48)); } npc.value = 0f; npc.boss = false; }
public override bool CanUseItem(Player player) { if (!player.GetModPlayer <AAPlayer>().ZoneVoid) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.LifescannerFalse"), new Color(216, 60, 0), false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <NPCs.Bosses.Sag.Sag>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.LifescannerFalse"), new Color(216, 60, 0), false); } } return(false); } return(true); }
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); } } } }
// We use the CanUseItem hook to prevent a player from using this item while the boss is present in the world. public override bool CanUseItem(Player player) { if (NPC.AnyNPCs(ModContent.NPCType <NPCs.Bosses.Yamata.Yamata>()) || NPC.AnyNPCs(ModContent.NPCType <NPCs.Bosses.Yamata.Awakened.YamataA>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ChaosRuneYamataFalse"), Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <NPCs.Bosses.Akuma.Akuma>()) || NPC.AnyNPCs(ModContent.NPCType <NPCs.Bosses.Akuma.Awakened.AkumaA>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ChaosRuneAkumaFalse"), Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <ShenSpawn>())) { return(false); } if (NPC.AnyNPCs(ModContent.NPCType <Shen>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ChaosRuneFalse"), Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <ShenA>())) { if (player.whoAmI == Main.myPlayer && player.itemTime == 0 && player.controlUseItem && player.releaseUseItem) { if (Main.netMode != 1) { BaseUtility.Chat(Language.GetTextValue("Mods.AAMod.Common.ChaosRuneFalse"), Color.DarkMagenta.R, Color.DarkMagenta.G, Color.DarkMagenta.B, false); } } return(false); } if (NPC.AnyNPCs(ModContent.NPCType <ShenSpawn>()) || NPC.AnyNPCs(ModContent.NPCType <ShenTransition>()) || NPC.AnyNPCs(ModContent.NPCType <ShenDefeat>()) || NPC.AnyNPCs(ModContent.NPCType <ShenDeath>())) { return(false); } return(true); }
public override bool UseItem(Player player) { SpawnBoss(player, "SoccSpawn", "Sock"); if (player.whoAmI == Main.myPlayer) { BaseUtility.Chat("The light of the holy sun shines, bringing SOCC into this world", Color.Orange, false); } Main.PlaySound(SoundID.Roar, player.position, 0); return(true); }