From 0d64964cd3faaeb3d95ec01740d522278b67b274 Mon Sep 17 00:00:00 2001 From: termigator1359 <45545085+termigator1359@users.noreply.github.com> Date: Sun, 20 Oct 2019 19:06:48 -0400 Subject: [PATCH] I literally did this crap already bruh moment. --- Items/Mounts/OnyxExcavator.cs | 7 ++++--- Items/Tools/ClimateChange/AridArtifact.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 17 ++++++++++++++--- NPCs/Polterghast/Polterghast.cs | 3 +++ 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Items/Mounts/OnyxExcavator.cs b/Items/Mounts/OnyxExcavator.cs index 6bd8dea367..a2653a3cce 100644 --- a/Items/Mounts/OnyxExcavator.cs +++ b/Items/Mounts/OnyxExcavator.cs @@ -7,6 +7,7 @@ using Terraria.GameContent.Achievements; using Terraria.Graphics.Shaders; using Terraria.ID; using CalamityMod.Buffs.Mounts; +using CalamityMod.Tiles; using CalamityMod.Tiles.Abyss; using CalamityMod.Tiles.Ores; @@ -141,11 +142,11 @@ namespace CalamityMod.Items.Mounts { if (tile != null && tile.active() && tile.type != (ushort)ModContent.TileType() && tile.type != (ushort)ModContent.TileType() && (tile.type != TileID.Hellstone || Main.hardMode) && - (tile.type != TileID.LihzahrdBrick || NPC.downedGolemBoss) && tile.type != TileID.BlueDungeonBrick && - tile.type != TileID.GreenDungeonBrick && tile.type != TileID.PinkDungeonBrick && tile.type != TileID.DemonAltar && + (tile.type != TileID.LihzahrdBrick || NPC.downedGolemBoss) && (tile.type != TileID.BlueDungeonBrick || NPC.downedBoss3) && + (tile.type != TileID.GreenDungeonBrick || NPC.downedBoss3) && (tile.type != TileID.PinkDungeonBrick || NPC.downedBoss3) && tile.type != TileID.DemonAltar && (tile.type != (ushort)ModContent.TileType() || CalamityWorld.downedStarGod) && ((tile.type != (ushort)ModContent.TileType() && tile.type != (ushort)ModContent.TileType()) || NPC.downedPlantBoss || CalamityWorld.downedCalamitas) && - (!player.Calamity().ZoneSunkenSea || CalamityWorld.downedDesertScourge) && + (!player.Calamity().ZoneSunkenSea || CalamityWorld.downedDesertScourge) && tile.type != (ushort)ModContent.TileType() && (Main.tileValue[tile.type] < tileValueLimit || tile.type == TileID.Heart || tile.type == TileID.LifeFruit) && !player.noBuilding && tile.type != TileID.ElderCrystalStand && tile.type != TileID.Containers) { diff --git a/Items/Tools/ClimateChange/AridArtifact.cs b/Items/Tools/ClimateChange/AridArtifact.cs index 4217a0389a..46912c8f4e 100644 --- a/Items/Tools/ClimateChange/AridArtifact.cs +++ b/Items/Tools/ClimateChange/AridArtifact.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Items.Tools.ClimateChange // this is extremely ugly and has to be fully qualified because we add an item called Sandstorm public override bool CanUseItem(Player player) { - return !Terraria.GameContent.Events.Sandstorm.Happening; + return CalamityWorld.downedDesertScourge; } public override bool UseItem(Player player) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 35d5b8a849..882a7154ef 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3441,15 +3441,25 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ItemID.Stake, Main.LocalPlayer.HasItem(ModContent.ItemType())); SetShopItem(ref shop, ref nextSlot, WorldGen.crimson ? ItemID.Musket : ItemID.TheUndertaker, NPC.downedBoss2); SetShopItem(ref shop, ref nextSlot, ItemID.Boomstick, NPC.downedQueenBee, price: Item.buyPrice(0, 20, 0, 0)); + SetShopItem(ref shop, ref nextSlot, ItemID.TacticalShotgun, NPC.downedGolemBoss, Item.buyPrice(0, 25)); + SetShopItem(ref shop, ref nextSlot, ItemID.SniperRifle, NPC.downedGolemBoss, Item.buyPrice(0, 25)); + } + + if (type == NPCID.Cyborg) + { + SetShopItem(ref shop, ref nextSlot, ItemID.RocketLauncher, NPC.downedGolemBoss, Item.buyPrice(0, 25)); + } + + if (type == NPCID.Pirate) + { + SetShopItem(ref shop, ref nextSlot, ItemID.PirateMap, Item.buyPrice(0, 5)); } if (type == NPCID.Dryad) { SetShopItem(ref shop, ref nextSlot, ItemID.JungleRose, price: Item.buyPrice(0, 2)); SetShopItem(ref shop, ref nextSlot, ItemID.NaturesGift, price: Item.buyPrice(0, 10)); - SetShopItem(ref shop, ref nextSlot, ItemID.GoblinBattleStandard, price: Item.buyPrice(0, 1)); SetShopItem(ref shop, ref nextSlot, ItemID.SlimeCrown, NPC.downedSlimeKing, Item.buyPrice(0, 2)); - SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedDesertScourge, Item.buyPrice(0, 2)); SetShopItem(ref shop, ref nextSlot, ItemID.SuspiciousLookingEye, NPC.downedBoss1, Item.buyPrice(0, 3)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedCrabulon, Item.buyPrice(0, 4)); SetShopItem(ref shop, ref nextSlot, ItemID.BloodySpine, NPC.downedBoss2, Item.buyPrice(0, 6)); @@ -3461,7 +3471,6 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedHiveMind, Item.buyPrice(0, 10)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedHiveMind && Main.expertMode); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedSlimeGod, Item.buyPrice(0, 15)); - SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedAquaticScourge, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ItemID.PumpkinMoonMedallion, NPC.downedHalloweenKing, Item.buyPrice(0, 25)); SetShopItem(ref shop, ref nextSlot, ItemID.NaughtyPresent, NPC.downedChristmasIceQueen, Item.buyPrice(0, 25)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType()); @@ -3474,6 +3483,7 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), price: Item.buyPrice(0, 5)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), price: Item.buyPrice(0, 5)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), price: Item.buyPrice(0, 5)); + SetShopItem(ref shop, ref nextSlot, ItemID.GoblinBattleStandard, price: Item.buyPrice(0, 1)); } if (type == NPCID.Clothier) @@ -3522,6 +3532,7 @@ namespace CalamityMod.NPCs SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), NPC.downedPlantBoss, Item.buyPrice(0, 20)); SetShopItem(ref shop, ref nextSlot, ItemID.SolarTablet, NPC.downedGolemBoss, Item.buyPrice(0, 25)); SetShopItem(ref shop, ref nextSlot, ItemID.LihzahrdPowerCell, NPC.downedGolemBoss, Item.buyPrice(0, 30)); + SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), NPC.downedGolemBoss, Item.buyPrice(0, 10)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedScavenger, Item.buyPrice(0, 50)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedPlaguebringer, Item.buyPrice(0, 50)); SetShopItem(ref shop, ref nextSlot, ModContent.ItemType(), CalamityWorld.downedBumble, Item.buyPrice(5)); diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 7393f9084a..8cf45c5c34 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -715,6 +715,9 @@ namespace CalamityMod.NPCs // If Polterghast has not been killed, notify players about the Abyss minibosses now dropping items if (!CalamityWorld.downedPolterghast) { + if (!Main.player[Main.myPlayer].dead && Main.player[Main.myPlayer].active) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ReaperSearchRoar"), (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y); + string key = "Mods.CalamityMod.GhostBossText"; Color messageColor = Color.RoyalBlue;