diff --git a/Events/AcidRainEvent.cs b/Events/AcidRainEvent.cs index 1ab9d8d80f..ff45ddf201 100644 --- a/Events/AcidRainEvent.cs +++ b/Events/AcidRainEvent.cs @@ -1,6 +1,7 @@ using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.OldDuke; using CalamityMod.Projectiles.Boss; +using CalamityMod.UI; using CalamityMod.World; using Microsoft.Xna.Framework; using System; @@ -33,7 +34,7 @@ namespace CalamityMod.Events } } - public class AcidRainEvent + public class AcidRainEvent : ModSystem { public static int MaxNuclearToadCount = 5; // To prevent the things from spamming. This happens frequently in pre-HM. @@ -46,55 +47,17 @@ namespace CalamityMod.Events public const float BloodwormSpawnRate = 0.1f; - // Not a readonly collection so that if anyone else wants to add stuff in here with their own mod, they can. - public static Dictionary PossibleEnemiesPreHM = new() - { - { ModContent.NPCType(), new AcidRainSpawnData(1, 0.75f, AcidRainSpawnRequirement.Anywhere) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) } - }; + // Collections are not readonly so that if anyone else wants to add stuff to them with their own mod, they can. + public static Dictionary PossibleEnemiesPreHM = new(); // Note: Irradiated Slimes spawn naturally - public static Dictionary PossibleEnemiesAS = new() - { - { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(0, 0.75f, AcidRainSpawnRequirement.Anywhere) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) } - }; + public static Dictionary PossibleEnemiesAS = new(); - public static Dictionary PossibleEnemiesPolter = new() - { - { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(0, 0.75f, AcidRainSpawnRequirement.Anywhere) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) }, - { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Anywhere) } - }; + public static Dictionary PossibleEnemiesPolter = new(); - public static Dictionary PossibleMinibossesAS = new() - { - { ModContent.NPCType(), new AcidRainSpawnData(5, 0.08f, AcidRainSpawnRequirement.Water) } - }; + public static Dictionary PossibleMinibossesAS = new(); - public static Dictionary PossibleMinibossesPolter = new() - { - { ModContent.NPCType(), new AcidRainSpawnData(4, 0.08f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(4, 0.07f, AcidRainSpawnRequirement.Water) }, - { ModContent.NPCType(), new AcidRainSpawnData(8, 0.045f, AcidRainSpawnRequirement.Anywhere) } - }; + public static Dictionary PossibleMinibossesPolter = new(); public static readonly List AllMinibosses = PossibleMinibossesAS.Select(miniboss => miniboss.Key).ToList().Concat(PossibleMinibossesPolter.Select(miniboss => miniboss.Key)).Distinct().ToList(); @@ -160,6 +123,67 @@ namespace CalamityMod.Events return (int)(Math.Log(playerCount + Math.E - 1) * 110f); } } + + // Populate the enemy caches safely, after the mod's core content has been fully loaded. + public override void OnModLoad() + { + PossibleEnemiesPreHM = new() + { + { ModContent.NPCType(), new AcidRainSpawnData(1, 0.75f, AcidRainSpawnRequirement.Anywhere) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) } + }; + PossibleEnemiesAS = new() + { + { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(0, 0.75f, AcidRainSpawnRequirement.Anywhere) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) } + }; + PossibleEnemiesPolter = new() + { + { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(0, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(0, 0.75f, AcidRainSpawnRequirement.Anywhere) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) }, + { ModContent.NPCType(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Anywhere) } + }; + + PossibleMinibossesAS = new() + { + { ModContent.NPCType(), new AcidRainSpawnData(5, 0.08f, AcidRainSpawnRequirement.Water) } + }; + PossibleMinibossesPolter = new() + { + { ModContent.NPCType(), new AcidRainSpawnData(4, 0.08f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(4, 0.07f, AcidRainSpawnRequirement.Water) }, + { ModContent.NPCType(), new AcidRainSpawnData(8, 0.045f, AcidRainSpawnRequirement.Anywhere) } + }; + BossHealthBarManager.MinibossHPBarList.AddRange(AllMinibosses); + } + + // Clear enemy cache lists. + public override void Unload() + { + PossibleEnemiesPreHM = new(); + PossibleEnemiesAS = new(); + PossibleEnemiesPolter = new(); + PossibleMinibossesAS = new(); + PossibleMinibossesPolter = new(); + } + /// /// Attempts to start the Acid Rain event. Will fail if there is another invasion or boss rush going on. It will also fail if the EoC, WoF, or AS has not been killed yet. /// diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index 928ee34ff8..91d998c6d7 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -50,7 +50,6 @@ namespace CalamityMod.ILEditing IL.Terraria.Player.QuickHeal += ConditionallyReplaceManaSickness; IL.Terraria.Player.QuickMana += ConditionallyReplaceManaSickness; IL.Terraria.Player.ItemCheck_Inner += ConditionallyReplaceManaSickness; - On.Terraria.Main.DrawInterface += DrawGeneralParticles; On.Terraria.Main.SortDrawCacheWorms += DrawFusableParticles; On.Terraria.Main.SetDisplayMode += ResetRenderTargetSizes; IL.Terraria.GameContent.Drawing.TileDrawing.DrawPartialLiquid += DrawCustomLava; @@ -147,7 +146,6 @@ namespace CalamityMod.ILEditing IL.Terraria.Player.QuickHeal -= ConditionallyReplaceManaSickness; IL.Terraria.Player.QuickMana -= ConditionallyReplaceManaSickness; IL.Terraria.Player.ItemCheck_Inner -= ConditionallyReplaceManaSickness; - On.Terraria.Main.DrawInterface -= DrawGeneralParticles; On.Terraria.Main.SortDrawCacheWorms -= DrawFusableParticles; On.Terraria.Main.SetDisplayMode -= ResetRenderTargetSizes; IL.Terraria.GameContent.Drawing.TileDrawing.DrawPartialLiquid -= DrawCustomLava; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 1b1c4a58a9..2aa7a84050 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -515,8 +515,8 @@ namespace CalamityMod.ILEditing #region Fire Cursor Effect for the Calamity Accessory private static void UseCoolFireCursorEffect(On.Terraria.Main.orig_DrawCursor orig, Vector2 bonus, bool smart) { - // Do nothing special if the player has a regular mouse or is on the menu. - if (Main.gameMenu || !Main.LocalPlayer.Calamity().blazingCursorVisuals) + // Do nothing special if the player has a regular mouse or is on the menu/map. + if (Main.gameMenu || Main.mapFullscreen || !Main.LocalPlayer.Calamity().blazingCursorVisuals) { orig(bonus, smart); return; @@ -642,21 +642,15 @@ namespace CalamityMod.ILEditing #endregion Fire Cursor Effect for the Calamity Accessory #region General Particle Rendering - private static void DrawGeneralParticles(On.Terraria.Main.orig_DrawInterface orig, Main self, GameTime gameTime) + private static void DrawFusableParticles(On.Terraria.Main.orig_SortDrawCacheWorms orig, Main self) { GeneralParticleHandler.DrawAllParticles(Main.spriteBatch); DeathAshParticle.DrawAll(); + FusableParticleManager.RenderAllFusableParticles(); if (Main.LocalPlayer.dye.Any(dyeItem => dyeItem.type == ModContent.ItemType())) Main.LocalPlayer.Calamity().ProfanedMoonlightAuroraDrawer?.Draw(Main.LocalPlayer.Center - Main.screenPosition, false, Main.GameViewMatrix.TransformationMatrix, Matrix.Identity); - orig(self, gameTime); - } - - private static void DrawFusableParticles(On.Terraria.Main.orig_SortDrawCacheWorms orig, Main self) - { - FusableParticleManager.RenderAllFusableParticles(); - orig(self); } diff --git a/MainMenu/CalamityMainMenu.cs b/MainMenu/CalamityMainMenu.cs index 0795577196..5c02ba6ba9 100644 --- a/MainMenu/CalamityMainMenu.cs +++ b/MainMenu/CalamityMainMenu.cs @@ -53,7 +53,29 @@ namespace CalamityMod.MainMenu public override bool PreDrawLogo(SpriteBatch spriteBatch, ref Vector2 logoDrawCenter, ref float logoRotation, ref float logoScale, ref Color drawColor) { Texture2D texture = ModContent.Request("CalamityMod/MainMenu/MenuBackground").Value; - spriteBatch.Draw(texture, new Vector2(0f, 0f), null, Color.White, 0f, Vector2.Zero, (float)Main.screenWidth / texture.Width, SpriteEffects.None, 0f); + + // Calculate the draw position offset and scale in the event that someone is using a non-16:9 monitor + Vector2 drawOffset = Vector2.Zero; + float xScale = (float)Main.screenWidth / texture.Width; + float yScale = (float)Main.screenHeight / texture.Height; + float scale = xScale; + + // if someone's monitor isn't in wacky dimensions, no calculations need to be performed at all + if (xScale != yScale) + { + // If someone's monitor is tall, it needs to be shifted to the left so that it's still centered on screen + // Additionally the Y scale is used so that it still covers the entire screen + if (yScale > xScale) + { + scale = yScale; + drawOffset.X -= (texture.Width - Main.screenWidth * scale) * 0.5f; + } + else + // The opposite is true if someone's monitor is widescreen + drawOffset.Y -= (texture.Height - Main.screenHeight * scale) * 0.5f; + } + + spriteBatch.Draw(texture, drawOffset, null, Color.White, 0f, Vector2.Zero, scale, SpriteEffects.None, 0f); static Color selectCinderColor() { diff --git a/NPCs/AcidRain/CragmawMire.cs b/NPCs/AcidRain/CragmawMire.cs index 86fef8d01f..cfe4d73e75 100644 --- a/NPCs/AcidRain/CragmawMire.cs +++ b/NPCs/AcidRain/CragmawMire.cs @@ -1,6 +1,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Dusts; using CalamityMod.Items.Accessories; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Projectiles.Enemy; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -506,6 +507,7 @@ namespace CalamityMod.NPCs.AcidRain postPolter.Add(ModContent.ItemType(), 10); postPolter.OnFailedConditions(ItemDropRule.Common(ModContent.ItemType())); postPolter.OnFailedConditions(ItemDropRule.Common(ModContent.ItemType())); + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType(), 4); } } } diff --git a/NPCs/AcidRain/Mauler.cs b/NPCs/AcidRain/Mauler.cs index 8bb97dc21a..6914695fda 100644 --- a/NPCs/AcidRain/Mauler.cs +++ b/NPCs/AcidRain/Mauler.cs @@ -1,6 +1,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Projectiles.Enemy; using CalamityMod.World; @@ -452,6 +453,7 @@ namespace CalamityMod.NPCs.AcidRain { npcLoot.Add(ItemID.SharkFin, 1, 2, 4); npcLoot.Add(ModContent.ItemType(), 3); + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType(), 4); } public override void HitEffect(int hitDirection, double damage) diff --git a/NPCs/AcidRain/NuclearTerror.cs b/NPCs/AcidRain/NuclearTerror.cs index 6940e6cc34..5c85a81915 100644 --- a/NPCs/AcidRain/NuclearTerror.cs +++ b/NPCs/AcidRain/NuclearTerror.cs @@ -1,7 +1,9 @@ using CalamityMod.BiomeManagers; using CalamityMod.Dusts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Weapons.Summon; using CalamityMod.Projectiles.Enemy; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -521,6 +523,7 @@ namespace CalamityMod.NPCs.AcidRain { npcLoot.Add(ModContent.ItemType(), 3); npcLoot.Add(ModContent.ItemType(), 3); + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType(), 4); } } } diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 6a02ab891b..ffc790d042 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -4,6 +4,7 @@ using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -248,6 +249,7 @@ namespace CalamityMod.NPCs.AquaticScourge npcLoot.Add(DropHelper.PerPlayer(ItemID.GreaterHealingPotion, 1, 8, 14)); npcLoot.Add(ModContent.ItemType(), 10); + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); // Lore bool firstASKill() => !DownedBossSystem.downedAquaticScourge; diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index 24ea563f9a..8f494bc144 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -360,6 +361,9 @@ namespace CalamityMod.NPCs.AstrumAureus npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedAstrumAureus, ModContent.ItemType()); } diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 862c139b98..90d18afcc3 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Melee; @@ -309,7 +310,7 @@ namespace CalamityMod.NPCs.AstrumDeus normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); // Equipment - normalOnly.Add(ModContent.ItemType(), 7); + normalOnly.Add(ModContent.ItemType(), 7); normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); normalOnly.Add(ModContent.ItemType(), 5); @@ -321,6 +322,10 @@ namespace CalamityMod.NPCs.AstrumDeus npcLoot.Add(DropHelper.PerPlayer(ItemID.GreaterHealingPotion, 1, 8, 14)); npcLoot.Add(ModContent.ItemType(), 10); + // Relic + bool shouldDropRelic(DropAttemptInfo info) => (CalamityWorld.revenge || Main.masterMode) && !ShouldNotDropThings(info.npc); + npcLoot.AddIf(shouldDropRelic, ModContent.ItemType()); + // Fragments npcLoot.Add(DropHelper.NormalVsExpertQuantity(ItemID.FragmentSolar, 1, 16, 24, 20, 32)); npcLoot.Add(DropHelper.NormalVsExpertQuantity(ItemID.FragmentVortex, 1, 16, 24, 20, 32)); diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index dd2a1d5171..570e52be9e 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -7,12 +7,14 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; +using CalamityMod.World; using Microsoft.Xna.Framework; using System.IO; using Terraria; @@ -212,6 +214,9 @@ namespace CalamityMod.NPCs.BrimstoneElemental npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBrimstoneElemental, ModContent.ItemType()); } diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs index 2befa5f7ea..5c1a0ca12f 100644 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ b/NPCs/Bumblebirb/Bumblefuck.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -436,6 +437,9 @@ namespace CalamityMod.NPCs.Bumblebirb npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType()); } diff --git a/NPCs/Calamitas/CalamitasClone.cs b/NPCs/Calamitas/CalamitasClone.cs index 17e07bc831..e21ad75b5f 100644 --- a/NPCs/Calamitas/CalamitasClone.cs +++ b/NPCs/Calamitas/CalamitasClone.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -221,6 +222,9 @@ namespace CalamityMod.NPCs.Calamitas npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCalamitas, ModContent.ItemType()); } diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 6cea11bae2..3a2d1d969d 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -19,6 +20,7 @@ using System.IO; using Terraria.Audio; using Terraria.GameContent.ItemDropRules; using CalamityMod.Sounds; +using CalamityMod.World; namespace CalamityMod.NPCs.CeaselessVoid { @@ -222,6 +224,9 @@ namespace CalamityMod.NPCs.CeaselessVoid npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType()); } diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index 9f897442a2..54d2f1fafc 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -3,6 +3,7 @@ using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -842,6 +843,9 @@ namespace CalamityMod.NPCs.Crabulon npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCrabulon, ModContent.ItemType()); } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 6218055fda..40dfee5771 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories.Wings; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -1167,6 +1168,9 @@ namespace CalamityMod.NPCs.Cryogen // Trophy (always directly from boss, never in bag) npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCryogen, ModContent.ItemType()); } diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index 54ebec21ad..2163bfa3b0 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -3,6 +3,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -720,6 +721,9 @@ namespace CalamityMod.NPCs.DesertScourge // Trophy (always directly from boss, never in bag) npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDesertScourge, ModContent.ItemType()); } diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 8aadb13939..5799f34655 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Placeables.FurnitureCosmilite; using CalamityMod.Items.Potions; @@ -2397,6 +2398,9 @@ namespace CalamityMod.NPCs.DevourerofGods normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); } + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Trophy (always directly from boss, never in bag) npcLoot.Add(ModContent.ItemType(), 10); diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 15b3d387b9..ef88a423f6 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Mounts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -1341,6 +1342,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares mainDrops.Add(ItemDropRule.ByCondition(DropHelper.If(info => info.npc.type == ModContent.NPCType()), ModContent.ItemType())); mainDrops.Add(ItemDropRule.ByCondition(DropHelper.If(info => info.npc.type == ModContent.NPCType()), ModContent.ItemType())); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore item mainDrops.Add(ItemDropRule.ByCondition(DropHelper.If(() => !DownedBossSystem.downedExoMechs), ModContent.ItemType())); diff --git a/NPCs/GreatSandShark/GreatSandShark.cs b/NPCs/GreatSandShark/GreatSandShark.cs index c330daea1f..faec389ec6 100644 --- a/NPCs/GreatSandShark/GreatSandShark.cs +++ b/NPCs/GreatSandShark/GreatSandShark.cs @@ -1,5 +1,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -634,6 +635,9 @@ namespace CalamityMod.NPCs.GreatSandShark npcLoot.Add(ItemID.LightShard, 2); npcLoot.Add(ItemID.DarkShard, 2); + + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType(), 4); } public override void OnKill() diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 630ed4c25a..d152571e9d 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -1163,6 +1164,9 @@ namespace CalamityMod.NPCs.HiveMind npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedHiveMind, ModContent.ItemType()); } diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index d774d14558..cc5915ae9b 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -4,6 +4,7 @@ using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -799,6 +800,9 @@ namespace CalamityMod.NPCs.Leviathan normalOnly.Add(ItemID.CratePotion, 5, 5, 8); } + // Relic + npcLoot.AddIf(() => (Main.masterMode || CalamityWorld.revenge) && LastAnLStanding(), ModContent.ItemType()); + // Lore bool shouldDropLore(DropAttemptInfo info) => !DownedBossSystem.downedLeviathan && LastAnLStanding(); npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType()); diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 0c955f2864..0e8bd30d55 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -3,6 +3,7 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -12,6 +13,7 @@ using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.TownNPCs; +using CalamityMod.World; using System; using System.IO; using Microsoft.Xna.Framework; @@ -445,6 +447,9 @@ namespace CalamityMod.NPCs.OldDuke npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedBoomerDuke, ModContent.ItemType()); } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 6547707179..c0589dd0d9 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -540,6 +541,9 @@ namespace CalamityMod.NPCs.Perforator npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPerforator, ModContent.ItemType()); } diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 2184f00671..ad84a9654b 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -1277,6 +1278,9 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPlaguebringer, ModContent.ItemType()); } diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index a95c770c82..a63b342db7 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -1046,6 +1047,9 @@ namespace CalamityMod.NPCs.Polterghast npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedPolterghast, ModContent.ItemType()); } diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index 7301f04a07..41b442801c 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -16,6 +16,7 @@ using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Events; using Terraria.Audio; @@ -510,6 +511,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians npcLoot.Add(ModContent.ItemType(), 10); npcLoot.Add(ModContent.ItemType()); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedGuardians, ModContent.ItemType()); } diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index c62b623808..b520a5dbe7 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -7,6 +7,7 @@ using CalamityMod.Items.Accessories.Wings; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.Dyes; using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.SummonItems; @@ -1598,6 +1599,9 @@ namespace CalamityMod.NPCs.Providence npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedProvidence, ModContent.ItemType()); } diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index e6a9613819..25b73f9654 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -3,6 +3,7 @@ using CalamityMod.Events; using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Magic; @@ -880,6 +881,9 @@ namespace CalamityMod.NPCs.Ravager npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedRavager, ModContent.ItemType()); } diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index a8bf03b6e7..63e676964b 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -805,6 +806,9 @@ namespace CalamityMod.NPCs.Signus npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType()); } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index e3a8f65550..6398f110c0 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -705,6 +706,9 @@ namespace CalamityMod.NPCs.SlimeGod mainDrops.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => (Main.masterMode || CalamityWorld.revenge) && LastSlimeGodStanding(), ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => LastSlimeGodStanding() && !DownedBossSystem.downedSlimeGod, ModContent.ItemType()); } diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 090703b575..84b0cba126 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -979,6 +980,9 @@ namespace CalamityMod.NPCs.StormWeaver npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(LastSentinelKilled, ModContent.ItemType()); } diff --git a/NPCs/SunkenSea/GiantClam.cs b/NPCs/SunkenSea/GiantClam.cs index 638161e18e..e1444f57a3 100644 --- a/NPCs/SunkenSea/GiantClam.cs +++ b/NPCs/SunkenSea/GiantClam.cs @@ -4,12 +4,14 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Banners; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Projectiles.Enemy; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -471,6 +473,9 @@ namespace CalamityMod.NPCs.SunkenSea postDesertScourge.Add(ModContent.ItemType(), 3); postDesertScourge.Add(ModContent.ItemType(), 3); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType(), 4); + npcLoot.Add(postDesertScourge); npcLoot.Add(hardmode); } diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 89c69cf08d..620781f70d 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -2541,6 +2542,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedSCal, ModContent.ItemType()); } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index a9af105363..8b20733882 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -6,6 +6,7 @@ using CalamityMod.Items.Armor.Vanity; using CalamityMod.Items.LoreItems; using CalamityMod.Items.Materials; using CalamityMod.Items.Pets; +using CalamityMod.Items.Placeables.Furniture.BossRelics; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; @@ -2831,6 +2832,9 @@ namespace CalamityMod.NPCs.Yharon // Trophy (always directly from boss, never in bag) npcLoot.Add(ModContent.ItemType(), 10); + // Relic + npcLoot.AddIf(() => Main.masterMode || CalamityWorld.revenge, ModContent.ItemType()); + // Lore npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedYharon, ModContent.ItemType()); } diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index ece63bb0e4..1d80b63532 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -268,7 +268,6 @@ namespace CalamityMod.UI NPCType(), NPCType() }; - MinibossHPBarList.AddRange(AcidRainEvent.AllMinibosses); } public static void SetupExtensionHandlerList() diff --git a/World/AstralBiome.cs b/World/AstralBiome.cs index 6de28310ee..a8f1f99a75 100644 --- a/World/AstralBiome.cs +++ b/World/AstralBiome.cs @@ -838,6 +838,10 @@ namespace CalamityMod.World ConvertToAstral(x, topMost + 1); break; } + case TileID.OasisPlants: + Main.tile[x, y].Get().HasTile = false; + NetMessage.SendTileSquare(-1, x, y, 1); + break; } } } diff --git a/description.txt b/description.txt index b26e749679..85d9d9d4bc 100644 --- a/description.txt +++ b/description.txt @@ -1,5 +1,5 @@ The Calamity Mod is a vast content mod for Terraria. -It adds three new difficulty modes, multiple entire biomes, thousands of items, hundreds of weapons, and dozens of bosses. +It adds two new difficulty modes, multiple entire biomes, thousands of items, hundreds of weapons, and dozens of bosses. The mod also makes hundreds of adjustments to vanilla items, features and mechanics to improve balance, quality of life and overall gameplay consistency. A more detailed breakdown of the content available in Calamity: @@ -14,7 +14,7 @@ A more detailed breakdown of the content available in Calamity: - 100+ blocks - 200+ pieces of furniture - 11 ores -- 3 full difficulty settings above Expert, separate from Master +- 2 full difficulty settings above Expert, separate from Master - 50+ changes to vanilla mechanics - 30+ new recipes for vanilla items - 450+ tweaks and improvements to vanilla items diff --git a/description_workshop.txt b/description_workshop.txt new file mode 100644 index 0000000000..8e473f4a3e --- /dev/null +++ b/description_workshop.txt @@ -0,0 +1,40 @@ +[h1]Calamity Mod[/h1] +[url=https://discord.gg/calamity]Discord[/url] [url=https://calamitymod.wiki.gg]Official Wiki[/url] + +The Calamity Mod is a vast content mod that creates a new and refreshing experience for Terraria! + +With this mod comes a slew of new bosses, unique and challenging difficulty modes, over a thousand new items, new NPCs, and entire new biomes to explore! Calamity also massively expands the endgame of Terraria, creating an entirely original, intense experience for players to enjoy. + +The mod additionally tweaks tons of vanilla features whilst adding new ones to aid the player's experience and heavily expand on the base game, including but not limited to: +[olist] +[*] Reworked reforging with the Goblin Tinkerer +[*] Reworked gameplay progression in early Hardmode +[*] Dozens of extra crafting recipes for existing vanilla items +[*] Dozens more quality of life and balance changes! +[/olist] + +[i]Please note that this mod does [b]NOT[/b] include Calamity's soundtrack! You will need to download "Calamity Mod Music" for the full intended experience![/i] + +[b]Be sure to join our Discord server linked above to keep up with the latest news about upcoming updates and features.[/b] + +[hr] + +A more detailed breakdown of the content available in Calamity: +[olist] +[*] 27 bosses and 12 minibosses +[*] 100+ enemies +[*] 5 town NPCs +[*] 5 biomes and many new structures +[*] 1 event +[*] 1 new playable class (based on Throwing from Terraria 1.3) +[*] 1800+ items +[*] 700+ weapons +[*] 100+ blocks +[*] 200+ pieces of furniture +[*] 11 ores +[*] 2 full difficulty settings above Expert, separate from Master +[*] 50+ changes to vanilla mechanics +[*] 30+ new recipes for vanilla items +[*] 450+ tweaks and improvements to vanilla items +[*] Cross-mod support for the Thorium Mod +[/olist] \ No newline at end of file diff --git a/icon_workshop.png b/icon_workshop.png new file mode 100644 index 0000000000..5ede327664 Binary files /dev/null and b/icon_workshop.png differ