From 06da964b28ff7c7cb0845530dfe71c155e79471d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 18 Jun 2025 13:19:29 -0400 Subject: [PATCH] Deleted Cosmic Guardian --- DataStructures/NPCStats.cs | 3 - Events/BossRushEvent.cs | 2 +- Items/Weapons/Melee/TheLastMourning.cs | 3 +- NPCs/DevourerofGods/CosmicGuardianBody.cs | 240 --------- NPCs/DevourerofGods/CosmicGuardianBody.png | Bin 1078 -> 0 bytes .../DevourerofGods/CosmicGuardianBodyGlow.png | Bin 599 -> 0 bytes NPCs/DevourerofGods/CosmicGuardianHead.cs | 457 ------------------ NPCs/DevourerofGods/CosmicGuardianHead.png | Bin 1937 -> 0 bytes .../DevourerofGods/CosmicGuardianHeadGlow.png | Bin 366 -> 0 bytes .../CosmicGuardianHeadGlow2.png | Bin 573 -> 0 bytes NPCs/DevourerofGods/CosmicGuardianTail.cs | 237 --------- NPCs/DevourerofGods/CosmicGuardianTail.png | Bin 1083 -> 0 bytes .../DevourerofGods/CosmicGuardianTailGlow.png | Bin 640 -> 0 bytes .../NPCIDs/CosmicGuardianIDList.cs | 26 - Systems/Collections/NPCs/BossHPScalingList.cs | 3 - Utilities/NPCDebuffs.cs | 3 - 16 files changed, 2 insertions(+), 972 deletions(-) delete mode 100644 NPCs/DevourerofGods/CosmicGuardianBody.cs delete mode 100644 NPCs/DevourerofGods/CosmicGuardianBody.png delete mode 100644 NPCs/DevourerofGods/CosmicGuardianBodyGlow.png delete mode 100644 NPCs/DevourerofGods/CosmicGuardianHead.cs delete mode 100644 NPCs/DevourerofGods/CosmicGuardianHead.png delete mode 100644 NPCs/DevourerofGods/CosmicGuardianHeadGlow.png delete mode 100644 NPCs/DevourerofGods/CosmicGuardianHeadGlow2.png delete mode 100644 NPCs/DevourerofGods/CosmicGuardianTail.cs delete mode 100644 NPCs/DevourerofGods/CosmicGuardianTail.png delete mode 100644 NPCs/DevourerofGods/CosmicGuardianTailGlow.png delete mode 100644 Systems/Collections/NPCIDs/CosmicGuardianIDList.cs diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 372a831c0e..6906b4365f 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -530,9 +530,6 @@ namespace CalamityMod { ModContent.NPCType(), new int[] { 250, 500, 535, 600, 750 } }, { ModContent.NPCType(), new int[] { 150, 300, 330, 380, 450 } }, { ModContent.NPCType(), new int[] { 100, 200, 220, 270, 300 } }, - { ModContent.NPCType(), new int[] { 150, 300, 330, 360, 450 } }, - { ModContent.NPCType(), new int[] { 150, 300, 330, 360, 450 } }, - { ModContent.NPCType(), new int[] { 150, 300, 330, 360, 450 } }, { ModContent.NPCType(), new int[] { 300, 448, 480, 512, 900 } }, diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index d39adecaea..c46252538b 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -373,7 +373,7 @@ namespace CalamityMod.Events SoundEngine.PlaySound(DevourerofGodsHead.SpawnSound, player.Center); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type); - }, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), + }, usesSpecialSound: true, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType() }), new Boss(ModContent.NPCType(), spawnContext: type => { diff --git a/Items/Weapons/Melee/TheLastMourning.cs b/Items/Weapons/Melee/TheLastMourning.cs index 8f59702b28..ee6e286544 100644 --- a/Items/Weapons/Melee/TheLastMourning.cs +++ b/Items/Weapons/Melee/TheLastMourning.cs @@ -35,8 +35,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { - bool isDoGSegment = target.type == ModContent.NPCType() || target.type == ModContent.NPCType(); - if (!isDoGSegment || Main.rand.NextBool(3)) + if (target.type != ModContent.NPCType() || Main.rand.NextBool(3)) { CalamityPlayer.HorsemansBladeOnHit(player, target.whoAmI, Item.damage, Item.knockBack, 0, ModContent.ProjectileType()); CalamityPlayer.HorsemansBladeOnHit(player, target.whoAmI, Item.damage, Item.knockBack, 1); diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.cs b/NPCs/DevourerofGods/CosmicGuardianBody.cs deleted file mode 100644 index 8041253706..0000000000 --- a/NPCs/DevourerofGods/CosmicGuardianBody.cs +++ /dev/null @@ -1,240 +0,0 @@ -using System.IO; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; -namespace CalamityMod.NPCs.DevourerofGods -{ - [HasPierceResist] - [LongDistanceNetSync(SyncWith = typeof(CosmicGuardianHead))] - public class CosmicGuardianBody : ModNPC - { - public int invinceTime = 180; - public override LocalizedText DisplayName => CalamityUtils.GetText("NPCs.CosmicGuardianHead.DisplayName"); - - public static Asset GlowTexture; - - public override void SetStaticDefaults() - { - this.HideFromBestiary(); - if (!Main.dedServ) - { - GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); - } - } - - public override void SetDefaults() - { - NPC.GetNPCDamage(); - NPC.width = 34; - NPC.height = 34; - NPC.defense = 60; - CalamityGlobalNPC global = NPC.Calamity(); - global.DR = 0.5f; - global.unbreakableDR = true; - NPC.lifeMax = 50000; - NPC.aiStyle = -1; - AIType = -1; - NPC.knockBackResist = 0f; - NPC.Opacity = 0f; - NPC.behindTiles = true; - NPC.noGravity = true; - NPC.noTileCollide = true; - NPC.HitSound = SoundID.NPCHit4; - NPC.DeathSound = SoundID.NPCDeath14; - NPC.netAlways = true; - NPC.dontCountMe = true; - - // Scale stats in Expert and Master - CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(invinceTime); - writer.Write(NPC.dontTakeDamage); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - invinceTime = reader.ReadInt32(); - NPC.dontTakeDamage = reader.ReadBoolean(); - } - - public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) - { - return false; - } - - public override void AI() - { - if (invinceTime > 0) - { - invinceTime--; - NPC.damage = 0; - NPC.dontTakeDamage = true; - } - else - { - NPC.damage = NPC.defDamage; - NPC.dontTakeDamage = false; - } - - if (NPC.ai[2] > 0f) - NPC.realLife = (int)NPC.ai[2]; - - // Check if other segments are still alive, if not, die - bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); - if (!shouldDespawn) - { - if (NPC.ai[1] <= 0f) - shouldDespawn = true; - else if (Main.npc[(int)NPC.ai[1]].life <= 0) - shouldDespawn = true; - } - if (shouldDespawn) - { - NPC.life = 0; - NPC.HitEffect(0, 10.0); - NPC.checkDead(); - NPC.active = false; - } - - NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; - - Vector2 segmentPosition = NPC.Center; - float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); - float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); - targetX = (int)(targetX / 16f) * 16; - targetY = (int)(targetY / 16f) * 16; - segmentPosition.X = (int)(segmentPosition.X / 16f) * 16; - segmentPosition.Y = (int)(segmentPosition.Y / 16f) * 16; - targetX -= segmentPosition.X; - targetY -= segmentPosition.Y; - float targetDistance = (float)System.Math.Sqrt(targetX * targetX + targetY * targetY); - if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) - { - try - { - segmentPosition = NPC.Center; - targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; - targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; - } - catch - { - } - NPC.rotation = (float)System.Math.Atan2(targetY, targetX) + 1.57f; - targetDistance = (float)System.Math.Sqrt(targetX * targetX + targetY * targetY); - int segmentWidth = NPC.width; - targetDistance = (targetDistance - segmentWidth) / targetDistance; - targetX *= targetDistance; - targetY *= targetDistance; - NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + targetX; - NPC.position.Y = NPC.position.Y + targetY; - } - - // Calculate contact damage based on velocity - float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f; - float minimalContactDamageVelocity = segmentVelocity * 0.25f; - float minimalDamageVelocity = segmentVelocity * 0.5f; - float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); - if (bodyAndTailVelocity <= minimalContactDamageVelocity) - { - NPC.damage = 0; - } - else - { - float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); - - Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; - drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - texture2D15 = GlowTexture.Value; - Color glowmaskColor = Color.Lerp(Color.White, Color.Fuchsia, 0.5f); - - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - return false; - } - - public override bool CanHitPlayer(Player target, ref int cooldownSlot) - { - cooldownSlot = ImmunityCooldownID.Bosses; - return NPC.Opacity >= 1f && invinceTime <= 0; - } - - public override bool CheckActive() - { - return false; - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - if (!Main.dedServ) - { - float randomSpread = Main.rand.Next(-200, 201) / 100f; - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT2").Type, 1f); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT3").Type, 1f); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT4").Type, 1f); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT5").Type, 1f); - } - NPC.position.X = NPC.position.X + (float)(NPC.width / 2); - NPC.position.Y = NPC.position.Y + (float)(NPC.height / 2); - NPC.width = 50; - NPC.height = 50; - NPC.position.X = NPC.position.X - (float)(NPC.width / 2); - NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); - for (int i = 0; i < 10; i++) - { - int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); - Main.dust[cosmiliteDust].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[cosmiliteDust].scale = 0.5f; - Main.dust[cosmiliteDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int j = 0; j < 20; j++) - { - int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); - Main.dust[cosmiliteDust2].noGravity = true; - Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); - Main.dust[cosmiliteDust2].velocity *= 2f; - } - } - } - - public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) - { - if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 120); - } - } -} diff --git a/NPCs/DevourerofGods/CosmicGuardianBody.png b/NPCs/DevourerofGods/CosmicGuardianBody.png deleted file mode 100644 index 63c6a4c27c24b2ac446f1776c8f2899b3c8e1e5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1078 zcmV-61j+k}P)A!R7LB1%i=pPWHlop*1jOQ3s<>!NanY)v6}Jstw4x&TXSfighMGdjTGW6s zE?j7#V*Dyage1m~=&hPqBF0!ulo-dw%K2@s{xo+IXecZt8aFmf7&?Dxxe502!Q66Cb#_3e@XqdA3Nn2+k4*FkCeZ45r9|Y zqY*&-{HgQ2ckpUrCxIyPJ!q=?5`cJOJO)^_dOJ|=!J)rz0I+)32B+MT@R7OFdJcfv zRZHFWDVc#QM-xLosEh!5@)t7g4Ti{c--CE!JhNP$(!0B-Wgh^iTDyQEnQwpm!fDsg zkOQEvZxASw_-^C(0Q}m104R^esqB%0AySADo3%<5160gi;1r64bouUW03O~;Vzemn1=JS^3G-T;)xh&(6~(w*V{|djoqeZqOJXHZBGvOg0pRJQ z2Qk2srf-~ziV?|@kVg+k%boIyO-UF|o_y(){}Nw&V?UCOk()hdWN(z(3j{=@khLbp zo@G|BBy84_2QU2dS5mMtAtDlzB~z&1mRv-}W-X0x$yj^CA)>YU_}CLCHY|yPN6d`w zlRWQ>5i8rD#*-b^o|`>qVt{C7by!(zdgY8+0KBN24V3@$OMjktua5s1N>+mW?w0>l zn|rJF1A{l5tG>QvpUP*vngBu~GB)}!bKbBd7UkSs4oO+YW)*o}WGspLsv4)gmBy3j zWsk_{xnd<4B2i;*g+oLh@DY&o^=emmT4(56%VsToYfaVOCu^T(`f!O@$pez!QJd%O zyMC~vJ+r^PTU(rayY5hbZyTe*5h>e6(La>5pXDPV*_Gb3(GdXFZ%$(2d}mi?eaU`P zX*`j!cG)*5JR?8&gRcDLC`dERC-8w=W1*B-Fl#rMUIvXdoacOI+e)I_PhKtMzaF=9zbA}~4Y zBLMO#3Ew$}WKXtqpTFhSv;7RD#5&J)15h#c7%0Y&?Cb706z0BG**s$RRwbPwTIm#5 w=O2aG@SGji^)_d=*D0@+vZ8NxSP&8#dMZM)YC~nrZcGFt z6+sKxEqDgPBQ9nrW)9iC``*2mec!w&uqB_5lFq;}I`Q+yR)TJR;&(FOhO}IUNBYda?t+ zdgw#OJc&zw-Q0kc@%0gT_2LZx-!@i@Dj;3z^Whc%qmQ1a%#FKm{UQFZTmsPF^wbOT zo#g))+r`B1@t#juACbh_X<3D4w!Bl&<+%6O(-zi#(yKogOM`wwrV@M7G*6=5Ou_o?>Ww=Ts>{Hq~SQpZS^tOK*%<3Rd4B4kVw zvX0Dbhk^2U!!;tN%)OSZ;AYo~p6ob59H{NJ(qxT@Xm0W&P{4U)IrHwgRH-3i?K~oy zk4NM&BkiQPRjDD8ra^atL3g6kHnJ+4KQ%-gxrJzKX#*g-`K6M63RZv52mq%?yMRU_ l)q3ZfPwMWqYA;f4x&r*?s+?qo4PXEO002ovPDHLkV1gD56^Q@< diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.cs b/NPCs/DevourerofGods/CosmicGuardianHead.cs deleted file mode 100644 index c8bbe9a43b..0000000000 --- a/NPCs/DevourerofGods/CosmicGuardianHead.cs +++ /dev/null @@ -1,457 +0,0 @@ -using System; -using System.IO; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.GameContent; -using Terraria.GameContent.Bestiary; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.DevourerofGods -{ - [HasPierceResist] - [LongDistanceNetSync] - public class CosmicGuardianHead : ModNPC - { - private bool tail = false; - private const int minLength = 10; - private const int maxLength = 11; - private int invinceTime = 180; - - public static Asset GlowTexture; - public static Asset GlowTexture2; - - public override void SetStaticDefaults() - { - NPCID.Sets.BossBestiaryPriority.Add(Type); - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() - { - Scale = 0.75f, - PortraitScale = 0.75f, - PortraitPositionXOverride = 40, - PortraitPositionYOverride = 40 - }; - value.Position.X += 62f; - value.Position.Y += 35f; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - if (!Main.dedServ) - { - GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); - GlowTexture2 = ModContent.Request(Texture + "Glow2", AssetRequestMode.AsyncLoad); - } - } - - public override void SetDefaults() - { - NPC.Calamity().canBreakPlayerDefense = true; - NPC.GetNPCDamage(); - NPC.width = 64; - NPC.height = 76; - NPC.defense = 40; - NPC.lifeMax = 30000; - NPC.aiStyle = -1; - AIType = -1; - NPC.knockBackResist = 0f; - NPC.Opacity = 0f; - NPC.behindTiles = true; - NPC.noGravity = true; - NPC.noTileCollide = true; - NPC.HitSound = SoundID.NPCHit4; - NPC.DeathSound = SoundID.NPCDeath14; - NPC.netAlways = true; - - // Scale stats in Expert and Master - CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); - } - - public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) - { - int associatedNPCType = ModContent.NPCType(); - bestiaryEntry.UIInfoProvider = new CommonEnemyUICollectionInfoProvider(ContentSamples.NpcBestiaryCreditIdsByNpcNetIds[associatedNPCType], quickUnlock: true); - - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] - { - new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.CosmicGuardian") - }); - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(invinceTime); - writer.Write(NPC.dontTakeDamage); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - invinceTime = reader.ReadInt32(); - NPC.dontTakeDamage = reader.ReadBoolean(); - } - - public override void AI() - { - if (invinceTime > 0) - { - invinceTime--; - NPC.damage = 0; - NPC.dontTakeDamage = true; - } - else - { - NPC.damage = NPC.defDamage; - NPC.dontTakeDamage = false; - } - - Vector2 vector = NPC.Center; - - if (NPC.ai[2] > 0f) - NPC.realLife = (int)NPC.ai[2]; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (!tail && NPC.ai[0] == 0f) - { - int Previous = NPC.whoAmI; - for (int segmentSpawn = 0; segmentSpawn < maxLength; segmentSpawn++) - { - int segment; - if (segmentSpawn >= 0 && segmentSpawn < minLength) - { - segment = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } - else - { - segment = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.position.X + (NPC.width / 2), (int)NPC.position.Y + (NPC.height / 2), ModContent.NPCType(), NPC.whoAmI); - } - Main.npc[segment].realLife = NPC.whoAmI; - Main.npc[segment].ai[2] = NPC.whoAmI; - Main.npc[segment].ai[1] = Previous; - Main.npc[Previous].ai[0] = segment; - NPC.netUpdate = true; - Previous = segment; - } - tail = true; - } - if (!NPC.active && Main.dedServ) - { - NetMessage.SendData(MessageID.DamageNPC, -1, -1, null, NPC.whoAmI, -1f, 0f, 0f, 0, 0, 0); - } - } - - if (CalamityGlobalNPC.DoGHead < 0 || !Main.npc[CalamityGlobalNPC.DoGHead].active) - { - NPC.velocity.Y -= 4f; - - if ((double)NPC.position.Y < Main.topWorld + 16f) - { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } - } - return; - } - - Player player = Main.player[Main.npc[CalamityGlobalNPC.DoGHead].target]; - - bool increaseSpeed = Vector2.Distance(player.Center, vector) > CalamityGlobalNPC.CatchUpDistance200Tiles; - bool increaseSpeedMore = Vector2.Distance(player.Center, vector) > CalamityGlobalNPC.CatchUpDistance350Tiles; - - NPC.Opacity = Main.npc[CalamityGlobalNPC.DoGHead].Opacity; - - // Fly up and despawn if DoG enters phase 2 and isn't in the final Cosmic Guardian spawn phase. - bool flyAwayAndDespawn = (Main.npc[CalamityGlobalNPC.DoGHead].life / (float)Main.npc[CalamityGlobalNPC.DoGHead].lifeMax < 0.6f && Main.npc[CalamityGlobalNPC.DoGHead].life / (float)Main.npc[CalamityGlobalNPC.DoGHead].lifeMax > 0.2f) || Main.npc[CalamityGlobalNPC.DoGHead].life <= 1; - if (flyAwayAndDespawn) - { - // Prevents them from doing damage while despawning. - NPC.Opacity = 0.99f; - - NPC.velocity.Y -= 4f; - - if ((double)NPC.position.Y < Main.topWorld + 16f) - { - for (int a = 0; a < Main.maxNPCs; a++) - { - if (Main.npc[a].type == NPC.type || Main.npc[a].type == ModContent.NPCType() || Main.npc[a].type == ModContent.NPCType()) - Main.npc[a].active = false; - } - } - return; - } - - Vector2 segmentDirection = NPC.Center; - float dogHeadX = Main.npc[CalamityGlobalNPC.DoGHead].position.X + (Main.npc[CalamityGlobalNPC.DoGHead].width / 2); - float dogHeadY = Main.npc[CalamityGlobalNPC.DoGHead].position.Y + (Main.npc[CalamityGlobalNPC.DoGHead].height / 2); - float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f; - float velocityMult = BossRushEvent.BossRushActive ? 0.9f : CalamityWorld.revenge ? 0.75f : 0.23f; - float maxDistanceFromDoGHead = 160f; - - if (increaseSpeedMore) - velocityMult *= 4f; - else if (increaseSpeed) - velocityMult *= 2f; - - foreach (NPC n in Main.ActiveNPCs) - { - if ((n.type == NPC.type || n.type == ModContent.NPCType()) && n.whoAmI != NPC.whoAmI) - { - Vector2 distFromHead = n.Center - NPC.Center; - if (distFromHead.Length() < maxDistanceFromDoGHead) - { - distFromHead.Normalize(); - distFromHead *= maxDistanceFromDoGHead; - dogHeadX -= distFromHead.X; - dogHeadY -= distFromHead.Y; - } - } - } - - float higherMaxDistance = segmentVelocity * 1.3f; - float lowerMaxDistance = segmentVelocity * 0.7f; - float npcSpeed = NPC.velocity.Length(); - if (npcSpeed > 0f) - { - if (npcSpeed > higherMaxDistance) - { - NPC.velocity.Normalize(); - NPC.velocity *= higherMaxDistance; - } - else if (npcSpeed < lowerMaxDistance) - { - NPC.velocity.Normalize(); - NPC.velocity *= lowerMaxDistance; - } - } - - dogHeadX = (int)(dogHeadX / 16f) * 16; - dogHeadY = (int)(dogHeadY / 16f) * 16; - segmentDirection.X = (int)(segmentDirection.X / 16f) * 16; - segmentDirection.Y = (int)(segmentDirection.Y / 16f) * 16; - dogHeadX -= segmentDirection.X; - dogHeadY -= segmentDirection.Y; - float targetDistance = (float)Math.Sqrt(dogHeadX * dogHeadX + dogHeadY * dogHeadY); - float absoluteDoGX = Math.Abs(dogHeadX); - float absoluteDoGY = Math.Abs(dogHeadY); - float timeToReachTarget = segmentVelocity / targetDistance; - dogHeadX *= timeToReachTarget; - dogHeadY *= timeToReachTarget; - if ((NPC.velocity.X > 0f && dogHeadX > 0f) || (NPC.velocity.X < 0f && dogHeadX < 0f) || (NPC.velocity.Y > 0f && dogHeadY > 0f) || (NPC.velocity.Y < 0f && dogHeadY < 0f)) - { - if (NPC.velocity.X < dogHeadX) - { - NPC.velocity.X = NPC.velocity.X + velocityMult; - } - else - { - if (NPC.velocity.X > dogHeadX) - { - NPC.velocity.X = NPC.velocity.X - velocityMult; - } - } - if (NPC.velocity.Y < dogHeadY) - { - NPC.velocity.Y = NPC.velocity.Y + velocityMult; - } - else - { - if (NPC.velocity.Y > dogHeadY) - { - NPC.velocity.Y = NPC.velocity.Y - velocityMult; - } - } - if (Math.Abs(dogHeadY) < segmentVelocity * 0.2 && ((NPC.velocity.X > 0f && dogHeadX < 0f) || (NPC.velocity.X < 0f && dogHeadX > 0f))) - { - if (NPC.velocity.Y > 0f) - { - NPC.velocity.Y = NPC.velocity.Y + velocityMult * 2f; - } - else - { - NPC.velocity.Y = NPC.velocity.Y - velocityMult * 2f; - } - } - if (Math.Abs(dogHeadX) < segmentVelocity * 0.2 && ((NPC.velocity.Y > 0f && dogHeadY < 0f) || (NPC.velocity.Y < 0f && dogHeadY > 0f))) - { - if (NPC.velocity.X > 0f) - { - NPC.velocity.X = NPC.velocity.X + velocityMult * 2f; //changed from 2 - } - else - { - NPC.velocity.X = NPC.velocity.X - velocityMult * 2f; //changed from 2 - } - } - } - else - { - if (absoluteDoGX > absoluteDoGY) - { - if (NPC.velocity.X < dogHeadX) - { - NPC.velocity.X = NPC.velocity.X + velocityMult * 1.1f; //changed from 1.1 - } - else if (NPC.velocity.X > dogHeadX) - { - NPC.velocity.X = NPC.velocity.X - velocityMult * 1.1f; //changed from 1.1 - } - if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < segmentVelocity * 0.5) - { - if (NPC.velocity.Y > 0f) - { - NPC.velocity.Y = NPC.velocity.Y + velocityMult; - } - else - { - NPC.velocity.Y = NPC.velocity.Y - velocityMult; - } - } - } - else - { - if (NPC.velocity.Y < dogHeadY) - { - NPC.velocity.Y = NPC.velocity.Y + velocityMult * 1.1f; - } - else if (NPC.velocity.Y > dogHeadY) - { - NPC.velocity.Y = NPC.velocity.Y - velocityMult * 1.1f; - } - if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < segmentVelocity * 0.5) - { - if (NPC.velocity.X > 0f) - { - NPC.velocity.X = NPC.velocity.X + velocityMult; - } - else - { - NPC.velocity.X = NPC.velocity.X - velocityMult; - } - } - } - } - - // Calculate contact damage based on velocity - float minimalContactDamageVelocity = segmentVelocity * 0.25f; - float minimalDamageVelocity = segmentVelocity * 0.5f; - if (NPC.velocity.Length() <= minimalContactDamageVelocity) - { - NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); - } - else - { - float velocityDamageScalar = MathHelper.Clamp((NPC.velocity.Length() - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - NPC.damage = (int)MathHelper.Lerp((float)Math.Round(NPC.defDamage * 0.5), NPC.defDamage, velocityDamageScalar); - } - - NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - if (NPC.IsABestiaryIconDummy) - NPC.Opacity = 1f; - - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); - - - if (NPC.IsABestiaryIconDummy) - { - return CalamityUtils.DrawAnimatedBestiaryWorm(spriteBatch, NPC, drawColor, texture2D15, TextureAssets.Npc[ModContent.NPCType()].Value, 8, 26, 0.2f, new Vector2(-10, 0), 4, 5); - } - - Vector2 distFromHead3 = NPC.Center - screenPos; - distFromHead3 -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; - distFromHead3 += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, distFromHead3, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - texture2D15 = GlowTexture.Value; - Color glowmaskColor = Color.Lerp(Color.White, Color.Fuchsia, 0.5f); - - spriteBatch.Draw(texture2D15, distFromHead3, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - texture2D15 = GlowTexture2.Value; - glowmaskColor = Color.Lerp(Color.White, Color.Cyan, 0.5f); - - spriteBatch.Draw(texture2D15, distFromHead3, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - return false; - } - - public override void OnKill() - { - int heartAmt = Main.rand.Next(3) + 3; - for (int i = 0; i < heartAmt; i++) - Item.NewItem(NPC.GetSource_Loot(), (int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height, ItemID.Heart); - } - - public override bool CanHitPlayer(Player target, ref int cooldownSlot) - { - cooldownSlot = ImmunityCooldownID.Bosses; - return NPC.Opacity >= 1f && invinceTime <= 0; - } - - public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) - { - scale = 1.5f; - return null; - } - - public override bool CheckActive() - { - return false; - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - if (!Main.dedServ) - { - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("DoT").Type, 1f); - } - NPC.position.X = NPC.position.X + (float)(NPC.width / 2); - NPC.position.Y = NPC.position.Y + (float)(NPC.height / 2); - NPC.width = 50; - NPC.height = 50; - NPC.position.X = NPC.position.X - (float)(NPC.width / 2); - NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); - for (int i = 0; i < 15; i++) - { - int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); - Main.dust[cosmiliteDust].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[cosmiliteDust].scale = 0.5f; - Main.dust[cosmiliteDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int j = 0; j < 30; j++) - { - int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); - Main.dust[cosmiliteDust2].noGravity = true; - Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); - Main.dust[cosmiliteDust2].velocity *= 2f; - } - } - } - - public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) - { - if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 240); - } - } -} diff --git a/NPCs/DevourerofGods/CosmicGuardianHead.png b/NPCs/DevourerofGods/CosmicGuardianHead.png deleted file mode 100644 index 5a2e86f44a4091d5431f6eb21d63a910e849cb56..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1937 zcmV;C2X6R@P)-PY zrU(z-dM_|sTjXK&YqjQ?SDwrDBjyOwoUzJtB4ZqkSYxCGVv6z<4`tdScv_?OmVtuC zSDup`*)pn#8yVxEZpKIhT8^0vz~25=V0cDrJ*&KBMrT(}TRey9Z#4!?Nk8PcdyWjU|m`h8RMWbV{CLd?zGc$_wBnb z)EkW~szxU}zU*7yy&~7XDk5VXlrp9kjhaIg>K`|`u->mfd>1}s9vf{mvhbplH@?s? z!srwkhU$QTEuj46voLeI8!l?K#1E_m;{tycz(Z|xgtbc&2| z;4-G}XjBfnCtWoYE!*?XLH1bY)Ek{5V;q!fOxfJ1Ok3=F&FVK6h7WDi0qE*Hqp)52 z$FA^U*Ve**Ja}4DZ*+=`aZovr@uE>xtXcUM0Lc(TJk1F!Z%4Oxo*+GU=Ha2@~B+lBrAefxExzG@_cV{1X5+HD&72OD-x6^zKZ<{lK6pt0n<(-=h}-@W>N~9;eJ6 zJIiivZBGEY8bklm)W{eI;o&14HL^t+wbJ^-fNC9#MUrk2xk=hf#D{eA~MK^iBUQ0qFf=RSGca+=~-{ zmaUUhfIDBl1{jKFzh|>+{VJuZ9c6ZFWltx|BV!yS%43>a+X3hw*O)?iX6t#xgU@3hUoJ@vB_FTh{&tK>G>D7uq9ud5hH+Au`6nuoXN{YrH+< zca|>$VCuO+i=+`-)&%CrqjZGJqD7kkxMOOV1Ig2ZE!+C)PmHwV$sTV`B+c=(MTm@X zFpM!;`?M=s7J6sJ6hYC&gFJ7wMUY0!{V3d*)>w!+mO-*-`xnKtZ|!sKZ#?u#^~e|p z?!HnPQ>5zhP)$oR*r+sjZD4>jVdKM}h8r1UY$m($$8i7YtiG6N`}LS(&%s#cl$}(M zjB!x+-nBBu*7nW>;NzvsQh*a@%>jlyJ!AH@;d()cGL}&m%9P7y>$U!}D5UW;{>Mv~ zEl86#EiJK`t+(gS~HcjgqG!dj3c6RMCLt16~7kWN_O&^oYUNU#Ntx7~h!r>3oa*@CR37Ridz*cq4K-kNt~y}4_W*ZK2t zJ}+G_PuR?VIW{39+D`w+dck%33=j3>?*8<7Rp-i@_4DiJ8U+8G{@{6dzopr7y#uTm~H?7 diff --git a/NPCs/DevourerofGods/CosmicGuardianHeadGlow2.png b/NPCs/DevourerofGods/CosmicGuardianHeadGlow2.png deleted file mode 100644 index 06614ea3551235e4d73998287825c9cb23b03bd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 573 zcmeAS@N?(olHy`uVBq!ia0vp^Zb0n8!3HF~RhqvrFfg%rx;TbZ#J!!d(TmwpppBQ~ zo0ynbQ)bW-9*!=%hNh`EG@_Pnyrj-?Q2oLwwW*7GBRGFCbTv&da-GEiRQRoFK}tba zbly##mXkAUGM$Ph-#J@;|KDcM%r1AmMxmHboD6D7YzYj>+`K&pC3-dr9*~gMH)2aR zIOfKXoU`YI1W;6(v1j8)rDOxPF2D{NdO5gdE-|H<9c&RyQA^ZLrig(bEJ zrte7iS@rSCN5(2CuTJY3Tkl@(F`U0XH&ewVt!(48%nuJgUHBRm>woRNh(Y58O@)R3 zcP(*C?VD}b(CHHY^i9;JrFUL=9KG$MA1pcBi#tAbYDBbZk`Adt`p@z;G!C$uD?bWoJFi}_az#nm@iLX;M8ILV9IF`V3 z>;^|dPp`OSv!O(?a)Y5+Tnf)Ipa8?M8x?< CalamityUtils.GetText("NPCs.CosmicGuardianHead.DisplayName"); - - public static Asset GlowTexture; - - public override void SetStaticDefaults() - { - this.HideFromBestiary(); - if (!Main.dedServ) - { - GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); - } - } - - public override void SetDefaults() - { - NPC.GetNPCDamage(); - NPC.width = 30; - NPC.height = 50; - NPC.defense = 70; - NPC.lifeMax = 50000; - NPC.aiStyle = -1; - AIType = -1; - NPC.knockBackResist = 0f; - NPC.Opacity = 0f; - NPC.behindTiles = true; - NPC.noGravity = true; - NPC.noTileCollide = true; - NPC.HitSound = SoundID.NPCHit4; - NPC.DeathSound = SoundID.NPCDeath14; - NPC.netAlways = true; - NPC.dontCountMe = true; - - // Scale stats in Expert and Master - CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(invinceTime); - writer.Write(NPC.dontTakeDamage); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - invinceTime = reader.ReadInt32(); - NPC.dontTakeDamage = reader.ReadBoolean(); - } - - public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) - { - return false; - } - - public override void AI() - { - if (invinceTime > 0) - { - invinceTime--; - NPC.damage = 0; - NPC.dontTakeDamage = true; - } - else - { - NPC.damage = NPC.defDamage; - NPC.dontTakeDamage = false; - } - - if (NPC.ai[2] > 0f) - NPC.realLife = (int)NPC.ai[2]; - - // Check if other segments are still alive, if not, die - bool shouldDespawn = !NPC.AnyNPCs(ModContent.NPCType()); - if (!shouldDespawn) - { - if (NPC.ai[1] <= 0f) - shouldDespawn = true; - else if (Main.npc[(int)NPC.ai[1]].life <= 0) - shouldDespawn = true; - } - if (shouldDespawn) - { - NPC.life = 0; - NPC.HitEffect(0, 10.0); - NPC.checkDead(); - NPC.active = false; - } - - NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; - - Vector2 segmentPosition = NPC.Center; - float targetX = Main.player[NPC.target].position.X + (Main.player[NPC.target].width / 2); - float targetY = Main.player[NPC.target].position.Y + (Main.player[NPC.target].height / 2); - targetX = (int)(targetX / 16f) * 16; - targetY = (int)(targetY / 16f) * 16; - segmentPosition.X = (int)(segmentPosition.X / 16f) * 16; - segmentPosition.Y = (int)(segmentPosition.Y / 16f) * 16; - targetX -= segmentPosition.X; - targetY -= segmentPosition.Y; - float targetDistance = (float)System.Math.Sqrt(targetX * targetX + targetY * targetY); - if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) - { - try - { - segmentPosition = NPC.Center; - targetX = Main.npc[(int)NPC.ai[1]].position.X + (Main.npc[(int)NPC.ai[1]].width / 2) - segmentPosition.X; - targetY = Main.npc[(int)NPC.ai[1]].position.Y + (Main.npc[(int)NPC.ai[1]].height / 2) - segmentPosition.Y; - } - catch - { - } - NPC.rotation = (float)System.Math.Atan2(targetY, targetX) + 1.57f; - targetDistance = (float)System.Math.Sqrt(targetX * targetX + targetY * targetY); - int segmentWidth = NPC.width; - targetDistance = (targetDistance - segmentWidth) / targetDistance; - targetX *= targetDistance; - targetY *= targetDistance; - NPC.velocity = Vector2.Zero; - NPC.position.X = NPC.position.X + targetX; - NPC.position.Y = NPC.position.Y + targetY; - } - - // Calculate contact damage based on velocity - float segmentVelocity = BossRushEvent.BossRushActive ? 30f : CalamityWorld.revenge ? 25f : 23f; - float minimalContactDamageVelocity = segmentVelocity * 0.25f; - float minimalDamageVelocity = segmentVelocity * 0.5f; - float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); - if (bodyAndTailVelocity <= minimalContactDamageVelocity) - { - NPC.damage = 0; - } - else - { - float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / 2)); - - Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height)) * NPC.scale / 2f; - drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - texture2D15 = GlowTexture.Value; - Color glowmaskColor = Color.Lerp(Color.White, Color.Cyan, 0.5f); - - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - return false; - } - - public override bool CanHitPlayer(Player target, ref int cooldownSlot) - { - cooldownSlot = ImmunityCooldownID.Bosses; - return NPC.Opacity >= 1f && invinceTime <= 0; - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - if (!Main.dedServ) - { - float randomSpread = Main.rand.Next(-200, 201) / 100f; - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT2").Type, 1f); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT3").Type, 1f); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT4").Type, 1f); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread * Main.rand.NextFloat(), Mod.Find("DoT5").Type, 1f); - } - NPC.position.X = NPC.position.X + (float)(NPC.width / 2); - NPC.position.Y = NPC.position.Y + (float)(NPC.height / 2); - NPC.width = 50; - NPC.height = 50; - NPC.position.X = NPC.position.X - (float)(NPC.width / 2); - NPC.position.Y = NPC.position.Y - (float)(NPC.height / 2); - for (int i = 0; i < 10; i++) - { - int cosmiliteDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); - Main.dust[cosmiliteDust].velocity *= 3f; - if (Main.rand.NextBool()) - { - Main.dust[cosmiliteDust].scale = 0.5f; - Main.dust[cosmiliteDust].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } - } - for (int j = 0; j < 20; j++) - { - int cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 3f); - Main.dust[cosmiliteDust2].noGravity = true; - Main.dust[cosmiliteDust2].velocity *= 5f; - cosmiliteDust2 = Dust.NewDust(NPC.position, NPC.width, NPC.height, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 2f); - Main.dust[cosmiliteDust2].velocity *= 2f; - } - } - } - - public override bool CheckActive() - { - return false; - } - - public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) - { - if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), 60, true); - } - } -} diff --git a/NPCs/DevourerofGods/CosmicGuardianTail.png b/NPCs/DevourerofGods/CosmicGuardianTail.png deleted file mode 100644 index e570d41a53b5ef3201d6402b171340dec82f62c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1083 zcmV-B1jPG^P)1uy|C`pfMrjgnjQCSYvQaP^Y%QckEVM)rTx*tM-E`Sy7hQ^A#AS3X2#SS@ zsGyLVrqFI;XrjSr5-m}KS`&ZJ|pqY%x0$l_%#5&-~9ss=dSfS@|r|9}D$g4(%wJh%OGXTBh& zkM$gJ`ah~&4M1zWzwp(JGoBqrik?F#yy?uF=pA?L{Skm|Yu7sy*X(YJ9(s}&`1PAe z?&r&+iE`3+=RzbW=Ks8X3xK{WXPx~OA%KiB0u&gq(8-7yom?7@{_;ok@Kr;ioYklG zgzX)BoObV-Zl|3oM#AEb$$tkOfmNHDf!Q{q6I<8ddMA0Kj@Ub0iJ9oQ^T-(&G~Y6= zU-jF46(NKSF%q;iY!1P18-kB1;r`u-0UNo;OxzF@`Rf|p{<4FN#! zneH%2&=*hiA6Deg^+nmN7}#}S3jl+I6F`9>$=5aRarGM8u-?f+`_B#|565rn*~x?# zFR20G<%?$_%w|IHc@v#{THTSKZ}e+D<-&`X)CBQ<969YjJB--;UfHmi*x34Q$%(2% zEL7Qv0n3EOefm_F2wH!5;F4^(WL=USM$!bVAGbMB{njWl*AxBf#BB{PTM@qObWi@? zUqg<5*@)I39=Mda&&pxM!g?v6P55lVXEO_|evg;*q4F59wxL?PX+t~UztFHbL6RC3(L4>4iKZ9JKN z8qa(ED*CN5l7hT#d{P$xOh3M#C~s{;Z7*Ubq+hmD^;$m2HfEMCPn65&TCw*MBl+7D zPo*f#yqE?ceEy`|tpSz9h;A`-TTxWwJ4mZP(#8cbQSR-IP!Wtcw<=;nwX$mar5~?y zBD~Fhecnpn1~vcr(@9sqXCFRfhLN(~HVO9YuW~LyS+Bg7pd5>oueIeOGmN}*u9XH~ zE@j8(8&yUutoO>bxb=zP^Hy_3l@Y2TU?+b~BT9o$T+lyR-Yu|H*%6hIuw2&WKrYWZX+m0r2}^ z2Y}9SHvs*2A^=1!OZwblxC4O5tsVffyEy=Eluo4gXVPf^_P4SCluHEwdi!nz@GbR1 z`rJl(9e^v+)=NmpsX;g-GIq<*LftQC%lg`!p7Ip8ksf0l>8KqWq0Y(}=!x`IE_ih0 z9Ja%`<6CeM*ZKzl7(UZymkU+x<~Sk_yp9F8%#9BMF!OF(DbCu**V60ajWW-XRxv-j zS~(b%uQ$3d$B|Zzjjl`~1n_Irvd^CvqupBjX`hu{70C(@cwf=oVvZw^lg|NIPQCok zQkp~PH^&jDeMq>gvX5B*zVa{iI1<162!K*CCv7*zkvd{l+;O+)2b}a7<4BN*-v|=% z8$lv|BS^$=G@VEyHbEjbp-qTtJYyVbx{8uN%IMUg9It&HNj!K8K>p89y-H5YRq@|{ ze&gx!_I0FC%(p^^a{TslL{uyGe|%|~7y$b?Th*W2>W(pv)KwZA?bk)ERor*=`b_{n zY`$$uz{8;@0309fN#i%tAuz@fWmKy!x~ewDI1(h{H?)026tj=p*{gQ8QYCOi;C9}x zrFPv=C2+)vMH=oMxFtX+5QUX|L==2 aj{F5O)Smu6>NuzX0000 List { get; private set; } - - public override void OnModLoad() - { - List = - [ - NPCType(), - NPCType(), - NPCType() - ]; - } - - public override void Unload() => List = null; - - public static bool Includes(int npcType) => List.Contains(npcType); - } -} diff --git a/Systems/Collections/NPCs/BossHPScalingList.cs b/Systems/Collections/NPCs/BossHPScalingList.cs index 9a7076e3ce..e63b0fab88 100644 --- a/Systems/Collections/NPCs/BossHPScalingList.cs +++ b/Systems/Collections/NPCs/BossHPScalingList.cs @@ -84,9 +84,6 @@ namespace CalamityMod.Systems.Collections NPCType(), NPCType(), NPCType(), - NPCType(), - NPCType(), - NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 9f0f06c931..b2e605fa02 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -281,9 +281,6 @@ namespace CalamityMod { ModContent.NPCType(), immuneToEverything }, { ModContent.NPCType(), immuneToEverything }, { ModContent.NPCType(), immuneToEverything }, - { ModContent.NPCType(), immuneToEverything }, - { ModContent.NPCType(), immuneToEverything }, - { ModContent.NPCType(), immuneToEverything }, { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { BuffID.OnFire, ModContent.BuffType() }) },