From 5236dc053cfcb6ea1a290d11ed5ba5acc2fc8537 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Tue, 24 Aug 2021 01:53:09 -0500 Subject: [PATCH] 1 - Torrential Tear tooltip edit. 2 - Buffed Aegis Blade, Briny Baron and Sky Dragon's Fury left clicks. 3 - Nerfed Diseased Pike, Omniblade and Golem Fist. 4 - Ares giga death beam spiral. 5 - Ares Laser Arm fires normal lasers while Ares is doing the beam spiral. 6 - Thanatos adjustments. 7 - Malice Mode Crabulon jumps a bit quicker. 8 - Ravager jumps a bit more often. 9 - Rev+ Cultist channels the lightning orb attack for more time before doing other attacks. 10 - Ravager Body resists true melee by 50%. 11 - Res Butterfly minions take half a minion slot each now, greatly reduced the fire rate of the pink butterflies. 12 - Ravager head, claws and legs use the new piercing resist function. --- CalamityLists.cs | 5 + Items/CalamityGlobalItem.cs | 6 +- Items/Tools/ClimateChange/TorrentialTear.cs | 4 +- Items/Weapons/Melee/AegisBlade.cs | 4 +- Items/Weapons/Melee/BrinyBaron.cs | 4 +- Items/Weapons/Melee/DiseasedPike.cs | 2 +- Items/Weapons/Melee/Omniblade.cs | 2 +- NPCs/CalamityGlobalAI.cs | 8 +- NPCs/CalamityGlobalNPC.cs | 13 +- NPCs/Crabulon/CrabulonIdle.cs | 2 +- NPCs/ExoMechs/Ares/AresBody.cs | 43 ++-- NPCs/ExoMechs/Ares/AresGaussNuke.cs | 34 +-- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 122 ++++++---- NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs | 38 +-- NPCs/ExoMechs/Ares/AresTeslaCannon.cs | 38 +-- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 25 +- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 25 +- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 22 +- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 25 +- NPCs/Ravager/RavagerBody.cs | 3 +- Projectiles/Boss/AresDeathBeamStart.cs | 228 ++++++++++++++++++ Projectiles/Boss/AresDeathBeamTelegraph.cs | 117 +++++++++ Projectiles/Boss/ExoDestroyerBeamTelegraph.cs | 1 - Projectiles/Boss/ExoDestroyerLaser.cs | 14 +- Projectiles/Summon/PinkButterfly.cs | 6 +- Projectiles/Summon/PurpleButterfly.cs | 2 +- Utilities/NPCStats.cs | 3 +- 27 files changed, 610 insertions(+), 186 deletions(-) create mode 100644 Projectiles/Boss/AresDeathBeamStart.cs create mode 100644 Projectiles/Boss/AresDeathBeamTelegraph.cs diff --git a/CalamityLists.cs b/CalamityLists.cs index 572402216d..ead6599b37 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -2526,6 +2526,11 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index b9374002f8..60996feb83 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -258,7 +258,7 @@ namespace CalamityMod.Items break; case ItemID.GolemFist: - item.damage = 185; + item.damage = 150; break; case ItemID.BreakerBlade: @@ -443,6 +443,10 @@ namespace CalamityMod.Items item.damage = 20; break; + case ItemID.MonkStaffT3: + item.damage = 225; + break; + case ItemID.BookStaff: item.mana = 10; break; diff --git a/Items/Tools/ClimateChange/TorrentialTear.cs b/Items/Tools/ClimateChange/TorrentialTear.cs index 3a24847006..0e5d8a5956 100644 --- a/Items/Tools/ClimateChange/TorrentialTear.cs +++ b/Items/Tools/ClimateChange/TorrentialTear.cs @@ -14,8 +14,8 @@ namespace CalamityMod.Items.Tools.ClimateChange Tooltip.SetDefault("Summons the rain.\n" + "Rain will start some time after this item is used.\n" + "If used while it's raining, the rain will stop some time afterward.\n" + - "In Death Mode, using this item while it's raining will reduce the amount of time the rain lingers for\n" + - "to one minute; however, not any lower, and this will cause the rain to turn violent for that minute."); + "In Death Mode, using this item while it's raining will reduce the amount of time the rain lingers for to one minute.\n" + + "However, this will cause the rain to turn violent for that time."); } public override void SetDefaults() diff --git a/Items/Weapons/Melee/AegisBlade.cs b/Items/Weapons/Melee/AegisBlade.cs index 7d3419fe2b..b7cf42686c 100644 --- a/Items/Weapons/Melee/AegisBlade.cs +++ b/Items/Weapons/Melee/AegisBlade.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 58; item.height = 58; item.scale = 1.5f; - item.damage = 110; + item.damage = 135; item.melee = true; item.useAnimation = item.useTime = 15; item.useTurn = true; @@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 0.37), knockBack, player.whoAmI); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 0.3), knockBack, player.whoAmI); return false; } diff --git a/Items/Weapons/Melee/BrinyBaron.cs b/Items/Weapons/Melee/BrinyBaron.cs index 0fbb6efb04..78a70c5a9c 100644 --- a/Items/Weapons/Melee/BrinyBaron.cs +++ b/Items/Weapons/Melee/BrinyBaron.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.damage = 127; + item.damage = 155; item.knockBack = 4f; item.useAnimation = item.useTime = 15; item.melee = true; @@ -66,7 +66,7 @@ namespace CalamityMod.Items.Weapons.Melee public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 0.52), knockBack, player.whoAmI); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 0.43), knockBack, player.whoAmI); return false; } diff --git a/Items/Weapons/Melee/DiseasedPike.cs b/Items/Weapons/Melee/DiseasedPike.cs index b7853c91c5..096fd9403f 100644 --- a/Items/Weapons/Melee/DiseasedPike.cs +++ b/Items/Weapons/Melee/DiseasedPike.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 62; - item.damage = 92; + item.damage = 65; item.melee = true; item.noMelee = true; item.useTurn = true; diff --git a/Items/Weapons/Melee/Omniblade.cs b/Items/Weapons/Melee/Omniblade.cs index 6baf919099..566097b9bd 100644 --- a/Items/Weapons/Melee/Omniblade.cs +++ b/Items/Weapons/Melee/Omniblade.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 64; - item.damage = 138; + item.damage = 100; item.melee = true; item.useAnimation = 10; item.useStyle = ItemUseStyleID.SwingThrow; diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 1e4d6d56d1..62f7197ddf 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -11858,7 +11858,7 @@ namespace CalamityMod.NPCs int iceMistAmt = phase3 ? 2 : 1; int fireballFireRate = phase5 ? 10 : 12; float fireballSpeed = (phase6 ? 7.5f : 6f) + (death ? 2f * (1f - lifeRatio) : 0f) - (isCultist ? 0f : 3f); - int lightningOrbFireRate = phase2 ? 35 : 40; + int lightningOrbPhaseTime = phase2 ? 150 : 180; int ancientLightSpawnRate = phase4 ? 25 : 30; int ancientLightAmt = phase4 ? 3 : 2; int ancientDoomLimit = 10; @@ -11872,7 +11872,7 @@ namespace CalamityMod.NPCs iceMistAmt = enraged ? 4 : 3; fireballFireRate = enraged ? 6 : 8; fireballSpeed *= 1.2f; - lightningOrbFireRate = enraged ? 20 : 30; + lightningOrbPhaseTime = enraged ? 60 : 90; ancientLightSpawnRate = enraged ? 15 : 20; ancientLightAmt = enraged ? 5 : 4; idleTime = enraged ? 15 : 30; @@ -11907,7 +11907,7 @@ namespace CalamityMod.NPCs calamityGlobalNPC.newAI[0] = 120f; iceMistSpeed = 16f; iceMistFireRate = 15; - lightningOrbFireRate = 10; + lightningOrbPhaseTime = 30; ancientLightSpawnRate = 5; idleTime = 10; timeToFinishRitual = 120f; @@ -12391,7 +12391,7 @@ namespace CalamityMod.NPCs } npc.ai[1] += 1f; - if (npc.ai[1] >= (20 + lightningOrbFireRate)) + if (npc.ai[1] >= (20 + lightningOrbPhaseTime)) { npc.ai[0] = 0f; npc.ai[1] = 0f; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 24800216ef..d30c52cf28 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3317,7 +3317,8 @@ namespace CalamityMod.NPCs // True melee resists if (DesertScourgeIDs.Contains(npc.type) || EaterofWorldsIDs.Contains(npc.type) || npc.type == NPCID.Creeper || PerforatorIDs.Contains(npc.type) || AquaticScourgeIDs.Contains(npc.type) || DestroyerIDs.Contains(npc.type) || - AstrumDeusIDs.Contains(npc.type) || StormWeaverIDs.Contains(npc.type) || ThanatosIDs.Contains(npc.type) || npc.type == NPCType()) + AstrumDeusIDs.Contains(npc.type) || StormWeaverIDs.Contains(npc.type) || ThanatosIDs.Contains(npc.type) || + npc.type == NPCType() || npc.type == NPCType()) { if (item.melee && item.type != ItemType() && item.type != ItemType()) damage = (int)(damage * 0.5); @@ -3359,6 +3360,10 @@ namespace CalamityMod.NPCs } } + // Nerfed because the primary fire was buffed a lot. + if (projectile.type == ProjectileID.MonkStaffT3_AltShot || (projectile.type == ProjectileID.Electrosphere && Main.player[projectile.owner].ActiveItem().type == ItemID.MonkStaffT3)) + damage /= 4; + // Nerfed because these are really overpowered. if (projectile.type == ProjectileID.CursedDartFlame) damage /= 2; @@ -3379,6 +3384,12 @@ namespace CalamityMod.NPCs if (projectile.Calamity().trueMelee) damage = (int)(damage * 0.5); } + else if (npc.type == NPCType()) + { + // 50% resist to true melee. + if (projectile.Calamity().trueMelee) + damage = (int)(damage * 0.5); + } else if (AstrumDeusIDs.Contains(npc.type)) { // 75% resist to Stardust Dragon Staff and Plaguenades. diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index 634fbba787..0afb412c9d 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -379,7 +379,7 @@ namespace CalamityMod.NPCs.Crabulon npc.ai[1] += !revenge ? 4f : 1f; } - float jumpGateValue = (malice ? 90f : 240f) / (enrageScale + 1f); + float jumpGateValue = (malice ? 30f : 240f) / (enrageScale + 1f); if (npc.ai[1] >= jumpGateValue) { npc.ai[1] = -20f; diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 0a93a7e9d9..a1e1a4effe 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -5,6 +5,7 @@ using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using System.IO; using Terraria; using Terraria.ID; @@ -64,10 +65,10 @@ namespace CalamityMod.NPCs.ExoMechs.Ares private bool armsSpawned = false; // Total duration of the deathray telegraph - private const float deathrayTelegraphDuration = 240f; + public const float deathrayTelegraphDuration = 240f; // Total duration of the deathrays - private const float deathrayDuration = 600f; + public const float deathrayDuration = 600f; public override void SetStaticDefaults() { @@ -103,6 +104,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { writer.Write(npc.chaseable); writer.Write(npc.dontTakeDamage); + writer.Write(npc.localAI[0]); for (int i = 0; i < 4; i++) writer.Write(npc.Calamity().newAI[i]); } @@ -111,6 +113,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { npc.chaseable = reader.ReadBoolean(); npc.dontTakeDamage = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); for (int i = 0; i < 4; i++) npc.Calamity().newAI[i] = reader.ReadSingle(); } @@ -230,8 +233,9 @@ namespace CalamityMod.NPCs.ExoMechs.Ares bool anyOtherExoMechPassive = exoWormPassive || exoSpazPassive || exoRetPassive; // Phases - bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); bool spawnOtherExoMechs = lifeRatio > 0.4f && otherExoMechsAlive == 0 && lifeRatio < 0.7f; + bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); + bool lastMechAlive = berserk && otherExoMechsAlive == 0; // If Ares doesn't go berserk bool otherMechIsBerserk = exoWormLifeRatio < 0.4f || exoSpazLifeRatio < 0.4f || exoRetLifeRatio < 0.4f; @@ -349,7 +353,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares bool moveToLocation = Vector2.Distance(npc.Center, destination) > movementDistanceGateValue; // Gate values - float deathrayPhaseGateValue = 900f; + float deathrayPhaseGateValue = lastMechAlive ? 630f : 900f; float deathrayDistanceGateValue = 480f; // Passive and Immune phases @@ -487,10 +491,16 @@ namespace CalamityMod.NPCs.ExoMechs.Ares calamityGlobalNPC.newAI[3] = 1f; npc.velocity *= decelerationVelocityMult; - int totalProjectiles = 8; + int totalProjectiles = malice ? 12 : expertMode ? 10 : 8; float radians = MathHelper.TwoPi / totalProjectiles; - Vector2 spinningPoint = new Vector2(0f, -1f); Vector2 laserSpawnPoint = new Vector2(npc.Center.X, npc.Center.Y); + bool normalLaserRotation = npc.localAI[0] % 2f == 0f; + float velocity = 6f; + double angleA = radians * 0.5; + double angleB = MathHelper.ToRadians(90f) - angleA; + float velocityX2 = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB)); + Vector2 spinningPoint = normalLaserRotation ? new Vector2(0f, -velocity) : new Vector2(-velocityX2, -velocity); + spinningPoint.Normalize(); calamityGlobalNPC.newAI[2] += 1f; if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration) @@ -510,12 +520,14 @@ namespace CalamityMod.NPCs.ExoMechs.Ares if (Main.netMode != NetmodeID.MultiplayerClient) { - /*int type = ModContent.ProjectileType(); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + int type = ModContent.ProjectileType(); + Vector2 spawnPoint = npc.Center + new Vector2(-1f, 23f); for (int k = 0; k < totalProjectiles; k++) { - Vector2 velocity = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(laserSpawnPoint, velocity, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - }*/ + Vector2 laserVelocity = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(spawnPoint + Vector2.Normalize(laserVelocity) * 17f, laserVelocity, type, 0, 0f, Main.myPlayer, 0f, npc.whoAmI); + } } } } @@ -526,13 +538,15 @@ namespace CalamityMod.NPCs.ExoMechs.Ares { if (Main.netMode != NetmodeID.MultiplayerClient) { - /*int type = ModContent.ProjectileType(); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/TeslaCannonFire"), npc.Center); + int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); + Vector2 spawnPoint = npc.Center + new Vector2(-1f, 23f); for (int k = 0; k < totalProjectiles; k++) { - Vector2 velocity = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(laserSpawnPoint, velocity, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - }*/ + Vector2 laserVelocity = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(spawnPoint + Vector2.Normalize(laserVelocity) * 35f, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); + } } } } @@ -542,6 +556,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares AIState = (float)Phase.Normal; calamityGlobalNPC.newAI[2] = 0f; calamityGlobalNPC.newAI[3] = 0f; + npc.localAI[0] += 1f; npc.TargetClosest(); } } diff --git a/NPCs/ExoMechs/Ares/AresGaussNuke.cs b/NPCs/ExoMechs/Ares/AresGaussNuke.cs index 0af5d1a030..0f5fc187bf 100644 --- a/NPCs/ExoMechs/Ares/AresGaussNuke.cs +++ b/NPCs/ExoMechs/Ares/AresGaussNuke.cs @@ -120,48 +120,25 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Check if the other exo mechs are alive int otherExoMechsAlive = 0; - bool exoWormAlive = false; - bool exoSpazAlive = false; - bool exoRetAlive = false; if (CalamityGlobalNPC.draedonExoMechWorm != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active) - { otherExoMechsAlive++; - exoWormAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) - { otherExoMechsAlive++; - exoSpazAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) - { otherExoMechsAlive++; - exoRetAlive = true; - } } - // These are 5 by default to avoid triggering passive phases after the other mechs are dead - float exoWormLifeRatio = defaultLifeRatio; - float exoSpazLifeRatio = defaultLifeRatio; - float exoRetLifeRatio = defaultLifeRatio; - if (exoWormAlive) - exoWormLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechWorm].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechWorm].lifeMax; - if (exoSpazAlive) - exoSpazLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].lifeMax; - if (exoRetAlive) - exoRetLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].lifeMax; - float totalOtherExoMechLifeRatio = exoWormLifeRatio + exoSpazLifeRatio + exoRetLifeRatio; - // Phases bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); + bool lastMechAlive = berserk && otherExoMechsAlive == 0; // Target variable Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; @@ -231,6 +208,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Vector2 rotationVector = player.Center + predictionVector - npc.Center; float projectileVelocity = passivePhase ? 9.6f : 12f; + if (lastMechAlive) + projectileVelocity *= 1.2f; + else if (berserk) + projectileVelocity *= 1.1f; + float rateOfRotation = AIState == (int)Phase.GaussNuke ? 0.08f : 0.04f; Vector2 lookAt = Vector2.Normalize(rotationVector) * projectileVelocity; @@ -280,6 +262,10 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Gate values float gaussNukePhaseGateValue = 600f; + if (lastMechAlive) + gaussNukePhaseGateValue *= 0.7f; + else if (berserk) + gaussNukePhaseGateValue *= 0.85f; // Variable to disable deathray firing bool doNotFire = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays || calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune; diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 4ff77307c4..e113c0f50e 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -118,48 +118,25 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Check if the other exo mechs are alive int otherExoMechsAlive = 0; - bool exoWormAlive = false; - bool exoSpazAlive = false; - bool exoRetAlive = false; if (CalamityGlobalNPC.draedonExoMechWorm != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active) - { otherExoMechsAlive++; - exoWormAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) - { otherExoMechsAlive++; - exoSpazAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) - { otherExoMechsAlive++; - exoRetAlive = true; - } } - // These are 5 by default to avoid triggering passive phases after the other mechs are dead - float exoWormLifeRatio = defaultLifeRatio; - float exoSpazLifeRatio = defaultLifeRatio; - float exoRetLifeRatio = defaultLifeRatio; - if (exoWormAlive) - exoWormLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechWorm].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechWorm].lifeMax; - if (exoSpazAlive) - exoSpazLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].lifeMax; - if (exoRetAlive) - exoRetLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].lifeMax; - float totalOtherExoMechLifeRatio = exoWormLifeRatio + exoSpazLifeRatio + exoRetLifeRatio; - // Phases bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); + bool lastMechAlive = berserk && otherExoMechsAlive == 0; // Target variable Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; @@ -220,12 +197,15 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.Opacity = 0f; } + // Variable to fire normal lasers + bool fireNormalLasers = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; + // Rotate the cannon to look at the target while not firing the beam // Rotate the cannon to look in the direction it will fire only while it's charging or while it's firing // Rotation bool horizontalLaserSweep = calamityGlobalNPC.newAI[3] == 0f; float rateOfRotation = AIState == (int)Phase.Deathray ? 0.08f : 0.04f; - Vector2 lookAt = AIState == (int)Phase.Deathray ? (horizontalLaserSweep ? new Vector2(npc.Center.X, npc.Center.Y + 1000f) : new Vector2(npc.Center.X + 1000f, npc.Center.Y)) : player.Center; + Vector2 lookAt = AIState == (int)Phase.Deathray && !fireNormalLasers ? (horizontalLaserSweep ? new Vector2(npc.Center.X, npc.Center.Y + 1000f) : new Vector2(npc.Center.X + 1000f, npc.Center.Y)) : player.Center; float rotation = (float)Math.Atan2(lookAt.Y - npc.Center.Y, lookAt.X - npc.Center.X); if (npc.spriteDirection == 1) @@ -238,7 +218,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares npc.rotation = npc.rotation.AngleTowards(rotation, rateOfRotation); // Direction - int direction = Math.Sign((AIState == (int)Phase.Deathray && !horizontalLaserSweep ? lookAt.X : player.Center.X) - npc.Center.X); + int direction = Math.Sign(((AIState == (int)Phase.Deathray && !horizontalLaserSweep) || fireNormalLasers ? lookAt.X : player.Center.X) - npc.Center.X); if (direction != 0) { npc.direction = direction; @@ -273,10 +253,19 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Gate values float deathrayPhaseGateValue = 420f; + if (lastMechAlive) + deathrayPhaseGateValue *= 0.7f; + else if (berserk) + deathrayPhaseGateValue *= 0.85f; + float deathrayPhaseVelocity = passivePhase ? 12f : 15f; + if (lastMechAlive) + deathrayPhaseVelocity *= 1.2f; + else if (berserk) + deathrayPhaseVelocity *= 1.1f; // Variable to disable deathray firing - bool doNotFire = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays || calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune; + bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || (calamityGlobalNPC_Body.newAI[2] >= AresBody.deathrayTelegraphDuration + AresBody.deathrayDuration - 1 && fireNormalLasers); if (doNotFire) { AIState = (float)Phase.Nothing; @@ -336,33 +325,62 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } else { - // Two possible variants: 1 - Horizontal, 2 - Vertical - - // Movement while firing deathray - if (horizontalLaserSweep) - desiredVelocity.X = 0f; - else - desiredVelocity.Y = 0f; - - npc.SimpleFlyMovement(desiredVelocity, baseAcceleration); - npc.velocity = horizontalLaserSweep ? new Vector2(deathrayPhaseVelocity, npc.velocity.Y) : new Vector2(npc.velocity.X, deathrayPhaseVelocity); - - // Fire deathray - if (calamityGlobalNPC.newAI[2] == deathrayTelegraphDuration) + // Fire regular Thanatos lasers if Ares is in deathray phase, otherwise, fire deathray + if (fireNormalLasers) { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float offset = 84f; - float offset2 = 16f; - Vector2 source = horizontalLaserSweep ? new Vector2(npc.Center.X - offset2 * npc.direction, npc.Center.Y + offset) : new Vector2(npc.Center.X + offset * npc.direction, npc.Center.Y + offset2); - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), source); - Vector2 laserVelocity = Vector2.Normalize(lookAt - source); - if (laserVelocity.HasNaNs()) - laserVelocity = -Vector2.UnitY; + // Fly in place + if (moveToLocation) + npc.SimpleFlyMovement(desiredVelocity, baseAcceleration); + else + npc.velocity *= decelerationVelocityMult; - Projectile.NewProjectile(source, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); + // Fire a Thanatos laser + int numLasers = lastMechAlive ? 3 : 2; + float divisor = deathrayDuration / numLasers; + + if (calamityGlobalNPC.newAI[2] % divisor == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + Vector2 laserVelocity = Vector2.Normalize(player.Center - npc.Center); + Vector2 offset = laserVelocity * 70f + Vector2.UnitY * 16f; + Projectile.NewProjectile(npc.Center + offset, player.Center, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); + } + } + } + else + { + // Two possible variants: 1 - Horizontal, 2 - Vertical + + // Movement while firing deathray + if (horizontalLaserSweep) + desiredVelocity.X = 0f; + else + desiredVelocity.Y = 0f; + + npc.SimpleFlyMovement(desiredVelocity, baseAcceleration); + npc.velocity = horizontalLaserSweep ? new Vector2(deathrayPhaseVelocity, npc.velocity.Y) : new Vector2(npc.velocity.X, deathrayPhaseVelocity); + + // Fire deathray + if (calamityGlobalNPC.newAI[2] == deathrayTelegraphDuration) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + float offset = 84f; + float offset2 = 16f; + Vector2 source = horizontalLaserSweep ? new Vector2(npc.Center.X - offset2 * npc.direction, npc.Center.Y + offset) : new Vector2(npc.Center.X + offset * npc.direction, npc.Center.Y + offset2); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), source); + Vector2 laserVelocity = Vector2.Normalize(lookAt - source); + if (laserVelocity.HasNaNs()) + laserVelocity = -Vector2.UnitY; + + Projectile.NewProjectile(source, laserVelocity, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); + } } } } diff --git a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs index 2fa08cc73f..13af051555 100644 --- a/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs +++ b/NPCs/ExoMechs/Ares/AresPlasmaFlamethrower.cs @@ -118,48 +118,25 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Check if the other exo mechs are alive int otherExoMechsAlive = 0; - bool exoWormAlive = false; - bool exoSpazAlive = false; - bool exoRetAlive = false; if (CalamityGlobalNPC.draedonExoMechWorm != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active) - { otherExoMechsAlive++; - exoWormAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) - { otherExoMechsAlive++; - exoSpazAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) - { otherExoMechsAlive++; - exoRetAlive = true; - } } - // These are 5 by default to avoid triggering passive phases after the other mechs are dead - float exoWormLifeRatio = defaultLifeRatio; - float exoSpazLifeRatio = defaultLifeRatio; - float exoRetLifeRatio = defaultLifeRatio; - if (exoWormAlive) - exoWormLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechWorm].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechWorm].lifeMax; - if (exoSpazAlive) - exoSpazLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].lifeMax; - if (exoRetAlive) - exoRetLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].lifeMax; - float totalOtherExoMechLifeRatio = exoWormLifeRatio + exoSpazLifeRatio + exoRetLifeRatio; - // Phases bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); + bool lastMechAlive = berserk && otherExoMechsAlive == 0; // Target variable Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; @@ -229,6 +206,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Vector2 rotationVector = player.Center + predictionVector - npc.Center; float projectileVelocity = passivePhase ? 9.6f : 12f; + if (lastMechAlive) + projectileVelocity *= 1.2f; + else if (berserk) + projectileVelocity *= 1.1f; + float rateOfRotation = AIState == (int)Phase.PlasmaBolts ? 0.08f : 0.04f; Vector2 lookAt = Vector2.Normalize(rotationVector) * projectileVelocity; @@ -279,9 +261,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Gate values bool fireMoreBolts = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; float plasmaBoltPhaseGateValue = fireMoreBolts ? 90f : 210f; + if (lastMechAlive) + plasmaBoltPhaseGateValue *= 0.7f; + else if (berserk) + plasmaBoltPhaseGateValue *= 0.85f; // Variable to cancel plasma bolt firing - bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune; + bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || (calamityGlobalNPC_Body.newAI[2] >= AresBody.deathrayTelegraphDuration + AresBody.deathrayDuration - 1 && calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays); if (doNotFire) { AIState = (float)Phase.Nothing; @@ -328,7 +314,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares else { // Fire plasma bolts - int numPlasmaBolts = 2; + int numPlasmaBolts = lastMechAlive ? 3 : 2; float divisor = plasmaBoltDuration / numPlasmaBolts; if (calamityGlobalNPC.newAI[2] % divisor == 0f) diff --git a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs index abe0727456..9aeba2e661 100644 --- a/NPCs/ExoMechs/Ares/AresTeslaCannon.cs +++ b/NPCs/ExoMechs/Ares/AresTeslaCannon.cs @@ -118,48 +118,25 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Check if the other exo mechs are alive int otherExoMechsAlive = 0; - bool exoWormAlive = false; - bool exoSpazAlive = false; - bool exoRetAlive = false; if (CalamityGlobalNPC.draedonExoMechWorm != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechWorm].active) - { otherExoMechsAlive++; - exoWormAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) - { otherExoMechsAlive++; - exoSpazAlive = true; - } } if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) { if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) - { otherExoMechsAlive++; - exoRetAlive = true; - } } - // These are 5 by default to avoid triggering passive phases after the other mechs are dead - float exoWormLifeRatio = defaultLifeRatio; - float exoSpazLifeRatio = defaultLifeRatio; - float exoRetLifeRatio = defaultLifeRatio; - if (exoWormAlive) - exoWormLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechWorm].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechWorm].lifeMax; - if (exoSpazAlive) - exoSpazLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].lifeMax; - if (exoRetAlive) - exoRetLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].lifeMax; - float totalOtherExoMechLifeRatio = exoWormLifeRatio + exoSpazLifeRatio + exoRetLifeRatio; - // Phases bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); + bool lastMechAlive = berserk && otherExoMechsAlive == 0; // Target variable Player player = Main.player[Main.npc[CalamityGlobalNPC.draedonExoMechPrime].target]; @@ -229,6 +206,11 @@ namespace CalamityMod.NPCs.ExoMechs.Ares Vector2 rotationVector = player.Center + predictionVector - npc.Center; float projectileVelocity = passivePhase ? 7.2f : 9f; + if (lastMechAlive) + projectileVelocity *= 1.2f; + else if (berserk) + projectileVelocity *= 1.1f; + float rateOfRotation = AIState == (int)Phase.TeslaOrbs ? 0.08f : 0.04f; Vector2 lookAt = Vector2.Normalize(rotationVector) * projectileVelocity; @@ -279,9 +261,13 @@ namespace CalamityMod.NPCs.ExoMechs.Ares // Gate values bool fireMoreOrbs = calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays; float teslaOrbPhaseGateValue = fireMoreOrbs ? 90f : 210f; + if (lastMechAlive) + teslaOrbPhaseGateValue *= 0.7f; + else if (berserk) + teslaOrbPhaseGateValue *= 0.85f; // Variable to cancel tesla orb firing - bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune; + bool doNotFire = calamityGlobalNPC_Body.newAI[1] == (float)AresBody.SecondaryPhase.PassiveAndImmune || (calamityGlobalNPC_Body.newAI[2] >= AresBody.deathrayTelegraphDuration + AresBody.deathrayDuration - 1 && calamityGlobalNPC_Body.newAI[0] == (float)AresBody.Phase.Deathrays); if (doNotFire) { AIState = (float)Phase.Nothing; @@ -328,7 +314,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares else { // Fire tesla orbs - int numTeslaOrbs = 4; + int numTeslaOrbs = lastMechAlive ? 6 : berserk ? 5 : 4; float divisor = teslaOrbDuration / numTeslaOrbs; if (calamityGlobalNPC.newAI[2] % divisor == 0f) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 50882c6636..9516900b75 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -145,11 +145,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (npc.localAI[2] == 0f) npc.localAI[2] = npc.ai[0]; + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; + + // Check if the other exo mechs are alive + int otherExoMechsAlive = 0; + if (CalamityGlobalNPC.draedonExoMechPrime != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) + otherExoMechsAlive++; + } + if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) + otherExoMechsAlive++; + } + if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) + otherExoMechsAlive++; + } + // Set the AI to become more aggressive if head is berserk - if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Deathray) - npc.Calamity().newAI[3] = 1f; + bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); - bool berserk = npc.Calamity().newAI[3] == 1f; bool shootLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage || berserk) && calamityGlobalNPC_Head.newAI[2] > 0f; if (shootLasers && !invisiblePhase) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 7bcea695fe..b08e827f0a 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -145,11 +145,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (npc.localAI[2] == 0f) npc.localAI[2] = npc.ai[0]; + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; + + // Check if the other exo mechs are alive + int otherExoMechsAlive = 0; + if (CalamityGlobalNPC.draedonExoMechPrime != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) + otherExoMechsAlive++; + } + if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) + otherExoMechsAlive++; + } + if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) + otherExoMechsAlive++; + } + // Set the AI to become more aggressive if head is berserk - if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Deathray) - npc.Calamity().newAI[3] = 1f; + bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); - bool berserk = npc.Calamity().newAI[3] == 1f; bool shootLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage || berserk) && calamityGlobalNPC_Head.newAI[2] > 0f; if (shootLasers && !invisiblePhase) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index b64e335367..99c7153a93 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -220,8 +220,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos bool anyOtherExoMechPassive = exoPrimePassive || exoSpazPassive || exoRetPassive; // Phases - bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); bool spawnOtherExoMechs = lifeRatio > 0.4f && otherExoMechsAlive == 0 && lifeRatio < 0.7f; + bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); + bool lastMechAlive = berserk && otherExoMechsAlive == 0; // Set vulnerable to false by default vulnerable = false; @@ -335,10 +336,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Phase gate values float velocityAdjustTime = 20f; - float speedUpTime = berserk ? 360f : 480f; - float slowDownTime = berserk ? 90f : 120f; + float speedUpTime = lastMechAlive ? 270f : berserk ? 360f : 480f; + float slowDownTime = lastMechAlive ? 60f : berserk ? 90f : 120f; float chargePhaseGateValue = speedUpTime + slowDownTime; - float laserBarrageDuration = berserk ? 330f : 420f; + float laserBarrageDuration = lastMechAlive ? 285f : berserk ? 330f : 420f; // Adjust opacity bool invisiblePhase = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune; @@ -389,8 +390,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float chargeTurnSpeedMult = MathHelper.Lerp(1f, 1.5f, chargeVelocityScalar); float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 1.5f, chargeVelocityScalar); float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); - float deathrayVelocityMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); - float deathrayTurnSpeedMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); + float deathrayVelocityMult = MathHelper.Lerp(0.5f, 3f, chargeVelocityScalar); + float deathrayTurnSpeedMult = MathHelper.Lerp(0.5f, 3f, chargeVelocityScalar); // Base scale on total time spent in phase float chargeVelocityScalarIncrement = 1f / speedUpTime; @@ -400,7 +401,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float deathrayVelocityScalarIncrement = 1f / deathrayDuration; // Scalar to use during laser barrage, passive and immune phases - float laserBarrageVelocityScalarIncrement = berserk ? 0.02f : 0.01f; + float laserBarrageVelocityScalarIncrement = lastMechAlive ? 0.025f : berserk ? 0.02f : 0.01f; float laserBarrageVelocityScalarDecrement = 1f / velocityAdjustTime; // Distance from target @@ -571,8 +572,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos turnDistance = chargeLocationDistance; // Gradually turn slower if within 20 tiles of the target - if (distanceFromTarget < 320f) - turnSpeed *= distanceFromTarget / 320f; + float turnSlowerDistanceGateValue = lastMechAlive ? 160f : 320f; + if (distanceFromTarget < turnSlowerDistanceGateValue) + turnSpeed *= distanceFromTarget / turnSlowerDistanceGateValue; calamityGlobalNPC.newAI[2] += 1f; if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) @@ -640,7 +642,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos vulnerable = true; // If close enough to the target, prepare to fire deathray - float slowDownDistance = 800f; + float slowDownDistance = lastMechAlive ? 640f : 800f; bool readyToFireDeathray = distanceFromTarget < slowDownDistance; if (readyToFireDeathray) npc.localAI[2] = 1f; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 678b35ac5e..00717a20d2 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -144,11 +144,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (npc.localAI[2] == 0f) npc.localAI[2] = npc.ai[0]; + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; + + // Check if the other exo mechs are alive + int otherExoMechsAlive = 0; + if (CalamityGlobalNPC.draedonExoMechPrime != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) + otherExoMechsAlive++; + } + if (CalamityGlobalNPC.draedonExoMechTwinGreen != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].active) + otherExoMechsAlive++; + } + if (CalamityGlobalNPC.draedonExoMechTwinRed != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].active) + otherExoMechsAlive++; + } + // Set the AI to become more aggressive if head is berserk - if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Deathray) - npc.Calamity().newAI[3] = 1f; + bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); - bool berserk = npc.Calamity().newAI[3] == 1f; bool shootLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage || berserk) && calamityGlobalNPC_Head.newAI[2] > 0f; if (shootLasers && !invisiblePhase) { diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 8c498eeab0..778a105e52 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -333,7 +333,8 @@ namespace CalamityMod.NPCs.Ravager npc.ai[1] += 1f; } - if (npc.ai[1] >= 300f) + float jumpGateValue = 180f; + if (npc.ai[1] >= jumpGateValue) npc.ai[1] = -20f; else if (npc.ai[1] == -1f) { diff --git a/Projectiles/Boss/AresDeathBeamStart.cs b/Projectiles/Boss/AresDeathBeamStart.cs new file mode 100644 index 0000000000..6808d3dbbc --- /dev/null +++ b/Projectiles/Boss/AresDeathBeamStart.cs @@ -0,0 +1,228 @@ +using CalamityMod.Events; +using CalamityMod.NPCs.ExoMechs.Ares; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.Enums; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class AresDeathBeamStart : ModProjectile + { + private const int maxFrames = 5; + private int frameDrawn = 0; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Death Beam"); + } + + public override void SetDefaults() + { + projectile.Calamity().canBreakPlayerDefense = true; + projectile.width = 30; + projectile.height = 30; + projectile.hostile = true; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.tileCollide = false; + projectile.timeLeft = 600; + cooldownSlot = 1; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(frameDrawn); + writer.Write(projectile.localAI[0]); + writer.Write(projectile.localAI[1]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + frameDrawn = reader.ReadInt32(); + projectile.localAI[0] = reader.ReadSingle(); + projectile.localAI[1] = reader.ReadSingle(); + } + + public override void AI() + { + // Difficulty modes + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || malice; + bool revenge = CalamityWorld.revenge || malice; + bool expertMode = Main.expertMode || malice; + + Vector2? vector78 = null; + + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) + projectile.velocity = -Vector2.UnitY; + + if (Main.npc[(int)projectile.ai[1]].active && Main.npc[(int)projectile.ai[1]].type == ModContent.NPCType()) + { + Vector2 fireFrom = new Vector2(Main.npc[(int)projectile.ai[1]].Center.X - 1f, Main.npc[(int)projectile.ai[1]].Center.Y + 23f) + Vector2.Normalize(projectile.velocity) * 35f; + projectile.position = fireFrom - new Vector2(projectile.width, projectile.height) / 2f; + } + else + projectile.Kill(); + + float num801 = 1f; + projectile.localAI[0] += 1f; + if (projectile.localAI[0] >= 600f) + { + projectile.Kill(); + return; + } + + projectile.scale = (float)Math.Sin(projectile.localAI[0] * (float)Math.PI / 600f) * 10f * num801; + if (projectile.scale > num801) + projectile.scale = num801; + + float num804 = projectile.velocity.ToRotation(); + float divisor = malice ? 300f : death ? 320f : revenge ? 330f : expertMode ? 340f : 360f; + num804 += MathHelper.TwoPi / divisor; + projectile.rotation = num804 - MathHelper.PiOver2; + projectile.velocity = num804.ToRotationVector2(); + + float num805 = 3f; //3f + float num806 = projectile.width; + + Vector2 samplingPoint = projectile.Center; + if (vector78.HasValue) + samplingPoint = vector78.Value; + + float[] array3 = new float[(int)num805]; + Collision.LaserScan(samplingPoint, projectile.velocity, num806 * projectile.scale, 2400f, array3); + float num807 = 0f; + for (int num808 = 0; num808 < array3.Length; num808++) + { + num807 += array3[num808]; + } + num807 /= num805; + + // Fire laser through walls at max length if target cannot be seen + if (!Collision.CanHitLine(Main.npc[(int)projectile.ai[1]].Center, 1, 1, Main.player[Main.npc[(int)projectile.ai[1]].target].Center, 1, 1)) + { + num807 = 2400f; + } + + float amount = 0.5f; + projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], num807, amount); // Length of laser, linear interpolation + + // Spawn dust at the end of the beam + int dustType = 107; + Vector2 dustPos = projectile.Center + projectile.velocity * (projectile.localAI[1] - 14f); + for (int i = 0; i < 2; i++) + { + float dustRot = projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2; + float dustVelMult = (float)Main.rand.NextDouble() * 2f + 2f; + Vector2 dustVel = new Vector2((float)Math.Cos(dustRot) * dustVelMult, (float)Math.Sin(dustRot) * dustVelMult); + int dust = Dust.NewDust(dustPos, 0, 0, dustType, dustVel.X, dustVel.Y, 0, new Color(0, 255, 255), 1f); + Main.dust[dust].noGravity = true; + Main.dust[dust].scale = 1.7f; + } + + if (Main.rand.NextBool(5)) + { + Vector2 dustRot = projectile.velocity.RotatedBy(MathHelper.PiOver2, default) * ((float)Main.rand.NextDouble() - 0.5f) * projectile.width; + int dust = Dust.NewDust(dustPos + dustRot - Vector2.One * 4f, 8, 8, dustType, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[dust].velocity *= 0.5f; + Main.dust[dust].velocity.Y = -Math.Abs(Main.dust[dust].velocity.Y); + } + + DelegateMethods.v3_1 = new Vector3(0.9f, 0.3f, 0.3f); + Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight)); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (projectile.velocity == Vector2.Zero) + return false; + + Texture2D beamStart = Main.projectileTexture[projectile.type]; + Texture2D beamMiddle = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresDeathBeamMiddle"); + Texture2D beamEnd = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/AresDeathBeamEnd"); + + float drawLength = projectile.localAI[1]; + Color color = new Color(250, 250, 250, 100); + + if (projectile.localAI[0] % 5f == 0f) + { + frameDrawn++; + if (frameDrawn >= maxFrames) + frameDrawn = 0; + } + + // Draw start of beam + Vector2 vector = projectile.Center - Main.screenPosition; + Rectangle? sourceRectangle = new Rectangle(0, beamStart.Height / maxFrames * frameDrawn, beamStart.Width, beamStart.Height / maxFrames); + spriteBatch.Draw(beamStart, vector, sourceRectangle, color, projectile.rotation, new Vector2(beamStart.Width, beamStart.Height / maxFrames) / 2f, projectile.scale, SpriteEffects.None, 0f); + + // Draw middle of beam + drawLength -= (beamStart.Height / maxFrames / 2 + beamEnd.Height / maxFrames) * projectile.scale; + Vector2 center = projectile.Center; + center += projectile.velocity * projectile.scale * beamStart.Height / maxFrames / 2f; + if (drawLength > 0f) + { + float i = 0f; + int middleFrameDrawn = frameDrawn; + while (i + 1f < drawLength) + { + Rectangle rectangle = new Rectangle(0, beamMiddle.Height / maxFrames * middleFrameDrawn, beamMiddle.Width, beamMiddle.Height / maxFrames); + + if (drawLength - i < rectangle.Height) + rectangle.Height = (int)(drawLength - i); + + spriteBatch.Draw(beamMiddle, center - Main.screenPosition, rectangle, color, projectile.rotation, new Vector2(rectangle.Width / 2f, 0f), projectile.scale, SpriteEffects.None, 0f); + + middleFrameDrawn++; + if (middleFrameDrawn >= maxFrames) + middleFrameDrawn = 0; + + i += rectangle.Height * projectile.scale; + center += projectile.velocity * rectangle.Height * projectile.scale; + + rectangle.Y += beamMiddle.Height / maxFrames; + if (rectangle.Y + rectangle.Height > beamMiddle.Height / maxFrames) + rectangle.Y = 0; + } + } + + // Draw end of beam + Vector2 vector2 = center - Main.screenPosition; + sourceRectangle = new Rectangle(0, beamEnd.Height / maxFrames * frameDrawn, beamEnd.Width, beamEnd.Height / maxFrames); + spriteBatch.Draw(beamEnd, vector2, sourceRectangle, color, projectile.rotation, new Vector2(beamEnd.Width, beamEnd.Height / maxFrames) / 2f, projectile.scale, SpriteEffects.None, 0f); + + return false; + } + + public override void CutTiles() + { + DelegateMethods.tilecut_0 = TileCuttingContext.AttackProjectile; + Vector2 unit = projectile.velocity; + Utils.PlotTileLine(projectile.Center, projectile.Center + unit * projectile.localAI[1], projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles)); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (projHitbox.Intersects(targetHitbox)) + { + return true; + } + float num6 = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], 30f * projectile.scale, ref num6)) + { + return true; + } + return false; + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + target.Calamity().lastProjectileHit = projectile; + } + } +} diff --git a/Projectiles/Boss/AresDeathBeamTelegraph.cs b/Projectiles/Boss/AresDeathBeamTelegraph.cs new file mode 100644 index 0000000000..b2d582d96c --- /dev/null +++ b/Projectiles/Boss/AresDeathBeamTelegraph.cs @@ -0,0 +1,117 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class AresDeathBeamTelegraph : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public float TelegraphDelay + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + + public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[1]) ? Main.npc[(int)projectile.ai[1]] : null; + + public Vector2 OldVelocity; + public const float TelegraphTotalTime = 240f; + public const float TelegraphFadeTime = 15f; + public const float TelegraphWidth = 4200f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Death Beam Telegraph"); + } + + public override void SetDefaults() + { + projectile.width = 10; + projectile.height = 10; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.timeLeft = 240; + } + + 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. + if (projectile.localAI[0] == 0f) + { + projectile.localAI[0] = 1f; + projectile.netUpdate = true; + } + + // Die if the thing to attach to disappears. + if (ThingToAttachTo is null || !ThingToAttachTo.active) + { + projectile.Kill(); + return; + } + + // Set start of telegraph to the npc center. + projectile.Center = ThingToAttachTo.Center + new Vector2(-1f, 23f) + (Vector2.Normalize(OldVelocity) * 17f); + + // Be sure to save the velocity the projectile started with. It will be set again when the telegraph is over. + if (OldVelocity == Vector2.Zero) + { + OldVelocity = projectile.velocity; + projectile.velocity = Vector2.Zero; + projectile.netUpdate = true; + projectile.rotation = OldVelocity.ToRotation() + MathHelper.PiOver2; + } + + TelegraphDelay++; + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 255, 255, projectile.alpha); + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + if (TelegraphDelay >= TelegraphTotalTime) + return true; + + Texture2D laserTelegraph = ModContent.GetTexture("CalamityMod/ExtraTextures/LaserWallTelegraphBeam"); + float yScale = 4f; + if (TelegraphDelay < TelegraphFadeTime) + yScale = MathHelper.Lerp(0f, 4f, TelegraphDelay / 15f); + if (TelegraphDelay > TelegraphTotalTime - TelegraphFadeTime) + yScale = MathHelper.Lerp(4f, 0f, (TelegraphDelay - (TelegraphTotalTime - TelegraphFadeTime)) / 15f); + + 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.LightGreen, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through light green and cyan once and then flash. + Color colorInner = Color.Lerp(colorOuter, Color.White, 0.75f); + + colorOuter *= 0.7f; + colorInner *= 0.7f; + + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorInner, OldVelocity.ToRotation(), origin, scaleInner, SpriteEffects.None, 0f); + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorOuter, OldVelocity.ToRotation(), origin, scaleOuter, SpriteEffects.None, 0f); + + return false; + } + } +} diff --git a/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs index 0bc632e560..1a120d317a 100644 --- a/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs +++ b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs @@ -27,7 +27,6 @@ namespace CalamityMod.Projectiles.Boss projectile.tileCollide = false; projectile.alpha = 255; projectile.penetrate = -1; - projectile.extraUpdates = 1; projectile.timeLeft = Lifetime; } diff --git a/Projectiles/Boss/ExoDestroyerLaser.cs b/Projectiles/Boss/ExoDestroyerLaser.cs index 29726b34aa..67996cd690 100644 --- a/Projectiles/Boss/ExoDestroyerLaser.cs +++ b/Projectiles/Boss/ExoDestroyerLaser.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.NPCs.ExoMechs.Ares; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -144,6 +145,9 @@ namespace CalamityMod.Projectiles.Boss return; } + // If the Ares Laser Cannon is the owner + bool aresLaserIsOwner = ThingToAttachTo.type == ModContent.NPCType(); + // Fade in after telegraphs have faded. if (TelegraphDelay > TelegraphTotalTime) { @@ -181,6 +185,9 @@ namespace CalamityMod.Projectiles.Boss // Set destination of the laser, the target's center. Destination = projectile.velocity; + if (aresLaserIsOwner) + projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f + Vector2.UnitY * 16f; + // Calculate and store the velocity that will be used for laser telegraph rotation and beam firing. Vector2 projectileDestination = Destination - ThingToAttachTo.Center; Velocity = Vector2.Normalize(projectileDestination) * LaserVelocity; @@ -206,6 +213,9 @@ namespace CalamityMod.Projectiles.Boss // Set start of telegraph to the npc center. projectile.Center = ThingToAttachTo.Center; + if (aresLaserIsOwner) + projectile.Center += Vector2.Normalize(Destination - ThingToAttachTo.Center) * 70f + Vector2.UnitY * 16f; + // Calculate and store the velocity that will be used for laser telegraph rotation and beam firing. Vector2 projectileDestination = Destination - ThingToAttachTo.Center; Velocity = Vector2.Normalize(projectileDestination) * LaserVelocity; @@ -231,9 +241,7 @@ namespace CalamityMod.Projectiles.Boss public override void OnHitPlayer(Player target, int damage, bool crit) { if (TelegraphDelay > TelegraphTotalTime) - { target.AddBuff(ModContent.BuffType(), 180); - } } public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) @@ -249,7 +257,7 @@ namespace CalamityMod.Projectiles.Boss lightColor.G = (byte)(255 * projectile.Opacity); lightColor.B = (byte)(255 * projectile.Opacity); CalamityUtils.DrawAfterimagesCentered(projectile, ProjectileID.Sets.TrailingMode[projectile.type], lightColor, 1); - return true; + return false; } Texture2D laserTelegraph = ModContent.GetTexture("CalamityMod/ExtraTextures/LaserWallTelegraphBeam"); diff --git a/Projectiles/Summon/PinkButterfly.cs b/Projectiles/Summon/PinkButterfly.cs index 322ec34f58..190eff0efb 100644 --- a/Projectiles/Summon/PinkButterfly.cs +++ b/Projectiles/Summon/PinkButterfly.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Summon projectile.netImportant = true; projectile.friendly = true; projectile.ignoreWater = true; - projectile.minionSlots = 1f; + projectile.minionSlots = 0.5f; projectile.timeLeft = 18000; projectile.penetrate = -1; projectile.tileCollide = false; @@ -209,7 +209,7 @@ namespace CalamityMod.Projectiles.Summon projectile.ai[1] += (float)Main.rand.Next(1, 3); // Reset timer - if (projectile.ai[1] > 70f) + if (projectile.ai[1] > 300f) { projectile.ai[1] = 0f; projectile.netUpdate = true; @@ -238,7 +238,7 @@ namespace CalamityMod.Projectiles.Summon for (int i = 0; i < numProj + 1; i++) { Vector2 perturbedSpeed = value19.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (numProj - 1))); - Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, perturbedSpeed.X, perturbedSpeed.Y, projectileType, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, targetIndex, 0f); + Projectile.NewProjectile(projectile.Center, perturbedSpeed, projectileType, projectile.damage / 2, projectile.knockBack * 0.5f, projectile.owner, targetIndex, 0f); } projectile.netUpdate = true; } diff --git a/Projectiles/Summon/PurpleButterfly.cs b/Projectiles/Summon/PurpleButterfly.cs index 316b161435..9b0449f328 100644 --- a/Projectiles/Summon/PurpleButterfly.cs +++ b/Projectiles/Summon/PurpleButterfly.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Projectiles.Summon projectile.netImportant = true; projectile.friendly = true; projectile.ignoreWater = true; - projectile.minionSlots = 1f; + projectile.minionSlots = 0.5f; projectile.timeLeft = 18000; projectile.penetrate = -1; projectile.tileCollide = false; diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 8aa32964b6..2aaedde160 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -804,8 +804,9 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, - //{ new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 450, 676, 712, 732, 1068 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 500, 752, 788, 808, 1182 } },