From b68b4223fd1bdfab57afc580f6bb344f2f5138de Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 29 Apr 2026 17:48:32 -0400 Subject: [PATCH] GFB large Perforator now uses new DoG laser walls ...which means the old laser projectile can be deleted Also made FTW Perforators not spawn more worms at lower HP thresholds (this was broken anyways I'm pretty sure) --- .../Mods.CalamityMod.Projectiles.Boss.hjson | 1 - NPCs/Perforator/PerforatorHeadLarge.cs | 17 +- NPCs/Perforator/PerforatorHive.cs | 16 +- Projectiles/Boss/DoGDeath.cs | 149 ------------------ Projectiles/Boss/DoGDeath.png | Bin 296 -> 0 bytes 5 files changed, 4 insertions(+), 179 deletions(-) delete mode 100644 Projectiles/Boss/DoGDeath.cs delete mode 100644 Projectiles/Boss/DoGDeath.png diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson index 74f32b3085..87c74c3ceb 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Boss.hjson @@ -60,7 +60,6 @@ DeusMine.DisplayName: Astral Mine DeusRitualDrama.DisplayName: Deus Ritual Drama DoGBeam.DisplayName: Portal Laser DoGBeamPortal.DisplayName: Beam Portal -DoGDeath.DisplayName: Death Beam DoGDeathBoom.DisplayName: Cosmic Explosion DoGFire.DisplayName: "[ceffect/dog:Faith Incinerator]" DoGLaserWalls.DisplayName: "[ceffect/dog:God's Bane Doombeam Array]" diff --git a/NPCs/Perforator/PerforatorHeadLarge.cs b/NPCs/Perforator/PerforatorHeadLarge.cs index b35bc6f9c9..5e565e819d 100644 --- a/NPCs/Perforator/PerforatorHeadLarge.cs +++ b/NPCs/Perforator/PerforatorHeadLarge.cs @@ -337,26 +337,11 @@ namespace CalamityMod.NPCs.Perforator // This is possibly the best or worst idea ever conceived if (Main.zenithWorld) { - float laserOffset = 1500f; - float laserVelocity = 4f; - int type = ModContent.ProjectileType(); - int damage = LaserWallDamage; - NPC.Calamity().newAI[3]++; if (NPC.Calamity().newAI[3] > 180f) // Effectively 10 seconds but give a little headstart in case players kill it too fast { if (NPC.Calamity().newAI[3] % 60 == 59) - { - SoundEngine.PlaySound(SoundID.Item12, player.Center); - for (int i = -7; i < 8; i++) // 15 lasers - { - float laserGap = (i * 128f); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X + laserOffset, player.Center.Y + laserGap, -laserVelocity, 0f, type, damage, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X - laserOffset, player.Center.Y + laserGap, laserVelocity, 0f, type, damage, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X + laserGap, player.Center.Y + laserOffset, 0f, -laserVelocity, type, damage, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X + laserGap, player.Center.Y + laserOffset, 0f, laserVelocity, type, damage, 0f, Main.myPlayer); - } - } + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center + Main.rand.NextVector2CircularEdge(600, 600), Vector2.Zero, ModContent.ProjectileType(), LaserWallDamage, 0, Main.myPlayer, 0.45f, 180, Main.rand.Next(5)); if (NPC.Calamity().newAI[3] >= 300f) NPC.Calamity().newAI[3] = -300f; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 4699dddf4c..5b48c83dd6 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -162,9 +162,9 @@ namespace CalamityMod.NPCs.Perforator // Phases based on life percentage bool phase2 = lifeRatio < 0.7f; - bool spawnSmall = Main.getGoodWorld ? lifeRatio < 0.85f : lifeRatio < 0.75f; - bool spawnMedium = Main.getGoodWorld ? lifeRatio < 0.60f : lifeRatio < 0.50f; - bool spawnLarge = Main.getGoodWorld ? lifeRatio < 0.45f : lifeRatio < 0.25f; + bool spawnSmall = lifeRatio < 0.75f; + bool spawnMedium = lifeRatio < 0.50f; + bool spawnLarge = lifeRatio < 0.25f; if (!player.active || player.dead || Vector2.Distance(player.Center, NPC.Center) > 5600f || !(player.ZoneCrimson || BossRushEvent.BossRushActive)) { @@ -332,16 +332,6 @@ namespace CalamityMod.NPCs.Perforator GeneralParticleHandler.SpawnParticle(blood); } - - if (Main.getGoodWorld && lifeRatio < 0.5f && Main.netMode != NetmodeID.MultiplayerClient) - { - if (lifeRatio > 0.35f) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); - else if (lifeRatio > 0.2f) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); - else if (lifeRatio > 0.05f) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); - } if (wormType != -1) { squashTimer = squashInterval; // Start scaling animation diff --git a/Projectiles/Boss/DoGDeath.cs b/Projectiles/Boss/DoGDeath.cs deleted file mode 100644 index 685c26d719..0000000000 --- a/Projectiles/Boss/DoGDeath.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System.IO; -using CalamityMod.Buffs.DamageOverTime; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class DoGDeath : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Boss"; - - public float TelegraphDelay - { - get => Projectile.ai[0]; - set => Projectile.ai[0] = value; - } - - public Vector2 OldVelocity; - public const float TelegraphTotalTime = 35f; - public const float TelegraphFadeTime = 5f; - public const float TelegraphWidth = 2400f; - public const float FadeTime = 20f; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.DrawScreenCheckFluff[Type] = 10000; - } - - public override void SetDefaults() - { - Projectile.Calamity().DealsDefenseDamage = true; - Projectile.width = 10; - Projectile.height = 10; - Projectile.hostile = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.Opacity = 0f; - Projectile.penetrate = -1; - Projectile.timeLeft = 300; - CooldownSlot = ImmunityCooldownID.Bosses; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.WriteVector2(OldVelocity); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - OldVelocity = reader.ReadVector2(); - } - - public override void AI() - { - // Determine the relative opacities for each player based on their distance. - // This has a lower bound of 0.35 to prevent the laser from going completely invisible and players getting hit by cheap shots. - if (Projectile.localAI[0] == 0f) - { - Projectile.localAI[0] = 1f; - Projectile.netUpdate = true; - } - - // Fade in after telegraphs have faded. - if (TelegraphDelay > TelegraphTotalTime) - { - if (Projectile.timeLeft < FadeTime) - { - Projectile.Opacity = Projectile.timeLeft / FadeTime; - } - else - { - if (Projectile.Opacity < 1f) - Projectile.Opacity += 0.05f; - if (Projectile.Opacity > 1f) - Projectile.Opacity = 1f; - } - - // If an old velocity is in reserve, set the true velocity to it and make it as "taken" by setting it to <0,0> - if (OldVelocity != Vector2.Zero) - { - Projectile.velocity = OldVelocity; - OldVelocity = Vector2.Zero; - Projectile.netUpdate = true; - } - - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - } - - // Otherwise, be sure to save the velocity the projectile started with. It will be set again when the telegraph is over. - else if (OldVelocity == Vector2.Zero) - { - OldVelocity = Projectile.velocity; - Projectile.velocity = Vector2.Zero; - Projectile.netUpdate = true; - Projectile.rotation = OldVelocity.ToRotation() + MathHelper.PiOver2; - } - - TelegraphDelay++; - } - - public override bool CanHitPlayer(Player target) => TelegraphDelay > TelegraphTotalTime && Projectile.Opacity == 1f; - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - if (info.Damage <= 0) - return; - - if (TelegraphDelay > TelegraphTotalTime && Projectile.Opacity == 1f) - target.AddBuff(ModContent.BuffType(), 120); - } - - public override Color? GetAlpha(Color lightColor) => new Color(255, 255, 255, 0) * Projectile.Opacity; - - public override bool PreDraw(ref Color lightColor) - { - if (TelegraphDelay >= TelegraphTotalTime) - return true; - - // for old times sake - if (Main.zenithWorld) - return false; - - Texture2D laserTelegraph = ModContent.Request("CalamityMod/ExtraTextures/LaserWallTelegraphBeam").Value; - - float yScale = 2f; - if (TelegraphDelay < TelegraphFadeTime) - yScale = MathHelper.Lerp(0f, 2f, TelegraphDelay / TelegraphFadeTime); - if (TelegraphDelay > TelegraphTotalTime - TelegraphFadeTime) - yScale = MathHelper.Lerp(2f, 0f, (TelegraphDelay - (TelegraphTotalTime - TelegraphFadeTime)) / TelegraphFadeTime); - - Vector2 scaleInner = new Vector2(TelegraphWidth / laserTelegraph.Width, yScale); - Vector2 origin = laserTelegraph.Size() * new Vector2(0f, 0.5f); - Vector2 scaleOuter = scaleInner * new Vector2(1f, 1.6f); - - Color colorOuter = Color.Lerp(Color.Cyan, Color.Purple, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through purple and cyan once and then flash. - Color colorInner = Color.Lerp(colorOuter, Color.White, 0.75f); - - colorOuter *= 0.7f; - colorInner *= 0.7f; - - Main.EntitySpriteDraw(laserTelegraph, Projectile.Center - Main.screenPosition, null, colorInner, OldVelocity.ToRotation(), origin, scaleInner, SpriteEffects.None, 0); - Main.EntitySpriteDraw(laserTelegraph, Projectile.Center - Main.screenPosition, null, colorOuter, OldVelocity.ToRotation(), origin, scaleOuter, SpriteEffects.None, 0); - return false; - } - } -} diff --git a/Projectiles/Boss/DoGDeath.png b/Projectiles/Boss/DoGDeath.png deleted file mode 100644 index c1e09b93b3721eb90740f0eda6f0bb6871af2a4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmeAS@N?(olHy`uVBq!ia0vp^Ahrhw8<0G|DCHKAVo7)Ob!1@J*w6hZkrl}2Ebxdd zW?8eR=RL5ULAh?3y^w370~qEv>0#LT=By}Z;C1rt3(JriMvj3Yob%RF5i zLp;2b|NQ@N&ukmiUS#qW z76rfEUm25x&!jB!ZP8|#$zsgQa^dHa*&ZA{T1U9srZ@%sYF_Fn;P9NE%{;D>`=CL? zIr*@>BO2A$Djh!+T`=pgIGK8Wh0~sd5XCqH712f0lMD=I-06sOI&dJNNLkNepHo+@ k@84_pfJz!XT6uUFp78qLds`Ln40JJrr>mdKI;Vst0I7my7ytkO