From c86ab86131bbff07e4ee0c2ef2f5553b12ed1d43 Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Mon, 16 Sep 2024 22:12:33 -0700 Subject: [PATCH] Readded (rewritten) Hive minion entries --- .../en-US/Mods.CalamityMod.Bestiary.hjson | 3 +++ NPCs/Crags/ScryllarRage.cs | 11 ----------- NPCs/HiveMind/DankCreeper.cs | 15 ++++++++++----- NPCs/HiveMind/DarkHeart.cs | 11 ++++++++++- NPCs/HiveMind/HiveBlob.cs | 11 ++++++++++- Systems/BestiaryRegistrySystem.cs | 4 ++++ 6 files changed, 37 insertions(+), 18 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson index 5c4e70d8ed..5e23c4d1a8 100644 --- a/Localization/en-US/Mods.CalamityMod.Bestiary.hjson +++ b/Localization/en-US/Mods.CalamityMod.Bestiary.hjson @@ -148,6 +148,9 @@ SoulSeeker: The Clone's attempt at wielding the souls of the damned as weapons, DarkEnergy: - DesertNuisance: Though these serpents are of the Desert Scourge's species, they are notably younger and less developed. Choosing to hunt in a pack with the large scourge due to this weakness, many have seen them tear apart prey not unlike the piranhas that once populated the former sea. CosmicGuardian: Though of the same species as the nameless serpent, their minds and functions are far more basic. They possess very little will of their own and blindly follow the orders of their gluttonous master. +DankCreeper: Divine puppeteers beheld incessantly through their devotees, an organic panopticon for a wicked hive mind. Their word was truth, and evidence otherwise was burned. Even in decay, they summon subjects to creep, spy and kill. +DarkHeart: Beneath all the schemes and lies, dark desires coiled inside the pitch-black hearts of these deities. With their forms rent beyond recognition, new hearts arise from their rot to beat with misery once more +HiveBlob: The faceless are bulletproof, and so the corrupt coalescence shields itself behind dull pawns, as the Gods it was birthed from once did. HiveTumor: This tumor acts as the brain of the putrid wasteland, being all that is left of the minds of the slain gods that lay there. The creatures of the Corruption exist to protect it, and those who attempt to harm it rarely live to tell the tale. AquaticAberration: A spawn of the immense Leviathan, their lifespan can be measured in hours. All they know is how to hunt for their masters. Even non-aquatic life is well within their reach, due to their uncanny ability to fly through air just as easily as swimming through water. LeviathanStart: A lure created by the Water Elemental, Anahita. It sings so sweetly, its voice full of promise and warmth, but beware: follow the siren's call at your own peril. diff --git a/NPCs/Crags/ScryllarRage.cs b/NPCs/Crags/ScryllarRage.cs index ab6c7a8cf1..99d700fe1a 100644 --- a/NPCs/Crags/ScryllarRage.cs +++ b/NPCs/Crags/ScryllarRage.cs @@ -257,17 +257,6 @@ namespace CalamityMod.NPCs.Crags target.AddBuff(ModContent.BuffType(), 60, true); } - public override void OnKill() - { - // Increase the kill count of Scryllars for the Bestiary - if (NPC.GetWereThereAnyInteractions()) - { - NPC nPC = new NPC(); - nPC.SetDefaults(ModContent.NPCType()); - Main.BestiaryTracker.Kills.RegisterKill(nPC); - } - } - public override void HitEffect(NPC.HitInfo hit) { for (int k = 0; k < 5; k++) diff --git a/NPCs/HiveMind/DankCreeper.cs b/NPCs/HiveMind/DankCreeper.cs index 0d568035bc..b10d53ba72 100644 --- a/NPCs/HiveMind/DankCreeper.cs +++ b/NPCs/HiveMind/DankCreeper.cs @@ -13,11 +13,6 @@ namespace CalamityMod.NPCs.HiveMind { public class DankCreeper : ModNPC { - public override void SetStaticDefaults() - { - this.HideFromBestiary(); - } - public override void SetDefaults() { NPC.Calamity().canBreakPlayerDefense = true; @@ -51,6 +46,16 @@ namespace CalamityMod.NPCs.HiveMind CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); } + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DankCreeper") + }); + } + public override void AI() { // Avoid cheap bullshit diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index 9b25762cb0..9e86ce677f 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -14,7 +14,6 @@ namespace CalamityMod.NPCs.HiveMind { public override void SetStaticDefaults() { - this.HideFromBestiary(); NPCID.Sets.NeedsExpertScaling[NPC.type] = true; Main.npcFrameCount[NPC.type] = 4; NPCID.Sets.BossBestiaryPriority.Add(Type); @@ -44,6 +43,16 @@ namespace CalamityMod.NPCs.HiveMind NPC.Calamity().VulnerableToSickness = true; } + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.DarkHeart") + }); + } + public override void FindFrame(int frameHeight) { NPC.frameCounter += 0.15f; diff --git a/NPCs/HiveMind/HiveBlob.cs b/NPCs/HiveMind/HiveBlob.cs index 5842cc6796..c3f3c4bf4a 100644 --- a/NPCs/HiveMind/HiveBlob.cs +++ b/NPCs/HiveMind/HiveBlob.cs @@ -20,7 +20,6 @@ namespace CalamityMod.NPCs.HiveMind public override void SetStaticDefaults() { - this.HideFromBestiary(); NPCID.Sets.NeedsExpertScaling[NPC.type] = true; } @@ -50,6 +49,16 @@ namespace CalamityMod.NPCs.HiveMind NPC.Calamity().VulnerableToSickness = true; } + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.TheCorruption, + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.UndergroundCorruption, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.HiveBlob") + }); + } + public override void AI() { bool expertMode = Main.expertMode || BossRushEvent.BossRushActive; diff --git a/Systems/BestiaryRegistrySystem.cs b/Systems/BestiaryRegistrySystem.cs index f14f47f6dc..10e32c9b49 100644 --- a/Systems/BestiaryRegistrySystem.cs +++ b/Systems/BestiaryRegistrySystem.cs @@ -1,5 +1,7 @@ using CalamityMod.NPCs.Abyss; using CalamityMod.NPCs.Astral; +using CalamityMod.NPCs.Crags; +using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.NormalNPCs; using Terraria.ID; using Terraria.ModLoader; @@ -14,6 +16,8 @@ namespace CalamityMod.Systems // Manually register variants post-initiailization ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()] = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()]; ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()] = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()]; + ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()] = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()]; + ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()] = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()]; ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCType()] = ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[NPCID.LavaSlime]; } }