From b2e8b0e227273eb95378e477754a5ff773f0e4e8 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 8 Jun 2021 15:13:31 -0500 Subject: [PATCH 001/103] Made Prov's box smaller and only spawn in hell --- NPCs/Providence/Providence.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 199312fff7..35d763b934 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -1344,10 +1344,8 @@ namespace CalamityMod.NPCs.Providence DropHelper.DropItemChance(npc, ModContent.ItemType(), 7); } - if (Main.netMode != NetmodeID.MultiplayerClient) - { + if (Main.netMode != NetmodeID.MultiplayerClient && npc.Top.Y >= (Main.maxTilesY - 240f) * 16f) SpawnLootBox(); - } // If Providence has not been killed, notify players of Uelibloom Ore if (!CalamityWorld.downedProvidence) @@ -1380,7 +1378,7 @@ namespace CalamityMod.NPCs.Providence { int tileCenterX = (int)npc.Center.X / 16; int tileCenterY = (int)npc.Center.Y / 16; - int halfBox = npc.width / 2 / 16 + 1; + int halfBox = 5; for (int x = tileCenterX - halfBox; x <= tileCenterX + halfBox; x++) { for (int y = tileCenterY - halfBox; y <= tileCenterY + halfBox; y++) From 61821b1481331658881f63e3aff61efe71f16fa9 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 8 Jun 2021 15:42:39 -0500 Subject: [PATCH 002/103] Faster Deus ritual with starcore --- Projectiles/Boss/DeusRitualDrama.cs | 43 +++++++++++++++-------------- Tiles/Astral/AstralBeacon.cs | 2 +- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/Projectiles/Boss/DeusRitualDrama.cs b/Projectiles/Boss/DeusRitualDrama.cs index 4500b25e80..35c1eadd39 100644 --- a/Projectiles/Boss/DeusRitualDrama.cs +++ b/Projectiles/Boss/DeusRitualDrama.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Projectiles.Boss get => projectile.ai[0]; set => projectile.ai[0] = value; } + public bool CreatedWithStarcore => projectile.ai[1] == 1f; public const int TotalSinePeriods = 6; public const int PulseTime = 45; public const int TotalRitualTime = 420; @@ -37,26 +38,28 @@ namespace CalamityMod.Projectiles.Boss projectile.timeLeft = TotalRitualTime; } - public override void AI() - { - Time++; - if (Time == TotalRitualTime - PulseTime) - { - int idx = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y - (int)MaxUpwardRise, ModContent.NPCType(), 1); - if (idx != -1) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AstrumDeusSpawn"), projectile.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - CalamityUtils.BossAwakenMessage(idx); - } - else - { - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, idx); - } - } - } - } + public override void AI() + { + projectile.extraUpdates = CreatedWithStarcore.ToInt(); + + Time++; + if (Time == TotalRitualTime - PulseTime) + { + int idx = NPC.NewNPC((int)projectile.Center.X, (int)projectile.Center.Y - (int)MaxUpwardRise, ModContent.NPCType(), 1); + if (idx != -1) + { + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AstrumDeusSpawn"), projectile.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + CalamityUtils.BossAwakenMessage(idx); + } + else + { + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, idx); + } + } + } + } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { diff --git a/Tiles/Astral/AstralBeacon.cs b/Tiles/Astral/AstralBeacon.cs index d96b508ddd..70285acf2c 100644 --- a/Tiles/Astral/AstralBeacon.cs +++ b/Tiles/Astral/AstralBeacon.cs @@ -75,7 +75,7 @@ namespace CalamityMod.Tiles.Astral ritualSpawnPosition += new Vector2(0f, -24f); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/AstralBeaconUse"), ritualSpawnPosition); - Projectile.NewProjectile(ritualSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + Projectile.NewProjectile(ritualSpawnPosition, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, usingStarcore.ToInt()); if (!usingStarcore) Main.LocalPlayer.ConsumeItem(ModContent.ItemType(), true); From 6defef305fe81ae232f7a758cfc79f9751a810fe Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 12:11:59 -0500 Subject: [PATCH 003/103] Ripper UIs no longer disrupt item usage --- UI/RipperUI.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index aaa160648b..decf267d25 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -258,7 +258,6 @@ namespace CalamityMod.UI if (rageHover && !adrenHover) { // Add hover text if the mouse is over Rage bar - Main.LocalPlayer.mouseInterface = true; string rageStr = MakeRipperPercentString(modPlayer.rage, modPlayer.rageMax); Main.instance.MouseText($"Rage: {rageStr}"); @@ -273,7 +272,6 @@ namespace CalamityMod.UI else if (adrenHover) { // Add hover text if the mouse is over the bar - Main.LocalPlayer.mouseInterface = true; string adrenStr = MakeRipperPercentString(modPlayer.adrenaline, modPlayer.adrenalineMax); Main.instance.MouseText($"Adrenaline: {adrenStr}"); From 92fc16724b1a0e05754e3c0aee3467d651ccacad Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 12:29:39 -0500 Subject: [PATCH 004/103] Ankh Shield+ immunity to mighty wind --- CalPlayer/CalamityPlayer.cs | 8 ++++++++ Items/Accessories/AsgardianAegis.cs | 1 + Items/Accessories/AsgardsValor.cs | 1 + Items/CalamityGlobalItemTooltip.cs | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 29aa2262f3..918e6669e9 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -3495,6 +3495,7 @@ namespace CalamityMod.CalPlayer for (int n = 13; n < 18 + player.extraAccessorySlots; n++) { Item item = player.armor[n]; + if (item.type == ModContent.ItemType()) { snowmanHide = false; @@ -3524,6 +3525,13 @@ namespace CalamityMod.CalPlayer public override void UpdateEquips(ref bool wallSpeedBuff, ref bool tileSpeedBuff, ref bool tileRangeBuff) { + // Ankh Shield Mighty Wind immunity. + for (int i = 0; i < 8 + player.extraAccessorySlots; i++) + { + if (player.armor[i].type == ItemID.AnkhShield) + player.buffImmune[BuffID.WindPushed] = true; + } + if (CalamityConfig.Instance.BossHealthBar) { drawBossHPBar = true; diff --git a/Items/Accessories/AsgardianAegis.cs b/Items/Accessories/AsgardianAegis.cs index 35ceb5509b..c7002d826b 100644 --- a/Items/Accessories/AsgardianAegis.cs +++ b/Items/Accessories/AsgardianAegis.cs @@ -66,6 +66,7 @@ namespace CalamityMod.Items.Accessories player.buffImmune[BuffID.Silenced] = true; player.buffImmune[BuffID.Cursed] = true; player.buffImmune[BuffID.Darkness] = true; + player.buffImmune[BuffID.WindPushed] = true; player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; player.buffImmune[ModContent.BuffType()] = true; diff --git a/Items/Accessories/AsgardsValor.cs b/Items/Accessories/AsgardsValor.cs index ca086946d4..a0e1bd0fd4 100644 --- a/Items/Accessories/AsgardsValor.cs +++ b/Items/Accessories/AsgardsValor.cs @@ -49,6 +49,7 @@ namespace CalamityMod.Items.Accessories player.buffImmune[BuffID.Silenced] = true; player.buffImmune[BuffID.Cursed] = true; player.buffImmune[BuffID.Darkness] = true; + player.buffImmune[BuffID.WindPushed] = true; player.statLifeMax2 += 20; if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir)) { player.statDefense += 16; } diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index bf5da7bdde..c8e36182e8 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -264,6 +264,10 @@ namespace CalamityMod.Items if (item.type == ItemID.RodofDiscord) EditTooltipByNum(0, (line) => line.text += "\nTeleportation is disabled while Chaos State is active"); + // Indicate that the Ankh Shield provides sandstorm wind push immunity + if (item.type == ItemID.AnkhShield) + EditTooltipByNum(1, (line) => line.text += ", including Mighty Wind"); + // Water removing items cannot be used in the Abyss string noAbyssLine = "\nCannot be used in the Abyss"; if (item.type == ItemID.SuperAbsorbantSponge) From da9826c270a00841d381ed03b21f8eded7e900a9 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 13:32:01 -0500 Subject: [PATCH 005/103] Boss Health UI enrage indicator --- NPCs/CalamityAI.cs | 50 +++++++ NPCs/CalamityGlobalAI.cs | 132 +++++++++++++----- NPCs/CalamityGlobalNPC.cs | 13 +- NPCs/Crabulon/CrabulonIdle.cs | 21 ++- NPCs/Cryogen/Cryogen.cs | 6 + NPCs/DesertScourge/DesertScourgeHead.cs | 14 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 2 + NPCs/DevourerofGods/DevourerofGodsHeadS.cs | 6 +- NPCs/HiveMind/HiveMind.cs | 14 +- NPCs/HiveMind/HiveMindP2.cs | 21 ++- NPCs/Leviathan/Leviathan.cs | 14 +- NPCs/Leviathan/Siren.cs | 6 + NPCs/Perforator/PerforatorHive.cs | 9 ++ .../PlaguebringerGoliath.cs | 14 +- NPCs/Polterghast/Polterghast.cs | 2 + .../ProfanedGuardians/ProfanedGuardianBoss.cs | 5 + .../ProfanedGuardianBoss2.cs | 5 + .../ProfanedGuardianBoss3.cs | 2 + NPCs/Providence/Providence.cs | 2 + NPCs/Ravager/RavagerBody.cs | 6 +- NPCs/Signus/Signus.cs | 4 +- NPCs/SlimeGod/SlimeGod.cs | 2 + NPCs/SlimeGod/SlimeGodCore.cs | 1 + NPCs/SlimeGod/SlimeGodRun.cs | 4 +- NPCs/SlimeGod/SlimeGodRunSplit.cs | 4 +- NPCs/SlimeGod/SlimeGodSplit.cs | 4 +- NPCs/StormWeaver/StormWeaverHead.cs | 4 +- NPCs/StormWeaver/StormWeaverHeadNaked.cs | 1 + NPCs/SupremeCalamitas/SupremeCalamitas.cs | 2 + NPCs/Yharon/Yharon.cs | 1 + UI/BossHealthBarManager.cs | 13 +- 31 files changed, 307 insertions(+), 77 deletions(-) diff --git a/NPCs/CalamityAI.cs b/NPCs/CalamityAI.cs index 1acf3327a7..71b15ee716 100644 --- a/NPCs/CalamityAI.cs +++ b/NPCs/CalamityAI.cs @@ -97,11 +97,17 @@ namespace CalamityMod.NPCs float enrageScale = 0f; if ((!player.Calamity().ZoneSulphur && notOcean) || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } Vector2 vectorCenter = npc.Center; @@ -662,11 +668,17 @@ namespace CalamityMod.NPCs if (!player.ZoneUnderworldHeight || malice) enrageScale += 1f; if (!modPlayer.ZoneCalamity || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } npc.Calamity().DR = npc.ai[0] == 4f ? 0.6f : 0.15f; @@ -1356,11 +1368,17 @@ namespace CalamityMod.NPCs float enrageScale = 0f; if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } // Rotation float num801 = npc.position.X + (npc.width / 2) - player.position.X - (player.width / 2); @@ -2045,11 +2063,17 @@ namespace CalamityMod.NPCs float enrageScale = 0f; if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } float num840 = npc.position.X + (npc.width / 2) - player.position.X - (player.width / 2); float num841 = npc.position.Y + npc.height - 59f - player.position.Y - (player.height / 2); @@ -2332,11 +2356,17 @@ namespace CalamityMod.NPCs float enrageScale = 0f; if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } float num840 = npc.position.X + (npc.width / 2) - player.position.X - (player.width / 2); float num841 = npc.position.Y + npc.height - 59f - player.position.Y - (player.height / 2); @@ -2613,11 +2643,17 @@ namespace CalamityMod.NPCs float enrageScale = 0f; if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -3249,11 +3285,17 @@ namespace CalamityMod.NPCs float enrageScale = 0f; if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1.5f; + } if (BossRushEvent.BossRushActive) enrageScale += 0.5f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 0.5f; + } // Deus cannot hit for 3 seconds if (calamityGlobalNPC.newAI[1] < 180f || npc.dontTakeDamage) @@ -4046,6 +4088,7 @@ namespace CalamityMod.NPCs // Scale multiplier based on nearby active tiles float tileEnrageMult = enraged ? 1.5f : BossRushEvent.BossRushActive ? 1.375f : malice ? 1.25f : 1f; + npc.Calamity().CurrentlyEnraged = (tileEnrageMult > 1f && !BossRushEvent.BossRushActive) || enraged; // Set AI variable to be used by Dark Energies npc.ai[1] = tileEnrageMult; @@ -4562,10 +4605,16 @@ namespace CalamityMod.NPCs // Enrage scale float enrageScale = death ? 1.5f : 1f; if (npc.localAI[1] >= 300f || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; + } if (npc.localAI[2] > 0f || malice) enrageScale += 1f; + if (enraged) + npc.Calamity().CurrentlyEnraged = true; + if (enrageScale > 3f) enrageScale = 3f; @@ -5429,6 +5478,7 @@ namespace CalamityMod.NPCs bool enrage = !BossRushEvent.BossRushActive && (player.position.Y < 300f || player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000))); + npc.Calamity().CurrentlyEnraged = enrage || enraged; // If the player isn't in the ocean biome or Old Duke is transitioning between phases, become immune if (!phase3AI) diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 01130b9223..87d91bcb7a 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -41,9 +41,10 @@ namespace CalamityMod.NPCs bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) + // Get a target + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(); // Despawn safety, make sure to target another player if the current player target is too far away @@ -518,12 +519,18 @@ namespace CalamityMod.NPCs float num5 = (float)(death ? 20 - Math.Round(5f * (1f - lifeRatio)) : 20); float enrageScale = 0f; - if (Main.dayTime || malice) - enrageScale += 2f; + if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -1369,10 +1376,16 @@ namespace CalamityMod.NPCs npc.TargetClosest(); float enrageScale = 0f; - if ((npc.position.Y / 16f) < Main.worldSurface || malice) - enrageScale += 1f; - if (!Main.player[npc.target].ZoneCorrupt || malice) - enrageScale += 2f; + if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } + if (!Main.player[npc.target].ZoneCorrupt || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) @@ -1911,14 +1924,23 @@ namespace CalamityMod.NPCs npc.TargetClosest(); float enrageScale = 0f; - if ((npc.position.Y / 16f) < Main.worldSurface || malice) - enrageScale += 1f; - if (!Main.player[npc.target].ZoneCrimson || malice) - enrageScale += 2f; + if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } + if (!Main.player[npc.target].ZoneCrimson || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } // Spawn Creepers if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] == 0f) @@ -2579,10 +2601,16 @@ namespace CalamityMod.NPCs bool death = CalamityWorld.death || malice; float enrageScale = death ? 0.25f : 0f; - if ((npc.position.Y / 16f) < Main.worldSurface || malice) - enrageScale += 0.5f; - if (!Main.player[npc.target].ZoneJungle || malice) - enrageScale += 0.5f; + if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 0.5f; + } + if (!Main.player[npc.target].ZoneJungle || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 0.5f; + } if (enrageScale > 1f) enrageScale = 1f; @@ -2590,8 +2618,11 @@ namespace CalamityMod.NPCs if (BossRushEvent.BossRushActive) enrageScale = 2f; - if (enraged) - enrageScale = 3f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale = 3f; + } // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; @@ -3222,8 +3253,9 @@ namespace CalamityMod.NPCs bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; - Vector2 vectorCenter = npc.Center; + Vector2 vectorCenter = npc.Center; // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; @@ -3935,9 +3967,10 @@ namespace CalamityMod.NPCs bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; - // Despawn - if (npc.position.X < 160f || npc.position.X > ((Main.maxTilesX - 10) * 16)) + // Despawn + if (npc.position.X < 160f || npc.position.X > ((Main.maxTilesX - 10) * 16)) npc.active = false; // Get a target @@ -4532,12 +4565,18 @@ namespace CalamityMod.NPCs npc.TargetClosest(); float enrageScale = 0f; - if (Main.dayTime || malice) - enrageScale += 2f; + if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } // Enrage variable if player is flying upside down bool targetFloatingUp = player.gravDir == -1f; @@ -5539,12 +5578,18 @@ namespace CalamityMod.NPCs npc.TargetClosest(); float enrageScale = 0f; - if (Main.dayTime || malice) - enrageScale += 1f; + if (Main.dayTime || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } if (BossRushEvent.BossRushActive) enrageScale += 0.5f; - if (enraged) - enrageScale += 0.5f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 0.5f; + } // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; @@ -7005,9 +7050,10 @@ namespace CalamityMod.NPCs bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) + // Get a target + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(); // Despawn safety, make sure to target another player if the current player target is too far away @@ -8948,6 +8994,8 @@ namespace CalamityMod.NPCs acceleration = 0.15f; } + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && enrage) || enraged; + // Detect active tiles around Plantera int radius = 20; // 20 tile radius int diameter = radius * 2; @@ -9774,6 +9822,8 @@ namespace CalamityMod.NPCs if (enraged) turboEnrage = true; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (enrage || turboEnrage)) || enraged; + // Alpha if (npc.alpha > 0) { @@ -10806,6 +10856,8 @@ namespace CalamityMod.NPCs (player.position.Y < 800f || player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (Main.maxTilesX * 16 - 6400))); + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && enrage) || enraged; + // If the player isn't in the ocean biome or Fishron is transitioning between phases, become immune if (!phase3AI) npc.dontTakeDamage = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f; @@ -11749,8 +11801,10 @@ namespace CalamityMod.NPCs idleTime = enraged ? 15 : 30; } - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + // Get a target + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) npc.TargetClosest(false); // Center and target @@ -12889,7 +12943,9 @@ namespace CalamityMod.NPCs if (enraged) aggressionLevel = 5; - if (npc.type == NPCID.MoonLordCore) + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + if (npc.type == NPCID.MoonLordCore) { // Play a random Moon Lord sound if (npc.ai[0] != -1f && npc.ai[0] != 2f && Main.rand.NextBool(200)) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 8952cd847c..7df537dcbd 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -204,6 +204,14 @@ namespace CalamityMod.NPCs public static int draedonExoMechTwinGreen = -1; public static int draedonExoMechPrime = -1; + // Boss Enrage variable for use with the boss health UI. + // The logic behind this is as follows: + // 1 - For special cases with super-enrages (specifically Yharon/SCal with their arenas), go solely based on whether that enrage is active. That information is most important to the player. + // 2 - Otherwise, check if the demonshade enrage is active. If it is, register this as true. If not, go to step 3. + // 3 - Check if a specific enrage condition (such as Duke Fishron's Ocean check) is met. If it is, and Boss Rush is not active, set this to true. If not, go to step 4. + // 4 - Check if malice is active and Boss Rush isn't. If so, set this to true. + public bool CurrentlyEnraged; + // Collections public static SortedDictionary BossRushHPChanges = new SortedDictionary { @@ -689,7 +697,10 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref draedonExoMechPrime, NPCType());*/ CalamityGlobalTownNPC.ResetTownNPCNameBools(npc, mod); - } + + // Reset the enraged state every frame. The expectation is that bosses will continuously set it back to true if necessary. + CurrentlyEnraged = false; + } #endregion #region Life Regen diff --git a/NPCs/Crabulon/CrabulonIdle.cs b/NPCs/Crabulon/CrabulonIdle.cs index b6a9035614..fc3221a734 100644 --- a/NPCs/Crabulon/CrabulonIdle.cs +++ b/NPCs/Crabulon/CrabulonIdle.cs @@ -136,14 +136,23 @@ namespace CalamityMod.NPCs.Crabulon npc.timeLeft = 1800; float enrageScale = 0f; - if ((npc.position.Y / 16f) < Main.worldSurface || malice) - enrageScale += 1f; - if (!player.ZoneGlowshroom || malice) - enrageScale += 1f; + if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } + if (!player.ZoneGlowshroom || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } if (npc.ai[0] != 0f && npc.ai[0] < 3f) { diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index f3a2ff50c9..2ce5d9644b 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -107,7 +107,10 @@ namespace CalamityMod.NPCs.Cryogen float enrageScale = death ? 0.5f : 0f; if (!player.ZoneSnow || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 2f; + } if (enrageScale > 2f) enrageScale = 2f; @@ -116,7 +119,10 @@ namespace CalamityMod.NPCs.Cryogen enrageScale = 3f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale = 4f; + } // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index b1c6399ef2..4d65853932 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -100,12 +100,18 @@ namespace CalamityMod.NPCs.DesertScourge Player player = Main.player[npc.target]; float enrageScale = 0f; - if (!player.ZoneDesert || malice) - enrageScale += 2f; + if (!player.ZoneDesert || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 16f516601e..3dc0107f23 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -121,6 +121,8 @@ namespace CalamityMod.NPCs.DevourerofGods bool phase2 = lifeRatio < 0.75f; bool phase3 = lifeRatio < 0.2f; + npc.Calamity().CurrentlyEnraged = malice; + // Light Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); diff --git a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs index cdfd04662b..393cc02709 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHeadS.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHeadS.cs @@ -173,8 +173,10 @@ namespace CalamityMod.NPCs.DevourerofGods bool phase4 = lifeRatio < 0.3f; bool phase5 = lifeRatio < 0.15f; - // Light - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + // Light + Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 0.2f, 0.05f, 0.2f); // Worm shit again if (npc.ai[2] > 0f) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index 1dc0f689d8..73494c7c46 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -116,10 +116,16 @@ namespace CalamityMod.NPCs.HiveMind CalamityGlobalNPC.hiveMind = npc.whoAmI; float enrageScale = 0f; - if ((npc.position.Y / 16f) < Main.worldSurface || malice) - enrageScale += 1f; - if (!player.ZoneCorrupt || malice) - enrageScale += 1f; + if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } + if (!player.ZoneCorrupt || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; diff --git a/NPCs/HiveMind/HiveMindP2.cs b/NPCs/HiveMind/HiveMindP2.cs index 7ec811026b..fc85ac2df0 100644 --- a/NPCs/HiveMind/HiveMindP2.cs +++ b/NPCs/HiveMind/HiveMindP2.cs @@ -319,14 +319,23 @@ namespace CalamityMod.NPCs.HiveMind bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; float enrageScale = 0f; - if ((npc.position.Y / 16f) < Main.worldSurface || malice) - enrageScale += 1f; - if (!player.ZoneCorrupt || malice) - enrageScale += 1f; + if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } + if (!player.ZoneCorrupt || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } if (npc.alpha != 0) { diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 84c5a6c09d..ac1f344a3f 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -154,12 +154,18 @@ namespace CalamityMod.NPCs.Leviathan bool notOcean = player.position.Y < 800f || player.position.Y > Main.worldSurface * 16.0 || (player.position.X > 6400f && player.position.X < (Main.maxTilesX * 16 - 6400)); float enrageScale = 0f; - if (notOcean || malice) - enrageScale += 2f; + if (notOcean || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 2f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; - if (enraged) - enrageScale += 1f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale += 1f; + } npc.dontTakeDamage = spawnAnimation; diff --git a/NPCs/Leviathan/Siren.cs b/NPCs/Leviathan/Siren.cs index 1de6c2b86d..2b69aa12f4 100644 --- a/NPCs/Leviathan/Siren.cs +++ b/NPCs/Leviathan/Siren.cs @@ -114,11 +114,17 @@ namespace CalamityMod.NPCs.Leviathan float enrageScale = 0f; if (notOcean || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1.5f; + } if (BossRushEvent.BossRushActive) enrageScale += 0.5f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 0.5f; + } float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 7311e96419..23b73d341a 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -116,13 +116,22 @@ namespace CalamityMod.NPCs.Perforator float enrageScale = 0f; if ((npc.position.Y / 16f) < Main.worldSurface || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; + } if (!Main.player[npc.target].ZoneCrimson || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; enrageScale += 1f; + } if (BossRushEvent.BossRushActive) enrageScale += 1f; if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; enrageScale += 1f; + } if (!player.active || player.dead || Vector2.Distance(player.Center, npc.Center) > 5600f) { diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index ef807a2ba7..7b4e654352 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -175,8 +175,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath // Enrage float enrageScale = death ? 0.5f : 0f; - if (!player.ZoneJungle || malice) - enrageScale += 1.5f; + if (!player.ZoneJungle || malice) + { + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive; + enrageScale += 1.5f; + } if (enrageScale > 1.5f) enrageScale = 1.5f; @@ -184,8 +187,11 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (BossRushEvent.BossRushActive) enrageScale = 2f; - if (enraged) - enrageScale = 2.5f; + if (enraged) + { + npc.Calamity().CurrentlyEnraged = true; + enrageScale = 2.5f; + } bool diagonalDash = revenge && phase2; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 02ce465f12..8c9f5f23cd 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -296,6 +296,8 @@ namespace CalamityMod.NPCs.Polterghast if (enraged) tileEnrageMult = 2.25f; + npc.Calamity().CurrentlyEnraged = !BossRushEvent.BossRushActive && tileEnrageMult >= 1.6f; + // Used to inform clone and hooks about number of active tiles nearby npc.ai[3] = tileEnrageMult; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs index a735b1e9c8..69783fe160 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss.cs @@ -154,10 +154,15 @@ namespace CalamityMod.NPCs.ProfanedGuardians { if (immuneTimer > 0) immuneTimer--; + else + npc.Calamity().CurrentlyEnraged = true; } else immuneTimer = 300; + if (enraged) + npc.Calamity().CurrentlyEnraged = true; + // Take damage or not npc.dontTakeDamage = immuneTimer <= 0; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs index f3aa1929d5..4b791b033d 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs @@ -94,10 +94,15 @@ namespace CalamityMod.NPCs.ProfanedGuardians { if (immuneTimer > 0) immuneTimer--; + else + npc.Calamity().CurrentlyEnraged = true; } else immuneTimer = 300; + if (enraged) + npc.Calamity().CurrentlyEnraged = true; + // Take damage or not npc.dontTakeDamage = immuneTimer <= 0; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs index 5bac65b170..772cc7d613 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss3.cs @@ -94,6 +94,8 @@ namespace CalamityMod.NPCs.ProfanedGuardians { if (immuneTimer > 0) immuneTimer--; + else + npc.Calamity().CurrentlyEnraged = true; } else immuneTimer = 300; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 35d763b934..d10a3ee18e 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -214,6 +214,8 @@ namespace CalamityMod.NPCs.Providence if (nightTime) projectileDamageMult = 2; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && (nightTime || malice)) || enraged; + // Projectile damage values int holyLaserDamage = npc.GetProjectileDamage(ModContent.ProjectileType()) * projectileDamageMult; int crystalDamage = npc.GetProjectileDamage(ModContent.ProjectileType()) * projectileDamageMult; diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 02c22c4755..a37ea32161 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -101,8 +101,10 @@ namespace CalamityMod.NPCs.Ravager bool death = CalamityWorld.death || malice; bool enraged = calamityGlobalNPC.enraged > 0; - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; // Increase aggression if player is taking a long time to kill the boss if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index c48f4ef170..c2734c6dd4 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -117,7 +117,9 @@ namespace CalamityMod.NPCs.Signus bool phase3 = lifeRatio < 0.5f; bool phase4 = lifeRatio < 0.33f; - npc.damage = npc.defDamage; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + npc.damage = npc.defDamage; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) diff --git a/NPCs/SlimeGod/SlimeGod.cs b/NPCs/SlimeGod/SlimeGod.cs index a130a91e5f..c934236acc 100644 --- a/NPCs/SlimeGod/SlimeGod.cs +++ b/NPCs/SlimeGod/SlimeGod.cs @@ -65,6 +65,8 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = Main.expertMode || malice; bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || npc.localAI[1] == 1f || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + Vector2 vector = npc.Center; float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index bd72f61683..d6cdb4dd56 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -94,6 +94,7 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = Main.expertMode || malice; bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; // Percent life remaining float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/SlimeGod/SlimeGodRun.cs b/NPCs/SlimeGod/SlimeGodRun.cs index 4f3ed35348..45a09f2b30 100644 --- a/NPCs/SlimeGod/SlimeGodRun.cs +++ b/NPCs/SlimeGod/SlimeGodRun.cs @@ -68,7 +68,9 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = Main.expertMode || malice; bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || npc.localAI[1] == 1f || malice; - Vector2 vector = npc.Center; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + Vector2 vector = npc.Center; float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/SlimeGod/SlimeGodRunSplit.cs b/NPCs/SlimeGod/SlimeGodRunSplit.cs index 244504ae1d..e549251fd3 100644 --- a/NPCs/SlimeGod/SlimeGodRunSplit.cs +++ b/NPCs/SlimeGod/SlimeGodRunSplit.cs @@ -70,7 +70,9 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = Main.expertMode || malice; bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || npc.localAI[1] == 1f || malice; - Vector2 vector = npc.Center; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + Vector2 vector = npc.Center; float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/SlimeGod/SlimeGodSplit.cs b/NPCs/SlimeGod/SlimeGodSplit.cs index f423f1801b..190827cb5c 100644 --- a/NPCs/SlimeGod/SlimeGodSplit.cs +++ b/NPCs/SlimeGod/SlimeGodSplit.cs @@ -70,7 +70,9 @@ namespace CalamityMod.NPCs.SlimeGod bool expertMode = Main.expertMode || malice; bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || npc.localAI[1] == 1f || malice; - Vector2 vector = npc.Center; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + Vector2 vector = npc.Center; float lifeRatio = npc.life / (float)npc.lifeMax; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index 11bc59db96..e453cfaaea 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -85,7 +85,9 @@ namespace CalamityMod.NPCs.StormWeaver bool expertMode = Main.expertMode || malice; bool revenge = CalamityWorld.revenge || malice; bool death = CalamityWorld.death || malice; - if (npc.defense < 99999 && (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2)) + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; + + if (npc.defense < 99999 && (CalamityWorld.DoGSecondStageCountdown <= 0 || !CalamityWorld.downedSentinel2)) { npc.defense = 99999; } diff --git a/NPCs/StormWeaver/StormWeaverHeadNaked.cs b/NPCs/StormWeaver/StormWeaverHeadNaked.cs index 52381db3d8..c256241bd9 100644 --- a/NPCs/StormWeaver/StormWeaverHeadNaked.cs +++ b/NPCs/StormWeaver/StormWeaverHeadNaked.cs @@ -113,6 +113,7 @@ namespace CalamityMod.NPCs.StormWeaver bool death = CalamityWorld.death || malice; bool revenge = CalamityWorld.revenge || malice; bool expertMode = Main.expertMode || malice; + npc.Calamity().CurrentlyEnraged = (!BossRushEvent.BossRushActive && malice) || enraged; if (invinceTime > 0) { diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index b8e9c84a62..4acddb07c4 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -512,6 +512,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas #region Enrage and DR if (!player.Hitbox.Intersects(safeBox) || malice) { + if (uDieLul < 1.5f) { uDieLul *= 1.01f; @@ -534,6 +535,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } protectionBoost = false; } + npc.Calamity().CurrentlyEnraged = protectionBoost; // Set DR to be 99% and unbreakable if enraged. Boost DR during the 5th attack. CalamityGlobalNPC global = npc.Calamity(); diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 90d13d2ebd..f796b9c74a 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -352,6 +352,7 @@ namespace CalamityMod.NPCs.Yharon else { enraged = !player.Hitbox.Intersects(safeBox); + npc.Calamity().CurrentlyEnraged = enraged; if (enraged) { phaseSwitchTimer = 15; diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 6d9ac5be59..c7b16829ac 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -465,6 +465,8 @@ namespace CalamityMod.UI private bool _inCombo = false; private int _comboStartHealth; private int _damageCountdown; + public int EnrageTimer; + private NPC _npc { get @@ -586,6 +588,7 @@ namespace CalamityMod.UI return; int currentLife = _npc.life; + bool enraged = _npc.Calamity().CurrentlyEnraged; // Calculate current life based all types that are available and considered part of one boss if (_oneToMany) @@ -601,6 +604,9 @@ namespace CalamityMod.UI (Main.npc[i].type == NPCID.MoonLordCore && Main.npc[i].ai[0] == 2f)) continue; + if (Main.npc[i].Calamity().CurrentlyEnraged) + enraged = true; + currentLife += Main.npc[i].life; maxLife += Main.npc[i].lifeMax; } @@ -611,6 +617,9 @@ namespace CalamityMod.UI } } + // Make the enrage counter go up/down based on whether the boss is enraged or not. + EnrageTimer = Utils.Clamp(EnrageTimer + enraged.ToDirectionInt(), 0, 75); + // Damage countdown if (_damageCountdown > 0) { @@ -735,7 +744,9 @@ namespace CalamityMod.UI } // DRAW MAIN HEALTH BAR - sb.Draw(BossMainHPBar, new Rectangle(x, y + MainBarYOffset, mainBarWidth, 15), Color.White); + Color enrageColor = Color.Lerp(Color.Red, Color.OrangeRed, (float)Math.Sin(Main.GlobalTime * 7.9f) * 0.5f + 0.5f); + Color mainHealthBarColor = Color.Lerp(Color.White, enrageColor, Utils.InverseLerp(0f, 75f, EnrageTimer, true) * 0.55f); + sb.Draw(BossMainHPBar, new Rectangle(x, y + MainBarYOffset, mainBarWidth, 15), mainHealthBarColor); // DRAW WHITE(ISH) LINE sb.Draw(BossSeperatorBar, new Rectangle(x, y + SepBarYOffset, BarMaxWidth, 6), new Color(240, 240, 255)); From f759c1ea3d8bd6ebd96e20ee3745fa4d38c51361 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 13:48:24 -0500 Subject: [PATCH 006/103] Health text color adjustment --- NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs | 3 --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 3 +-- UI/BossHealthBarManager.cs | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs index 4b791b033d..196eae8887 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianBoss2.cs @@ -100,9 +100,6 @@ namespace CalamityMod.NPCs.ProfanedGuardians else immuneTimer = 300; - if (enraged) - npc.Calamity().CurrentlyEnraged = true; - // Take damage or not npc.dontTakeDamage = immuneTimer <= 0; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 4acddb07c4..cbb7f1f61d 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -512,7 +512,6 @@ namespace CalamityMod.NPCs.SupremeCalamitas #region Enrage and DR if (!player.Hitbox.Intersects(safeBox) || malice) { - if (uDieLul < 1.5f) { uDieLul *= 1.01f; @@ -535,7 +534,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas } protectionBoost = false; } - npc.Calamity().CurrentlyEnraged = protectionBoost; + npc.Calamity().CurrentlyEnraged = !player.Hitbox.Intersects(safeBox); // Set DR to be 99% and unbreakable if enraged. Boost DR during the 5th attack. CalamityGlobalNPC global = npc.Calamity(); diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index c7b16829ac..d314cf7c72 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -756,7 +756,9 @@ namespace CalamityMod.UI if (_prevLife == _maxHealth) percentHealthText = "100%"; Vector2 textSize = HPBarFont.MeasureString(percentHealthText); - DrawBorderStringEightWay(sb, HPBarFont, percentHealthText, new Vector2(x, y + 22 - textSize.Y), OrangeColour, OrangeBorderColour * 0.25f); + + Color hpTextColor = Color.Lerp(OrangeColour, enrageColor, Utils.InverseLerp(0f, 75f, EnrageTimer, true) * 0.18f); + DrawBorderStringEightWay(sb, HPBarFont, percentHealthText, new Vector2(x, y + 22 - textSize.Y), hpTextColor, OrangeBorderColour * 0.25f); string name = _npc.FullName; Vector2 nameSize = Main.fontMouseText.MeasureString(name); From 14d6aa550a965ef69c2eaa04f7e2a8c5054bf5f1 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 14:22:05 -0500 Subject: [PATCH 007/103] Used the separator bar instead of HP bar --- UI/BossHealthBarManager.cs | 20 ++++++++++++++------ UI/RipperUI.cs | 4 ++++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index d314cf7c72..911cf039d8 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -744,12 +744,11 @@ namespace CalamityMod.UI } // DRAW MAIN HEALTH BAR - Color enrageColor = Color.Lerp(Color.Red, Color.OrangeRed, (float)Math.Sin(Main.GlobalTime * 7.9f) * 0.5f + 0.5f); - Color mainHealthBarColor = Color.Lerp(Color.White, enrageColor, Utils.InverseLerp(0f, 75f, EnrageTimer, true) * 0.55f); - sb.Draw(BossMainHPBar, new Rectangle(x, y + MainBarYOffset, mainBarWidth, 15), mainHealthBarColor); + sb.Draw(BossMainHPBar, new Rectangle(x, y + MainBarYOffset, mainBarWidth, 15), Color.White); // DRAW WHITE(ISH) LINE - sb.Draw(BossSeperatorBar, new Rectangle(x, y + SepBarYOffset, BarMaxWidth, 6), new Color(240, 240, 255)); + Color separatorColor = Color.Lerp(new Color(240, 240, 255), Color.Red * 0.5f, EnrageTimer / 75f); + sb.Draw(BossSeperatorBar, new Rectangle(x, y + SepBarYOffset, BarMaxWidth, 6), separatorColor); // DRAW TEXT string percentHealthText = (percentHealth * 100).ToString("N1") + "%"; @@ -757,11 +756,20 @@ namespace CalamityMod.UI percentHealthText = "100%"; Vector2 textSize = HPBarFont.MeasureString(percentHealthText); - Color hpTextColor = Color.Lerp(OrangeColour, enrageColor, Utils.InverseLerp(0f, 75f, EnrageTimer, true) * 0.18f); - DrawBorderStringEightWay(sb, HPBarFont, percentHealthText, new Vector2(x, y + 22 - textSize.Y), hpTextColor, OrangeBorderColour * 0.25f); + DrawBorderStringEightWay(sb, HPBarFont, percentHealthText, new Vector2(x, y + 22 - textSize.Y), OrangeColour, OrangeBorderColour * 0.25f); string name = _npc.FullName; Vector2 nameSize = Main.fontMouseText.MeasureString(name); + if (EnrageTimer > 0) + { + float pulse = (float)Math.Sin(Main.GlobalTime * 4.5f) * 0.5f + 0.5f; + float outwardness = EnrageTimer / 75f * 1.5f + pulse * 2f; + for (int i = 0; i < 4; i++) + { + Vector2 drawOffset = (MathHelper.TwoPi * i / 4f).ToRotationVector2() * outwardness; + DrawBorderStringEightWay(sb, Main.fontMouseText, name, new Vector2(x + BarMaxWidth - nameSize.X, y + 23 - nameSize.Y) + drawOffset, Color.Red * 0.6f, Color.Black * 0.2f); + } + } DrawBorderStringEightWay(sb, Main.fontMouseText, name, new Vector2(x + BarMaxWidth - nameSize.X, y + 23 - nameSize.Y), Color.White, Color.Black * 0.2f); // TODO -- Make small text health a toggle in ModConfig. diff --git a/UI/RipperUI.cs b/UI/RipperUI.cs index decf267d25..77531b44e3 100644 --- a/UI/RipperUI.cs +++ b/UI/RipperUI.cs @@ -258,6 +258,8 @@ namespace CalamityMod.UI if (rageHover && !adrenHover) { // Add hover text if the mouse is over Rage bar + if (!CalamityConfig.Instance.MeterPosLock) + Main.LocalPlayer.mouseInterface = true; string rageStr = MakeRipperPercentString(modPlayer.rage, modPlayer.rageMax); Main.instance.MouseText($"Rage: {rageStr}"); @@ -272,6 +274,8 @@ namespace CalamityMod.UI else if (adrenHover) { // Add hover text if the mouse is over the bar + if (!CalamityConfig.Instance.MeterPosLock) + Main.LocalPlayer.mouseInterface = true; string adrenStr = MakeRipperPercentString(modPlayer.adrenaline, modPlayer.adrenalineMax); Main.instance.MouseText($"Adrenaline: {adrenStr}"); From 72b37fc18ce5fdd81c68e69518ca357ea68a6d78 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 10 Jun 2021 10:53:26 -0500 Subject: [PATCH 008/103] 1 - Worms, the perfect organisms. --- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 65 +- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 60 +- NPCs/Abyss/EidolonWyrmHead.cs | 29 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 878 +++++++++++--------- NPCs/Abyss/EidolonWyrmTailHuge.cs | 41 +- NPCs/CalamityGlobalAI.cs | 13 +- NPCs/NormalNPCs/Eidolist.cs | 23 +- Projectiles/CalamityGlobalProjectile.cs | 1007 +++++++++++------------ Utilities/NPCStats.cs | 2 +- 9 files changed, 1126 insertions(+), 992 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 15e199468e..918fc0eed7 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -47,31 +47,34 @@ namespace CalamityMod.NPCs.Abyss if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; - bool flag = false; - if (npc.ai[1] <= 0f) - { - flag = true; - } - else if (Main.npc[(int)npc.ai[1]].life <= 0) - { - flag = true; - } - if (flag) - { - npc.life = 0; - npc.HitEffect(0, 10.0); - npc.checkDead(); - } - - if (!NPC.AnyNPCs(ModContent.NPCType())) - npc.active = false; + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f; if (!invisiblePhase) { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.1f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -83,6 +86,30 @@ namespace CalamityMod.NPCs.Abyss npc.Opacity = 0f; } + bool shootShadowFireballs = (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 6f && Main.npc[(int)npc.ai[2]].Calamity().newAI[2] > 0f) || + (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 10f && Main.npc[(int)npc.ai[2]].Calamity().newAI[1] > 0f); + if (shootShadowFireballs && Main.netMode != NetmodeID.MultiplayerClient) + { + if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) + { + npc.ai[3] += 1f; + float shootProjectile = 200f; + float timer = npc.ai[0] + 10f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f) + { + float distanceVelocityBoost = MathHelper.Clamp((Vector2.Distance(Main.npc[(int)npc.ai[2]].Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) - 1600f) * 0.025f, 0f, 16f); + float fireballVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 4f : 8f) + distanceVelocityBoost; + Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center; + Vector2 velocity = Vector2.Normalize(destination) * fireballVelocity; + int type = ProjectileID.CultistBossFireBallClone; + int damage = npc.GetProjectileDamage(type); + int proj = Projectile.NewProjectile(npc.Center, velocity, type, damage, 0f, Main.myPlayer); + Main.projectile[proj].tileCollide = false; + } + } + } + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index 94f858815b..d6f0d75625 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -47,31 +47,34 @@ namespace CalamityMod.NPCs.Abyss if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; - bool flag = false; - if (npc.ai[1] <= 0f) - { - flag = true; - } - else if (Main.npc[(int)npc.ai[1]].life <= 0) - { - flag = true; - } - if (flag) - { - npc.life = 0; - npc.HitEffect(0, 10.0); - npc.checkDead(); - } - - if (!NPC.AnyNPCs(ModContent.NPCType())) - npc.active = false; + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f; if (!invisiblePhase) { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.1f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -87,17 +90,22 @@ namespace CalamityMod.NPCs.Abyss (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 10f && Main.npc[(int)npc.ai[2]].Calamity().newAI[1] > 0f); if (shootShadowFireballs && Main.netMode != NetmodeID.MultiplayerClient) { - if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 320f) + if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) { npc.ai[3] += 1f; - if (npc.ai[3] >= 90f) + float shootProjectile = 200f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f) { - float fireballVelocity = 4f; + float distanceVelocityBoost = MathHelper.Clamp((Vector2.Distance(Main.npc[(int)npc.ai[2]].Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) - 1600f) * 0.025f, 0f, 16f); + float lightVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 4f : 8f) + distanceVelocityBoost; Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center; - Vector2 velocity = Vector2.Normalize(destination) * fireballVelocity; - int type = ProjectileID.CultistBossIceMist; - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, velocity, type, damage, 0f, Main.myPlayer); + Vector2 velocity = Vector2.Normalize(destination) * lightVelocity; + int type = NPCID.AncientLight; + float ai = (Main.rand.NextFloat() - 0.5f) * 0.3f * MathHelper.TwoPi / 60f; + int light = NPC.NewNPC((int)npc.Center.X, (int)npc.Center.Y, type, 0, 0f, ai, velocity.X, velocity.Y, 255); + Main.npc[light].velocity = velocity; } } } diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index c587300883..1fc9c90b2d 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -73,7 +73,8 @@ namespace CalamityMod.NPCs.Abyss public override void AI() { - if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState || NPC.AnyNPCs(ModContent.NPCType())) + bool adultWyrmAlive = NPC.AnyNPCs(ModContent.NPCType()); + if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState || adultWyrmAlive) { detectsPlayer = true; npc.damage = Main.expertMode ? 340 : 170; @@ -146,31 +147,23 @@ namespace CalamityMod.NPCs.Abyss npc.localAI[0] = 0f; npc.TargetClosest(true); npc.netUpdate = true; - int damage = 80; - if (Main.expertMode) - { - damage = 60; - } + int damage = adultWyrmAlive ? (Main.expertMode ? 150 : 200) : (Main.expertMode ? 60 : 80); float xPos = Main.rand.NextBool(2) ? npc.position.X + 200f : npc.position.X - 200f; Vector2 vector2 = new Vector2(xPos, npc.position.Y + Main.rand.Next(-200, 201)); int random = Main.rand.Next(3); if (random == 0) { - Projectile.NewProjectile(vector2.X, vector2.Y, 0f, 0f, ProjectileID.CultistBossLightningOrb, damage, 0f, Main.myPlayer, 0f, 0f); + Projectile.NewProjectile(vector2, Vector2.Zero, ProjectileID.CultistBossLightningOrb, damage, 0f, Main.myPlayer, 0f, 0f); } else if (random == 1) { Vector2 vec = Vector2.Normalize(Main.player[npc.target].Center - npc.Center); - vec = Vector2.Normalize(Main.player[npc.target].Center - npc.Center + Main.player[npc.target].velocity * 20f); if (vec.HasNaNs()) { - vec = new Vector2((float)npc.direction, 0f); - } - for (int n = 0; n < 1; n++) - { - Vector2 vector4 = vec * 4f; - Projectile.NewProjectile(vector2.X, vector2.Y, vector4.X, vector4.Y, ProjectileID.CultistBossIceMist, damage, 0f, Main.myPlayer, 0f, 1f); + vec = new Vector2(npc.direction, 0f); } + Vector2 vector4 = vec * (adultWyrmAlive ? 6f : 4f); + Projectile.NewProjectile(vector2, vector4, ProjectileID.CultistBossIceMist, damage, 0f, Main.myPlayer, 0f, 1f); } else { @@ -279,6 +272,14 @@ namespace CalamityMod.NPCs.Abyss num188 = 15f; num189 = 0.25f; } + if (adultWyrmAlive) + { + if (!Main.player[npc.target].Calamity().ZoneAbyssLayer4) + { + num188 = 22.5f; + num189 = 0.375f; + } + } } float num48 = num188 * 1.3f; float num49 = num188 * 0.7f; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 2ecc01a400..d34a766ac2 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -39,11 +39,29 @@ namespace CalamityMod.NPCs.Abyss set => npc.Calamity().newAI[0] = value; } + // Base distance from the target for most attacks + private const float baseDistance = 960f; + + // Base distance from target location in order to continue turning + private const float baseTurnDistance = 160f; + + // Max distance from the target before they are unable to hear sound telegraphs + private const float soundDistance = 2800f; + + // The end location of each charge Vector2 chargeDestination = default; + + // Length variables private const int minLength = 40; private const int maxLength = 41; + + // Variable used to stop the segment spawning loop private bool TailSpawned = false; + + // The direction to spin in during spin phases private int rotationDirection = 0; + + // Used in the lerp to smoothly scale velocity up and down private float chargeVelocityScalar = 0f; public override void SetStaticDefaults() @@ -143,17 +161,16 @@ namespace CalamityMod.NPCs.Abyss // Target variable Player player = Main.player[npc.target]; + bool targetDownDeep = player.Calamity().ZoneAbyssLayer4; + if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; // Play spawn sound if (!TailSpawned && npc.ai[0] == 0f) { - if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < 2800f) - { - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/Scare"), - (int)Main.player[Main.myPlayer].position.X, (int)Main.player[Main.myPlayer].position.Y); - } + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/Scare"), Main.player[Main.myPlayer].Center); } // Spawn segments @@ -176,9 +193,9 @@ namespace CalamityMod.NPCs.Abyss lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); Main.npc[lol].realLife = npc.whoAmI; - Main.npc[lol].ai[2] = (float)npc.whoAmI; - Main.npc[lol].ai[1] = (float)Previous; - Main.npc[Previous].ai[0] = (float)lol; + Main.npc[lol].ai[2] = npc.whoAmI; + Main.npc[lol].ai[1] = Previous; + Main.npc[Previous].ai[0] = lol; NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, lol, 0f, 0f, 0f, 0); Previous = lol; } @@ -205,16 +222,12 @@ namespace CalamityMod.NPCs.Abyss } } - // Delete self if far from target or tail doesn't exist - if (Vector2.Distance(player.Center, npc.Center) > 6400f || !NPC.AnyNPCs(ModContent.NPCType())) - npc.active = false; - // Adjust opacity bool invisiblePhase = calamityGlobalNPC.newAI[0] == (float)Phase.LightningRain || calamityGlobalNPC.newAI[0] == (float)Phase.IceMist || calamityGlobalNPC.newAI[0] == (float)Phase.AncientDoomSummon; npc.dontTakeDamage = invisiblePhase; if (!invisiblePhase) { - npc.Opacity += 0.15f; + npc.Opacity += 0.1f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -261,9 +274,9 @@ namespace CalamityMod.NPCs.Abyss Vector2 destination = player.Center; // Charge variables - Vector2 chargeVector = default; - float chargeDistance = 1000f; - float turnDistance = 640f; + Vector2 chargeVector = Vector2.Zero; + float chargeDistance = baseDistance; + float turnDistance = baseTurnDistance; float chargeLocationDistance = turnDistance * 0.2f; switch ((int)calamityGlobalNPC.newAI[1]) { @@ -298,33 +311,31 @@ namespace CalamityMod.NPCs.Abyss } Vector2 chargeLocation = destination + chargeVector; Vector2 chargeVectorFlipped = chargeVector * -1f; + float chargePredictionAmt = 60f; // Lightning Rain variables - Vector2 lightningRainLocation = new Vector2(0f, -1200f); + Vector2 lightningRainLocation = new Vector2(0f, -baseDistance); float lightningRainLocationDistance = turnDistance * 0.2f; // Wyrm and Eidolist variables - Vector2 eidolonWyrmPhaseLocation = new Vector2(0f, 1200f); + Vector2 eidolonWyrmPhaseLocation = new Vector2(0f, baseDistance); float eidolonWyrmPhaseLocationDistance = turnDistance * 0.5f; - int maxEidolists = 10; + int maxEidolists = targetDownDeep ? 3 : 5; // Ice Mist variables - Vector2 iceMistLocation = new Vector2(0f, 1200f); + Vector2 iceMistLocation = new Vector2(0f, baseDistance); float iceMistLocationDistance = turnDistance * 0.2f; // Spin variables - float spinRadius = 800f; + float spinRadius = baseDistance; Vector2 spinLocation = new Vector2(0f, -spinRadius); float spinLocationDistance = turnDistance * 0.1f; - float degreesOfRotation = 2f; - int totalRotations = 3; // Ancient Doom variables - Vector2 ancientDoomLocation = new Vector2(0f, -1200f); + Vector2 ancientDoomLocation = new Vector2(0f, -baseDistance); float ancientDoomLocationDistance = turnDistance * 0.2f; - int ancientDoomLimit = 6; - int ancientDoomDegrees = 360 / ancientDoomLimit; - int ancientDoomDistance = 640; + int ancientDoomLimit = targetDownDeep ? 3 : 5; + int ancientDoomDistance = 550; float maxAncientDoomRings = 3f; // Lightning charge variables @@ -338,28 +349,26 @@ namespace CalamityMod.NPCs.Abyss float distanceBetweenBolts = lightningSpawnY * 2f / numLightningBolts; // Velocity and turn speed values - float baseVelocity = !player.wet ? player.velocity.Length() + 8f : player.velocity.Length() + 4f; - float turnSpeed = !player.wet ? MathHelper.ToRadians(4f) : MathHelper.ToRadians(2f); + float baseVelocity = targetDownDeep ? 12f : 18f; + float turnSpeed = targetDownDeep ? MathHelper.ToRadians(1.5f) : MathHelper.ToRadians(2.25f); float normalChargeVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); - float normalChargeTurnSpeedMult = 1f - MathHelper.Lerp(0f, 0.5f, chargeVelocityScalar); + float normalChargeTurnSpeedMult = MathHelper.Lerp(1f, 8f, chargeVelocityScalar); float invisiblePhaseVelocityMult = MathHelper.Lerp(1f, 1.5f, chargeVelocityScalar); + float invisiblePhaseTurnSpeedMult = MathHelper.Lerp(1f, 6f, chargeVelocityScalar); float fastChargeVelocityMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); - float fastChargeTurnSpeedMult = 1f - MathHelper.Lerp(0f, 0.5f, chargeVelocityScalar); - float chargeVelocityScalarIncrement = 0.05f; + float fastChargeTurnSpeedMult = MathHelper.Lerp(1f, 12f, chargeVelocityScalar); + float chargeVelocityScalarIncrement = 0.025f; // Phase gate values + float velocityAdjustTime = 20f; float chargePhaseGateValue = 180f; - float chargeGateValue = chargePhaseGateValue + 10f; float lightningRainDuration = 180f; - float lightningRainPhaseDuration = lightningRainDuration + 30f; - float eidolonWyrmPhaseDuration = 600f; + float eidolonWyrmPhaseDuration = 180f; float iceMistDuration = 180f; - float iceMistPhaseDuration = iceMistDuration + 30f; - float spinPhaseDuration = 360 * totalRotations / degreesOfRotation; + float spinPhaseDuration = 300f; float ancientDoomPhaseGateValue = 30f; float ancientDoomGateValue = 120f; float lightningChargePhaseGateValue = 90f; - float lightningChargeGateValue = lightningChargePhaseGateValue + 10f; // Phase switch switch ((int)AIState) @@ -369,68 +378,71 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } + + baseVelocity *= normalChargeVelocityMult; + turnSpeed *= normalChargeTurnSpeedMult; turnDistance = chargeLocationDistance; + if ((chargeLocation - npc.Center).Length() < chargeLocationDistance || calamityGlobalNPC.newAI[2] > chargePhaseGateValue) { - if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), (int)npc.position.X, (int)npc.position.Y); - - if (calamityGlobalNPC.newAI[2] < chargeGateValue) + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue + 1f) { - // Turn for 10 frames before the charge - calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] == chargeGateValue) - chargeDestination = destination + chargeVectorFlipped; + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + + chargeDestination = destination + chargeVectorFlipped + player.velocity * chargePredictionAmt; + npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; } else { // Charge - - // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; - - baseVelocity *= normalChargeVelocityMult; - turnSpeed *= normalChargeTurnSpeedMult; + ChargeDust(7, (float)Math.PI); destination = chargeDestination; - if ((destination - npc.Center).Length() < chargeLocationDistance) + if ((destination - npc.Center).Length() < chargeLocationDistance || calamityGlobalNPC.newAI[3] > 1f) { - npc.ai[3] += 1f; - float maxCharges = phase4 ? 1 : phase2 ? 2 : 3; - if (npc.ai[3] >= maxCharges) + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - npc.ai[3] = 0f; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.ShadowFireballSpin : (float)Phase.LightningRain; - } - else if (phase2) - calamityGlobalNPC.newAI[0] = (float)Phase.ShadowFireballSpin; + npc.ai[3] += 1f; + float maxCharges = phase4 ? 1 : phase2 ? 2 : 3; + if (npc.ai[3] >= maxCharges) + { + npc.ai[3] = 0f; + calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.ShadowFireballSpin : (float)Phase.LightningRain; + } + else if (phase2) + calamityGlobalNPC.newAI[0] = (float)Phase.ShadowFireballSpin; - calamityGlobalNPC.newAI[1] += 1f; - if (calamityGlobalNPC.newAI[1] > 7f) - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[1] += 1f; + if (calamityGlobalNPC.newAI[1] > 7f) + calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - - chargeVelocityScalar = 0f; - - if (phase6) - { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); } - - npc.TargetClosest(); } } } else - destination += chargeLocation; + destination += chargeVector; } else calamityGlobalNPC.newAI[2] += 1f; @@ -445,19 +457,23 @@ namespace CalamityMod.NPCs.Abyss turnDistance = lightningRainLocationDistance; // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } baseVelocity *= invisiblePhaseVelocityMult; - turnSpeed *= invisiblePhaseVelocityMult; + turnSpeed *= invisiblePhaseTurnSpeedMult; if ((destination - npc.Center).Length() < lightningRainLocationDistance || calamityGlobalNPC.newAI[2] > 0f) { if (calamityGlobalNPC.newAI[2] == 0f) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), npc.Center); - - calamityGlobalNPC.newAI[2] += 1f; + { + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), Main.player[Main.myPlayer].Center); + } if (calamityGlobalNPC.newAI[2] % 30f == 0f && calamityGlobalNPC.newAI[2] < lightningRainDuration && Main.netMode != NetmodeID.MultiplayerClient) { @@ -474,19 +490,19 @@ namespace CalamityMod.NPCs.Abyss Vector2 playerCenter = Main.player[i].Center; float distance = Vector2.Distance(playerCenter, npc.Center); - if (distance < maxDistance && Collision.CanHit(npc.Center, 1, 1, playerCenter, 1, 1)) + if (distance < maxDistance) { whoAmIArray[numProjectiles] = i; targetCenterArray[numProjectiles] = playerCenter; - int num34 = numProjectiles + 1; - numProjectiles = num34; - if (num34 >= targetCenterArray.Length) + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) break; } } - float predictionAmt = 40f; - float lightningVelocity = 8f; + float predictionAmt = targetDownDeep ? 30f : 60f; + float lightningVelocity = targetDownDeep ? 4f : 8f; for (int i = 0; i < numProjectiles; i++) { // Predictive bolt @@ -495,66 +511,61 @@ namespace CalamityMod.NPCs.Abyss Vector2 projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; int type = ProjectileID.CultistBossLightningOrbArc; int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + int proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; // Opposite bolt projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; ai = Main.rand.Next(100); projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; // Normal bolt projectileDestination = targetCenterArray[i] - npc.Center; ai = Main.rand.Next(100); projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; } } + calamityGlobalNPC.newAI[2] += 1f; + Lighting.AddLight(npc.Center, 0.4f, 0.85f, 0.9f); - float num737 = (float)Main.rand.NextDouble() * 1f - 0.5f; - if (num737 < -0.5f) - num737 = -0.5f; - if (num737 > 0.5f) - num737 = 0.5f; + float rotation = MathHelper.Clamp((float)Main.rand.NextDouble() * 1f - 0.5f, -0.5f, 0.5f); + Vector2 dustPosition = new Vector2(-npc.width * 0.2f * npc.scale, 0f).RotatedBy(rotation * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); + int dust = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 226, (0f - npc.velocity.X) / 3f, (0f - npc.velocity.Y) / 3f, 150, Color.Transparent, 0.7f); + Main.dust[dust].position = npc.Center + dustPosition; + Main.dust[dust].velocity = Vector2.Normalize(Main.dust[dust].position - npc.Center) * 2f; + Main.dust[dust].noGravity = true; - Vector2 value40 = new Vector2(-npc.width * 0.2f * npc.scale, 0f).RotatedBy(num737 * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); - int num738 = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 226, (0f - npc.velocity.X) / 3f, (0f - npc.velocity.Y) / 3f, 150, Color.Transparent, 0.7f); - Main.dust[num738].position = npc.Center + value40; - Main.dust[num738].velocity = Vector2.Normalize(Main.dust[num738].position - npc.Center) * 2f; - Main.dust[num738].noGravity = true; + rotation = MathHelper.Clamp((float)Main.rand.NextDouble() * 1f - 0.5f, -0.5f, 0.5f); + dustPosition = new Vector2(-npc.width * 0.6f * npc.scale, 0f).RotatedBy(rotation * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); + dust = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 226, (0f - npc.velocity.X) / 3f, (0f - npc.velocity.Y) / 3f, 150, Color.Transparent, 0.7f); + Main.dust[dust].velocity = Vector2.Zero; + Main.dust[dust].position = npc.Center + dustPosition; + Main.dust[dust].noGravity = true; - float num740 = (float)Main.rand.NextDouble() * 1f - 0.5f; - if (num740 < -0.5f) - num740 = -0.5f; - if (num740 > 0.5f) - num740 = 0.5f; - - Vector2 value41 = new Vector2(-npc.width * 0.6f * npc.scale, 0f).RotatedBy(num740 * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); - int num741 = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 226, (0f - npc.velocity.X) / 3f, (0f - npc.velocity.Y) / 3f, 150, Color.Transparent, 0.7f); - Main.dust[num741].velocity = Vector2.Zero; - Main.dust[num741].position = npc.Center + value41; - Main.dust[num741].noGravity = true; - - if (calamityGlobalNPC.newAI[2] >= lightningRainPhaseDuration) + if (calamityGlobalNPC.newAI[2] >= lightningRainDuration) { - npc.localAI[0] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FastCharge; - calamityGlobalNPC.newAI[2] = 90f; + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; - chargeVelocityScalar = 0f; - - if (phase6) + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; + npc.localAI[0] = 0f; + calamityGlobalNPC.newAI[0] = (float)Phase.FastCharge; + calamityGlobalNPC.newAI[2] = 90f; + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); } - - npc.TargetClosest(); } } @@ -565,80 +576,85 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } + + baseVelocity *= fastChargeVelocityMult; + turnSpeed *= fastChargeTurnSpeedMult; turnDistance = chargeLocationDistance; + if ((chargeLocation - npc.Center).Length() < chargeLocationDistance || calamityGlobalNPC.newAI[2] > chargePhaseGateValue) { - if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), (int)npc.position.X, (int)npc.position.Y); - - if (calamityGlobalNPC.newAI[2] < chargeGateValue) + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue + 1f) { - // Slow down and quickly turn for 10 frames before the charge - calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] == chargeGateValue) - chargeDestination = destination + chargeVectorFlipped; + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + + chargeDestination = destination + chargeVectorFlipped + player.velocity * chargePredictionAmt; + npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; } else { // Charge very quickly + ChargeDust(7, (float)Math.PI); - // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; - - baseVelocity *= fastChargeVelocityMult; - turnSpeed *= fastChargeTurnSpeedMult; destination = chargeDestination; - if ((destination - npc.Center).Length() < chargeLocationDistance) + if ((destination - npc.Center).Length() < chargeLocationDistance || calamityGlobalNPC.newAI[3] > 1f) { - if (!phase5) + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - calamityGlobalNPC.newAI[0] = npc.localAI[0] == 0f ? (float)Phase.EidolonWyrmSpawn : (float)Phase.EidolistSpawn; - calamityGlobalNPC.newAI[2] = 0f; - } - else - { - npc.ai[3] += 1f; - if (npc.ai[3] >= 2f) + if (!phase5) { - npc.ai[3] = 0f; - calamityGlobalNPC.newAI[0] = npc.localAI[0] == 0f ? (float)Phase.ChargeTwo : (float)Phase.ChargeOne; + calamityGlobalNPC.newAI[0] = npc.localAI[0] == 0f ? (float)Phase.EidolonWyrmSpawn : (float)Phase.EidolistSpawn; calamityGlobalNPC.newAI[2] = 0f; } else - calamityGlobalNPC.newAI[2] = 90f; + { + npc.ai[3] += 1f; + if (npc.ai[3] >= 2f) + { + npc.ai[3] = 0f; + calamityGlobalNPC.newAI[0] = npc.localAI[0] == 0f ? (float)Phase.ChargeTwo : (float)Phase.ChargeOne; + calamityGlobalNPC.newAI[2] = 0f; + } + else + calamityGlobalNPC.newAI[2] = 90f; + } + + calamityGlobalNPC.newAI[1] += 1f; + if (calamityGlobalNPC.newAI[1] > 7f) + calamityGlobalNPC.newAI[1] = 0f; + + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); } - - calamityGlobalNPC.newAI[1] += 1f; - if (calamityGlobalNPC.newAI[1] > 7f) - calamityGlobalNPC.newAI[1] = 0f; - - chargeVelocityScalar = 0f; - - if (phase6) - { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; - } - - npc.TargetClosest(); } } } else - destination += chargeLocation; + destination += chargeVector; } else calamityGlobalNPC.newAI[2] += 1f; break; - // Summon an Eidolon Wyrm and swim below the target for 10 seconds, or less, if the Wyrm dies + // Summon an Eidolon Wyrm and swim below the target for 3 seconds, or less, if the Wyrm dies case (int)Phase.EidolonWyrmSpawn: destination += eidolonWyrmPhaseLocation; @@ -647,25 +663,24 @@ namespace CalamityMod.NPCs.Abyss if (Main.netMode != NetmodeID.MultiplayerClient) { if (calamityGlobalNPC.newAI[2] == 0f) - NPC.SpawnOnPlayer(npc.FindClosestPlayer(), ModContent.NPCType()); + { + if (!NPC.AnyNPCs(ModContent.NPCType())) + { + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/WyrmScream"), Main.player[Main.myPlayer].Center); + + NPC.SpawnOnPlayer(npc.FindClosestPlayer(), ModContent.NPCType()); + } + } } calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] >= eidolonWyrmPhaseDuration || !NPC.AnyNPCs(ModContent.NPCType())) + if (calamityGlobalNPC.newAI[2] >= eidolonWyrmPhaseDuration) { calamityGlobalNPC.newAI[0] = (float)Phase.ChargeTwo; calamityGlobalNPC.newAI[2] = 0f; - - if (phase6) - { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; - } - + FinalPhaseCheck(); npc.TargetClosest(); } @@ -676,68 +691,71 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } + + baseVelocity *= normalChargeVelocityMult; + turnSpeed *= normalChargeTurnSpeedMult; turnDistance = chargeLocationDistance; + if ((chargeLocation - npc.Center).Length() < chargeLocationDistance || calamityGlobalNPC.newAI[2] > chargePhaseGateValue) { - if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), (int)npc.position.X, (int)npc.position.Y); - - if (calamityGlobalNPC.newAI[2] < chargeGateValue) + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue + 1f) { - // Slow down and quickly turn for 10 frames before the charge - calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] == chargeGateValue) - chargeDestination = destination + chargeVectorFlipped; + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + + chargeDestination = destination + chargeVectorFlipped + player.velocity * chargePredictionAmt; + npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; } else { // Charge - - // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; - - baseVelocity *= normalChargeVelocityMult; - turnSpeed *= normalChargeTurnSpeedMult; + ChargeDust(7, (float)Math.PI); destination = chargeDestination; - if ((destination - npc.Center).Length() < chargeLocationDistance) + if ((destination - npc.Center).Length() < chargeLocationDistance || calamityGlobalNPC.newAI[3] > 1f) { - npc.ai[3] += 1f; - float maxCharges = phase4 ? 1 : phase3 ? 2 : 3; - if (npc.ai[3] >= maxCharges) + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - npc.ai[3] = 0f; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.AncientDoomSummon : (float)Phase.IceMist; - } - else if (phase3) - calamityGlobalNPC.newAI[0] = (float)Phase.AncientDoomSummon; + npc.ai[3] += 1f; + float maxCharges = phase4 ? 1 : phase3 ? 2 : 3; + if (npc.ai[3] >= maxCharges) + { + npc.ai[3] = 0f; + calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.AncientDoomSummon : (float)Phase.IceMist; + } + else if (phase3) + calamityGlobalNPC.newAI[0] = (float)Phase.AncientDoomSummon; - calamityGlobalNPC.newAI[1] += 1f; - if (calamityGlobalNPC.newAI[1] > 7f) - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[1] += 1f; + if (calamityGlobalNPC.newAI[1] > 7f) + calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - - chargeVelocityScalar = 0f; - - if (phase6) - { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); } - - npc.TargetClosest(); } } } else - destination += chargeLocation; + destination += chargeVector; } else calamityGlobalNPC.newAI[2] += 1f; @@ -752,18 +770,19 @@ namespace CalamityMod.NPCs.Abyss turnDistance = iceMistLocationDistance; // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } baseVelocity *= invisiblePhaseVelocityMult; - turnSpeed *= invisiblePhaseVelocityMult; + turnSpeed *= invisiblePhaseTurnSpeedMult; if ((destination - npc.Center).Length() < iceMistLocationDistance || calamityGlobalNPC.newAI[2] > 0f) { - calamityGlobalNPC.newAI[2] += 1f; - - if (calamityGlobalNPC.newAI[2] % 30f == 0f && calamityGlobalNPC.newAI[2] < iceMistDuration && Main.netMode != NetmodeID.MultiplayerClient) + if (calamityGlobalNPC.newAI[2] % 45f == 0f && calamityGlobalNPC.newAI[2] < iceMistDuration && Main.netMode != NetmodeID.MultiplayerClient) { int maxTargets = 2; int[] whoAmIArray = new int[maxTargets]; @@ -778,19 +797,19 @@ namespace CalamityMod.NPCs.Abyss Vector2 playerCenter = Main.player[i].Center; float distance = Vector2.Distance(playerCenter, npc.Center); - if (distance < maxDistance && Collision.CanHit(npc.Center, 1, 1, playerCenter, 1, 1)) + if (distance < maxDistance) { whoAmIArray[numProjectiles] = i; targetCenterArray[numProjectiles] = playerCenter; - int num34 = numProjectiles + 1; - numProjectiles = num34; - if (num34 >= targetCenterArray.Length) + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) break; } } - float predictionAmt = 60f; - float iceMistVelocity = 16f; + float predictionAmt = targetDownDeep ? 60f : 120f; + float iceMistVelocity = targetDownDeep ? 8f : 16f; for (int i = 0; i < numProjectiles; i++) { // Predictive mist @@ -805,57 +824,49 @@ namespace CalamityMod.NPCs.Abyss projectileVelocity = Vector2.Normalize(projectileDestination) * iceMistVelocity; Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 1f); - // Normal mist + // Normal bolt projectileDestination = targetCenterArray[i] - npc.Center; projectileVelocity = Vector2.Normalize(projectileDestination) * iceMistVelocity; Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 1f); } } + calamityGlobalNPC.newAI[2] += 1f; + Lighting.AddLight(npc.Center, 0.3f, 0.75f, 0.9f); - float num737 = (float)Main.rand.NextDouble() * 1f - 0.5f; - if (num737 < -0.5f) - num737 = -0.5f; - if (num737 > 0.5f) - num737 = 0.5f; + float rotation = MathHelper.Clamp((float)Main.rand.NextDouble() * 1f - 0.5f, -0.5f, 0.5f); + Vector2 dustPosition = new Vector2(-npc.width * 0.2f * npc.scale, 0f).RotatedBy(rotation * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); + int dust = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 197, 0f, 0f, 100, Color.Transparent); + Main.dust[dust].position = npc.Center + dustPosition; + Main.dust[dust].velocity = Vector2.Normalize(Main.dust[dust].position - npc.Center) * 2f; + Main.dust[dust].noGravity = true; - Vector2 value40 = new Vector2(-npc.width * 0.2f * npc.scale, 0f).RotatedBy(num737 * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); - int num738 = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 197, 0f, 0f, 100, Color.Transparent); - Main.dust[num738].position = npc.Center + value40; - Main.dust[num738].velocity = Vector2.Normalize(Main.dust[num738].position - npc.Center) * 2f; - Main.dust[num738].noGravity = true; + rotation = MathHelper.Clamp((float)Main.rand.NextDouble() * 1f - 0.5f, -0.5f, 0.5f); + dustPosition = new Vector2(-npc.width * 0.6f * npc.scale, 0f).RotatedBy(rotation * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); + dust = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 197, 0f, 0f, 100, Color.Transparent); + Main.dust[dust].velocity = Vector2.Zero; + Main.dust[dust].position = npc.Center + dustPosition; + Main.dust[dust].noGravity = true; - float num740 = (float)Main.rand.NextDouble() * 1f - 0.5f; - if (num740 < -0.5f) - num740 = -0.5f; - if (num740 > 0.5f) - num740 = 0.5f; - - Vector2 value41 = new Vector2(-npc.width * 0.6f * npc.scale, 0f).RotatedBy(num740 * ((float)Math.PI * 2f)).RotatedBy(npc.velocity.ToRotation()); - int num741 = Dust.NewDust(npc.Center - Vector2.One * 5f, 10, 10, 197, 0f, 0f, 100, Color.Transparent); - Main.dust[num741].velocity = Vector2.Zero; - Main.dust[num741].position = npc.Center + value41; - Main.dust[num741].noGravity = true; - - if (calamityGlobalNPC.newAI[2] >= iceMistPhaseDuration) + if (calamityGlobalNPC.newAI[2] >= iceMistDuration) { - npc.localAI[0] = 1f; - calamityGlobalNPC.newAI[0] = (float)Phase.FastCharge; - calamityGlobalNPC.newAI[2] = 90f; + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; - chargeVelocityScalar = 0f; - - if (phase6) + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; + npc.localAI[0] = 1f; + calamityGlobalNPC.newAI[0] = (float)Phase.FastCharge; + calamityGlobalNPC.newAI[2] = 90f; + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); } - - npc.TargetClosest(); } } @@ -869,45 +880,60 @@ namespace CalamityMod.NPCs.Abyss turnDistance = spinLocationDistance; // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } baseVelocity *= invisiblePhaseVelocityMult; - turnSpeed *= invisiblePhaseVelocityMult; + turnSpeed *= invisiblePhaseTurnSpeedMult; // Spin around target if ((destination - npc.Center).Length() < spinLocationDistance || calamityGlobalNPC.newAI[2] > 0f) { - if (rotationDirection == 0) - rotationDirection = player.direction; - calamityGlobalNPC.newAI[2] += 1f; - if (Main.netMode != NetmodeID.MultiplayerClient) - npc.Center = player.Center + new Vector2(spinRadius, 0).RotatedBy(npc.localAI[1]); - - npc.localAI[1] += MathHelper.ToRadians(degreesOfRotation) * rotationDirection; - - if (calamityGlobalNPC.newAI[2] >= spinPhaseDuration) + float spinVelocityDivisor = baseVelocity * 2f; + if (rotationDirection == 0) { - rotationDirection = 0; - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeOne; - calamityGlobalNPC.newAI[2] = 0f; + // Set spin direction + if (Main.player[npc.target].velocity.X > 0f) + rotationDirection = 1; + else if (Main.player[npc.target].velocity.X < 0f) + rotationDirection = -1; + else + rotationDirection = player.direction; - chargeVelocityScalar = 0f; + // Set spin velocity + npc.velocity.X = MathHelper.Pi * spinRadius / spinVelocityDivisor; + npc.velocity *= -rotationDirection; + npc.netUpdate = true; + } + else + { + npc.velocity = npc.velocity.RotatedBy(MathHelper.Pi / spinVelocityDivisor * -rotationDirection); - if (phase6) + if (calamityGlobalNPC.newAI[2] >= spinPhaseDuration) { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; - } + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; - npc.TargetClosest(); + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) + { + rotationDirection = 0; + calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeOne; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 1f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); + } + } } // Return to prevent other velocity code from being called @@ -935,9 +961,9 @@ namespace CalamityMod.NPCs.Abyss { // Spawn 3 (or more) circles of Ancient Dooms around the target int ancientDoomScale = (int)(aiGateValue / ancientDoomGateValue); - ancientDoomLimit = 4 + ancientDoomScale; - ancientDoomDegrees = 360 / ancientDoomLimit; - ancientDoomDistance = 550 + ancientDoomScale * 45; + ancientDoomLimit += ancientDoomScale; + ancientDoomDistance += ancientDoomScale * 45; + int ancientDoomDegrees = 360 / ancientDoomLimit; for (int i = 0; i < ancientDoomLimit; i++) { float ai2 = i * ancientDoomDegrees; @@ -959,16 +985,7 @@ namespace CalamityMod.NPCs.Abyss npc.localAI[1] = 0f; calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeTwo; calamityGlobalNPC.newAI[2] = 0f; - - if (phase6) - { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; - } - + FinalPhaseCheck(); npc.TargetClosest(); } } @@ -980,30 +997,33 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue) { + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 1f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } + + baseVelocity *= fastChargeVelocityMult; + turnSpeed *= fastChargeTurnSpeedMult; turnDistance = lightningChargeLocationDistance; + if ((lightningChargeLocation - npc.Center).Length() < lightningChargeLocationDistance || calamityGlobalNPC.newAI[2] > lightningChargePhaseGateValue) { - if (calamityGlobalNPC.newAI[2] == lightningChargePhaseGateValue) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), (int)npc.position.X, (int)npc.position.Y); - - if (calamityGlobalNPC.newAI[2] < lightningChargeGateValue) + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] == lightningChargePhaseGateValue + 1f) { - // Slow down and quickly turn for 10 frames before the charge - calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] == lightningChargeGateValue) - chargeDestination = destination + lightningChargeVectorFlipped; + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + + chargeDestination = destination + lightningChargeVectorFlipped + player.velocity * chargePredictionAmt; + npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; } else { // Charge - - // Use a lerp to smoothly scale up velocity and turn speed - chargeVelocityScalar += chargeVelocityScalarIncrement; - if (chargeVelocityScalar > 1f) - chargeVelocityScalar = 1f; - - baseVelocity *= fastChargeVelocityMult; - turnSpeed *= fastChargeTurnSpeedMult; + ChargeDust(7, (float)Math.PI); destination = chargeDestination; @@ -1018,43 +1038,46 @@ namespace CalamityMod.NPCs.Abyss lightningSpawnLocation.Y += distanceBetweenBolts * i; Vector2 projectileDestination = player.Center - lightningSpawnLocation; float ai = Main.rand.Next(100); - Projectile.NewProjectile(lightningSpawnLocation, npc.velocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + int proj = Projectile.NewProjectile(lightningSpawnLocation, npc.velocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; } } - if ((destination - npc.Center).Length() < lightningChargeLocationDistance) + if ((destination - npc.Center).Length() < lightningChargeLocationDistance || calamityGlobalNPC.newAI[3] > 1f) { - calamityGlobalNPC.newAI[0] = npc.localAI[2] == 0f ? (float)Phase.LightningRain : (float)Phase.IceMist; - calamityGlobalNPC.newAI[2] = 0f; + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; - npc.localAI[2] += 1f; - if (npc.localAI[2] > 1f) - npc.localAI[2] = 0f; - - chargeVelocityScalar = 0f; - - if (phase6) + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[0] = npc.localAI[2] == 0f ? (float)Phase.LightningRain : (float)Phase.IceMist; calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; - } + calamityGlobalNPC.newAI[3] = 1f; - npc.TargetClosest(); + npc.localAI[2] += 1f; + if (npc.localAI[2] > 1f) + npc.localAI[2] = 0f; + + npc.localAI[3] = 0f; + chargeVelocityScalar = 0f; + FinalPhaseCheck(); + npc.TargetClosest(); + } } } } else - destination += lightningChargeLocation; + destination += lightningChargeVector; } else calamityGlobalNPC.newAI[2] += 1f; break; - // Summon Eidolists and swim below the target for 10 seconds, or less, if the Eidolists die + // Summon Eidolists and swim below the target for 3 seconds, or less, if the Eidolists die case (int)Phase.EidolistSpawn: destination += eidolonWyrmPhaseLocation; @@ -1062,34 +1085,40 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] == 0f) { - // Spawn Eidolists randomly around the target - for (int i = 0; i < maxEidolists; i++) + if (!NPC.AnyNPCs(ModContent.NPCType())) { - Point npcCenter = npc.Center.ToTileCoordinates(); - Point playerCenter = player.Center.ToTileCoordinates(); - Vector2 distance = player.Center - npc.Center; + if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.NPCKilled, "Sounds/NPCKilled/EidolistDeath"), Main.player[Main.myPlayer].Center); - int baseDistance = 20; - int minDistance = 3; - int maxDistance = 7; - int collisionRange = 2; - int iterations = 0; - bool tooFar = distance.Length() > 2800f; - while (!tooFar && iterations < 100) + // Spawn Eidolists randomly around the target + for (int i = 0; i < maxEidolists; i++) { - iterations++; - int randomX = Main.rand.Next(playerCenter.X - baseDistance, playerCenter.X + baseDistance + 1); - int randomY = Main.rand.Next(playerCenter.Y - baseDistance, playerCenter.Y + baseDistance + 1); - if ((randomY < playerCenter.Y - maxDistance || randomY > playerCenter.Y + maxDistance || randomX < playerCenter.X - maxDistance || randomX > playerCenter.X + maxDistance) && (randomY < npcCenter.Y - minDistance || randomY > npcCenter.Y + minDistance || randomX < npcCenter.X - minDistance || randomX > npcCenter.X + minDistance) && !Main.tile[randomX, randomY].nactive()) - { - bool canSpawn = true; - if (canSpawn && Collision.SolidTiles(randomX - collisionRange, randomX + collisionRange, randomY - collisionRange, randomY + collisionRange)) - canSpawn = false; + Point npcCenter = npc.Center.ToTileCoordinates(); + Point playerCenter = player.Center.ToTileCoordinates(); + Vector2 distance = player.Center - npc.Center; - if (canSpawn) + int baseSpawnDistance = 60; + int minDistance = 3; + int maxDistance = 7; + int collisionRange = 2; + int iterations = 0; + bool tooFar = distance.Length() > 2800f; + while (!tooFar && iterations < 100) + { + iterations++; + int randomX = Main.rand.Next(playerCenter.X - baseSpawnDistance, playerCenter.X + baseSpawnDistance + 1); + int randomY = Main.rand.Next(playerCenter.Y - baseSpawnDistance, playerCenter.Y + baseSpawnDistance + 1); + if ((randomY < playerCenter.Y - maxDistance || randomY > playerCenter.Y + maxDistance || randomX < playerCenter.X - maxDistance || randomX > playerCenter.X + maxDistance) && (randomY < npcCenter.Y - minDistance || randomY > npcCenter.Y + minDistance || randomX < npcCenter.X - minDistance || randomX > npcCenter.X + minDistance) && !Main.tile[randomX, randomY].nactive()) { - NPC.NewNPC(randomX * 16 + 8, randomY * 16 + 8, ModContent.NPCType(), 0, npc.whoAmI); - break; + bool canSpawn = true; + if (canSpawn && Collision.SolidTiles(randomX - collisionRange, randomX + collisionRange, randomY - collisionRange, randomY + collisionRange)) + canSpawn = false; + + if (canSpawn) + { + NPC.NewNPC(randomX * 16 + 8, randomY * 16 + 8, ModContent.NPCType()); + break; + } } } } @@ -1097,20 +1126,11 @@ namespace CalamityMod.NPCs.Abyss } calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] >= eidolonWyrmPhaseDuration || !NPC.AnyNPCs(ModContent.NPCType())) + if (calamityGlobalNPC.newAI[2] >= eidolonWyrmPhaseDuration) { calamityGlobalNPC.newAI[0] = (float)Phase.ChargeOne; calamityGlobalNPC.newAI[2] = 0f; - - if (phase6) - { - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - rotationDirection = 0; - } - + FinalPhaseCheck(); npc.TargetClosest(); } @@ -1130,9 +1150,9 @@ namespace CalamityMod.NPCs.Abyss { // Spawn 3 (or more) circles of Ancient Dooms around the target int ancientDoomScale = (int)(aiGateValue / ancientDoomGateValue); - ancientDoomLimit = 4 + ancientDoomScale; - ancientDoomDegrees = 360 / ancientDoomLimit; - ancientDoomDistance = 550 + ancientDoomScale * 45; + ancientDoomLimit += ancientDoomScale; + ancientDoomDistance += ancientDoomScale * 45; + int ancientDoomDegrees = 360 / ancientDoomLimit; for (int i = 0; i < ancientDoomLimit; i++) { float ai2 = i * ancientDoomDegrees; @@ -1159,20 +1179,53 @@ namespace CalamityMod.NPCs.Abyss chargeVelocityScalar = 1f; baseVelocity *= invisiblePhaseVelocityMult; - turnSpeed *= invisiblePhaseVelocityMult; + turnSpeed *= invisiblePhaseTurnSpeedMult; // Spin around target if ((destination - npc.Center).Length() < spinLocationDistance || calamityGlobalNPC.newAI[1] > 0f) { - if (rotationDirection == 0) - rotationDirection = player.direction; - calamityGlobalNPC.newAI[1] += 1f; + float spinVelocityDivisor = baseVelocity * 2f; + if (rotationDirection == 0) + { + // Set spin direction + if (Main.player[npc.target].velocity.X > 0f) + rotationDirection = 1; + else if (Main.player[npc.target].velocity.X < 0f) + rotationDirection = -1; + else + rotationDirection = player.direction; - if (Main.netMode != NetmodeID.MultiplayerClient) - npc.Center = player.Center + new Vector2(spinRadius, 0).RotatedBy(npc.localAI[1]); + // Set spin velocity + npc.velocity.X = MathHelper.Pi * spinRadius / spinVelocityDivisor; + npc.velocity *= -rotationDirection; + npc.netUpdate = true; + } + else + { + npc.velocity = npc.velocity.RotatedBy(MathHelper.Pi / spinVelocityDivisor * -rotationDirection); - npc.localAI[1] += MathHelper.ToRadians(degreesOfRotation) * rotationDirection; + // Swim above target again if enough time has passed + if (calamityGlobalNPC.newAI[1] >= spinPhaseDuration) + { + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= chargeVelocityScalarIncrement * 2f; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) + { + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[3] = 1f; + + chargeVelocityScalar = 0f; + rotationDirection = 0; + + npc.TargetClosest(); + } + } + } // Return to prevent other velocity code from being called return; @@ -1181,9 +1234,21 @@ namespace CalamityMod.NPCs.Abyss break; } + void FinalPhaseCheck() + { + if (phase6) + { + npc.localAI[1] = 0f; + calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + rotationDirection = 0; + } + } + // Increase velocity if velocity is ever zero if (npc.velocity == Vector2.Zero) - npc.velocity.X = 2f * player.direction; + npc.velocity = Vector2.Normalize(player.Center - npc.Center).SafeNormalize(Vector2.Zero) * baseVelocity; // Acceleration if (!((destination - npc.Center).Length() < turnDistance)) @@ -1213,6 +1278,21 @@ namespace CalamityMod.NPCs.Abyss } } + private void ChargeDust(int dustAmt, float pie) + { + for (int num1474 = 0; num1474 < dustAmt; num1474++) + { + Vector2 vector171 = Vector2.Normalize(npc.velocity) * new Vector2((npc.width + 50) / 2f, npc.height) * 0.75f; + vector171 = vector171.RotatedBy((num1474 - (dustAmt / 2 - 1)) * (double)pie / (float)dustAmt) + npc.Center; + Vector2 value18 = ((float)(Main.rand.NextDouble() * pie) - MathHelper.PiOver2).ToRotationVector2() * Main.rand.Next(3, 8); + int num1475 = Dust.NewDust(vector171 + value18, 0, 0, 172, value18.X * 2f, value18.Y * 2f, 100, default, 1.4f); + Main.dust[num1475].noGravity = true; + Main.dust[num1475].noLight = true; + Main.dust[num1475].velocity /= 4f; + Main.dust[num1475].velocity -= npc.velocity; + } + } + public override bool CanHitPlayer(Player target, ref int cooldownSlot) { cooldownSlot = 1; diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index 8fdd938774..e95cf06c8e 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -47,31 +47,34 @@ namespace CalamityMod.NPCs.Abyss if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; - bool flag = false; - if (npc.ai[1] <= 0f) - { - flag = true; - } - else if (Main.npc[(int)npc.ai[1]].life <= 0) - { - flag = true; - } - if (flag) - { - npc.life = 0; - npc.HitEffect(0, 10.0); - npc.checkDead(); - } - - if (!NPC.AnyNPCs(ModContent.NPCType())) - npc.active = false; + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f; if (!invisiblePhase) { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.1f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index c7ca50d0a6..fb6d90a88f 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -12712,6 +12712,13 @@ namespace CalamityMod.NPCs if (npc.ai[0] >= 0f) { + // Triple damage if the Adult Eidolon Wyrm is alive + if (npc.ai[0] == 0f) + { + if (NPC.AnyNPCs(ModContent.NPCType())) + npc.damage *= 3; + } + npc.ai[0] += 1f; float duration = 120f; @@ -12748,8 +12755,12 @@ namespace CalamityMod.NPCs // Percent life remaining for Cultist or Eidolon Wyrm float lifeRatio = Main.npc[(int)npc.ai[0]].life / (float)Main.npc[(int)npc.ai[0]].lifeMax; + // Increase aggression if player is taking a long time to kill the boss + if (lifeRatio > Main.npc[(int)npc.ai[0]].Calamity().killTimeRatio_IncreasedAggression) + lifeRatio = Main.npc[(int)npc.ai[0]].Calamity().killTimeRatio_IncreasedAggression; + bool phase2 = lifeRatio < 0.7f; - bool phase3 = lifeRatio < 0.55f; + bool phase3 = lifeRatio < (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType() ? 0.6f : 0.55f); bool phase4 = lifeRatio < 0.4f; bool kill = npc.ai[1] < 0f || !Main.npc[(int)npc.ai[0]].active; diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index b417aae330..3e44cf71e9 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -32,7 +32,7 @@ namespace CalamityMod.NPCs.NormalNPCs npc.lifeMax = 10000; npc.knockBackResist = 0f; npc.value = Item.buyPrice(0, 1, 0, 0); - npc.alpha = 50; + npc.Opacity = 0f; npc.noGravity = true; npc.noTileCollide = false; npc.HitSound = SoundID.NPCHit13; @@ -56,8 +56,14 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - Lighting.AddLight((int)(npc.Center.X / 16f), (int)(npc.Center.Y / 16f), 0f, 0.4f, 0.5f); - if (npc.justHit || NPC.AnyNPCs(ModContent.NPCType())) + bool adultWyrmAlive = NPC.AnyNPCs(ModContent.NPCType()); + + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + + Lighting.AddLight((int)(npc.Center.X / 16f), (int)(npc.Center.Y / 16f), 0f, 0.4f, 0.5f); + if (npc.justHit || adultWyrmAlive) { hasBeenHit = true; } @@ -114,7 +120,7 @@ namespace CalamityMod.NPCs.NormalNPCs return; } npc.noTileCollide = true; - float num1446 = 7f; + float num1446 = adultWyrmAlive ? 14f : 7f; float num1447 = 480f; if (npc.localAI[1] == 1f) { @@ -131,12 +137,13 @@ namespace CalamityMod.NPCs.NormalNPCs Vector2 vector251 = Main.player[npc.target].Center - value53; bool flag104 = Collision.CanHit(npc.Center, 1, 1, Main.player[npc.target].Center, 1, 1); npc.localAI[0] += 1f; - if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= 300f) + if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= Main.rand.Next(90, 601)) { - npc.localAI[0] = 0f; + npc.localAI[0] = -90f; + npc.netUpdate = true; if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { - float speed = 5f; + float speed = adultWyrmAlive ? 10f : 5f; Vector2 vector = new Vector2(npc.Center.X, npc.Center.Y); float xDist = Main.player[npc.target].Center.X - vector.X + Main.rand.NextFloat(-10f, 10f); float yDist = Main.player[npc.target].Center.Y - vector.Y + Main.rand.NextFloat(-10f, 10f); @@ -145,7 +152,7 @@ namespace CalamityMod.NPCs.NormalNPCs targetDist = speed / targetDist; targetVec.X *= targetDist; targetVec.Y *= targetDist; - int damage = Main.expertMode ? 30 : 40; + int damage = adultWyrmAlive ? (Main.expertMode ? 150 : 200) : (Main.expertMode ? 30 : 40); if (Main.rand.NextBool(2)) { Projectile.NewProjectile(npc.Center, targetVec, ProjectileID.CultistBossLightningOrb, damage, 0f, Main.myPlayer, 0f, 0f); diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 30c73a263f..0dac39f74e 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -362,31 +362,31 @@ namespace CalamityMod.Projectiles return false; } - else if (projectile.type == ProjectileID.EyeLaser && projectile.ai[0] == 1f) - { - projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; + else if (projectile.type == ProjectileID.EyeLaser && projectile.ai[0] == 1f) + { + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.3f / 255f, 0f, (255 - projectile.alpha) * 0.3f / 255f); + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.3f / 255f, 0f, (255 - projectile.alpha) * 0.3f / 255f); - if (projectile.alpha > 0) - projectile.alpha -= 125; - if (projectile.alpha < 0) - projectile.alpha = 0; + if (projectile.alpha > 0) + projectile.alpha -= 125; + if (projectile.alpha < 0) + projectile.alpha = 0; - if (projectile.localAI[1] == 0f) - { - Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y); - projectile.localAI[1] = 1f; - } + if (projectile.localAI[1] == 0f) + { + Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y); + projectile.localAI[1] = 1f; + } - if (projectile.velocity.Length() < 18f) - projectile.velocity *= 1.0025f; + if (projectile.velocity.Length() < 18f) + projectile.velocity *= 1.0025f; - return false; - } + return false; + } - else if (projectile.type == ProjectileID.DeathLaser && projectile.ai[0] == 1f) - { + else if (projectile.type == ProjectileID.DeathLaser && projectile.ai[0] == 1f) + { if (defDamage == 0) { // Reduce mech boss projectile damage depending on the new ore progression changes @@ -403,250 +403,250 @@ namespace CalamityMod.Projectiles projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + MathHelper.PiOver2; - Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.75f / 255f, 0f, 0f); + Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.75f / 255f, 0f, 0f); - if (projectile.alpha > 0) - projectile.alpha -= 125; - if (projectile.alpha < 0) - projectile.alpha = 0; + if (projectile.alpha > 0) + projectile.alpha -= 125; + if (projectile.alpha < 0) + projectile.alpha = 0; - if (projectile.localAI[1] == 0f) - { - Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y); - projectile.localAI[1] = 1f; - } + if (projectile.localAI[1] == 0f) + { + Main.PlaySound(SoundID.Item33, (int)projectile.position.X, (int)projectile.position.Y); + projectile.localAI[1] = 1f; + } - if (projectile.velocity.Length() < 12f) - projectile.velocity *= 1.0025f; + if (projectile.velocity.Length() < 12f) + projectile.velocity *= 1.0025f; - return false; - } + return false; + } - else if (projectile.type == ProjectileID.PoisonSeedPlantera) - { - projectile.frameCounter++; - if (projectile.frameCounter > 1) - { - projectile.frameCounter = 0; - projectile.frame++; + else if (projectile.type == ProjectileID.PoisonSeedPlantera) + { + projectile.frameCounter++; + if (projectile.frameCounter > 1) + { + projectile.frameCounter = 0; + projectile.frame++; - if (projectile.frame > 1) - projectile.frame = 0; - } + if (projectile.frame > 1) + projectile.frame = 0; + } - if (projectile.ai[1] == 0f) - { - projectile.ai[1] = 1f; - Main.PlaySound(SoundID.Item17, projectile.position); - } + if (projectile.ai[1] == 0f) + { + projectile.ai[1] = 1f; + Main.PlaySound(SoundID.Item17, projectile.position); + } - if (projectile.alpha > 0) - projectile.alpha -= 30; - if (projectile.alpha < 0) - projectile.alpha = 0; + if (projectile.alpha > 0) + projectile.alpha -= 30; + if (projectile.alpha < 0) + projectile.alpha = 0; - projectile.ai[0] += 1f; - if (projectile.ai[0] >= 120f) - { - projectile.ai[0] = 120f; + projectile.ai[0] += 1f; + if (projectile.ai[0] >= 120f) + { + projectile.ai[0] = 120f; - if (projectile.velocity.Length() < 18f) - projectile.velocity *= 1.01f; - } + if (projectile.velocity.Length() < 18f) + projectile.velocity *= 1.01f; + } - projectile.tileCollide = false; + projectile.tileCollide = false; - if (projectile.timeLeft > 600) - projectile.timeLeft = 600; + if (projectile.timeLeft > 600) + projectile.timeLeft = 600; - projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + 1.57f; + projectile.rotation = (float)Math.Atan2(projectile.velocity.Y, projectile.velocity.X) + 1.57f; - return false; - } + return false; + } - else if (projectile.type == ProjectileID.ThornBall) - { - if (projectile.alpha > 0) - { - projectile.alpha -= 30; - if (projectile.alpha < 0) - projectile.alpha = 0; - } + else if (projectile.type == ProjectileID.ThornBall) + { + if (projectile.alpha > 0) + { + projectile.alpha -= 30; + if (projectile.alpha < 0) + projectile.alpha = 0; + } - int num147 = Player.FindClosest(projectile.Center, 1, 1); - float num146 = 7.5f * projectile.ai[1] + Vector2.Distance(Main.player[num147].Center, projectile.Center) * 0.01f; - Vector2 vector12 = Main.player[num147].Center - projectile.Center; - vector12.Normalize(); - vector12 *= num146; - int num148 = 200; - projectile.velocity.X = (projectile.velocity.X * (num148 - 1) + vector12.X) / num148; + int num147 = Player.FindClosest(projectile.Center, 1, 1); + float num146 = 7.5f * projectile.ai[1] + Vector2.Distance(Main.player[num147].Center, projectile.Center) * 0.01f; + Vector2 vector12 = Main.player[num147].Center - projectile.Center; + vector12.Normalize(); + vector12 *= num146; + int num148 = 200; + projectile.velocity.X = (projectile.velocity.X * (num148 - 1) + vector12.X) / num148; - if (projectile.velocity.Length() > 16f) - { - projectile.velocity.Normalize(); - projectile.velocity *= 16f; - } + if (projectile.velocity.Length() > 16f) + { + projectile.velocity.Normalize(); + projectile.velocity *= 16f; + } - projectile.ai[0] += 1f; - if (projectile.ai[0] > 15f) - { - if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f) - { - projectile.velocity.X *= 0.97f; - if (projectile.velocity.X > -0.01f && projectile.velocity.X < 0.01f) - projectile.Kill(); - } - projectile.velocity.Y += 0.1f; - } + projectile.ai[0] += 1f; + if (projectile.ai[0] > 15f) + { + if (projectile.velocity.Y == 0f && projectile.velocity.X != 0f) + { + projectile.velocity.X *= 0.97f; + if (projectile.velocity.X > -0.01f && projectile.velocity.X < 0.01f) + projectile.Kill(); + } + projectile.velocity.Y += 0.1f; + } - projectile.rotation += projectile.velocity.X * 0.05f; + projectile.rotation += projectile.velocity.X * 0.05f; - if (projectile.velocity.Y > 16f) - projectile.velocity.Y = 16f; + if (projectile.velocity.Y > 16f) + projectile.velocity.Y = 16f; - return false; - } + return false; + } - // Phase 1 sharknado - else if (projectile.type == ProjectileID.SharknadoBolt) - { - if (projectile.ai[1] < 0f) - { - float num623 = 0.209439516f; - float num624 = -2f; - float num625 = (float)(Math.Cos(num623 * projectile.ai[0]) - 0.5) * num624; + // Phase 1 sharknado + else if (projectile.type == ProjectileID.SharknadoBolt) + { + if (projectile.ai[1] < 0f) + { + float num623 = 0.209439516f; + float num624 = -2f; + float num625 = (float)(Math.Cos(num623 * projectile.ai[0]) - 0.5) * num624; - projectile.velocity.Y -= num625; + projectile.velocity.Y -= num625; - projectile.ai[0] += 1f; + projectile.ai[0] += 1f; - num625 = (float)(Math.Cos(num623 * projectile.ai[0]) - 0.5) * num624; + num625 = (float)(Math.Cos(num623 * projectile.ai[0]) - 0.5) * num624; - projectile.velocity.Y += num625; + projectile.velocity.Y += num625; - projectile.localAI[0] += 1f; - if (projectile.localAI[0] > 10f) - { - projectile.alpha -= 5; - if (projectile.alpha < 100) - projectile.alpha = 100; + projectile.localAI[0] += 1f; + if (projectile.localAI[0] > 10f) + { + projectile.alpha -= 5; + if (projectile.alpha < 100) + projectile.alpha = 100; - projectile.rotation += projectile.velocity.X * 0.1f; - projectile.frame = (int)(projectile.localAI[0] / 3f) % 3; - } + projectile.rotation += projectile.velocity.X * 0.1f; + projectile.frame = (int)(projectile.localAI[0] / 3f) % 3; + } - return false; - } - } + return false; + } + } - else if (projectile.type == ProjectileID.Sharknado) - { - projectile.damage = projectile.GetProjectileDamage(NPCID.DukeFishron); - } + else if (projectile.type == ProjectileID.Sharknado) + { + projectile.damage = projectile.GetProjectileDamage(NPCID.DukeFishron); + } - // Larger cthulhunadoes - else if (projectile.type == ProjectileID.Cthulunado) - { - projectile.damage = projectile.GetProjectileDamage(NPCID.DukeFishron); + // Larger cthulhunadoes + else if (projectile.type == ProjectileID.Cthulunado) + { + projectile.damage = projectile.GetProjectileDamage(NPCID.DukeFishron); - int num606 = 16; - int num607 = 16; - float num608 = 2f; - int num609 = 150; - int num610 = 42; + int num606 = 16; + int num607 = 16; + float num608 = 2f; + int num609 = 150; + int num610 = 42; - if (projectile.velocity.X != 0f) - projectile.direction = projectile.spriteDirection = -Math.Sign(projectile.velocity.X); + if (projectile.velocity.X != 0f) + projectile.direction = projectile.spriteDirection = -Math.Sign(projectile.velocity.X); - int num3 = projectile.frameCounter; - projectile.frameCounter = num3 + 1; - if (projectile.frameCounter > 2) - { - num3 = projectile.frame; - projectile.frame = num3 + 1; - projectile.frameCounter = 0; - } - if (projectile.frame >= 6) - projectile.frame = 0; + int num3 = projectile.frameCounter; + projectile.frameCounter = num3 + 1; + if (projectile.frameCounter > 2) + { + num3 = projectile.frame; + projectile.frame = num3 + 1; + projectile.frameCounter = 0; + } + if (projectile.frame >= 6) + projectile.frame = 0; - if (projectile.localAI[0] == 0f && Main.myPlayer == projectile.owner) - { - projectile.localAI[0] = 1f; - projectile.position.X += projectile.width / 2; - projectile.position.Y += projectile.height / 2; - projectile.scale = (num606 + num607 - projectile.ai[1]) * num608 / (num607 + num606); - projectile.width = (int)(num609 * projectile.scale); - projectile.height = (int)(num610 * projectile.scale); - projectile.position.X -= projectile.width / 2; - projectile.position.Y -= projectile.height / 2; - projectile.netUpdate = true; - } + if (projectile.localAI[0] == 0f && Main.myPlayer == projectile.owner) + { + projectile.localAI[0] = 1f; + projectile.position.X += projectile.width / 2; + projectile.position.Y += projectile.height / 2; + projectile.scale = (num606 + num607 - projectile.ai[1]) * num608 / (num607 + num606); + projectile.width = (int)(num609 * projectile.scale); + projectile.height = (int)(num610 * projectile.scale); + projectile.position.X -= projectile.width / 2; + projectile.position.Y -= projectile.height / 2; + projectile.netUpdate = true; + } - if (projectile.ai[1] != -1f) - { - projectile.scale = (num606 + num607 - projectile.ai[1]) * num608 / (num607 + num606); - projectile.width = (int)(num609 * projectile.scale); - projectile.height = (int)(num610 * projectile.scale); - } + if (projectile.ai[1] != -1f) + { + projectile.scale = (num606 + num607 - projectile.ai[1]) * num608 / (num607 + num606); + projectile.width = (int)(num609 * projectile.scale); + projectile.height = (int)(num610 * projectile.scale); + } - if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) - { - projectile.alpha -= 30; - if (projectile.alpha < 60) - projectile.alpha = 60; - if (projectile.alpha < 100) - projectile.alpha = 100; - } - else - { - projectile.alpha += 30; - if (projectile.alpha > 150) - projectile.alpha = 150; - } + if (!Collision.SolidCollision(projectile.position, projectile.width, projectile.height)) + { + projectile.alpha -= 30; + if (projectile.alpha < 60) + projectile.alpha = 60; + if (projectile.alpha < 100) + projectile.alpha = 100; + } + else + { + projectile.alpha += 30; + if (projectile.alpha > 150) + projectile.alpha = 150; + } - if (projectile.ai[0] > 0f) - projectile.ai[0] -= 1f; + if (projectile.ai[0] > 0f) + projectile.ai[0] -= 1f; - if (projectile.ai[0] == 1f && projectile.ai[1] > 0f && projectile.owner == Main.myPlayer) - { - projectile.netUpdate = true; + if (projectile.ai[0] == 1f && projectile.ai[1] > 0f && projectile.owner == Main.myPlayer) + { + projectile.netUpdate = true; - Vector2 center = projectile.Center; - center.Y -= num610 * projectile.scale / 2f; + Vector2 center = projectile.Center; + center.Y -= num610 * projectile.scale / 2f; - float num611 = (num606 + num607 - projectile.ai[1] + 1f) * num608 / (num607 + num606); - center.Y -= num610 * num611 / 2f; - center.Y += 2f; + float num611 = (num606 + num607 - projectile.ai[1] + 1f) * num608 / (num607 + num606); + center.Y -= num610 * num611 / 2f; + center.Y += 2f; - Projectile.NewProjectile(center.X, center.Y, projectile.velocity.X, projectile.velocity.Y, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, 10f, projectile.ai[1] - 1f); + Projectile.NewProjectile(center.X, center.Y, projectile.velocity.X, projectile.velocity.Y, projectile.type, projectile.damage, projectile.knockBack, projectile.owner, 10f, projectile.ai[1] - 1f); - if ((int)projectile.ai[1] % 3 == 0 && projectile.ai[1] != 0f) - { - int num614 = NPC.NewNPC((int)center.X, (int)center.Y, NPCID.Sharkron2); - Main.npc[num614].velocity = projectile.velocity; - Main.npc[num614].scale = 1.5f; - Main.npc[num614].netUpdate = true; - Main.npc[num614].ai[2] = projectile.width; - Main.npc[num614].ai[3] = -1.5f; - } - } + if ((int)projectile.ai[1] % 3 == 0 && projectile.ai[1] != 0f) + { + int num614 = NPC.NewNPC((int)center.X, (int)center.Y, NPCID.Sharkron2); + Main.npc[num614].velocity = projectile.velocity; + Main.npc[num614].scale = 1.5f; + Main.npc[num614].netUpdate = true; + Main.npc[num614].ai[2] = projectile.width; + Main.npc[num614].ai[3] = -1.5f; + } + } - if (projectile.ai[0] <= 0f) - { - float num615 = 0.104719758f; - float num616 = projectile.width / 5f * 2.5f; - float num617 = (float)(Math.Cos(num615 * -(double)projectile.ai[0]) - 0.5) * num616; + if (projectile.ai[0] <= 0f) + { + float num615 = 0.104719758f; + float num616 = projectile.width / 5f * 2.5f; + float num617 = (float)(Math.Cos(num615 * -(double)projectile.ai[0]) - 0.5) * num616; - projectile.position.X -= num617 * -projectile.direction; + projectile.position.X -= num617 * -projectile.direction; - projectile.ai[0] -= 1f; + projectile.ai[0] -= 1f; - num617 = (float)(Math.Cos(num615 * -(double)projectile.ai[0]) - 0.5) * num616; - projectile.position.X += num617 * -projectile.direction; - } + num617 = (float)(Math.Cos(num615 * -(double)projectile.ai[0]) - 0.5) * num616; + projectile.position.X += num617 * -projectile.direction; + } - return false; - } + return false; + } else if (projectile.type == ProjectileID.CultistBossLightningOrb) { @@ -762,318 +762,315 @@ namespace CalamityMod.Projectiles else if (projectile.type == ProjectileID.CultistBossIceMist) { - if (NPC.AnyNPCs(NPCID.CultistBoss)) + if (projectile.localAI[1] == 0f) { - if (projectile.localAI[1] == 0f) - { - projectile.localAI[1] = 1f; - Main.PlaySound(SoundID.Item120, projectile.position); - } + projectile.localAI[1] = 1f; + Main.PlaySound(SoundID.Item120, projectile.position); + } - projectile.ai[0] += 1f; + projectile.ai[0] += 1f; - // Main projectile - float duration = 300f; - if (projectile.ai[1] == 1f) - { - if (projectile.ai[0] >= duration - 20f) - projectile.alpha += 10; - else - projectile.alpha -= 10; - - if (projectile.alpha < 0) - projectile.alpha = 0; - if (projectile.alpha > 255) - projectile.alpha = 255; - - if (projectile.ai[0] >= duration) - { - projectile.Kill(); - return false; - } - - int num103 = Player.FindClosest(projectile.Center, 1, 1); - Vector2 vector11 = Main.player[num103].Center - projectile.Center; - float scaleFactor2 = projectile.velocity.Length(); - vector11.Normalize(); - vector11 *= scaleFactor2; - projectile.velocity = (projectile.velocity * 15f + vector11) / 16f; - projectile.velocity.Normalize(); - projectile.velocity *= scaleFactor2; - - if (projectile.ai[0] % 60f == 0f && Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 vector50 = projectile.rotation.ToRotationVector2(); - Projectile.NewProjectile(projectile.Center, vector50, projectile.type, projectile.damage, projectile.knockBack, projectile.owner); - } - - projectile.rotation += (float)Math.PI / 30f; - - Lighting.AddLight(projectile.Center, 0.3f, 0.75f, 0.9f); - - return false; - } - - // Split projectiles - projectile.position -= projectile.velocity; - - if (projectile.ai[0] >= duration - 260f) - projectile.alpha += 3; + // Main projectile + float duration = 300f; + if (projectile.ai[1] == 1f) + { + if (projectile.ai[0] >= duration - 20f) + projectile.alpha += 10; else - projectile.alpha -= 40; + projectile.alpha -= 10; if (projectile.alpha < 0) projectile.alpha = 0; if (projectile.alpha > 255) projectile.alpha = 255; - if (projectile.ai[0] >= duration - 255f) + if (projectile.ai[0] >= duration) { projectile.Kill(); return false; } - Vector2 value39 = new Vector2(0f, -720f).RotatedBy(projectile.velocity.ToRotation()); - float scaleFactor3 = projectile.ai[0] % (duration - 255f) / (duration - 255f); - Vector2 spinningpoint13 = value39 * scaleFactor3; + int num103 = Player.FindClosest(projectile.Center, 1, 1); + Vector2 vector11 = Main.player[num103].Center - projectile.Center; + float scaleFactor2 = projectile.velocity.Length(); + vector11.Normalize(); + vector11 *= scaleFactor2; + projectile.velocity = (projectile.velocity * 15f + vector11) / 16f; + projectile.velocity.Normalize(); + projectile.velocity *= scaleFactor2; - for (int num724 = 0; num724 < 6; num724++) + if (projectile.ai[0] % 60f == 0f && Main.netMode != NetmodeID.MultiplayerClient) { - Vector2 vector51 = projectile.Center + spinningpoint13.RotatedBy(num724 * ((float)Math.PI * 2f) / 6f); - - Lighting.AddLight(vector51, 0.3f, 0.75f, 0.9f); - - for (int num725 = 0; num725 < 2; num725++) - { - int num726 = Dust.NewDust(vector51 + Utils.RandomVector2(Main.rand, -8f, 8f) / 2f, 8, 8, 197, 0f, 0f, 100, Color.Transparent); - Main.dust[num726].noGravity = true; - } + Vector2 vector50 = projectile.rotation.ToRotationVector2(); + Projectile.NewProjectile(projectile.Center, vector50, projectile.type, projectile.damage, projectile.knockBack, projectile.owner); } + projectile.rotation += (float)Math.PI / 30f; + + Lighting.AddLight(projectile.Center, 0.3f, 0.75f, 0.9f); + + return false; + } + + // Split projectiles + projectile.position -= projectile.velocity; + + if (projectile.ai[0] >= duration - 260f) + projectile.alpha += 3; + else + projectile.alpha -= 40; + + if (projectile.alpha < 0) + projectile.alpha = 0; + if (projectile.alpha > 255) + projectile.alpha = 255; + + if (projectile.ai[0] >= duration - 255f) + { + projectile.Kill(); + return false; + } + + Vector2 value39 = new Vector2(0f, -720f).RotatedBy(projectile.velocity.ToRotation()); + float scaleFactor3 = projectile.ai[0] % (duration - 255f) / (duration - 255f); + Vector2 spinningpoint13 = value39 * scaleFactor3; + + for (int num724 = 0; num724 < 6; num724++) + { + Vector2 vector51 = projectile.Center + spinningpoint13.RotatedBy(num724 * ((float)Math.PI * 2f) / 6f); + + Lighting.AddLight(vector51, 0.3f, 0.75f, 0.9f); + + for (int num725 = 0; num725 < 2; num725++) + { + int num726 = Dust.NewDust(vector51 + Utils.RandomVector2(Main.rand, -8f, 8f) / 2f, 8, 8, 197, 0f, 0f, 100, Color.Transparent); + Main.dust[num726].noGravity = true; + } + } + + return false; + } + + // Change the stupid homing eyes + else if (projectile.type == ProjectileID.PhantasmalEye) + { + projectile.alpha -= 40; + if (projectile.alpha < 0) + projectile.alpha = 0; + + if (projectile.ai[0] == 0f) + { + projectile.localAI[0] += 1f; + if (projectile.localAI[0] >= 45f) + { + projectile.localAI[0] = 0f; + projectile.ai[0] = 1f; + projectile.ai[1] = 0f - projectile.ai[1]; + projectile.netUpdate = true; + } + + projectile.velocity.X = projectile.velocity.RotatedBy(projectile.ai[1]).X; + projectile.velocity.X = MathHelper.Clamp(projectile.velocity.X, -6f, 6f); + projectile.velocity.Y -= 0.08f; + + if (projectile.velocity.Y > 0f) + projectile.velocity.Y -= 0.2f; + if (projectile.velocity.Y < -7f) + projectile.velocity.Y = -7f; + } + else if (projectile.ai[0] == 1f) + { + projectile.localAI[0] += 1f; + if (projectile.localAI[0] >= 90f) + { + projectile.localAI[0] = 0f; + projectile.ai[0] = 2f; + projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height); + projectile.netUpdate = true; + } + + projectile.velocity.X = projectile.velocity.RotatedBy(projectile.ai[1]).X; + projectile.velocity.X = MathHelper.Clamp(projectile.velocity.X, -6f, 6f); + projectile.velocity.Y -= 0.08f; + + if (projectile.velocity.Y > 0f) + projectile.velocity.Y -= 0.2f; + if (projectile.velocity.Y < -7f) + projectile.velocity.Y = -7f; + } + else if (projectile.ai[0] == 2f) + { + projectile.localAI[0] += 1f; + if (projectile.localAI[0] >= 45f) + { + projectile.localAI[0] = 0f; + projectile.ai[0] = 3f; + projectile.netUpdate = true; + } + + Vector2 value23 = Main.player[(int)projectile.ai[1]].Center - projectile.Center; + value23.Normalize(); + value23 *= 12f; + value23 = Vector2.Lerp(projectile.velocity, value23, 0.6f); + + float num675 = 0.4f; + if (projectile.velocity.X < value23.X) + { + projectile.velocity.X += num675; + if (projectile.velocity.X < 0f && value23.X > 0f) + projectile.velocity.X += num675; + } + else if (projectile.velocity.X > value23.X) + { + projectile.velocity.X -= num675; + if (projectile.velocity.X > 0f && value23.X < 0f) + projectile.velocity.X -= num675; + } + if (projectile.velocity.Y < value23.Y) + { + projectile.velocity.Y += num675; + if (projectile.velocity.Y < 0f && value23.Y > 0f) + projectile.velocity.Y += num675; + } + else if (projectile.velocity.Y > value23.Y) + { + projectile.velocity.Y -= num675; + if (projectile.velocity.Y > 0f && value23.Y < 0f) + projectile.velocity.Y -= num675; + } + } + else if (projectile.ai[0] == 3f) + { + Vector2 value23 = Main.player[(int)projectile.ai[1]].Center - projectile.Center; + if (value23.Length() < 30f) + { + projectile.Kill(); + return false; + } + + float velocityLimit = ((CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 28f : 24f) / MathHelper.Clamp(lineColor * 0.75f, 1f, 3f); + if (projectile.velocity.Length() < velocityLimit) + projectile.velocity *= 1.01f; + } + + if (projectile.alpha < 40) + { + int num676 = Dust.NewDust(projectile.Center - Vector2.One * 5f, 10, 10, 229, (0f - projectile.velocity.X) / 3f, (0f - projectile.velocity.Y) / 3f, 150, Color.Transparent, 1.2f); + Main.dust[num676].noGravity = true; + } + + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; + + return false; + } + + // Moon Lord big eye spheres + else if (projectile.type == ProjectileID.PhantasmalSphere && Main.npc[(int)projectile.ai[1]].type == NPCID.MoonLordHand) + { + float velocityLimit = (CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 14f : 12f; + if (projectile.velocity.Length() < velocityLimit) + projectile.velocity *= 1.0075f; + + return true; + } + + // Moon Lord Deathray + else if (projectile.type == ProjectileID.PhantasmalDeathray) + { + if (Main.npc[(int)projectile.ai[1]].type == NPCID.MoonLordHead) + { + Vector2? vector78 = null; + + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) + projectile.velocity = -Vector2.UnitY; + + if (Main.npc[(int)projectile.ai[1]].active) + { + Vector2 value21 = new Vector2(27f, 59f); + Vector2 value22 = Utils.Vector2FromElipse(Main.npc[(int)projectile.ai[1]].localAI[0].ToRotationVector2(), value21 * Main.npc[(int)projectile.ai[1]].localAI[1]); + projectile.position = Main.npc[(int)projectile.ai[1]].Center + value22 - new Vector2(projectile.width, projectile.height) / 2f; + } + + if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) + projectile.velocity = -Vector2.UnitY; + + if (projectile.localAI[0] == 0f) + Main.PlaySound(SoundID.Zombie, (int)projectile.position.X, (int)projectile.position.Y, 104, 1f, 0f); + + float num801 = 1f; + projectile.localAI[0] += 1f; + if (projectile.localAI[0] >= 180f) + { + projectile.Kill(); + return false; + } + + projectile.scale = (float)Math.Sin(projectile.localAI[0] * MathHelper.Pi / 180f) * 10f * num801; + if (projectile.scale > num801) + projectile.scale = num801; + + float num804 = projectile.velocity.ToRotation(); + num804 += projectile.ai[0]; + projectile.rotation = num804 - MathHelper.PiOver2; + projectile.velocity = num804.ToRotationVector2(); + + float num805 = 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; + int num3; + for (int num808 = 0; num808 < array3.Length; num808 = num3 + 1) + { + num807 += array3[num808]; + num3 = 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) && + Main.npc[(int)projectile.ai[1]].Calamity().newAI[0] == 1f) + { + num807 = 2400f; + } + + float amount = 0.5f; + projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], num807, amount); + + Vector2 vector79 = projectile.Center + projectile.velocity * (projectile.localAI[1] - 14f); + for (int num809 = 0; num809 < 2; num809 = num3 + 1) + { + float num810 = projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2; + float num811 = (float)Main.rand.NextDouble() * 2f + 2f; + Vector2 vector80 = new Vector2((float)Math.Cos(num810) * num811, (float)Math.Sin(num810) * num811); + int num812 = Dust.NewDust(vector79, 0, 0, 229, vector80.X, vector80.Y, 0, default, 1f); + Main.dust[num812].noGravity = true; + Main.dust[num812].scale = 1.7f; + num3 = num809; + } + + if (Main.rand.Next(5) == 0) + { + Vector2 value29 = projectile.velocity.RotatedBy(MathHelper.PiOver2) * ((float)Main.rand.NextDouble() - 0.5f) * projectile.width; + int num813 = Dust.NewDust(vector79 + value29 - Vector2.One * 4f, 8, 8, 31, 0f, 0f, 100, default, 1.5f); + Dust dust = Main.dust[num813]; + dust.velocity *= 0.5f; + Main.dust[num813].velocity.Y = -Math.Abs(Main.dust[num813].velocity.Y); + } + + DelegateMethods.v3_1 = new Vector3(0.3f, 0.65f, 0.7f); + Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight)); + return false; } } - - // Change the stupid homing eyes - else if (projectile.type == ProjectileID.PhantasmalEye) - { - projectile.alpha -= 40; - if (projectile.alpha < 0) - projectile.alpha = 0; - - if (projectile.ai[0] == 0f) - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 45f) - { - projectile.localAI[0] = 0f; - projectile.ai[0] = 1f; - projectile.ai[1] = 0f - projectile.ai[1]; - projectile.netUpdate = true; - } - - projectile.velocity.X = projectile.velocity.RotatedBy(projectile.ai[1]).X; - projectile.velocity.X = MathHelper.Clamp(projectile.velocity.X, -6f, 6f); - projectile.velocity.Y -= 0.08f; - - if (projectile.velocity.Y > 0f) - projectile.velocity.Y -= 0.2f; - if (projectile.velocity.Y < -7f) - projectile.velocity.Y = -7f; - } - else if (projectile.ai[0] == 1f) - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 90f) - { - projectile.localAI[0] = 0f; - projectile.ai[0] = 2f; - projectile.ai[1] = Player.FindClosest(projectile.position, projectile.width, projectile.height); - projectile.netUpdate = true; - } - - projectile.velocity.X = projectile.velocity.RotatedBy(projectile.ai[1]).X; - projectile.velocity.X = MathHelper.Clamp(projectile.velocity.X, -6f, 6f); - projectile.velocity.Y -= 0.08f; - - if (projectile.velocity.Y > 0f) - projectile.velocity.Y -= 0.2f; - if (projectile.velocity.Y < -7f) - projectile.velocity.Y = -7f; - } - else if (projectile.ai[0] == 2f) - { - projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 45f) - { - projectile.localAI[0] = 0f; - projectile.ai[0] = 3f; - projectile.netUpdate = true; - } - - Vector2 value23 = Main.player[(int)projectile.ai[1]].Center - projectile.Center; - value23.Normalize(); - value23 *= 12f; - value23 = Vector2.Lerp(projectile.velocity, value23, 0.6f); - - float num675 = 0.4f; - if (projectile.velocity.X < value23.X) - { - projectile.velocity.X += num675; - if (projectile.velocity.X < 0f && value23.X > 0f) - projectile.velocity.X += num675; - } - else if (projectile.velocity.X > value23.X) - { - projectile.velocity.X -= num675; - if (projectile.velocity.X > 0f && value23.X < 0f) - projectile.velocity.X -= num675; - } - if (projectile.velocity.Y < value23.Y) - { - projectile.velocity.Y += num675; - if (projectile.velocity.Y < 0f && value23.Y > 0f) - projectile.velocity.Y += num675; - } - else if (projectile.velocity.Y > value23.Y) - { - projectile.velocity.Y -= num675; - if (projectile.velocity.Y > 0f && value23.Y < 0f) - projectile.velocity.Y -= num675; - } - } - else if (projectile.ai[0] == 3f) - { - Vector2 value23 = Main.player[(int)projectile.ai[1]].Center - projectile.Center; - if (value23.Length() < 30f) - { - projectile.Kill(); - return false; - } - - float velocityLimit = ((CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 28f : 24f) / MathHelper.Clamp(lineColor * 0.75f, 1f, 3f); - if (projectile.velocity.Length() < velocityLimit) - projectile.velocity *= 1.01f; - } - - if (projectile.alpha < 40) - { - int num676 = Dust.NewDust(projectile.Center - Vector2.One * 5f, 10, 10, 229, (0f - projectile.velocity.X) / 3f, (0f - projectile.velocity.Y) / 3f, 150, Color.Transparent, 1.2f); - Main.dust[num676].noGravity = true; - } - - projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver2; - - return false; - } - - // Moon Lord big eye spheres - else if (projectile.type == ProjectileID.PhantasmalSphere && Main.npc[(int)projectile.ai[1]].type == NPCID.MoonLordHand) - { - float velocityLimit = (CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.malice) ? 14f : 12f; - if (projectile.velocity.Length() < velocityLimit) - projectile.velocity *= 1.0075f; - - return true; - } - - // Moon Lord Deathray - else if (projectile.type == ProjectileID.PhantasmalDeathray) - { - if (Main.npc[(int)projectile.ai[1]].type == NPCID.MoonLordHead) - { - Vector2? vector78 = null; - - if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) - projectile.velocity = -Vector2.UnitY; - - if (Main.npc[(int)projectile.ai[1]].active) - { - Vector2 value21 = new Vector2(27f, 59f); - Vector2 value22 = Utils.Vector2FromElipse(Main.npc[(int)projectile.ai[1]].localAI[0].ToRotationVector2(), value21 * Main.npc[(int)projectile.ai[1]].localAI[1]); - projectile.position = Main.npc[(int)projectile.ai[1]].Center + value22 - new Vector2(projectile.width, projectile.height) / 2f; - } - - if (projectile.velocity.HasNaNs() || projectile.velocity == Vector2.Zero) - projectile.velocity = -Vector2.UnitY; - - if (projectile.localAI[0] == 0f) - Main.PlaySound(SoundID.Zombie, (int)projectile.position.X, (int)projectile.position.Y, 104, 1f, 0f); - - float num801 = 1f; - projectile.localAI[0] += 1f; - if (projectile.localAI[0] >= 180f) - { - projectile.Kill(); - return false; - } - - projectile.scale = (float)Math.Sin(projectile.localAI[0] * MathHelper.Pi / 180f) * 10f * num801; - if (projectile.scale > num801) - projectile.scale = num801; - - float num804 = projectile.velocity.ToRotation(); - num804 += projectile.ai[0]; - projectile.rotation = num804 - MathHelper.PiOver2; - projectile.velocity = num804.ToRotationVector2(); - - float num805 = 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; - int num3; - for (int num808 = 0; num808 < array3.Length; num808 = num3 + 1) - { - num807 += array3[num808]; - num3 = 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) && - Main.npc[(int)projectile.ai[1]].Calamity().newAI[0] == 1f) - { - num807 = 2400f; - } - - float amount = 0.5f; - projectile.localAI[1] = MathHelper.Lerp(projectile.localAI[1], num807, amount); - - Vector2 vector79 = projectile.Center + projectile.velocity * (projectile.localAI[1] - 14f); - for (int num809 = 0; num809 < 2; num809 = num3 + 1) - { - float num810 = projectile.velocity.ToRotation() + ((Main.rand.Next(2) == 1) ? -1f : 1f) * MathHelper.PiOver2; - float num811 = (float)Main.rand.NextDouble() * 2f + 2f; - Vector2 vector80 = new Vector2((float)Math.Cos(num810) * num811, (float)Math.Sin(num810) * num811); - int num812 = Dust.NewDust(vector79, 0, 0, 229, vector80.X, vector80.Y, 0, default, 1f); - Main.dust[num812].noGravity = true; - Main.dust[num812].scale = 1.7f; - num3 = num809; - } - - if (Main.rand.Next(5) == 0) - { - Vector2 value29 = projectile.velocity.RotatedBy(MathHelper.PiOver2) * ((float)Main.rand.NextDouble() - 0.5f) * projectile.width; - int num813 = Dust.NewDust(vector79 + value29 - Vector2.One * 4f, 8, 8, 31, 0f, 0f, 100, default, 1.5f); - Dust dust = Main.dust[num813]; - dust.velocity *= 0.5f; - Main.dust[num813].velocity.Y = -Math.Abs(Main.dust[num813].velocity.Y); - } - - DelegateMethods.v3_1 = new Vector3(0.3f, 0.65f, 0.7f); - Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * projectile.localAI[1], projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CastLight)); - - return false; - } - } } if (CalamityWorld.death && !CalamityPlayer.areThereAnyDamnBosses) diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 5a0fc2ee07..5595c9949f 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -796,7 +796,7 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 648, 948 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossFireBallClone), new int[] { 400, 600, 632, 648, 948 } } + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossFireBallClone), new int[] { 400, 600, 632, 648, 948 } } }; } From d4d123025188e4a54a42d3132cf1503847e911fc Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 10 Jun 2021 13:04:24 -0500 Subject: [PATCH 009/103] 1 - Nerfed Elemental Excalibur because I forgot to last time. --- Items/Weapons/Melee/ElementalExcalibur.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Melee/ElementalExcalibur.cs b/Items/Weapons/Melee/ElementalExcalibur.cs index d16adc1054..1174c47e2b 100644 --- a/Items/Weapons/Melee/ElementalExcalibur.cs +++ b/Items/Weapons/Melee/ElementalExcalibur.cs @@ -13,9 +13,9 @@ namespace CalamityMod.Items.Weapons.Melee { public class ElementalExcalibur : ModItem { - private static int BaseDamage = 10000; + private static int BaseDamage = 2000; private int BeamType = 0; - private int alpha = 50; + private const int alpha = 50; public override void SetStaticDefaults() { From 99a943b410b7907a5872fd45b0cda77802dbeb2d Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 10 Jun 2021 13:09:30 -0500 Subject: [PATCH 010/103] 1 - Wyrm opacity. --- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmTailHuge.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 918fc0eed7..78015e10b9 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Abyss { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.1f; + npc.Opacity += 0.15f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index d6f0d75625..88b9c96d72 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Abyss { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.1f; + npc.Opacity += 0.15f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index d34a766ac2..86ec7d6579 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -227,7 +227,7 @@ namespace CalamityMod.NPCs.Abyss npc.dontTakeDamage = invisiblePhase; if (!invisiblePhase) { - npc.Opacity += 0.1f; + npc.Opacity += 0.15f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index e95cf06c8e..be45e11ae3 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -74,7 +74,7 @@ namespace CalamityMod.NPCs.Abyss { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.1f; + npc.Opacity += 0.15f; if (npc.Opacity > 1f) npc.Opacity = 1f; } From ef9d3d20decaa14dd7c0edaa9b0bb5c6729fa533 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:31:13 -0500 Subject: [PATCH 011/103] Buffed Executioner's Blade SS damage by 105% --- Items/Weapons/Rogue/ExecutionersBlade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index edb8f783e4..7fee4adc76 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue { bool usingStealth = player.Calamity().StealthStrikeAvailable() && counter == 0; if (usingStealth) - damage *= 2; + damage = (int)(damage * 4.1); int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (usingStealth && stealth.WithinBounds(Main.maxProjectiles)) From 151d2dd8bb26e0aa55caefc10bab87f1f672389e Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:32:56 -0500 Subject: [PATCH 012/103] Greatly nerfed the Eradicator --- Items/Weapons/Rogue/Eradicator.cs | 3 +++ Projectiles/Rogue/EradicatorProjectile.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Items/Weapons/Rogue/Eradicator.cs b/Items/Weapons/Rogue/Eradicator.cs index 005fdbf436..6f0dce3d0f 100644 --- a/Items/Weapons/Rogue/Eradicator.cs +++ b/Items/Weapons/Rogue/Eradicator.cs @@ -39,6 +39,9 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { + if (player.Calamity().StealthStrikeAvailable()) + damage /= 2; + int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles)) { diff --git a/Projectiles/Rogue/EradicatorProjectile.cs b/Projectiles/Rogue/EradicatorProjectile.cs index c42ddc9cd5..a9392ef4b6 100644 --- a/Projectiles/Rogue/EradicatorProjectile.cs +++ b/Projectiles/Rogue/EradicatorProjectile.cs @@ -59,6 +59,8 @@ namespace CalamityMod.Projectiles.Rogue Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); int laserDamage = (int)(projectile.damage * 0.5); + if (projectile.Calamity().stealthStrike) + laserDamage /= 4; Projectile laser = Projectile.NewProjectileDirect(projectile.Center, velocity, ModContent.ProjectileType(), laserDamage, 0f, projectile.owner); if (laser.whoAmI.WithinBounds(Main.maxProjectiles)) { From 661771c6668f72e0fed27c591395d181e290ff56 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:33:21 -0500 Subject: [PATCH 013/103] Buffed God's Paranoia SS damage by 12% --- Items/Weapons/Rogue/GodsParanoia.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Weapons/Rogue/GodsParanoia.cs b/Items/Weapons/Rogue/GodsParanoia.cs index ef16687c58..4a27fc49f1 100644 --- a/Items/Weapons/Rogue/GodsParanoia.cs +++ b/Items/Weapons/Rogue/GodsParanoia.cs @@ -69,6 +69,7 @@ Right click to delete all existing spiky balls"); modPlayer.killSpikyBalls = false; if (modPlayer.StealthStrikeAvailable()) //setting the stealth strike { + damage = (int)(damage * 1.12); int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; From 2cb8ed019578aa6e06b6c7f3318329d87c79bc9f Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:34:43 -0500 Subject: [PATCH 014/103] Made Gamma Heart do 173 damage but made canisters faster --- Items/Weapons/Summon/GammaHeart.cs | 2 +- Projectiles/Summon/GammaHead.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/GammaHeart.cs b/Items/Weapons/Summon/GammaHeart.cs index b72784fbb9..e98a584151 100644 --- a/Items/Weapons/Summon/GammaHeart.cs +++ b/Items/Weapons/Summon/GammaHeart.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.Item42; item.summon = true; item.mana = 16; - item.damage = 216; + item.damage = 173; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 15; diff --git a/Projectiles/Summon/GammaHead.cs b/Projectiles/Summon/GammaHead.cs index 726153072c..d989b40b4b 100644 --- a/Projectiles/Summon/GammaHead.cs +++ b/Projectiles/Summon/GammaHead.cs @@ -142,7 +142,7 @@ namespace CalamityMod.Projectiles.Summon projectile.frame %= Main.projFrames[projectile.type]; Vector2 spawnPosition = projectile.Center; - float shootSpeed = MathHelper.Lerp(8f, 20f, Utils.InverseLerp(90f, 850f, target.Distance(spawnPosition), true)); + float shootSpeed = MathHelper.Lerp(8f, 29f, Utils.InverseLerp(90f, 850f, target.Distance(spawnPosition), true)); Vector2 shootVelocity = CalamityUtils.GetProjectilePhysicsFiringVelocity(spawnPosition, target.Center, GammaCanister.Gravity, shootSpeed, projectile.SafeDirectionTo(target.Center)); float fireAngle = shootVelocity.ToRotation(); From cd7793e67d4f443d3adc6cb6faa3894f7e3b6ac4 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:35:16 -0500 Subject: [PATCH 015/103] Nerfed Eclipse's Fall SS damage by 40% --- Items/Weapons/Rogue/EclipsesFall.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index 2635b81f18..d86751dd08 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -42,7 +42,7 @@ namespace CalamityMod.Items.Weapons.Rogue if (player.Calamity().StealthStrikeAvailable()) { type = ModContent.ProjectileType(); - damage = (int)(damage * 0.36); + damage = (int)(damage * 0.216); } int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); From 6d395b65192e1f2fbdf8241d1a70b0123149fcdb Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:35:53 -0500 Subject: [PATCH 016/103] Nerfed Time Bolt's SS by 15% --- Items/Weapons/Rogue/TimeBolt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/TimeBolt.cs b/Items/Weapons/Rogue/TimeBolt.cs index a3e20d95f5..1f220218c9 100644 --- a/Items/Weapons/Rogue/TimeBolt.cs +++ b/Items/Weapons/Rogue/TimeBolt.cs @@ -41,7 +41,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (player.Calamity().StealthStrikeAvailable()) - damage = (int)(damage * 0.8); + damage = (int)(damage * 0.68); int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); if (player.Calamity().StealthStrikeAvailable() && proj.WithinBounds(Main.maxProjectiles)) From e3050d2929551ff0d6ebfa277cfbc5eda9a5deab Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:36:23 -0500 Subject: [PATCH 017/103] Buffed Infernal Spear damage to 700 --- Items/Weapons/Rogue/ProfanedTrident.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/ProfanedTrident.cs b/Items/Weapons/Rogue/ProfanedTrident.cs index 2ff79176df..f02356ae96 100644 --- a/Items/Weapons/Rogue/ProfanedTrident.cs +++ b/Items/Weapons/Rogue/ProfanedTrident.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { item.width = 72; - item.damage = 300; + item.damage = 700; item.noMelee = true; item.noUseGraphic = true; item.useAnimation = 13; From 511b19894566bfaaab618215c06143725b0e508d Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:36:58 -0500 Subject: [PATCH 018/103] Gave OD a 35% resists to Last Mourning --- NPCs/CalamityGlobalNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 8952cd847c..a91a584c27 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3856,7 +3856,7 @@ namespace CalamityMod.NPCs damage = (int)(damage * 0.795); if (projectile.type == ProjectileType() || projectile.type == ProjectileID.FlamingJack) - damage = (int)(damage * 0.6); + damage = (int)(damage * 0.39); } else if (npc.type == NPCType()) { From caf2c232e220d5ecc62dc7178e8befe27a8bdcc5 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:41:51 -0500 Subject: [PATCH 019/103] Nerfed Lion Heart damage to 323 --- Items/Weapons/Melee/LionHeart.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/LionHeart.cs b/Items/Weapons/Melee/LionHeart.cs index f1a7052f94..386badac26 100644 --- a/Items/Weapons/Melee/LionHeart.cs +++ b/Items/Weapons/Melee/LionHeart.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Melee item.width = 60; item.height = 62; - item.damage = 380; + item.damage = 323; item.knockBack = 5.5f; item.scale = 1.5f; item.useStyle = ItemUseStyleID.SwingThrow; From e47e836cd18833a576d26d32c53e673a69e04677 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:42:52 -0500 Subject: [PATCH 020/103] Buffed Moon Crown hit proj's base damage by 10 --- CalPlayer/CalamityPlayerOnHit.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 4efb64ab4c..93ebdc7d18 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -562,7 +562,7 @@ namespace CalamityMod.CalPlayer { Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (position - source) / 10f; - int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, (int)(60 * player.RogueDamage()), 3, proj.owner); + int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, (int)(70 * player.RogueDamage()), 3, proj.owner); if (flare.WithinBounds(Main.maxProjectiles)) Main.projectile[flare].Calamity().forceTypeless = true; modPlayer.moonCrownCooldown = 60; From 55ffaebdbb53bba2e76c05805b4dc5b6631a7558 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:43:32 -0500 Subject: [PATCH 021/103] Buffed Cosmic Kunai SS damage by 200% (Fear) --- Items/Weapons/Rogue/CosmicKunai.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/CosmicKunai.cs b/Items/Weapons/Rogue/CosmicKunai.cs index b4843872dd..59dd4e0c13 100644 --- a/Items/Weapons/Rogue/CosmicKunai.cs +++ b/Items/Weapons/Rogue/CosmicKunai.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (player.Calamity().StealthStrikeAvailable() && player.ownedProjectileCounts[ModContent.ProjectileType()] < 10 && counter == 0 && stealth.WithinBounds(Main.maxProjectiles)) { - damage = (int)(damage * 1.07); + damage = (int)(damage * 3.21); Main.projectile[stealth].Calamity().stealthStrike = true; Main.PlaySound(SoundID.Item73, player.position); for (float i = 0; i < 5; i++) From 2c4c4ed1a2f1f66c8be62d1f1e9b16300dd3907d Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:44:55 -0500 Subject: [PATCH 022/103] Gave Dark Energies a 50% resist to Wave Pounder explosions --- NPCs/CalamityGlobalNPC.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a91a584c27..9dc21f3988 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3867,7 +3867,12 @@ namespace CalamityMod.NPCs { if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) damage = (int)(damage * 0.95); - } + } + else if (npc.type == NPCType()) + { + if (projectile.type == ProjectileType()) + damage = (int)(damage * 0.5); + } else if (npc.type == NPCID.CultistBoss) { if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) From 711127ba19b0e3f8492570c5c54fa99efdd30b8e Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:45:39 -0500 Subject: [PATCH 023/103] Buffed Event Horizon's homing range a bit --- Projectiles/Magic/EventHorizonStar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/EventHorizonStar.cs b/Projectiles/Magic/EventHorizonStar.cs index 68652f95cb..5b030cb318 100644 --- a/Projectiles/Magic/EventHorizonStar.cs +++ b/Projectiles/Magic/EventHorizonStar.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Magic if (projectile.localAI[0] >= 100) { Vector2 center = projectile.Center; - float homingRange = 200f; + float homingRange = 250f; bool homeIn = false; float inertia = 25f; float homingSpeed = 23f; From 1dbf37c1c6d54aaaab92cdc7238d6aed7f697461 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:47:59 -0500 Subject: [PATCH 024/103] Nerfed PSA's attacker damage by 30% --- Projectiles/Summon/MiniGuardianAttack.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/MiniGuardianAttack.cs b/Projectiles/Summon/MiniGuardianAttack.cs index 103622aa46..ad025c0a84 100644 --- a/Projectiles/Summon/MiniGuardianAttack.cs +++ b/Projectiles/Summon/MiniGuardianAttack.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Summon (CalamityWorld.downedDoG ? 75f : 0f) + (CalamityWorld.downedYharon ? 75f : 0f) + (modPlayer.profanedCrystalBuffs ? 420f : 0f)); - projectile.damage = baseDamage == 0 ? 0 : (int)(baseDamage * player.MinionDamage()); + projectile.damage = baseDamage == 0 ? 0 : (int)(baseDamage * player.MinionDamage() * 0.7f); ai = type; if (baseDamage >= 420f) { From 150cd495c7679c83dffc8c0f8a33677353bae8b6 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:48:41 -0500 Subject: [PATCH 025/103] Buffed Pearl God's damage to 125 --- Items/Weapons/Ranged/PearlGod.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/PearlGod.cs b/Items/Weapons/Ranged/PearlGod.cs index 4b19f9360e..09058c828c 100644 --- a/Items/Weapons/Ranged/PearlGod.cs +++ b/Items/Weapons/Ranged/PearlGod.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 100; + item.damage = 125; item.ranged = true; item.width = 80; item.height = 46; From 9abbf64a06d57d177ed021741d056444ff062851 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:49:15 -0500 Subject: [PATCH 026/103] Nerfed Staff of the Mechworm damage to 137 --- Items/Weapons/Summon/StaffoftheMechworm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/StaffoftheMechworm.cs index 3fc0a3b48d..4330c7e5f9 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/StaffoftheMechworm.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Summon public class StaffoftheMechworm : ModItem { // This value is also referenced by the God Slayer and Auric summoner helmets. - public const int BaseDamage = 161; // originally 325 + public const int BaseDamage = 137; // originally 325 public override void SetStaticDefaults() { DisplayName.SetDefault("Staff of the Mechworm"); From c7e67a917dc1c94ea32e850371d7e83853901f6c Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:52:51 -0500 Subject: [PATCH 027/103] Increased Yharim's Crystal Beams iframes to 10 --- Projectiles/Magic/YharimsCrystalBeam.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/YharimsCrystalBeam.cs b/Projectiles/Magic/YharimsCrystalBeam.cs index 6ad7f332a8..cd10ef85a0 100644 --- a/Projectiles/Magic/YharimsCrystalBeam.cs +++ b/Projectiles/Magic/YharimsCrystalBeam.cs @@ -52,7 +52,7 @@ namespace CalamityMod.Projectiles.Magic // The beam itself still stops on tiles, but its invisible "source" projectile ignores them. projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; - projectile.localNPCHitCooldown = 5; + projectile.localNPCHitCooldown = 10; } public override void SendExtraAI(BinaryWriter writer) => writer.Write(projectile.localAI[1]); From 1bc393e4ce0b91a3147f91512b8c4e8f8c3fc72c Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:55:50 -0500 Subject: [PATCH 028/103] Gave SCal a 15% resist to endo hydra and reduced damage to 180 --- Items/Weapons/Summon/EndoHydraStaff.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/EndoHydraStaff.cs b/Items/Weapons/Summon/EndoHydraStaff.cs index ceb7ee7c54..7895ed20d6 100644 --- a/Items/Weapons/Summon/EndoHydraStaff.cs +++ b/Items/Weapons/Summon/EndoHydraStaff.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.Item60; item.summon = true; item.mana = 10; - item.damage = 225; + item.damage = 180; item.knockBack = 3f; item.autoReuse = true; item.useTime = item.useAnimation = 10; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9dc21f3988..a8efdb3635 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3873,6 +3873,11 @@ namespace CalamityMod.NPCs if (projectile.type == ProjectileType()) damage = (int)(damage * 0.5); } + else if (npc.type == NPCType()) + { + if (projectile.type == ProjectileType()) + damage = (int)(damage * 0.85); + } else if (npc.type == NPCID.CultistBoss) { if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) From e9dd5e8c7e870a278c1e9014eaf96ec65a702e91 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:56:57 -0500 Subject: [PATCH 029/103] Gave SCal a 20% resist to pole warpers and reduced damage to 248 --- Items/Weapons/DraedonsArsenal/PoleWarper.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Items/Weapons/DraedonsArsenal/PoleWarper.cs b/Items/Weapons/DraedonsArsenal/PoleWarper.cs index 709fd95d9e..5155800c48 100644 --- a/Items/Weapons/DraedonsArsenal/PoleWarper.cs +++ b/Items/Weapons/DraedonsArsenal/PoleWarper.cs @@ -22,7 +22,7 @@ namespace CalamityMod.Items.Weapons.DraedonsArsenal CalamityGlobalItem modItem = item.Calamity(); item.shootSpeed = 10f; - item.damage = 310; + item.damage = 248; item.mana = 12; item.width = 38; item.height = 24; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a8efdb3635..766e9ce14d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3877,6 +3877,8 @@ namespace CalamityMod.NPCs { if (projectile.type == ProjectileType()) damage = (int)(damage * 0.85); + if (projectile.type == ProjectileType()) + damage = (int)(damage * 0.8); } else if (npc.type == NPCID.CultistBoss) { From 47bb9c874d07267e5e70fd75614fa08547ac3ad9 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:58:07 -0500 Subject: [PATCH 030/103] Gave SCal a 15% resist to Saros Possession and reduced damage to 145 --- Items/Weapons/Summon/SarosPossession.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/SarosPossession.cs b/Items/Weapons/Summon/SarosPossession.cs index 204798affb..1a19d8ed1a 100644 --- a/Items/Weapons/Summon/SarosPossession.cs +++ b/Items/Weapons/Summon/SarosPossession.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Summon item.summon = true; item.mana = 100; - item.damage = 170; + item.damage = 145; item.knockBack = 4f; item.useTime = item.useAnimation = 10; item.shoot = ModContent.ProjectileType(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 766e9ce14d..fa034abb92 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3875,8 +3875,10 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCType()) { - if (projectile.type == ProjectileType()) + if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) + { damage = (int)(damage * 0.85); + } if (projectile.type == ProjectileType()) damage = (int)(damage * 0.8); } From ade86040d76b29908dbb07c78407725b423b22de Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 22:59:30 -0500 Subject: [PATCH 031/103] Gave SCal a 15% resist to Corvid Harbinger and reduced damage to 97 --- Items/Weapons/Summon/CorvidHarbringerStaff.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/CorvidHarbringerStaff.cs b/Items/Weapons/Summon/CorvidHarbringerStaff.cs index 5bc22b7197..2959295f06 100644 --- a/Items/Weapons/Summon/CorvidHarbringerStaff.cs +++ b/Items/Weapons/Summon/CorvidHarbringerStaff.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon item.UseSound = SoundID.DD2_BetsyFlyingCircleAttack; item.summon = true; item.mana = 11; - item.damage = 114; + item.damage = 97; item.knockBack = 2f; item.autoReuse = true; item.useTime = item.useAnimation = 10; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index fa034abb92..a857dc1eb2 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3875,7 +3875,8 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCType()) { - if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) + if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType() || + projectile.type == ProjectileType()) { damage = (int)(damage * 0.85); } From 1c7c8c99119bf2c14d490ca06ccb0f2eb02df1f2 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:00:28 -0500 Subject: [PATCH 032/103] Gave SCal a 20% resist to Cosmic Viper Engine and reduced damage to 111 --- Items/Weapons/Summon/CosmicViperEngine.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/CosmicViperEngine.cs b/Items/Weapons/Summon/CosmicViperEngine.cs index 921e12ebcf..13e8d4b50c 100644 --- a/Items/Weapons/Summon/CosmicViperEngine.cs +++ b/Items/Weapons/Summon/CosmicViperEngine.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 139; + item.damage = 111; item.mana = 10; item.width = 46; item.height = 28; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a857dc1eb2..1b23d8a213 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3880,7 +3880,7 @@ namespace CalamityMod.NPCs { damage = (int)(damage * 0.85); } - if (projectile.type == ProjectileType()) + if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) damage = (int)(damage * 0.8); } else if (npc.type == NPCID.CultistBoss) From 81ff5a0a38c85de9aa633ccc74494c1ae862eed2 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:01:06 -0500 Subject: [PATCH 033/103] Gave SCal a 10% resist to mechworm --- NPCs/CalamityGlobalNPC.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 1b23d8a213..9e69668cb4 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3882,6 +3882,9 @@ namespace CalamityMod.NPCs } if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) damage = (int)(damage * 0.8); + + if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) + damage = (int)(damage * 0.9); } else if (npc.type == NPCID.CultistBoss) { From fccb2f7213b367ffc92083db239fd00b71a58bfb Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:02:04 -0500 Subject: [PATCH 034/103] Net nerfed Deathhail staff --- Items/Weapons/Magic/DeathhailStaff.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Magic/DeathhailStaff.cs b/Items/Weapons/Magic/DeathhailStaff.cs index e9f89d7ad1..af14db8a61 100644 --- a/Items/Weapons/Magic/DeathhailStaff.cs +++ b/Items/Weapons/Magic/DeathhailStaff.cs @@ -20,13 +20,13 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 132; + item.damage = 155; item.magic = true; item.mana = 12; item.width = 80; item.height = 84; - item.useTime = 6; - item.useAnimation = 12; + item.useTime = 8; + item.useAnimation = 16; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 4f; From 7a1e7d78fd108842f353926963b4801fde38ac7e Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:02:32 -0500 Subject: [PATCH 035/103] Buffed Phoenix Flame barrage damage to 150 --- Items/Weapons/Magic/PhoenixFlameBarrage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/PhoenixFlameBarrage.cs b/Items/Weapons/Magic/PhoenixFlameBarrage.cs index 3ca1053c46..95db22cf7f 100644 --- a/Items/Weapons/Magic/PhoenixFlameBarrage.cs +++ b/Items/Weapons/Magic/PhoenixFlameBarrage.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 87; + item.damage = 150; item.magic = true; item.mana = 20; item.width = 72; From 9b647ce813fa1187e0b258e94b7a2429f77405e7 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:03:28 -0500 Subject: [PATCH 036/103] Gave SCal brothers a 10% resist to Phoenix Flame Barrage --- NPCs/CalamityGlobalNPC.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9e69668cb4..e8ad0addf5 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3886,6 +3886,11 @@ namespace CalamityMod.NPCs if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) damage = (int)(damage * 0.9); } + else if (npc.type == NPCType() || npc.type == NPCType()) + { + if (projectile.type == ProjectileType()) + damage = (int)(damage * 0.9); + } else if (npc.type == NPCID.CultistBoss) { if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) From 54c24822190d9f07a8a3e9f5b17fdf7d13379f19 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:03:54 -0500 Subject: [PATCH 037/103] Buffed T1000 damage to 250 --- Items/Weapons/Magic/T1000.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/T1000.cs b/Items/Weapons/Magic/T1000.cs index bbc3a8a0ec..8ac53ca068 100644 --- a/Items/Weapons/Magic/T1000.cs +++ b/Items/Weapons/Magic/T1000.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 200; + item.damage = 250; item.magic = true; item.mana = 10; item.width = 20; From 9b0e0b80574cfdda8180f1997a19b9cb4173afe3 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:04:14 -0500 Subject: [PATCH 038/103] Nerfed AoTC damage to 140 --- Items/Weapons/Melee/ArkoftheCosmos.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index 3c22271df5..aeef4ac3ea 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 102; - item.damage = 150; + item.damage = 140; item.melee = true; item.useAnimation = 15; item.useTime = 15; From 717f49c43d1093391cde7ec9514b1913fd3c7391 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:05:08 -0500 Subject: [PATCH 039/103] Buffed the Burning Sky damage to 600 --- Items/Weapons/Melee/TheBurningSky.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/TheBurningSky.cs b/Items/Weapons/Melee/TheBurningSky.cs index f8d2f52bbb..0b762aaddf 100644 --- a/Items/Weapons/Melee/TheBurningSky.cs +++ b/Items/Weapons/Melee/TheBurningSky.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 62; - item.damage = 60; + item.damage = 600; item.melee = true; item.useTime = 15; item.useAnimation = 15; From 8add8c3210fc4c3865778209b494c2c2eeb2feb8 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:05:36 -0500 Subject: [PATCH 040/103] Nerfed Murasama damage to 2001 --- Items/Weapons/Melee/Murasama.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/Murasama.cs b/Items/Weapons/Melee/Murasama.cs index d7a7fa90c3..28ea5cf715 100644 --- a/Items/Weapons/Melee/Murasama.cs +++ b/Items/Weapons/Melee/Murasama.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.height = 128; item.width = 56; - item.damage = 6001; + item.damage = 2001; item.melee = true; item.noMelee = true; item.noUseGraphic = true; From b8dd8e44631c8ed09c548d8877c1e80863e059d8 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:06:11 -0500 Subject: [PATCH 041/103] Buffed Dragon Rage damage to 1350 --- Items/Weapons/Melee/DragonRage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/DragonRage.cs b/Items/Weapons/Melee/DragonRage.cs index 7119bbaa05..115134a6c8 100644 --- a/Items/Weapons/Melee/DragonRage.cs +++ b/Items/Weapons/Melee/DragonRage.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { - item.damage = 240; + item.damage = 1350; item.knockBack = 7.5f; item.useAnimation = item.useTime = 25; item.melee = true; From f964f656d5880ec4e6fd8fdcb6787a18369a593e Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:06:27 -0500 Subject: [PATCH 042/103] Nerfed Dragon Pow damage to 660 --- Items/Weapons/Melee/DragonPow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/DragonPow.cs b/Items/Weapons/Melee/DragonPow.cs index 1cf75ab8cc..e67e97b43a 100644 --- a/Items/Weapons/Melee/DragonPow.cs +++ b/Items/Weapons/Melee/DragonPow.cs @@ -29,7 +29,7 @@ Summons a barrage of petals and waterfalls on enemy hits"); item.width = 76; item.height = 82; item.melee = true; - item.damage = 1350; + item.damage = 660; item.knockBack = 9f; item.useAnimation = 20; item.useTime = 20; From aca33b42dd7d2958130c4b0d486dc8a5b8f717ac Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:08:57 -0500 Subject: [PATCH 043/103] Made Dragon Pow's hit effects only work after 75% range --- Projectiles/Melee/DragonPowFlail.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Projectiles/Melee/DragonPowFlail.cs b/Projectiles/Melee/DragonPowFlail.cs index 14a731eadc..f011f2b2bd 100644 --- a/Projectiles/Melee/DragonPowFlail.cs +++ b/Projectiles/Melee/DragonPowFlail.cs @@ -138,6 +138,10 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { + // Only perform hit effects after reaching approximately 75% of the way out. + if (projectile.WithinRange(Main.player[projectile.owner].Center, 1100f)) + return; + // Inflicts Daybroken, Abyssal Flames and Holy Flames for 8 seconds on-hit target.AddBuff(BuffID.Daybreak, 480); target.AddBuff(ModContent.BuffType(), 480); @@ -152,6 +156,10 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitPvp(Player target, int damage, bool crit) { + // Only perform hit effects after reaching approximately 75% of the way out. + if (projectile.WithinRange(Main.player[projectile.owner].Center, 1100f)) + return; + // Inflicts Abyssal Flames and Holy Flames for 8 seconds on-hit target.AddBuff(ModContent.BuffType(), 480); target.AddBuff(ModContent.BuffType(), 480); From d5f1384560eeec80bb95e19d2fef82e05940df24 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:09:31 -0500 Subject: [PATCH 044/103] Nerfed Exo Gladius damage to 690 --- Items/Weapons/Melee/ExoGladius.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/ExoGladius.cs b/Items/Weapons/Melee/ExoGladius.cs index c8dd5e0755..38ce59ea03 100644 --- a/Items/Weapons/Melee/ExoGladius.cs +++ b/Items/Weapons/Melee/ExoGladius.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Melee item.useTime = 12; item.width = 56; item.height = 56; - item.damage = 810; + item.damage = 690; item.melee = true; item.knockBack = 9.9f; item.UseSound = SoundID.Item1; From d143ad4d4a2d306c841b7f9e0f0b60324027f843 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:09:56 -0500 Subject: [PATCH 045/103] Nerfed Exoblade damage to 900 --- Items/Weapons/Melee/DraedonsExoblade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/DraedonsExoblade.cs b/Items/Weapons/Melee/DraedonsExoblade.cs index a1c4df303f..5a119fb044 100644 --- a/Items/Weapons/Melee/DraedonsExoblade.cs +++ b/Items/Weapons/Melee/DraedonsExoblade.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = 80; - item.damage = 1500; + item.damage = 900; item.useAnimation = 14; item.useStyle = ItemUseStyleID.SwingThrow; item.useTime = 14; From 65ad5fcdb576f80881f8e602ceb6ec9e8eb2834c Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:13:41 -0500 Subject: [PATCH 046/103] Immensely nerfed the Oracle --- Items/Weapons/Melee/Oracle.cs | 2 +- Projectiles/Melee/Yoyos/OracleYoyo.cs | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Melee/Oracle.cs b/Items/Weapons/Melee/Oracle.cs index 344be62473..fd80f86eb2 100644 --- a/Items/Weapons/Melee/Oracle.cs +++ b/Items/Weapons/Melee/Oracle.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee { public const int YoyoBaseDamage = 115; public const int AuraBaseDamage = 40; - public const int AuraMaxDamage = 120; + public const int AuraMaxDamage = 105; public override void SetStaticDefaults() { diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index accefa75a7..98480e1570 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -2,6 +2,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Projectiles.Typeless; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System.IO; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -10,6 +11,8 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { public class OracleYoyo : ModProjectile { + public int Time; + // projectile.localAI[1] is the Aura Charge of the red lightning aura // Minimum value is zero. Maximum value is 200. // The aura turns on and begins damaging enemies at 20 charge. @@ -40,6 +43,10 @@ namespace CalamityMod.Projectiles.Melee.Yoyos ProjectileID.Sets.TrailingMode[projectile.type] = 1; } + public override void SendExtraAI(BinaryWriter writer) => writer.Write(Time); + + public override void ReceiveExtraAI(BinaryReader reader) => Time = reader.ReadInt32(); + public override void SetDefaults() { projectile.aiStyle = 99; @@ -103,13 +110,18 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Main.PlaySound(SoundID.Item93, (int)projectile.Center.X, (int)projectile.Center.Y); } - // The aura's direct damage scales with its charge and with melee stats. - float chargeRatio = projectile.localAI[1] / MaxCharge; - int auraDamage = Oracle.AuraBaseDamage + (int)(chargeRatio * (Oracle.AuraMaxDamage - Oracle.AuraBaseDamage)); - DealAuraDamage(auraRadius, auraDamage); + if (Time % 5 == 4) + { + + // The aura's direct damage scales with its charge and with melee stats. + float chargeRatio = projectile.localAI[1] / MaxCharge; + int auraDamage = Oracle.AuraBaseDamage + (int)(chargeRatio * (Oracle.AuraMaxDamage - Oracle.AuraBaseDamage)); + DealAuraDamage(auraRadius, auraDamage); + } } else projectile.soundDelay = 2; + Time++; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) From c51f09215bf6a0380454c7ad91f432351b054023 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:14:20 -0500 Subject: [PATCH 047/103] Nerfed Midnight Sun Beacon's damage to 96 --- Items/Weapons/Summon/MidnightSunBeacon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/MidnightSunBeacon.cs b/Items/Weapons/Summon/MidnightSunBeacon.cs index a58bd10a06..447091eaa0 100644 --- a/Items/Weapons/Summon/MidnightSunBeacon.cs +++ b/Items/Weapons/Summon/MidnightSunBeacon.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { - item.damage = 240; + item.damage = 96; item.mana = 12; item.width = item.height = 32; item.useTime = item.useAnimation = 10; From f0ccbbb38096d5a60dd53675dfb7a5369eae9365 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:14:56 -0500 Subject: [PATCH 048/103] Nerfed Cosmic Immaterializer damage to 630 --- Items/Weapons/Summon/CosmicImmaterializer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/CosmicImmaterializer.cs b/Items/Weapons/Summon/CosmicImmaterializer.cs index b99c68d965..bd29889670 100644 --- a/Items/Weapons/Summon/CosmicImmaterializer.cs +++ b/Items/Weapons/Summon/CosmicImmaterializer.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 100; - item.damage = 900; + item.damage = 630; item.useStyle = ItemUseStyleID.SwingThrow; item.width = 74; item.height = 72; From 9ac12d911b6fc2928b4fd14c3d319126f4911538 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:15:32 -0500 Subject: [PATCH 049/103] Nerfed Yharon's Kindle Staff damage to 75 --- Items/Weapons/Summon/AngryChickenStaff.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/AngryChickenStaff.cs b/Items/Weapons/Summon/AngryChickenStaff.cs index ff58061afe..52d96df032 100644 --- a/Items/Weapons/Summon/AngryChickenStaff.cs +++ b/Items/Weapons/Summon/AngryChickenStaff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 50; - item.damage = 100; + item.damage = 75; item.useStyle = ItemUseStyleID.SwingThrow; item.width = 32; item.height = 32; From ffab1bd74d944adde1e5e1a151197f3dddb771a2 Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 9 Jun 2021 23:34:50 -0500 Subject: [PATCH 050/103] Updated VV and VC's shoot rate --- Items/Weapons/Magic/Climax.cs | 4 ++-- Items/Weapons/Magic/VoidVortex.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Magic/Climax.cs b/Items/Weapons/Magic/Climax.cs index ff177f9721..ff1244b646 100644 --- a/Items/Weapons/Magic/Climax.cs +++ b/Items/Weapons/Magic/Climax.cs @@ -25,8 +25,8 @@ namespace CalamityMod.Items.Weapons.Magic item.mana = 30; item.width = 78; item.height = 78; - item.useTime = 33; - item.useAnimation = 33; + item.useTime = 41; + item.useAnimation = 41; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 5f; diff --git a/Items/Weapons/Magic/VoidVortex.cs b/Items/Weapons/Magic/VoidVortex.cs index 751de4be03..d5c849419b 100644 --- a/Items/Weapons/Magic/VoidVortex.cs +++ b/Items/Weapons/Magic/VoidVortex.cs @@ -23,8 +23,8 @@ namespace CalamityMod.Items.Weapons.Magic item.mana = 60; item.width = 130; item.height = 130; - item.useTime = 41; - item.useAnimation = 41; + item.useTime = 49; + item.useAnimation = 49; item.useStyle = ItemUseStyleID.HoldingOut; item.noMelee = true; item.knockBack = 0f; From 1bd78e8740f3eb494cacfb470e8f5cce8c71957c Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 10 Jun 2021 15:30:48 -0500 Subject: [PATCH 051/103] Oracle code adjustments --- Projectiles/Melee/Yoyos/OracleYoyo.cs | 47 +++++++++++++++------------ 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index 98480e1570..0a405eba6c 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -11,13 +11,15 @@ namespace CalamityMod.Projectiles.Melee.Yoyos { public class OracleYoyo : ModProjectile { - public int Time; + public int AuraFrame; // projectile.localAI[1] is the Aura Charge of the red lightning aura // Minimum value is zero. Maximum value is 200. // The aura turns on and begins damaging enemies at 20 charge. // The yoyo "supercharges" at 50 charge. // Its size caps out at 100 charge. + public ref float AuraCharge => ref projectile.localAI[1]; + private const float MaxCharge = 200f; private const float MinAuraRadius = 20f; private const float SuperchargeThreshold = 50f; @@ -29,7 +31,6 @@ namespace CalamityMod.Projectiles.Melee.Yoyos private const int HitsPerOrbVolley = 3; // Ensures that the main AI only runs once per frame, despite the projectile's multiple updates - private int extraUpdateCounter = 0; private const int UpdatesPerFrame = 3; public override void SetStaticDefaults() @@ -43,9 +44,17 @@ namespace CalamityMod.Projectiles.Melee.Yoyos ProjectileID.Sets.TrailingMode[projectile.type] = 1; } - public override void SendExtraAI(BinaryWriter writer) => writer.Write(Time); + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(AuraFrame); + writer.Write(AuraCharge); + } - public override void ReceiveExtraAI(BinaryReader reader) => Time = reader.ReadInt32(); + public override void ReceiveExtraAI(BinaryReader reader) + { + AuraFrame = reader.ReadInt32(); + AuraCharge = reader.ReadSingle(); + } public override void SetDefaults() { @@ -68,8 +77,7 @@ namespace CalamityMod.Projectiles.Melee.Yoyos projectile.Kill(); // Only do stuff once per frame, despite the yoyo's extra updates. - extraUpdateCounter = (extraUpdateCounter + 1) % UpdatesPerFrame; - if (extraUpdateCounter != UpdatesPerFrame - 1) + if (!projectile.FinalExtraUpdate()) return; // Produces golden dust constantly while in flight. This helps light the yoyo. @@ -87,21 +95,21 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Lighting.AddLight(projectile.Center, 0.6f, 0.42f, 0.1f); // The aura discharges over time based on its current charge. - float discharge = MinDischargeRate + DischargeRateScaleFactor * projectile.localAI[1]; + float discharge = MinDischargeRate + DischargeRateScaleFactor * AuraCharge; if (discharge > MaxDischargeRate) discharge = MaxDischargeRate; - projectile.localAI[1] -= discharge; + AuraCharge -= discharge; // Boundary checks on aura charge - if (projectile.localAI[1] < 0f) - projectile.localAI[1] = 0f; - if (projectile.localAI[1] > MaxCharge) - projectile.localAI[1] = MaxCharge; + if (AuraCharge < 0f) + AuraCharge = 0f; + if (AuraCharge > MaxCharge) + AuraCharge = MaxCharge; // If the aura is large enough to be considered "on", draw it, make sound and damage enemies - if (projectile.localAI[1] > MinAuraRadius) + if (AuraCharge > MinAuraRadius) { - float auraRadius = projectile.localAI[1] > MaxAuraRadius ? MaxAuraRadius : projectile.localAI[1]; + float auraRadius = AuraCharge > MaxAuraRadius ? MaxAuraRadius : AuraCharge; DrawRedLightningAura(auraRadius); if (projectile.soundDelay == 0) @@ -110,18 +118,17 @@ namespace CalamityMod.Projectiles.Melee.Yoyos Main.PlaySound(SoundID.Item93, (int)projectile.Center.X, (int)projectile.Center.Y); } - if (Time % 5 == 4) + if (AuraFrame % 5 == 4) { - // The aura's direct damage scales with its charge and with melee stats. - float chargeRatio = projectile.localAI[1] / MaxCharge; + float chargeRatio = AuraCharge / MaxCharge; int auraDamage = Oracle.AuraBaseDamage + (int)(chargeRatio * (Oracle.AuraMaxDamage - Oracle.AuraBaseDamage)); DealAuraDamage(auraRadius, auraDamage); } } else projectile.soundDelay = 2; - Time++; + AuraFrame++; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) @@ -133,10 +140,10 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { // Charge up the red lightning aura with every hit - projectile.localAI[1] += ChargePerHit; + AuraCharge += ChargePerHit; // Fire Auric orbs every few hits while supercharged. - if (projectile.localAI[1] > SuperchargeThreshold && projectile.numHits % HitsPerOrbVolley == 0) + if (AuraCharge > SuperchargeThreshold && projectile.numHits % HitsPerOrbVolley == 0) FireAuricOrbs(); } From 034c7e84e3d9ab1bccefa42bc93566608fec1d59 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Thu, 10 Jun 2021 20:03:12 -0400 Subject: [PATCH 052/103] fixed some angelic alliance stuff --- Buffs/StatBuffs/DivineBless.cs | 2 +- CalPlayer/CalamityPlayerLifeRegen.cs | 37 +--------------------------- NPCs/CalamityGlobalNPC.cs | 8 +++--- 3 files changed, 6 insertions(+), 41 deletions(-) diff --git a/Buffs/StatBuffs/DivineBless.cs b/Buffs/StatBuffs/DivineBless.cs index 1f61ad062d..4a75db454f 100644 --- a/Buffs/StatBuffs/DivineBless.cs +++ b/Buffs/StatBuffs/DivineBless.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Buffs.StatBuffs public override void SetDefaults() { DisplayName.SetDefault("Divine Bless"); - Description.SetDefault("+5% damage, increased health regen, attacks inflict Banishing Fire"); + Description.SetDefault("Increased health regen and minions inflict Banishing Fire"); Main.debuff[Type] = true; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; diff --git a/CalPlayer/CalamityPlayerLifeRegen.cs b/CalPlayer/CalamityPlayerLifeRegen.cs index 00ac66956e..5eaaf80cc2 100644 --- a/CalPlayer/CalamityPlayerLifeRegen.cs +++ b/CalPlayer/CalamityPlayerLifeRegen.cs @@ -408,7 +408,7 @@ namespace CalamityMod.CalPlayer if (modPlayer.divineBless) { - if (player.whoAmI == Main.myPlayer && player.miscCounter % 15 == 0) + if (player.whoAmI == Main.myPlayer && player.miscCounter % 15 == 0) // Flat 4 health per second { if (!modPlayer.noLifeRegen) player.statLife += 1; @@ -797,41 +797,6 @@ namespace CalamityMod.CalPlayer player.statLife += 1; } - if (modPlayer.divineBless) - { - player.lifeRegenTime++; - - int lifeRegenMaxBoost2 = 1; - float lifeRegenLifeRegenTimeMaxBoost2 = 4f; - - player.lifeRegen += lifeRegenMaxBoost2; - - float num3 = player.lifeRegenTime * 2.5f; // lifeRegenTime max is 3600 - num3 /= 300f; - if (num3 > 0f) - { - if (num3 > lifeRegenLifeRegenTimeMaxBoost2) - num3 = lifeRegenLifeRegenTimeMaxBoost2; - - player.lifeRegen += (int)num3; - } - if (player.lifeRegen > 0 && player.statLife < modPlayer.actualMaxLife) - { - player.lifeRegenCount++; - if (Main.rand.Next(30000) < player.lifeRegenTime || Main.rand.NextBool(2)) - { - int regen = Dust.NewDust(player.position, player.width, player.height, (int)CalamityDusts.ProfanedFire, 0f, 0f, 200, default, 1f); - Main.dust[regen].noGravity = true; - Main.dust[regen].fadeIn = 1.3f; - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 50f, 100f, 0.04f); - Main.dust[regen].velocity = velocity; - velocity.Normalize(); - velocity *= 34f; - Main.dust[regen].position = player.Center - velocity; - } - } - } - // Standing still healing bonuses (all exclusive with vanilla Shiny Stone) if (!player.shinyStone) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index e8ad0addf5..781dacca78 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -946,10 +946,10 @@ namespace CalamityMod.NPCs ApplyDPSDebuff(electrified, electrifiedDamage, displayedValue, ref npc.lifeRegen, ref damage); else ApplyDPSDebuff(electrified, electrifiedDamage * 4, displayedValue * 4, ref npc.lifeRegen, ref damage); - if (npc.lifeMax < 25000000) - ApplyDPSDebuff(banishingFire, 20000, 4000, ref npc.lifeRegen, ref damage); - else - ApplyDPSDebuff(banishingFire, npc.lifeMax / 2500, npc.lifeMax / 2500, ref npc.lifeRegen, ref damage); + if (npc.lifeMax < 1000000) // 2000 hp per second as minimum + ApplyDPSDebuff(banishingFire, 4000, 800, ref npc.lifeRegen, ref damage); + else // On big health enemies, do 0.2% hp per second + ApplyDPSDebuff(banishingFire, npc.lifeMax / 500, npc.lifeMax / 2500, ref npc.lifeRegen, ref damage); } public void ApplyDPSDebuff(int debuff, int lifeRegenValue, int damageValue, ref int lifeRegen, ref int damage) From 523dc75efa813773c111e4653c03d5ba37faa5b3 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 10 Jun 2021 19:45:55 -0500 Subject: [PATCH 053/103] Odd Mushroom warning tooltip --- Items/Potions/Alcohol/OddMushroom.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Items/Potions/Alcohol/OddMushroom.cs b/Items/Potions/Alcohol/OddMushroom.cs index 10bcb5b0d7..983d631458 100644 --- a/Items/Potions/Alcohol/OddMushroom.cs +++ b/Items/Potions/Alcohol/OddMushroom.cs @@ -10,7 +10,9 @@ namespace CalamityMod.Items.Potions.Alcohol public override void SetStaticDefaults() { DisplayName.SetDefault("Odd Mushroom"); - Tooltip.SetDefault("Trippy"); + Tooltip.SetDefault("Causes you to see many fake, vibrant copies of all nearby entities\n" + + "These visual effects may be nauseating or otherwise bad for some\n" + + "Trippy"); } public override void SetDefaults() From f728ec8c200d6de75e2f657d76c50791bdbed255 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 11 Jun 2021 03:44:00 -0500 Subject: [PATCH 054/103] 1 - Fixed all of the non-God Slayer dashes. 2 - Polterghast now attempts to predict you with its dashes a bit because they were extremely braindead to evade. This prediction changes from very low to high depending on how enraged it is. --- CalPlayer/CalamityPlayer.cs | 9 +++++---- NPCs/Polterghast/PolterPhantom.cs | 9 +++++---- NPCs/Polterghast/Polterghast.cs | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 8f403718c6..1b2539c9cb 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -8777,6 +8777,7 @@ namespace CalamityMod.CalPlayer private bool DoADash(float dashDistance) { + bool godSlayerDash = dashMod == 9; bool justDashed = false; int direction = 0; @@ -8785,7 +8786,7 @@ namespace CalamityMod.CalPlayer if (dashTimeMod < 0) dashTimeMod++; - if (dashMod == 9) + if (godSlayerDash) { if (player.controlUp && player.controlLeft) { @@ -8933,7 +8934,7 @@ namespace CalamityMod.CalPlayer // Left case -1: - player.velocity = possibleVelocities[6]; + player.velocity = godSlayerDash ? possibleVelocities[6] : new Vector2(possibleVelocities[6].X, player.velocity.Y); break; // Nothing @@ -8942,7 +8943,7 @@ namespace CalamityMod.CalPlayer // Right case 1: - player.velocity = possibleVelocities[2]; + player.velocity = godSlayerDash ? possibleVelocities[2] : new Vector2(possibleVelocities[2].X, player.velocity.Y); break; // Down @@ -8964,7 +8965,7 @@ namespace CalamityMod.CalPlayer Point point5 = (player.Center + new Vector2(MathHelper.Clamp(direction, -1f, 1f) * player.width / 2 + 2, player.gravDir * -player.height / 2f + player.gravDir * 2f)).ToTileCoordinates(); Point point6 = (player.Center + new Vector2(MathHelper.Clamp(direction, -1f, 1f) * player.width / 2 + 2, 0f)).ToTileCoordinates(); if (WorldGen.SolidOrSlopedTile(point5.X, point5.Y) || WorldGen.SolidOrSlopedTile(point6.X, point6.Y)) - player.velocity.X = player.velocity.X / 2f; + player.velocity.X /= 2f; player.dashDelay = -1; } diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index f7672c7462..43327ec2fa 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -144,9 +144,10 @@ namespace CalamityMod.NPCs.Polterghast } // Look at target - float num740 = player.Center.X - vector.X; - float num741 = player.Center.Y - vector.Y; - npc.rotation = (float)Math.Atan2(num741, num740) + MathHelper.PiOver2; + float chargePredictionAmt = 10f + 40f * (tileEnrageMult - 1f); + Vector2 lookAt = player.Center + (chargePhase ? (player.velocity * chargePredictionAmt) : Vector2.Zero); + Vector2 rotationVector = lookAt - vector; + npc.rotation = (float)Math.Atan2(rotationVector.X, rotationVector.Y) + MathHelper.PiOver2; npc.damage = npc.defDamage; @@ -262,7 +263,7 @@ namespace CalamityMod.NPCs.Polterghast if (npc.Calamity().newAI[1] == 0f) { - npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity; + npc.velocity = Vector2.Normalize(player.Center + player.velocity * chargePredictionAmt - vector) * chargeVelocity; npc.Calamity().newAI[1] = 1f; } else diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 02ce465f12..087ce0ea8b 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -314,9 +314,10 @@ namespace CalamityMod.NPCs.Polterghast baseProjectileVelocity *= 1.25f; // Look at target - float num740 = player.Center.X - vector.X; - float num741 = player.Center.Y - vector.Y; - npc.rotation = (float)Math.Atan2(num741, num740) + MathHelper.PiOver2; + float chargePredictionAmt = 10f + 40f * (tileEnrageMult - 1f); + Vector2 lookAt = player.Center + (chargePhase ? (player.velocity * chargePredictionAmt) : Vector2.Zero); + Vector2 rotationVector = lookAt - vector; + npc.rotation = (float)Math.Atan2(rotationVector.X, rotationVector.Y) + MathHelper.PiOver2; if (!chargePhase) { @@ -435,7 +436,7 @@ namespace CalamityMod.NPCs.Polterghast if (calamityGlobalNPC.newAI[1] == 0f) { - npc.velocity = Vector2.Normalize(player.Center - vector) * chargeVelocity; + npc.velocity = Vector2.Normalize(player.Center + player.velocity * chargePredictionAmt - vector) * chargeVelocity; calamityGlobalNPC.newAI[1] = 1f; } else From 34c6713a34ed7e84d133bf6e683acd9213248b52 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 11 Jun 2021 04:29:33 -0500 Subject: [PATCH 055/103] 1 - Fixed Polter's charge. --- NPCs/Polterghast/PolterPhantom.cs | 14 +++++++++----- NPCs/Polterghast/Polterghast.cs | 12 ++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 43327ec2fa..f53e29c0de 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -143,11 +143,15 @@ namespace CalamityMod.NPCs.Polterghast acceleration += revenge ? 0.035f : 0.025f; } - // Look at target + // Predictiveness float chargePredictionAmt = 10f + 40f * (tileEnrageMult - 1f); - Vector2 lookAt = player.Center + (chargePhase ? (player.velocity * chargePredictionAmt) : Vector2.Zero); + Vector2 lookAt = player.Center + (chargePhase && revenge ? (player.velocity * chargePredictionAmt) : Vector2.Zero); Vector2 rotationVector = lookAt - vector; - npc.rotation = (float)Math.Atan2(rotationVector.X, rotationVector.Y) + MathHelper.PiOver2; + + // Rotation + float num740 = player.Center.X - vector.X; + float num741 = player.Center.Y - vector.Y; + npc.rotation = (float)Math.Atan2(num741, num740) + MathHelper.PiOver2; npc.damage = npc.defDamage; @@ -263,7 +267,7 @@ namespace CalamityMod.NPCs.Polterghast if (npc.Calamity().newAI[1] == 0f) { - npc.velocity = Vector2.Normalize(player.Center + player.velocity * chargePredictionAmt - vector) * chargeVelocity; + npc.velocity = Vector2.Normalize(rotationVector) * chargeVelocity; npc.Calamity().newAI[1] = 1f; } else @@ -338,7 +342,7 @@ namespace CalamityMod.NPCs.Polterghast npc.Opacity = 0f; } - int numUpdates = reachedChargingPoint ? 5 : 1; + int numUpdates = reachedChargingPoint ? 10 : 1; for (int i = 0; i < numUpdates; i++) { if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue) diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 087ce0ea8b..b5635b3a41 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -313,11 +313,15 @@ namespace CalamityMod.NPCs.Polterghast if (speedBoost) baseProjectileVelocity *= 1.25f; - // Look at target + // Predictiveness float chargePredictionAmt = 10f + 40f * (tileEnrageMult - 1f); - Vector2 lookAt = player.Center + (chargePhase ? (player.velocity * chargePredictionAmt) : Vector2.Zero); + Vector2 lookAt = player.Center + (chargePhase && revenge ? (player.velocity * chargePredictionAmt) : Vector2.Zero); Vector2 rotationVector = lookAt - vector; - npc.rotation = (float)Math.Atan2(rotationVector.X, rotationVector.Y) + MathHelper.PiOver2; + + // Rotation + float num740 = player.Center.X - vector.X; + float num741 = player.Center.Y - vector.Y; + npc.rotation = (float)Math.Atan2(num741, num740) + MathHelper.PiOver2; if (!chargePhase) { @@ -436,7 +440,7 @@ namespace CalamityMod.NPCs.Polterghast if (calamityGlobalNPC.newAI[1] == 0f) { - npc.velocity = Vector2.Normalize(player.Center + player.velocity * chargePredictionAmt - vector) * chargeVelocity; + npc.velocity = Vector2.Normalize(rotationVector) * chargeVelocity; calamityGlobalNPC.newAI[1] = 1f; } else From 7f70e6c27879d62e4e5830e6f92d17220050dfb6 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 11 Jun 2021 09:26:12 -0500 Subject: [PATCH 056/103] 1 - Polterghast charge adjustment. --- NPCs/Polterghast/PolterPhantom.cs | 7 ++++--- NPCs/Polterghast/Polterghast.cs | 14 +++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index f53e29c0de..8db23726d0 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.Polterghast npc.Opacity = 0f; } - int numUpdates = reachedChargingPoint ? 10 : 1; + int numUpdates = reachedChargingPoint ? 10 : 2; for (int i = 0; i < numUpdates; i++) { if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue) @@ -353,10 +353,11 @@ namespace CalamityMod.NPCs.Polterghast } else { + // Reduce velocity and acceleration to allow for smoother movement inside this loop if (Vector2.Distance(vector, chargeVector) > 1200f) - npc.velocity = chargeLocationVelocity; + npc.velocity = chargeLocationVelocity * 0.5f; else - npc.SimpleFlyMovement(chargeLocationVelocity, chargeAcceleration); + npc.SimpleFlyMovement(chargeLocationVelocity * 0.5f, chargeAcceleration * 0.5f); } } } diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index b5635b3a41..81e94d084d 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -29,7 +29,8 @@ namespace CalamityMod.NPCs.Polterghast public class Polterghast : ModNPC { private int despawnTimer = 600; - private int chargeTelegraphTimer = 60; + private const int chargeTelegraphTimerMax = 150; + private int chargeTelegraphTimer = chargeTelegraphTimerMax; private bool reachedChargingPoint = false; public override void SetStaticDefaults() @@ -456,7 +457,7 @@ namespace CalamityMod.NPCs.Polterghast // Reset and either go back to normal or charge again if (calamityGlobalNPC.newAI[2] >= totalChargeTime) { - chargeTelegraphTimer = 15; + chargeTelegraphTimer = chargeTelegraphTimerMax; calamityGlobalNPC.newAI[1] = 0f; calamityGlobalNPC.newAI[2] = 0f; calamityGlobalNPC.newAI[3] = 0f; @@ -501,7 +502,7 @@ namespace CalamityMod.NPCs.Polterghast // Loop velocity code multiple times per frame if charge location is reached // This effectively quadruples the velocity and acceleration while maintaining smooth movement - int numUpdates = reachedChargingPoint ? 5 : 1; + int numUpdates = reachedChargingPoint ? 10 : 2; for (int i = 0; i < numUpdates; i++) { // Line up a charge @@ -514,7 +515,7 @@ namespace CalamityMod.NPCs.Polterghast if (clonePositionCheck) { // Pause for 15 frames before actually charging - // This is 15 frames because this code runs 4 times per frame once a charge location is found + // This is 15 frames because this code runs 10 times per frame once a charge location is found if (chargeTelegraphTimer > 0) { chargeTelegraphTimer--; @@ -550,7 +551,10 @@ namespace CalamityMod.NPCs.Polterghast } } else - npc.SimpleFlyMovement(chargeLocationVelocity, chargeAcceleration); + { + // Reduce velocity and acceleration to allow for smoother movement inside this loop + npc.SimpleFlyMovement(chargeLocationVelocity * 0.5f, chargeAcceleration * 0.5f); + } } } From 73233e542a28688523268dd687f9e217fe4bdfe7 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 11 Jun 2021 12:53:51 -0500 Subject: [PATCH 057/103] 1 - Adjusted some Wyrm things. --- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 94 ++++++++++++++++++------------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 86ec7d6579..5588a78442 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -222,29 +222,6 @@ namespace CalamityMod.NPCs.Abyss } } - // Adjust opacity - bool invisiblePhase = calamityGlobalNPC.newAI[0] == (float)Phase.LightningRain || calamityGlobalNPC.newAI[0] == (float)Phase.IceMist || calamityGlobalNPC.newAI[0] == (float)Phase.AncientDoomSummon; - npc.dontTakeDamage = invisiblePhase; - if (!invisiblePhase) - { - npc.Opacity += 0.15f; - if (npc.Opacity > 1f) - npc.Opacity = 1f; - } - else - { - npc.Opacity -= 0.05f; - if (npc.Opacity < 0f) - npc.Opacity = 0f; - } - - // Rotation and direction - npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver2; - int direction = npc.direction; - npc.direction = npc.spriteDirection = (npc.velocity.X > 0f) ? 1 : (-1); - if (direction != npc.direction) - npc.netUpdate = true; - // General AI pattern // Charge // Charge : Phase 2 - Spin around target and summon Shadow Fireballs @@ -270,6 +247,42 @@ namespace CalamityMod.NPCs.Abyss // Phase 5 - 0, 6, 8, 1, 2, 2, 4, 7, 8, 5, 2, 2 // Phase 6 - 10 + // Phase gate values + float velocityAdjustTime = 20f; + float chargePhaseGateValue = 180f; + float lightningRainDuration = 180f; + float eidolonWyrmPhaseDuration = 180f; + float iceMistDuration = 180f; + float spinPhaseDuration = 300f; + float ancientDoomPhaseGateValue = 30f; + float ancientDoomGateValue = 120f; + float lightningChargePhaseGateValue = 90f; + + // Adjust opacity + bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC.newAI[0] == (float)Phase.ChargeOne || calamityGlobalNPC.newAI[0] == (float)Phase.ChargeTwo || calamityGlobalNPC.newAI[0] == (float)Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC.newAI[0] == (float)Phase.LightningCharge; + bool invisiblePhase = calamityGlobalNPC.newAI[0] == (float)Phase.LightningRain || calamityGlobalNPC.newAI[0] == (float)Phase.IceMist || calamityGlobalNPC.newAI[0] == (float)Phase.AncientDoomSummon; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Rotation and direction + npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver2; + int direction = npc.direction; + npc.direction = npc.spriteDirection = (npc.velocity.X > 0f) ? 1 : (-1); + if (direction != npc.direction) + npc.netUpdate = true; + // Default vector to swim to Vector2 destination = player.Center; @@ -359,17 +372,6 @@ namespace CalamityMod.NPCs.Abyss float fastChargeTurnSpeedMult = MathHelper.Lerp(1f, 12f, chargeVelocityScalar); float chargeVelocityScalarIncrement = 0.025f; - // Phase gate values - float velocityAdjustTime = 20f; - float chargePhaseGateValue = 180f; - float lightningRainDuration = 180f; - float eidolonWyrmPhaseDuration = 180f; - float iceMistDuration = 180f; - float spinPhaseDuration = 300f; - float ancientDoomPhaseGateValue = 30f; - float ancientDoomGateValue = 120f; - float lightningChargePhaseGateValue = 90f; - // Phase switch switch ((int)AIState) { @@ -378,6 +380,8 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { + ChargeDust(7, (float)Math.PI); + // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 1f) { @@ -404,7 +408,9 @@ namespace CalamityMod.NPCs.Abyss else { // Charge - ChargeDust(7, (float)Math.PI); + + // Become totally visible + npc.Opacity = 1f; destination = chargeDestination; @@ -576,6 +582,8 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { + ChargeDust(7, (float)Math.PI); + // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 1f) { @@ -602,7 +610,9 @@ namespace CalamityMod.NPCs.Abyss else { // Charge very quickly - ChargeDust(7, (float)Math.PI); + + // Become totally visible + npc.Opacity = 1f; destination = chargeDestination; @@ -691,6 +701,8 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { + ChargeDust(7, (float)Math.PI); + // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 1f) { @@ -717,7 +729,9 @@ namespace CalamityMod.NPCs.Abyss else { // Charge - ChargeDust(7, (float)Math.PI); + + // Become totally visible + npc.Opacity = 1f; destination = chargeDestination; @@ -997,6 +1011,8 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue) { + ChargeDust(7, (float)Math.PI); + // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 1f) { @@ -1023,7 +1039,9 @@ namespace CalamityMod.NPCs.Abyss else { // Charge - ChargeDust(7, (float)Math.PI); + + // Become totally visible + npc.Opacity = 1f; destination = chargeDestination; From 85c62000b483a8a2e9166f6844ff5970810c76d4 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 12 Jun 2021 05:40:24 -0500 Subject: [PATCH 058/103] 1 - Wyrm head icon and adjustments. 2 - Polter AI charge adjustments. --- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 15 ++- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 15 ++- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 43 ++++--- NPCs/Abyss/EidolonWyrmHeadHuge_Head_Boss.png | Bin 0 -> 630 bytes NPCs/Abyss/EidolonWyrmTailHuge.cs | 11 +- NPCs/Polterghast/PhantomFuckYou.cs | 9 +- NPCs/Polterghast/PolterPhantom.cs | 41 ++++-- NPCs/Polterghast/Polterghast.cs | 128 ++++++++++--------- 8 files changed, 158 insertions(+), 104 deletions(-) create mode 100644 NPCs/Abyss/EidolonWyrmHeadHuge_Head_Boss.png diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 78015e10b9..f658f765fa 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -69,8 +69,15 @@ namespace CalamityMod.NPCs.Abyss npc.active = false; } - bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f; - if (!invisiblePhase) + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + float chargePhaseGateValue = 180f; + float lightningChargePhaseGateValue = 90f; + + bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; + bool invisiblePhase = calamityGlobalNPC_Head.newAI[0] == 1f || calamityGlobalNPC_Head.newAI[0] == 5f || calamityGlobalNPC_Head.newAI[0] == 7f; + if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { @@ -86,8 +93,8 @@ namespace CalamityMod.NPCs.Abyss npc.Opacity = 0f; } - bool shootShadowFireballs = (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 6f && Main.npc[(int)npc.ai[2]].Calamity().newAI[2] > 0f) || - (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 10f && Main.npc[(int)npc.ai[2]].Calamity().newAI[1] > 0f); + bool shootShadowFireballs = (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ShadowFireballSpin && calamityGlobalNPC_Head.newAI[2] > 0f) || + (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FinalPhase && calamityGlobalNPC_Head.newAI[1] > 0f); if (shootShadowFireballs && Main.netMode != NetmodeID.MultiplayerClient) { if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index 88b9c96d72..511a0c250e 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -69,8 +69,15 @@ namespace CalamityMod.NPCs.Abyss npc.active = false; } - bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f; - if (!invisiblePhase) + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + float chargePhaseGateValue = 180f; + float lightningChargePhaseGateValue = 90f; + + bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; + bool invisiblePhase = calamityGlobalNPC_Head.newAI[0] == 1f || calamityGlobalNPC_Head.newAI[0] == 5f || calamityGlobalNPC_Head.newAI[0] == 7f; + if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { @@ -86,8 +93,8 @@ namespace CalamityMod.NPCs.Abyss npc.Opacity = 0f; } - bool shootShadowFireballs = (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 6f && Main.npc[(int)npc.ai[2]].Calamity().newAI[2] > 0f) || - (Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 10f && Main.npc[(int)npc.ai[2]].Calamity().newAI[1] > 0f); + bool shootShadowFireballs = (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ShadowFireballSpin && calamityGlobalNPC_Head.newAI[2] > 0f) || + (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FinalPhase && calamityGlobalNPC_Head.newAI[1] > 0f); if (shootShadowFireballs && Main.netMode != NetmodeID.MultiplayerClient) { if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 5588a78442..141e0b5e5f 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -16,9 +16,10 @@ using Terraria.ModLoader; namespace CalamityMod.NPCs.Abyss { - public class EidolonWyrmHeadHuge : ModNPC + [AutoloadBossHead] + public class EidolonWyrmHeadHuge : ModNPC { - private enum Phase + public enum Phase { ChargeOne = 0, LightningRain = 1, @@ -33,7 +34,7 @@ namespace CalamityMod.NPCs.Abyss FinalPhase = 10 } - private float AIState + public float AIState { get => npc.Calamity().newAI[0]; set => npc.Calamity().newAI[0] = value; @@ -259,10 +260,10 @@ namespace CalamityMod.NPCs.Abyss float lightningChargePhaseGateValue = 90f; // Adjust opacity - bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC.newAI[0] == (float)Phase.ChargeOne || calamityGlobalNPC.newAI[0] == (float)Phase.ChargeTwo || calamityGlobalNPC.newAI[0] == (float)Phase.FastCharge); - bool invisiblePartOfLightningChargePhase = calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC.newAI[0] == (float)Phase.LightningCharge; - bool invisiblePhase = calamityGlobalNPC.newAI[0] == (float)Phase.LightningRain || calamityGlobalNPC.newAI[0] == (float)Phase.IceMist || calamityGlobalNPC.newAI[0] == (float)Phase.AncientDoomSummon; - npc.dontTakeDamage = invisiblePhase; + bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (AIState == (float)Phase.ChargeOne || AIState == (float)Phase.ChargeTwo || AIState == (float)Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC.newAI[2] <= lightningChargePhaseGateValue + 1f && AIState == (float)Phase.LightningCharge; + bool invisiblePhase = AIState == (float)Phase.LightningRain || AIState == (float)Phase.IceMist || AIState == (float)Phase.AncientDoomSummon; + npc.dontTakeDamage = invisiblePartOfChargePhase || invisiblePartOfLightningChargePhase || invisiblePhase; if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { npc.Opacity += 0.15f; @@ -429,10 +430,10 @@ namespace CalamityMod.NPCs.Abyss if (npc.ai[3] >= maxCharges) { npc.ai[3] = 0f; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.ShadowFireballSpin : (float)Phase.LightningRain; + AIState = phase4 ? (float)Phase.ShadowFireballSpin : (float)Phase.LightningRain; } else if (phase2) - calamityGlobalNPC.newAI[0] = (float)Phase.ShadowFireballSpin; + AIState = (float)Phase.ShadowFireballSpin; calamityGlobalNPC.newAI[1] += 1f; if (calamityGlobalNPC.newAI[1] > 7f) @@ -565,7 +566,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { npc.localAI[0] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FastCharge; + AIState = (float)Phase.FastCharge; calamityGlobalNPC.newAI[2] = 90f; calamityGlobalNPC.newAI[3] = 1f; chargeVelocityScalar = 0f; @@ -628,7 +629,7 @@ namespace CalamityMod.NPCs.Abyss { if (!phase5) { - calamityGlobalNPC.newAI[0] = npc.localAI[0] == 0f ? (float)Phase.EidolonWyrmSpawn : (float)Phase.EidolistSpawn; + AIState = npc.localAI[0] == 0f ? (float)Phase.EidolonWyrmSpawn : (float)Phase.EidolistSpawn; calamityGlobalNPC.newAI[2] = 0f; } else @@ -637,7 +638,7 @@ namespace CalamityMod.NPCs.Abyss if (npc.ai[3] >= 2f) { npc.ai[3] = 0f; - calamityGlobalNPC.newAI[0] = npc.localAI[0] == 0f ? (float)Phase.ChargeTwo : (float)Phase.ChargeOne; + AIState = npc.localAI[0] == 0f ? (float)Phase.ChargeTwo : (float)Phase.ChargeOne; calamityGlobalNPC.newAI[2] = 0f; } else @@ -688,7 +689,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] >= eidolonWyrmPhaseDuration) { - calamityGlobalNPC.newAI[0] = (float)Phase.ChargeTwo; + AIState = (float)Phase.ChargeTwo; calamityGlobalNPC.newAI[2] = 0f; FinalPhaseCheck(); npc.TargetClosest(); @@ -750,10 +751,10 @@ namespace CalamityMod.NPCs.Abyss if (npc.ai[3] >= maxCharges) { npc.ai[3] = 0f; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.AncientDoomSummon : (float)Phase.IceMist; + AIState = phase4 ? (float)Phase.AncientDoomSummon : (float)Phase.IceMist; } else if (phase3) - calamityGlobalNPC.newAI[0] = (float)Phase.AncientDoomSummon; + AIState = (float)Phase.AncientDoomSummon; calamityGlobalNPC.newAI[1] += 1f; if (calamityGlobalNPC.newAI[1] > 7f) @@ -874,7 +875,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { npc.localAI[0] = 1f; - calamityGlobalNPC.newAI[0] = (float)Phase.FastCharge; + AIState = (float)Phase.FastCharge; calamityGlobalNPC.newAI[2] = 90f; calamityGlobalNPC.newAI[3] = 1f; chargeVelocityScalar = 0f; @@ -940,7 +941,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { rotationDirection = 0; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeOne; + AIState = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeOne; calamityGlobalNPC.newAI[2] = 0f; calamityGlobalNPC.newAI[3] = 1f; chargeVelocityScalar = 0f; @@ -997,7 +998,7 @@ namespace CalamityMod.NPCs.Abyss if (npc.localAI[1] >= ancientDoomGateValue + maxAncientDoomRings) { npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeTwo; + AIState = phase4 ? (float)Phase.LightningCharge : (float)Phase.ChargeTwo; calamityGlobalNPC.newAI[2] = 0f; FinalPhaseCheck(); npc.TargetClosest(); @@ -1071,7 +1072,7 @@ namespace CalamityMod.NPCs.Abyss calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime + 1f) { - calamityGlobalNPC.newAI[0] = npc.localAI[2] == 0f ? (float)Phase.LightningRain : (float)Phase.IceMist; + AIState = npc.localAI[2] == 0f ? (float)Phase.LightningRain : (float)Phase.IceMist; calamityGlobalNPC.newAI[2] = 0f; calamityGlobalNPC.newAI[3] = 1f; @@ -1146,7 +1147,7 @@ namespace CalamityMod.NPCs.Abyss calamityGlobalNPC.newAI[2] += 1f; if (calamityGlobalNPC.newAI[2] >= eidolonWyrmPhaseDuration) { - calamityGlobalNPC.newAI[0] = (float)Phase.ChargeOne; + AIState = (float)Phase.ChargeOne; calamityGlobalNPC.newAI[2] = 0f; FinalPhaseCheck(); npc.TargetClosest(); @@ -1257,7 +1258,7 @@ namespace CalamityMod.NPCs.Abyss if (phase6) { npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[0] = (float)Phase.FinalPhase; + AIState = (float)Phase.FinalPhase; calamityGlobalNPC.newAI[1] = 0f; calamityGlobalNPC.newAI[2] = 0f; rotationDirection = 0; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge_Head_Boss.png b/NPCs/Abyss/EidolonWyrmHeadHuge_Head_Boss.png new file mode 100644 index 0000000000000000000000000000000000000000..ffafb0bc3b64c09100cee60f227110d8ec06fc82 GIT binary patch literal 630 zcmV-+0*U>JP)hEoQ zy}qs%4%5f)21NmHUqADAV_%_#jNZ9JYCBa6M&rS{!#{rdTrKb&B-bB36u$i72X zQok>%#h;%KZiBHz58$Jv?|?*oe0udn`}y%;bn{QbUo;R24ax;_I>yxV0J%Osy?Ubk z{P0J||D=!v!e3veYGEJ)iTJOceXACX=Rb)0_&G;zpZ)l|{Qkd(cu7BEFX4r}NTPn# zk80uN{rZ*bNCpt(GKxtdHMKVwQz{fwu2zPJP*nP z90K)IXI{=%=Z8Oj@n_UPBs2&T$kPy`j3?@+&b*wj&JTb5;&(`h$Or=|z_$qE>&x|_ ze$K_WpPya))X)FdA~eY06d24H#MhVWL;akKZ$Ce~_^I!517Q*j9vP!s%C`^FAB+aU z9JJIJ-BP}NkbZR>865RjH@I}c$mpoQbkEUv3`2|MQ2ov#qmWTKRR33a113AHRMi?R Ql>h($07*qoM6N<$g1sX)RsaA1 literal 0 HcmV?d00001 diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index be45e11ae3..bdd722eb10 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -69,8 +69,15 @@ namespace CalamityMod.NPCs.Abyss npc.active = false; } - bool invisiblePhase = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 1f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 5f || Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 7f; - if (!invisiblePhase) + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + float chargePhaseGateValue = 180f; + float lightningChargePhaseGateValue = 90f; + + bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); + bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; + bool invisiblePhase = calamityGlobalNPC_Head.newAI[0] == 1f || calamityGlobalNPC_Head.newAI[0] == 5f || calamityGlobalNPC_Head.newAI[0] == 7f; + if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 8e91356f76..e1f431f5ee 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -1,4 +1,4 @@ -using CalamityMod.Events; +using CalamityMod.Dusts; using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -51,8 +51,11 @@ namespace CalamityMod.NPCs.Polterghast { start = false; - for (int num621 = 0; num621 < 5; num621++) - Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 2f); + for (int i = 0; i < 10; i++) + { + int dust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); + Main.dust[dust].noGravity = true; + } npc.ai[1] = npc.ai[0]; } diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index 8db23726d0..60fa5a021d 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -157,6 +157,11 @@ namespace CalamityMod.NPCs.Polterghast if (!chargePhase) { + // Set this here to avoid despawn issues + reachedChargingPoint = false; + + npc.ai[0] = 0f; + npc.Opacity += 0.02f; if (npc.Opacity > 0.8f) npc.Opacity = 0.8f; @@ -286,6 +291,7 @@ namespace CalamityMod.NPCs.Polterghast npc.Calamity().newAI[1] = 0f; npc.Calamity().newAI[2] = 0f; npc.Calamity().newAI[3] = 0f; + npc.ai[0] = 0f; npc.ai[1] += 1f; if (npc.ai[1] >= 3f) @@ -304,6 +310,7 @@ namespace CalamityMod.NPCs.Polterghast { npc.velocity = Vector2.Zero; npc.ai[0] = Main.rand.Next(2) + 1; + npc.netUpdate = true; } // Pick a charging location @@ -342,23 +349,31 @@ namespace CalamityMod.NPCs.Polterghast npc.Opacity = 0f; } - int numUpdates = reachedChargingPoint ? 10 : 2; - for (int i = 0; i < numUpdates; i++) + if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue || reachedChargingPoint) { - if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue) + // Emit dust + if (!reachedChargingPoint) { - reachedChargingPoint = true; + Main.PlaySound(SoundID.Item125, npc.position); + for (int i = 0; i < 30; i++) + { + int dust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 5f; + } + } - npc.velocity *= 0.5f; - } + reachedChargingPoint = true; + npc.velocity = Vector2.Zero; + npc.Center = chargeVector; + } + else + { + // Reduce velocity and acceleration to allow for smoother movement inside this loop + if (Vector2.Distance(vector, chargeVector) > 1200f) + npc.velocity = chargeLocationVelocity; else - { - // Reduce velocity and acceleration to allow for smoother movement inside this loop - if (Vector2.Distance(vector, chargeVector) > 1200f) - npc.velocity = chargeLocationVelocity * 0.5f; - else - npc.SimpleFlyMovement(chargeLocationVelocity * 0.5f, chargeAcceleration * 0.5f); - } + npc.SimpleFlyMovement(chargeLocationVelocity, chargeAcceleration); } } diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 81e94d084d..e5cc74831d 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.Polterghast public class Polterghast : ModNPC { private int despawnTimer = 600; - private const int chargeTelegraphTimerMax = 150; + private const int chargeTelegraphTimerMax = 15; private int chargeTelegraphTimer = chargeTelegraphTimerMax; private bool reachedChargingPoint = false; @@ -164,6 +164,23 @@ namespace CalamityMod.NPCs.Polterghast { speedBoost = true; despawnBoost = true; + reachedChargingPoint = false; + chargeTelegraphTimer = chargeTelegraphTimerMax; + npc.ai[1] = 0f; + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + + if (cloneAlive) + { + Main.npc[CalamityGlobalNPC.ghostBossClone].ai[0] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].ai[1] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[0] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[1] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[2] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[3] = 0f; + } } } @@ -500,62 +517,59 @@ namespace CalamityMod.NPCs.Polterghast float chargeDistanceGateValue = 40f; bool clonePositionCheck = cloneAlive ? Vector2.Distance(Main.npc[CalamityGlobalNPC.ghostBossClone].Center, cloneChargeVector) <= chargeDistanceGateValue : true; - // Loop velocity code multiple times per frame if charge location is reached - // This effectively quadruples the velocity and acceleration while maintaining smooth movement - int numUpdates = reachedChargingPoint ? 10 : 2; - for (int i = 0; i < numUpdates; i++) + // Line up a charge + if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue || reachedChargingPoint) { - // Line up a charge - if (Vector2.Distance(vector, chargeVector) <= chargeDistanceGateValue) + // Emit dust + if (!reachedChargingPoint) { - reachedChargingPoint = true; - - npc.velocity *= 0.5f; - - if (clonePositionCheck) + Main.PlaySound(SoundID.Item125, npc.position); + for (int i = 0; i < 30; i++) { - // Pause for 15 frames before actually charging - // This is 15 frames because this code runs 10 times per frame once a charge location is found - if (chargeTelegraphTimer > 0) + int dust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 5f; + } + } + + reachedChargingPoint = true; + npc.velocity = Vector2.Zero; + npc.Center = chargeVector; + + if (clonePositionCheck) + { + // Pause for 15 frames before actually charging + if (chargeTelegraphTimer > 0) + { + chargeTelegraphTimer--; + } + else + { + // Initiate charge + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 1f; + + // Tell clone to charge + if (cloneAlive) { - chargeTelegraphTimer--; - } - else - { - // Initiate charge - npc.velocity = Vector2.Zero; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 1f; + Main.npc[CalamityGlobalNPC.ghostBossClone].ai[0] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[1] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[2] = 0f; + Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[3] = 1f; - // Tell clone to charge - if (cloneAlive) - { - Main.npc[CalamityGlobalNPC.ghostBossClone].velocity = Vector2.Zero; - Main.npc[CalamityGlobalNPC.ghostBossClone].ai[0] = 0f; - Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[1] = 0f; - Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[2] = 0f; - Main.npc[CalamityGlobalNPC.ghostBossClone].Calamity().newAI[3] = 1f; - - // - // CODE TWEAKED BY: OZZATRON - // September 21st, 2020 - // reason: fixing Polter charge MP desync bug - // - // removed Polter syncing the clone's newAI array. The clone now auto syncs its own newAI every frame. - } - - // Break because looping beyond this point is useless - break; + // + // CODE TWEAKED BY: OZZATRON + // September 21st, 2020 + // reason: fixing Polter charge MP desync bug + // + // removed Polter syncing the clone's newAI array. The clone now auto syncs its own newAI every frame. } } } - else - { - // Reduce velocity and acceleration to allow for smoother movement inside this loop - npc.SimpleFlyMovement(chargeLocationVelocity * 0.5f, chargeAcceleration * 0.5f); - } } + else + npc.SimpleFlyMovement(chargeLocationVelocity, chargeAcceleration); } npc.netUpdate = true; @@ -667,7 +681,7 @@ namespace CalamityMod.NPCs.Polterghast calamityGlobalNPC.newAI[2] = 0f; calamityGlobalNPC.newAI[3] = 0f; - Main.PlaySound(SoundID.Item122, npc.position); + Main.PlaySound(SoundID.Item122, npc.Center); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Polt"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Polt2"), 1f); @@ -688,10 +702,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int num623 = 0; num623 < 30; num623++) { - int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 3f); + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } } @@ -815,7 +829,7 @@ namespace CalamityMod.NPCs.Polterghast } } - Main.PlaySound(SoundID.Item122, npc.position); + Main.PlaySound(SoundID.Item122, npc.Center); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Polt"), 1f); Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Polt2"), 1f); @@ -836,10 +850,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int num623 = 0; num623 < 30; num623++) { - int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 3f); + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } } @@ -1120,7 +1134,7 @@ namespace CalamityMod.NPCs.Polterghast public override void HitEffect(int hitDirection, double damage) { - Dust.NewDust(npc.position, npc.width, npc.height, 180, hitDirection, -1f, 0, default, 1f); + Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Ectoplasm, hitDirection, -1f, 0, default, 1f); if (npc.life <= 0) { npc.position.X = npc.position.X + (npc.width / 2); @@ -1141,10 +1155,10 @@ namespace CalamityMod.NPCs.Polterghast } for (int num623 = 0; num623 < 60; num623++) { - int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 3f); + int num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 3f); Main.dust[num624].noGravity = true; Main.dust[num624].velocity *= 5f; - num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 180, 0f, 0f, 100, default, 2f); + num624 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, (int)CalamityDusts.Ectoplasm, 0f, 0f, 100, default, 2f); Main.dust[num624].velocity *= 2f; } } From 6aa276834c0629313a3a411af10ea1b6d941c3dd Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 12 Jun 2021 06:11:18 -0500 Subject: [PATCH 059/103] 1 - Some more slight Wyrm adjustments. --- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 4 +- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 4 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 110 +++++++++++++-------------- NPCs/Abyss/EidolonWyrmTailHuge.cs | 4 +- 4 files changed, 61 insertions(+), 61 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index f658f765fa..820b37b594 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -71,8 +71,8 @@ namespace CalamityMod.NPCs.Abyss CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); - float chargePhaseGateValue = 180f; - float lightningChargePhaseGateValue = 90f; + float chargePhaseGateValue = 300f; + float lightningChargePhaseGateValue = 180f; bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index 511a0c250e..e8a9f982d4 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -71,8 +71,8 @@ namespace CalamityMod.NPCs.Abyss CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); - float chargePhaseGateValue = 180f; - float lightningChargePhaseGateValue = 90f; + float chargePhaseGateValue = 300f; + float lightningChargePhaseGateValue = 180f; bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 141e0b5e5f..3984d311fa 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -41,7 +41,7 @@ namespace CalamityMod.NPCs.Abyss } // Base distance from the target for most attacks - private const float baseDistance = 960f; + private const float baseDistance = 1000f; // Base distance from target location in order to continue turning private const float baseTurnDistance = 160f; @@ -250,14 +250,14 @@ namespace CalamityMod.NPCs.Abyss // Phase gate values float velocityAdjustTime = 20f; - float chargePhaseGateValue = 180f; + float chargePhaseGateValue = 300f; float lightningRainDuration = 180f; float eidolonWyrmPhaseDuration = 180f; float iceMistDuration = 180f; float spinPhaseDuration = 300f; float ancientDoomPhaseGateValue = 30f; float ancientDoomGateValue = 120f; - float lightningChargePhaseGateValue = 90f; + float lightningChargePhaseGateValue = 180f; // Adjust opacity bool invisiblePartOfChargePhase = calamityGlobalNPC.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC.newAI[2] <= chargePhaseGateValue + 1f && (AIState == (float)Phase.ChargeOne || AIState == (float)Phase.ChargeTwo || AIState == (float)Phase.FastCharge); @@ -353,7 +353,7 @@ namespace CalamityMod.NPCs.Abyss float maxAncientDoomRings = 3f; // Lightning charge variables - Vector2 lightningChargeVector = npc.localAI[2] == 0f ? new Vector2(1000f, 0f) : new Vector2(-1000f, 0f); + Vector2 lightningChargeVector = npc.localAI[2] == 0f ? new Vector2(baseDistance, 0f) : new Vector2(-baseDistance, 0f); float lightningChargeLocationDistance = turnDistance * 0.2f; Vector2 lightningChargeLocation = destination + lightningChargeVector; Vector2 lightningChargeVectorFlipped = lightningChargeVector * -1f; @@ -401,7 +401,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue + 1f) { if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose"), Main.player[Main.myPlayer].Center); chargeDestination = destination + chargeVectorFlipped + player.velocity * chargePredictionAmt; npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; @@ -476,64 +476,64 @@ namespace CalamityMod.NPCs.Abyss if ((destination - npc.Center).Length() < lightningRainLocationDistance || calamityGlobalNPC.newAI[2] > 0f) { - if (calamityGlobalNPC.newAI[2] == 0f) + if (calamityGlobalNPC.newAI[2] % 30f == 0f && calamityGlobalNPC.newAI[2] < lightningRainDuration) { if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/LightningStrike"), Main.player[Main.myPlayer].Center); - } - if (calamityGlobalNPC.newAI[2] % 30f == 0f && calamityGlobalNPC.newAI[2] < lightningRainDuration && Main.netMode != NetmodeID.MultiplayerClient) - { - int maxTargets = 2; - int[] whoAmIArray = new int[maxTargets]; - Vector2[] targetCenterArray = new Vector2[maxTargets]; - int numProjectiles = 0; - float maxDistance = 2400f; - - for (int i = 0; i < Main.maxPlayers; i++) + if (Main.netMode != NetmodeID.MultiplayerClient) { - if (!Main.player[i].active || Main.player[i].dead) - continue; + int maxTargets = 2; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; - Vector2 playerCenter = Main.player[i].Center; - float distance = Vector2.Distance(playerCenter, npc.Center); - if (distance < maxDistance) + for (int i = 0; i < Main.maxPlayers; i++) { - whoAmIArray[numProjectiles] = i; - targetCenterArray[numProjectiles] = playerCenter; - int projectileLimit = numProjectiles + 1; - numProjectiles = projectileLimit; - if (projectileLimit >= targetCenterArray.Length) - break; + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } } - } - float predictionAmt = targetDownDeep ? 30f : 60f; - float lightningVelocity = targetDownDeep ? 4f : 8f; - for (int i = 0; i < numProjectiles; i++) - { - // Predictive bolt - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - float ai = Main.rand.Next(100); - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; - int type = ProjectileID.CultistBossLightningOrbArc; - int damage = npc.GetProjectileDamage(type); - int proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); - Main.projectile[proj].tileCollide = false; + float predictionAmt = targetDownDeep ? 30f : 60f; + float lightningVelocity = targetDownDeep ? 4f : 8f; + for (int i = 0; i < numProjectiles; i++) + { + // Predictive bolt + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + float ai = Main.rand.Next(100); + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; + int type = ProjectileID.CultistBossLightningOrbArc; + int damage = npc.GetProjectileDamage(type); + int proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; - // Opposite bolt - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - ai = Main.rand.Next(100); - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; - proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); - Main.projectile[proj].tileCollide = false; + // Opposite bolt + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + ai = Main.rand.Next(100); + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; + proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; - // Normal bolt - projectileDestination = targetCenterArray[i] - npc.Center; - ai = Main.rand.Next(100); - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; - proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); - Main.projectile[proj].tileCollide = false; + // Normal bolt + projectileDestination = targetCenterArray[i] - npc.Center; + ai = Main.rand.Next(100); + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * lightningVelocity; + proj = Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer, projectileDestination.ToRotation(), ai); + Main.projectile[proj].tileCollide = false; + } } } @@ -603,7 +603,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue + 1f) { if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose"), Main.player[Main.myPlayer].Center); chargeDestination = destination + chargeVectorFlipped + player.velocity * chargePredictionAmt; npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; @@ -722,7 +722,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] == chargePhaseGateValue + 1f) { if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose"), Main.player[Main.myPlayer].Center); chargeDestination = destination + chargeVectorFlipped + player.velocity * chargePredictionAmt; npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; @@ -1032,7 +1032,7 @@ namespace CalamityMod.NPCs.Abyss if (calamityGlobalNPC.newAI[2] == lightningChargePhaseGateValue + 1f) { if (Main.player[Main.myPlayer].active && !Main.player[Main.myPlayer].dead && Vector2.Distance(Main.player[Main.myPlayer].Center, npc.Center) < soundDistance) - Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose").WithVolume(2.5f), Main.player[Main.myPlayer].Center); + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/EidolonWyrmRoarClose"), Main.player[Main.myPlayer].Center); chargeDestination = destination + lightningChargeVectorFlipped + player.velocity * chargePredictionAmt; npc.velocity = Vector2.Normalize(chargeDestination - npc.Center) * baseVelocity; diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index bdd722eb10..65a97a5fee 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -71,8 +71,8 @@ namespace CalamityMod.NPCs.Abyss CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); - float chargePhaseGateValue = 180f; - float lightningChargePhaseGateValue = 90f; + float chargePhaseGateValue = 300f; + float lightningChargePhaseGateValue = 180f; bool invisiblePartOfChargePhase = calamityGlobalNPC_Head.newAI[2] >= chargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= chargePhaseGateValue + 1f && (calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeOne || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.ChargeTwo || calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.FastCharge); bool invisiblePartOfLightningChargePhase = calamityGlobalNPC_Head.newAI[2] >= lightningChargePhaseGateValue && calamityGlobalNPC_Head.newAI[2] <= lightningChargePhaseGateValue + 1f && calamityGlobalNPC_Head.newAI[0] == (float)EidolonWyrmHeadHuge.Phase.LightningCharge; From 91a43075b851e5c133c308691deb98fa2c22d68e Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 12 Jun 2021 06:16:34 -0500 Subject: [PATCH 060/103] 1 - Yet another Wyrm change. --- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 3984d311fa..c4b1050ecf 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -65,6 +65,9 @@ namespace CalamityMod.NPCs.Abyss // Used in the lerp to smoothly scale velocity up and down private float chargeVelocityScalar = 0f; + // How much less time is needed before activating fast charge + private const float fastChargeGateValue = 120f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Eidolon Wyrm"); @@ -567,7 +570,7 @@ namespace CalamityMod.NPCs.Abyss { npc.localAI[0] = 0f; AIState = (float)Phase.FastCharge; - calamityGlobalNPC.newAI[2] = 90f; + calamityGlobalNPC.newAI[2] = fastChargeGateValue; calamityGlobalNPC.newAI[3] = 1f; chargeVelocityScalar = 0f; FinalPhaseCheck(); @@ -642,7 +645,7 @@ namespace CalamityMod.NPCs.Abyss calamityGlobalNPC.newAI[2] = 0f; } else - calamityGlobalNPC.newAI[2] = 90f; + calamityGlobalNPC.newAI[2] = fastChargeGateValue; } calamityGlobalNPC.newAI[1] += 1f; @@ -876,7 +879,7 @@ namespace CalamityMod.NPCs.Abyss { npc.localAI[0] = 1f; AIState = (float)Phase.FastCharge; - calamityGlobalNPC.newAI[2] = 90f; + calamityGlobalNPC.newAI[2] = fastChargeGateValue; calamityGlobalNPC.newAI[3] = 1f; chargeVelocityScalar = 0f; FinalPhaseCheck(); From d243bcaabd1067615af7eb5a5af0fed2b66c51ba Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 13 Jun 2021 19:41:15 -0400 Subject: [PATCH 061/103] Fixed bugs with partial stealth accumulating --- CalPlayer/CalamityPlayer.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 0808bf3d4c..471890a35d 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -12,7 +12,6 @@ using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Armor; using CalamityMod.Items.DifficultyItems; using CalamityMod.Items.Dyes; -using CalamityMod.Items.LoreItems; using CalamityMod.Items.Mounts; using CalamityMod.Items.Tools; using CalamityMod.Items.TreasureBags; @@ -9379,8 +9378,17 @@ namespace CalamityMod.CalPlayer ? player.itemAnimation == player.itemAnimationMax - 1 // Standard weapon (first frame of use animation) : player.itemTime == it.useTime; // Clockwork weapon (first frame of any individual use event) - if (!stealthStrikeThisFrame && animationCheck && playerUsingWeapon && StealthStrikeAvailable()) - ConsumeStealthByAttacking(); + if (!stealthStrikeThisFrame && animationCheck && playerUsingWeapon) + { + bool canStealthStrike = StealthStrikeAvailable(); + + // If you can stealth strike, you do. + if (canStealthStrike) + ConsumeStealthByAttacking(); + // Otherwise you get a "partial stealth strike" (stealth damage is still added to the weapon) and return to normally attacking. + else + rogueStealth = 0f; + } } private void ProvideStealthStatBonuses() From 73e0b3651c2a257244f229fc26476a63cc8e2892 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 13 Jun 2021 19:50:38 -0400 Subject: [PATCH 062/103] Utensil Poker properly chain stealth strikes --- Items/Weapons/Rogue/UtensilPoker.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index c40b9b7876..f6c6a38df7 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Rogue Tooltip.SetDefault("Space chickens, that is all.\n" + "Fires random utensils in bursts of three\n" + "Grants Well Fed on enemy hits\n" + - "Stealth strikes replace the first utensil with a powerful butcher knife"); + "Stealth strikes replace any utensil with a powerful butcher knife"); } public override void SafeSetDefaults() @@ -44,8 +44,7 @@ namespace CalamityMod.Items.Weapons.Rogue { CalamityPlayer mp = player.Calamity(); - // On a stealth strike, the first projectile is replaced with a butcher knife. - if (mp.StealthStrikeAvailable() && counter == 0) + if (mp.StealthStrikeAvailable()) { int stealthDamage = damage; int stealth = Projectile.NewProjectile(position.X, position.Y, speedX * 1.2f, speedY * 1.2f, ModContent.ProjectileType(), stealthDamage, knockBack, player.whoAmI); From 12c1c190c82eb4aafc4f8e9fb737aee95b33a823 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sun, 13 Jun 2021 20:05:26 -0400 Subject: [PATCH 063/103] Improved Hypothermia behavior. Stealth may be overpowered. --- Items/Weapons/Rogue/Hypothermia.cs | 49 +++++++++++++++------------ Projectiles/Rogue/HypothermiaChunk.cs | 26 +++++++------- Projectiles/Rogue/HypothermiaShard.cs | 28 +++++++-------- 3 files changed, 55 insertions(+), 48 deletions(-) diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 31d88e5346..2737e60500 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -7,13 +7,16 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Rogue { - public class Hypothermia : RogueWeapon + public class Hypothermia : RogueWeapon { + // For more consistent DPS, always alternates between throwing 1 and 2 instead of picking randomly + private bool throwTwo = true; + public override void SetStaticDefaults() { DisplayName.SetDefault("Hypothermia"); - Tooltip.SetDefault("Fires a constant barrage of black ice shards\n" + - "Stealth strikes additionally fire short ranged ice chunks that shatter into ice shards"); + Tooltip.SetDefault("Throws a constant barrage of black ice shards\n" + + "Stealth strikes hurl a set of razor sharp ice chunks that shatter on impact"); } public override void SafeSetDefaults() @@ -24,7 +27,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.noUseGraphic = true; item.noMelee = true; item.useStyle = ItemUseStyleID.SwingThrow; - item.UseSound = SoundID.Item9; + item.UseSound = SoundID.Item7; item.value = Item.buyPrice(1, 80, 0, 0); item.rare = ItemRarityID.Red; @@ -40,33 +43,37 @@ namespace CalamityMod.Items.Weapons.Rogue item.Calamity().rogue = true; } - // Terraria seems to really dislike high crit values in SetDefaults - public override void GetWeaponCrit(Player player, ref int crit) => crit += 16; + // Terraria seems to really dislike high crit values in SetDefaults + public override void GetWeaponCrit(Player player, ref int crit) => crit += 16; public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (player.Calamity().StealthStrikeAvailable()) - damage = (int)(damage * 1.55); - - if (player.Calamity().StealthStrikeAvailable() && player.itemAnimation == item.useAnimation - 1) //setting up the stealth strikes { - damage = (int)(damage * 1.7); - - for (int i = 0; i < 4; i++) + int stealthDamage = (int)(damage * 7f); // was 2.635x + for (int i = 0; i < 4; ++i) { - Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.13f) * Main.rand.NextFloat(1f, 1.1f); - int stealth = Projectile.NewProjectile(position, chunkVelocity, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); + Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.07f) * Main.rand.NextFloat(1.1f, 1.18f); + int stealth = Projectile.NewProjectile(position, chunkVelocity, ModContent.ProjectileType(), stealthDamage, knockBack, player.whoAmI); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; } + + // On a stealth strike, only the chunks are thrown. + return false; + } + + // Regular attacks alternate between throwing one and two shards at a time. + int projAmt = throwTwo ? 2 : 1; + throwTwo = !throwTwo; + + for (int i = 0; i < projAmt; ++i) + { + float SpeedX = speedX + Main.rand.NextFloat(-2f, 2f); + float SpeedY = speedY + Main.rand.NextFloat(-2f, 2f); + int texID = Main.rand.Next(4); + Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, damage, knockBack, player.whoAmI, texID, 0f); } - int projAmt = Main.rand.Next(1, 3); - for (int index = 0; index < projAmt; ++index) - { - float SpeedX = speedX + Main.rand.NextFloat(-2f, 2f); - float SpeedY = speedY + Main.rand.NextFloat(-2f, 2f); - Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, damage, knockBack, player.whoAmI, Main.rand.Next(4), 0f); - } return false; } diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index c7f38364e6..8d74297fc9 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -6,14 +6,14 @@ using Microsoft.Xna.Framework.Graphics; namespace CalamityMod.Projectiles.Rogue { - public class HypothermiaChunk : ModProjectile + public class HypothermiaChunk : ModProjectile { - public override void SetStaticDefaults() - { - DisplayName.SetDefault("Ice Chunk"); + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Ice Chunk"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; ProjectileID.Sets.TrailingMode[projectile.type] = 0; - } + } public override void SetDefaults() { @@ -22,7 +22,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.friendly = true; projectile.penetrate = 1; projectile.timeLeft = 80; - projectile.extraUpdates = 3; + projectile.extraUpdates = 4; projectile.ignoreWater = true; projectile.Calamity().rogue = true; projectile.tileCollide = false; @@ -58,18 +58,18 @@ namespace CalamityMod.Projectiles.Rogue } if (projectile.owner == Main.myPlayer) { - for (int i = 0; i < Main.rand.Next(1,4); i++) - { - Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.33f), projectile.knockBack * 0.75f, Main.myPlayer, Main.rand.Next(4), 1f); - } - } + for (int i = 0; i < Main.rand.Next(1,4); i++) + { + Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); + int shard = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.33f), projectile.knockBack * 0.75f, Main.myPlayer, Main.rand.Next(4), 1f); + } + } } public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffID.Frostburn, 300); - } + } public override void OnHitPvp(Player target, int damage, bool crit) { diff --git a/Projectiles/Rogue/HypothermiaShard.cs b/Projectiles/Rogue/HypothermiaShard.cs index 4512773d20..14c1f328a1 100644 --- a/Projectiles/Rogue/HypothermiaShard.cs +++ b/Projectiles/Rogue/HypothermiaShard.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Projectiles.Rogue { public class HypothermiaShard : ModProjectile { - private float counter = 0f; + private float counter = 0f; public override void SetStaticDefaults() { DisplayName.SetDefault("Ice Shard"); @@ -20,12 +20,12 @@ namespace CalamityMod.Projectiles.Rogue projectile.height = 6; projectile.scale = 1f; projectile.friendly = true; - projectile.ignoreWater = true; - projectile.alpha = 50; + projectile.ignoreWater = true; + projectile.alpha = 50; projectile.penetrate = 1; projectile.timeLeft = 600; projectile.Calamity().rogue = true; - projectile.extraUpdates = 3; + projectile.extraUpdates = 3; } public override void AI() @@ -55,14 +55,14 @@ namespace CalamityMod.Projectiles.Rogue public override bool OnTileCollide(Vector2 oldVelocity) { - if (projectile.velocity.X != oldVelocity.X) - { - projectile.velocity.X = -oldVelocity.X; - } - if (projectile.velocity.Y != oldVelocity.Y) - { - projectile.velocity.Y = -oldVelocity.Y; - } + if (projectile.velocity.X != oldVelocity.X) + { + projectile.velocity.X = -oldVelocity.X; + } + if (projectile.velocity.Y != oldVelocity.Y) + { + projectile.velocity.Y = -oldVelocity.Y; + } return false; } @@ -100,8 +100,8 @@ namespace CalamityMod.Projectiles.Rogue { texture = ModContent.GetTexture("CalamityMod/Projectiles/Rogue/HypothermiaShard4"); } - Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), projectile.scale, SpriteEffects.None, 0f); - return false; + Main.spriteBatch.Draw(texture, projectile.Center - Main.screenPosition, new Rectangle?(new Rectangle(0, 0, texture.Width, texture.Height)), projectile.GetAlpha(lightColor), projectile.rotation, new Vector2(texture.Width / 2f, texture.Height / 2f), projectile.scale, SpriteEffects.None, 0f); + return false; } } } From 12d59da0ce9c653ea4eaea6d27d67d7ec2d6a7ff Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Jun 2021 01:10:04 -0400 Subject: [PATCH 064/103] Hypothermia spam nerfed by 5%, SS no longer broken, fixed shard split math --- Items/Weapons/Rogue/Hypothermia.cs | 4 ++-- Projectiles/Rogue/HypothermiaChunk.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 2737e60500..a25a797fe1 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.value = Item.buyPrice(1, 80, 0, 0); item.rare = ItemRarityID.Red; - item.damage = 206; + item.damage = 197; item.useAnimation = 21; item.useTime = 3; item.reuseDelay = 1; @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int stealthDamage = (int)(damage * 7f); // was 2.635x + int stealthDamage = (int)(damage * 2.5f); // was 2.635x for (int i = 0; i < 4; ++i) { Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.07f) * Main.rand.NextFloat(1.1f, 1.18f); diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index 8d74297fc9..27ce72b179 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -58,10 +58,11 @@ namespace CalamityMod.Projectiles.Rogue } if (projectile.owner == Main.myPlayer) { - for (int i = 0; i < Main.rand.Next(1,4); i++) + int numSplits = Main.rand.NextBool() ? 4 : 3; + for (int i = 0; i < numSplits; ++i) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - int shard = Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.33f), projectile.knockBack * 0.75f, Main.myPlayer, Main.rand.Next(4), 1f); + Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.33f), projectile.knockBack * 0.75f, Main.myPlayer, Main.rand.Next(4), 1f); } } } From 47e36af4c1eb9f4e153c05fc55751f44dcd8bcd3 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Mon, 14 Jun 2021 07:50:10 -0500 Subject: [PATCH 065/103] 1 - Thanos sprites. 2 - Polter and Clone now look in the direction they're about to charge in. 3 - Slowed down Provi's stars that go directly at the player. --- ExtraTextures/Lasers/ExoDestroyerBeamEnd.png | Bin 0 -> 794 bytes .../Lasers/ExoDestroyerBeamMiddle.png | Bin 0 -> 593 bytes NPCs/ExoMechs/Thanatos/ThanatosBody1.png | Bin 3183 -> 17108 bytes NPCs/ExoMechs/Thanatos/ThanatosBody2.png | Bin 3979 -> 14874 bytes NPCs/ExoMechs/Thanatos/ThanatosHead.png | Bin 4542 -> 22765 bytes NPCs/ExoMechs/Thanatos/ThanatosTail.png | Bin 2634 -> 12727 bytes NPCs/Polterghast/PolterPhantom.cs | 11 +++--- NPCs/Polterghast/Polterghast.cs | 9 +++-- NPCs/Providence/Providence.cs | 5 +-- Projectiles/Boss/ExoDestroyerBeamStart.png | Bin 0 -> 779 bytes Projectiles/Boss/ExoDestroyerLaser.png | Bin 0 -> 1136 bytes World/CalamityWorld.cs | 36 +++++++++--------- 12 files changed, 30 insertions(+), 31 deletions(-) create mode 100644 ExtraTextures/Lasers/ExoDestroyerBeamEnd.png create mode 100644 ExtraTextures/Lasers/ExoDestroyerBeamMiddle.png create mode 100644 Projectiles/Boss/ExoDestroyerBeamStart.png create mode 100644 Projectiles/Boss/ExoDestroyerLaser.png diff --git a/ExtraTextures/Lasers/ExoDestroyerBeamEnd.png b/ExtraTextures/Lasers/ExoDestroyerBeamEnd.png new file mode 100644 index 0000000000000000000000000000000000000000..8facdfbb487addee4ea8b2d84ecfbb1fab892f31 GIT binary patch literal 794 zcmV+#1LgdQP)Px%)Ja4^RA_1fM1wngg z4vo~N5^9AgsLNq?5_asZ9cRs~9KXx@E3^ADyE|{}NzB0>EDQi(dj~-=+~=bN03L+3 zUX12<*qI)sgTx-0pgpkN(H8&;44Dw0gqf{8J1xWH$x{HTKD7UFFkcGaG4y=M zFee}AU^1@eOZHu_PriG;<=j^EA!9NQW7%V;`CHrl&(b^bP$GXF%2_*$cNyDx7gc8| zFffJ38U8h(9twmT^b&a-R6s^w!^l=xzWLFhsj@uWtBkjbK06lLXOzS z!1tU75iykTF_=^PM6fKjcfx2>j~zu_%J0NN=NLApXsbt~+5t~bX&J=Tebi8r2}Xt6`bn>NCn#d6h&249jLq@_BjRlZz-aeD$_mZScIa zmhFB#1kl!E)PUw!Dl9>6Aumib;$ENHvK8%~NPx%3rR#lRA_$TEhw)mtTA4Q+0#J!?{?1PjCzs4iIy;Y$qk{i<1wBcK zuxT#K+&KVnr)L0EtCVxu>4vB$zr2f4G-nUj9^g8R;+HdO0j| z*Xf3la*QMp z>DWpmjy>2dc#>@Ay?(~OxRUW}m}fSve65#5#>(c=v|2;%Tva0d#oGkMvF>7&YicuQ z;!$@oT5I1(ofB*4LPq*UqnN|qAdLA!R)Kj5=0u5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6te6uz0*(d_B&h0*=W_o=63qG_#2L!3k1<5<~+3w5xiJHGHNsYFTU?RCj zRZ2{nMlY6Meg#aLAB#?fKE>7T_`JnI^1J*QLk7d0@V()Gtd0x`5&T{2OvxRM(Sv?O zoe3~!Fe3S+4rhm85Jd*f(); - int proj = Projectile.NewProjectile(fireFrom, velocity2, type, 0, 0f, Main.myPlayer, 0f, nightTime ? -300 : npc.GetProjectileDamageNoScaling(type)); - Main.projectile[proj].extraUpdates += 1; + Projectile.NewProjectile(fireFrom, velocity2, type, 0, 0f, Main.myPlayer, 0f, nightTime ? -300 : npc.GetProjectileDamageNoScaling(type)); } } } diff --git a/Projectiles/Boss/ExoDestroyerBeamStart.png b/Projectiles/Boss/ExoDestroyerBeamStart.png new file mode 100644 index 0000000000000000000000000000000000000000..a0c3da97352913f99e423b44aae546b6888e689e GIT binary patch literal 779 zcmV+m1N8ifP)Px%#Ysd#RA_x9GHVVO5AjC#vtv?!S!!-n@AR3UyE4TzG zj8Uwf#q8|6oqg}%xZO8Hn6KG=`|ftE&-sdHPAYKU2z7Q-LSMrWFF8xUk3mM3{;^< zx{*B_mzA z-?E^2ndK>Dfa3P)1g{^jVEgUxcFd5^f3<`2{JW-kvGw@?L7ahRHzW^u=_Ncl%9|T* zY~fl%WP&`RJOkP50XKow3&a_yf_Bn79~O>^X&rBE;taTYf485kn8RC#0tS+TV80M& zzyvS>s<2xJ1J3RT^xz(N@=(d6ecik0Rt707D49u&RhoPKnsH>LG(}7$O z(Og{+XCSQ;HYoDNBwT2z6SnCruL%jZ}}wm;zSSDrxhzk8b zLleLRFafMWVigkC!@Ez`oV^fdU{(kEI!_eof;a;vfC*p%{0CSh04$1#$|V2*002ov JPDHLkV1jEcUzPv> literal 0 HcmV?d00001 diff --git a/Projectiles/Boss/ExoDestroyerLaser.png b/Projectiles/Boss/ExoDestroyerLaser.png new file mode 100644 index 0000000000000000000000000000000000000000..ea6357a3f255913f5f010b510340ba9965e53414 GIT binary patch literal 1136 zcmV-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int bossRushHostileProjKillCounter = 0; - //Death Mode natural boss spawns - public static int bossSpawnCountdown = 0; //Death Mode natural boss spawn countdown - public static int bossType = 0; //Death Mode natural boss spawn type - public static int deathBossSpawnCooldown = 0; //Cooldown between Death Mode natural boss spawns + // Death Mode natural boss spawns + public static int bossSpawnCountdown = 0; // Death Mode natural boss spawn countdown + public static int bossType = 0; // Death Mode natural boss spawn type + public static int deathBossSpawnCooldown = 0; // Cooldown between Death Mode natural boss spawns - //Modes - public static bool demonMode = false; //Spawn rate boost - public static bool onionMode = false; //Extra accessory from Moon Lord - public static bool revenge = false; //Revengeance Mode - public static bool death = false; //Death Mode - public static bool armageddon = false; //Armageddon Mode - public static bool ironHeart = false; //Iron Heart Mode + // Modes + public static bool demonMode = false; // Spawn rate boost + public static bool onionMode = false; // Extra accessory from Moon Lord + public static bool revenge = false; // Revengeance Mode + public static bool death = false; // Death Mode + public static bool armageddon = false; // Armageddon Mode + public static bool ironHeart = false; // Iron Heart Mode public static bool malice = false; // Malice Mode, enrages all bosses and makes them drop good shit // New Temple Altar public static int newAltarX = 0; public static int newAltarY = 0; - //Evil Islands + // Evil Islands public static int fehX = 0; public static int fehY = 0; - //Brimstone Crag + // Brimstone Crag public static int fuhX = 0; public static int fuhY = 0; public static int calamityTiles = 0; - //Abyss & Sulphur + // Abyss & Sulphur public static int numAbyssIslands = 0; public static int[] AbyssIslandX = new int[20]; public static int[] AbyssIslandY = new int[20]; @@ -110,14 +110,14 @@ namespace CalamityMod.World } } - //Astral + // Astral public static int astralTiles = 0; - //Sunken Sea + // Sunken Sea public static int sunkenSeaTiles = 0; public static Rectangle SunkenSeaLocation = Rectangle.Empty; - //Shrines + // Shrines public static int[] SChestX = new int[10]; public static int[] SChestY = new int[10]; public static bool roxShrinePlaced = false; From e3a00220b49f9bb57706082ac92dac5a798da707 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Jun 2021 10:29:55 -0400 Subject: [PATCH 066/103] Hypothermia SS multiplier 2.5x -> 1.75x, split shards 33% -> 50% --- Items/Weapons/Rogue/Hypothermia.cs | 2 +- Projectiles/Rogue/HypothermiaChunk.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index a25a797fe1..206310586a 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int stealthDamage = (int)(damage * 2.5f); // was 2.635x + int stealthDamage = (int)(damage * 1.75f); for (int i = 0; i < 4; ++i) { Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.07f) * Main.rand.NextFloat(1.1f, 1.18f); diff --git a/Projectiles/Rogue/HypothermiaChunk.cs b/Projectiles/Rogue/HypothermiaChunk.cs index 27ce72b179..4c10079e84 100644 --- a/Projectiles/Rogue/HypothermiaChunk.cs +++ b/Projectiles/Rogue/HypothermiaChunk.cs @@ -59,10 +59,15 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.owner == Main.myPlayer) { int numSplits = Main.rand.NextBool() ? 4 : 3; + int type = ModContent.ProjectileType(); + int shardDamage = (int)(projectile.damage * 0.5f); + float shardKB = projectile.knockBack * 0.75f; + for (int i = 0; i < numSplits; ++i) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f); - Projectile.NewProjectile(projectile.Center, velocity, ModContent.ProjectileType(), (int)(projectile.damage * 0.33f), projectile.knockBack * 0.75f, Main.myPlayer, Main.rand.Next(4), 1f); + int texID = Main.rand.Next(4); + Projectile.NewProjectile(projectile.Center, velocity, type, shardDamage, shardKB, Main.myPlayer, texID, 1f); } } } From e0d0e114ce207de24ac3c28fa3d793610a42aa5f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Jun 2021 10:32:05 -0400 Subject: [PATCH 067/103] Utensil poker SS now 2.4x damage, increased velocity --- Items/Weapons/Rogue/UtensilPoker.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index f6c6a38df7..223cf34a30 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -46,8 +46,10 @@ namespace CalamityMod.Items.Weapons.Rogue if (mp.StealthStrikeAvailable()) { - int stealthDamage = damage; - int stealth = Projectile.NewProjectile(position.X, position.Y, speedX * 1.2f, speedY * 1.2f, ModContent.ProjectileType(), stealthDamage, knockBack, player.whoAmI); + int stealthDamage = (int)(2.4f * damage); + float stealthSpeedMult = 1.4f; + Vector2 stealthVelocity = new Vector2(speedX, speedY) * stealthSpeedMult; + int stealth = Projectile.NewProjectile(position, stealthVelocity, ModContent.ProjectileType(), stealthDamage, knockBack, player.whoAmI); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; } From 9e995e03a0a7ff154662a57aa549d7030921ee6d Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Jun 2021 10:35:54 -0400 Subject: [PATCH 068/103] Buffed Ghoulish Gouger stealth strike from 3x85% to 8x100% --- Items/Weapons/Rogue/GhoulishGouger.cs | 2 +- Projectiles/Rogue/GhoulishGougerBoomerang.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Items/Weapons/Rogue/GhoulishGouger.cs b/Items/Weapons/Rogue/GhoulishGouger.cs index 7a2f600c95..e3ae13baf5 100644 --- a/Items/Weapons/Rogue/GhoulishGouger.cs +++ b/Items/Weapons/Rogue/GhoulishGouger.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Rogue { DisplayName.SetDefault("Ghoulish Gouger"); Tooltip.SetDefault("Throws sets of four ghoulish scythes at ultra high velocity\n" + - "Stealth strikes spawn tormented souls on hit"); + "Stealth strikes summon a flurry of tormented souls on hit"); } public override void SafeSetDefaults() diff --git a/Projectiles/Rogue/GhoulishGougerBoomerang.cs b/Projectiles/Rogue/GhoulishGougerBoomerang.cs index c348bbf5cd..5a821088da 100644 --- a/Projectiles/Rogue/GhoulishGougerBoomerang.cs +++ b/Projectiles/Rogue/GhoulishGougerBoomerang.cs @@ -137,9 +137,9 @@ namespace CalamityMod.Projectiles.Rogue if (projectile.numHits > 0) return; - int numSouls = 3; + int numSouls = 8; int projID = ModContent.ProjectileType(); - int soulDamage = (int)(projectile.damage * 0.85f); + int soulDamage = projectile.damage; float soulKB = 0f; float speed = 6f; Vector2 velocity = Main.rand.NextVector2CircularEdge(speed, speed); @@ -149,7 +149,7 @@ namespace CalamityMod.Projectiles.Rogue float ai1 = Main.rand.NextFloat() + 0.5f; Projectile.NewProjectile(projectile.Center, velocity, projID, soulDamage, soulKB, projectile.owner, 0f, ai1); - // Rotate direction for the next pair of souls. + // Rotate direction for the next soul velocity = velocity.RotatedBy(MathHelper.TwoPi / numSouls); } } From c7fa8a365429f7c6968d87588c9916e69a6f2725 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Jun 2021 10:53:49 -0400 Subject: [PATCH 069/103] Eclipse's Fall stealth strike slightly buffed and made way more consistent. --- Items/Weapons/Rogue/EclipsesFall.cs | 5 +- Projectiles/Rogue/EclipsesStealth.cs | 70 +++++++++++++++++----------- 2 files changed, 44 insertions(+), 31 deletions(-) diff --git a/Items/Weapons/Rogue/EclipsesFall.cs b/Items/Weapons/Rogue/EclipsesFall.cs index d86751dd08..39f4604d36 100644 --- a/Items/Weapons/Rogue/EclipsesFall.cs +++ b/Items/Weapons/Rogue/EclipsesFall.cs @@ -40,10 +40,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { if (player.Calamity().StealthStrikeAvailable()) - { type = ModContent.ProjectileType(); - damage = (int)(damage * 0.216); - } int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) @@ -57,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Rogue recipe.AddIngredient(ModContent.ItemType()); recipe.AddIngredient(ModContent.ItemType(), 15); recipe.AddIngredient(ModContent.ItemType(), 6); - recipe.AddTile(TileID.LunarCraftingStation); + recipe.AddTile(TileID.LunarCraftingStation); recipe.SetResult(this); recipe.AddRecipe(); } diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index 50c08293a2..a38cd4fc10 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -1,6 +1,5 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -9,13 +8,15 @@ namespace CalamityMod.Projectiles.Rogue { public class EclipsesStealth : ModProjectile { - public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; + public override string Texture => "CalamityMod/Items/Weapons/Rogue/EclipsesFall"; + // For more consistent DPS, always alternates between spawning 1 and 2 spears instead of picking randomly + private bool spawnTwoSpears = true; private bool changedTimeLeft = false; public override void SetStaticDefaults() { - DisplayName.SetDefault("Eclipse's Stealth"); + DisplayName.SetDefault("Eclipse's Fall"); ProjectileID.Sets.TrailCacheLength[projectile.type] = 6; ProjectileID.Sets.TrailingMode[projectile.type] = 0; } @@ -34,44 +35,59 @@ namespace CalamityMod.Projectiles.Rogue projectile.Calamity().rogue = true; } + // Uses localAI[1] to decide how many frames until the next spear drops. public override void AI() { - if (projectile.timeLeft % 5 == 0) //congrats Pinkie... every 5 ticks + // Behavior when not sticking to anything + if (projectile.ai[0] == 0f) { - if (Main.rand.NextBool(2) && Main.myPlayer == projectile.owner) + // Keep the spear oriented in the correct direction + projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; + + // Spawn dust while flying + if (Main.rand.NextBool(8)) + Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 138, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); + } + + // Behavior when having impaled a target + else + { + // Eclipse's Fall is guaranteed to impale for 10 seconds, no more, no less + if (!changedTimeLeft) { - float dmgKBMult = Main.rand.NextFloat(0.4f, 0.6f); - int spearAmt = Main.rand.Next(1, 3); //1 to 2 spears - for (int n = 0; n < spearAmt; n++) + projectile.timeLeft = 600; + changedTimeLeft = true; + } + + // Spawn spears. As this uses local AI, it's done client-side only. + if (projectile.owner == Main.myPlayer) + { + projectile.localAI[1] -= 1f; + + if (projectile.localAI[1] <= 0f) { - CalamityUtils.ProjectileRain(projectile.Center, 400f, 100f, 500f, 800f, 29f, ModContent.ProjectileType(), (int)(projectile.damage * dmgKBMult), projectile.knockBack * dmgKBMult, projectile.owner); + // Set up the spear counter for next time. Used to be every 5 frames there was a 50% chance; now it's more reliable but slower. + projectile.localAI[1] = Main.rand.Next(8, 14); // 8 to 13 frames between each spearfall + + int type = ModContent.ProjectileType(); + int smolDamage = (int)(projectile.damage * 0.14f); // SS overall used to have a 0.275x mult, meaning 0.11 to 0.165 damage here. + float smolKB = 3f; + // Used to be a 50% chance each spearfall for 1 or 2. Now is consistent. + int numSpears = spawnTwoSpears ? 2 : 1; + spawnTwoSpears = !spawnTwoSpears; + for (int i = 0; i < numSpears; ++i) + CalamityUtils.ProjectileRain(projectile.Center, 400f, 100f, 500f, 800f, 29f, type, smolDamage, smolKB, projectile.owner); } } } - //Behavior when not sticking to anything - if (projectile.ai[0] == 0f) - { - projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; - if (Main.rand.NextBool(8)) //dust - { - Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 138, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f); - } - } - - //Ensures that a spear will last 10 seconds after it hits something - if (projectile.ai[0] == 1f && !changedTimeLeft) - { - projectile.timeLeft = 600; - changedTimeLeft = true; - } - - //Sticky Behaviour + // Sticky behavior. Lets the projectile impale enemies and sticks to its impaled enemy automatically. projectile.StickyProjAI(10); } public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) { + // Impale the enemy on contact ("sticky behavior"). projectile.ModifyHitNPCSticky(1, true); } From 11f787397611a8a1becb16204271a569cdd2cc8c Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 14 Jun 2021 10:58:33 -0400 Subject: [PATCH 070/103] Moonstone Crown base damage 70 -> 85 --- CalPlayer/CalamityPlayerOnHit.cs | 8 ++++++-- Items/Accessories/MoonstoneCrown.cs | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 93ebdc7d18..8a7635bdce 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -18,6 +18,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using static Terraria.ModLoader.ModContent; +using CalamityMod.Items.Accessories; namespace CalamityMod.CalPlayer { @@ -558,15 +559,18 @@ namespace CalamityMod.CalPlayer if (modPlayer.moonCrown && modProj.stealthStrike && modPlayer.moonCrownCooldown <= 0 && modProj.stealthStrikeHitCount < 5) { + int lunarFlareDamage = (int)(MoonstoneCrown.BaseDamage * player.RogueDamage()); + float lunarFlareKB = 3f; for (int i = 0; i < 3; i++) { Vector2 source = new Vector2(position.X + Main.rand.Next(-201, 201), Main.screenPosition.Y - 600f - Main.rand.Next(50)); Vector2 velocity = (position - source) / 10f; - int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, (int)(70 * player.RogueDamage()), 3, proj.owner); + int flare = Projectile.NewProjectile(source, velocity, ProjectileID.LunarFlare, lunarFlareDamage, lunarFlareKB, proj.owner); if (flare.WithinBounds(Main.maxProjectiles)) Main.projectile[flare].Calamity().forceTypeless = true; - modPlayer.moonCrownCooldown = 60; } + + modPlayer.moonCrownCooldown = 60; } if (modPlayer.nanotech && modProj.stealthStrike && modPlayer.nanoFlareCooldown <= 0 && modProj.stealthStrikeHitCount < 5) diff --git a/Items/Accessories/MoonstoneCrown.cs b/Items/Accessories/MoonstoneCrown.cs index 0f0b4f89c7..eb509e1d5b 100644 --- a/Items/Accessories/MoonstoneCrown.cs +++ b/Items/Accessories/MoonstoneCrown.cs @@ -8,6 +8,9 @@ namespace CalamityMod.Items.Accessories { public class MoonstoneCrown : ModItem { + // Base damage of lunar flares on stealth strikes. Increased by rogue damage stats, but not stealth damage. + internal const int BaseDamage = 85; + public override void SetStaticDefaults() { DisplayName.SetDefault("Moonstone Crown"); @@ -20,9 +23,9 @@ namespace CalamityMod.Items.Accessories { item.width = 46; item.height = 40; - item.value = CalamityGlobalItem.Rarity11BuyPrice; - item.rare = ItemRarityID.Purple; - item.accessory = true; + item.value = CalamityGlobalItem.Rarity11BuyPrice; + item.rare = ItemRarityID.Purple; + item.accessory = true; } public override void UpdateAccessory(Player player, bool hideVisual) From 707fc865709734d5bc1098bba6d7147bdd529e9a Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Tue, 15 Jun 2021 17:34:32 -0400 Subject: [PATCH 071/103] Fixed SS ratios on Hypothermia, Utensil Poker, Eclipse's Fall --- Items/Weapons/Rogue/Hypothermia.cs | 2 +- Items/Weapons/Rogue/UtensilPoker.cs | 2 +- Projectiles/Rogue/EclipsesSmol.cs | 26 +++++++++++++------------- Projectiles/Rogue/EclipsesStealth.cs | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index 206310586a..efb15d0d20 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Items.Weapons.Rogue { if (player.Calamity().StealthStrikeAvailable()) { - int stealthDamage = (int)(damage * 1.75f); + int stealthDamage = (int)(damage * 1.2f); for (int i = 0; i < 4; ++i) { Vector2 chunkVelocity = new Vector2(speedX, speedY).RotatedByRandom(0.07f) * Main.rand.NextFloat(1.1f, 1.18f); diff --git a/Items/Weapons/Rogue/UtensilPoker.cs b/Items/Weapons/Rogue/UtensilPoker.cs index 223cf34a30..4500d58c06 100644 --- a/Items/Weapons/Rogue/UtensilPoker.cs +++ b/Items/Weapons/Rogue/UtensilPoker.cs @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Rogue if (mp.StealthStrikeAvailable()) { - int stealthDamage = (int)(2.4f * damage); + int stealthDamage = damage * 2; float stealthSpeedMult = 1.4f; Vector2 stealthVelocity = new Vector2(speedX, speedY) * stealthSpeedMult; int stealth = Projectile.NewProjectile(position, stealthVelocity, ModContent.ProjectileType(), stealthDamage, knockBack, player.whoAmI); diff --git a/Projectiles/Rogue/EclipsesSmol.cs b/Projectiles/Rogue/EclipsesSmol.cs index ece363d5fb..cb05bd132e 100644 --- a/Projectiles/Rogue/EclipsesSmol.cs +++ b/Projectiles/Rogue/EclipsesSmol.cs @@ -28,7 +28,7 @@ namespace CalamityMod.Projectiles.Rogue public override void AI() { projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4; - CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 200f, 12f, 20f); + CalamityGlobalProjectile.HomeInOnNPC(projectile, true, 200f, 12f, 20f); } public override void Kill(int timeLeft) @@ -36,21 +36,21 @@ namespace CalamityMod.Projectiles.Rogue Main.PlaySound(SoundID.Item14, projectile.Center); for (int i = 0; i < 2; i++) { - int dustInt = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.2f); - Main.dust[dustInt].velocity *= 3f; - if (Main.rand.NextBool(2)) - { - Main.dust[dustInt].scale = 0.5f; - Main.dust[dustInt].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; - } + int dustInt = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.2f); + Main.dust[dustInt].velocity *= 3f; + if (Main.rand.NextBool(2)) + { + Main.dust[dustInt].scale = 0.5f; + Main.dust[dustInt].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + } } for (int j = 0; j < 3; j++) { - int moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.7f); - Main.dust[moreDust].noGravity = true; - Main.dust[moreDust].velocity *= 5f; - moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1f); - Main.dust[moreDust].velocity *= 2f; + int moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1.7f); + Main.dust[moreDust].noGravity = true; + Main.dust[moreDust].velocity *= 5f; + moreDust = Dust.NewDust(projectile.position, projectile.width, projectile.height, 138, 0f, 0f, 100, default, 1f); + Main.dust[moreDust].velocity *= 2f; } } diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index a38cd4fc10..77bba69aa6 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.localAI[1] = Main.rand.Next(8, 14); // 8 to 13 frames between each spearfall int type = ModContent.ProjectileType(); - int smolDamage = (int)(projectile.damage * 0.14f); // SS overall used to have a 0.275x mult, meaning 0.11 to 0.165 damage here. + int smolDamage = (int)(projectile.damage * 0.28f); float smolKB = 3f; // Used to be a 50% chance each spearfall for 1 or 2. Now is consistent. int numSpears = spawnTwoSpears ? 2 : 1; From 905893790d096c1b9816ea6da8c9e0701bbf9e1b Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 12:41:41 -0500 Subject: [PATCH 072/103] 1 - Thanos, I want to die. 2 - Adjusted Wyrm HP and lightning velocity. --- CalPlayer/CalamityPlayerMiscEffects.cs | 14 +- Gores/Thanatos/ThanatosBody1.png | Bin 0 -> 429 bytes Gores/Thanatos/ThanatosBody1_2.png | Bin 0 -> 1229 bytes Gores/Thanatos/ThanatosBody1_3.png | Bin 0 -> 721 bytes Gores/Thanatos/ThanatosBody2.png | Bin 0 -> 1331 bytes Gores/Thanatos/ThanatosBody2_2.png | Bin 0 -> 554 bytes Gores/Thanatos/ThanatosBody2_3.png | Bin 0 -> 635 bytes Gores/Thanatos/ThanatosHead.png | Bin 0 -> 1234 bytes Gores/Thanatos/ThanatosHead2.png | Bin 0 -> 867 bytes Gores/Thanatos/ThanatosHead3.png | Bin 0 -> 563 bytes Gores/Thanatos/ThanatosTail.png | Bin 0 -> 656 bytes Gores/Thanatos/ThanatosTail2.png | Bin 0 -> 658 bytes Gores/Thanatos/ThanatosTail3.png | Bin 0 -> 365 bytes Gores/Thanatos/ThanatosTail4.png | Bin 0 -> 530 bytes NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 7 +- NPCs/Abyss/EidolonWyrmTailHuge.cs | 2 +- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 4 +- NPCs/CalamityGlobalNPC.cs | 5 +- NPCs/Crabulon/CrabShroom.cs | 4 +- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 507 ++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png | Bin 0 -> 5628 bytes NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 507 ++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png | Bin 0 -> 5235 bytes NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 765 ++++++++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png | Bin 0 -> 9588 bytes NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 508 ++++++++++++ NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png | Bin 0 -> 5673 bytes Projectiles/Boss/AstralLaser.cs | 7 +- Projectiles/Boss/ExoDestroyerLaser.cs | 176 ++++ Projectiles/Boss/ExoDestroyerLaser.png | Bin 1136 -> 662 bytes Sounds/Custom/ThanatosVent.ogg | Bin 0 -> 45642 bytes Utilities/MiscUtils.cs | 25 +- Utilities/NPCStats.cs | 15 + World/CalamityWorld.cs | 6 +- 36 files changed, 2534 insertions(+), 22 deletions(-) create mode 100644 Gores/Thanatos/ThanatosBody1.png create mode 100644 Gores/Thanatos/ThanatosBody1_2.png create mode 100644 Gores/Thanatos/ThanatosBody1_3.png create mode 100644 Gores/Thanatos/ThanatosBody2.png create mode 100644 Gores/Thanatos/ThanatosBody2_2.png create mode 100644 Gores/Thanatos/ThanatosBody2_3.png create mode 100644 Gores/Thanatos/ThanatosHead.png create mode 100644 Gores/Thanatos/ThanatosHead2.png create mode 100644 Gores/Thanatos/ThanatosHead3.png create mode 100644 Gores/Thanatos/ThanatosTail.png create mode 100644 Gores/Thanatos/ThanatosTail2.png create mode 100644 Gores/Thanatos/ThanatosTail3.png create mode 100644 Gores/Thanatos/ThanatosTail4.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody1.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody2.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosHead.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosTail.cs create mode 100644 NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png create mode 100644 Projectiles/Boss/ExoDestroyerLaser.cs create mode 100644 Sounds/Custom/ThanatosVent.ogg diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 21e021e214..7e3f83757c 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -2900,7 +2900,19 @@ namespace CalamityMod.CalPlayer if (modPlayer.gState) { player.statDefense -= GlacialState.DefenseReduction; - player.velocity = Vector2.Zero; + player.velocity.X *= 0.5f; + player.velocity.Y += 0.05f; + if (player.velocity.Y > 15f) + player.velocity.Y = 15f; + } + + if (modPlayer.eFreeze) + { + player.statDefense -= GlacialState.DefenseReduction; + player.velocity.X *= 0.5f; + player.velocity.Y += 0.1f; + if (player.velocity.Y > 15f) + player.velocity.Y = 15f; } if (modPlayer.eFreeze || modPlayer.silvaStun || modPlayer.eutrophication) diff --git a/Gores/Thanatos/ThanatosBody1.png b/Gores/Thanatos/ThanatosBody1.png new file mode 100644 index 0000000000000000000000000000000000000000..846ec8a27e0b0c269b9d55f210a6e511ac96d1f6 GIT binary patch literal 429 zcmV;e0aE^nP)Px$XGugsR7i=ywFPz6#UF@@;^fd(aC2~TarHlN7u*F0 zmkv&%sEF0Yu2pEM)IqVLQ?g{Ji;s9m6DrE3-zB`b zV?^DKlLEl^y;uT~kVs9k*&G1XYDLK_oZkSDU!DU@5($ayJU!q7(0HvYi9)ioy9a~> z@)WZ9rCDX3tZVet#rB6tNOWDEodB@7vIc}i+nXBzS;2=zYE zPnSr@bX6Y9fMFsaB+)znx%Lpdz;I?Px(he}n(R}_H1TiK3rA`nrM1`w!}4$QE$QyCCbhb|o|u~+Jf*gCSI zu9do1>d>V_r>aAlV1b#TG$^S2r2+zp8?zcF4zV>^0{(R24 z=UxZ)nKK`qjUHcpxRQG5ZtUPpyBz?wd%ZnfS5-ck>e&u4jVYc>3<&@Wi%S4>H#dim z-Qi?{EPu01b2sZG+z z@zZC|7mhz#xevhIJGTH>SUNF$|L0F?x#(<^lf8V83$bEhX*mFNH{L`CH(N~r)?dBa zg;6$KTs~76C$UJ-&ue7-h0m@Oj{o}ej{uxJ{c!+z{OIq}_eqhBaiY-<) z(k5B6eTiifd*nP)k6GuJ@ngmhyAc)ZqN-%0oV@Et=~$$*mNm|LUXJTJM$D4zrt7a1 zdakF6$dahZ0$}Ejl$qQnX#Ha@k{)&#%^_1>jkc~Q6+;_j# zY5}7P-KvLl7SlN9UI1MC?j|tmMpy<%=7ia(gJhDsAFbfEQK`9}Rfm1Jd@2Aud-_lG zJet&s^W4#60bt|xdg-_n*(fKq^~?orN@{MGiY+=DTOCa+HtOq{)Ua%n6Sq-wM~?xp z@p?Vlmr9wWk=W8c(g^^)t!}0BTV~01=sBidNshdKscG3LC#F$WpUUb6c>7POEOmT- zF#x=Lv1Sb^7?p}m-VUoaO?M-*QBKU=EV@r6SlxiCl+;(HT>vpo#%Z$zeLS_=6EVMV z9oZ-+Wm&JZi=eZPRgnv+^|r6Beha|&H?9Ney#mMQ7Xf(rVl8UE;9aRsjn76osa%=Q zw2uI=-PwwuPC!Rf=g->9+w-p_vd)QWe zV;%qVkKcfiSwd?blVQUt|sj1Nk$+$Uy1)h(X%KR5qO!*(fKqf6pDi zbt#a^(pQkPlTC@22`#q3u6`K8ci00000NkvXXu0mjf=w@1U literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosBody1_3.png b/Gores/Thanatos/ThanatosBody1_3.png new file mode 100644 index 0000000000000000000000000000000000000000..d22ecb673b1ebc19f84d84b506871f79aa5d9fa7 GIT binary patch literal 721 zcmV;?0xtcDP)Px%i%CR5RA_-RF{QHh(60_|5yyYz+S? zrP34tLD25n&hH!PXhw(`_W%Z<3ov_fF7#kyy$*P6Y+~F4NP#s|VyaY{GT^bXe>P*~ zN)3S4R?})oBc_6&4HU*k$NtGl0CqZ^F2IG0mjPIL`5fCZj_*(y8y2n(Lh6&ucG^_A zQZoRpt)}&T3u9TMv!pu+jhKrwB^1U6B`!;v+L2jcFH^cs#Zeebiz`cFr1`lKdj9!K zR{(hW`%sAD_Q+ZOTCHPqY$HVt1~KOZA$Rgm~rhzNVfF)D5)`5=CbYy zU3hD3qG#7f_CG@ATs@s8>8vOW%aq`+v7Y*VPZruvW%N@zz*mU-59c3c%Oa zW@sN!*P&N0o&nLTAyT()E!_p+(ZdG-9Gm&oy?@-uwkLFvA7efIb%h+ammww>7SH|e z1z)EbUup_tLfqbl{=Y@it0P&HOJkZ;|F;+y-WvM}M0*WTAdhj700000NkvXXu0mjf D4-`-Q literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosBody2.png b/Gores/Thanatos/ThanatosBody2.png new file mode 100644 index 0000000000000000000000000000000000000000..88b0bd01e5914c2664b69f62add4d542de7aef61 GIT binary patch literal 1331 zcmV-31Px(?MXyIRCt{2oH1-$MHt6_udNf~gxD=@s6eeKsh}(ju)qWZVq#!nKw?K?MQk0j zc12=GVqjrlLJVbs1qK)hsG+D8D6~*Jp|KncGK2ZMeqY{~yX0&q5%*gnzxRCaS@-jI z_kDLx!69+_%sBws_wEh=EI+>u0BAH83V?2Rd#2ABOExf(sTsJq)CA!E*5;t< zyv!3TE0;^J$3|tn|45F?*}z1Cz1nCj0MPAjSDF;UjdO zD>jBHCdm}xnItr-dhfTWz1ZvQeeLlIlP79oHZYM)b@eWN_AsRyk?W&;!16$8b5y?kXv#wyPxVn=To=e1L@$~P6Vfr&)Ni;5nNs?vBy+4DA*g<|5%ue=7p#~;2A zz-Fgi4F7h#=bZ}Kz(i6;tkOKn_P94HD<)d=l>5r8Ypd@8&}_8|fZE(J=Kg+Xqhx;Q zvt$F0I1`%(3NI$wm?bz{vGI__l_1fDgb%2N4U!i$}ux?wgjk)VOXp3?kk}fsCl0Vt-)B9 z&p%!O+}Zf0auy)Gd8u8mwg%ec-VWMqU?RH=v^}`EbQ*yBTkQeF&$Fz7cCF*;>NNm< zSX(c>PcbpH{%dn)`&^+qqVU$KZRVu*YqeSd(C_zwY+y1Y1J#qQM;-;B^T%(c*y6=5 zJ8Fh@W63eY8k_Yrn|*wz<4tVzOK1q@y1ee<$`i4-z#zTN;}r`H|8E7wuYI6de#~j+T~;o^RVl| zA@ejUd$G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V0U3R0Oip!Aj8D}1sHucY6L;pNdN!<07*qoM6N<$f<#nm#{d8T literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosHead2.png b/Gores/Thanatos/ThanatosHead2.png new file mode 100644 index 0000000000000000000000000000000000000000..7df1a911da546fb363ee37a804b43859d214fcc4 GIT binary patch literal 867 zcmV-p1DyPcP)Px&9Z5t%RA_W70wok7L;}IVSr?sjFis9G4kqp;T^5rs=F<7>YX z>j#59leqHzi%d<=0`Oz&TN8Rs6Jv!h8?Lz)+vQClJ=W&)qY?CGBf((LoOy$-y!Gh! z5den=2Tsg<@aT!tUYmMl@mgX(QcsMv5R>%`=`!5;O@qOn@t#E#CrbcScD6I^gsdz8 zBX89v31Xx+_QU&Spc9j|xpIGL>8jIief?AW+p=>%7N%+`R3S zudS{)W5|ydTJ`s9nX&*eQF!?HsdFvHiHYytzH!RM*wV~AV8>={vgXC}X8>HDnTr6v zm%lpY!C=pr24{$!iEXvHVxpLmmRD-i#Vm=HckbR#Y$wKQvjyG1Wv-PUOTT(%2x2lJ zi#S<&EF2(q0x*)xMF6>64uIWiHPKwb$}@F6G0R%bU%z@ucRxa5tk^ycYvs*D!y^DR z;zMU9>XAXNr+_zAxv{T`@gseO8_N z!C=pH=fQvV{@;p8eT*FFjN_~!vAT0zbgn}ld_tt|Px$?MXyIR9J=WnK3T}Q51#0C#=m9iy#_8DAY7m6r%D6{Q|8*B?>AUY6T%Qg0L%g z!zxze#JuahB`gzWzH0W(otZat&b{}|tmBPlVw-`%VFz$`d(D5OBkc*Kg-dKV0p{ix z0XW#-1)x;waRBvt&5IL({eOZ?EAA;cJ~8P9oS&TnFgP^g0B&!tn#nlrPfPi7e?I`v zjb{M53S9tHE0vbV<%&ze*@cy0;KuqI$vBIY?=BV{z|-SnduM9sE*5#cPSAn)_3Itk zRlHQ{0ia&5dAY9YJ~lZ6z|_>Vci_(UCIHu$=iYeYiF>rc3C+-8tR|5w9wziuyqpok zqvPK1m=jJ;jsZB_+w#W0;DnY6Yd&(E&R-}L96+Pd2wqR*iVO8cQLR*hxi6%=xHvrm zU}<^P8E~?lD)qU3^pvtTG~|a149A6t>?Jgk3M> zivKkBZA#d6fmKSxoFeQBuEiQ2$QA#6VznU9f4z5y&(;R3ysh?`RlGB;3nvtHk?|ll zmt)wKoOMcO6;Cb4KTGTjQ3CHCV%Px%N=ZaPR9J=Om_2V3K@f(Y&Bw(!QS3-WKtV(l3Pb^dG*E>Cr9k;RbdwrdS`8@{POZO0KPW20eJi7RU|KCJ{?AYhzVuDpiFp7-M+g%bVIYa>MIk*py?^| z)#_{j$n#?$Ax5U`MlEbUt59FIv0dN2eh&0AQ>O31^N`j~)3RWI6d6&N1r6q_YEjiQ z3)=j>`x}vbW#uXWFJEj%^A-aZtG1sq;$_KX82OvE44S<(TN%9Uq)ap#Uw|GHicg)J z0Bk*5kM>vSc{=UgsIDZ#$P`7?XITbB*&u@Ys%4u;kDmbWdAk9?rKb-8$P2v(n;!vq zzi|VATgBM)uV458z*eEJv7#`!btHyl7zy^~hX>z_>p{eb_DEW3%Y53PbxA9{W+SiX zv&x@-Wv|s2y2TafS;*^lJ&SoAfmU{Xu8d)W$vf@cXg(cA_V@Mxn9imH^q8?XSKsww z#;Z5VfMq+chf-+$ICGvfd#%38uJFE7%CcA4cTL%P9`gqElw=rjyI-}i7Xt>*!lQn1 zdR?toXB5dW63*NYjFqyyt})_O=(3o|vg}XKS2+jt{|Ec8{-P+x`XgAY*8{-muhW6@ qh4YI5OiqL@4E6OvXBipEF!CG0mLmXsLHhy#0000q%!>g literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosTail2.png b/Gores/Thanatos/ThanatosTail2.png new file mode 100644 index 0000000000000000000000000000000000000000..ec5cf41bdbdf0fd4592594b52c26d02f888464c6 GIT binary patch literal 658 zcmV;D0&V??P)Px%Oi4sRR9J=Wn6Yb9Q51*2E54*nLX(OW6RY>9Gw><7W_no}(oqNu?*U??g zn0W_~$z%ZtQUL(@!Z-lsFUvi+9-Iyh`U3_f7iY+1a{z?(S`%RE%rp>BQuZK~b^wjv zJD&ZZMZl2w$;lZ2zO62Kd;0u^ivV1@d>w#N=`#SU%Zrf?H@=s>@j;D%50 z!{qd=XaBhH##<-l#_|rJwpH!(FYHf4;#R85k|imLe7E|pNU;&12>bAUey?x*?@Bar z$?MQ0OVSdz>XzjtOI}q(eZuo+a{vTE(CPyk4I7ybAU!eyz|Qt|vpsh0F#x%-JOH(= zs`q|ki64$LSkm_%Jo3hI9h}Yjmb^&oJ&onhN~9ys3Qg#c-DUU4s!AwQl}i#!{O=ym z7YdOJs+CG))>qw^RG)9&zU$3fk|M3%->$QfpmAK^5EoJQ_e6U9$b^F-@s4(7b&s_6 zR$SKaR~l|_0PztbsS3nNq&I(U07K#(S)$d-X8T#` z=_V%5Prs6Xds=+_@P6d_qsLA-fS*6sd-6Xd-c7nq4a0h52W8h~vi`GIh4t3?JU!aF s^ZQ!%Z-h>ro^b$cD@%R(wMs1UKP^7_pQ=T|vj6}907*qoM6N<$f``{R82|tP literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosTail3.png b/Gores/Thanatos/ThanatosTail3.png new file mode 100644 index 0000000000000000000000000000000000000000..22acef22dca1d46943c5ce37196e7adfc6108679 GIT binary patch literal 365 zcmV-z0h0cSP)Px$CrLy>R7i>4mN9O^KoCWrqg1A_K|)Fc3LSl#bh!d8C*Y3hQY8(!0+uTzB&b5@ zOf{hWc)$e7i}D-GyEE24&+Ok#aFnJU0JhtoN~RJor->eJN&bt@t+oOfK92w>i^VP9 zI;eHR$7>VL5NoXirD-RDdnD{X4S^$(J&n}nRjXwgyqCqIf;%A$YB3m%0hoV%07o*D zjeFAg_6a>ld3k-SP4M=k*S-4QKB1B63axe~k3ef=e@4616vazx9bz(_0r36#UYpp! zTLWcz9>-};2)*vKnq2Bqa~_S4@1-7@=OkX&YP`kmcE3Q38g_eq05FLpc=&E~ad_vQ|xq0sauULIegu55e00000 LNkvXXu0mjfW_X@I literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosTail4.png b/Gores/Thanatos/ThanatosTail4.png new file mode 100644 index 0000000000000000000000000000000000000000..09c638cebfdbc90d16701ca92f2ee577b3b9e6b7 GIT binary patch literal 530 zcmV+t0`2{YP)Px$%t=H+R9J=On7vN|F&KxR8c*>cd?gqbiEPfg=;Y??>R;gh$i^fK&TbG~Oi1`J zLXI%tfUkG$U4h7v6nr*%rRhESy=|`w3#XY30J9)iMBC4+RRxgAoN4`g-HvUjKXH`m zXen}>(6#`W1pxrH%X;GT2rBhiv1i7BxGBj{p;%M^o_7L(pUv)MV(uFA{pA}^rxPtZ zm1+%ucB`rVVLTd1zh$=iyP24?#uPtQCYh2fB~+vKoE=r8;H5pINP@IkwzOoi(=hZOjv{tX~O+ zfY7YDGvx9G1)Epv{u&e3nKLuEqFQCVm3!;{8xzbs4O`~Kpv~yIZ->J%79sJx7VfD_ zWStXMoQSo#9G)@T7rgNJ^sN1sQ;Kb!i;Sz_5RI)M(Vz|6t(), 600, true); + if (npc.Opacity == 1f) + player.AddBuff(ModContent.BuffType(), 600, true); } } } diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index 65a97a5fee..e8eb77af1e 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -20,7 +20,7 @@ namespace CalamityMod.NPCs.Abyss npc.width = 86; npc.height = 120; npc.defense = 0; - npc.LifeMaxNERB(1000000, 1150000); + npc.LifeMaxNERB(1750000, 2012500); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index c4aadc9463..cc3d4cd060 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -1,5 +1,4 @@ using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Accessories; @@ -17,7 +16,6 @@ using Microsoft.Xna.Framework; using System.IO; using Terraria; using Terraria.ID; -using Terraria.Localization; using Terraria.ModLoader; namespace CalamityMod.NPCs.BrimstoneElemental @@ -91,7 +89,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental player.AddBuff(ModContent.BuffType(), 180, true); } - public override void FindFrame(int frameHeight) //9 total frames + public override void FindFrame(int frameHeight) // 9 total frames { npc.frameCounter += 1.0; if (npc.ai[0] <= 2f) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 4c830a41cc..ad21798c32 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -21,6 +21,7 @@ using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; @@ -691,8 +692,8 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref SCal, NPCType()); ResetSavedIndex(ref SCalWorm, NPCType()); - /*ResetSavedIndex(ref draedonExoMechWorm, NPCType()); - ResetSavedIndex(ref draedonExoMechTwinRed, NPCType()); + ResetSavedIndex(ref draedonExoMechWorm, NPCType()); + /*ResetSavedIndex(ref draedonExoMechTwinRed, NPCType()); ResetSavedIndex(ref draedonExoMechTwinGreen, NPCType()); ResetSavedIndex(ref draedonExoMechPrime, NPCType());*/ diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index 59f1215a0b..ba46c99cd3 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -88,11 +88,11 @@ namespace CalamityMod.NPCs.Crabulon spriteEffects = SpriteEffects.FlipHorizontally; Texture2D texture2D15 = Main.npcTexture[npc.type]; - Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / 2); + Vector2 vector11 = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + Vector2 vector43 = npc.Center - Main.screenPosition; vector43 -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; vector43 += vector11 * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); - spriteBatch.Draw(texture2D15, vector43, npc.frame, npc.GetAlpha(lightColor), npc.rotation, vector11, npc.scale, spriteEffects, 0f); texture2D15 = ModContent.GetTexture("CalamityMod/NPCs/Crabulon/CrabShroomGlow"); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs new file mode 100644 index 0000000000..fdde948722 --- /dev/null +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -0,0 +1,507 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Projectiles.Boss; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.ExoMechs.Thanatos +{ + public class ThanatosBody1 : ModNPC + { + // Whether the body is venting heat or not, it is vulnerable to damage during venting + private bool vulnerable = false; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.Calamity().canBreakPlayerDefense = true; + npc.npcSlots = 5f; + npc.GetNPCDamage(); + npc.width = 148; + npc.height = 98; + npc.defense = 100; + npc.DR_NERD(0.99f); + npc.Calamity().unbreakableDR = true; + npc.LifeMaxNERB(1000000, 1150000); + double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + npc.lifeMax += (int)(npc.lifeMax * HPBoost); + 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; + npc.chaseable = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(npc.chaseable); + writer.Write(npc.dontTakeDamage); + writer.Write(vulnerable); + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + for (int i = 0; i < 4; i++) + writer.Write(npc.Calamity().newAI[i]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + npc.chaseable = reader.ReadBoolean(); + npc.dontTakeDamage = reader.ReadBoolean(); + vulnerable = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + for (int i = 0; i < 4; i++) + npc.Calamity().newAI[i] = reader.ReadSingle(); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false; + + public override void AI() + { + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } + + // Set vulnerable to false by default + vulnerable = false; + + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + bool invisiblePhase = calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Set timer to whoAmI so that segments don't all fire lasers at the same time + if (npc.localAI[2] == 0f) + npc.localAI[2] = npc.ai[0]; + + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) + { + float divisor = 180f; + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float laserVelocity = 12f; + for (int i = 0; i < numProjectiles; i++) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + else + { + npc.ai[3] += 1f; + float shootProjectile = 60f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float predictionAmt = 20f; + float laserVelocity = 12f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + for (int i = 0; i < numProjectiles; i++) + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + } + } + else + { + // Set alternating laser-firing body segments every 3 seconds + npc.localAI[1] += 1f; + if (npc.localAI[1] >= 180f) + { + npc.localAI[1] = 0f; + npc.localAI[2] += 1f; + } + + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + else + { + // Body is vulnerable while venting + vulnerable = true; + } + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[0] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[0] < maxSteamTime) + { + npc.localAI[0] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[0] = 0f; + + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); + float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } catch + { + } + + npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + + if (num191 < 0f) + npc.spriteDirection = -1; + else if (num191 > 0f) + npc.spriteDirection = 1; + } + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 50f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + npc.frameCounter += 1D; + if (npc.Calamity().newAI[1] == 0f) + { + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override bool CheckActive() => false; + + public override bool PreNPCLoot() => false; + + public override void HitEffect(int hitDirection, double damage) + { + int baseDust = vulnerable ? 3 : 1; + for (int k = 0; k < baseDust; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody1"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody1_2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody1_3"), 1f); + } + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 120 : 60; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png b/NPCs/ExoMechs/Thanatos/ThanatosBody1Glow.png new file mode 100644 index 0000000000000000000000000000000000000000..cfa0941d35d2ec5f99247b0402f5285e447bdc31 GIT binary patch literal 5628 zcmdUzXH=8xnubwPV-Sc)P-#k$5=2C4N|R87l+TdBmLduwQiAkeH32~p6+#s-N(mrv zsG*~5iUuKDAtEKP0VADA2?_lK&snq9tT{73X4cG^^XtoxH}Cy@?|Sd+xt}Kg~d z_G0}MEy%UHO&0_@@&sD}Iv4}R!uQMX!@ii1J_#R>PT_(hd<2dXysw&a5%M&S!~z;; z&PD^sm)!btqR#}b%E?+z&e2fw+Ke+xNe| zovo;b_XIoGBU$~t4o{U>`o6=2JQpZIK;wS4jsUE$+;MF9-qH!m7BYC-crz!4b~Ny+ zo*XPCP zEpXS@@!?9K5^W=1ME9t13YyPj{pn}iyfS8i{&j^vwyrBT4A!*W?WpmM2qa}|3EzyG z=b<2ARLibH5&XE7y6&k7ohpXS4`E}QUJu!pV;j4Jct-Dtv^r%_GZ6sQB)`2TiwZ9z zy{C&KaWd9LZ=2Btt($%PaisH6%!h+VU6~lX6Y^Th>;Youck^$1J}LLmOhczqK?=xU=EmelgK0W;>_ z@6uR@qJ&A?;VKiH{p1_To8$<7EbU6@GVbTfSk&@BA`OKuW?F3?uwk+rF3^T#di@59 zEJ_4Hsy8?rer$6cE-FXMRek*$VOpA0Ep|PSn_`zSv=Kkh=$Wlhb`Rr|%4F4t7!y;? zr26mdtM`yVfK|nl^j}$yglnH+2z%d1G8n$EgqKyf47@d16s02EjNL49Z0!3X<<3BH-(j>dTLHdu7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7 zSbz;Jk1(Cy*1#qDzmLCNs@wEnDbNJTgxwS4t@-h4TVZnfwa|65Q*-KmCa5t1>$bv1~4ZB8?8 z**3%J$r9SSl%+?vCb6r!>X4Wc4wv+v07a(MtqYp+{j`r$D}8=>Ntdk_kC|>B*{7hD z<@z*sK+Ubyic=@iz94_0;yL

  • d0;w5v@PHG3UN^GC<_4=><~uP-@mNd4(l@x{?L zPDB~b+totOIaW-r=2Mr$3O|j&YfGWLD5ZEm=O`ycV*-i#9d5S1eqv=sHNX17Y|jc+b+xZo(bSfQX03BD^0&HY6vUj-2o1Oh8x_Qxz(6Z=KUKa5(pzvPRZ8nPz~Unj^&LtvTu5~u-N zl}0hRIWEDb6XTVVnbM_E1fYl)-*9+(M3?i3Yy3`OBscgI%~MKGvCk!C2ti zdSAwaRg<~kZVLEKFx9#US!X5b-d7d=8RDK^ly>9rJ!0xPg|mE&gp zKS-ct%|05Ti0kZ%00S-p0RMM$r2m+rs&L(Y_wDajvxh1kjt5|Z?sYm2O?RhrU=+gz zXKG`wc)3DhEu@i_1>}E)s=~bXG1F6jM-@BddZ1E0b7h_N@@UV(_AgdRh2Ln~!Iwn` zz8U8fo=;{7uY7WB5@!Nqr96GE-|I#af`-Tllg@wDPC8WBvh759jMNs>Xi1~3SwdSe zO>3KfgViGyxT<9YmDB5x1-nR$seBoFF=MhreYOMY^BD>&voE@gwy8)h;BclXO_^5f zSO+XgYel*vNVI+uQrAXHys*R4f!?Dz@F>3Bo;umxbG1p=L8;T0Q#8z59*8T6oay&8 zy|L2Z9@6qt z*&CG*r4ZEe9tR!w%}2UnPjoeDGCXkeFEKz>&HOpkmbyjLrwpMGl>t%BzeOa~LPy=&UikHl)t??u zPnKKlfer1q!F0X`&SxY%5+tnk|_Bv78`nUvhn9t&9E@TA%rf7F8w(_HXg_~(VRI false; + + public override void AI() + { + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } + + // Set vulnerable to false by default + vulnerable = false; + + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + bool invisiblePhase = calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Set timer to whoAmI so that segments don't all fire lasers at the same time + if (npc.localAI[2] == 0f) + npc.localAI[2] = npc.ai[0]; + + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) + { + float divisor = 180f; + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float laserVelocity = 12f; + for (int i = 0; i < numProjectiles; i++) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + else + { + npc.ai[3] += 1f; + float shootProjectile = 60f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float predictionAmt = 20f; + float laserVelocity = 12f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + for (int i = 0; i < numProjectiles; i++) + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + } + } + else + { + // Set alternating laser-firing body segments every 3 seconds + npc.localAI[1] += 1f; + if (npc.localAI[1] >= 180f) + { + npc.localAI[1] = 0f; + npc.localAI[2] += 1f; + } + + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + else + { + // Body is vulnerable while venting + vulnerable = true; + } + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[0] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[0] < maxSteamTime) + { + npc.localAI[0] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[0] = 0f; + + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); + float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } catch + { + } + + npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + + if (num191 < 0f) + npc.spriteDirection = -1; + else if (num191 > 0f) + npc.spriteDirection = 1; + } + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 50f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + npc.frameCounter += 1D; + if (npc.Calamity().newAI[1] == 0f) + { + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override bool CheckActive() => false; + + public override bool PreNPCLoot() => false; + + public override void HitEffect(int hitDirection, double damage) + { + int baseDust = vulnerable ? 3 : 1; + for (int k = 0; k < baseDust; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody2_2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosBody2_3"), 1f); + } + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 120 : 60; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png b/NPCs/ExoMechs/Thanatos/ThanatosBody2Glow.png new file mode 100644 index 0000000000000000000000000000000000000000..8fea258abe5c9c61fc59ec6e81bbb6a861ad12b0 GIT binary patch literal 5235 zcmeI0XHZk!zQ$K*iPT6FL3CRI6%Y|2)CedEQUs($ihxRe=^?a06qKMSp%+0!x-=0` z1OY_|O+YE3qk@EH=u$-C#PgmrbLZR-_s+a?Kirx3)Bew1v-a%u%=$m;_pHcE20A>P zqMQH#9xO)NnE50F09!?HFe|$Bbt?b_QCRJBm;G%RX@>dMeL~bADQSyb1n=SKe#7vMyX3mH=!3sM@^XXD|-LZ6Ke828Z9IIWkncE6+Oec1#t#{UihhDmRpG7{O zm7OL9&~KV?>;M5^&{a|?P)69Q?1=%5w>y3wg8jd$?Md$q>*`)#`O=i**y#Onx4K6O%K4)XH?o)tm49R#(}Rls>jwr+~)v$sSG_j+TK4d{1|SlQdH$X#>fQED=a|P79a92`GB7 zAU;_RgxbI@iN;O}G zX|{y-7sbEU*KhXS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E*vDrpuncwa?!|TIv5n7+Q_{qBzyEZaq?H_^s_R%;D9tPGwb1@j(J|>k3>~$T6Gd- z+w_(nW}nqA(vfWv4~WsMSgIZ|On>Edzx_mA8WUmKyqE|hL?~JcXG&O9x;Y8R0bFy! z06jbF8sZ1+#~P~H0j2s!YKAx|`Q npc.Calamity().newAI[0]; + set => npc.Calamity().newAI[0] = value; + } + + public enum SecondaryPhase + { + Nothing = 0, + Passive = 1, + PassiveAndImmune = 2 + } + + public float SecondaryAIState + { + get => npc.Calamity().newAI[1]; + set => npc.Calamity().newAI[1] = value; + } + + // Whether the head is venting heat or not, it is vulnerable to damage during venting + private bool vulnerable = false; + + // Default life ratio for the other mechs + private const float defaultLifeRatio = 5f; + + // Base distance from the target for most attacks + private const float baseDistance = 1200f; + + // Base distance from target location in order to continue turning + private const float baseTurnDistance = 160f; + + // Max distance from the target before they are unable to hear sound telegraphs + private const float soundDistance = 2800f; + + // Length variables + private const int minLength = 100; + private const int maxLength = 101; + + // Variable used to stop the segment spawning loop + private bool TailSpawned = false; + + // Used in the lerp to smoothly scale velocity up and down + private float chargeVelocityScalar = 0f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.Calamity().canBreakPlayerDefense = true; + npc.npcSlots = 5f; + npc.GetNPCDamage(); + npc.width = 104; + npc.height = 174; + npc.defense = 80; + npc.DR_NERD(0.99f); + npc.Calamity().unbreakableDR = true; + npc.LifeMaxNERB(1000000, 1150000); + double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + npc.lifeMax += (int)(npc.lifeMax * HPBoost); + npc.aiStyle = -1; + aiType = -1; + npc.Opacity = 0f; + npc.knockBackResist = 0f; + npc.value = Item.buyPrice(10, 0, 0, 0); + npc.behindTiles = true; + npc.noGravity = true; + npc.noTileCollide = true; + npc.HitSound = SoundID.NPCHit4; + npc.DeathSound = SoundID.NPCDeath14; + npc.netAlways = true; + npc.boss = true; + npc.chaseable = false; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(npc.chaseable); + writer.Write(npc.dontTakeDamage); + writer.Write(chargeVelocityScalar); + writer.Write(vulnerable); + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + writer.Write(npc.localAI[2]); + writer.Write(npc.localAI[3]); + for (int i = 0; i < 4; i++) + writer.Write(npc.Calamity().newAI[i]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + npc.chaseable = reader.ReadBoolean(); + npc.dontTakeDamage = reader.ReadBoolean(); + chargeVelocityScalar = reader.ReadSingle(); + vulnerable = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + npc.localAI[2] = reader.ReadSingle(); + npc.localAI[3] = reader.ReadSingle(); + for (int i = 0; i < 4; i++) + npc.Calamity().newAI[i] = reader.ReadSingle(); + } + + public override void AI() + { + CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); + + CalamityGlobalNPC.draedonExoMechWorm = npc.whoAmI; + + // Difficulty modes + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || malice; + bool revenge = CalamityWorld.revenge || malice; + bool expertMode = Main.expertMode || malice; + + // Percent life remaining + float lifeRatio = npc.life / (float)npc.lifeMax; + + // Increase aggression if player is taking a long time to kill the boss + if (lifeRatio > calamityGlobalNPC.killTimeRatio_IncreasedAggression) + lifeRatio = calamityGlobalNPC.killTimeRatio_IncreasedAggression; + + // Check if the other exo mechs are alive + int otherExoMechsAlive = 0; + bool exoPrimeAlive = false; + bool exoSpazAlive = false; + bool exoRetAlive = false; + if (CalamityGlobalNPC.draedonExoMechPrime != -1) + { + if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].active) + { + otherExoMechsAlive++; + exoPrimeAlive = 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 exoPrimeLifeRatio = defaultLifeRatio; + float exoSpazLifeRatio = defaultLifeRatio; + float exoRetLifeRatio = defaultLifeRatio; + if (exoPrimeAlive) + exoPrimeLifeRatio = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].life / (float)Main.npc[CalamityGlobalNPC.draedonExoMechPrime].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 = exoPrimeLifeRatio + exoSpazLifeRatio + exoRetLifeRatio; + + // Check if any of the other mechs are passive + bool exoPrimePassive = false; + bool exoSpazPassive = false; + bool exoRetPassive = false; + /*if (exoPrimeAlive) + exoPrimePassive = Main.npc[CalamityGlobalNPC.draedonExoMechPrime].newAI[1] == (float)AresBody.SecondaryPhase.Passive; + if (exoSpazAlive) + exoSpazPassive = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].newAI[1] == (float)Apollo.SecondaryPhase.Passive; + if (exoRetAlive) + exoRetPassive = Main.npc[CalamityGlobalNPC.draedonExoMechTwinRed].newAI[1] == (float)Artemis.SecondaryPhase.Passive;*/ + bool anyOtherExoMechPassive = exoPrimePassive || exoSpazPassive || exoRetPassive; + + // Phases + bool lessThan70PercentLife = lifeRatio < 0.7f; + bool phase2 = lessThan70PercentLife && otherExoMechsAlive <= 1; + bool berserk = lifeRatio < 0.4f || totalOtherExoMechLifeRatio > 3f; + + // Set vulnerable to false by default + vulnerable = false; + + // If Thanatos doesn't go berserk + bool otherMechIsBerserk = exoPrimeLifeRatio < 0.4f || exoSpazLifeRatio < 0.4f || exoRetLifeRatio < 0.4f; + + // Get a target + if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) + npc.TargetClosest(); + + // Despawn safety, make sure to target another player if the current player target is too far away + if (Vector2.Distance(Main.player[npc.target].Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) + npc.TargetClosest(); + + // Target variable + Player player = Main.player[npc.target]; + + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Spawn segments + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (!TailSpawned && npc.ai[0] == 0f) + { + int Previous = npc.whoAmI; + for (int num36 = 0; num36 < maxLength; num36++) + { + int lol; + if (num36 >= 0 && num36 < minLength) + { + if (num36 % 2 == 0) + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + else + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + } + else + lol = NPC.NewNPC((int)npc.position.X + (npc.width / 2), (int)npc.position.Y + (npc.height / 2), ModContent.NPCType(), npc.whoAmI); + + Main.npc[lol].realLife = npc.whoAmI; + Main.npc[lol].ai[2] = npc.whoAmI; + Main.npc[lol].ai[1] = Previous; + Main.npc[Previous].ai[0] = lol; + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, lol, 0f, 0f, 0f, 0); + Previous = lol; + } + TailSpawned = true; + } + } + + // Despawn if target is dead + if (player.dead) + { + npc.TargetClosest(false); + + npc.velocity.Y += 2f; + if (npc.position.Y > Main.worldSurface * 16.0) + npc.velocity.Y += 2f; + + if (npc.position.Y > Main.rockLayer * 16.0) + { + 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].type == ModContent.NPCType()) + Main.npc[a].active = false; + } + } + } + + // General AI pattern + // Fly towards the target for 7 seconds, gradually speeding up for the first 5 seconds and slowing down for the last 2 seconds, fire lasers from segments that are venting + // Fly underneath the target and fire barrages of lasers + // Fire deathray from mouth with a telegraph similar to the railgun from enter the gungeon, turn speed is very low during this to avoid cheap hits + // Go passive and fly underneath the target while firing lasers + // Go passive, immune and invisible; fly far underneath the target and do nothing until next phase + + // Attack patterns + // If spawned first + // Phase 1 - 0, 1, 0, 2 + // Phase 2 - 4 + // Phase 3 - 3 + + // If berserk, this is the last phase of thanatos + // Phase 4 - 0, 1, 0, 2 + + // If not berserk + // Phase 4 - 4 + // Phase 5 - 0, 1, 0, 2 + + // If berserk, this is the last phase of thanatos + // Phase 6 - 0, 1, 0, 2 + + // If not berserk + // Phase 6 - 4 + // Phase 7 - 0, 1, 0, 2 + + // Phase gate values + float velocityAdjustTime = 20f; + float speedUpTime = 300f; + float slowDownTime = 120f; + float chargePhaseGateValue = speedUpTime + slowDownTime; + + float laserBarrageDuration = 420f; + + // Adjust opacity + bool invisiblePhase = SecondaryAIState == (float)SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Rotation and direction + npc.rotation = npc.velocity.ToRotation() + MathHelper.PiOver2; + int direction = npc.direction; + npc.direction = npc.spriteDirection = (npc.velocity.X > 0f) ? 1 : (-1); + if (direction != npc.direction) + npc.netUpdate = true; + + // Default vector to fly to + Vector2 destination = player.Center; + + // Charge variables + float turnDistance = baseTurnDistance; + float chargeLocationDistance = turnDistance * 0.2f; + + // Laser Barrage variables + Vector2 laserBarrageLocation = new Vector2(0f, baseDistance); + float laserBarrageLocationDistance = turnDistance * 5f; + + // Velocity and turn speed values + float baseVelocity = 9f; + float turnSpeed = MathHelper.ToRadians(1f); + float chargeVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); + float chargeTurnSpeedMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); + float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); + float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 8f, chargeVelocityScalar); + float invisiblePhaseVelocityMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); + float invisiblePhaseTurnSpeedMult = MathHelper.Lerp(1f, 12f, chargeVelocityScalar); + + // Base scale on total time spent in phase + float chargeVelocityScalarIncrement = 1f / speedUpTime; + float chargeVelocityScalarDecrement = 1f / slowDownTime; + + // Scalar to use during laser barrage, passive and immune phases + float laserBarrageVelocityScalarIncrement = 0.01f; + float laserBarrageVelocityScalarDecrement = 1f / velocityAdjustTime; + + // Passive and Immune phases + switch ((int)SecondaryAIState) + { + case (int)SecondaryPhase.Nothing: + + // Spawn the other mechs if Thanatos is first + if (otherExoMechsAlive == 0) + { + if (phase2 && !berserk) + { + SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + // Spawn code here + } + } + } + else + { + // If not spawned first, go to passive state if any other mech is passive or if Thanatos is under 70% life + // Do not run this if berserk + // Do not run this if any exo mech is dead + if ((anyOtherExoMechPassive || lessThan70PercentLife) && !berserk && totalOtherExoMechLifeRatio < 5f) + { + // Tells Thanatos to return to the battle in passive state + SecondaryAIState = (float)SecondaryPhase.Passive; + } + + // Go passive and immune if one of the other mechs is berserk + // This is only called if two exo mechs are alive + if (otherMechIsBerserk) + SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; + } + + break; + + // Fly underneath target and fire lasers + case (int)SecondaryPhase.Passive: + + // Fire lasers while passive + AIState = (float)Phase.UndergroundLaserBarrage; + + // Enter passive and invincible phase if one of the other exo mechs is berserk + if (otherMechIsBerserk) + SecondaryAIState = (float)SecondaryPhase.PassiveAndImmune; + + // If Thanatos is the first mech to go berserk + if (berserk) + { + // Reset + AIState = (float)Phase.Charge; + + // Never be passive if berserk + SecondaryAIState = (float)SecondaryPhase.Nothing; + } + + break; + + // Fly underneath target and become immune + case (int)SecondaryPhase.PassiveAndImmune: + + // Fire lasers while passive + AIState = (float)Phase.UndergroundLaserBarrage; + + // Enter the fight again if any of the other exo mechs is below 70% and the other mechs aren't berserk + if ((exoPrimeLifeRatio < 0.7f || exoSpazLifeRatio < 0.7f || exoRetLifeRatio < 0.7f) && !otherMechIsBerserk) + { + // Tells Thanatos to return to the battle in passive state + // Return to normal phases if one or more mechs have been downed + SecondaryAIState = totalOtherExoMechLifeRatio > 5f ? (float)SecondaryPhase.Nothing : (float)SecondaryPhase.Passive; + } + + if (berserk) + { + // Reset + AIState = (float)Phase.Charge; + + // Never be passive if berserk + SecondaryAIState = (float)SecondaryPhase.Nothing; + } + + break; + } + + // Attacking phases + switch ((int)AIState) + { + // Fly towards target and gain velocity over time + case (int)Phase.Charge: + + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 0f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar >= 1f) + { + chargeVelocityScalar = 1f; + calamityGlobalNPC.newAI[3] = 1f; + } + } + else + { + chargeVelocityScalar -= chargeVelocityScalarDecrement; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + } + + baseVelocity *= chargeVelocityMult; + turnSpeed *= chargeTurnSpeedMult; + turnDistance = chargeLocationDistance; + + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) + { + AIState = npc.localAI[0] == 1f ? (float)Phase.Deathray : (float)Phase.UndergroundLaserBarrage; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + + break; + + // Fly below and summon barrages of lasers + case (int)Phase.UndergroundLaserBarrage: + + // Fly down + destination += laserBarrageLocation; + turnDistance = laserBarrageLocationDistance; + + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 0f) + { + chargeVelocityScalar += laserBarrageVelocityScalarIncrement; + if (chargeVelocityScalar > 1f) + chargeVelocityScalar = 1f; + } + + baseVelocity *= laserBarragePhaseVelocityMult; + turnSpeed *= laserBarragePhaseTurnSpeedMult; + + if ((destination - npc.Center).Length() < laserBarrageLocationDistance || calamityGlobalNPC.newAI[2] > 0f) + { + calamityGlobalNPC.newAI[2] += 1f; + + if (SecondaryAIState != (float)SecondaryPhase.Passive && SecondaryAIState != (float)SecondaryPhase.PassiveAndImmune) + { + if (calamityGlobalNPC.newAI[2] >= laserBarrageDuration) + { + // Use a lerp to smoothly scale down velocity and turn speed + chargeVelocityScalar -= laserBarrageVelocityScalarDecrement; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= velocityAdjustTime) + { + npc.localAI[0] = 1f; + AIState = (float)Phase.Charge; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + } + } + } + + break; + + // Move close to target, reduce velocity and increase turn speed when close enough, create telegraph beams, reduce turn speed, fire deathray + case (int)Phase.Deathray: + + // Head is vulnerable while charging and firing deathray + vulnerable = true; + + // Use a lerp to smoothly scale up velocity and turn speed + if (calamityGlobalNPC.newAI[3] == 0f) + { + chargeVelocityScalar += chargeVelocityScalarIncrement; + if (chargeVelocityScalar >= 1f) + { + chargeVelocityScalar = 1f; + calamityGlobalNPC.newAI[3] = 1f; + } + } + else + { + chargeVelocityScalar -= chargeVelocityScalarDecrement; + if (chargeVelocityScalar < 0f) + chargeVelocityScalar = 0f; + } + + baseVelocity *= chargeVelocityMult; + turnSpeed *= chargeTurnSpeedMult; + turnDistance = chargeLocationDistance; + + calamityGlobalNPC.newAI[2] += 1f; + if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) + { + AIState = (float)Phase.UndergroundLaserBarrage; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + + break; + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[1] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[1] < maxSteamTime) + { + npc.localAI[1] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[1] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[1] = 0f; + + // Increase velocity if velocity is ever zero + if (npc.velocity == Vector2.Zero) + npc.velocity = Vector2.Normalize(player.Center - npc.Center).SafeNormalize(Vector2.Zero) * baseVelocity; + + // Acceleration + if (!((destination - npc.Center).Length() < turnDistance)) + { + float targetAngle = npc.AngleTo(destination); + float f = npc.velocity.ToRotation().AngleTowards(targetAngle, turnSpeed); + npc.velocity = f.ToRotationVector2() * baseVelocity; + } + + // Velocity upper limit + if (npc.velocity.Length() > baseVelocity) + npc.velocity = npc.velocity.SafeNormalize(Vector2.Zero) * baseVelocity; + + // Reduce Y velocity if it's less than 1 + if (Math.Abs(npc.velocity.Y) < 1f) + npc.velocity.Y -= 0.1f; + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 50f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) + { + scale = 1.5f; + return null; + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + if (AIState == (float)Phase.Charge || AIState == (float)Phase.UndergroundLaserBarrage) + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override void NPCLoot() + { + /*DropHelper.DropItem(npc, ModContent.ItemType(), 80, 100); + DropHelper.DropItem(npc, ModContent.ItemType()); + DropHelper.DropItem(npc, ModContent.ItemType()); + DropHelper.DropItem(npc, ModContent.ItemType()); + + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas, 1, 50, 108); + DropHelper.DropItemCondition(npc, ModContent.ItemType(), CalamityWorld.downedCalamitas && Main.expertMode, 2, 15, 27); + DropHelper.DropItemCondition(npc, ItemID.Ectoplasm, NPC.downedPlantBoss, 1, 21, 32);*/ + } + + public override void HitEffect(int hitDirection, double damage) + { + for (int k = 0; k < 3; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosHead"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosHead2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosHead3"), 1f); + } + } + + public override bool CheckActive() => false; + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 180 : 90; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png b/NPCs/ExoMechs/Thanatos/ThanatosHeadGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..b4a0e95b3b9e2a11f1cd52fb7c8622695c66eb65 GIT binary patch literal 9588 zcmeI2S5#BcyX{E`5Kux95Tyk{L7Eil0-;wSQl*MSQRxr@LJ$L?NRKoTDG}+_NG}lq zDFV`@cMyz(4pNkMqvt%_G49hH-w4-CFi*Q~qboI4pk|N() zluAGC7N}lnTYUS1_7cXd%-IHyWuYb5qTxpY{qHS(bxBT>A`tFI%dUD@ONOW})Mk&(t03*2Y_N5_k zDL9UX*=;Grfhl)~kHhYF@e;BKpUR`@;hhZl4MUX?O;J zUO%}BU{6XM1px2hPEYrVd2Ks6qFGk!6JU?4$=qh8qZniG_NAX=ztb4ACJL!gXGNl|30N#P?~8uT-^mv4Fg-ezi+wGdQ1_&Lx8Y(}i_zbA z+q1K>Br-3y|B5RYWX7?lU-58RUM&r-PgN1IfR_Mybfv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~Sw=KeZ)YJ1ztL`)ccS2rvB_k8X!ubpZ@oAQR(NY%6D_$`$^ z=eFpTz0#+y{~~mOU902<9)_t}ZsB`pigH_C;MfT+m+e!dV)M2#EKV4p=xrdz_}kb_ z(Ha-26szvD_Hz5^r2EY7U%2mcXTQj94K+BV|JTLOHb=12PJ2g7>7MdId~vLBpebeV z8M!240vGTWn!0T!1o?VWN2QC&NZm#!-cFsqP$V#Kr+yQe6?g~d2Z^e&aRQ`EU(W~lkUwP+P6#((DCZRi@xBeU@I<0Gg(LwhKOb|1 zV|sH(=#5}XO6l7CP?;wv;00WKyz?D!myu28Cs6LYch+qG$MoYf=QQ%H7Nn?|@;4Qg NzP7PexrSrt{{kS**Gm8Z literal 0 HcmV?d00001 diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs new file mode 100644 index 0000000000..540155fdc1 --- /dev/null +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -0,0 +1,508 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Projectiles.Boss; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.ExoMechs.Thanatos +{ + public class ThanatosTail : ModNPC + { + // Whether the tail is venting heat or not, it is vulnerable to damage during venting + private bool vulnerable = false; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos"); + Main.npcFrameCount[npc.type] = 5; + } + + public override void SetDefaults() + { + npc.Calamity().canBreakPlayerDefense = true; + npc.npcSlots = 5f; + npc.GetNPCDamage(); + npc.width = 84; + npc.height = 118; + npc.defense = 120; + npc.DR_NERD(0.99f); + npc.Calamity().unbreakableDR = true; + npc.LifeMaxNERB(1000000, 1150000); + double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; + npc.lifeMax += (int)(npc.lifeMax * HPBoost); + 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; + npc.chaseable = false; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(npc.chaseable); + writer.Write(npc.dontTakeDamage); + writer.Write(vulnerable); + writer.Write(npc.localAI[0]); + writer.Write(npc.localAI[1]); + for (int i = 0; i < 4; i++) + writer.Write(npc.Calamity().newAI[i]); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + npc.chaseable = reader.ReadBoolean(); + npc.dontTakeDamage = reader.ReadBoolean(); + vulnerable = reader.ReadBoolean(); + npc.localAI[0] = reader.ReadSingle(); + npc.localAI[1] = reader.ReadSingle(); + for (int i = 0; i < 4; i++) + npc.Calamity().newAI[i] = reader.ReadSingle(); + } + + public override bool? DrawHealthBar(byte hbPosition, ref float scale, ref Vector2 position) => false; + + public override void AI() + { + if (npc.ai[2] > 0f) + npc.realLife = (int)npc.ai[2]; + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + shouldDespawn = false; + } + if (!shouldDespawn) + { + if (npc.ai[1] > 0f) + shouldDespawn = false; + else if (Main.npc[(int)npc.ai[1]].life > 0) + shouldDespawn = false; + } + if (shouldDespawn) + { + npc.life = 0; + npc.HitEffect(0, 10.0); + npc.checkDead(); + npc.active = false; + } + + // Set vulnerable to false by default + vulnerable = false; + + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + + bool invisiblePhase = calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; + npc.dontTakeDamage = invisiblePhase; + if (!invisiblePhase) + { + if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) + { + npc.Opacity += 0.15f; + if (npc.Opacity > 1f) + npc.Opacity = 1f; + } + } + else + { + npc.Opacity -= 0.05f; + if (npc.Opacity < 0f) + npc.Opacity = 0f; + } + + // Set timer to whoAmI so that segments don't all fire lasers at the same time + if (npc.localAI[2] == 0f) + npc.localAI[2] = npc.ai[0]; + + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) + { + float divisor = 180f; + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float laserVelocity = 12f; + for (int i = 0; i < numProjectiles; i++) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + else + { + npc.ai[3] += 1f; + float shootProjectile = 60f; + float timer = npc.ai[0] + 15f; + float divisor = timer + shootProjectile; + if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) + { + // Body is vulnerable while firing lasers + vulnerable = true; + + if (npc.Calamity().newAI[1] == 0f) + { + npc.Calamity().newAI[0] += 1f; + if (npc.Calamity().newAI[0] >= 72f) + { + npc.Calamity().newAI[1] = 1f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxTargets = 3; + int[] whoAmIArray = new int[maxTargets]; + Vector2[] targetCenterArray = new Vector2[maxTargets]; + int numProjectiles = 0; + float maxDistance = 2400f; + + for (int i = 0; i < Main.maxPlayers; i++) + { + if (!Main.player[i].active || Main.player[i].dead) + continue; + + Vector2 playerCenter = Main.player[i].Center; + float distance = Vector2.Distance(playerCenter, npc.Center); + if (distance < maxDistance) + { + whoAmIArray[numProjectiles] = i; + targetCenterArray[numProjectiles] = playerCenter; + int projectileLimit = numProjectiles + 1; + numProjectiles = projectileLimit; + if (projectileLimit >= targetCenterArray.Length) + break; + } + } + + float predictionAmt = 20f; + float laserVelocity = 12f; + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); + for (int i = 0; i < numProjectiles; i++) + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + } + } + } + } + } + else + { + // Set alternating laser-firing body segments every 3 seconds + npc.localAI[1] += 1f; + if (npc.localAI[1] >= 180f) + { + npc.localAI[1] = 0f; + npc.localAI[2] += 1f; + } + + npc.Calamity().newAI[0] -= 1f; + if (npc.Calamity().newAI[0] <= 0f) + { + npc.Calamity().newAI[0] = 0f; + npc.Calamity().newAI[1] = 0f; + } + else + { + // Body is vulnerable while venting + vulnerable = true; + } + } + + // Homing only works if vulnerable is true + npc.chaseable = vulnerable; + + // Adjust DR based on vulnerable + npc.Calamity().DR = vulnerable ? 0f : 0.99f; + npc.Calamity().unbreakableDR = !vulnerable; + + // Vent noise and steam + if (vulnerable) + { + // Noise + if (npc.localAI[0] == 0f) + Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Custom, "Sounds/Custom/ThanatosVent"), npc.Center); + + // Steam + float maxSteamTime = 180f; + int maxGores = 4; + if (npc.localAI[0] < maxSteamTime) + { + npc.localAI[0] += 1f; + int goreAmt = maxGores - (int)Math.Round(npc.localAI[0] / 60f); + CalamityUtils.ExplosionGores(npc.Center, goreAmt, true, npc.velocity); + } + } + else + npc.localAI[0] = 0f; + + Vector2 vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + float num191 = Main.player[npc.target].position.X + (Main.player[npc.target].width / 2); + float num192 = Main.player[npc.target].position.Y + (Main.player[npc.target].height / 2); + num191 = (int)(num191 / 16f) * 16; + num192 = (int)(num192 / 16f) * 16; + vector18.X = (int)(vector18.X / 16f) * 16; + vector18.Y = (int)(vector18.Y / 16f) * 16; + num191 -= vector18.X; + num192 -= vector18.Y; + + float num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) + { + try + { + vector18 = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); + num191 = Main.npc[(int)npc.ai[1]].position.X + (Main.npc[(int)npc.ai[1]].width / 2) - vector18.X; + num192 = Main.npc[(int)npc.ai[1]].position.Y + (Main.npc[(int)npc.ai[1]].height / 2) - vector18.Y; + } catch + { + } + + npc.rotation = (float)Math.Atan2(num192, num191) + MathHelper.PiOver2; + num193 = (float)Math.Sqrt(num191 * num191 + num192 * num192); + int num194 = npc.width; + num193 = (num193 - num194) / num193; + num191 *= num193; + num192 *= num193; + npc.velocity = Vector2.Zero; + npc.position.X = npc.position.X + num191; + npc.position.Y = npc.position.Y + num192; + + if (num191 < 0f) + npc.spriteDirection = -1; + else if (num191 > 0f) + npc.spriteDirection = 1; + } + } + + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 45f && npc.Opacity == 1f; + } + + public override bool StrikeNPC(ref double damage, int defense, ref float knockback, int hitDirection, ref bool crit) + { + return !CalamityUtils.AntiButcher(npc, ref damage, 0.5f); + } + + public override void FindFrame(int frameHeight) // 5 total frames + { + // Swap between venting and non-venting frames + CalamityGlobalNPC calamityGlobalNPC_Head = Main.npc[(int)npc.ai[2]].Calamity(); + bool shootTrackingLasers = (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge || calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.UndergroundLaserBarrage) && calamityGlobalNPC_Head.newAI[2] > 0f; + if (shootTrackingLasers) + { + npc.frameCounter += 1D; + if (npc.Calamity().newAI[1] == 0f) + { + if (npc.frameCounter >= 12D) + { + npc.frame.Y += frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y >= frameHeight * Main.npcFrameCount[npc.type]) + npc.frame.Y = frameHeight * Main.npcFrameCount[npc.type]; + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + else + { + npc.frameCounter += 1D; + if (npc.frameCounter >= 12D) + { + npc.frame.Y -= frameHeight; + npc.frameCounter = 0D; + } + if (npc.frame.Y < 0) + npc.frame.Y = 0; + } + } + + public override void PostDraw(SpriteBatch spriteBatch, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (npc.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture = Main.npcTexture[npc.type]; + Vector2 vector = new Vector2(Main.npcTexture[npc.type].Width / 2, Main.npcTexture[npc.type].Height / Main.npcFrameCount[npc.type] / 2); + + Vector2 center = npc.Center - Main.screenPosition; + center -= new Vector2(texture.Width, texture.Height / Main.npcFrameCount[npc.type]) * npc.scale / 2f; + center += vector * npc.scale + new Vector2(0f, 4f + npc.gfxOffY); + spriteBatch.Draw(texture, center, npc.frame, npc.GetAlpha(drawColor), npc.rotation, vector, npc.scale, spriteEffects, 0f); + + texture = ModContent.GetTexture("CalamityMod/NPCs/ExoMechs/Thanatos/ThanatosTailGlow"); + spriteBatch.Draw(texture, center, npc.frame, Color.White * npc.Opacity, npc.rotation, vector, npc.scale, spriteEffects, 0f); + } + + public override bool CheckActive() => false; + + public override bool PreNPCLoot() => false; + + public override void HitEffect(int hitDirection, double damage) + { + int baseDust = vulnerable ? 3 : 1; + for (int k = 0; k < baseDust; k++) + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1f); + + if (npc.life <= 0) + { + for (int num193 = 0; num193 < 2; num193++) + { + Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + } + for (int num194 = 0; num194 < 20; num194++) + { + int num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 0, new Color(0, 255, 255), 2.5f); + Main.dust[num195].noGravity = true; + Main.dust[num195].velocity *= 3f; + num195 = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y), npc.width, npc.height, 107, 0f, 0f, 100, new Color(0, 255, 255), 1.5f); + Main.dust[num195].velocity *= 2f; + Main.dust[num195].noGravity = true; + } + + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail2"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail3"), 1f); + Gore.NewGore(npc.position, npc.velocity, mod.GetGoreSlot("Gores/Thanatos/ThanatosTail4"), 1f); + } + } + + public override void ScaleExpertStats(int numPlayers, float bossLifeScale) + { + npc.lifeMax = (int)(npc.lifeMax * 0.8f * bossLifeScale); + npc.damage = (int)(npc.damage * npc.GetExpertDamageMultiplier()); + } + + public override void OnHitPlayer(Player player, int damage, bool crit) + { + if (npc.Opacity == 1f) + { + int duration = vulnerable ? 60 : 30; + player.AddBuff(BuffID.Ichor, duration); + player.AddBuff(BuffID.CursedInferno, duration); + player.AddBuff(ModContent.BuffType(), duration / 4); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(ModContent.BuffType(), duration); + player.AddBuff(BuffID.Frostburn, duration); + player.AddBuff(BuffID.OnFire, duration); + } + } + } +} diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png b/NPCs/ExoMechs/Thanatos/ThanatosTailGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..54a5e2ecaf5f7a14ed60f6be4aa8498e7e1dbc0a GIT binary patch literal 5673 zcmdUzX*iVq+s7G8#N^JtE3#!vw(QGgo%^l-BX=P#QQa7YfouY!OYQb4%vS*;$vp5F} zS=w{;Gn~avsvpyAC3e_?F1x+p0O76)wo%=Fs=A+Qkd6}nlbwWoMp;ls5Ao}nc_YQPY zP}kCIh@Yz(nZup6?Dubm6~AL0J1xPeOxp56W@8g?0!;s@eWZH?3Wa=FpeS&v=@0g~ z*oBPoB1%t>+|7b{U6C0$lBfG;oPV0w_XYpuNG=P0C_fbW;Et_C0&Eu)IIsg|%Qx>y zff4qTZf_EOhtI_>AIB$6)Q*|E__Qg7uap_~ILrsu;vHDwU+chAoZe?nz{@|J5BM0> zYL!f>pCFXB?n_JR9YZZdu2UL)CG5KgiH95iWKYkFpA$5AuOoEutS11QW^`CwLRp^* z-0N@-4sxqv#~GX?A$`U#o~j+v5e$$W3{+Zk`$@8L-l-=CI`R^ITt@OH77w!$iSa+` z=(`mSe2$;I$12*6&Iv^Y;jo}N@dN|XXGlt9)B=$xLtmMHTtjW%C3{%!HJH99CV!i6 zx`FS_jy(+-bgvmm{b%dy5m8;93}uC9Sm;7|m$tUDw4(ZZQwW)B;^H~4#nIbEHeV03 z)zt1c;~8UEEYqQoZH1a^y5dBHjl=2hrOOlbd|4Z0CpeF1J^Ge$ag8f=cv;DtoH!nB zIU(at_w0GG62w3g1X1HRnS6{NsnoJ1&vofA)Lg3Cie6%mr}Et7q+9mOF(|8)1pGWS z$=Wk=yCdSuBhn?R`XXg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3UOVyBRS8RStMA)jx&>iPw1s=$Bf(_LO2w$u;IJ zPxyda=Q*?|FLo9adr$9ae7*EOa8OV$^|>Ob*tqh&5F*7X)Kmk$>A3-5>5LXclX6JQ zh3=zure?wcE;?LS- 2) - { projectile.frame = 0; - } + if (projectile.velocity.X < 0f) { projectile.spriteDirection = -1; @@ -52,14 +51,14 @@ namespace CalamityMod.Projectiles.Boss projectile.spriteDirection = 1; projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); } + Lighting.AddLight(projectile.Center, 0.3f, 0.3f, 0f); + projectile.ai[0] += 1f; if (projectile.ai[0] > 9f) { if (projectile.alpha > 0) - { projectile.alpha -= 5; - } } } diff --git a/Projectiles/Boss/ExoDestroyerLaser.cs b/Projectiles/Boss/ExoDestroyerLaser.cs new file mode 100644 index 0000000000..883a397ace --- /dev/null +++ b/Projectiles/Boss/ExoDestroyerLaser.cs @@ -0,0 +1,176 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using System; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class ExoDestroyerLaser : ModProjectile + { + public float TelegraphDelay + { + get => projectile.ai[0]; + set => projectile.ai[0] = value; + } + + public Vector2 OldVelocity; + public const float TelegraphTotalTime = 30f; + public const float TelegraphFadeTime = 15f; + public const float TelegraphWidth = 4200f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Death Beam"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.Calamity().canBreakPlayerDefense = true; + projectile.width = 22; + projectile.height = 22; + projectile.hostile = true; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.timeLeft = 300; + cooldownSlot = 1; + } + + 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; + } + + projectile.frameCounter++; + if (projectile.frameCounter > 8) + { + projectile.frame++; + projectile.frameCounter = 0; + } + if (projectile.frame > 3) + projectile.frame = 0; + + Lighting.AddLight(projectile.Center, 0.6f, 0f, 0f); + + // Fade in after telegraphs have faded. + if (TelegraphDelay > TelegraphTotalTime) + { + if (projectile.alpha > 0) + projectile.alpha -= 25; + if (projectile.alpha < 0) + projectile.alpha = 0; + + // 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 * (CalamityWorld.malice ? 1.25f : 1f); + OldVelocity = Vector2.Zero; + projectile.netUpdate = true; + } + + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)projectile.velocity.Y, (double)-(double)projectile.velocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + } + // 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; + + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)OldVelocity.Y, (double)-(double)OldVelocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)OldVelocity.Y, (double)OldVelocity.X); + } + } + + TelegraphDelay++; + } + + public override bool CanHitPlayer(Player target) => TelegraphDelay > TelegraphTotalTime; + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + if (TelegraphDelay > TelegraphTotalTime) + { + target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(BuffID.OnFire, 180); + } + } + + public override Color? GetAlpha(Color lightColor) + { + return new Color(255, 255, 255, projectile.alpha); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + target.Calamity().lastProjectileHit = projectile; + } + + 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, 2.2f); + + Color colorOuter = Color.Lerp(Color.Red, Color.Crimson, TelegraphDelay / TelegraphTotalTime * 2f % 1f); // Iterate through crimson and red 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/ExoDestroyerLaser.png b/Projectiles/Boss/ExoDestroyerLaser.png index ea6357a3f255913f5f010b510340ba9965e53414..49cdca1d74004737b68cb126c804199f68e2b41d 100644 GIT binary patch delta 625 zcmV-%0*?Lg2$ltq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w7_T3gG;645rcu_+!jw|}y&JWQ+kM6`|lwk;mmwyi3LylsUe37Mjk;mK(L!0GFEBkza5+Yqa7Hdn=SO$}sY zi70IKcLA%byBc+@%v1x}SR%;U*j{T>Rdj8vqr%1#K_18Ec};o9+tV|} zv40X>Jj=!sQChCRm0r&+u(3qMSAW~?TfkYZRM=P|tjE0k-6jCw@aZF~b^U{Cs)UUt zLOa_qWhaV(9?PK4reEhLu(3pF+t{qT8Tp%Q z0D!|M4+Eehk12OCnw^iFZ#zFhUE|vA27j}$L}c%I5tA|^QRr?%uIRE}Y81uB5|K3K z6&@=0r6iMKEREFY4rAr}6SmyIPNDJtj+Qzc_d&jC1@>$FE<0VJBs#uAZaZ1TFV zsxYsNtSWbr`aZF-MD$D?J3Kk<0l>en&BXJ|?unV=SvHmk_f<2RT!ES+kl60}9!N9v z;w53|=k>_(ZqE@&*jOS8`$ko>PvQPotvqb)iXk5x=4GS*y{K0VRbgWphGCeV<3G?g V&(BsB1494+002ovPDHLkV1gPh9t8jZ diff --git a/Sounds/Custom/ThanatosVent.ogg b/Sounds/Custom/ThanatosVent.ogg new file mode 100644 index 0000000000000000000000000000000000000000..df12e263a28666342664a38f869aa03724ddc8a3 GIT binary patch literal 45642 zcmeFZXHZm4wvxBvD#J=HdeE;Z-CZ7(8*KaDCvI(^yffFX5NZeMzb9-F`v6D2nwgUt|5uBXBf z@vnvhk!2gpQJQ5t%uz<`GYT7kh7n5amZa*);c%4bsBu=5r0J>g%$xZfy~XPd5{y3LFsbf5$)fq?9GhzN5g{v%BC`U%md!s%05B^K2plQ3Io0x zLum#>O%{0nG6Kr%s3Jqgt*9?GkSaAnCOk1CG)AVWE2KH|KdAcTA%FY@B?v>lV}>gn zTQJGyk6Pd;vXCNddHlbePzcdQo6wxeoNr^|ggIM<738@y?_&&d+1e_ya(%|dckq`k6yJXuoIma( zgR+~=BBVb*6dIHWwk2mMWk{v>eLcPH9oj{MVoV zIJ2R#pNDDY0p}iU+Q1cQIY_+;q)g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&Rt13z{p=Y z{m93G{(`vm_b|odQ3PNY%9rP@Z50Y~gK;%Sa>NGD1NtyFNy^KWqY=DQFE4Ret{i*c zck9)F-AmD<;#uNHw*M@@COJCcRdr>C{&j(x8xOQsKVS1@%>RD$HviUOc2aI9#PWm# zMae}8VCvSt(05_#9D6-8Idc^223%Nv@#5<9Ax${X`n&H7M$do#+}b^L{caPDR#5$P zzxUizruGl`;P^sHD`R|447-8dKNQM)T3- z)%NZ?p!$uRH_9!O@iD})6A@Wu31{xUXR~z3ZC3v9aX0peHjm!K&r(ggc))Wf4!lia e9e5z}`s5N@F>vC9jZrl#DR~i<;}#Dlf&UMkW5Hzr literal 0 HcmV?d00001 diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 3bb3f425db..225fe71371 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -221,34 +221,53 @@ namespace CalamityMod /// /// The spot to spawn the explosion clouds /// Number of times it loops to spawn gores - public static void ExplosionGores(Vector2 goreSource, int goreAmt) + public static void ExplosionGores(Vector2 goreSource, int goreAmt, bool thanatos = false, Vector2 thanatosVelocity = default) { Vector2 source = new Vector2(goreSource.X - 24f, goreSource.Y - 24f); for (int goreIndex = 0; goreIndex < goreAmt; goreIndex++) { float velocityMult = 0.33f; - if (goreIndex < (int)(goreAmt / 3)) + if (goreIndex < (goreAmt / 3)) { velocityMult = 0.66f; } - if (goreIndex >= (int)((2 * goreAmt) / 3)) + if (goreIndex >= (2 * goreAmt / 3)) { velocityMult = 1f; } int smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); Gore gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y += 1f; smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X -= 1f; gore.velocity.Y += 1f; smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y -= 1f; smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + gore = Main.gore[smoke]; + if (thanatos) + { + gore.velocity = thanatosVelocity * -0.5f; + } gore.velocity *= velocityMult; gore.velocity.X -= 1f; gore.velocity.Y -= 1f; diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index 5595c9949f..fa7cdb4daa 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -11,6 +11,7 @@ using CalamityMod.NPCs.Crabulon; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; @@ -283,6 +284,11 @@ namespace CalamityMod { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 } }; @@ -538,6 +544,11 @@ namespace CalamityMod { ModContent.NPCType(), new int[] { 350, 560, 592, 608, 768 } }, + { ModContent.NPCType(), new int[] { 400, 640, 680, 704, 864 } }, + { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, + { ModContent.NPCType(), new int[] { 330, 528, 560, 576, 690 } }, + { ModContent.NPCType(), new int[] { 260, 416, 446, 464, 570 } }, + { ModContent.NPCType(), new int[] { 400, 800, 850, 880, 1000 } } }; @@ -793,6 +804,10 @@ namespace CalamityMod { 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[] { 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[] { 350, 528, 556, 572, 834 } }, + { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossIceMist), new int[] { 400, 600, 632, 648, 948 } }, { new Tuple(ModContent.NPCType(), ProjectileID.CultistBossLightningOrbArc), new int[] { 500, 752, 788, 808, 1182 } }, { new Tuple(ModContent.NPCType(), ProjectileID.AncientDoomProjectile), new int[] { 400, 600, 632, 648, 948 } }, diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index ce503fd015..95122e2a88 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -216,6 +216,10 @@ namespace CalamityMod.World CalamityGlobalNPC.fireEye = -1; CalamityGlobalNPC.brimstoneElemental = -1; CalamityGlobalNPC.signus = -1; + CalamityGlobalNPC.draedonExoMechPrime = -1; + CalamityGlobalNPC.draedonExoMechTwinGreen = -1; + CalamityGlobalNPC.draedonExoMechTwinRed = -1; + CalamityGlobalNPC.draedonExoMechWorm = -1; BossRushEvent.BossRushStage = 0; DoGSecondStageCountdown = 0; ArmoredDiggerSpawnCooldown = 0; @@ -1625,7 +1629,7 @@ namespace CalamityMod.World if (modPlayer.ZoneAbyss) { - if (player.chaosState) + if (player.chaosState && !player.dead) { if (!NPC.AnyNPCs(ModContent.NPCType()) && Main.netMode != NetmodeID.MultiplayerClient) NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); From 17e2763ac0aa1459618898bac6032dddf1a0826f Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 12:55:26 -0500 Subject: [PATCH 073/103] 1 - MORE THANATOS EDGE CASE FIXES --- CalamityLists.cs | 6 +++++- CalamityMod.cs | 9 +++++++++ NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 4 +++- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 4 +++- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 4 +++- Projectiles/Typeless/YanmeisKnifeSlash.cs | 7 ++++++- UI/BossHealthBarManager.cs | 8 ++++++-- Utilities/NPCDebuffs.cs | 6 ++++++ 8 files changed, 41 insertions(+), 7 deletions(-) diff --git a/CalamityLists.cs b/CalamityLists.cs index ff5a841a25..b69cffaa63 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -35,6 +35,7 @@ using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; @@ -1717,7 +1718,10 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), - }; + NPCType(), + NPCType(), + NPCType() + }; needsDebuffIconDisplayList = new List() { diff --git a/CalamityMod.cs b/CalamityMod.cs index 4b4fa6982b..d333d5ba40 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -22,6 +22,7 @@ using CalamityMod.NPCs.Crabulon; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.HiveMind; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.OldDuke; @@ -576,6 +577,10 @@ namespace CalamityMod { ModContent.NPCType(), 9000 }, { ModContent.NPCType(), 15300 }, { ModContent.NPCType(), 18000 }, + { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, + { ModContent.NPCType(), 21600 }, { ModContent.NPCType(), 18000 } }; } @@ -700,6 +705,10 @@ namespace CalamityMod { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), velocityScaleMin }, + { ModContent.NPCType(), bitingEnemeyVelocityScale }, + { ModContent.NPCType(), velocityScaleMin }, + { ModContent.NPCType(), velocityScaleMin }, + { ModContent.NPCType(), velocityScaleMin }, { ModContent.NPCType(), bitingEnemeyVelocityScale } }; } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index fdde948722..b2fb74805f 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -47,7 +47,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.dontCountMe = true; npc.chaseable = false; - } + npc.boss = true; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } public override void SendExtraAI(BinaryWriter writer) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index b0dc7b8444..32274e0fde 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -47,7 +47,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.dontCountMe = true; npc.chaseable = false; - } + npc.boss = true; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } public override void SendExtraAI(BinaryWriter writer) { diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 540155fdc1..0de8ece2f3 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -47,7 +47,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.netAlways = true; npc.dontCountMe = true; npc.chaseable = false; - } + npc.boss = true; + music = /*CalamityMod.Instance.GetMusicFromMusicMod("AdultEidolonWyrm") ??*/ MusicID.Boss3; + } public override void SendExtraAI(BinaryWriter writer) { diff --git a/Projectiles/Typeless/YanmeisKnifeSlash.cs b/Projectiles/Typeless/YanmeisKnifeSlash.cs index 395cc272fe..346fbfc9d2 100644 --- a/Projectiles/Typeless/YanmeisKnifeSlash.cs +++ b/Projectiles/Typeless/YanmeisKnifeSlash.cs @@ -4,6 +4,7 @@ using CalamityMod.Events; using CalamityMod.NPCs.AstrumDeus; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using Microsoft.Xna.Framework; using System; using Terraria; @@ -20,7 +21,11 @@ namespace CalamityMod.Projectiles.Typeless bool validBoss = npc.boss && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() && npc.type != ModContent.NPCType() - && npc.type != ModContent.NPCType(); + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType() + && npc.type != ModContent.NPCType(); if (validBoss) return true; bool bossMinion = CalamityLists.bossMinionList.Contains(npc.type); diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 911cf039d8..08e7c65b0f 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -6,6 +6,7 @@ using CalamityMod.NPCs.Calamitas; using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.DesertScourge; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.GreatSandShark; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.Perforator; @@ -192,8 +193,11 @@ namespace CalamityMod.UI ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType(), - ModContent.NPCType() - }; + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType(), + ModContent.NPCType() + }; } private static void SetupMinibossHPBarList() diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index 5b71b20055..310a8bcd45 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -12,6 +12,7 @@ using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.Crags; using CalamityMod.NPCs.Cryogen; using CalamityMod.NPCs.DevourerofGods; +using CalamityMod.NPCs.ExoMechs.Thanatos; using CalamityMod.NPCs.Leviathan; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.OldDuke; @@ -194,6 +195,11 @@ namespace CalamityMod { ModContent.NPCType(), new Tuple(true, new int[] { }) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(true, new int[] { }) }, + { ModContent.NPCType(), new Tuple(false, CalamityMod.abyssEnemyImmunities) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, { ModContent.NPCType(), new Tuple(true, new int[] { }) }, From b0fe0b9bb4ebd4a048d4c46d96d1e0522fab3be8 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 14:00:44 -0500 Subject: [PATCH 074/103] 1 - Vent bs. --- Gores/Thanatos/ThanatosVentParticle1.png | Bin 0 -> 268 bytes Gores/Thanatos/ThanatosVentParticle2.png | Bin 0 -> 259 bytes Gores/Thanatos/ThanatosVentParticle3.png | Bin 0 -> 254 bytes NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 33 ++++++++++++++++------- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 33 ++++++++++++++++------- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 33 ++++++++++++++++------- NPCs/SlimeGod/SlimeGodCore.cs | 1 - Utilities/MiscUtils.cs | 14 +++++++--- World/WorldGenerationMethods.cs | 1 - 9 files changed, 79 insertions(+), 36 deletions(-) create mode 100644 Gores/Thanatos/ThanatosVentParticle1.png create mode 100644 Gores/Thanatos/ThanatosVentParticle2.png create mode 100644 Gores/Thanatos/ThanatosVentParticle3.png diff --git a/Gores/Thanatos/ThanatosVentParticle1.png b/Gores/Thanatos/ThanatosVentParticle1.png new file mode 100644 index 0000000000000000000000000000000000000000..ec84d9232c5259734bd986fe5a6b8218a2c2a272 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}$2?seLn2z= zPInY)P~dRg?;HO4irhIf%cYGTPY)d0pLvYyN#hE}rXa7k0e15pe|=vkp=`M?v**kN ziKD#^X?C2=?-^}8e<(UUnH3z(9P?z2{sW~%zXbJTOSG=L-P@Y&m#~Cw%S684EH;7~ zQW4+lf1YVzX4;+f_y1ak3WbLBb)mcGI4y}4XR+A(wqlOQB|VM;%lTK?wSGTiS+O^v z?8($KoNItEVD5)(_MG2d-}fc>Ehtygx-{>1=Px#y-7qtR9J=Wmq8AIAPfYl@oT)A$LXmFG%OSZDbYD;6O>(ADC7ho1Q|kHAWrd% z_rCa%L;JT`ocxec&I$>{5olZ%I}Suhg-wbiD5p3#Ogg|yrSjU^BjmWmNs|sRqm|1z zIcL;?Ud3IQa$vM_ltcSe!BdLLndJ_=If2V%^6XO%*qlII1+~4uwKGy-$^iy-KB%s> zPT1TBV4oNDay5lby`sD)EO%hWS&(!*``nBQsLpjoJj-$ier|*NB~JSeq{;vQ002ov JPDHLkV1g)zXnp_y literal 0 HcmV?d00001 diff --git a/Gores/Thanatos/ThanatosVentParticle3.png b/Gores/Thanatos/ThanatosVentParticle3.png new file mode 100644 index 0000000000000000000000000000000000000000..221e95e9487e35eb26f7cde9998aef8d2bc3df8b GIT binary patch literal 254 zcmVPx#xJg7oR9J=Wm(dQu5DZ1HWxwXDeVo0ph_JS%X_M`~co>~~N)bRPr9^e9%B2ke z5MyKwI=Iobbk05uoaa$L6vs^~k~x9E$nnhiG^V7pIe~T!^iG#@if%Vh@m&$iSF(P0ftK^W9t`V>3j*4Dtgz+;EGCfAQ28VQe-j8;Kl`^#z*M8t zkh=X=ZKV!Z07*qoM6N<$ Ef|xF7<^TWy literal 0 HcmV?d00001 diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index b2fb74805f..1438c463c2 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -247,17 +247,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { - // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Fire normal lasers if head is in passive state + if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + else + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); - // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 32274e0fde..f7c3d846d8 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -247,17 +247,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { - // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Fire normal lasers if head is in passive state + if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + else + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); - // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 0de8ece2f3..61dd111125 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -247,17 +247,30 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { - // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Fire normal lasers if head is in passive state + if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) + { + // Normal laser + Vector2 projectileDestination = targetCenterArray[i] - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } + else + { + // Predictive laser + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); - // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination.RotatedByRandom(MathHelper.PiOver4)) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + // Opposite laser + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; + projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; + Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + } } } } diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index d6cdb4dd56..a08be74c81 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -648,7 +648,6 @@ namespace CalamityMod.NPCs.SlimeGod // This loot code is shared with every other Slime God component. public static void DropSlimeGodLoot(NPC npc) { - CalamityMod mod = ModContent.GetInstance(); DropHelper.DropBags(npc); DropHelper.DropItemChance(npc, ModContent.ItemType(), 10); diff --git a/Utilities/MiscUtils.cs b/Utilities/MiscUtils.cs index 225fe71371..12b400734c 100644 --- a/Utilities/MiscUtils.cs +++ b/Utilities/MiscUtils.cs @@ -10,6 +10,7 @@ using System.Text; using Terraria; using Terraria.ID; using Terraria.Localization; +using Terraria.ModLoader; namespace CalamityMod { @@ -235,7 +236,9 @@ namespace CalamityMod { velocityMult = 1f; } - int smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + Mod mod = ModContent.GetInstance(); + int type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + int smoke = Gore.NewGore(source, default, type, 1f); Gore gore = Main.gore[smoke]; if (thanatos) { @@ -244,7 +247,8 @@ namespace CalamityMod gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y += 1f; - smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + smoke = Gore.NewGore(source, default, type, 1f); gore = Main.gore[smoke]; if (thanatos) { @@ -253,7 +257,8 @@ namespace CalamityMod gore.velocity *= velocityMult; gore.velocity.X -= 1f; gore.velocity.Y += 1f; - smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + smoke = Gore.NewGore(source, default, type, 1f); gore = Main.gore[smoke]; if (thanatos) { @@ -262,7 +267,8 @@ namespace CalamityMod gore.velocity *= velocityMult; gore.velocity.X += 1f; gore.velocity.Y -= 1f; - smoke = Gore.NewGore(source, default, Main.rand.Next(61, 64), 1f); + type = thanatos ? Main.rand.Next(mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle1"), mod.GetGoreSlot("Gores/Thanatos/ThanatosVentParticle3") + 1) : Main.rand.Next(61, 64); + smoke = Gore.NewGore(source, default, type, 1f); gore = Main.gore[smoke]; if (thanatos) { diff --git a/World/WorldGenerationMethods.cs b/World/WorldGenerationMethods.cs index 6b767a7003..48f76bfa7e 100644 --- a/World/WorldGenerationMethods.cs +++ b/World/WorldGenerationMethods.cs @@ -1102,7 +1102,6 @@ namespace CalamityMod.World Tile tile = Main.tile[x, y]; int type = tile.type; int wallType = tile.wall; - Mod mod = ModContent.GetInstance(); if (WorldGen.InWorld(x, y, 1)) { From 99d152eefd5c9ef5f8c93d47de2bb1195a110b94 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 14:47:40 -0500 Subject: [PATCH 075/103] 1 - The base for Thanatos Deathray stuff. --- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 73 +++++++++++++++++++++----- 1 file changed, 60 insertions(+), 13 deletions(-) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index bcdfbcb50e..2fc38539ec 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -66,6 +66,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos // Used in the lerp to smoothly scale velocity up and down private float chargeVelocityScalar = 0f; + // Total duration of the deathray telegraph + private const float deathrayTelegraphDuration = 120f; + + // Total duration of the deathray + private const float deathrayDuration = 180f; + public override void SetStaticDefaults() { DisplayName.SetDefault("Thanatos"); @@ -352,8 +358,8 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float chargeTurnSpeedMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); float laserBarragePhaseTurnSpeedMult = MathHelper.Lerp(1f, 8f, chargeVelocityScalar); - float invisiblePhaseVelocityMult = MathHelper.Lerp(1f, 3f, chargeVelocityScalar); - float invisiblePhaseTurnSpeedMult = MathHelper.Lerp(1f, 12f, chargeVelocityScalar); + float deathrayVelocityMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); + float deathrayTurnSpeedMult = MathHelper.Lerp(1f, 4f, chargeVelocityScalar); // Base scale on total time spent in phase float chargeVelocityScalarIncrement = 1f / speedUpTime; @@ -363,6 +369,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float laserBarrageVelocityScalarIncrement = 0.01f; float laserBarrageVelocityScalarDecrement = 1f / velocityAdjustTime; + // Distance from target + float distanceFromTarget = Vector2.Distance(npc.Center, player.Center); + // Passive and Immune phases switch ((int)SecondaryAIState) { @@ -474,6 +483,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos turnSpeed *= chargeTurnSpeedMult; turnDistance = chargeLocationDistance; + // Gradually turn slower if within 20 tiles of the target + if (distanceFromTarget < 320f) + turnSpeed *= distanceFromTarget / 320f; + calamityGlobalNPC.newAI[2] += 1f; if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) { @@ -533,12 +546,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos break; - // Move close to target, reduce velocity and increase turn speed when close enough, create telegraph beams, reduce turn speed, fire deathray + // Move close to target, reduce velocity and turn speed when close enough, create telegraph beams, reduce turn speed, fire deathray case (int)Phase.Deathray: // Head is vulnerable while charging and firing deathray vulnerable = true; + // If close enough to the target, prepare to fire deathray + bool readyToFireDeathray = distanceFromTarget < 800f; + if (readyToFireDeathray) + npc.localAI[2] = 1f; + // Use a lerp to smoothly scale up velocity and turn speed if (calamityGlobalNPC.newAI[3] == 0f) { @@ -546,7 +564,10 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (chargeVelocityScalar >= 1f) { chargeVelocityScalar = 1f; - calamityGlobalNPC.newAI[3] = 1f; + + // If ready to fire deathray, start reducing the velocity scalar + if (npc.localAI[2] == 1f) + calamityGlobalNPC.newAI[3] = 1f; } } else @@ -556,18 +577,44 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos chargeVelocityScalar = 0f; } - baseVelocity *= chargeVelocityMult; - turnSpeed *= chargeTurnSpeedMult; + baseVelocity *= deathrayVelocityMult; + turnSpeed *= deathrayTurnSpeedMult; turnDistance = chargeLocationDistance; - calamityGlobalNPC.newAI[2] += 1f; - if (calamityGlobalNPC.newAI[2] >= chargePhaseGateValue) + // Gradually turn and move slower if within 50 tiles of the target + if (npc.localAI[2] == 1f) { - AIState = (float)Phase.UndergroundLaserBarrage; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - chargeVelocityScalar = 0f; - npc.TargetClosest(); + baseVelocity *= distanceFromTarget / 800f; + turnSpeed *= distanceFromTarget / 800f; + + if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration) + { + // Fire deathray telegraph beams + if (Main.netMode != NetmodeID.MultiplayerClient) + { + + } + } + else + { + // Fire deathray + if (Main.netMode != NetmodeID.MultiplayerClient) + { + + } + } + + if (calamityGlobalNPC.newAI[2] >= deathrayTelegraphDuration + deathrayDuration) + { + npc.localAI[0] = 0f; + npc.localAI[2] = 0f; + AIState = (float)Phase.Charge; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + chargeVelocityScalar = 0f; + npc.TargetClosest(); + } + calamityGlobalNPC.newAI[2] += 1f; } break; From 766884401c190ceefe12ba4c8c03034e858493a6 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 15:29:11 -0500 Subject: [PATCH 076/103] 1 - Wyrm adjustments. --- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 10 +++++----- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 10 +++++----- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 8 ++++---- NPCs/CalamityGlobalAI.cs | 5 +++++ 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 1cbcd857fa..1214a2b63e 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -100,13 +100,13 @@ namespace CalamityMod.NPCs.Abyss if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) { npc.ai[3] += 1f; - float shootProjectile = 200f; - float timer = npc.ai[0] + 10f; - float divisor = timer + shootProjectile; - if (npc.ai[3] % divisor == 0f) + float shootShadowFireballGateValue = 90f; + float divisor = 5f; + if (npc.ai[3] % divisor == 0f && npc.ai[3] >= shootShadowFireballGateValue) { + npc.ai[3] = 0f; float distanceVelocityBoost = MathHelper.Clamp((Vector2.Distance(Main.npc[(int)npc.ai[2]].Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) - 1600f) * 0.025f, 0f, 16f); - float fireballVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 4f : 8f) + distanceVelocityBoost; + float fireballVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 6f : 8f) + distanceVelocityBoost; Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center; Vector2 velocity = Vector2.Normalize(destination) * fireballVelocity; int type = ProjectileID.CultistBossFireBallClone; diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index c63853ed29..51c99a9d51 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -100,13 +100,13 @@ namespace CalamityMod.NPCs.Abyss if (Vector2.Distance(npc.Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) > 160f) { npc.ai[3] += 1f; - float shootProjectile = 200f; - float timer = npc.ai[0] + 15f; - float divisor = timer + shootProjectile; - if (npc.ai[3] % divisor == 0f) + float spawnAncientLightGateValue = 180f; + float divisor = 10f; + if (npc.ai[0] % divisor == 0f && npc.ai[3] >= spawnAncientLightGateValue) { + npc.ai[3] = 0f; float distanceVelocityBoost = MathHelper.Clamp((Vector2.Distance(Main.npc[(int)npc.ai[2]].Center, Main.player[Main.npc[(int)npc.ai[2]].target].Center) - 1600f) * 0.025f, 0f, 16f); - float lightVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 4f : 8f) + distanceVelocityBoost; + float lightVelocity = (Main.player[Main.npc[(int)npc.ai[2]].target].Calamity().ZoneAbyssLayer4 ? 6f : 8f) + distanceVelocityBoost; Vector2 destination = Main.player[Main.npc[(int)npc.ai[2]].target].Center - npc.Center; Vector2 velocity = Vector2.Normalize(destination) * lightVelocity; int type = NPCID.AncientLight; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 28ab7c790c..600a330eac 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -510,7 +510,7 @@ namespace CalamityMod.NPCs.Abyss } } - float predictionAmt = targetDownDeep ? 30f : 60f; + float predictionAmt = targetDownDeep ? 45f : 60f; float lightningVelocity = targetDownDeep ? 6f : 8f; for (int i = 0; i < numProjectiles; i++) { @@ -800,7 +800,7 @@ namespace CalamityMod.NPCs.Abyss if ((destination - npc.Center).Length() < iceMistLocationDistance || calamityGlobalNPC.newAI[2] > 0f) { - if (calamityGlobalNPC.newAI[2] % 45f == 0f && calamityGlobalNPC.newAI[2] < iceMistDuration && Main.netMode != NetmodeID.MultiplayerClient) + if (calamityGlobalNPC.newAI[2] % 60f == 0f && calamityGlobalNPC.newAI[2] < iceMistDuration && Main.netMode != NetmodeID.MultiplayerClient) { int maxTargets = 2; int[] whoAmIArray = new int[maxTargets]; @@ -826,8 +826,8 @@ namespace CalamityMod.NPCs.Abyss } } - float predictionAmt = targetDownDeep ? 60f : 120f; - float iceMistVelocity = targetDownDeep ? 8f : 16f; + float predictionAmt = targetDownDeep ? 90f : 120f; + float iceMistVelocity = targetDownDeep ? 12f : 16f; for (int i = 0; i < numProjectiles; i++) { // Predictive mist diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 30a8100d78..991e6b50aa 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -12903,6 +12903,11 @@ namespace CalamityMod.NPCs { int type = ProjectileID.AncientDoomProjectile; int damage = npc.GetProjectileDamage(type); + + // Triple damage if the Adult Eidolon Wyrm is alive + if (NPC.AnyNPCs(ModContent.NPCType())) + damage *= 3; + kill = true; if (Main.netMode != NetmodeID.MultiplayerClient) { From cf2ad30dbffe8f2e51f21e5a5c10a038784e413d Mon Sep 17 00:00:00 2001 From: Dominic Date: Wed, 16 Jun 2021 17:43:47 -0500 Subject: [PATCH 077/103] Thanatos laserbeam telegraph projectile --- Projectiles/Boss/ExoDestroyerBeamTelegraph.cs | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Projectiles/Boss/ExoDestroyerBeamTelegraph.cs diff --git a/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs new file mode 100644 index 0000000000..ef3e778b14 --- /dev/null +++ b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs @@ -0,0 +1,99 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.IO; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + // Code used in the demonstration video. + // This comment should be removed when implemented. + /*for (int b = 0; b < 6; b++) + * { + int beam = Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, 255, npc.whoAmI); + + // Determine the initial offset angle of telegraph. It will be smoothened to give a "stretch" effect. + if (Main.projectile.IndexInRange(beam)) + { + float squishedRatio = (float)Math.Pow((float)Math.Sin(MathHelper.Pi * b / 6f), 2D); + float smoothenedRatio = MathHelper.SmoothStep(0f, 1f, squishedRatio); + Main.projectile[beam].ai[1] = MathHelper.Lerp(-0.74f, 0.74f, smoothenedRatio); + } + } + Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, 255, npc.whoAmI); + */ + public class ExoDestroyerBeamTelegraph : ModProjectile + { + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + + public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[0]) ? Main.npc[(int)projectile.ai[0]] : null; + public float ConvergenceRatio => MathHelper.SmoothStep(0f, 1f, Utils.InverseLerp(25f, 120f, Time, true)); + public ref float StartingRotationalOffset => ref projectile.ai[1]; + public ref float ConvergenceAngle => ref projectile.localAI[0]; + public ref float Time => ref projectile.localAI[1]; + public const int Lifetime = 180; + public const float TelegraphWidth = 3600f; + public override void SetStaticDefaults() => DisplayName.SetDefault("Telegraph"); + + public override void SetDefaults() + { + projectile.width = projectile.height = 4; + projectile.ignoreWater = true; + projectile.tileCollide = false; + projectile.alpha = 255; + projectile.penetrate = -1; + projectile.extraUpdates = 1; + projectile.timeLeft = Lifetime; + } + + public override void SendExtraAI(BinaryWriter writer) + { + writer.Write(ConvergenceAngle); + writer.Write(Time); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + ConvergenceAngle = reader.ReadSingle(); + Time = reader.ReadSingle(); + } + + public override void AI() + { + // Die if the thing to attach to disappears. + if (ThingToAttachTo is null || !ThingToAttachTo.active) + { + projectile.Kill(); + return; + } + + projectile.Center = ThingToAttachTo.Center; + + // May want to change the ThingToAttachTo.velocity.ToRotation() part to instead just point towards a certain destination vector. + projectile.rotation = StartingRotationalOffset.AngleLerp(ConvergenceAngle, ConvergenceRatio) + ThingToAttachTo.velocity.ToRotation(); + Time++; + } + + public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) + { + Texture2D laserTelegraph = ModContent.GetTexture("CalamityMod/ExtraTextures/LaserWallTelegraphBeam"); + + float verticalScale = Utils.InverseLerp(0f, 20f, Time, true) * Utils.InverseLerp(0f, 16f, projectile.timeLeft, true) * 4f; + + Vector2 origin = laserTelegraph.Size() * new Vector2(0f, 0.5f); + Vector2 scaleInner = new Vector2(TelegraphWidth / laserTelegraph.Width, verticalScale); + Vector2 scaleOuter = scaleInner * new Vector2(1f, 2.2f); + + Color colorOuter = Color.Lerp(Color.Red, Color.Crimson, Time / Lifetime * 2f % 1f); // Iterate through crimson and red twice and then flash. + colorOuter = Color.Lerp(colorOuter, Color.White, Utils.InverseLerp(40f, 0f, projectile.timeLeft, true) * 0.8f); + Color colorInner = Color.Lerp(colorOuter, Color.White, 0.5f); + + colorInner *= 0.85f; + colorOuter *= 0.7f; + + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorOuter, projectile.rotation, origin, scaleOuter, SpriteEffects.None, 0f); + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorInner, projectile.rotation, origin, scaleInner, SpriteEffects.None, 0f); + return false; + } + } +} From 8ab9192c7cf338f4da199703c5464ee8e9eeb25b Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Wed, 16 Jun 2021 18:40:06 -0500 Subject: [PATCH 078/103] 1 - Wyrm adjustments, again. --- NPCs/Abyss/EidolonWyrmHead.cs | 7 ++++++- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 2 ++ NPCs/CalamityGlobalAI.cs | 9 ++++++--- NPCs/CalamityGlobalNPC.cs | 3 +++ NPCs/NormalNPCs/Eidolist.cs | 7 ++++++- World/CalamityWorld.cs | 10 +++++++++- 6 files changed, 32 insertions(+), 6 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 1fc9c90b2d..6e15d84c4f 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -73,7 +73,12 @@ namespace CalamityMod.NPCs.Abyss public override void AI() { - bool adultWyrmAlive = NPC.AnyNPCs(ModContent.NPCType()); + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } if (npc.justHit || detectsPlayer || Main.player[npc.target].chaosState || adultWyrmAlive) { detectsPlayer = true; diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 600a330eac..ae640abc78 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -134,6 +134,8 @@ namespace CalamityMod.NPCs.Abyss { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); + CalamityGlobalNPC.adultEidolonWyrmHead = npc.whoAmI; + // Difficulty modes bool malice = CalamityWorld.malice; bool death = CalamityWorld.death || malice; diff --git a/NPCs/CalamityGlobalAI.cs b/NPCs/CalamityGlobalAI.cs index 991e6b50aa..67ad19225b 100644 --- a/NPCs/CalamityGlobalAI.cs +++ b/NPCs/CalamityGlobalAI.cs @@ -12769,8 +12769,11 @@ namespace CalamityMod.NPCs // Triple damage if the Adult Eidolon Wyrm is alive if (npc.ai[0] == 0f) { - if (NPC.AnyNPCs(ModContent.NPCType())) - npc.damage *= 3; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + npc.damage *= 3; + } } npc.ai[0] += 1f; @@ -12905,7 +12908,7 @@ namespace CalamityMod.NPCs int damage = npc.GetProjectileDamage(type); // Triple damage if the Adult Eidolon Wyrm is alive - if (NPC.AnyNPCs(ModContent.NPCType())) + if (Main.npc[(int)npc.ai[0]].type == ModContent.NPCType()) damage *= 3; kill = true; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ad21798c32..9ec5392201 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -204,6 +204,7 @@ namespace CalamityMod.NPCs public static int draedonExoMechTwinRed = -1; public static int draedonExoMechTwinGreen = -1; public static int draedonExoMechPrime = -1; + public static int adultEidolonWyrmHead = -1; // Boss Enrage variable for use with the boss health UI. // The logic behind this is as follows: @@ -697,6 +698,8 @@ namespace CalamityMod.NPCs ResetSavedIndex(ref draedonExoMechTwinGreen, NPCType()); ResetSavedIndex(ref draedonExoMechPrime, NPCType());*/ + ResetSavedIndex(ref adultEidolonWyrmHead, NPCType()); + CalamityGlobalTownNPC.ResetTownNPCNameBools(npc, mod); // Reset the enraged state every frame. The expectation is that bosses will continuously set it back to true if necessary. diff --git a/NPCs/NormalNPCs/Eidolist.cs b/NPCs/NormalNPCs/Eidolist.cs index 3e44cf71e9..922081c5e2 100644 --- a/NPCs/NormalNPCs/Eidolist.cs +++ b/NPCs/NormalNPCs/Eidolist.cs @@ -56,7 +56,12 @@ namespace CalamityMod.NPCs.NormalNPCs public override void AI() { - bool adultWyrmAlive = NPC.AnyNPCs(ModContent.NPCType()); + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } npc.Opacity += 0.15f; if (npc.Opacity > 1f) diff --git a/World/CalamityWorld.cs b/World/CalamityWorld.cs index 95122e2a88..3fe5c8dd69 100644 --- a/World/CalamityWorld.cs +++ b/World/CalamityWorld.cs @@ -220,6 +220,7 @@ namespace CalamityMod.World CalamityGlobalNPC.draedonExoMechTwinGreen = -1; CalamityGlobalNPC.draedonExoMechTwinRed = -1; CalamityGlobalNPC.draedonExoMechWorm = -1; + CalamityGlobalNPC.adultEidolonWyrmHead = -1; BossRushEvent.BossRushStage = 0; DoGSecondStageCountdown = 0; ArmoredDiggerSpawnCooldown = 0; @@ -1631,7 +1632,14 @@ namespace CalamityMod.World { if (player.chaosState && !player.dead) { - if (!NPC.AnyNPCs(ModContent.NPCType()) && Main.netMode != NetmodeID.MultiplayerClient) + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } + + if (!adultWyrmAlive && Main.netMode != NetmodeID.MultiplayerClient) NPC.SpawnOnPlayer(closestPlayer, ModContent.NPCType()); } } From bc13f9523055c3a49c48a7b8526e361d09ffa598 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 00:06:35 -0500 Subject: [PATCH 079/103] Hallowed Rune/Phantomic Artifact display buff times --- Buffs/StatBuffs/HallowedRuneAtkBuff.cs | 1 - Buffs/StatBuffs/HallowedRuneDefBuff.cs | 1 - Buffs/StatBuffs/HallowedRuneRegenBuff.cs | 1 - Buffs/StatBuffs/PhantomicArmourBuff.cs | 1 - Buffs/StatBuffs/PhantomicEmpowermentBuff.cs | 1 - Buffs/StatBuffs/PhantomicRestorationBuff.cs | 1 - 6 files changed, 6 deletions(-) diff --git a/Buffs/StatBuffs/HallowedRuneAtkBuff.cs b/Buffs/StatBuffs/HallowedRuneAtkBuff.cs index cda8a37727..a7dd6475f3 100644 --- a/Buffs/StatBuffs/HallowedRuneAtkBuff.cs +++ b/Buffs/StatBuffs/HallowedRuneAtkBuff.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/HallowedRuneDefBuff.cs b/Buffs/StatBuffs/HallowedRuneDefBuff.cs index 4856abe2bf..22ed3eb7b9 100644 --- a/Buffs/StatBuffs/HallowedRuneDefBuff.cs +++ b/Buffs/StatBuffs/HallowedRuneDefBuff.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/HallowedRuneRegenBuff.cs b/Buffs/StatBuffs/HallowedRuneRegenBuff.cs index c85e46f920..50968cfcde 100644 --- a/Buffs/StatBuffs/HallowedRuneRegenBuff.cs +++ b/Buffs/StatBuffs/HallowedRuneRegenBuff.cs @@ -12,7 +12,6 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/PhantomicArmourBuff.cs b/Buffs/StatBuffs/PhantomicArmourBuff.cs index fae17dd3a1..82e4305808 100644 --- a/Buffs/StatBuffs/PhantomicArmourBuff.cs +++ b/Buffs/StatBuffs/PhantomicArmourBuff.cs @@ -14,7 +14,6 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/PhantomicEmpowermentBuff.cs b/Buffs/StatBuffs/PhantomicEmpowermentBuff.cs index 52ba453934..868a457554 100644 --- a/Buffs/StatBuffs/PhantomicEmpowermentBuff.cs +++ b/Buffs/StatBuffs/PhantomicEmpowermentBuff.cs @@ -13,7 +13,6 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } diff --git a/Buffs/StatBuffs/PhantomicRestorationBuff.cs b/Buffs/StatBuffs/PhantomicRestorationBuff.cs index ace3972774..936c8c7af2 100644 --- a/Buffs/StatBuffs/PhantomicRestorationBuff.cs +++ b/Buffs/StatBuffs/PhantomicRestorationBuff.cs @@ -13,7 +13,6 @@ namespace CalamityMod.Buffs.StatBuffs Main.debuff[Type] = false; Main.pvpBuff[Type] = true; Main.buffNoSave[Type] = true; - Main.buffNoTimeDisplay[Type] = true; longerExpertDebuff = false; } From 416dd26c4d3d578b34f0907ee4d9a15e03c6e397 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 00:15:09 -0500 Subject: [PATCH 080/103] Some Boss Health Bar fixes --- UI/BossHealthBarManager.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 08e7c65b0f..5ac30a1d5f 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -103,11 +103,6 @@ namespace CalamityMod.UI OneToMany[NPCID.BrainofCthulhu] = BoC; OneToMany[NPCID.Creeper] = BoC; - int[] PerfWorm = new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }; - OneToMany[ModContent.NPCType()] = PerfWorm; - OneToMany[ModContent.NPCType()] = PerfWorm; - OneToMany[ModContent.NPCType()] = PerfWorm; - int[] Skele = new int[] { NPCID.SkeletronHead, NPCID.SkeletronHand }; OneToMany[NPCID.SkeletronHead] = Skele; OneToMany[NPCID.SkeletronHand] = Skele; @@ -389,10 +384,10 @@ namespace CalamityMod.UI break; } - // Sort out the eater of worlds or medium perf worm splitting into multiple segments and multiple of them being heads - if (type == NPCID.EaterofWorldsHead || type == ModContent.NPCType()) + // Sort out the eater of worlds splitting into multiple segments and multiple of them being heads + if (type == NPCID.EaterofWorldsHead) { - if (Main.npc[id].type == NPCID.EaterofWorldsHead || Main.npc[id].type == ModContent.NPCType()) + if (Main.npc[id].type == NPCID.EaterofWorldsHead) { hasBar = true; } @@ -470,6 +465,7 @@ namespace CalamityMod.UI private int _comboStartHealth; private int _damageCountdown; public int EnrageTimer; + public int AttachedNPCType = -1; private NPC _npc { @@ -534,6 +530,7 @@ namespace CalamityMod.UI _npcLocation = id; _maxHealth = Main.npc[id].lifeMax; + AttachedNPCType = Main.npc[id].type; if (OneToMany.ContainsKey(Main.npc[id].type)) { @@ -564,7 +561,10 @@ namespace CalamityMod.UI dead = true; int life = _npc.life; - if (life < 0 || !_npc.active || _npc.lifeMax < 800) + + // NPCs appear to be able to occasionally be replaced by a new NPC faster than the bar can register the death of the last NPC. + // To midigate this, a special type check is put in place to catch unusual NPCs occupying the space of a would-be dead bar. + if (life < 0 || !_npc.active || _npc.lifeMax < 100 || _npc.type != AttachedNPCType) dead = true; if (_oneToMany) From e6102ca3133ac5f05dbc581300ff622469a59755 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 00:57:36 -0500 Subject: [PATCH 081/103] Celestial Sigil no longer has the consumable tooltip text --- Items/CalamityGlobalItem.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index f927f33194..6bbc438a37 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -215,6 +215,8 @@ namespace CalamityMod.Items } if (item.type == ItemID.StarCannon) item.UseSound = null; + if (item.type == ItemID.CelestialSigil) + item.consumable = false; } #endregion From 172350d7c589fba4549700d5439ee7f6b0ac39fc Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 01:09:42 -0500 Subject: [PATCH 082/103] Bobbit Hook tooltip fix --- Items/Tools/BobbitHook.cs | 14 ++++++++------ Projectiles/Typeless/BobbitHead.cs | 13 +++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/Items/Tools/BobbitHook.cs b/Items/Tools/BobbitHook.cs index f9c834c700..904c086a72 100644 --- a/Items/Tools/BobbitHook.cs +++ b/Items/Tools/BobbitHook.cs @@ -1,9 +1,10 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -using static Terraria.ModLoader.ModContent; using CalamityMod.Projectiles.Typeless; +using static Terraria.ModLoader.ModContent; + namespace CalamityMod.Items.Tools { public class BobbitHook : ModItem @@ -11,17 +12,18 @@ namespace CalamityMod.Items.Tools public override void SetStaticDefaults() { DisplayName.SetDefault("Bobbit Hook"); - Tooltip.SetDefault(@"Retracts upon attaching to a tile with extreme speeds -Reach: 40 -Launch Velocity: 25 -Pull Velocity: 28"); + Tooltip.SetDefault($@"Retracts upon attaching to a tile with extreme speeds +Reach: {BobbitHead.GrappleRangInTiles} +Launch Velocity: {BobbitHead.LaunchSpeed} +Reelback Velocity: {BobbitHead.ReelbackSpeed} +Pull Velocity: {BobbitHead.PullSpeed}"); } public override void SetDefaults() { // Instead of copying these values, we can clone and modify the ones we want to copy item.CloneDefaults(ItemID.AmethystHook); - item.shootSpeed = 25f; // how quickly the hook is shot. + item.shootSpeed = BobbitHead.LaunchSpeed; // How quickly the hook is shot. item.shoot = ProjectileType(); item.value = Item.buyPrice(1, 40, 0, 0); item.rare = ItemRarityID.Red; diff --git a/Projectiles/Typeless/BobbitHead.cs b/Projectiles/Typeless/BobbitHead.cs index 9853d2c331..7ac1093342 100644 --- a/Projectiles/Typeless/BobbitHead.cs +++ b/Projectiles/Typeless/BobbitHead.cs @@ -9,6 +9,10 @@ namespace CalamityMod.Projectiles.Typeless { public class BobbitHead : ModProjectile { + public const float PullSpeed = 24f; + public const float ReelbackSpeed = 28f; + public const float LaunchSpeed = 25f; + public const float GrappleRangInTiles = 40f; public override void SetStaticDefaults() { DisplayName.SetDefault("Bobbit Head"); @@ -38,10 +42,7 @@ namespace CalamityMod.Projectiles.Typeless } // Amethyst Hook is 300, Static Hook is 600, 16f = 1 tile - public override float GrappleRange() - { - return 640f; //40 tiles - } + public override float GrappleRange() => GrappleRangInTiles * 16f; public override void NumGrappleHooks(Player player, ref int numHooks) { @@ -51,12 +52,12 @@ namespace CalamityMod.Projectiles.Typeless // default is 11, Lunar is 24 public override void GrappleRetreatSpeed(Player player, ref float speed) { - speed = 28f; + speed = ReelbackSpeed; } public override void GrapplePullSpeed(Player player, ref float speed) { - speed = 24; + speed = PullSpeed; } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) From e1af052ab6be22a75de94c044ebbb51fbdf923af Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 01:12:08 -0500 Subject: [PATCH 083/103] Bladeedge Railbow grammar fix --- Items/Weapons/Ranged/BladedgeGreatbow.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Ranged/BladedgeGreatbow.cs b/Items/Weapons/Ranged/BladedgeGreatbow.cs index 545d583223..8ca67b7990 100644 --- a/Items/Weapons/Ranged/BladedgeGreatbow.cs +++ b/Items/Weapons/Ranged/BladedgeGreatbow.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Ranged { DisplayName.SetDefault("Bladedge Railbow"); Tooltip.SetDefault("Fires 4 arrows at once\n" + - "Fires 2 additional leafs"); + "Fires 2 additional leaves"); } public override void SetDefaults() From e4becc01df79c10408094882cbc25402132cef70 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 01:13:55 -0500 Subject: [PATCH 084/103] Master Ninja gear tooltip fix --- Items/CalamityGlobalItemTooltip.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index c8e36182e8..01b8e720e6 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -322,7 +322,7 @@ namespace CalamityMod.Items // Black Belt and Master Ninja Gear have guaranteed dodges on a 60 second cooldown. #region Dodging Belt Tooltips string beltDodgeLine = "Grants the ability to dodge attacks\n" + - $"The dodge has a {CalamityPlayer.BeltDodgeCooldown} second cooldown which is shared with all other dodges and reflects"; + $"The dodge has a {CalamityPlayer.BeltDodgeCooldown / 60} second cooldown which is shared with all other dodges and reflects"; if (item.type == ItemID.BlackBelt) EditTooltipByNum(0, (line) => line.text = beltDodgeLine); if (item.type == ItemID.MasterNinjaGear) From f4b9e8137d3fd96c6ea48c7c36d47690b7c7a938 Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 01:28:17 -0500 Subject: [PATCH 085/103] Expert item rarity color fix --- Items/CalamityGlobalItemTooltip.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 01b8e720e6..551235dfa3 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Items { // Apply standard post-ML rarities to the item's color first. Color? standardRarityColor = CalamityUtils.GetRarityColor(customRarity); - if (standardRarityColor.HasValue) + if (!item.expert && standardRarityColor.HasValue) nameLine.overrideColor = standardRarityColor.Value; #region Uniquely Colored Developer Items From df5735cecf4e23b08405009c780999ca9d1b646b Mon Sep 17 00:00:00 2001 From: Dominic Date: Thu, 17 Jun 2021 20:50:15 -0500 Subject: [PATCH 086/103] Hopefully fixed a stupid GetGlobalNPC IOOB problem --- UI/BossHealthBarManager.cs | 2 +- Utilities/GeneralExtensionUtils.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 5ac30a1d5f..8e5aa80121 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -592,7 +592,7 @@ namespace CalamityMod.UI return; int currentLife = _npc.life; - bool enraged = _npc.Calamity().CurrentlyEnraged; + bool enraged = _npc.Calamity()?.CurrentlyEnraged ?? false; // Calculate current life based all types that are available and considered part of one boss if (_oneToMany) diff --git a/Utilities/GeneralExtensionUtils.cs b/Utilities/GeneralExtensionUtils.cs index 255c5e6bbc..a505af745b 100644 --- a/Utilities/GeneralExtensionUtils.cs +++ b/Utilities/GeneralExtensionUtils.cs @@ -9,7 +9,7 @@ namespace CalamityMod public static partial class CalamityUtils { public static CalamityPlayer Calamity(this Player player) => player.GetModPlayer(); - public static CalamityGlobalNPC Calamity(this NPC npc) => npc.GetGlobalNPC(); + public static CalamityGlobalNPC Calamity(this NPC npc) => npc.active ? npc.GetGlobalNPC() : null; public static CalamityGlobalItem Calamity(this Item item) => item.GetGlobalItem(); public static CalamityGlobalProjectile Calamity(this Projectile proj) => proj.GetGlobalProjectile(); public static Item ActiveItem(this Player player) => Main.mouseItem.IsAir ? player.HeldItem : Main.mouseItem; From 4adb080e13d1420e4469d5e4ebca9b9c5f573acb Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 05:58:50 -0500 Subject: [PATCH 087/103] Fixed Dragon Pow on-hit problems --- Projectiles/Melee/DragonPowFlail.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Melee/DragonPowFlail.cs b/Projectiles/Melee/DragonPowFlail.cs index f011f2b2bd..e5b6761e92 100644 --- a/Projectiles/Melee/DragonPowFlail.cs +++ b/Projectiles/Melee/DragonPowFlail.cs @@ -139,7 +139,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { // Only perform hit effects after reaching approximately 75% of the way out. - if (projectile.WithinRange(Main.player[projectile.owner].Center, 1100f)) + if (Main.player[projectile.owner].WithinRange(target.Center, 620f)) return; // Inflicts Daybroken, Abyssal Flames and Holy Flames for 8 seconds on-hit From 0c4a031f442e6f2acb1369ee8bb71c3c8a619f62 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:20:10 -0500 Subject: [PATCH 088/103] Nerfed Celestus damage to 272 --- Items/Weapons/Rogue/Celestus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/Celestus.cs b/Items/Weapons/Rogue/Celestus.cs index 4e02ac68b3..11fd20a13e 100644 --- a/Items/Weapons/Rogue/Celestus.cs +++ b/Items/Weapons/Rogue/Celestus.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Rogue public override void SafeSetDefaults() { - item.damage = 340; + item.damage = 272; item.knockBack = 6f; item.useAnimation = item.useTime = 20; item.Calamity().rogue = true; From 0a91852fccca1671167b6e65bee6f9a1584a4a60 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:21:33 -0500 Subject: [PATCH 089/103] Buffed Staff of the Mechworm damage and increased SCal resist --- Items/Weapons/Summon/StaffoftheMechworm.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/StaffoftheMechworm.cs b/Items/Weapons/Summon/StaffoftheMechworm.cs index 4330c7e5f9..2f5d64f4fd 100644 --- a/Items/Weapons/Summon/StaffoftheMechworm.cs +++ b/Items/Weapons/Summon/StaffoftheMechworm.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Items.Weapons.Summon public class StaffoftheMechworm : ModItem { // This value is also referenced by the God Slayer and Auric summoner helmets. - public const int BaseDamage = 137; // originally 325 + public const int BaseDamage = 144; // originally 325 public override void SetStaticDefaults() { DisplayName.SetDefault("Staff of the Mechworm"); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9ec5392201..f4fbee73ad 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3899,7 +3899,7 @@ namespace CalamityMod.NPCs damage = (int)(damage * 0.8); if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) - damage = (int)(damage * 0.9); + damage = (int)(damage * 0.81); } else if (npc.type == NPCType() || npc.type == NPCType()) { From 8a01a61ac7bee0aa9e173060f87c14bdcf1eaa2b Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:23:07 -0500 Subject: [PATCH 090/103] Nerfed Midnight Sun UFO's laser fire rate --- Projectiles/Summon/MidnightSunUFO.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Summon/MidnightSunUFO.cs b/Projectiles/Summon/MidnightSunUFO.cs index e80e6b43e0..12c6f6f0ae 100644 --- a/Projectiles/Summon/MidnightSunUFO.cs +++ b/Projectiles/Summon/MidnightSunUFO.cs @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Summon Vector2 destination = potentialTarget.Center - new Vector2((float)Math.Cos(angle) * potentialTarget.width * 0.65f, 250f); projectile.velocity = Vector2.Lerp(projectile.velocity, projectile.SafeDirectionTo(destination) * 24f, 0.03f); - if (projectile.ai[0] % 3f == 2f && potentialTarget.Top.Y > projectile.Bottom.Y) + if (projectile.ai[0] % 4f == 3f && potentialTarget.Top.Y > projectile.Bottom.Y) { Vector2 laserVelocity = projectile.SafeDirectionTo(potentialTarget.Center, Vector2.UnitY).RotatedByRandom(0.15f) * 25f; Projectile.NewProjectile(projectile.Bottom, laserVelocity, ModContent.ProjectileType(), projectile.damage, projectile.knockBack, projectile.owner); From e56ff8543a6e7372576b0f73c05b9e86c58779ff Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:23:44 -0500 Subject: [PATCH 091/103] Buffed Yharon Kindle Staff damage to 83 --- Items/Weapons/Summon/AngryChickenStaff.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Summon/AngryChickenStaff.cs b/Items/Weapons/Summon/AngryChickenStaff.cs index 52d96df032..ca405e227c 100644 --- a/Items/Weapons/Summon/AngryChickenStaff.cs +++ b/Items/Weapons/Summon/AngryChickenStaff.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Summon public override void SetDefaults() { item.mana = 50; - item.damage = 75; + item.damage = 83; item.useStyle = ItemUseStyleID.SwingThrow; item.width = 32; item.height = 32; From 49e65bba66f5c8002f2419b06f49aa4e85aef0a6 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:25:14 -0500 Subject: [PATCH 092/103] Buffed Hypothermia damage to 200 --- Items/Weapons/Rogue/Hypothermia.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/Hypothermia.cs b/Items/Weapons/Rogue/Hypothermia.cs index efb15d0d20..ddd8c0c2d6 100644 --- a/Items/Weapons/Rogue/Hypothermia.cs +++ b/Items/Weapons/Rogue/Hypothermia.cs @@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Rogue item.value = Item.buyPrice(1, 80, 0, 0); item.rare = ItemRarityID.Red; - item.damage = 197; + item.damage = 200; item.useAnimation = 21; item.useTime = 3; item.reuseDelay = 1; From dd906cbbe36e5e43dc6cd4ccd7ed32b16bda73ba Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:26:34 -0500 Subject: [PATCH 093/103] Nerfed Eclipse's Fall split projectile damage to 22% --- Projectiles/Rogue/EclipsesStealth.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index 77bba69aa6..257317e083 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -70,7 +70,7 @@ namespace CalamityMod.Projectiles.Rogue projectile.localAI[1] = Main.rand.Next(8, 14); // 8 to 13 frames between each spearfall int type = ModContent.ProjectileType(); - int smolDamage = (int)(projectile.damage * 0.28f); + int smolDamage = (int)(projectile.damage * 0.22f); float smolKB = 3f; // Used to be a 50% chance each spearfall for 1 or 2. Now is consistent. int numSpears = spawnTwoSpears ? 2 : 1; From f220d8a6552d892a3124ab4a5cca9ada311e8e85 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:27:15 -0500 Subject: [PATCH 094/103] Nerfed Executioner's Blade SS damage by 12% --- Items/Weapons/Rogue/ExecutionersBlade.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Rogue/ExecutionersBlade.cs b/Items/Weapons/Rogue/ExecutionersBlade.cs index 7fee4adc76..050935ff19 100644 --- a/Items/Weapons/Rogue/ExecutionersBlade.cs +++ b/Items/Weapons/Rogue/ExecutionersBlade.cs @@ -59,7 +59,7 @@ namespace CalamityMod.Items.Weapons.Rogue { bool usingStealth = player.Calamity().StealthStrikeAvailable() && counter == 0; if (usingStealth) - damage = (int)(damage * 4.1); + damage = (int)(damage * 3.61); int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (usingStealth && stealth.WithinBounds(Main.maxProjectiles)) From 5d5e50ba085b1b6f9c56a64c19590ed36a608576 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:29:54 -0500 Subject: [PATCH 095/103] Executioner's Blade resists --- NPCs/CalamityGlobalNPC.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index f4fbee73ad..0fdc328ea8 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3901,11 +3901,21 @@ namespace CalamityMod.NPCs if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || projectile.type == ProjectileType()) damage = (int)(damage * 0.81); } - else if (npc.type == NPCType() || npc.type == NPCType()) + else if (npc.type == NPCType() || npc.type == NPCType()) { if (projectile.type == ProjectileType()) damage = (int)(damage * 0.9); } + else if (npc.type == NPCType()) + { + if (projectile.type == ProjectileType()) + damage = (int)(damage * 0.8); + } + else if (npc.type == NPCType()) + { + if (projectile.type == ProjectileType()) + damage = (int)(damage * 0.9); + } else if (npc.type == NPCID.CultistBoss) { if (projectile.type == ProjectileType() || projectile.type == ProjectileType()) From 16ae129e1d18945f469d022a5cc64d1595e066fa Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:33:31 -0500 Subject: [PATCH 096/103] Reduced God's Paranoia dust count --- Projectiles/Rogue/GodsParanoiaDart.cs | 29 ++++++++++++++------------- Projectiles/Rogue/GodsParanoiaProj.cs | 8 ++++---- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/Projectiles/Rogue/GodsParanoiaDart.cs b/Projectiles/Rogue/GodsParanoiaDart.cs index 9c3274131e..e7092419f6 100644 --- a/Projectiles/Rogue/GodsParanoiaDart.cs +++ b/Projectiles/Rogue/GodsParanoiaDart.cs @@ -44,11 +44,13 @@ namespace CalamityMod.Projectiles.Rogue projectile.velocity.Y = 12f; } - int num822 = Dust.NewDust(projectile.position, projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 0, default, 1f); - Dust dust = Main.dust[num822]; - dust.velocity *= 0.1f; - Main.dust[num822].scale = 1.3f; - Main.dust[num822].noGravity = true; + if (Main.rand.NextBool(3)) + { + Dust flame = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 0, default, 1f); + flame.velocity *= 0.1f; + flame.scale = 1.3f; + flame.noGravity = true; + } } public override void Kill(int timeLeft) @@ -63,18 +65,17 @@ namespace CalamityMod.Projectiles.Rogue projectile.localNPCHitCooldown = -1; projectile.damage /= 2; projectile.Damage(); - for (int num621 = 0; num621 < 3; num621++) + for (int i = 0; i < 2; i++) { - int num622 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 100, default, 2f); - Main.dust[num622].velocity *= 3f; + Dust flame = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 100, default, 2f); + flame.velocity *= 3f; + if (Main.rand.NextBool(2)) + flame.scale = 0.5f; + if (Main.rand.NextBool(2)) { - Main.dust[num622].scale = 0.5f; - } - if (Main.rand.NextBool(2)) - { - Main.dust[num622].scale *= 0.5f; - Main.dust[num622].fadeIn = 1f + (float)Main.rand.Next(10) * 0.1f; + flame.scale *= 0.5f; + flame.fadeIn = Main.rand.NextFloat(1f, 2f); } } } diff --git a/Projectiles/Rogue/GodsParanoiaProj.cs b/Projectiles/Rogue/GodsParanoiaProj.cs index 0de494c4ea..21811f8cb8 100644 --- a/Projectiles/Rogue/GodsParanoiaProj.cs +++ b/Projectiles/Rogue/GodsParanoiaProj.cs @@ -41,10 +41,10 @@ namespace CalamityMod.Projectiles.Rogue Lighting.AddLight(projectile.Center, 0.35f, 0f, 0.25f); if (Main.rand.NextBool(2)) { - int num137 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), 1, 1, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 0, default, 0.5f); - Main.dust[num137].alpha = projectile.alpha; - Main.dust[num137].velocity *= 0f; - Main.dust[num137].noGravity = true; + Dust flame = Dust.NewDustDirect(projectile.position, 1, 1, Main.rand.NextBool(3) ? 56 : 242, 0f, 0f, 0, default, 0.5f); + flame.alpha = projectile.alpha; + flame.velocity = Vector2.Zero; + flame.noGravity = true; } projectile.StickyProjAI(50); From cfad0e0cc3d6c5b46dcfc29c48cd4abba9b384e6 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:34:24 -0500 Subject: [PATCH 097/103] Supernova SS 10% damage penalty --- Items/Weapons/Rogue/Supernova.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Items/Weapons/Rogue/Supernova.cs b/Items/Weapons/Rogue/Supernova.cs index cbc7939b8b..a0819b7d78 100644 --- a/Items/Weapons/Rogue/Supernova.cs +++ b/Items/Weapons/Rogue/Supernova.cs @@ -43,6 +43,7 @@ Stealth strikes release energy as they fly"); { if (player.Calamity().StealthStrikeAvailable()) //setting the stealth strike { + damage = (int)(damage * 0.9f); int stealth = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); if (stealth.WithinBounds(Main.maxProjectiles)) Main.projectile[stealth].Calamity().stealthStrike = true; From b05290c43968752c3c472c5c104dae49b0d74289 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:35:14 -0500 Subject: [PATCH 098/103] Infernal Spear SS 40% damage penalty --- Items/Weapons/Rogue/ProfanedTrident.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Items/Weapons/Rogue/ProfanedTrident.cs b/Items/Weapons/Rogue/ProfanedTrident.cs index f02356ae96..989447ddb2 100644 --- a/Items/Weapons/Rogue/ProfanedTrident.cs +++ b/Items/Weapons/Rogue/ProfanedTrident.cs @@ -38,6 +38,9 @@ namespace CalamityMod.Items.Weapons.Rogue public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { + if (player.Calamity().StealthStrikeAvailable()) + damage = (int)(damage * 0.6); + int proj = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); if (proj.WithinBounds(Main.maxProjectiles)) Main.projectile[proj].Calamity().stealthStrike = player.Calamity().StealthStrikeAvailable(); From d765b8dfcbbc77e07617a53576ca03045f73d933 Mon Sep 17 00:00:00 2001 From: Dominic Date: Fri, 18 Jun 2021 03:36:47 -0500 Subject: [PATCH 099/103] Lowered Final Dawn's immunity time --- Projectiles/Rogue/FinalDawnThrow2.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Projectiles/Rogue/FinalDawnThrow2.cs b/Projectiles/Rogue/FinalDawnThrow2.cs index d03fd0e7e9..4efe2a4d1b 100644 --- a/Projectiles/Rogue/FinalDawnThrow2.cs +++ b/Projectiles/Rogue/FinalDawnThrow2.cs @@ -87,11 +87,9 @@ namespace CalamityMod.Projectiles.Rogue player.heldProj = projectile.whoAmI; player.bodyFrame.Y = player.bodyFrame.Height; player.immuneNoBlink = true; - player.immuneTime = 10; - for (int k = 0; k < player.hurtCooldowns.Length; k++) - { - player.hurtCooldowns[k] = player.immuneTime; - } + player.immuneTime = 6; + for (int k = 0; k < player.hurtCooldowns.Length; k++) + player.hurtCooldowns[k] = player.immuneTime; // This is to make sure the player doesn't get yeeted out of the world, which crashes the game pretty much all of the time bool worldEdge = projectile.Center.X < 1000 || projectile.Center.Y < 1000 || projectile.Center.X > Main.maxTilesX * 16 - 1000 || projectile.Center.Y > Main.maxTilesY * 16 - 1000; From 03ecd7e0008f1757e24bec57ed37fe22ee8d630b Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 19 Jun 2021 14:56:49 -0500 Subject: [PATCH 100/103] 1 - Nerfed Archery Potion damage multiplier from 1.2x to 1.05x. 2 - Buffed all bows and arrows by 10%. 3 - Frost Barrier Glacial State on hit doesn't work if a boss is alive. 4 - Gave dash bashes a separate cooldown timer. 5 - Thanatos adjustments. 6 - Nerfed Icicle Arrow shard damage. 7 - Made more boss parts and minions resistant to slowing debuffs. --- Buffs/CalamityGlobalBuff.cs | 4 + CalPlayer/CalamityPlayer.cs | 42 +-- CalamityLists.cs | 131 +++++++-- Items/Ammo/ArcticArrow.cs | 2 +- Items/Ammo/BloodfireArrow.cs | 2 +- Items/Ammo/ElysianArrow.cs | 2 +- Items/Ammo/IcicleArrow.cs | 2 +- Items/Ammo/NapalmArrow.cs | 2 +- Items/Ammo/TerraArrow.cs | 2 +- Items/Ammo/VanquisherArrow.cs | 3 +- Items/CalamityGlobalItem.cs | 6 +- Items/CalamityGlobalItemTooltip.cs | 4 + Items/Weapons/Ranged/Alluvion.cs | 2 +- Items/Weapons/Ranged/Arbalest.cs | 2 +- Items/Weapons/Ranged/ArterialAssault.cs | 2 +- Items/Weapons/Ranged/AstralRepeater.cs | 2 +- Items/Weapons/Ranged/AstrealDefeat.cs | 2 +- Items/Weapons/Ranged/Barinade.cs | 2 +- Items/Weapons/Ranged/Barinautical.cs | 2 +- Items/Weapons/Ranged/BladedgeGreatbow.cs | 4 +- Items/Weapons/Ranged/BlossomFlux.cs | 6 +- Items/Weapons/Ranged/BrimstoneFury.cs | 2 +- Items/Weapons/Ranged/ClockworkBow.cs | 4 +- Items/Weapons/Ranged/Contagion.cs | 2 +- Items/Weapons/Ranged/CorrodedCaustibow.cs | 2 +- Items/Weapons/Ranged/CosmicBolter.cs | 2 +- Items/Weapons/Ranged/DaemonsFlame.cs | 2 +- Items/Weapons/Ranged/DarkechoGreatbow.cs | 6 +- Items/Weapons/Ranged/Deathwind.cs | 6 +- Items/Weapons/Ranged/Drataliornus.cs | 2 +- Items/Weapons/Ranged/EffluviumBow.cs | 2 +- Items/Weapons/Ranged/EternalBlizzard.cs | 4 +- Items/Weapons/Ranged/FlarewingBow.cs | 6 +- Items/Weapons/Ranged/Galeforce.cs | 4 +- Items/Weapons/Ranged/Goobow.cs | 2 +- Items/Weapons/Ranged/GreatbowofTurmoil.cs | 6 +- Items/Weapons/Ranged/HeavenlyGale.cs | 2 +- Items/Weapons/Ranged/LunarianBow.cs | 2 +- Items/Weapons/Ranged/Malevolence.cs | 2 +- Items/Weapons/Ranged/MandibleBow.cs | 10 +- Items/Weapons/Ranged/MarksmanBow.cs | 4 +- Items/Weapons/Ranged/Monsoon.cs | 2 +- Items/Weapons/Ranged/NettlelineGreatbow.cs | 6 +- Items/Weapons/Ranged/Phangasm.cs | 2 +- Items/Weapons/Ranged/PlanetaryAnnihilation.cs | 4 +- Items/Weapons/Ranged/RaidersGlory.cs | 4 +- Items/Weapons/Ranged/Seabow.cs | 4 +- Items/Weapons/Ranged/Shellshooter.cs | 2 +- Items/Weapons/Ranged/TelluricGlare.cs | 2 +- Items/Weapons/Ranged/TheBallista.cs | 2 +- Items/Weapons/Ranged/TheStorm.cs | 14 +- Items/Weapons/Ranged/Toxibow.cs | 2 +- Items/Weapons/Ranged/Ultima.cs | 2 +- Items/Weapons/Ranged/WulfrumBow.cs | 8 +- NPCs/Abyss/EidolonWyrmBodyAltHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmBodyHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 2 +- NPCs/Abyss/EidolonWyrmTailHuge.cs | 2 +- NPCs/CalamityGlobalNPC.cs | 11 + NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 56 ++-- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 56 ++-- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 48 +++- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 56 ++-- Projectiles/Boss/ExoDestroyerBeamStart.cs | 271 ++++++++++++++++++ Projectiles/Boss/ExoDestroyerBeamTelegraph.cs | 36 ++- Projectiles/Boss/ExoDestroyerLaser.cs | 152 ++++++++-- Projectiles/Melee/DevilsSunriseProj.cs | 2 +- Projectiles/Ranged/IcicleArrowProj.cs | 2 +- Utilities/NPCStats.cs | 2 + 69 files changed, 772 insertions(+), 280 deletions(-) create mode 100644 Projectiles/Boss/ExoDestroyerBeamStart.cs diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index 7abc394a1f..d675ac0b01 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -89,6 +89,10 @@ namespace CalamityMod.Buffs //Vanilla buffs switch (type) { + case BuffID.Archery: + tip = "20% increased arrow speed and 1.05x arrow damage"; + break; + case BuffID.Swiftness: tip = "15% increased movement speed"; break; diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 471890a35d..7ce4b1d873 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -7430,7 +7430,7 @@ namespace CalamityMod.CalPlayer player.AddBuff(ModContent.BuffType(), 180); } - if (fBarrier || (sirenBoobs && NPC.downedBoss3)) + if ((fBarrier || (sirenBoobs && NPC.downedBoss3)) && !areThereAnyDamnBosses) { Main.PlaySound(SoundID.Item, (int)player.position.X, (int)player.position.Y, 27); for (int m = 0; m < Main.maxNPCs; m++) @@ -8034,7 +8034,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) @@ -8066,8 +8066,8 @@ namespace CalamityMod.CalPlayer player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(135 * player.AverageDamage()), 20f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(90 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f); - if (npc.immune[player.whoAmI] < 6) - npc.immune[player.whoAmI] = 6; + if (npc.Calamity().dashImmunityTime[player.whoAmI] < 6) + npc.Calamity().dashImmunityTime[player.whoAmI] = 6; npc.AddBuff(ModContent.BuffType(), 300); bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) @@ -8093,7 +8093,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) @@ -8125,8 +8125,8 @@ namespace CalamityMod.CalPlayer player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(120 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f); Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(80 * player.AverageDamage()), 5f, Main.myPlayer, 0f, 0f); - if (npc.immune[player.whoAmI] < 6) - npc.immune[player.whoAmI] = 6; + if (npc.Calamity().dashImmunityTime[player.whoAmI] < 6) + npc.Calamity().dashImmunityTime[player.whoAmI] = 6; bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) { @@ -8151,7 +8151,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) @@ -8182,8 +8182,8 @@ namespace CalamityMod.CalPlayer } player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(60 * player.AverageDamage()), 15f, Main.myPlayer, 0f, 0f); - if (npc.immune[player.whoAmI] < 6) - npc.immune[player.whoAmI] = 6; + if (npc.Calamity().dashImmunityTime[player.whoAmI] < 6) + npc.Calamity().dashImmunityTime[player.whoAmI] = 6; bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) { @@ -8208,7 +8208,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) @@ -8238,8 +8238,8 @@ namespace CalamityMod.CalPlayer direction = 1; } player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); - if (npc.immune[player.whoAmI] < 6) - npc.immune[player.whoAmI] = 6; + if (npc.Calamity().dashImmunityTime[player.whoAmI] < 6) + npc.Calamity().dashImmunityTime[player.whoAmI] = 6; npc.AddBuff(ModContent.BuffType(), 60); bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) @@ -8265,7 +8265,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) @@ -8283,8 +8283,8 @@ namespace CalamityMod.CalPlayer direction = 1; } player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); - if (npc.immune[player.whoAmI] < 6) - npc.immune[player.whoAmI] = 6; + if (npc.Calamity().dashImmunityTime[player.whoAmI] < 6) + npc.Calamity().dashImmunityTime[player.whoAmI] = 6; npc.AddBuff(ModContent.BuffType(), 300); bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) @@ -8310,7 +8310,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC npc = Main.npc[i]; - if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.immune[player.whoAmI] <= 0) + if (npc.active && !npc.dontTakeDamage && !npc.friendly && npc.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = npc.getRect(); if (rectangle.Intersects(rect) && (npc.noTileCollide || player.CanHit(npc))) @@ -8355,8 +8355,8 @@ namespace CalamityMod.CalPlayer direction = 1; } player.ApplyDamageToNPC(npc, (int)num, num2, direction, crit); - if (npc.immune[player.whoAmI] < 6) - npc.immune[player.whoAmI] = 6; + if (npc.Calamity().dashImmunityTime[player.whoAmI] < 6) + npc.Calamity().dashImmunityTime[player.whoAmI] = 6; npc.AddBuff(ModContent.BuffType(), 600); bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) @@ -9187,7 +9187,7 @@ namespace CalamityMod.CalPlayer for (int i = 0; i < Main.maxNPCs; i++) { NPC nPC = Main.npc[i]; - if (nPC.active && !nPC.dontTakeDamage && !nPC.friendly && nPC.immune[player.whoAmI] == 0) + if (nPC.active && !nPC.dontTakeDamage && !nPC.friendly && nPC.Calamity().dashImmunityTime[player.whoAmI] <= 0) { Rectangle rect = nPC.getRect(); if (myRect.Intersects(rect) && (nPC.noTileCollide || Collision.CanHit(player.position, player.width, player.height, nPC.position, nPC.width, nPC.height))) @@ -9205,7 +9205,7 @@ namespace CalamityMod.CalPlayer { player.ApplyDamageToNPC(nPC, (int)Damage, Knockback, direction, false); } - nPC.immune[player.whoAmI] = NPCImmuneTime; + nPC.Calamity().dashImmunityTime[player.whoAmI] = NPCImmuneTime; bool isImmune = false; for (int j = 0; j < player.hurtCooldowns.Length; j++) { diff --git a/CalamityLists.cs b/CalamityLists.cs index b69cffaa63..ec435dc1e6 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -308,11 +308,8 @@ namespace CalamityMod ProjectileID.MushroomSpear, ProjectileID.Gungnir, ProjectileID.ObsidianSwordfish, - ProjectileID.ChlorophytePartisan, ProjectileID.MonkStaffT1, ProjectileID.MonkStaffT2, - ProjectileID.MonkStaffT3, - ProjectileID.NorthPoleWeapon, // Tools ProjectileID.CobaltDrill, @@ -346,28 +343,14 @@ namespace CalamityMod ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), ProjectileType(), - ProjectileType(), ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), - ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType() @@ -491,6 +474,8 @@ namespace CalamityMod NPCID.SkeletronHand, NPCID.WallofFlesh, NPCID.WallofFleshEye, + NPCID.PirateShipCannon, + NPCID.Probe, NPCID.Retinazer, NPCID.Spazmatism, NPCID.SkeletronPrime, @@ -499,7 +484,11 @@ namespace CalamityMod NPCID.PrimeLaser, NPCID.PrimeVice, NPCID.Plantera, + NPCID.PlanterasTentacle, + NPCID.Everscream, + NPCID.SantaNK1, NPCID.IceQueen, + NPCID.MourningWood, NPCID.Pumpking, NPCID.Mothron, NPCID.Golem, @@ -507,12 +496,21 @@ namespace CalamityMod NPCID.GolemHeadFree, NPCID.GolemFistRight, NPCID.GolemFistLeft, - NPCID.GolemHeadFree, + NPCID.MartianSaucerCore, + NPCID.MartianSaucerCannon, + NPCID.MartianSaucerTurret, NPCID.DukeFishron, NPCID.Sharkron, NPCID.Sharkron2, NPCID.CultistBoss, - NPCID.MoonLordHead, + NPCID.CultistDragonHead, + NPCID.CultistDragonBody1, + NPCID.CultistDragonBody2, + NPCID.CultistDragonBody3, + NPCID.CultistDragonBody4, + NPCID.CultistDragonTail, + NPCID.AncientCultistSquidhead, + NPCID.MoonLordHead, NPCID.MoonLordHand, NPCID.MoonLordCore, NPCID.MoonLordFreeEye, @@ -551,8 +549,38 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), - NPCType() - }; + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType() + }; confusionEnemyList = new List() { @@ -1266,7 +1294,8 @@ namespace CalamityMod sixtySixDamageBuffList = new List() { - ItemID.TrueNightsEdge, + ItemID.PulseBow, + ItemID.TrueNightsEdge, ItemID.MedusaHead, ItemID.StaffofEarth, ItemID.ChristmasTreeSword, @@ -1278,11 +1307,12 @@ namespace CalamityMod fiftyDamageBuffList = new List() { - ItemID.EldMelter, + ItemID.IceBow, + ItemID.Marrow, + ItemID.EldMelter, ItemID.Flamethrower, ItemID.MoonlordTurretStaff, ItemID.WaspGun, - ItemID.PulseBow, ItemID.PaladinsHammer, ItemID.SolarEruption, ItemID.DayBreak, @@ -1300,8 +1330,6 @@ namespace CalamityMod thirtyThreeDamageBuffList = new List() { ItemID.WandofSparking, - ItemID.IceBow, - ItemID.Marrow, ItemID.CrystalVileShard, ItemID.SoulDrain, ItemID.ClingerStaff, @@ -1338,6 +1366,52 @@ namespace CalamityMod tenDamageBuffList = new List() { + ItemID.WoodenArrow, + ItemID.FlamingArrow, + ItemID.UnholyArrow, + ItemID.JestersArrow, + ItemID.HellfireArrow, + ItemID.HolyArrow, + ItemID.CursedArrow, + ItemID.FrostburnArrow, + ItemID.ChlorophyteArrow, + ItemID.IchorArrow, + ItemID.VenomArrow, + ItemID.BoneArrow, + ItemID.EndlessQuiver, + ItemID.MoonlordArrow, + ItemID.DD2BetsyBow, + ItemID.BorealWoodBow, + ItemID.CopperBow, + ItemID.DemonBow, + ItemID.EbonwoodBow, + ItemID.GoldBow, + ItemID.HellwingBow, + ItemID.IronBow, + ItemID.LeadBow, + ItemID.MoltenFury, + ItemID.PalmWoodBow, + ItemID.PearlwoodBow, + ItemID.DD2PhoenixBow, + ItemID.PlatinumBow, + ItemID.RichMahoganyBow, + ItemID.ShadewoodBow, + ItemID.ShadowFlameBow, + ItemID.SilverBow, + ItemID.TendonBow, + ItemID.BeesKnees, + ItemID.TinBow, + ItemID.Tsunami, + ItemID.TungstenBow, + ItemID.WoodenBow, + ItemID.AdamantiteRepeater, + ItemID.ChlorophyteShotbow, + ItemID.CobaltRepeater, + ItemID.HallowedRepeater, + ItemID.MythrilRepeater, + ItemID.OrichalcumRepeater, + ItemID.PalladiumRepeater, + ItemID.TitaniumRepeater, ItemID.MagnetSphere, ItemID.BatScepter, ItemID.ElectrosphereLauncher @@ -1435,8 +1509,8 @@ namespace CalamityMod tenDamageNerfList = new List() { - ItemID.Phantasm, - ItemID.StarWrath + ItemID.DaedalusStormbow, + ItemID.StarWrath }; quarterDamageNerfList = new List() @@ -1444,7 +1518,6 @@ namespace CalamityMod ItemID.LastPrism, ItemID.DemonScythe, ItemID.Razorpine, - ItemID.DaedalusStormbow, ItemID.PhoenixBlaster, ItemID.InfluxWaver, ItemID.Xenopopper, diff --git a/Items/Ammo/ArcticArrow.cs b/Items/Ammo/ArcticArrow.cs index 6c58499897..04a923661c 100644 --- a/Items/Ammo/ArcticArrow.cs +++ b/Items/Ammo/ArcticArrow.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 16; + item.damage = 18; item.ranged = true; item.width = 22; item.height = 36; diff --git a/Items/Ammo/BloodfireArrow.cs b/Items/Ammo/BloodfireArrow.cs index 5691cc88d9..303fb49dda 100644 --- a/Items/Ammo/BloodfireArrow.cs +++ b/Items/Ammo/BloodfireArrow.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 26; + item.damage = 29; item.ranged = true; item.width = 14; item.height = 36; diff --git a/Items/Ammo/ElysianArrow.cs b/Items/Ammo/ElysianArrow.cs index f78dee1983..cf2930ecdb 100644 --- a/Items/Ammo/ElysianArrow.cs +++ b/Items/Ammo/ElysianArrow.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 18; + item.damage = 20; item.ranged = true; item.width = 22; item.height = 36; diff --git a/Items/Ammo/IcicleArrow.cs b/Items/Ammo/IcicleArrow.cs index 1373462cb4..ac17b39ed5 100644 --- a/Items/Ammo/IcicleArrow.cs +++ b/Items/Ammo/IcicleArrow.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 14; + item.damage = 15; item.ranged = true; item.consumable = true; item.width = 18; diff --git a/Items/Ammo/NapalmArrow.cs b/Items/Ammo/NapalmArrow.cs index a8fb3b28e6..032e8f60f5 100644 --- a/Items/Ammo/NapalmArrow.cs +++ b/Items/Ammo/NapalmArrow.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 13; + item.damage = 14; item.ranged = true; item.width = 22; item.height = 36; diff --git a/Items/Ammo/TerraArrow.cs b/Items/Ammo/TerraArrow.cs index 8d50387403..12da4f9279 100644 --- a/Items/Ammo/TerraArrow.cs +++ b/Items/Ammo/TerraArrow.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 14; + item.damage = 15; item.ranged = true; item.width = 22; item.height = 36; diff --git a/Items/Ammo/VanquisherArrow.cs b/Items/Ammo/VanquisherArrow.cs index 448e0a2f8a..c3a3efd966 100644 --- a/Items/Ammo/VanquisherArrow.cs +++ b/Items/Ammo/VanquisherArrow.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -19,7 +18,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 22; + item.damage = 24; item.ranged = true; item.width = 22; item.height = 46; diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index f927f33194..a39d594aff 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -810,7 +810,11 @@ namespace CalamityMod.Items #region Modify Weapon Damage public override void ModifyWeaponDamage(Item item, Player player, ref float add, ref float mult, ref float flat) { - if (item.type < ItemID.Count) + // Nerf archery potion damage buff from 1.2x to 1.05x + if (item.useAmmo == AmmoID.Arrow && player.archery) + mult *= 0.875f; + + if (item.type < ItemID.Count) return; // Summon weapons specifically do not have their damage affected by charge. They still require charge to function however. diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index c8e36182e8..753867eda7 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -292,6 +292,10 @@ namespace CalamityMod.Items EditTooltipByNum(0, (line) => line.text += immunityLine); } + // Nerfed Archery Potion tooltip + if (item.type == ItemID.ArcheryPotion) + EditTooltipByNum(0, (line) => line.text = "20% increased arrow speed and 1.05x arrow damage"); + // Hand Warmer provides Death Mode cold protection and has a side bonus with Eskimo armor if (item.type == ItemID.HandWarmer) { diff --git a/Items/Weapons/Ranged/Alluvion.cs b/Items/Weapons/Ranged/Alluvion.cs index 0a795ae9c0..a04e4965b7 100644 --- a/Items/Weapons/Ranged/Alluvion.cs +++ b/Items/Weapons/Ranged/Alluvion.cs @@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 150; + item.damage = 165; item.ranged = true; item.width = 60; item.height = 90; diff --git a/Items/Weapons/Ranged/Arbalest.cs b/Items/Weapons/Ranged/Arbalest.cs index 84e4d61ad4..7cb7a5f98d 100644 --- a/Items/Weapons/Ranged/Arbalest.cs +++ b/Items/Weapons/Ranged/Arbalest.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 32; + item.damage = 36; item.ranged = true; item.width = 82; item.height = 34; diff --git a/Items/Weapons/Ranged/ArterialAssault.cs b/Items/Weapons/Ranged/ArterialAssault.cs index 0ad0be634b..2540705c3e 100644 --- a/Items/Weapons/Ranged/ArterialAssault.cs +++ b/Items/Weapons/Ranged/ArterialAssault.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 116; + item.damage = 128; item.ranged = true; item.width = 44; item.height = 100; diff --git a/Items/Weapons/Ranged/AstralRepeater.cs b/Items/Weapons/Ranged/AstralRepeater.cs index e321180af6..43525a57a8 100644 --- a/Items/Weapons/Ranged/AstralRepeater.cs +++ b/Items/Weapons/Ranged/AstralRepeater.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 90; + item.damage = 99; item.ranged = true; item.width = 38; item.height = 78; diff --git a/Items/Weapons/Ranged/AstrealDefeat.cs b/Items/Weapons/Ranged/AstrealDefeat.cs index 5cf4379c51..5dd3378fd9 100644 --- a/Items/Weapons/Ranged/AstrealDefeat.cs +++ b/Items/Weapons/Ranged/AstrealDefeat.cs @@ -20,7 +20,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 139; + item.damage = 153; item.ranged = true; item.width = 40; item.height = 78; diff --git a/Items/Weapons/Ranged/Barinade.cs b/Items/Weapons/Ranged/Barinade.cs index f98abee769..df949f4a2a 100644 --- a/Items/Weapons/Ranged/Barinade.cs +++ b/Items/Weapons/Ranged/Barinade.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 8; + item.damage = 9; item.ranged = true; item.width = 30; item.height = 44; diff --git a/Items/Weapons/Ranged/Barinautical.cs b/Items/Weapons/Ranged/Barinautical.cs index 6b03d405bc..5497dd59bb 100644 --- a/Items/Weapons/Ranged/Barinautical.cs +++ b/Items/Weapons/Ranged/Barinautical.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 25; + item.damage = 28; item.ranged = true; item.width = 30; item.height = 42; diff --git a/Items/Weapons/Ranged/BladedgeGreatbow.cs b/Items/Weapons/Ranged/BladedgeGreatbow.cs index 545d583223..644044908c 100644 --- a/Items/Weapons/Ranged/BladedgeGreatbow.cs +++ b/Items/Weapons/Ranged/BladedgeGreatbow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 25; + item.damage = 28; item.ranged = true; item.width = 74; item.height = 24; @@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + (float)Main.rand.Next(-60, 61) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-60, 61) * 0.05f; - int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); Main.projectile[index].noDropItem = true; } Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true); diff --git a/Items/Weapons/Ranged/BlossomFlux.cs b/Items/Weapons/Ranged/BlossomFlux.cs index 8368c9ad7b..76746e2800 100644 --- a/Items/Weapons/Ranged/BlossomFlux.cs +++ b/Items/Weapons/Ranged/BlossomFlux.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 22; + item.damage = 25; item.ranged = true; item.width = 38; item.height = 68; @@ -63,11 +63,11 @@ namespace CalamityMod.Items.Weapons.Ranged { if (player.altFunctionUse == 2) { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)((double)damage * 4.0), knockBack * 60f, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), (int)(damage * 4D), knockBack * 60f, player.whoAmI); } else { - Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0.0f, 0.0f); + Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); } return false; } diff --git a/Items/Weapons/Ranged/BrimstoneFury.cs b/Items/Weapons/Ranged/BrimstoneFury.cs index 585546dc92..b2c3c43ffa 100644 --- a/Items/Weapons/Ranged/BrimstoneFury.cs +++ b/Items/Weapons/Ranged/BrimstoneFury.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 35; + item.damage = 39; item.ranged = true; item.width = 30; item.height = 58; diff --git a/Items/Weapons/Ranged/ClockworkBow.cs b/Items/Weapons/Ranged/ClockworkBow.cs index 2ea823ab10..d5cf85a26a 100644 --- a/Items/Weapons/Ranged/ClockworkBow.cs +++ b/Items/Weapons/Ranged/ClockworkBow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 60; + item.damage = 66; item.ranged = true; item.width = 34; item.height = 100; @@ -94,7 +94,7 @@ namespace CalamityMod.Items.Weapons.Ranged num79 *= num80; float speedX4 = num78 + (float)Main.rand.Next(-600, 601) * 0.01f; float speedY5 = num79 + (float)Main.rand.Next(-600, 601) * 0.01f; - int projectile = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, num73, num74, i, 0f, 0f); + int projectile = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, num73, num74, i); Main.projectile[projectile].tileCollide = false; Main.projectile[projectile].timeLeft = 240; Main.projectile[projectile].noDropItem = true; diff --git a/Items/Weapons/Ranged/Contagion.cs b/Items/Weapons/Ranged/Contagion.cs index 20f30b579a..669d33a369 100644 --- a/Items/Weapons/Ranged/Contagion.cs +++ b/Items/Weapons/Ranged/Contagion.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 800; + item.damage = 880; item.ranged = true; item.width = 22; item.height = 50; diff --git a/Items/Weapons/Ranged/CorrodedCaustibow.cs b/Items/Weapons/Ranged/CorrodedCaustibow.cs index 945f52d4de..5c23f18ce0 100644 --- a/Items/Weapons/Ranged/CorrodedCaustibow.cs +++ b/Items/Weapons/Ranged/CorrodedCaustibow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 80; + item.damage = 88; item.ranged = true; item.width = 30; item.height = 38; diff --git a/Items/Weapons/Ranged/CosmicBolter.cs b/Items/Weapons/Ranged/CosmicBolter.cs index af5ae67f9d..068e05a682 100644 --- a/Items/Weapons/Ranged/CosmicBolter.cs +++ b/Items/Weapons/Ranged/CosmicBolter.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 35; + item.damage = 39; item.ranged = true; item.width = 40; item.height = 76; diff --git a/Items/Weapons/Ranged/DaemonsFlame.cs b/Items/Weapons/Ranged/DaemonsFlame.cs index 10e9fed762..fea2ef351e 100644 --- a/Items/Weapons/Ranged/DaemonsFlame.cs +++ b/Items/Weapons/Ranged/DaemonsFlame.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 123; + item.damage = 135; item.width = 62; item.height = 128; item.useTime = 12; diff --git a/Items/Weapons/Ranged/DarkechoGreatbow.cs b/Items/Weapons/Ranged/DarkechoGreatbow.cs index 54265c5709..d125919ff9 100644 --- a/Items/Weapons/Ranged/DarkechoGreatbow.cs +++ b/Items/Weapons/Ranged/DarkechoGreatbow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 34; + item.damage = 37; item.ranged = true; item.width = 34; item.height = 62; @@ -41,10 +41,10 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; - int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); Main.projectile[index].noDropItem = true; } - int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ProjectileID.CrystalDart, damage, knockBack, player.whoAmI, 0f, 0f); + int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ProjectileID.CrystalDart, damage / 2, knockBack, player.whoAmI); Main.projectile[projectile].penetrate = 3; return false; } diff --git a/Items/Weapons/Ranged/Deathwind.cs b/Items/Weapons/Ranged/Deathwind.cs index 36b8b1227b..11cf5186af 100644 --- a/Items/Weapons/Ranged/Deathwind.cs +++ b/Items/Weapons/Ranged/Deathwind.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 225; + item.damage = 248; item.ranged = true; item.width = 40; item.height = 82; @@ -50,11 +50,11 @@ namespace CalamityMod.Items.Weapons.Ranged float SpeedY = speedY + Main.rand.Next(-20, 21) * 0.05f; if (type == ProjectileID.WoodenArrowFriendly) { - Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); } else { - int num121 = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.8), knockBack, player.whoAmI, 0f, 0f); + int num121 = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.8), knockBack, player.whoAmI); Main.projectile[num121].noDropItem = true; } } diff --git a/Items/Weapons/Ranged/Drataliornus.cs b/Items/Weapons/Ranged/Drataliornus.cs index a164c41246..f1ced9fdd0 100644 --- a/Items/Weapons/Ranged/Drataliornus.cs +++ b/Items/Weapons/Ranged/Drataliornus.cs @@ -24,7 +24,7 @@ Right click to fire two devastating barrages of five empowered fireballs. public override void SetDefaults() { - item.damage = 210; + item.damage = 231; item.knockBack = 1f; item.shootSpeed = 18f; item.useStyle = ItemUseStyleID.HoldingOut; diff --git a/Items/Weapons/Ranged/EffluviumBow.cs b/Items/Weapons/Ranged/EffluviumBow.cs index 7f93344f01..b6ea7a4a0c 100644 --- a/Items/Weapons/Ranged/EffluviumBow.cs +++ b/Items/Weapons/Ranged/EffluviumBow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 51; + item.damage = 56; item.ranged = true; item.width = 26; item.height = 70; diff --git a/Items/Weapons/Ranged/EternalBlizzard.cs b/Items/Weapons/Ranged/EternalBlizzard.cs index b9cf8264a0..0655bc5e9f 100644 --- a/Items/Weapons/Ranged/EternalBlizzard.cs +++ b/Items/Weapons/Ranged/EternalBlizzard.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Items.Weapons.Ranged } public override void SetDefaults() { - item.damage = 73; + item.damage = 80; item.ranged = true; item.width = 38; item.height = 62; @@ -37,7 +37,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + (float)Main.rand.Next(-10, 11) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-10, 11) * 0.05f; - int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(damage * 0.7f), knockBack, player.whoAmI, 0f, 0f); + int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, ModContent.ProjectileType(), (int)(damage * 0.7f), knockBack, player.whoAmI); Main.projectile[index].noDropItem = true; return true; diff --git a/Items/Weapons/Ranged/FlarewingBow.cs b/Items/Weapons/Ranged/FlarewingBow.cs index 6ba4c06caa..6c4e1d6f48 100644 --- a/Items/Weapons/Ranged/FlarewingBow.cs +++ b/Items/Weapons/Ranged/FlarewingBow.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 15; + item.damage = 17; item.ranged = true; item.width = 20; item.height = 62; @@ -55,12 +55,12 @@ namespace CalamityMod.Items.Weapons.Ranged } if (type == ProjectileID.WoodenArrowFriendly) { - int num123 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI, 0f, 0f); + int num123 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, ModContent.ProjectileType(), damage, knockBack, player.whoAmI); Main.projectile[num123].noDropItem = true; } else { - int num123 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f); + int num123 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); Main.projectile[num123].noDropItem = true; } } diff --git a/Items/Weapons/Ranged/Galeforce.cs b/Items/Weapons/Ranged/Galeforce.cs index 3ab6e4f38e..07fb34fb34 100644 --- a/Items/Weapons/Ranged/Galeforce.cs +++ b/Items/Weapons/Ranged/Galeforce.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 16; + item.damage = 18; item.ranged = true; item.width = 32; item.height = 52; @@ -40,7 +40,7 @@ namespace CalamityMod.Items.Weapons.Ranged for (int i = -8; i <= 8; i += 8) { Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(i)); - Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType(), damage / 4, 0f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position, perturbedSpeed, ModContent.ProjectileType(), damage / 4, 0f, player.whoAmI); } return true; } diff --git a/Items/Weapons/Ranged/Goobow.cs b/Items/Weapons/Ranged/Goobow.cs index 285b48b6cb..2683865d18 100644 --- a/Items/Weapons/Ranged/Goobow.cs +++ b/Items/Weapons/Ranged/Goobow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 30; + item.damage = 33; item.ranged = true; item.width = 30; item.height = 50; diff --git a/Items/Weapons/Ranged/GreatbowofTurmoil.cs b/Items/Weapons/Ranged/GreatbowofTurmoil.cs index 94ee9b1fbb..ee6f68dc88 100644 --- a/Items/Weapons/Ranged/GreatbowofTurmoil.cs +++ b/Items/Weapons/Ranged/GreatbowofTurmoil.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 31; + item.damage = 34; item.ranged = true; item.width = 18; item.height = 36; @@ -57,7 +57,7 @@ namespace CalamityMod.Items.Weapons.Ranged { type = ProjectileID.FireArrow; } - int num121 = Projectile.NewProjectile(source + offset, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f); + int num121 = Projectile.NewProjectile(source + offset, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI); Main.projectile[num121].noDropItem = true; } for (int i = 0; i < 2; i++) @@ -70,7 +70,7 @@ namespace CalamityMod.Items.Weapons.Ranged ProjectileID.HellfireArrow, ProjectileID.IchorArrow }); - int index = Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, (int)(damage * 0.5f), knockBack, player.whoAmI, 0f, 0f); + int index = Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, (int)(damage * 0.5f), knockBack, player.whoAmI); Main.projectile[index].noDropItem = true; Main.projectile[index].usesLocalNPCImmunity = true; Main.projectile[index].localNPCHitCooldown = 10; diff --git a/Items/Weapons/Ranged/HeavenlyGale.cs b/Items/Weapons/Ranged/HeavenlyGale.cs index 79778836df..cad26edbf9 100644 --- a/Items/Weapons/Ranged/HeavenlyGale.cs +++ b/Items/Weapons/Ranged/HeavenlyGale.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 180; + item.damage = 198; item.ranged = true; item.width = 44; item.height = 58; diff --git a/Items/Weapons/Ranged/LunarianBow.cs b/Items/Weapons/Ranged/LunarianBow.cs index a906748203..b7ac84a6a4 100644 --- a/Items/Weapons/Ranged/LunarianBow.cs +++ b/Items/Weapons/Ranged/LunarianBow.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 29; + item.damage = 32; item.ranged = true; item.width = 22; item.height = 62; diff --git a/Items/Weapons/Ranged/Malevolence.cs b/Items/Weapons/Ranged/Malevolence.cs index 62e7d7bde6..5f6ad22d3b 100644 --- a/Items/Weapons/Ranged/Malevolence.cs +++ b/Items/Weapons/Ranged/Malevolence.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 51; + item.damage = 56; item.ranged = true; item.width = 36; item.height = 58; diff --git a/Items/Weapons/Ranged/MandibleBow.cs b/Items/Weapons/Ranged/MandibleBow.cs index ef54421387..1efd420107 100644 --- a/Items/Weapons/Ranged/MandibleBow.cs +++ b/Items/Weapons/Ranged/MandibleBow.cs @@ -1,7 +1,6 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -//using TerrariaOverhaul; namespace CalamityMod.Items.Weapons.Ranged { @@ -14,7 +13,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 13; + item.damage = 14; item.ranged = true; item.width = 22; item.height = 40; @@ -28,13 +27,8 @@ namespace CalamityMod.Items.Weapons.Ranged item.UseSound = SoundID.Item5; item.autoReuse = false; item.shoot = ProjectileID.PurificationPowder; - item.shootSpeed = 30f; + item.shootSpeed = 15f; item.useAmmo = AmmoID.Arrow; } - - /*public void OverhaulInit() - { - this.SetTag("bow"); - }*/ } } diff --git a/Items/Weapons/Ranged/MarksmanBow.cs b/Items/Weapons/Ranged/MarksmanBow.cs index ef39ff086c..7e1aba9f60 100644 --- a/Items/Weapons/Ranged/MarksmanBow.cs +++ b/Items/Weapons/Ranged/MarksmanBow.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 27; + item.damage = 30; item.ranged = true; item.width = 36; item.height = 110; @@ -52,7 +52,7 @@ namespace CalamityMod.Items.Weapons.Ranged int randomExtraUpdates = Main.rand.Next(3); float SpeedX = speedX + Main.rand.NextFloat(-10f, 10f) * 0.05f; float SpeedY = speedY + Main.rand.NextFloat(-10f, 10f) * 0.05f; - int arrow = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + int arrow = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); Main.projectile[arrow].noDropItem = true; Main.projectile[arrow].extraUpdates += randomExtraUpdates; //0 to 2 extra updates if (type == ProjectileID.JestersArrow) diff --git a/Items/Weapons/Ranged/Monsoon.cs b/Items/Weapons/Ranged/Monsoon.cs index bfe974a56c..b83678ce00 100644 --- a/Items/Weapons/Ranged/Monsoon.cs +++ b/Items/Weapons/Ranged/Monsoon.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 110; + item.damage = 121; item.ranged = true; item.width = 46; item.height = 78; diff --git a/Items/Weapons/Ranged/NettlelineGreatbow.cs b/Items/Weapons/Ranged/NettlelineGreatbow.cs index 9e484532a9..12e903e8e3 100644 --- a/Items/Weapons/Ranged/NettlelineGreatbow.cs +++ b/Items/Weapons/Ranged/NettlelineGreatbow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 66; + item.damage = 73; item.ranged = true; item.width = 36; item.height = 64; @@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Ranged { value9 -= vector7; } - int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI); Main.projectile[num121].noDropItem = true; } for (int i = 0; i < 2; i++) @@ -71,7 +71,7 @@ namespace CalamityMod.Items.Weapons.Ranged default: break; } - int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0f, 0f); + int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI); Main.projectile[index].noDropItem = true; } return false; diff --git a/Items/Weapons/Ranged/Phangasm.cs b/Items/Weapons/Ranged/Phangasm.cs index d7e01f2558..443615e0cd 100644 --- a/Items/Weapons/Ranged/Phangasm.cs +++ b/Items/Weapons/Ranged/Phangasm.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 100; + item.damage = 110; item.width = 20; item.height = 12; item.useTime = 12; diff --git a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs index 613c13324a..cac500b1b0 100644 --- a/Items/Weapons/Ranged/PlanetaryAnnihilation.cs +++ b/Items/Weapons/Ranged/PlanetaryAnnihilation.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 53; + item.damage = 58; item.ranged = true; item.width = 58; item.height = 102; @@ -96,7 +96,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float speedX4 = num78 + Main.rand.Next(-120, 121) * 0.02f; float speedY5 = num79 + Main.rand.Next(-120, 121) * 0.02f; - int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI, 0f, 0f); + int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, player.whoAmI); Main.projectile[num121].noDropItem = true; } } diff --git a/Items/Weapons/Ranged/RaidersGlory.cs b/Items/Weapons/Ranged/RaidersGlory.cs index 8f1a6ee389..e9455cec62 100644 --- a/Items/Weapons/Ranged/RaidersGlory.cs +++ b/Items/Weapons/Ranged/RaidersGlory.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 40; + item.damage = 44; item.ranged = true; item.width = 50; item.height = 22; @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { - int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ProjectileID.IchorArrow, damage, knockBack, player.whoAmI, 0f, 0f); + int projectile = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ProjectileID.IchorArrow, damage, knockBack, player.whoAmI); Main.projectile[projectile].extraUpdates++; return false; } diff --git a/Items/Weapons/Ranged/Seabow.cs b/Items/Weapons/Ranged/Seabow.cs index 3885ee3097..88ea30d220 100644 --- a/Items/Weapons/Ranged/Seabow.cs +++ b/Items/Weapons/Ranged/Seabow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 11; + item.damage = 12; item.ranged = true; item.width = 22; item.height = 46; @@ -39,7 +39,7 @@ namespace CalamityMod.Items.Weapons.Ranged { float SpeedX = speedX + (float)Main.rand.Next(-30, 31) * 0.05f; float SpeedY = speedY + (float)Main.rand.Next(-30, 31) * 0.05f; - Projectile.NewProjectile(position.X, position.Y, SpeedX * 0.5f, SpeedY * 0.5f, ModContent.ProjectileType(), (int)((double)damage * 0.4), 0f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(position.X, position.Y, SpeedX * 0.5f, SpeedY * 0.5f, ModContent.ProjectileType(), (int)(damage * 0.4), 0f, player.whoAmI); return true; } diff --git a/Items/Weapons/Ranged/Shellshooter.cs b/Items/Weapons/Ranged/Shellshooter.cs index d76e7cdcbc..3239ae9374 100644 --- a/Items/Weapons/Ranged/Shellshooter.cs +++ b/Items/Weapons/Ranged/Shellshooter.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 30; + item.damage = 33; item.ranged = true; item.width = 30; item.height = 38; diff --git a/Items/Weapons/Ranged/TelluricGlare.cs b/Items/Weapons/Ranged/TelluricGlare.cs index e73b4c60e5..6d0280ffd7 100644 --- a/Items/Weapons/Ranged/TelluricGlare.cs +++ b/Items/Weapons/Ranged/TelluricGlare.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 160; + item.damage = 176; item.ranged = true; item.width = 54; item.height = 92; diff --git a/Items/Weapons/Ranged/TheBallista.cs b/Items/Weapons/Ranged/TheBallista.cs index 580fe39378..947b4357db 100644 --- a/Items/Weapons/Ranged/TheBallista.cs +++ b/Items/Weapons/Ranged/TheBallista.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 90; + item.damage = 99; item.ranged = true; item.width = 40; item.height = 70; diff --git a/Items/Weapons/Ranged/TheStorm.cs b/Items/Weapons/Ranged/TheStorm.cs index 3caceec9a9..21453f6289 100644 --- a/Items/Weapons/Ranged/TheStorm.cs +++ b/Items/Weapons/Ranged/TheStorm.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 22; + item.damage = 24; item.ranged = true; item.width = 34; item.height = 50; @@ -87,17 +87,17 @@ namespace CalamityMod.Items.Weapons.Ranged float speedY5 = num79 + (float)Main.rand.Next(-120, 121) * 0.01f; if (type == ProjectileID.WoodenArrowFriendly) { - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType(), damage, num74, i, 0f, 0f); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType(), damage, num74, i, 0f, 0f); - Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, ModContent.ProjectileType(), damage, num74, i, 0f, 0f); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, ModContent.ProjectileType(), damage, num74, i); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, ModContent.ProjectileType(), damage, num74, i); + Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, ModContent.ProjectileType(), damage, num74, i); } else { - int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, damage, num74, i, 0f, 0f); + int num121 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.9f, type, damage, num74, i); Main.projectile[num121].noDropItem = true; - int num122 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, damage, num74, i, 0f, 0f); + int num122 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.8f, type, damage, num74, i); Main.projectile[num122].noDropItem = true; - int num123 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, type, damage, num74, i, 0f, 0f); + int num123 = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5 * 0.7f, type, damage, num74, i); Main.projectile[num123].noDropItem = true; } } diff --git a/Items/Weapons/Ranged/Toxibow.cs b/Items/Weapons/Ranged/Toxibow.cs index 8e04d265c1..54d92d0889 100644 --- a/Items/Weapons/Ranged/Toxibow.cs +++ b/Items/Weapons/Ranged/Toxibow.cs @@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 8; + item.damage = 9; item.ranged = true; item.width = 20; item.height = 54; diff --git a/Items/Weapons/Ranged/Ultima.cs b/Items/Weapons/Ranged/Ultima.cs index e42439a840..19d0b237cf 100644 --- a/Items/Weapons/Ranged/Ultima.cs +++ b/Items/Weapons/Ranged/Ultima.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 105; + item.damage = 116; item.ranged = true; item.width = 44; item.height = 58; diff --git a/Items/Weapons/Ranged/WulfrumBow.cs b/Items/Weapons/Ranged/WulfrumBow.cs index 232004bc1d..1660639d10 100644 --- a/Items/Weapons/Ranged/WulfrumBow.cs +++ b/Items/Weapons/Ranged/WulfrumBow.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Materials; using Terraria; using Terraria.ID; using Terraria.ModLoader; -//using TerrariaOverhaul; namespace CalamityMod.Items.Weapons.Ranged { @@ -15,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged public override void SetDefaults() { - item.damage = 10; + item.damage = 11; item.ranged = true; item.width = 27; item.height = 38; @@ -33,11 +32,6 @@ namespace CalamityMod.Items.Weapons.Ranged item.useAmmo = AmmoID.Arrow; } - /*public void OverhaulInit() - { - this.SetTag("bow"); - }*/ - public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); diff --git a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs index 1214a2b63e..9302bb29e3 100644 --- a/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyAltHuge.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.Abyss { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/Abyss/EidolonWyrmBodyHuge.cs b/NPCs/Abyss/EidolonWyrmBodyHuge.cs index 51c99a9d51..197f7113c1 100644 --- a/NPCs/Abyss/EidolonWyrmBodyHuge.cs +++ b/NPCs/Abyss/EidolonWyrmBodyHuge.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.Abyss { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index ae640abc78..a7182ef055 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -271,7 +271,7 @@ namespace CalamityMod.NPCs.Abyss npc.dontTakeDamage = invisiblePartOfChargePhase || invisiblePartOfLightningChargePhase || invisiblePhase; if (!invisiblePartOfChargePhase && !invisiblePartOfLightningChargePhase && !invisiblePhase) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/Abyss/EidolonWyrmTailHuge.cs b/NPCs/Abyss/EidolonWyrmTailHuge.cs index e8eb77af1e..bec65dd492 100644 --- a/NPCs/Abyss/EidolonWyrmTailHuge.cs +++ b/NPCs/Abyss/EidolonWyrmTailHuge.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.Abyss { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 9ec5392201..746cb893cb 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -102,6 +102,10 @@ namespace CalamityMod.NPCs // Max velocity used in contact damage scaling public float maxVelocity = 0f; + // Dash damage immunity timer + public const int maxPlayerImmunities = Main.maxPlayers + 1; + public int[] dashImmunityTime = new int[maxPlayerImmunities]; + // Town NPC shop alert animation variables public int shopAlertAnimTimer = 0; public int shopAlertAnimFrame = 0; @@ -1970,6 +1974,13 @@ namespace CalamityMod.NPCs { CalamityGlobalTownNPC.SetPatreonTownNPCName(npc, mod); + // Decrement each immune timer if it's greater than 0. + for (int i = 0; i < maxPlayerImmunities; i++) + { + if (dashImmunityTime[i] > 0) + dashImmunityTime[i]--; + } + if (CalamityPlayer.areThereAnyDamnBosses) { if (npc.velocity.Length() > maxVelocity) diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index 1438c463c2..a994d1eb50 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -1,6 +1,8 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Events; using CalamityMod.Projectiles.Boss; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -18,7 +20,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { - DisplayName.SetDefault("Thanatos"); + DisplayName.SetDefault("XM-05 Thanatos"); Main.npcFrameCount[npc.type] = 5; } @@ -32,7 +34,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.defense = 100; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; - npc.LifeMaxNERB(1000000, 1150000); + npc.LifeMaxNERB(1000000, 1150000, 500000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; @@ -80,6 +82,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; + // Difficulty modes + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || malice; + bool revenge = CalamityWorld.revenge || malice; + bool expertMode = Main.expertMode || malice; + // Check if other segments are still alive, if not, die bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) @@ -113,7 +121,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -134,11 +142,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { if (Main.netMode != NetmodeID.MultiplayerClient) { - npc.ai[3] += 1f; + // Only charge up lasers if not venting or firing lasers + if (npc.Calamity().newAI[0] == 0f) + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) { - float divisor = 180f; - if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + float divisor = 120f; + int numSegments = ThanatosHead.minLength; + double numSegmentsAbleToFire = malice ? 25D : death ? 20D : revenge ? 17.5 : expertMode ? 15D : 10D; + float segmentDivisor = (float)Math.Round(numSegments / numSegmentsAbleToFire); + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % segmentDivisor == 0f) || npc.Calamity().newAI[0] > 0f) { // Body is vulnerable while firing lasers vulnerable = true; @@ -175,15 +189,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - float laserVelocity = 12f; for (int i = 0; i < numProjectiles; i++) { // Normal laser - Vector2 projectileDestination = targetCenterArray[i] - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } } } @@ -202,7 +213,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else { npc.ai[3] += 1f; - float shootProjectile = 60f; + float shootProjectile = 120f; float timer = npc.ai[0] + 15f; float divisor = timer + shootProjectile; if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) @@ -242,8 +253,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - float predictionAmt = 20f; - float laserVelocity = 12f; + float predictionAmt = malice ? 40f : death ? 25f : revenge ? 20f : expertMode ? 15f : 5f; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { @@ -251,25 +263,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) { // Normal laser - Vector2 projectileDestination = targetCenterArray[i] - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } else { // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt; + Projectile.NewProjectile(npc.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt; + Projectile.NewProjectile(npc.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index f7c3d846d8..fe0c033757 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -1,6 +1,8 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Events; using CalamityMod.Projectiles.Boss; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -18,7 +20,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { - DisplayName.SetDefault("Thanatos"); + DisplayName.SetDefault("XM-05 Thanatos"); Main.npcFrameCount[npc.type] = 5; } @@ -32,7 +34,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.defense = 100; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; - npc.LifeMaxNERB(1000000, 1150000); + npc.LifeMaxNERB(1000000, 1150000, 500000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; @@ -80,6 +82,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; + // Difficulty modes + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || malice; + bool revenge = CalamityWorld.revenge || malice; + bool expertMode = Main.expertMode || malice; + // Check if other segments are still alive, if not, die bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) @@ -113,7 +121,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -134,11 +142,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { if (Main.netMode != NetmodeID.MultiplayerClient) { - npc.ai[3] += 1f; + // Only charge up lasers if not venting or firing lasers + if (npc.Calamity().newAI[0] == 0f) + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) { - float divisor = 180f; - if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + float divisor = 120f; + int numSegments = ThanatosHead.minLength; + double numSegmentsAbleToFire = malice ? 25D : death ? 20D : revenge ? 17.5 : expertMode ? 15D : 10D; + float segmentDivisor = (float)Math.Round(numSegments / numSegmentsAbleToFire); + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % segmentDivisor == 0f) || npc.Calamity().newAI[0] > 0f) { // Body is vulnerable while firing lasers vulnerable = true; @@ -175,15 +189,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - float laserVelocity = 12f; for (int i = 0; i < numProjectiles; i++) { // Normal laser - Vector2 projectileDestination = targetCenterArray[i] - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } } } @@ -202,7 +213,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else { npc.ai[3] += 1f; - float shootProjectile = 60f; + float shootProjectile = 120f; float timer = npc.ai[0] + 15f; float divisor = timer + shootProjectile; if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) @@ -242,8 +253,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - float predictionAmt = 20f; - float laserVelocity = 12f; + float predictionAmt = malice ? 40f : death ? 25f : revenge ? 20f : expertMode ? 15f : 5f; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { @@ -251,25 +263,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) { // Normal laser - Vector2 projectileDestination = targetCenterArray[i] - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } else { // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt; + Projectile.NewProjectile(npc.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt; + Projectile.NewProjectile(npc.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index 2fc38539ec..25ac275364 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -1,6 +1,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -57,7 +58,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos private const float soundDistance = 2800f; // Length variables - private const int minLength = 100; + public const int minLength = 100; private const int maxLength = 101; // Variable used to stop the segment spawning loop @@ -67,14 +68,14 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos private float chargeVelocityScalar = 0f; // Total duration of the deathray telegraph - private const float deathrayTelegraphDuration = 120f; + private const float deathrayTelegraphDuration = 180f; // Total duration of the deathray private const float deathrayDuration = 180f; public override void SetStaticDefaults() { - DisplayName.SetDefault("Thanatos"); + DisplayName.SetDefault("XM-05 Thanatos"); Main.npcFrameCount[npc.type] = 5; } @@ -88,7 +89,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.defense = 80; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; - npc.LifeMaxNERB(1000000, 1150000); + npc.LifeMaxNERB(1000000, 1150000, 500000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; @@ -322,7 +323,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.dontTakeDamage = invisiblePhase; if (!invisiblePhase) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -352,8 +353,14 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos float laserBarrageLocationDistance = turnDistance * 5f; // Velocity and turn speed values - float baseVelocity = 9f; - float turnSpeed = MathHelper.ToRadians(1f); + float baseVelocity = malice ? 12f : death ? 11f : revenge ? 10.5f : expertMode ? 10f : 9f; + float turnDegrees = malice ? 1.33f : death ? 1.22f : revenge ? 1.17f : expertMode ? 1.11f : 1f; + if (berserk) + { + baseVelocity *= 1.2f; + turnDegrees *= 1.2f; + } + float turnSpeed = MathHelper.ToRadians(turnDegrees); float chargeVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); float chargeTurnSpeedMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); float laserBarragePhaseVelocityMult = MathHelper.Lerp(1f, 2f, chargeVelocityScalar); @@ -590,17 +597,38 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (calamityGlobalNPC.newAI[2] < deathrayTelegraphDuration) { // Fire deathray telegraph beams - if (Main.netMode != NetmodeID.MultiplayerClient) + if (calamityGlobalNPC.newAI[2] == 0f) { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + for (int b = 0; b < 6; b++) + { + int beam = Projectile.NewProjectile(npc.Center, Vector2.Zero, type, 0, 0f, 255, npc.whoAmI); + // Determine the initial offset angle of telegraph. It will be smoothened to give a "stretch" effect. + if (Main.projectile.IndexInRange(beam)) + { + float squishedRatio = (float)Math.Pow((float)Math.Sin(MathHelper.Pi * b / 6f), 2D); + float smoothenedRatio = MathHelper.SmoothStep(0f, 1f, squishedRatio); + Main.projectile[beam].ai[1] = MathHelper.Lerp(-0.74f, 0.74f, smoothenedRatio); + } + } + Projectile.NewProjectile(npc.Center, Vector2.Zero, type, 0, 0f, 255, npc.whoAmI); + } } } else { // Fire deathray - if (Main.netMode != NetmodeID.MultiplayerClient) + if (calamityGlobalNPC.newAI[2] == deathrayTelegraphDuration) { - + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); + Projectile.NewProjectile(npc.Center, Vector2.Zero, type, damage, 0f, 255, npc.whoAmI); + } } } diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 61dd111125..5c195cc6f9 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -1,6 +1,8 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Events; using CalamityMod.Projectiles.Boss; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; @@ -18,7 +20,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos public override void SetStaticDefaults() { - DisplayName.SetDefault("Thanatos"); + DisplayName.SetDefault("XM-05 Thanatos"); Main.npcFrameCount[npc.type] = 5; } @@ -32,7 +34,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos npc.defense = 120; npc.DR_NERD(0.99f); npc.Calamity().unbreakableDR = true; - npc.LifeMaxNERB(1000000, 1150000); + npc.LifeMaxNERB(1000000, 1150000, 500000); double HPBoost = CalamityConfig.Instance.BossHealthBoost * 0.01; npc.lifeMax += (int)(npc.lifeMax * HPBoost); npc.aiStyle = -1; @@ -80,6 +82,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (npc.ai[2] > 0f) npc.realLife = (int)npc.ai[2]; + // Difficulty modes + bool malice = CalamityWorld.malice || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || malice; + bool revenge = CalamityWorld.revenge || malice; + bool expertMode = Main.expertMode || malice; + // Check if other segments are still alive, if not, die bool shouldDespawn = true; for (int i = 0; i < Main.maxNPCs; i++) @@ -113,7 +121,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { if (Main.npc[(int)npc.ai[1]].Opacity > 0.5f) { - npc.Opacity += 0.15f; + npc.Opacity += 0.2f; if (npc.Opacity > 1f) npc.Opacity = 1f; } @@ -134,11 +142,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos { if (Main.netMode != NetmodeID.MultiplayerClient) { - npc.ai[3] += 1f; + // Only charge up lasers if not venting or firing lasers + if (npc.Calamity().newAI[0] == 0f) + npc.ai[3] += 1f; + if (calamityGlobalNPC_Head.newAI[0] == (float)ThanatosHead.Phase.Charge) { - float divisor = 180f; - if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % 10f == 0f) || npc.Calamity().newAI[0] > 0f) + float divisor = 120f; + int numSegments = ThanatosHead.minLength; + double numSegmentsAbleToFire = malice ? 25D : death ? 20D : revenge ? 17.5 : expertMode ? 15D : 10D; + float segmentDivisor = (float)Math.Round(numSegments / numSegmentsAbleToFire); + if ((npc.ai[3] % divisor == 0f && npc.localAI[2] % segmentDivisor == 0f) || npc.Calamity().newAI[0] > 0f) { // Body is vulnerable while firing lasers vulnerable = true; @@ -175,15 +189,12 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - float laserVelocity = 12f; for (int i = 0; i < numProjectiles; i++) { // Normal laser - Vector2 projectileDestination = targetCenterArray[i] - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } } } @@ -202,7 +213,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else { npc.ai[3] += 1f; - float shootProjectile = 60f; + float shootProjectile = 120f; float timer = npc.ai[0] + 15f; float divisor = timer + shootProjectile; if (npc.ai[3] % divisor == 0f || npc.Calamity().newAI[0] > 0f) @@ -242,8 +253,9 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } } - float predictionAmt = 20f; - float laserVelocity = 12f; + float predictionAmt = malice ? 40f : death ? 25f : revenge ? 20f : expertMode ? 15f : 5f; + int type = ModContent.ProjectileType(); + int damage = npc.GetProjectileDamage(type); Main.PlaySound(mod.GetLegacySoundSlot(SoundType.Item, "Sounds/Item/LaserCannon"), npc.Center); for (int i = 0; i < numProjectiles; i++) { @@ -251,25 +263,17 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos if (calamityGlobalNPC_Head.newAI[1] == (float)ThanatosHead.SecondaryPhase.Passive) { // Normal laser - Vector2 projectileDestination = targetCenterArray[i] - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Projectile.NewProjectile(npc.Center, targetCenterArray[i], type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } else { // Predictive laser - Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - Vector2 projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + Vector2 projectileDestination = targetCenterArray[i] + Main.player[whoAmIArray[i]].velocity * predictionAmt; + Projectile.NewProjectile(npc.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); // Opposite laser - projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt - npc.Center; - projectileVelocity = Vector2.Normalize(projectileDestination) * laserVelocity; - Projectile.NewProjectile(npc.Center, projectileVelocity, type, damage, 0f, Main.myPlayer); + projectileDestination = targetCenterArray[i] - Main.player[whoAmIArray[i]].velocity * predictionAmt; + Projectile.NewProjectile(npc.Center, projectileDestination, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); } } } diff --git a/Projectiles/Boss/ExoDestroyerBeamStart.cs b/Projectiles/Boss/ExoDestroyerBeamStart.cs new file mode 100644 index 0000000000..6ee5159bab --- /dev/null +++ b/Projectiles/Boss/ExoDestroyerBeamStart.cs @@ -0,0 +1,271 @@ +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using CalamityMod.Events; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System; +using System.IO; +using Terraria; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.Boss +{ + public class ExoDestroyerBeamStart : ModProjectile + { + public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[0]) ? Main.npc[(int)projectile.ai[0]] : null; + public ref float Time => ref projectile.localAI[0]; + public ref float LengthOfLaser => ref projectile.localAI[1]; + public const int Lifetime = 180; + public const float BeamPosOffset = 16f; + + public override void SetStaticDefaults() + { + DisplayName.SetDefault("Thanatos Deathray"); + Main.projFrames[projectile.type] = 4; + } + + public override void SetDefaults() + { + projectile.Calamity().canBreakPlayerDefense = true; + projectile.width = 32; + projectile.height = 32; + 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(Time); + writer.Write(LengthOfLaser); + } + + public override void ReceiveExtraAI(BinaryReader reader) + { + Time = reader.ReadSingle(); + LengthOfLaser = 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; + + // Die if the thing to attach to disappears. + if (ThingToAttachTo is null || !ThingToAttachTo.active) + { + projectile.Kill(); + return; + } + + // The direction of the host NPC. + Vector2 hostNPCDirection = Vector2.Normalize(ThingToAttachTo.velocity); + + // Offset to move the beam forward so that it starts inside the NPC's mouth. + float beamStartForwardsOffset = -18f; + + // Set the starting location of the beam to the center of the NPC. + projectile.Center = ThingToAttachTo.Center; + // Add a fixed offset to align with the NPC's spritesheet (?) + projectile.position += hostNPCDirection * BeamPosOffset + new Vector2(0f, -ThingToAttachTo.gfxOffY); + // Add the forwards offset, measured in pixels. + projectile.position += hostNPCDirection * beamStartForwardsOffset; + + projectile.rotation = ThingToAttachTo.velocity.ToRotation(); + + Time++; + + float scale = 1f; + Time++; + if (Time >= Lifetime) + { + projectile.Kill(); + return; + } + + projectile.scale = (float)Math.Sin(Time * MathHelper.Pi / Lifetime) * 10f * scale; + if (projectile.scale > scale) + projectile.scale = scale; + + float num804 = projectile.velocity.ToRotation(); + num804 += projectile.ai[0]; + projectile.rotation = num804 - MathHelper.PiOver2; + projectile.velocity = num804.ToRotationVector2(); + + float arraySize = 3f; + Vector2 samplingPoint = projectile.Center; + float[] samples = new float[(int)arraySize]; + Collision.LaserScan(samplingPoint, projectile.velocity, projectile.width * projectile.scale, 2400f, samples); + float laserLength = 0f; + for (int i = 0; i < samples.Length; i++) + { + laserLength += samples[i]; + } + laserLength /= arraySize; + + // Fire laser through walls at max length if target cannot be seen + if (!Collision.CanHitLine(ThingToAttachTo.Center, 1, 1, Main.player[ThingToAttachTo.target].Center, 1, 1)) + laserLength = 2400f; + + float amount = 0.5f; + LengthOfLaser = MathHelper.Lerp(LengthOfLaser, laserLength, amount); + + // Fire beams along the laser + float divisor = expertMode ? 80f : 160f; + if (ThingToAttachTo.Calamity().newAI[2] % divisor == 0f && projectile.owner == Main.myPlayer) + { + Vector2 velocity = projectile.velocity; + velocity.Normalize(); + float distanceBetweenProjectiles = malice ? 160f : death ? 256f : revenge ? 288f : 320f; + Vector2 fireFrom = ThingToAttachTo.Center + velocity * distanceBetweenProjectiles; + int projectileAmt = (int)(LengthOfLaser / distanceBetweenProjectiles); + int type = ModContent.ProjectileType(); + int damage = projectile.GetProjectileDamage(ThingToAttachTo.type); + for (int i = 0; i < projectileAmt; i++) + { + int totalProjectiles = 2; + float radians = MathHelper.TwoPi / totalProjectiles; + for (int j = 0; j < totalProjectiles; j++) + { + Vector2 projVelocity = projectile.velocity.RotatedBy(radians * j + MathHelper.PiOver2); + Projectile.NewProjectile(fireFrom, projVelocity, type, damage, 0f, Main.myPlayer, 0f, -1f); + } + fireFrom += velocity * distanceBetweenProjectiles; + } + } + + int dustType = (int)CalamityDusts.Brimstone; + + // Spawn dust at the start of the beam + Vector2 dustPos = projectile.Center + projectile.velocity * 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, default, 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, default, 1.5f); + Main.dust[dust].velocity *= 0.5f; + Main.dust[dust].velocity.Y = -Math.Abs(Main.dust[dust].velocity.Y); + } + + // Spawn dust at the end of the beam + dustPos = projectile.Center + projectile.velocity * (LengthOfLaser - 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, default, 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, default, 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.3f, 0.65f, 0.7f); + Utils.PlotTileLine(projectile.Center, projectile.Center + projectile.velocity * LengthOfLaser, 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/ExoDestroyerBeamMiddle"); + Texture2D beamEnd = ModContent.GetTexture("CalamityMod/ExtraTextures/Lasers/ExoDestroyerBeamEnd"); + + float drawLength = LengthOfLaser; + Color color = new Color(250, 0, 0, 0); + + // Draw start of beam + Vector2 vector = projectile.Center - Main.screenPosition; + Rectangle? sourceRectangle = new Rectangle(0, 16 * (projectile.timeLeft / Main.projFrames[projectile.type] % 5), beamStart.Width, 16); + spriteBatch.Draw(beamStart, vector, sourceRectangle, color, projectile.rotation, beamStart.Size() / 2f, projectile.scale, SpriteEffects.None, 0f); + + // Draw middle of beam + drawLength -= (beamStart.Height / 2 + beamEnd.Height) * projectile.scale; + Vector2 center = projectile.Center; + center += projectile.velocity * projectile.scale * beamStart.Height / 2f; + if (drawLength > 0f) + { + float i = 0f; + Rectangle rectangle = new Rectangle(0, 16 * (projectile.timeLeft / Main.projFrames[projectile.type] % 5), beamMiddle.Width, 16); + while (i + 1f < drawLength) + { + if (drawLength - i < rectangle.Height) + rectangle.Height = (int)(drawLength - i); + + spriteBatch.Draw(beamMiddle, center - Main.screenPosition, rectangle, color, projectile.rotation, new Vector2(rectangle.Width / 2, 0f), projectile.scale, SpriteEffects.None, 0f); + + i += rectangle.Height * projectile.scale; + center += projectile.velocity * rectangle.Height * projectile.scale; + + rectangle.Y += 16; + if (rectangle.Y + rectangle.Height > beamMiddle.Height) + rectangle.Y = 0; + } + } + + // Draw end of beam + Vector2 vector2 = center - Main.screenPosition; + sourceRectangle = new Rectangle(0, 16 * (projectile.timeLeft / Main.projFrames[projectile.type] % 5), beamEnd.Width, 16); + spriteBatch.Draw(beamEnd, vector2, sourceRectangle, color, projectile.rotation, beamEnd.Frame(1, 1, 0, 0).Top(), 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 * LengthOfLaser, projectile.width * projectile.scale, new Utils.PerLinePoint(DelegateMethods.CutTiles)); + } + + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (projHitbox.Intersects(targetHitbox)) + return true; + + float collisionPoint = 0f; + if (Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), projectile.Center, projectile.Center + projectile.velocity * LengthOfLaser, 22f * projectile.scale, ref collisionPoint)) + return true; + + return false; + } + + public override void OnHitPlayer(Player target, int damage, bool crit) + { + target.AddBuff(ModContent.BuffType(), 360); + target.AddBuff(BuffID.OnFire, 360); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + target.Calamity().lastProjectileHit = projectile; + } + } +} diff --git a/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs index ef3e778b14..cd9d0560cf 100644 --- a/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs +++ b/Projectiles/Boss/ExoDestroyerBeamTelegraph.cs @@ -6,22 +6,6 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Boss { - // Code used in the demonstration video. - // This comment should be removed when implemented. - /*for (int b = 0; b < 6; b++) - * { - int beam = Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, 255, npc.whoAmI); - - // Determine the initial offset angle of telegraph. It will be smoothened to give a "stretch" effect. - if (Main.projectile.IndexInRange(beam)) - { - float squishedRatio = (float)Math.Pow((float)Math.Sin(MathHelper.Pi * b / 6f), 2D); - float smoothenedRatio = MathHelper.SmoothStep(0f, 1f, squishedRatio); - Main.projectile[beam].ai[1] = MathHelper.Lerp(-0.74f, 0.74f, smoothenedRatio); - } - } - Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, 255, npc.whoAmI); - */ public class ExoDestroyerBeamTelegraph : ModProjectile { public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; @@ -33,7 +17,8 @@ namespace CalamityMod.Projectiles.Boss public ref float Time => ref projectile.localAI[1]; public const int Lifetime = 180; public const float TelegraphWidth = 3600f; - public override void SetStaticDefaults() => DisplayName.SetDefault("Telegraph"); + public const float BeamPosOffset = 16f; + public override void SetStaticDefaults() => DisplayName.SetDefault("Telegraph"); public override void SetDefaults() { @@ -67,10 +52,21 @@ namespace CalamityMod.Projectiles.Boss return; } - projectile.Center = ThingToAttachTo.Center; + // The direction of the host NPC. + Vector2 hostNPCDirection = Vector2.Normalize(ThingToAttachTo.velocity); + + // Offset to move the beam forward so that it starts inside the NPC's mouth. + float beamStartForwardsOffset = -18f; + + // Set the starting location of the beam to the center of the NPC. + projectile.Center = ThingToAttachTo.Center; + // Add a fixed offset to align with the NPC's spritesheet (?) + projectile.position += hostNPCDirection * BeamPosOffset + new Vector2(0f, -ThingToAttachTo.gfxOffY); + // Add the forwards offset, measured in pixels. + projectile.position += hostNPCDirection * beamStartForwardsOffset; + + projectile.rotation = StartingRotationalOffset.AngleLerp(ConvergenceAngle, ConvergenceRatio) + ThingToAttachTo.velocity.ToRotation(); - // May want to change the ThingToAttachTo.velocity.ToRotation() part to instead just point towards a certain destination vector. - projectile.rotation = StartingRotationalOffset.AngleLerp(ConvergenceAngle, ConvergenceRatio) + ThingToAttachTo.velocity.ToRotation(); Time++; } diff --git a/Projectiles/Boss/ExoDestroyerLaser.cs b/Projectiles/Boss/ExoDestroyerLaser.cs index 883a397ace..f3456966c7 100644 --- a/Projectiles/Boss/ExoDestroyerLaser.cs +++ b/Projectiles/Boss/ExoDestroyerLaser.cs @@ -18,14 +18,18 @@ namespace CalamityMod.Projectiles.Boss set => projectile.ai[0] = value; } - public Vector2 OldVelocity; + public NPC ThingToAttachTo => Main.npc.IndexInRange((int)projectile.ai[1]) ? Main.npc[(int)projectile.ai[1]] : null; + + public Vector2 Destination; + public Vector2 Velocity; public const float TelegraphTotalTime = 30f; public const float TelegraphFadeTime = 15f; public const float TelegraphWidth = 4200f; + public const float LaserVelocity = 12f; - public override void SetStaticDefaults() + public override void SetStaticDefaults() { - DisplayName.SetDefault("Death Beam"); + DisplayName.SetDefault("Thanatos Beam"); Main.projFrames[projectile.type] = 4; } @@ -46,23 +50,25 @@ namespace CalamityMod.Projectiles.Boss public override void SendExtraAI(BinaryWriter writer) { - writer.WriteVector2(OldVelocity); - } + writer.WriteVector2(Destination); + writer.WriteVector2(Velocity); + } public override void ReceiveExtraAI(BinaryReader reader) { - OldVelocity = reader.ReadVector2(); - } + Destination = reader.ReadVector2(); + Velocity = 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; - } + // 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; + } projectile.frameCounter++; if (projectile.frameCounter > 8) @@ -75,6 +81,68 @@ namespace CalamityMod.Projectiles.Boss Lighting.AddLight(projectile.Center, 0.6f, 0f, 0f); + // If there is no NPC to attach to, run this instead. + if (projectile.ai[1] == -1f) + { + // Fade in after telegraphs have faded. + if (TelegraphDelay > TelegraphTotalTime) + { + if (projectile.alpha > 0) + projectile.alpha -= 25; + if (projectile.alpha < 0) + projectile.alpha = 0; + + // If a velocity is in reserve, set the true velocity to it and make it as "taken" by setting it to <0,0> + if (Velocity != Vector2.Zero) + { + projectile.velocity = Velocity * (CalamityWorld.malice ? 1.25f : 1f); + Velocity = Vector2.Zero; + projectile.netUpdate = true; + } + + // Direction and rotation. + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)projectile.velocity.Y, (double)-(double)projectile.velocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); + } + } + else if (Velocity == Vector2.Zero) + { + Velocity = projectile.velocity; + projectile.velocity = Vector2.Zero; + projectile.netUpdate = true; + + // Direction and rotation. + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)Velocity.Y, (double)-(double)Velocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)Velocity.Y, (double)Velocity.X); + } + } + + TelegraphDelay++; + + return; + } + + // Die if the thing to attach to disappears. + if (ThingToAttachTo is null || !ThingToAttachTo.active) + { + projectile.Kill(); + return; + } + // Fade in after telegraphs have faded. if (TelegraphDelay > TelegraphTotalTime) { @@ -83,14 +151,15 @@ namespace CalamityMod.Projectiles.Boss if (projectile.alpha < 0) projectile.alpha = 0; - // 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) + // If a velocity is in reserve, set the true velocity to it and make it as "taken" by setting it to <0,0> + if (Velocity != Vector2.Zero) { - projectile.velocity = OldVelocity * (CalamityWorld.malice ? 1.25f : 1f); - OldVelocity = Vector2.Zero; + projectile.velocity = Velocity * (CalamityWorld.malice ? 1.25f : 1f); + Velocity = Vector2.Zero; projectile.netUpdate = true; } + // Direction and rotation. if (projectile.velocity.X < 0f) { projectile.spriteDirection = -1; @@ -102,22 +171,53 @@ namespace CalamityMod.Projectiles.Boss projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X); } } - // 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) + else if (Destination == Vector2.Zero) { - OldVelocity = projectile.velocity; - projectile.velocity = Vector2.Zero; + // Set start of telegraph to the npc center. + projectile.Center = ThingToAttachTo.Center; + + // Set destination of the laser, the target's center. + Destination = projectile.velocity; + + // 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; + + // Set velocity to zero. + projectile.velocity = Vector2.Zero; projectile.netUpdate = true; + // Direction and rotation. if (projectile.velocity.X < 0f) { projectile.spriteDirection = -1; - projectile.rotation = (float)Math.Atan2((double)-(double)OldVelocity.Y, (double)-(double)OldVelocity.X); + projectile.rotation = (float)Math.Atan2((double)-(double)Velocity.Y, (double)-(double)Velocity.X); } else { projectile.spriteDirection = 1; - projectile.rotation = (float)Math.Atan2((double)OldVelocity.Y, (double)OldVelocity.X); + projectile.rotation = (float)Math.Atan2((double)Velocity.Y, (double)Velocity.X); + } + } + else + { + // Set start of telegraph to the npc center. + projectile.Center = ThingToAttachTo.Center; + + // 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; + + // Direction and rotation. + if (projectile.velocity.X < 0f) + { + projectile.spriteDirection = -1; + projectile.rotation = (float)Math.Atan2((double)-(double)Velocity.Y, (double)-(double)Velocity.X); + } + else + { + projectile.spriteDirection = 1; + projectile.rotation = (float)Math.Atan2((double)Velocity.Y, (double)Velocity.X); } } @@ -168,8 +268,8 @@ namespace CalamityMod.Projectiles.Boss 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); + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorInner, Velocity.ToRotation(), origin, scaleInner, SpriteEffects.None, 0f); + spriteBatch.Draw(laserTelegraph, projectile.Center - Main.screenPosition, null, colorOuter, Velocity.ToRotation(), origin, scaleOuter, SpriteEffects.None, 0f); return false; } } diff --git a/Projectiles/Melee/DevilsSunriseProj.cs b/Projectiles/Melee/DevilsSunriseProj.cs index f3123d482c..6f943b40c1 100644 --- a/Projectiles/Melee/DevilsSunriseProj.cs +++ b/Projectiles/Melee/DevilsSunriseProj.cs @@ -10,7 +10,7 @@ namespace CalamityMod.Projectiles.Melee public class DevilsSunriseProj : ModProjectile { private int red; - private int greenAndBlue = 100; + private const int greenAndBlue = 100; public override void SetStaticDefaults() { diff --git a/Projectiles/Ranged/IcicleArrowProj.cs b/Projectiles/Ranged/IcicleArrowProj.cs index d64bf468aa..bdf140f83f 100644 --- a/Projectiles/Ranged/IcicleArrowProj.cs +++ b/Projectiles/Ranged/IcicleArrowProj.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Ranged { float SpeedX = -projectile.velocity.X * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; float SpeedY = -projectile.velocity.Y * Main.rand.Next(40, 70) * 0.01f + Main.rand.Next(-20, 21) * 0.4f; - Projectile.NewProjectile(projectile.Center.X + SpeedX, projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, projectile.damage / 2, 0f, projectile.owner); + Projectile.NewProjectile(projectile.Center.X + SpeedX, projectile.Center.Y + SpeedY, SpeedX, SpeedY, ProjectileID.CrystalShard, projectile.damage / 3, 0f, projectile.owner); } } } diff --git a/Utilities/NPCStats.cs b/Utilities/NPCStats.cs index fa7cdb4daa..5709e12e23 100644 --- a/Utilities/NPCStats.cs +++ b/Utilities/NPCStats.cs @@ -804,6 +804,8 @@ namespace CalamityMod { 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 } }, + { 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[] { 350, 528, 556, 572, 834 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 350, 528, 556, 572, 834 } }, From 1f40ab705571053a2aaef02ffa41a10ca7cbe766 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 19 Jun 2021 15:29:40 -0500 Subject: [PATCH 101/103] 1 - Added a few more enemies to the slow resistance list. --- CalamityLists.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CalamityLists.cs b/CalamityLists.cs index ec435dc1e6..e50c2e6460 100644 --- a/CalamityLists.cs +++ b/CalamityLists.cs @@ -22,6 +22,7 @@ using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.Abyss; +using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.AquaticScourge; using CalamityMod.NPCs.Astral; using CalamityMod.NPCs.AstrumAureus; @@ -549,14 +550,18 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), + NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), @@ -573,6 +578,11 @@ namespace CalamityMod NPCType(), NPCType(), NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), From 908b86bc742edb9c0a164a8e8b10c5982ad9c015 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 19 Jun 2021 16:14:25 -0500 Subject: [PATCH 102/103] 1 - Set to 0. --- NPCs/CalamityGlobalNPC.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 0e648a2d3d..4b81a35c2d 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -989,7 +989,10 @@ namespace CalamityMod.NPCs #region Set Defaults public override void SetDefaults(NPC npc) { - for (int m = 0; m < maxAIMod; m++) + for (int i = 0; i < maxPlayerImmunities; i++) + dashImmunityTime[i] = 0; + + for (int m = 0; m < maxAIMod; m++) newAI[m] = 0f; // Apply DR to vanilla NPCs. From 640ba089ade4bad27527980bccc738a432038c48 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Sat, 19 Jun 2021 19:16:22 -0500 Subject: [PATCH 103/103] 1 - Reverted a previous github commit. --- Projectiles/Boss/ExoDestroyerBeamStart.cs | 4 ++-- UI/BossHealthBarManager.cs | 2 +- Utilities/GeneralExtensionUtils.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Projectiles/Boss/ExoDestroyerBeamStart.cs b/Projectiles/Boss/ExoDestroyerBeamStart.cs index 6ee5159bab..3d2c5ee560 100644 --- a/Projectiles/Boss/ExoDestroyerBeamStart.cs +++ b/Projectiles/Boss/ExoDestroyerBeamStart.cs @@ -152,7 +152,7 @@ namespace CalamityMod.Projectiles.Boss 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, default, 1f); + int dust = Dust.NewDust(dustPos, 0, 0, dustType, -dustVel.X, -dustVel.Y, 0, default, 1f); Main.dust[dust].noGravity = true; Main.dust[dust].scale = 1.7f; } @@ -162,7 +162,7 @@ namespace CalamityMod.Projectiles.Boss 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, default, 1.5f); Main.dust[dust].velocity *= 0.5f; - Main.dust[dust].velocity.Y = -Math.Abs(Main.dust[dust].velocity.Y); + Main.dust[dust].velocity.Y = Math.Abs(Main.dust[dust].velocity.Y); } // Spawn dust at the end of the beam diff --git a/UI/BossHealthBarManager.cs b/UI/BossHealthBarManager.cs index 8e5aa80121..5ac30a1d5f 100644 --- a/UI/BossHealthBarManager.cs +++ b/UI/BossHealthBarManager.cs @@ -592,7 +592,7 @@ namespace CalamityMod.UI return; int currentLife = _npc.life; - bool enraged = _npc.Calamity()?.CurrentlyEnraged ?? false; + bool enraged = _npc.Calamity().CurrentlyEnraged; // Calculate current life based all types that are available and considered part of one boss if (_oneToMany) diff --git a/Utilities/GeneralExtensionUtils.cs b/Utilities/GeneralExtensionUtils.cs index a505af745b..255c5e6bbc 100644 --- a/Utilities/GeneralExtensionUtils.cs +++ b/Utilities/GeneralExtensionUtils.cs @@ -9,7 +9,7 @@ namespace CalamityMod public static partial class CalamityUtils { public static CalamityPlayer Calamity(this Player player) => player.GetModPlayer(); - public static CalamityGlobalNPC Calamity(this NPC npc) => npc.active ? npc.GetGlobalNPC() : null; + public static CalamityGlobalNPC Calamity(this NPC npc) => npc.GetGlobalNPC(); public static CalamityGlobalItem Calamity(this Item item) => item.GetGlobalItem(); public static CalamityGlobalProjectile Calamity(this Projectile proj) => proj.GetGlobalProjectile(); public static Item ActiveItem(this Player player) => Main.mouseItem.IsAir ? player.HeldItem : Main.mouseItem;