From 9ed9bdde623fcda869b8ee92daca7b2ebb2d8c55 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 23 Jan 2023 11:42:19 -0500 Subject: [PATCH] New Abyss Lore implemented --- CalamityLists.cs | 2 +- Items/LoreItems/KnowledgeOcean.cs | 42 ---------------- Items/LoreItems/LoreAbyss.cs | 47 ++++++++++++++++++ .../{KnowledgeOcean.png => LoreAbyss.png} | Bin ModSupport/WeakReferenceSupport.cs | 4 +- NPCs/Leviathan/Leviathan.cs | 2 +- 6 files changed, 51 insertions(+), 46 deletions(-) delete mode 100644 Items/LoreItems/KnowledgeOcean.cs create mode 100644 Items/LoreItems/LoreAbyss.cs rename Items/LoreItems/{KnowledgeOcean.png => LoreAbyss.png} (100%) diff --git a/CalamityLists.cs b/CalamityLists.cs index 0c1581bc14..f301aa06a8 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -1366,7 +1366,7 @@ namespace CalamityMod ItemType(), ItemType(), ItemType(), - ItemType(), + ItemType(), ItemType(), ItemType(), ItemType(), diff --git a/Items/LoreItems/KnowledgeOcean.cs b/Items/LoreItems/KnowledgeOcean.cs deleted file mode 100644 index 49371501e1..0000000000 --- a/Items/LoreItems/KnowledgeOcean.cs +++ /dev/null @@ -1,42 +0,0 @@ -using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Furniture.Trophies; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.LoreItems -{ - public class KnowledgeOcean : LoreItem - { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("The Ocean"); - Tooltip.SetDefault("Take care to not disturb the deep waters of this world.\n" + - "You may awaken something more terrifying than death itself."); - SacrificeTotal = 1; - ItemID.Sets.ItemNoGravity[Item.type] = true; - } - - public override void SetDefaults() - { - Item.width = 20; - Item.height = 20; - Item.rare = ItemRarityID.Lime; - Item.consumable = false; - } - - public override bool CanUseItem(Player player) => false; - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(). - AddTile(TileID.Bookcases). - Register(); - CreateRecipe(). - AddIngredient(). - AddTile(TileID.Bookcases). - Register(); - } - } -} diff --git a/Items/LoreItems/LoreAbyss.cs b/Items/LoreItems/LoreAbyss.cs new file mode 100644 index 0000000000..0eb010a3c4 --- /dev/null +++ b/Items/LoreItems/LoreAbyss.cs @@ -0,0 +1,47 @@ +using CalamityMod.Items.Placeables.Furniture.Trophies; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.LoreItems +{ + [LegacyName("KnowledgeOcean")] + public class LoreAbyss : LoreItem + { + public override string Lore => +@"While there are many sightless crevasses in the deep sea, this one is a unique geological marvel. +It is located unsettlingly close to the shoreline. Somehow, even eons of tectonics could not seal or crush it. +The isolated Abyss is the debatably tranquil home of the naiad Anahita and some reclusive sea creatures. +Here, I disposed of the burgeoning remains of Silva, the Goddess of Life itself. Obviously, she of all Gods refused to truly die. +My wishes were that she would be forgotten, but her tenacity is remarkable. +Diffused, her influence inundated that pit of crushing pressure with flora and fauna aplenty. +Her great roots continue to thrash and tear at the impossibly dense stone, growing uncontrollably. +She will soon remake it in her image. I can think of no worse fate for this accursed, benthic domain."; + + public override void SetStaticDefaults() + { + base.SetStaticDefaults(); + DisplayName.SetDefault("The Abyss"); + } + + public override void SetDefaults() + { + Item.width = 20; + Item.height = 20; + Item.rare = ItemRarityID.Lime; + Item.consumable = false; + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(). + AddTile(TileID.Bookcases). + Register(); + CreateRecipe(). + AddIngredient(). + AddTile(TileID.Bookcases). + Register(); + } + } +} diff --git a/Items/LoreItems/KnowledgeOcean.png b/Items/LoreItems/LoreAbyss.png similarity index 100% rename from Items/LoreItems/KnowledgeOcean.png rename to Items/LoreItems/LoreAbyss.png diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index 6002ee2c4a..850692ec88 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -223,7 +223,7 @@ namespace CalamityMod ItemRedirect(ModContent.ItemType(), "Thunderstorm (weapon)"); // Lore items ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); - ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); + ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); ItemRedirect(ModContent.ItemType(), "Lore#Lore_Items"); @@ -541,7 +541,7 @@ namespace CalamityMod { BossDifficulty.TryGetValue("Leviathan", out float order); List bosses = new List() { NPCType(), NPCType() }; - List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; + List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; string instructions = "By killing an unknown entity in the Ocean Biome"; string despawn = CalamityUtils.ColorMessage("The aquatic entities sink back beneath the ocean depths.", new Color(0x7F, 0xFF, 0xD4)); diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 914c4d7573..d7d63791b3 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -823,7 +823,7 @@ namespace CalamityMod.NPCs.Leviathan // Lore bool shouldDropLore(DropAttemptInfo info) => !DownedBossSystem.downedLeviathan && LastAnLStanding(); - npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType(), desc: DropHelper.FirstKillText); + npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType(), desc: DropHelper.FirstKillText); npcLoot.AddConditionalPerPlayer(shouldDropLore, ModContent.ItemType(), desc: DropHelper.FirstKillText); }