From 40b57f99c0c0c26491daae7911ceb74bd0dbac30 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 1 Jun 2025 12:53:24 -0700 Subject: [PATCH 01/72] Order --- CalPlayer/CalamityPlayer.cs | 1 + CalPlayer/CalamityPlayerMiscEffects.cs | 16 + CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs | 8 +- Items/CalamityGlobalItemTooltip.cs | 20 +- Items/Weapons/Melee/IridescentExcalibur.cs | 193 ------- Items/Weapons/Melee/IridescentExcalibur.png | Bin 2099 -> 0 bytes .../Weapons/Melee/IridescentExcaliburGlow.png | Bin 666 -> 0 bytes Items/Weapons/Melee/Orderbringer.cs | 191 ++++--- Items/Weapons/Melee/Orderbringer.png | Bin 1896 -> 2099 bytes Items/Weapons/Melee/OrderbringerGlow.png | Bin 2247 -> 666 bytes ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 11 - .../Mods.CalamityMod.Projectiles.Melee.hjson | 1 + Projectiles/Melee/GayBeam.cs | 470 ------------------ Projectiles/Melee/GayBeam.png | Bin 738 -> 0 bytes Projectiles/Melee/IridescentExcaliburSlash.cs | 254 ---------- .../Melee/IridescentExcaliburSlash.png | Bin 2957 -> 0 bytes .../Melee/IridescentExcaliburSlash2.cs | 231 --------- .../Melee/IridescentExcaliburSlash3.cs | 238 --------- Projectiles/Melee/OrderbringerBeam.cs | 15 +- Projectiles/Melee/OrderbringerWaveProj.cs | 44 +- Projectiles/Melee/StarofJudgement.cs | 7 +- Projectiles/Melee/StarofOrder.cs | 118 +++++ Utilities/MathematicalUtils.cs | 12 + 23 files changed, 336 insertions(+), 1494 deletions(-) delete mode 100644 Items/Weapons/Melee/IridescentExcalibur.cs delete mode 100644 Items/Weapons/Melee/IridescentExcalibur.png delete mode 100644 Items/Weapons/Melee/IridescentExcaliburGlow.png delete mode 100644 Projectiles/Melee/GayBeam.cs delete mode 100644 Projectiles/Melee/GayBeam.png delete mode 100644 Projectiles/Melee/IridescentExcaliburSlash.cs delete mode 100644 Projectiles/Melee/IridescentExcaliburSlash.png delete mode 100644 Projectiles/Melee/IridescentExcaliburSlash2.cs delete mode 100644 Projectiles/Melee/IridescentExcaliburSlash3.cs create mode 100644 Projectiles/Melee/StarofOrder.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 55d431690a..1b4ffac083 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -958,6 +958,7 @@ namespace CalamityMod.CalPlayer public bool XykVisualsBlue = false; public bool XykVisualsOrange = false; public Color XykFXColor = Color.Black; + public Color lightRGB = Color.Black; public bool manaOverloader = false; /// Used for allowing Calamity slimes to be affected by Royal Gel. public bool royalGel = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 2842bd89a1..4e9b5ba946 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -568,6 +568,22 @@ namespace CalamityMod.CalPlayer if (heldGaelsLastFrame) rageDiff += rageMax * GaelsGreatsword.RagePerSecond / 60f; + float rate = Main.GlobalTimeWrappedHourly * 29; + List eColors = new List() + { + Color.PaleVioletRed, + Color.Coral, + Color.Khaki, + Color.PaleGreen, + Color.Turquoise, + Color.Violet + }; + + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + lightRGB = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + // Calculate and grant proximity rage. // Regular enemies can give up to 1x proximity rage. Bosses can give up to 3x. Multiple regular enemies don't stack. // Proximity rage is maxed out when within 10 blocks (160 pixels) of the enemy's hitbox. diff --git a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs index d5a92f8bfc..74577bfced 100644 --- a/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs +++ b/CalPlayer/DrawLayers/HeldItemGlowMaskLayer.cs @@ -35,6 +35,8 @@ namespace CalamityMod.CalPlayer.DrawLayers if (itemType < ItemID.Count) return; + Color color = new Color(250, 250, 250, heldItem.alpha); + // This is ugly and I don't give a fuck. // If you want it to look better, do it yourself. Texture2D glowMask = default; @@ -62,8 +64,6 @@ namespace CalamityMod.CalPlayer.DrawLayers glowMask = ModContent.Request("CalamityMod/Items/Weapons/Summon/EtherealSubjugatorGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/ExcelsusGlow").Value; - else if (itemType == ModContent.ItemType()) - glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/IridescentExcaliburGlow").Value; else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/FatesRevealGlow").Value; else if (itemType == ModContent.ItemType()) @@ -75,7 +75,10 @@ namespace CalamityMod.CalPlayer.DrawLayers else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/SummonItems/NecroplasmicBeaconGlow").Value; else if (itemType == ModContent.ItemType()) + { + color = Color.Lerp(Color.White, drawPlayer.Calamity().lightRGB, 0.75f) with { A = 0 }; glowMask = ModContent.Request("CalamityMod/Items/Weapons/Melee/OrderbringerGlow").Value; + } else if (itemType == ModContent.ItemType()) glowMask = ModContent.Request("CalamityMod/Items/Weapons/Magic/PhotosynthesisGlow").Value; else if (itemType == ModContent.ItemType()) @@ -140,7 +143,6 @@ namespace CalamityMod.CalPlayer.DrawLayers if (drawInfo.shadow != 0f || drawPlayer.frozen || !(inUse || visuallyHeld) || itemType <= 0 || drawPlayer.dead || heldItem.noUseGraphic || (drawPlayer.wet && heldItem.noWet) || (drawPlayer.happyFunTorchTime && drawPlayer.inventory[drawPlayer.selectedItem].createTile == TileID.Torches && drawPlayer.itemAnimation == 0)) return; - Color color = new Color(250, 250, 250, heldItem.alpha); Vector2 originOffset = Vector2.Zero; // Use to adjust glow mask draw offset and color. diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 2a35ce43b4..db7cb600a7 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -289,8 +289,26 @@ namespace CalamityMod.Items #region Rarity Coloration private static void ApplyRarityColor(Item item, TooltipLine nameLine) { - if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) + if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) nameLine.OverrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); + if (item.type == ModContent.ItemType()) + { + float rate = Main.GlobalTimeWrappedHourly * 15; + List eColors = new List() + { + Color.PaleVioletRed, + Color.Coral, + Color.Khaki, + Color.PaleGreen, + Color.Turquoise, + Color.Violet + }; + + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + } // Developer items if (item.type == ModContent.ItemType()) diff --git a/Items/Weapons/Melee/IridescentExcalibur.cs b/Items/Weapons/Melee/IridescentExcalibur.cs deleted file mode 100644 index 76c749add9..0000000000 --- a/Items/Weapons/Melee/IridescentExcalibur.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.Melee; -using CalamityMod.Rarities; -using CalamityMod.Tiles.Furniture.CraftingStations; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.DataStructures; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.Melee -{ - [LegacyName("ElementalExcalibur")] - public class IridescentExcalibur : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Weapons.Melee"; - - private int MaxBeamTypes = 12; - - private int BeamType = 0; - - private const int Alpha = 100; - - private const float ShootSpeed = 16f; - - public override void SetStaticDefaults() - { - ItemID.Sets.ItemsThatAllowRepeatedRightClick[Type] = true; - } - - public override void SetDefaults() - { - Item.width = 112; - Item.height = 112; - Item.damage = 3000; - Item.useAnimation = Item.useTime = 15; - Item.useStyle = ItemUseStyleID.Swing; - Item.useTurn = true; - Item.DamageType = DamageClass.Melee; - Item.knockBack = 8f; - Item.UseSound = SoundID.Item1; - Item.autoReuse = true; - Item.value = CalamityGlobalItem.RarityHotPinkBuyPrice; - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = ShootSpeed; - Item.rare = ModContent.RarityType(); - Item.shootsEveryUse = true; - } - - public override void UseStyle(Player player, Rectangle heldItemFrame) - { - player.itemLocation += new Vector2(-12f * player.direction, 2f * player.gravDir).RotatedBy(player.itemRotation); - } - - public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) - { - Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Melee/IridescentExcaliburGlow").Value); - } - - // Terraria seems to really dislike high crit values in SetDefaults - public override void ModifyWeaponCrit(Player player, ref float crit) => crit += 10; - - public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) - { - if (player.altFunctionUse == 2) - { - float adjustedItemScale = player.GetAdjustedItemScale(Item); - Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), ModContent.ProjectileType(), damage, knockback, player.whoAmI, (float)player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale); - Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), ModContent.ProjectileType(), 0, knockback, player.whoAmI, (float)player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale); - Projectile.NewProjectile(source, player.MountedCenter, new Vector2(player.direction, 0f), ModContent.ProjectileType(), 0, knockback, player.whoAmI, (float)player.direction * player.gravDir, player.itemAnimationMax, adjustedItemScale); - NetMessage.SendData(MessageID.PlayerControls, -1, -1, null, player.whoAmI); - } - else - { - int proj = Projectile.NewProjectile(source, position, velocity, type, (int)Math.Round(damage * 0.5), knockback * 0.5f, player.whoAmI, (float)BeamType); - if (BeamType == 7) - Main.projectile[proj].penetrate = 3; - - BeamType++; - if (BeamType >= MaxBeamTypes) - BeamType = 0; - } - - return false; - } - - public override bool AltFunctionUse(Player player) => true; - - public override bool? UseItem(Player player) - { - Item.noMelee = player.altFunctionUse == 2; - return base.UseItem(player); - } - - public override void ModifyHitNPC(Player player, NPC target, ref NPC.HitModifiers modifiers) - { - if (player.altFunctionUse == 2) - modifiers.SourceDamage *= 2; - } - - public override void ModifyHitPvp(Player player, Player target, ref Player.HurtModifiers modifiers) - { - if (player.altFunctionUse == 2) - modifiers.SourceDamage *= 2; - } - - public override void MeleeEffects(Player player, Rectangle hitbox) - { - if (Main.rand.NextBool()) - { - Color rainbowColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Alpha); - Color color = Color.White; - int dustChoice = player.altFunctionUse == 2 ? Main.rand.Next(12) : BeamType; - switch (dustChoice) - { - case 0: // Red - color = new Color(255, 0, 0, Alpha); - break; - case 1: // Orange - color = new Color(255, 128, 0, Alpha); - break; - case 2: // Yellow - color = new Color(255, 255, 0, Alpha); - break; - case 3: // Lime - color = new Color(128, 255, 0, Alpha); - break; - case 4: // Green - color = new Color(0, 255, 0, Alpha); - break; - case 5: // Turquoise - color = new Color(0, 255, 128, Alpha); - break; - case 6: // Cyan - color = new Color(0, 255, 255, Alpha); - break; - case 7: // Light Blue - color = new Color(0, 128, 255, Alpha); - break; - case 8: // Blue - color = new Color(0, 0, 255, Alpha); - break; - case 9: // Purple - color = new Color(128, 0, 255, Alpha); - break; - case 10: // Fuschia - color = new Color(255, 0, 255, Alpha); - break; - case 11: // Hot Pink - color = new Color(255, 0, 128, Alpha); - break; - default: - break; - } - - Dust rainbow = Main.dust[Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, DustID.RainbowMk2)]; - rainbow.velocity *= 0f; - rainbow.color = Color.Lerp(rainbowColor, color, (float)Math.Sqrt((MathF.Cos(Main.GlobalTimeWrappedHourly / 60f) + 1f) * 0.5f)); - rainbow.color.A = 100; - rainbow.scale = Main.rand.NextFloat(1.2f, 1.6f); - rainbow.fadeIn = Main.rand.NextFloat(0.4f, 1f); - rainbow.noGravity = true; - } - } - - public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 600); - target.AddBuff(ModContent.BuffType(), 60); - } - - public override void OnHitPvp(Player player, Player target, Player.HurtInfo hurtInfo) - { - target.AddBuff(ModContent.BuffType(), 600); - target.AddBuff(ModContent.BuffType(), 60); - } - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(ItemID.TrueExcalibur). - AddIngredient(). - AddIngredient(3). - AddIngredient(15). - AddTile(). - Register(); - } - } -} diff --git a/Items/Weapons/Melee/IridescentExcalibur.png b/Items/Weapons/Melee/IridescentExcalibur.png deleted file mode 100644 index 5ff82d5ac7a7b83abfe38661f2bfb65c9eb91414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2099 zcmX9=4LFl~8-Liz3Oi0m`I>a zwBzF_M#;xGr|raiR0z$cEt@i|hDT>M?=$CmuK)ADuKT+0-}C(L|L^`?|14i04}`Xf zHUI#K6P|AV&>p8=TeYA!duI70v}q*xd$F~QKYISOQ7e{vr4Lf z%m*uC`wsU`+7Pk9M1_K_a4iqNR63^<*RPKRGY<|8bZ*SU+hN4}D_HlLtZo+X2l;D=iQPF4 zBPbFJGi{w?ghV#N_BPVt_@82CsP)weC24Wp7?51XNpJWQuHNPdlrOghim z73RQm5v@_ejs`@BL*_?c#LRT|8JyNgwTO8lKj0iHvl#PGk;x#lvz>w`++@?%m*~ zSfQ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hEZ+YA|3BFFy!yQBm3#J^KX_^D zQ#EIMRqFpz|J=%@Gqykf=D)Q+@!e^Uoz-ryJFHg*M)L5e80vZDIK%)=<@cP}45Xw> zg8YJk=HLJf>L%Q#KxLc-9+AZi419+{nDKc2iWH!uS9`iRhGaOuy>YRx$v~hrktH@p z)J13NuYdfzZ2clNvm*|8S^56oy-+;fNYQ2Xop9}iXSO)4Zkk}W%iv%Ld(P&Qn?4-i zyZ!3G%crv@^KUi!apXWNd(-W_^8S4#U-q>yFVo!cN6;cF!$QI0&?lSI^I|j>oL%_W zPUXV0Z~az!ECq8O^MBi!A3Xmt->o~2bEW^a03_s;L(j>gQWP_y!#J;i$tsH|L-x9|a9 z`+rNng!!wpAH~(Ld%L6Ih@i)vuU4&(nI0|b6WevWQM+rU4F8753|x#GGM5#}98fvP zo~!xXx}!TKCPPp|^}sU8f3cG1<3B9Rj@~ta#V02A{Nozdc8O`;4`R;wPcU$inAaej zWcOU%L;J0P%LAcv;TQO{rxi&aXARj^;HVR_^7h%D&5s$hu5Me{eA-g(fi?G6-Vm>j zWfL#;EGxIT@1Xc8X5}W6#gl88r%p0T3DAuBrjhEV{*$$C5r>t2)4A>ipOs$hL1DhD b`_Gv0VCF}^%3dX4TrzmN`njxgN@xNARWUJ{ diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index 4bcfb4b25b..bf2bd4daed 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -1,18 +1,19 @@ -using CalamityMod.Items.Materials; +using System; +using System.Collections.Generic; +using System.Linq; +using CalamityMod.Dusts; +using CalamityMod.Items.Materials; +using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; using CalamityMod.Rarities; using CalamityMod.Tiles.Furniture.CraftingStations; -using Terraria.Audio; -using Terraria.ID; using Microsoft.Xna.Framework; -using Terraria.ModLoader; -using CalamityMod.Particles; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.DataStructures; -using Basic.Reference.Assemblies; -using System; -using Mono.Cecil; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { @@ -20,23 +21,25 @@ namespace CalamityMod.Items.Weapons.Melee public class Orderbringer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; - private float swingRoatation = 0; - private int time = 0; - private Color mainColor; - private int swordDirection; - private int useTime = 18; - private int opacityAdjust = 0; - private float smearOpacity = 0; + public int time = 0; + public Vector2 bladeHitboxPos; + public float bladeRotation = 0; + public int bladeDirection = 0; + public float bladeFX = 0; + public float completion = 0; + public bool canHit => (completion >= 0.35f && completion <= 0.8f); + public int swingCount = 0; + public bool spawnProj = true; + public bool playSound = true; public override void SetDefaults() { - Item.width = Item.height = 108; - Item.damage = 445; + Item.width = Item.height = 112; + Item.damage = 755; Item.DamageType = DamageClass.Melee; - Item.useAnimation = Item.useTime = useTime; + Item.useAnimation = Item.useTime = 18; Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = true; Item.knockBack = 8f; - Item.UseSound = SoundID.Item60; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityDarkBlueBuyPrice; Item.rare = ModContent.RarityType(); @@ -45,87 +48,151 @@ namespace CalamityMod.Items.Weapons.Melee } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f); - - for (int i = 0; i < 4; i++) - { - Vector2 vel = (velocity * 2.5f).RotatedByRandom(0.6f); - Projectile.NewProjectile(source, player.ClampedMouseWorld() - (velocity * 40) + Main.rand.NextVector2Circular(130, 130), vel * Main.rand.NextFloat(0.8f, 1.2f), ModContent.ProjectileType(), (int)(damage * 0.1f), knockback * 0.2f, player.whoAmI, 0, 0, 1); - } return false; } public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) { - float scale = 1.2f; + // Basically just insures the enemy is always able to be hit if they're in range, the actual collision check is done in CanHitNPC + float scale = 8f; Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; - hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); + hitbox = new Rectangle((int)(bladeHitboxPos.X - newSize.X / 2f), (int)(bladeHitboxPos.Y - newSize.Y / 2f), (int)newSize.X, (int)newSize.Y); + } + public override bool? CanHitNPC(Player player, NPC target) + { + Vector2 mPos = player.Calamity().mouseWorld; + Vector2 shootDir = player.Center.DirectionTo(mPos); + float _ = float.NaN; + bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center, player.Center + shootDir * 245, Item.width * 3f, ref _); + return ((canHit && hitCheck) ? null : false); } public override void UseAnimation(Player player) { - swordDirection = player.direction; + swingCount++; time = 0; - swingRoatation = 0; - mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; - opacityAdjust = 0; - smearOpacity = 0; + bladeDirection = player.direction; + bladeHitboxPos = player.Center; + bladeRotation = 0; + bladeFX = 0; + spawnProj = true; + playSound = true; + int dir = -Math.Sign(player.Center.X - player.Calamity().mouseWorld.X); + float startRot = MathHelper.ToRadians(-90) * dir * (swingCount % 2 == 0 ? 1 : -1); + //player.itemRotation = player.Center.DirectionTo(player.Calamity().mouseWorld).ToRotation() + startRot; } public override void MeleeEffects(Player player, Rectangle hitbox) { - opacityAdjust++; - if (opacityAdjust >= 5 && opacityAdjust <= 15 && smearOpacity < 0.9f) - smearOpacity += 0.1f; - else if (smearOpacity > 0) - smearOpacity -= 0.2f; + Vector2 mPos = player.Calamity().mouseWorld; + completion = (float)((float)time / ((float)(Item.useAnimation / player.GetAttackSpeed(DamageClass.Melee)))); + int dir = -Math.Sign(player.Center.X - mPos.X); + + float startRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? 1 : -1); + float endRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? -1 : 1); + float minRot = MathHelper.ToRadians(-150) * dir * (swingCount % 2 == 0 ? 1 : -1); + float cutoff = 0.2f; + float cutoff2 = 0.95f; + + Vector2 shootDir = player.Center.DirectionTo(mPos) * Item.shootSpeed; + + if (completion <= cutoff) + { + float lerp = Utils.GetLerpValue(0, cutoff, completion, true); + player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(startRot, minRot, CalamityUtils.EaseInOutExp(lerp, 4f, 4f)); + player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir; + } + else + { + if (playSound) + { + SoundStyle swing = new("CalamityMod/Sounds/Item/SwooshMid"); + SoundEngine.PlaySound(swing with { Pitch = Main.rand.NextFloat(0.1f, 0.3f), Volume = 1f }, player.Center); + playSound = false; + } + if (completion >= 0.65f && spawnProj) + { + Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f); + + for (int i = 0; i < 4; i++) + { + float rot = Main.rand.NextFloat(0.5f, 0.65f) * (Main.rand.NextBool() ? 1 : -1); + Vector2 vel = (shootDir * 2.5f).RotatedByRandom(0.6f); + Projectile.NewProjectile(player.GetSource_FromThis(), player.ClampedMouseWorld() - (shootDir * 40) + Main.rand.NextVector2Circular(130, 130), vel.RotatedBy(rot) * Main.rand.NextFloat(0.9f, 1.2f), ModContent.ProjectileType(), (int)(Item.damage * 0.12f), (int)(Item.knockBack * 0.2f), player.whoAmI, 0, rot, 1); + } + + Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.8f, player.Calamity().lightRGB, new Vector2(1f, 1f), true, false, 0, false, false); + GeneralParticleHandler.SpawnParticle(swipe); + + SoundEngine.PlaySound(SoundID.Item60, player.Center); + spawnProj = false; + } + float lerp = Utils.GetLerpValue(cutoff, cutoff2, completion, true); + player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(minRot, endRot, CalamityUtils.EaseInOutExp(lerp, 6f, 2f)); + player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir; + } + + float extraRot = (dir == 1 ? -MathHelper.PiOver4 : MathHelper.ToRadians(225)); + bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 240; + Vector2 tipPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180; + + player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); + player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); + + player.itemLocation = player.Center; + player.direction = dir; time++; - swingRoatation += swordDirection == 1 ? 0.17f : -0.17f; - - float Rot = (swordDirection == -1 ? 1.8f : -1.8f) + swingRoatation; - if (swordDirection != player.direction) - { - swingRoatation *= -1; - swordDirection = player.direction; - } - Particle Smear = new SemiCircularSmearFade(player.Center, Vector2.Zero, mainColor * smearOpacity, Rot, Main.rand.NextFloat(2.8f, 3.2f), new Vector2(1, 1), 2, true, false, true, player.direction); - GeneralParticleHandler.SpawnParticle(Smear); - - if (Main.rand.NextBool()) - { - Vector2 dustVel = new Vector2(5 * swordDirection, -5).RotatedByRandom(1.55f) * Main.rand.NextFloat(0.7f, 1.3f) * 2; - Dust dust = Dust.NewDustPerfect(player.Center + dustVel * 9, 278); - dust.scale = Main.rand.NextFloat(0.5f, 0.75f); - dust.velocity = dustVel * 0.55f; - dust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; - dust.noGravity = true; - } } public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { int beamDamage = player.CalcIntDamage(Item.damage * 0.5f); Vector2 mouseClamped = player.ClampedMouseWorld(); + SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f)}, player.Center); for (int i = 0; i < 2; i++) { Vector2 targetPos = Main.MouseWorld; NPC target2 = Main.MouseWorld.ClosestNPCAt(650); if (target2 != null) - targetPos = target2.Center + target2.velocity * 14; + targetPos = target2.Center; Vector2 spawnPos = mouseClamped + new Vector2(Main.rand.NextFloat(-300, 300), -900); Vector2 vel = (targetPos - spawnPos).SafeNormalize(Vector2.UnitY) * 10; Projectile.NewProjectile(player.GetSource_ItemUse(Item), spawnPos, vel, ModContent.ProjectileType(), beamDamage, 0, player.whoAmI); } } + public override void ModifyTooltips(List list) + { + Player Owner = Main.LocalPlayer; + if (Owner is null) + return; + + float rate = Main.GlobalTimeWrappedHourly * 7; + List eColors = new List() + { + Color.PaleVioletRed, + Color.Coral, + Color.Khaki, + Color.PaleGreen, + Color.Turquoise, + Color.Violet + }; + + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color finalColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + TooltipLine line = list.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "Tooltip2"); + if (line != null) + line.OverrideColor = Color.Lerp(finalColor, Color.White, 0.3f); + } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) { Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/Melee/OrderbringerGlow").Value); } - public override void AddRecipes() { CreateRecipe(). AddIngredient(). - AddIngredient(8). - AddIngredient(20). + AddIngredient(5). + AddIngredient(5). AddTile(). Register(); } diff --git a/Items/Weapons/Melee/Orderbringer.png b/Items/Weapons/Melee/Orderbringer.png index ade13f44bfa2c81d26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0$3_w`d7$SHgT^k-@byDGF-Ic3ScQi@_+U!YOgV6`ifm#0W5Y1+zIdx!4;X> Va|-(h00000NkvXXu0mjf008K2JRSf5 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 223e79060f..31ed7e73a1 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -768,16 +768,6 @@ InsidiousImpaler: { ''' } -IridescentExcalibur: { - DisplayName: Iridescent Excalibur - Tooltip: - ''' - True melee strikes freeze enemies - Fires rainbow beams that change their behavior based on their color - Press for true melee - ''' -} - Lacerator: { DisplayName: Lacerator Tooltip: @@ -958,7 +948,6 @@ Orderbringer: { Tooltip: ''' Fires piercing energy waves and summons four homing stars near your cursor - Energy waves deal more damage with each consecutive hit Hits with the blade summon two beams from the sky 'No matter where you may be you are never alone' ''' diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index fcf84f80e5..bdd7180600 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -237,6 +237,7 @@ StarburstBeam.DisplayName: Star Shiv StarburstSHIV.DisplayName: SHIV StarnightBeam.DisplayName: Starnight Beam StarofJudgement.DisplayName: Star of Judgement +StarofOrder.DisplayName: Star of Order StellarContemptBlast.DisplayName: Stellar Blast StellarContemptEcho.DisplayName: Echoes of Contempt StellarContemptHammer.DisplayName: Stellar Contempt diff --git a/Projectiles/Melee/GayBeam.cs b/Projectiles/Melee/GayBeam.cs deleted file mode 100644 index 85cb5f4a85..0000000000 --- a/Projectiles/Melee/GayBeam.cs +++ /dev/null @@ -1,470 +0,0 @@ -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Graphics.Primitives; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using System.IO; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.Graphics.Shaders; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Melee -{ - public class GayBeam : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - - private const int Alpha = 100; - - private const int TimeLeft = 600; - - private const int TrailLength = 36; - - private const int TotalAfterimages = 12; - - private const int AfterimageOffset = TrailLength / TotalAfterimages; - - private const float MaxVelocity = 24f; - - public override void SetStaticDefaults() - { - ProjectileID.Sets.TrailingMode[Type] = 2; - ProjectileID.Sets.TrailCacheLength[Type] = TrailLength; - } - - public override void SetDefaults() - { - Projectile.width = 16; - Projectile.height = 16; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Melee; - Projectile.ignoreWater = true; - Projectile.penetrate = 1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 10; - Projectile.timeLeft = TimeLeft; - Projectile.alpha = Alpha; - } - - public override void SendExtraAI(BinaryWriter writer) - { - writer.Write(Projectile.localAI[0]); - writer.Write(Projectile.localAI[1]); - } - - public override void ReceiveExtraAI(BinaryReader reader) - { - Projectile.localAI[0] = reader.ReadSingle(); - Projectile.localAI[1] = reader.ReadSingle(); - } - - public override void AI() - { - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.ToRadians(45f); - - if (Projectile.ai[2] == 0f) - SoundEngine.PlaySound(SoundID.Item60, Projectile.Center); - - Color color = GetProjectileColor(); - switch ((int)Projectile.ai[0]) - { - case 0: // Red, normal beam - break; - - case 1: // Orange, curve back to player - - int player = (int)Player.FindClosest(Projectile.Center, 1, 1); - Projectile.ai[1] += 1f; - if (Projectile.ai[1] < 360f && Projectile.ai[1] > 60f) - { - float homeSpeed = Projectile.velocity.Length(); - Vector2 vecToPlayer = Main.player[player].Center - Projectile.Center; - vecToPlayer = vecToPlayer.SafeNormalize(Vector2.UnitY); - vecToPlayer *= homeSpeed; - Projectile.velocity = (Projectile.velocity * 29f + vecToPlayer) / 30f; - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY); - Projectile.velocity *= homeSpeed; - } - - if (Projectile.velocity.Length() < MaxVelocity) - { - Projectile.velocity *= 1.01f; - if (Projectile.velocity.Length() > MaxVelocity) - { - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY); - Projectile.velocity *= MaxVelocity; - } - } - - break; - - case 2: // Yellow, split after a certain time - - Projectile.localAI[1] += 1f; - if (Projectile.localAI[1] >= 45f) - { - int numProj = 2; - float rotation = MathHelper.ToRadians(10); - if (Projectile.owner == Main.myPlayer) - { - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, perturbedSpeed * MaxVelocity, Projectile.type, (int)(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner); - } - } - - Projectile.Kill(); - } - - break; - - case 3: // Lime, home in on player within certain distance - - float inertia = 30f; - float homingSpeed = MaxVelocity; - float minDist = 300f; - if (Main.player[Projectile.owner].active && !Main.player[Projectile.owner].dead) - { - if (Projectile.Distance(Main.player[Projectile.owner].Center) > minDist) - { - Vector2 moveDirection = Projectile.SafeDirectionTo(Main.player[Projectile.owner].Center, Vector2.UnitY); - Projectile.velocity = (Projectile.velocity * (inertia - 1f) + moveDirection * homingSpeed) / inertia; - } - } - else - { - if (Projectile.timeLeft > 30) - Projectile.timeLeft = 30; - } - - break; - - case 4: // Green, home in on enemies - - CalamityUtils.HomeInOnNPC(Projectile, false, 600f, MaxVelocity, 30f); - - break; - - case 5: // Turquoise, speed up and don't collide with tiles - - Projectile.tileCollide = false; - if (Projectile.velocity.Length() < MaxVelocity) - { - Projectile.velocity *= 1.03f; - if (Projectile.velocity.Length() > MaxVelocity) - { - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY); - Projectile.velocity *= MaxVelocity; - } - } - - break; - - case 6: // Cyan, upon death create several turquoise swords - case 7: // Light Blue, slow down on hit - case 8: // Blue, bounce off of tiles and enemies - break; - - case 9: // Purple, speed up and slow down over and over - - if (Projectile.localAI[1] < 30f) - Projectile.velocity *= 0.95f; - else if (Projectile.localAI[1] < 60f) - Projectile.velocity *= 1.07f; - else if (Projectile.localAI[1] == 60f) - Projectile.localAI[1] = -1f; - Projectile.localAI[1] += 1f; - - break; - - case 10: // Fuschia, start slow then get faster - - if (Projectile.localAI[1] == 0f) - { - Projectile.velocity *= 0.1f; - Projectile.localAI[1] += 1f; - } - - if (Projectile.velocity.Length() < MaxVelocity) - { - Projectile.velocity *= 1.05f; - if (Projectile.velocity.Length() > MaxVelocity) - { - Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitY); - Projectile.velocity *= MaxVelocity; - } - } - - break; - - case 11: // Hot Pink, split into fuschia while travelling - - if (Projectile.localAI[1] == 0f) - Projectile.velocity *= 0.333f; - - if (Projectile.localAI[1] >= 45f) - { - Projectile.localAI[1] = 0f; - if (Main.myPlayer == Projectile.owner) - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Projectile.oldVelocity, Projectile.velocity, Projectile.type, (int)Math.Round(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, 10f, 0f); - } - Projectile.localAI[1] += 1f; - - break; - - default: - break; - } - - Projectile.ai[2] += MathHelper.Lerp(1f, 2f, Projectile.ai[0] / 11f); - if (Projectile.ai[2] > 7f) - { - Dust rainbow = Main.dust[Dust.NewDust(new Vector2(Projectile.position.X - Projectile.velocity.X + 2f, Projectile.position.Y + 2f - Projectile.velocity.Y), 8, 8, DustID.RainbowMk2, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, Projectile.alpha, default, 1.25f)]; - rainbow.velocity *= -0.25f; - rainbow.color = color; - rainbow.color.A = 100; - rainbow.scale = Main.rand.NextFloat(1f, 1.25f); - rainbow.fadeIn = Main.rand.NextFloat(0.4f, 1f); - rainbow.noGravity = true; - rainbow.noLightEmittence = true; - - rainbow = Main.dust[Dust.NewDust(new Vector2(Projectile.position.X - Projectile.velocity.X + 2f, Projectile.position.Y + 2f - Projectile.velocity.Y), 8, 8, DustID.RainbowMk2, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, Projectile.alpha, default, 1.25f)]; - rainbow.velocity *= -0.25f; - rainbow.color = color; - rainbow.color.A = 100; - rainbow.scale = Main.rand.NextFloat(1f, 1.25f); - rainbow.fadeIn = Main.rand.NextFloat(0.4f, 1f); - rainbow.noGravity = true; - rainbow.position -= Projectile.velocity * 0.5f; - rainbow.noLightEmittence = true; - - if (Projectile.localAI[0] == 0f) - { - Projectile.scale -= 0.02f; - Projectile.alpha += 5; - if (Projectile.alpha >= Alpha - 5) - { - Projectile.alpha = Alpha; - Projectile.localAI[0] = 1f; - } - } - else if (Projectile.localAI[0] == 1f) - { - Projectile.scale += 0.02f; - Projectile.alpha -= 5; - if (Projectile.alpha <= 0) - { - Projectile.alpha = 0; - Projectile.localAI[0] = 0f; - } - } - } - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 300); - - if (Projectile.ai[0] == 7f) - Projectile.velocity *= 0.5f; - else if (Projectile.ai[0] == 8f) - Projectile.velocity *= -1f; - } - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - target.AddBuff(ModContent.BuffType(), 300); - - if (Projectile.ai[0] == 7f) - Projectile.velocity *= 0.5f; - else if (Projectile.ai[0] == 8f) - Projectile.velocity *= -1f; - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - if (Projectile.ai[0] == 8f) - { - if (Projectile.velocity.X != oldVelocity.X) - Projectile.velocity.X = -oldVelocity.X; - if (Projectile.velocity.Y != oldVelocity.Y) - Projectile.velocity.Y = -oldVelocity.Y; - - return false; - } - - return true; - } - - public Color TrailColor(float completionRatio) - { - float hue = (Main.GlobalTimeWrappedHourly * -0.62f + completionRatio * 1.5f) % 1f; - float brightness = MathHelper.SmoothStep(0.5f, 1f, Utils.GetLerpValue(0.3f, 0f, completionRatio, true)); - float opacity = Utils.GetLerpValue(1f, 0.8f, completionRatio, true) * ((255 - Projectile.alpha) / 255f); - Color color = GetProjectileColor() * opacity; - color.A = (byte)(int)(Utils.GetLerpValue(0f, 0.2f, completionRatio) * 128); - return color; - } - - public float TrailWidth(float completionRatio) - { - float widthInterpolant = Utils.GetLerpValue(0f, 0.25f, completionRatio, true) * Utils.GetLerpValue(1.1f, 0.7f, completionRatio, true); - return MathHelper.SmoothStep(0f, 14f, widthInterpolant) * Projectile.scale; - } - - public override Color? GetAlpha(Color lightColor) => GetProjectileColor(); - - public override bool PreDraw(ref Color lightColor) - { - if (Projectile.timeLeft > TimeLeft - 5) - return false; - - Main.spriteBatch.EnterShaderRegion(); - - GameShaders.Misc["CalamityMod:ArtAttack"].SetShaderTexture(ModContent.Request("CalamityMod/ExtraTextures/Trails/SylvestaffStreak")); - GameShaders.Misc["CalamityMod:ArtAttack"].Apply(); - - PrimitiveRenderer.RenderTrail(Projectile.oldPos, new(TrailWidth, TrailColor, (_) => Projectile.Size * 0.5f, shader: GameShaders.Misc["CalamityMod:ArtAttack"]), TrailLength); - - Main.spriteBatch.ExitShaderRegion(); - - Texture2D texture = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - int frameHeight = texture.Height / Main.projFrames[Type]; - int frameY = frameHeight * Projectile.frame; - float scale = Projectile.scale; - Rectangle rectangle = new Rectangle(0, frameY, texture.Width, frameHeight); - Vector2 origin = rectangle.Size() / 2f; - Color alphaColor = Projectile.GetAlpha(lightColor); - - if (CalamityClientConfig.Instance.Afterimages) - { - Vector2 centerOffset = Projectile.Size / 2f; - int totalAfterimages = TotalAfterimages; - for (int i = 0; i < totalAfterimages; i++) - { - int arrayPos = i * AfterimageOffset; - float afterimageRot = Projectile.oldRot[arrayPos]; - SpriteEffects sfxForThisAfterimage = Projectile.oldSpriteDirection[arrayPos] == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; - Vector2 drawPos = Projectile.oldPos[arrayPos] + centerOffset - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY); - float colorAndSizeScalar = (float)(totalAfterimages - i) / (float)totalAfterimages; - Color color = alphaColor * colorAndSizeScalar; - float afterimageScale = scale * MathHelper.Lerp(0.5f, 1f, colorAndSizeScalar); - Main.spriteBatch.Draw(texture, drawPos, new Rectangle?(rectangle), color, afterimageRot, origin, afterimageScale, sfxForThisAfterimage, 0f); - } - } - else - { - SpriteEffects spriteEffects = SpriteEffects.None; - if (Projectile.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Main.spriteBatch.Draw(texture, Projectile.Center - Main.screenPosition + new Vector2(0f, Projectile.gfxOffY), rectangle, alphaColor, Projectile.rotation, origin, scale, spriteEffects, 0f); - } - - return false; - } - - public override void OnKill(int timeLeft) - { - SoundEngine.PlaySound(SoundID.Item10, Projectile.Center); - - Color color = GetProjectileColor(); - switch ((int)Projectile.ai[0]) - { - case 0: // Red - case 1: // Orange - case 2: // Yellow - case 3: // Lime - case 4: // Green - case 5: // Turquoise - break; - - case 6: // Cyan - - for (int x = 0; x < 2; x++) - { - if (Projectile.owner == Main.myPlayer) - { - var source = Projectile.GetSource_FromThis(); - CalamityUtils.ProjectileBarrage(source, Projectile.Center, Projectile.Center, x == 1, 500f, 500f, 0f, 500f, MaxVelocity, Projectile.type, (int)Math.Round(Projectile.damage * 0.5), Projectile.knockBack * 0.5f, Projectile.owner, false, 0f).ai[0] = 5f; - } - } - - break; - - case 7: // Light Blue - case 8: // Blue - case 9: // Purple - case 10: // Fuschia - case 11: // Hot Pink - default: - break; - } - - int totalDust = 60; - for (int i = 4; i < totalDust + 1; i++) - { - Vector2 oldVel = Projectile.oldVelocity * (totalDust / (float)i); - Dust rainbow = Main.dust[Dust.NewDust(Projectile.oldPosition - oldVel * 0.5f, 8, 8, DustID.RainbowMk2, Projectile.oldVelocity.X, Projectile.oldVelocity.Y, Projectile.alpha)]; - rainbow.color = color; - rainbow.color.A = 100; - rainbow.scale = Main.rand.NextFloat(2.4f, 3.6f); - rainbow.fadeIn = Main.rand.NextFloat(0.4f, 1f); - rainbow.noGravity = true; - rainbow.velocity *= (Main.rand.NextBool() ? 0.05f : 0.5f); - } - } - - private Color GetProjectileColor() - { - Color rainbow = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Alpha); - Color color = Color.White; - switch ((int)Projectile.ai[0]) - { - case 0: // Red - color = new Color(255, 0, 0, Alpha); - break; - case 1: // Orange - color = new Color(255, 128, 0, Alpha); - break; - case 2: // Yellow - color = new Color(255, 255, 0, Alpha); - break; - case 3: // Lime - color = new Color(128, 255, 0, Alpha); - break; - case 4: // Green - color = new Color(0, 255, 0, Alpha); - break; - case 5: // Turquoise - color = new Color(0, 255, 128, Alpha); - break; - case 6: // Cyan - color = new Color(0, 255, 255, Alpha); - break; - case 7: // Light Blue - color = new Color(0, 128, 255, Alpha); - break; - case 8: // Blue - color = new Color(0, 0, 255, Alpha); - break; - case 9: // Purple - color = new Color(128, 0, 255, Alpha); - break; - case 10: // Fuschia - color = new Color(255, 0, 255, Alpha); - break; - case 11: // Hot Pink - color = new Color(255, 0, 128, Alpha); - break; - default: - break; - } - return Color.Lerp(rainbow, color, (float)Math.Sqrt((MathF.Cos(Projectile.ai[2] / 90f) + 1f) * 0.5f)); - } - } -} diff --git a/Projectiles/Melee/GayBeam.png b/Projectiles/Melee/GayBeam.png deleted file mode 100644 index 50aac5b8b22ce5e930922093f4b531efa09533a6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 738 zcmV<80v-K{P)Px%oJmAMRCt{2nk|yTKoCYhwm1qR77G_ZV7UO;2yTHzVBrE-1Q!5{jo>a>(;qOs znayM?$qZ~iLxrKJEd92BW-`D(W4TRm zynT+SGhwsYIM=7s2>@`tUY)<)j1b<|h_*~1W`yu|MueI$8jSz|+wB&B-vnYt2ybIV zXrDkrO(153kbGwuY65ct_ZLDxP=37jUIVnztb8PT^1#EcMT}d%x1I7b-ka^wF$(G5WK(gWHND1 zk(*9)M4v{}1V)@N@_m~?%m|@2N37Rt06>;yPGlJ=ZH|T!){)lhr0LF5TbL1o*NB&h zl)%%Bmk5@x*Lv4@KA$_^M-!MMv>A2h4qanL2*JNTa{+sO{p5*`u!bEZUujHi6Nnih z1b3EvwCY9Vk%m^VkN3dGZgrX>% z^~>b~09dV7mFroS0q~m>8#6*^+(!^bn33l-s|6#^D#54O*jdJ!DSVg_LgPMyW-#(J zLci*q!0O?9&M`J-gb-|m&Ji?1=Kx(T$YQYo@T@ASEe8ChQX!c|EoIW{=pI5rWqUZ9?6&Shru{+XF3%qWtZ9 z`@)P6enf#L=vkueh_!W+))r=jFsPdRa80z}|Uoj(uZ-_K* U8DIPvr~m)}07*qoM6N<$g5hIF1^@s6 diff --git a/Projectiles/Melee/IridescentExcaliburSlash.cs b/Projectiles/Melee/IridescentExcaliburSlash.cs deleted file mode 100644 index a91263e002..0000000000 --- a/Projectiles/Melee/IridescentExcaliburSlash.cs +++ /dev/null @@ -1,254 +0,0 @@ -using System.Collections.Generic; -using CalamityMod.Graphics.Primitives; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.GameContent; -using Terraria.GameContent.Drawing; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.Balancing; -using CalamityMod.Projectiles.Healing; - -namespace CalamityMod.Projectiles.Melee -{ - public class IridescentExcaliburSlash : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 16; - Projectile.height = 16; - Projectile.friendly = true; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.ownerHitCheck = true; - Projectile.ownerHitCheckDistance = 300f; - Projectile.usesOwnerMeleeHitCD = true; - Projectile.stopsDealingDamageAfterPenetrateHits = true; - Projectile.DamageType = DamageClass.Melee; - Projectile.penetrate = -1; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - - public override void AI() - { - Projectile.localAI[0] += 1f; - Player player = Main.player[Projectile.owner]; - float num = Projectile.localAI[0] / Projectile.ai[1]; - float num2 = Projectile.ai[0]; - float num3 = Projectile.velocity.ToRotation(); - float num4 = (float)Math.PI * num2 * num + num3 + num2 * (float)Math.PI + player.fullRotation; - Projectile.rotation = num4; - float num5 = 1f; - float num6 = 1.2f; - - Projectile.Center = player.RotatedRelativePoint(player.MountedCenter) - Projectile.velocity; - Projectile.scale = num6 + num * num5; - - float colorAIScale = Projectile.localAI[0] / Projectile.ai[1]; - float amount = Utils.Remap(colorAIScale, 0f, 0.6f, 0f, 1f) * Utils.Remap(colorAIScale, 0.6f, 1f, 1f, 0f); - Color rainbow = Color.Lerp(new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), amount); - float num8 = Projectile.rotation + Main.rand.NextFloatDirection() * MathHelper.PiOver2 * 0.7f; - Vector2 vector2 = Projectile.Center + num8.ToRotationVector2() * 84f * Projectile.scale; - Vector2 vector3 = (num8 + Projectile.ai[0] * MathHelper.PiOver2).ToRotationVector2(); - if (Main.rand.NextFloat() * 2f < Projectile.Opacity) - { - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + num8.ToRotationVector2() * (Main.rand.NextFloat() * 80f * Projectile.scale + 20f * Projectile.scale), 278, vector3 * 1f, 100, rainbow, 0.4f); - dust2.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - dust2.noGravity = true; - } - - if (Main.rand.NextFloat() * 1.5f < Projectile.Opacity) - Dust.NewDustPerfect(vector2, 43, vector3 * 1f, 100, rainbow * Projectile.Opacity, 1.2f * Projectile.Opacity); - - float num10 = Projectile.rotation + Main.rand.NextFloatDirection() * MathHelper.PiOver2 * 0.7f; - Vector2 vector5 = Projectile.Center + num10.ToRotationVector2() * 84f * Projectile.scale; - Vector2 vector6 = (num10 + Projectile.ai[0] * MathHelper.PiOver2).ToRotationVector2(); - if (Main.rand.NextFloat() < Projectile.Opacity) - { - Dust dust4 = Dust.NewDustPerfect(Projectile.Center + num10.ToRotationVector2() * (Main.rand.NextFloat() * 80f * Projectile.scale + 20f * Projectile.scale), 278, vector6 * 1f, 100, rainbow, 0.4f); - dust4.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - dust4.noGravity = true; - } - - if (Main.rand.NextFloat() * 1.5f < Projectile.Opacity) - Dust.NewDustPerfect(vector5, 43, vector6 * 1f, 100, rainbow * Projectile.Opacity, 1.2f * Projectile.Opacity); - - Projectile.scale *= Projectile.ai[2]; - if (Projectile.localAI[0] >= Projectile.ai[1]) - Projectile.Kill(); - - // Enchantment visual bullshit - Vector2 boxPosition = Projectile.position; - int boxWidth = Projectile.width; - int boxHeight = Projectile.height; - for (float i = -MathHelper.PiOver4; i <= MathHelper.PiOver4; i += MathHelper.PiOver2) - { - Rectangle rect = Utils.CenteredRectangle(Projectile.Center + (Projectile.rotation + i).ToRotationVector2() * 70f * Projectile.scale, new Vector2(60f * Projectile.scale, 60f * Projectile.scale)); - Projectile.EmitEnchantmentVisualsAt(rect.TopLeft(), rect.Width, rect.Height); - } - } - - public override bool PreDraw(ref Color lightColor) - { - Vector2 vector = Projectile.Center - Main.screenPosition; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Rectangle rectangle = asset.Frame(1, 4); - Vector2 origin = rectangle.Size() / 2f; - float num = Projectile.scale * 1.1f; - SpriteEffects effects = ((!(Projectile.ai[0] >= 0f)) ? SpriteEffects.FlipVertically : SpriteEffects.None); - float num2 = Projectile.localAI[0] / Projectile.ai[1]; - float num3 = Utils.Remap(num2, 0f, 0.6f, 0f, 1f) * Utils.Remap(num2, 0.6f, 1f, 1f, 0f); - float num4 = 0.975f; - float amount = num3; - float fromValue = Lighting.GetColor(Projectile.Center.ToTileCoordinates()).ToVector3().Length() / (float)Math.Sqrt(3D); - fromValue = Utils.Remap(fromValue, 0.2f, 1f, 0f, 1f); - Color color = Color.Lerp(new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), amount); - Main.spriteBatch.Draw(asset, vector, rectangle, color * fromValue * num3, Projectile.rotation + Projectile.ai[0] * MathHelper.PiOver4 * -1f * (1f - num2), origin, num, effects, 0f); - Color color2 = Color.Lerp(new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), amount); - Color color3 = Color.Lerp(new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), amount); - Color color4 = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * num3 * 0.5f; - Color color5 = color4 * fromValue * 0.5f; - Main.spriteBatch.Draw(asset, vector, rectangle, color5 * 0.15f, Projectile.rotation + Projectile.ai[0] * 0.01f, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, rectangle, color3 * fromValue * num3 * 0.3f, Projectile.rotation, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, rectangle, color2 * fromValue * num3 * 0.5f, Projectile.rotation, origin, num * num4, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * 0.6f * num3, Projectile.rotation + Projectile.ai[0] * 0.01f, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * 0.5f * num3, Projectile.rotation + Projectile.ai[0] * -0.05f, origin, num * 0.8f, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB) * 0.4f * num3, Projectile.rotation + Projectile.ai[0] * -0.1f, origin, num * 0.6f, effects, 0f); - float num5 = num * 0.75f; - Texture2D value = TextureAssets.Extra[98].Value; - Color shineColor = color3 * Projectile.Opacity * 0.5f; - Vector2 origin2 = value.Size() / 2f; - float num9 = Utils.GetLerpValue(0f, 0.5f, num2, clamped: true) * Utils.GetLerpValue(1f, 0.5f, num2, clamped: true); - Vector2 vector3 = new Vector2((Vector2.One * num5).X * 0.5f, (new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num5).X) * num9; - Vector2 vector2 = new Vector2((Vector2.One * num5).Y * 0.5f, (new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num5).Y) * num9; - shineColor *= num9; - for (float num6 = 0f; num6 < 12f; num6 += 1f) - { - float num7 = Projectile.rotation + Projectile.ai[0] * num6 * -MathHelper.TwoPi * 0.025f + Utils.Remap(num2, 0f, 0.6f, 0f, 0.95504415f) * Projectile.ai[0]; - Vector2 drawpos = vector + num7.ToRotationVector2() * ((float)asset.Width * 0.5f - 6f) * num; - float num8 = num6 / 12f; - - Color color6 = new Color(255, 255, 255, 0) * num3 * num8 * 0.5f; - color6 *= num9; - Main.EntitySpriteDraw(value, drawpos, null, shineColor, MathHelper.PiOver2 + num7, origin2, vector3, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, shineColor, 0f + num7, origin2, vector2, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, color6, MathHelper.PiOver2 + num7, origin2, vector3 * 0.6f, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, color6, 0f + num7, origin2, vector2 * 0.6f, SpriteEffects.None); - } - - Vector2 drawpos2 = vector + (Projectile.rotation + Utils.Remap(num2, 0f, 0.6f, 0f, 0.95504415f) * Projectile.ai[0]).ToRotationVector2() * ((float)asset.Width * 0.5f - 4f) * num; - Color color7 = new Color(255, 255, 255, 0) * num3 * 0.5f; - color7 *= num9; - Main.EntitySpriteDraw(value, drawpos2, null, shineColor, MathHelper.PiOver2 + Projectile.rotation, origin2, vector3, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, shineColor, 0f + Projectile.rotation, origin2, vector2, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, color7, MathHelper.PiOver2 + Projectile.rotation, origin2, vector3 * 0.6f, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, color7, 0f + Projectile.rotation, origin2, vector2 * 0.6f, SpriteEffects.None); - - return false; - } - - public override void CutTiles() - { - Vector2 startPoint = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * 60f * Projectile.scale; - Vector2 endPoint = (Projectile.rotation + MathHelper.PiOver4).ToRotationVector2() * 60f * Projectile.scale; - float projectileSize = 60f * Projectile.scale; - Utils.PlotTileLine(Projectile.Center + startPoint, Projectile.Center + endPoint, projectileSize, DelegateMethods.CutTiles); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.HitDirectionOverride = (Main.player[Projectile.owner].Center.X < target.Center.X) ? 1 : -1; - - Vector2 positionInWorld = Main.rand.NextVector2FromRectangle(target.Hitbox); - ParticleOrchestraSettings particleOrchestraSettings = default(ParticleOrchestraSettings); - particleOrchestraSettings.PositionInWorld = positionInWorld; - ParticleOrchestraSettings settings = particleOrchestraSettings; - switch (Main.rand.Next(5)) - { - default: - case 0: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.NightsEdge, settings, Projectile.owner); - break; - - case 1: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TrueNightsEdge, settings, Projectile.owner); - break; - - case 2: - settings.MovementVector = Projectile.velocity; - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TerraBlade, settings, Projectile.owner); - break; - - case 3: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.Excalibur, settings, Projectile.owner); - break; - - case 4: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TrueExcalibur, settings, Projectile.owner); - break; - } - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float coneLength = 94f * Projectile.scale; - float scale = MathHelper.TwoPi / 25f * Projectile.ai[0]; - float maximumAngle = MathHelper.PiOver4; - float coneRotation = Projectile.rotation + scale; - if (targetHitbox.IntersectsConeSlowMoreAccurate(Projectile.Center, coneLength, coneRotation, maximumAngle)) - return true; - - float rotation = Utils.Remap(Projectile.localAI[0], Projectile.ai[1] * 0.3f, Projectile.ai[1] * 0.5f, 1f, 0f); - if (rotation > 0f) - { - float coneRotation2 = coneRotation - MathHelper.PiOver4 * Projectile.ai[0] * rotation; - if (targetHitbox.IntersectsConeSlowMoreAccurate(Projectile.Center, coneLength, coneRotation2, maximumAngle)) - return true; - } - - return false; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 600); - target.AddBuff(ModContent.BuffType(), 60); - - int heal = (int)Math.Round(hit.Damage * 0.01); - if (heal > BalancingConstants.LifeStealCap) - heal = BalancingConstants.LifeStealCap; - - if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0 || target.lifeMax <= 5) - return; - - CalamityGlobalProjectile.SpawnLifeStealProjectile(Projectile, Main.player[Projectile.owner], heal, ModContent.ProjectileType(), BalancingConstants.LifeStealRange); - } - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - target.AddBuff(ModContent.BuffType(), 600); - target.AddBuff(ModContent.BuffType(), 60); - - int heal = (int)Math.Round(info.Damage * 0.01); - if (heal > BalancingConstants.LifeStealCap) - heal = BalancingConstants.LifeStealCap; - - if (Main.LocalPlayer.lifeSteal <= 0f || heal <= 0) - return; - - CalamityGlobalProjectile.SpawnLifeStealProjectile(Projectile, Main.player[Projectile.owner], heal, ModContent.ProjectileType(), BalancingConstants.LifeStealRange); - } - } -} diff --git a/Projectiles/Melee/IridescentExcaliburSlash.png b/Projectiles/Melee/IridescentExcaliburSlash.png deleted file mode 100644 index 9a31d6718ad9e30e327450984ea2a4d347b5cca2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2957 zcmZ`*Yfuwe7LJsxF5)<=1RtoB>@oupM8^l^s-T7z2_Ol1UhH;K z?8|=pqUf@B+QYW=ZH2xe+=efHz5Z|$f&Ar|Q;JK#vFc-8ZeT6~;rQ34$!X){=%XB+ zM{{H9=|#tH-OOXr&J6d;u4P({{Z#><>%o|EmhagxP}Iyc>U-oH+>1~zDx+bH%R(H} z#qY#Vs!623*oc-3bgU{;g?Q;6TB1~r+vJ0p!R;g|w0%JHpv_veFoQDRos<=lBE`ax zbG9`%HefF7@EDq}6pv(9)-#Esg_%lHP@g1|G9QT$$q-jgiv+H{ZTlpP$#8HYW9ur4gok6 zfwAy;`4u2DcItXY8E>Kr!_fbI(_1RLGNs9CoZm1UR?H+Uz<8)&l#QM# zOLbT|V*@c|(_aQ8K65LW5MD(O6^!%ziJ&C-arP-LjM;T(Q?`&7Z?^e8O2=3L^R8`U z#5|C5b;N>t|14M*`%+jwc^K-ok>OBFvp+J$3ez6hH7vW+8v}N~Fk@mP`OZ03#n&L3 zJb+Z)-wJn?caRfHcHG{SeIQtd^tEo?IF%kkpBEx)61V zWBOpLvBRTjhI2QZW{v=GP@$l4`brU)ahK{FsLU6xnyGXUAiE@2G4tt@dTcA1O79>w z?s==r7oRXOT7pLA!3hBXU*&R{zimP+-&rGHHr!dL2&#C40djV{W31|AO?RH zAGh(_h&7j(I3;LqxGgKhXuBIbS)5*mA(vGr!KR83l_0J%C9r|CgDUr;$Ku9umu+m0 zs=5aE%DW!RgsW7yu;mg6SpYw;W!|2~^&b=JzuGufH8ZWX$n9Qs zouPeaE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ectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/IridescentExcaliburSlash"; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 16; - Projectile.height = 16; - Projectile.friendly = true; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.ownerHitCheck = true; - Projectile.ownerHitCheckDistance = 300f; - Projectile.usesOwnerMeleeHitCD = true; - Projectile.stopsDealingDamageAfterPenetrateHits = true; - Projectile.DamageType = DamageClass.Melee; - Projectile.penetrate = 3; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - - public override void AI() - { - Projectile.localAI[0] += 1f; - Player player = Main.player[Projectile.owner]; - float num = Projectile.localAI[0] / Projectile.ai[1]; - float num2 = Projectile.ai[0]; - float num3 = Projectile.velocity.ToRotation(); - float num4 = (float)Math.PI * num2 * num + num3 + num2 * (float)Math.PI + player.fullRotation; - Projectile.rotation = num4; - float num5 = 0.8f; - float num6 = 1.1f; - - Projectile.Center = player.RotatedRelativePoint(player.MountedCenter) - Projectile.velocity; - Projectile.scale = num6 + num * num5; - - float colorAIScale = Projectile.localAI[0] / Projectile.ai[1]; - float amount = Utils.Remap(colorAIScale, 0f, 0.6f, 0f, 1f) * Utils.Remap(colorAIScale, 0.6f, 1f, 1f, 0f); - Color rainbow = Color.Lerp(new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), amount); - float num8 = Projectile.rotation + Main.rand.NextFloatDirection() * MathHelper.PiOver2 * 0.7f; - Vector2 vector2 = Projectile.Center + num8.ToRotationVector2() * 84f * Projectile.scale; - Vector2 vector3 = (num8 + Projectile.ai[0] * MathHelper.PiOver2).ToRotationVector2(); - if (Main.rand.NextFloat() * 2f < Projectile.Opacity) - { - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + num8.ToRotationVector2() * (Main.rand.NextFloat() * 80f * Projectile.scale + 20f * Projectile.scale), 278, vector3 * 1f, 100, rainbow, 0.4f); - dust2.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - dust2.noGravity = true; - } - - if (Main.rand.NextFloat() * 1.5f < Projectile.Opacity) - Dust.NewDustPerfect(vector2, 43, vector3 * 1f, 100, rainbow * Projectile.Opacity, 1.2f * Projectile.Opacity); - - float num10 = Projectile.rotation + Main.rand.NextFloatDirection() * MathHelper.PiOver2 * 0.7f; - Vector2 vector5 = Projectile.Center + num10.ToRotationVector2() * 84f * Projectile.scale; - Vector2 vector6 = (num10 + Projectile.ai[0] * MathHelper.PiOver2).ToRotationVector2(); - if (Main.rand.NextFloat() < Projectile.Opacity) - { - Dust dust4 = Dust.NewDustPerfect(Projectile.Center + num10.ToRotationVector2() * (Main.rand.NextFloat() * 80f * Projectile.scale + 20f * Projectile.scale), 278, vector6 * 1f, 100, rainbow, 0.4f); - dust4.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - dust4.noGravity = true; - } - - if (Main.rand.NextFloat() * 1.5f < Projectile.Opacity) - Dust.NewDustPerfect(vector5, 43, vector6 * 1f, 100, rainbow * Projectile.Opacity, 1.2f * Projectile.Opacity); - - Projectile.scale *= Projectile.ai[2]; - if (Projectile.localAI[0] >= Projectile.ai[1]) - Projectile.Kill(); - - // Enchantment visual bullshit - Vector2 boxPosition = Projectile.position; - int boxWidth = Projectile.width; - int boxHeight = Projectile.height; - for (float i = -MathHelper.PiOver4; i <= MathHelper.PiOver4; i += MathHelper.PiOver2) - { - Rectangle rect = Utils.CenteredRectangle(Projectile.Center + (Projectile.rotation + i).ToRotationVector2() * 70f * Projectile.scale, new Vector2(60f * Projectile.scale, 60f * Projectile.scale)); - Projectile.EmitEnchantmentVisualsAt(rect.TopLeft(), rect.Width, rect.Height); - } - } - - public override bool PreDraw(ref Color lightColor) - { - Vector2 vector = Projectile.Center - Main.screenPosition; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Rectangle rectangle = asset.Frame(1, 4); - Vector2 origin = rectangle.Size() / 2f; - float num = Projectile.scale * 1.1f; - SpriteEffects effects = ((!(Projectile.ai[0] >= 0f)) ? SpriteEffects.FlipVertically : SpriteEffects.None); - float num2 = Projectile.localAI[0] / Projectile.ai[1]; - float num3 = Utils.Remap(num2, 0f, 0.6f, 0f, 1f) * Utils.Remap(num2, 0.6f, 1f, 1f, 0f); - float num4 = 0.975f; - float amount = num3; - float fromValue = Lighting.GetColor(Projectile.Center.ToTileCoordinates()).ToVector3().Length() / (float)Math.Sqrt(3D); - fromValue = Utils.Remap(fromValue, 0.2f, 1f, 0f, 1f); - Color color = Color.Lerp(new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), amount); - Main.spriteBatch.Draw(asset, vector, rectangle, color * fromValue * num3, Projectile.rotation + Projectile.ai[0] * MathHelper.PiOver4 * -1f * (1f - num2), origin, num, effects, 0f); - Color color2 = Color.Lerp(new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), amount); - Color color3 = Color.Lerp(new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB), new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB), amount); - Color color4 = new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB) * num3 * 0.5f; - color4.A = (byte)(((float)(int)color4.A * (1f - fromValue)) * 0.5f); - Color color5 = color4 * fromValue * 0.5f; - Main.spriteBatch.Draw(asset, vector, rectangle, color5 * 0.15f, Projectile.rotation + Projectile.ai[0] * 0.01f, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, rectangle, color3 * fromValue * num3 * 0.3f, Projectile.rotation, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, rectangle, color2 * fromValue * num3 * 0.5f, Projectile.rotation, origin, num * num4, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB) * 0.6f * num3, Projectile.rotation + Projectile.ai[0] * 0.01f, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB) * 0.5f * num3, Projectile.rotation + Projectile.ai[0] * -0.05f, origin, num * 0.8f, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB) * 0.4f * num3, Projectile.rotation + Projectile.ai[0] * -0.1f, origin, num * 0.6f, effects, 0f); - float num5 = num * 0.75f; - Texture2D value = TextureAssets.Extra[98].Value; - Color shineColor = color3 * Projectile.Opacity * 0.5f; - shineColor.A /= 2; - Vector2 origin2 = value.Size() / 2f; - float num9 = Utils.GetLerpValue(0f, 0.5f, num2, clamped: true) * Utils.GetLerpValue(1f, 0.5f, num2, clamped: true); - Vector2 vector3 = new Vector2((Vector2.One * num5).X * 0.5f, (new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num5).X) * num9; - Vector2 vector2 = new Vector2((Vector2.One * num5).Y * 0.5f, (new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num5).Y) * num9; - shineColor *= num9; - for (float num6 = 0f; num6 < 12f; num6 += 1f) - { - float num7 = Projectile.rotation + Projectile.ai[0] * num6 * -MathHelper.TwoPi * 0.025f + Utils.Remap(num2, 0f, 0.6f, 0f, 0.95504415f) * Projectile.ai[0]; - Vector2 drawpos = vector + num7.ToRotationVector2() * ((float)asset.Width * 0.5f - 6f) * num; - float num8 = num6 / 12f; - - Color color6 = new Color(255, 255, 255, 0) * num3 * num8 * 0.5f; - color6 *= num9; - Main.EntitySpriteDraw(value, drawpos, null, shineColor, MathHelper.PiOver2 + num7, origin2, vector3, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, shineColor, 0f + num7, origin2, vector2, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, color6, MathHelper.PiOver2 + num7, origin2, vector3 * 0.6f, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, color6, 0f + num7, origin2, vector2 * 0.6f, SpriteEffects.None); - } - - Vector2 drawpos2 = vector + (Projectile.rotation + Utils.Remap(num2, 0f, 0.6f, 0f, 0.95504415f) * Projectile.ai[0]).ToRotationVector2() * ((float)asset.Width * 0.5f - 4f) * num; - Color color7 = new Color(255, 255, 255, 0) * num3 * 0.5f; - color7 *= num9; - Main.EntitySpriteDraw(value, drawpos2, null, shineColor, MathHelper.PiOver2 + Projectile.rotation, origin2, vector3, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, shineColor, 0f + Projectile.rotation, origin2, vector2, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, color7, MathHelper.PiOver2 + Projectile.rotation, origin2, vector3 * 0.6f, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, color7, 0f + Projectile.rotation, origin2, vector2 * 0.6f, SpriteEffects.None); - - return false; - } - - public override void CutTiles() - { - Vector2 startPoint = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * 60f * Projectile.scale; - Vector2 endPoint = (Projectile.rotation + MathHelper.PiOver4).ToRotationVector2() * 60f * Projectile.scale; - float projectileSize = 60f * Projectile.scale; - Utils.PlotTileLine(Projectile.Center + startPoint, Projectile.Center + endPoint, projectileSize, DelegateMethods.CutTiles); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.HitDirectionOverride = (Main.player[Projectile.owner].Center.X < target.Center.X) ? 1 : -1; - - Vector2 positionInWorld = Main.rand.NextVector2FromRectangle(target.Hitbox); - ParticleOrchestraSettings particleOrchestraSettings = default(ParticleOrchestraSettings); - particleOrchestraSettings.PositionInWorld = positionInWorld; - ParticleOrchestraSettings settings = particleOrchestraSettings; - switch (Main.rand.Next(5)) - { - default: - case 0: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.NightsEdge, settings, Projectile.owner); - break; - - case 1: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TrueNightsEdge, settings, Projectile.owner); - break; - - case 2: - settings.MovementVector = Projectile.velocity; - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TerraBlade, settings, Projectile.owner); - break; - - case 3: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.Excalibur, settings, Projectile.owner); - break; - - case 4: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TrueExcalibur, settings, Projectile.owner); - break; - } - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float coneLength = 94f * Projectile.scale; - float scale = MathHelper.TwoPi / 25f * Projectile.ai[0]; - float maximumAngle = MathHelper.PiOver4; - float coneRotation = Projectile.rotation + scale; - if (targetHitbox.IntersectsConeSlowMoreAccurate(Projectile.Center, coneLength, coneRotation, maximumAngle)) - return true; - - float rotation = Utils.Remap(Projectile.localAI[0], Projectile.ai[1] * 0.3f, Projectile.ai[1] * 0.5f, 1f, 0f); - if (rotation > 0f) - { - float coneRotation2 = coneRotation - MathHelper.PiOver4 * Projectile.ai[0] * rotation; - if (targetHitbox.IntersectsConeSlowMoreAccurate(Projectile.Center, coneLength, coneRotation2, maximumAngle)) - return true; - } - - return false; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 600); - target.AddBuff(ModContent.BuffType(), 60); - } - } -} diff --git a/Projectiles/Melee/IridescentExcaliburSlash3.cs b/Projectiles/Melee/IridescentExcaliburSlash3.cs deleted file mode 100644 index b370bdf8b5..0000000000 --- a/Projectiles/Melee/IridescentExcaliburSlash3.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System.Collections.Generic; -using CalamityMod.Graphics.Primitives; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; -using Terraria; -using Terraria.GameContent; -using Terraria.GameContent.Drawing; -using Terraria.Graphics.Shaders; -using Terraria.ModLoader; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; - -namespace CalamityMod.Projectiles.Melee -{ - public class IridescentExcaliburSlash3 : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Melee"; - public override string Texture => "CalamityMod/Projectiles/Melee/IridescentExcaliburSlash"; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 16; - Projectile.height = 16; - Projectile.friendly = true; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.ownerHitCheck = true; - Projectile.ownerHitCheckDistance = 300f; - Projectile.usesOwnerMeleeHitCD = true; - Projectile.stopsDealingDamageAfterPenetrateHits = true; - Projectile.DamageType = DamageClass.Melee; - Projectile.penetrate = 3; - Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = -1; - } - - public override void AI() - { - Projectile.localAI[0] += 1f; - Player player = Main.player[Projectile.owner]; - float num = Projectile.localAI[0] / Projectile.ai[1]; - float num2 = Projectile.ai[0]; - float num3 = Projectile.velocity.ToRotation(); - float num4 = (float)Math.PI * num2 * num + num3 + num2 * (float)Math.PI + player.fullRotation; - Projectile.rotation = num4; - float num5 = 0.6f; - float num6 = 1f; - - Projectile.Center = player.RotatedRelativePoint(player.MountedCenter) - Projectile.velocity; - Projectile.scale = num6 + num * num5; - - float colorAIScale = Projectile.localAI[0] / Projectile.ai[1]; - float amount = Utils.Remap(colorAIScale, 0f, 0.6f, 0f, 1f) * Utils.Remap(colorAIScale, 0.6f, 1f, 1f, 0f); - Color rainbow = Color.Lerp(new Color(255 - (Math.Abs(128 - Main.DiscoR) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoG) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoB) * 2 - 1)), - new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1), amount); - - float num8 = Projectile.rotation + Main.rand.NextFloatDirection() * MathHelper.PiOver2 * 0.7f; - Vector2 vector2 = Projectile.Center + num8.ToRotationVector2() * 84f * Projectile.scale; - Vector2 vector3 = (num8 + Projectile.ai[0] * MathHelper.PiOver2).ToRotationVector2(); - if (Main.rand.NextFloat() * 2f < Projectile.Opacity) - { - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + num8.ToRotationVector2() * (Main.rand.NextFloat() * 80f * Projectile.scale + 20f * Projectile.scale), 278, vector3 * 1f, 100, rainbow, 0.4f); - dust2.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - dust2.noGravity = true; - } - - if (Main.rand.NextFloat() * 1.5f < Projectile.Opacity) - Dust.NewDustPerfect(vector2, 43, vector3 * 1f, 100, rainbow * Projectile.Opacity, 1.2f * Projectile.Opacity); - - float num10 = Projectile.rotation + Main.rand.NextFloatDirection() * MathHelper.PiOver2 * 0.7f; - Vector2 vector5 = Projectile.Center + num10.ToRotationVector2() * 84f * Projectile.scale; - Vector2 vector6 = (num10 + Projectile.ai[0] * MathHelper.PiOver2).ToRotationVector2(); - if (Main.rand.NextFloat() < Projectile.Opacity) - { - Dust dust4 = Dust.NewDustPerfect(Projectile.Center + num10.ToRotationVector2() * (Main.rand.NextFloat() * 80f * Projectile.scale + 20f * Projectile.scale), 278, vector6 * 1f, 100, rainbow, 0.4f); - dust4.fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - dust4.noGravity = true; - } - - if (Main.rand.NextFloat() * 1.5f < Projectile.Opacity) - Dust.NewDustPerfect(vector5, 43, vector6 * 1f, 100, rainbow * Projectile.Opacity, 1.2f * Projectile.Opacity); - - Projectile.scale *= Projectile.ai[2]; - if (Projectile.localAI[0] >= Projectile.ai[1]) - Projectile.Kill(); - - // Enchantment visual bullshit - Vector2 boxPosition = Projectile.position; - int boxWidth = Projectile.width; - int boxHeight = Projectile.height; - for (float i = -MathHelper.PiOver4; i <= MathHelper.PiOver4; i += MathHelper.PiOver2) - { - Rectangle rect = Utils.CenteredRectangle(Projectile.Center + (Projectile.rotation + i).ToRotationVector2() * 70f * Projectile.scale, new Vector2(60f * Projectile.scale, 60f * Projectile.scale)); - Projectile.EmitEnchantmentVisualsAt(rect.TopLeft(), rect.Width, rect.Height); - } - } - - public override bool PreDraw(ref Color lightColor) - { - Vector2 vector = Projectile.Center - Main.screenPosition; - Texture2D asset = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Rectangle rectangle = asset.Frame(1, 4); - Vector2 origin = rectangle.Size() / 2f; - float num = Projectile.scale * 1.1f; - SpriteEffects effects = ((!(Projectile.ai[0] >= 0f)) ? SpriteEffects.FlipVertically : SpriteEffects.None); - float num2 = Projectile.localAI[0] / Projectile.ai[1]; - float num3 = Utils.Remap(num2, 0f, 0.6f, 0f, 1f) * Utils.Remap(num2, 0.6f, 1f, 1f, 0f); - float num4 = 0.975f; - float amount = num3; - float fromValue = Lighting.GetColor(Projectile.Center.ToTileCoordinates()).ToVector3().Length() / (float)Math.Sqrt(3D); - fromValue = Utils.Remap(fromValue, 0.2f, 1f, 0f, 1f); - - Color color = Color.Lerp(new Color(255 - (Math.Abs(128 - Main.DiscoR) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoG) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoB) * 2 - 1)), - new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1), amount); - Main.spriteBatch.Draw(asset, vector, rectangle, color * fromValue * num3, Projectile.rotation + Projectile.ai[0] * MathHelper.PiOver4 * -1f * (1f - num2), origin, num, effects, 0f); - Color color2 = Color.Lerp(new Color(255 - (Math.Abs(128 - Main.DiscoR) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoG) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoB) * 2 - 1)), - new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1), amount); - Color color3 = Color.Lerp(new Color(255 - (Math.Abs(128 - Main.DiscoR) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoG) * 2 - 1), 255 - (Math.Abs(128 - Main.DiscoB) * 2 - 1)), - new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1), amount); - - Color color4 = new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1) * num3 * 0.5f; - color4.A = (byte)((float)(int)color4.A * (1f - fromValue)); - Color color5 = color4 * fromValue * 0.5f; - Main.spriteBatch.Draw(asset, vector, rectangle, color5 * 0.15f, Projectile.rotation + Projectile.ai[0] * 0.01f, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, rectangle, color3 * fromValue * num3 * 0.3f, Projectile.rotation, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, rectangle, color2 * fromValue * num3 * 0.5f, Projectile.rotation, origin, num * num4, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1) * 0.6f * num3, Projectile.rotation + Projectile.ai[0] * 0.01f, origin, num, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1) * 0.5f * num3, Projectile.rotation + Projectile.ai[0] * -0.05f, origin, num * 0.8f, effects, 0f); - Main.spriteBatch.Draw(asset, vector, asset.Frame(1, 4, 0, 3), new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1) * 0.4f * num3, Projectile.rotation + Projectile.ai[0] * -0.1f, origin, num * 0.6f, effects, 0f); - float num5 = num * 0.75f; - Texture2D value = TextureAssets.Extra[98].Value; - Color shineColor = color3 * Projectile.Opacity * 0.5f; - shineColor.A = 0; - Vector2 origin2 = value.Size() / 2f; - float num9 = Utils.GetLerpValue(0f, 0.5f, num2, clamped: true) * Utils.GetLerpValue(1f, 0.5f, num2, clamped: true); - Vector2 vector3 = new Vector2((Vector2.One * num5).X * 0.5f, (new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num5).X) * num9; - Vector2 vector2 = new Vector2((Vector2.One * num5).Y * 0.5f, (new Vector2(0f, Utils.Remap(num2, 0f, 1f, 3f, 0f)) * num5).Y) * num9; - shineColor *= num9; - for (float num6 = 0f; num6 < 12f; num6 += 1f) - { - float num7 = Projectile.rotation + Projectile.ai[0] * num6 * -MathHelper.TwoPi * 0.025f + Utils.Remap(num2, 0f, 0.6f, 0f, 0.95504415f) * Projectile.ai[0]; - Vector2 drawpos = vector + num7.ToRotationVector2() * ((float)asset.Width * 0.5f - 6f) * num; - float num8 = num6 / 12f; - - Color color6 = new Color(255, 255, 255, 0) * num3 * num8 * 0.5f; - color6 *= num9; - Main.EntitySpriteDraw(value, drawpos, null, shineColor, MathHelper.PiOver2 + num7, origin2, vector3, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, shineColor, 0f + num7, origin2, vector2, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, color6, MathHelper.PiOver2 + num7, origin2, vector3 * 0.6f, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos, null, color6, 0f + num7, origin2, vector2 * 0.6f, SpriteEffects.None); - } - - Vector2 drawpos2 = vector + (Projectile.rotation + Utils.Remap(num2, 0f, 0.6f, 0f, 0.95504415f) * Projectile.ai[0]).ToRotationVector2() * ((float)asset.Width * 0.5f - 4f) * num; - Color color7 = new Color(255, 255, 255, 0) * num3 * 0.5f; - color7 *= num9; - Main.EntitySpriteDraw(value, drawpos2, null, shineColor, MathHelper.PiOver2 + Projectile.rotation, origin2, vector3, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, shineColor, 0f + Projectile.rotation, origin2, vector2, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, color7, MathHelper.PiOver2 + Projectile.rotation, origin2, vector3 * 0.6f, SpriteEffects.None); - Main.EntitySpriteDraw(value, drawpos2, null, color7, 0f + Projectile.rotation, origin2, vector2 * 0.6f, SpriteEffects.None); - - return false; - } - - public override void CutTiles() - { - Vector2 startPoint = (Projectile.rotation - MathHelper.PiOver4).ToRotationVector2() * 60f * Projectile.scale; - Vector2 endPoint = (Projectile.rotation + MathHelper.PiOver4).ToRotationVector2() * 60f * Projectile.scale; - float projectileSize = 60f * Projectile.scale; - Utils.PlotTileLine(Projectile.Center + startPoint, Projectile.Center + endPoint, projectileSize, DelegateMethods.CutTiles); - } - - public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) - { - modifiers.HitDirectionOverride = (Main.player[Projectile.owner].Center.X < target.Center.X) ? 1 : -1; - - Vector2 positionInWorld = Main.rand.NextVector2FromRectangle(target.Hitbox); - ParticleOrchestraSettings particleOrchestraSettings = default(ParticleOrchestraSettings); - particleOrchestraSettings.PositionInWorld = positionInWorld; - ParticleOrchestraSettings settings = particleOrchestraSettings; - switch (Main.rand.Next(5)) - { - default: - case 0: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.NightsEdge, settings, Projectile.owner); - break; - - case 1: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TrueNightsEdge, settings, Projectile.owner); - break; - - case 2: - settings.MovementVector = Projectile.velocity; - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TerraBlade, settings, Projectile.owner); - break; - - case 3: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.Excalibur, settings, Projectile.owner); - break; - - case 4: - ParticleOrchestrator.RequestParticleSpawn(clientOnly: false, ParticleOrchestraType.TrueExcalibur, settings, Projectile.owner); - break; - } - } - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) - { - float coneLength = 94f * Projectile.scale; - float scale = MathHelper.TwoPi / 25f * Projectile.ai[0]; - float maximumAngle = MathHelper.PiOver4; - float coneRotation = Projectile.rotation + scale; - if (targetHitbox.IntersectsConeSlowMoreAccurate(Projectile.Center, coneLength, coneRotation, maximumAngle)) - return true; - - float rotation = Utils.Remap(Projectile.localAI[0], Projectile.ai[1] * 0.3f, Projectile.ai[1] * 0.5f, 1f, 0f); - if (rotation > 0f) - { - float coneRotation2 = coneRotation - MathHelper.PiOver4 * Projectile.ai[0] * rotation; - if (targetHitbox.IntersectsConeSlowMoreAccurate(Projectile.Center, coneLength, coneRotation2, maximumAngle)) - return true; - } - - return false; - } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) - { - target.AddBuff(ModContent.BuffType(), 600); - target.AddBuff(ModContent.BuffType(), 60); - } - } -} diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index ea5a3dc017..1a7eafdc0d 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.friendly = true; Projectile.ignoreWater = true; Projectile.penetrate = -1; - Projectile.extraUpdates = 6; + Projectile.extraUpdates = 40; Projectile.timeLeft = 180; Projectile.DamageType = DamageClass.Melee; Projectile.usesLocalNPCImmunity = true; @@ -39,17 +39,16 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { - if (time == 0) - { - mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; - } + Player player = Main.player[Projectile.owner]; + mainColor = player.Calamity().lightRGB; + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver4; Player Owner = Main.player[Projectile.owner]; float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); - if (Projectile.timeLeft % 3 == 0 && targetDist < 1400f) + if (Projectile.timeLeft % 12 == 0 && targetDist < 1400f) { - Particle spark = new SparkParticle(Projectile.Center - Projectile.velocity * 3, -Projectile.velocity * 0.05f, false, 17, 1.5f, mainColor * 0.7f); + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 23, 0.25f, mainColor * 0.75f, new Vector2(1f, 7.35f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); GeneralParticleHandler.SpawnParticle(spark); } time++; @@ -62,7 +61,7 @@ namespace CalamityMod.Projectiles.Melee public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 180); + target.AddBuff(ModContent.BuffType(), 180); if (Projectile.numHits < 1) { Particle orb = new GlowSparkParticle(target.Center, Projectile.velocity.SafeNormalize(Vector2.UnitY), false, 12, 0.07f, mainColor, new Vector2(1.5f, 0.8f), true); diff --git a/Projectiles/Melee/OrderbringerWaveProj.cs b/Projectiles/Melee/OrderbringerWaveProj.cs index d38407612a..477ed7fbbe 100644 --- a/Projectiles/Melee/OrderbringerWaveProj.cs +++ b/Projectiles/Melee/OrderbringerWaveProj.cs @@ -9,6 +9,8 @@ using CalamityMod.Projectiles.Ranged; using Microsoft.Xna.Framework.Graphics; using System.ComponentModel; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; +using Microsoft.Build.ObjectModelRemoting; namespace CalamityMod.Projectiles.Melee { @@ -32,21 +34,23 @@ namespace CalamityMod.Projectiles.Melee Projectile.tileCollide = false; Projectile.timeLeft = 450; Projectile.DamageType = DamageClass.Melee; - Projectile.extraUpdates = 10; + Projectile.extraUpdates = 22; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } public override void AI() { - Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(100f)) * Projectile.scale) * 157; - Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-100f)) * Projectile.scale) * 157; + Vector2 topCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(125f)) * Projectile.scale) * 190; + Vector2 bottomCorner = Projectile.Center + (Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-125f)) * Projectile.scale) * 190; + + Player player = Main.player[Projectile.owner]; + mainColor = player.Calamity().lightRGB; if (time == 0) { Projectile.scale = 0.0875f; - Projectile.velocity *= 0.9f; - mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; + Projectile.velocity *= 1.25f; } Projectile.rotation = Projectile.velocity.ToRotation() - MathHelper.PiOver2; @@ -67,19 +71,20 @@ namespace CalamityMod.Projectiles.Melee { if (Main.rand.NextBool(3)) { - Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize, hitboxSize) - Projectile.velocity * 2, 66); - trailDust.scale = Main.rand.NextFloat(0.7f, 0.85f) - (time < 150 ? 0 : time * 0.001f); + Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 1.25f, hitboxSize * 1.25f) - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 25, ModContent.DustType()); + trailDust.scale = Main.rand.NextFloat(1.6f, 1.95f) - (time < 150 ? 0 : time * 0.001f); trailDust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.85f, 1.5f); - trailDust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; + trailDust.color = mainColor; trailDust.noGravity = true; + trailDust.fadeIn = 2f; } - if (time % 9 == 0) + if (time % 9 == 0 && time < 200) { - Particle orb = new GlowSparkParticle(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), false, 15, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false, 0.3f); - GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new GlowSparkParticle(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), false, 15, Main.rand.NextFloat(0.03f, 0.055f) * Utils.GetLerpValue(250, 150, time, true), mainColor, new Vector2(1, 0.8f), true, false, 0.3f); - GeneralParticleHandler.SpawnParticle(orb2); + Particle spark = new CustomSpark(topCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(-170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.35f, mainColor * 0.75f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); + GeneralParticleHandler.SpawnParticle(spark); + Particle spark2 = new CustomSpark(bottomCorner, Projectile.velocity.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.ToRadians(170f)), "CalamityMod/Particles/BloomCircle", false, 18, 0.35f, mainColor * 0.75f, new Vector2(1f, 2.5f), true, true, shrinkSpeed: 0.2f, glowOpacity: 0.7f); + GeneralParticleHandler.SpawnParticle(spark2); } if (Main.rand.NextBool(12)) { @@ -90,25 +95,22 @@ namespace CalamityMod.Projectiles.Melee } } - fadeOut = Utils.GetLerpValue(0, 180, Projectile.timeLeft, true); - time++; } public override bool PreDraw(ref Color lightColor) { Texture2D tex = ModContent.Request(Texture).Value; - float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft); - for (int i = 1; i < 6; i++) // Weird for loop because of squash code - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * fadeOut, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (i * 0.2f * waveFade), 1 + (i * 0.35f * waveFade)) * Projectile.scale * 1.1f, SpriteEffects.None, 0); + float waveFade = (float)Math.Pow(Utils.GetLerpValue(0, 250, Projectile.timeLeft, true), 2); + float waveFade2 = (float)Math.Pow(Utils.GetLerpValue(0, 80, Projectile.timeLeft, true), 2); + for (int i = 1; i < 15; i++) // Weird for loop because of squash code + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 6f * i, null, mainColor with { A = 0 } * waveFade * (1 - 0.1f * i), Projectile.rotation, tex.Size() / 2f, new Vector2(1.1f * MathHelper.Lerp(waveFade2, 1, 0.3f), 0.6f + (1 - waveFade) * 0.8f) * Projectile.scale * 1.1f, SpriteEffects.None, 0); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 300); - if (damageMult < 1.3f && damageDone > 2) - damageMult += 0.325f; + target.AddBuff(ModContent.BuffType(), 300); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) diff --git a/Projectiles/Melee/StarofJudgement.cs b/Projectiles/Melee/StarofJudgement.cs index 7d8e9fb74c..c272f3cc2c 100644 --- a/Projectiles/Melee/StarofJudgement.cs +++ b/Projectiles/Melee/StarofJudgement.cs @@ -40,8 +40,8 @@ namespace CalamityMod.Projectiles.Melee { if (time == 0) { - Projectile.scale = (Projectile.ai[2] == 1 ? 0.75f : 0.5f); mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; + Projectile.scale = (Projectile.ai[2] == 1 ? 0.75f : 0.5f); if (Projectile.ai[2] == 1) { Projectile.localNPCHitCooldown = 7; @@ -88,7 +88,10 @@ namespace CalamityMod.Projectiles.Melee } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - int buffType = Projectile.ai[2] == 1f ? ModContent.BuffType() : ModContent.BuffType(); + if (!target.CanBeChasedBy()) + Projectile.penetrate++; + + int buffType = ModContent.BuffType(); target.AddBuff(buffType, 60); if (Projectile.ai[2] == 0) diff --git a/Projectiles/Melee/StarofOrder.cs b/Projectiles/Melee/StarofOrder.cs new file mode 100644 index 0000000000..da986a53c7 --- /dev/null +++ b/Projectiles/Melee/StarofOrder.cs @@ -0,0 +1,118 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using CalamityMod.Particles; +using Terraria.ModLoader; +using Microsoft.Xna.Framework.Graphics; +using System; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; + +namespace CalamityMod.Projectiles.Melee +{ + public class StarofOrder : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Melee"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public ref float time => ref Projectile.ai[0]; + public Color mainColor; + public override void SetStaticDefaults() + { + ProjectileID.Sets.CultistIsResistantTo[Type] = true; + ProjectileID.Sets.TrailCacheLength[Type] = 12; + ProjectileID.Sets.TrailingMode[Type] = 2; + } + public override void SetDefaults() + { + Projectile.width = 44; + Projectile.height = 44; + Projectile.friendly = true; + Projectile.ignoreWater = true; + Projectile.penetrate = 4; + Projectile.tileCollide = false; + Projectile.timeLeft = 180; + Projectile.DamageType = DamageClass.Melee; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 7; + } + + public override void AI() + { + Player player = Main.player[Projectile.owner]; + mainColor = player.Calamity().lightRGB; + if (time == 0) + { + Projectile.scale = Main.rand.NextFloat(0.65f, 0.8f); + } + float sine = (float)Math.Sin(time * 0.575f * Projectile.scale / MathHelper.Pi); + + Projectile.rotation = 0.25f * sine; + if (time < 20) + { + Projectile.extraUpdates = 1; + Projectile.velocity = Projectile.velocity.RotatedBy(-Projectile.ai[1] * 0.05f); + } + else + { + Projectile.extraUpdates = 0; + CalamityUtils.HomeInOnNPC(Projectile, true, 900f, 25, MathHelper.Clamp(30 - time, 15, 30)); + } + if (time % 2 == 0 && Projectile.numHits < 1) + { + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 13, 0.35f, mainColor * 0.75f, new Vector2(0.8f, 1.35f), true, false, shrinkSpeed: 0.3f); + GeneralParticleHandler.SpawnParticle(spark); + } + + time++; + } + public override bool PreDraw(ref Color lightColor) + { + Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Color drawColor = Color.Lerp(mainColor, Color.White, 0.2f) with { A = 0 }; + float drawRotation = Projectile.rotation; + Vector2 rotationPoint = texture.Size() * 0.5f; + //CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], drawColor * 0.5f, 1, texture, true, true); + bool roted = true; + for (int i = 0; i < 5; i++) + { + Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, (roted ? 0 : MathHelper.PiOver2) + Projectile.rotation, rotationPoint, new Vector2(1 - 0.12f * i, 1 + 0.75f * i) * Projectile.scale * 0.2f * Main.rand.NextFloat(0.8f, 1.1f), SpriteEffects.None); + if (roted && i == 4) + { + i = -1; + roted = false; + } + } + return false; + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + int buffType = ModContent.BuffType(); + target.AddBuff(buffType, 60); + + if (Projectile.ai[2] == 0) + { + Projectile.timeLeft = 180; + time = 0; + Projectile.velocity *= 1.2f; + } + } + public override void OnKill(int timeLeft) + { + int points = 4; + float radians = MathHelper.TwoPi / points; + Vector2 spinningPoint = Vector2.Normalize(new Vector2(-1f, -1f).RotatedBy(Projectile.rotation)); + for (int k = 0; k < points; k++) + { + Vector2 velocity = spinningPoint.RotatedBy(radians * k).RotatedBy(-0.45f); + Dust dust = Dust.NewDustPerfect(Projectile.Center + velocity * 2, ModContent.DustType(), velocity * 8); + dust.scale = 3.5f; + dust.color = mainColor; + dust.noGravity = true; + dust.fadeIn = 6f; + } + } + } +} diff --git a/Utilities/MathematicalUtils.cs b/Utilities/MathematicalUtils.cs index 8108deec16..45fba7b694 100644 --- a/Utilities/MathematicalUtils.cs +++ b/Utilities/MathematicalUtils.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography.Xml; +using Microsoft.CodeAnalysis; using Microsoft.Xna.Framework; using ReLogic.Threading; using Terraria; @@ -433,6 +434,17 @@ namespace CalamityMod } return ratio; } + /// + /// Xyk's version of easing in and out
+ /// Returns an eased version of a 0 - 1 lerp value. + ///
+ /// The 0 - 1 lerp input + /// The intensisty of the easing in. + /// /// The intensisty of the easing out. + public static float EaseInOutExp(float lerpValue, float inPower, float outPower) + { + return (lerpValue < 0.5f ? (float)Math.Pow(Utils.GetLerpValue(0, 0.5f, lerpValue, true), inPower) * 0.5f : 0.5f + (1 - (float)Math.Pow(Utils.GetLerpValue(1, 0.5f, lerpValue, true), outPower)) * 0.5f); + } #endregion } From 2604fdd346393556c716cae5dfc38ec8278f4a4e Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 1 Jun 2025 12:54:35 -0700 Subject: [PATCH 02/72] Localization removal --- ...Mods.CalamityMod.Projectiles.Healing.hjson | 1 - .../Mods.CalamityMod.Projectiles.Melee.hjson | 3 - .../Healing/IridescentExcaliburHeal.cs | 56 ------------------- 3 files changed, 60 deletions(-) delete mode 100644 Projectiles/Healing/IridescentExcaliburHeal.cs diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Healing.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Healing.hjson index 211c3eb65d..dfd1dd43af 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Healing.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Healing.hjson @@ -10,7 +10,6 @@ FungalHeal.DisplayName: Heal GladiatorHealOrb.DisplayName: Heal GreenJellyAura.DisplayName: Green Jelly Aura HydrothermicHealOrb.DisplayName: Hydrothermic Rejuvenation -IridescentExcaliburHeal.DisplayName: Iridescent Excalibur Heal ManaPolarizerHealOrb.DisplayName: Mana Polarizer Heal Orb PhantomicHeart.DisplayName: Phantomic Heart PinkJellyAura.DisplayName: Pink Jelly Aura diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson index bdd7180600..53e09e1f92 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Melee.hjson @@ -154,9 +154,6 @@ HolyColliderHolyFire.DisplayName: Holy Collider Fire IceBombFriendly.DisplayName: Ice Bomb IllustriousKnife.DisplayName: Illustrious Knife InsidiousHarpoon.DisplayName: Insidious Harpoon -IridescentExcaliburSlash.DisplayName: Iridescent Excalibur Slash -IridescentExcaliburSlash2.DisplayName: Iridescent Excalibur Slash -IridescentExcaliburSlash3.DisplayName: Iridescent Excalibur Slash JudgementProj.DisplayName: JUDGEMENT LamentationsOfTheChained.DisplayName: Lamentations of the Chained LaserFountain.DisplayName: Laser Fountain diff --git a/Projectiles/Healing/IridescentExcaliburHeal.cs b/Projectiles/Healing/IridescentExcaliburHeal.cs deleted file mode 100644 index c71e6050d7..0000000000 --- a/Projectiles/Healing/IridescentExcaliburHeal.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Healing -{ - public class IridescentExcaliburHeal : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Healing"; - - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - public override void SetDefaults() - { - Projectile.width = 4; - Projectile.height = 4; - Projectile.friendly = true; - Projectile.penetrate = 1; - Projectile.timeLeft = 300; - Projectile.tileCollide = false; - Projectile.extraUpdates = 3; - } - - public override void AI() - { - Projectile.HealingProjectile((int)Projectile.ai[1], (int)Projectile.ai[0], 10f, 15f); - - Color dustColor = Color.White; - switch (Main.rand.Next(3)) - { - default: - case 0: - dustColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); - break; - - case 1: - dustColor = new Color(255 - Main.DiscoR, 255 - Main.DiscoG, 255 - Main.DiscoB); - break; - - case 2: - dustColor = new Color(Math.Abs(128 - Main.DiscoR) * 2 - 1, Math.Abs(128 - Main.DiscoG) * 2 - 1, Math.Abs(128 - Main.DiscoB) * 2 - 1); - break; - } - - int dust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, 278, 0f, 0f, 100); - Main.dust[dust].color = dustColor; - Main.dust[dust].fadeIn = 0.4f + Main.rand.NextFloat() * 0.15f; - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 0f; - Main.dust[dust].position.X -= Projectile.velocity.X * 0.2f; - Main.dust[dust].position.Y += Projectile.velocity.Y * 0.2f; - } - } -} From e2e1c7dbb8ee45e78a908a6cc05ed28e559ca55c Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sun, 1 Jun 2025 17:42:39 -0700 Subject: [PATCH 03/72] Merged LegRev and FTW into just Leg also no more Yharon Dragonfolly summon --- CalPlayer/CalamityPlayerMiscEffects.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeBody.cs | 4 +- NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 4 +- NPCs/AquaticScourge/AquaticScourgeHead.cs | 6 +- NPCs/AquaticScourge/AquaticScourgeTail.cs | 4 +- NPCs/AstrumAureus/AstrumAureus.cs | 2 +- NPCs/AstrumAureus/AureusSpawn.cs | 4 +- NPCs/AstrumDeus/AstrumDeusBody.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHead.cs | 2 +- NPCs/AstrumDeus/AstrumDeusTail.cs | 2 +- .../CalamityBossAIs/AquaticScourgeAI.cs | 6 +- .../CalamityBossAIs/AstrumAureusAI.cs | 16 ++--- .../CalamityBossAIs/AstrumDeusAI.cs | 8 +-- .../CalamityBossAIs/BrimstoneElementalAI.cs | 22 +++---- .../CalamityBossAIs/BumblebirbAI.cs | 24 ++++---- .../CalamityBossAIs/CalamitasCloneAI.cs | 20 +++---- .../CalamityBossAIs/CeaselessVoidAI.cs | 16 ++--- NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs | 28 ++++----- NPCs/CalamityGlobalNPC.cs | 32 +++++----- NPCs/CeaselessVoid/DarkEnergy.cs | 2 +- NPCs/Crabulon/CrabShroom.cs | 10 ++-- NPCs/Crabulon/Crabulon.cs | 12 ++-- NPCs/Cryogen/Cryogen.cs | 20 +++---- NPCs/Cryogen/CryogenShield.cs | 2 +- NPCs/DesertScourge/DesertNuisanceBody.cs | 6 +- NPCs/DesertScourge/DesertNuisanceBodyYoung.cs | 6 +- NPCs/DesertScourge/DesertNuisanceHead.cs | 12 ++-- NPCs/DesertScourge/DesertNuisanceHeadYoung.cs | 12 ++-- NPCs/DesertScourge/DesertNuisanceTail.cs | 6 +- NPCs/DesertScourge/DesertNuisanceTailYoung.cs | 6 +- NPCs/DesertScourge/DesertScourgeBody.cs | 6 +- NPCs/DesertScourge/DesertScourgeHead.cs | 16 ++--- NPCs/DesertScourge/DesertScourgeTail.cs | 6 +- NPCs/DevourerofGods/DevourerofGodsBody.cs | 4 +- NPCs/DevourerofGods/DevourerofGodsHead.cs | 20 +++---- NPCs/DevourerofGods/DevourerofGodsTail.cs | 4 +- NPCs/ExoMechs/Apollo/Apollo.cs | 10 ++-- NPCs/ExoMechs/Ares/AresBody.cs | 4 +- NPCs/ExoMechs/Artemis/Artemis.cs | 8 +-- NPCs/ExoMechs/Thanatos/ThanatosBody1.cs | 2 +- NPCs/ExoMechs/Thanatos/ThanatosBody2.cs | 2 +- NPCs/ExoMechs/Thanatos/ThanatosHead.cs | 4 +- NPCs/ExoMechs/Thanatos/ThanatosTail.cs | 2 +- NPCs/HiveMind/DankCreeper.cs | 4 +- NPCs/HiveMind/DarkHeart.cs | 12 ++-- NPCs/HiveMind/HiveBlob.cs | 8 +-- NPCs/HiveMind/HiveBlob2.cs | 8 +-- NPCs/HiveMind/HiveMind.cs | 6 +- NPCs/HiveMind/HiveTumor.cs | 4 +- NPCs/Leviathan/Anahita.cs | 22 +++---- NPCs/Leviathan/AnahitasIceShield.cs | 2 +- NPCs/Leviathan/AquaticAberration.cs | 2 +- NPCs/Leviathan/Leviathan.cs | 14 ++--- NPCs/Leviathan/LeviathanStart.cs | 3 +- NPCs/NormalNPCs/ArmoredDiggerHead.cs | 2 +- NPCs/NormalNPCs/BloodlettingServant.cs | 4 +- NPCs/NormalNPCs/Foveanator.cs | 18 +++--- NPCs/NormalNPCs/PlanterasFreeTentacle.cs | 4 +- NPCs/NormalNPCs/ShockstormShuttle.cs | 7 ++- NPCs/NormalNPCs/SkeletronPrime2.cs | 2 +- NPCs/OldDuke/SulphurousSharkron.cs | 2 +- NPCs/Other/THELORDE.cs | 4 +- NPCs/Perforator/PerforatorHive.cs | 14 ++--- .../PlaguebringerGoliath.cs | 10 ++-- NPCs/Polterghast/PhantomFuckYou.cs | 8 +-- NPCs/Polterghast/PolterPhantom.cs | 6 +- NPCs/Polterghast/Polterghast.cs | 4 +- NPCs/Polterghast/PolterghastHook.cs | 8 +-- NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 4 +- .../ProfanedGuardianCommander.cs | 18 +++--- .../ProfanedGuardianDefender.cs | 10 ++-- .../ProfanedGuardianHealer.cs | 6 +- NPCs/ProfanedGuardians/ProfanedRocks.cs | 2 +- NPCs/Providence/Providence.cs | 14 ++--- NPCs/Ravager/RavagerBody.cs | 8 +-- NPCs/Signus/Signus.cs | 18 +++--- NPCs/SlimeGod/CorruptSlimeSpawn.cs | 4 +- NPCs/SlimeGod/CorruptSlimeSpawn2.cs | 4 +- NPCs/SlimeGod/CrimsonSlimeSpawn.cs | 4 +- NPCs/SlimeGod/CrimsonSlimeSpawn2.cs | 4 +- NPCs/SlimeGod/CrimulanPaladin.cs | 4 +- NPCs/SlimeGod/EbonianPaladin.cs | 12 ++-- NPCs/SlimeGod/SlimeGodCore.cs | 8 +-- NPCs/SlimeGod/SplitCrimulanPaladin.cs | 2 +- NPCs/SlimeGod/SplitEbonianPaladin.cs | 2 +- NPCs/StormWeaver/StormWeaverBody.cs | 2 +- NPCs/StormWeaver/StormWeaverHead.cs | 10 ++-- NPCs/StormWeaver/StormWeaverTail.cs | 2 +- NPCs/SupremeCalamitas/SoulSeekerSupreme.cs | 2 +- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 24 ++++---- .../Bosses/BrainOfCthulhuAI.cs | 14 ++--- .../VanillaNPCAIOverrides/Bosses/CultistAI.cs | 2 +- .../Bosses/DestroyerAI.cs | 6 +- .../Bosses/DukeFishronAI.cs | 10 ++-- .../Bosses/EaterOfWorldsAI.cs | 6 +- .../Bosses/EmpressofLightAI.cs | 4 +- .../Bosses/EyeOfCthulhuAI.cs | 20 +++---- NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs | 58 +++++++++---------- .../Bosses/KingSlimeAI.cs | 12 ++-- .../Bosses/MoonLordAI.cs | 4 +- .../Bosses/PlanteraAI.cs | 16 ++--- .../Bosses/QueenBeeAI.cs | 4 +- .../Bosses/QueenSlimeAI.cs | 10 ++-- .../Bosses/SkeletronAI.cs | 40 ++++++------- NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 28 ++++----- .../Bosses/WallOfFleshAI.cs | 4 +- .../RegularEnemies/RevengeanceAndDeathAI.cs | 6 +- NPCs/Yharon/Yharon.cs | 18 ++---- Projectiles/Boss/ApolloChargeTelegraph.cs | 4 +- Projectiles/Boss/AresGaussNukeProjectile.cs | 2 +- Projectiles/Boss/ArtemisLaser.cs | 2 +- Projectiles/Boss/AstralFlame.cs | 2 +- Projectiles/Boss/BrimstoneRay.cs | 2 +- Projectiles/Boss/DarkEnergyBall.cs | 2 +- Projectiles/Boss/DarkEnergyBall2.cs | 2 +- Projectiles/Boss/DesertScourgeSpit.cs | 4 +- Projectiles/Boss/DoGBeam.cs | 2 +- Projectiles/Boss/Flarenado.cs | 2 +- Projectiles/Boss/GreatSandBlast.cs | 4 +- Projectiles/Boss/HolyBlast.cs | 2 +- Projectiles/Boss/HolyBurnOrb.cs | 2 +- Projectiles/Boss/HolyFire.cs | 8 +-- Projectiles/Boss/Infernado.cs | 2 +- Projectiles/Boss/MoltenBlast.cs | 2 +- Projectiles/Boss/PhantomMine.cs | 2 +- Projectiles/Boss/ShadeNimbusHostile.cs | 2 +- Projectiles/Boss/THanosSideLaser.cs | 2 +- Projectiles/Boss/ThanatosBeamStart.cs | 4 +- Projectiles/Boss/ThanatosLaser.cs | 4 +- Projectiles/Boss/UnstableCrimulanGlob.cs | 2 +- Projectiles/Boss/UnstableEbonianGlob.cs | 2 +- Projectiles/Boss/YharonBulletHellVortex.cs | 4 +- Projectiles/CalamityGlobalProjectile.cs | 6 +- .../MusicScenes/AquaticScourgeMusicScene.cs | 3 +- UI/VanillaBossBars/CeaselessVoidBossBar.cs | 2 +- 135 files changed, 532 insertions(+), 535 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 2842bd89a1..220cd880d1 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3094,7 +3094,7 @@ namespace CalamityMod.CalPlayer abyssDeath = false; // Signus headcrab darkness - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { if (CalamityGlobalNPC.signus != -1) { diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index b0db3298e4..8d487de579 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -36,7 +36,7 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.knockBackResist = 0f; NPC.alpha = 255; NPC.LifeMaxNERB(80000, 96000, 1000000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.behindTiles = true; NPC.noGravity = true; @@ -56,7 +56,7 @@ namespace CalamityMod.NPCs.AquaticScourge else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.25f; NPC.Calamity().VulnerableToHeat = false; diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index ae65703e57..cfd2418d09 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.knockBackResist = 0f; NPC.alpha = 255; NPC.LifeMaxNERB(80000, 96000, 1000000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.behindTiles = true; NPC.noGravity = true; @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.AquaticScourge else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.25f; NPC.Calamity().VulnerableToHeat = false; diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 4acad4c1dc..52aa1757aa 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -63,7 +63,7 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.aiStyle = -1; AIType = -1; NPC.LifeMaxNERB(80000, 96000, 1000000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.knockBackResist = 0f; NPC.value = Item.buyPrice(0, 16, 0, 0); @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.AquaticScourge else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.25f; NPC.Calamity().VulnerableToHeat = false; @@ -205,7 +205,7 @@ namespace CalamityMod.NPCs.AquaticScourge if (spawnInfo.Player.Calamity().ZoneSulphur && spawnInfo.Water) { if (!NPC.AnyNPCs(ModContent.NPCType())) - return (Main.getGoodWorld ? 0.05f : 0.01f); + return (CalamityWorld.LegendaryMode ? 0.05f : 0.01f); } return 0f; diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 989e090678..80b4b07db9 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.knockBackResist = 0f; NPC.alpha = 255; NPC.LifeMaxNERB(80000, 96000, 1000000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.behindTiles = true; NPC.noGravity = true; @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.AquaticScourge else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.25f; NPC.Calamity().VulnerableToHeat = false; diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index ceada7f56a..5a3d7403f4 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -109,7 +109,7 @@ namespace CalamityMod.NPCs.AstrumAureus NPC.Calamity().VulnerableToSickness = false; SpawnModBiomes = new int[1] { ModContent.GetInstance().Type }; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.8f; if (Main.zenithWorld) NPC.scale *= 1.5f; diff --git a/NPCs/AstrumAureus/AureusSpawn.cs b/NPCs/AstrumAureus/AureusSpawn.cs index 3daa83d2c7..71749015aa 100644 --- a/NPCs/AstrumAureus/AureusSpawn.cs +++ b/NPCs/AstrumAureus/AureusSpawn.cs @@ -308,11 +308,11 @@ namespace CalamityMod.NPCs.AstrumAureus { if (Main.netMode != NetmodeID.MultiplayerClient) { - int totalProjectiles = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 36 : (3 + (int)((NPC.scale - 1f) * 3)); + int totalProjectiles = CalamityWorld.LegendaryMode ? 36 : (3 + (int)((NPC.scale - 1f) * 3)); double radians = MathHelper.TwoPi / totalProjectiles; int type = ModContent.ProjectileType(); int damage2 = NPC.GetProjectileDamage(type); - float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10f : 6f; + float velocity = CalamityWorld.LegendaryMode ? 10f : 6f; double angleA = radians * 0.5; double angleB = MathHelper.ToRadians(90f) - angleA; float velocityX = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB)); diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index ecfa2a3a11..b5f1a10738 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.AstrumDeus // Need segment amount to get a smooth transition down the worm based on length int segmentAmt = Main.zenithWorld ? (CalamityWorld.death ? 8 : CalamityWorld.revenge ? 7 : Main.expertMode ? 6 : 5) : (CalamityWorld.death ? 40 : CalamityWorld.revenge ? 35 : Main.expertMode ? 30 : 25); - float cyanThreshold = Main.getGoodWorld ? 300f : 600f; + float cyanThreshold = CalamityWorld.LegendaryMode ? 300f : 600f; float transitionStart = MathHelper.Lerp(cyanThreshold * 0.75f, cyanThreshold * 0.95f, 1f - (NPC.ai[3] / (float)segmentAmt)); float transitionEnd = MathHelper.Lerp(cyanThreshold * 0.8f, cyanThreshold, 1f - (NPC.ai[3] / (float)segmentAmt)); bool drawCyan = NPC.Calamity().newAI[3] >= transitionEnd && NPC.Calamity().newAI[3] <= cyanThreshold + transitionEnd; diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index eb5c436317..b004cccb4b 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -172,7 +172,7 @@ namespace CalamityMod.NPCs.AstrumDeus bool deathModeEnragePhase = NPC.Calamity().newAI[0] == 3f; bool doubleWormPhase = NPC.Calamity().newAI[0] != 0f && !deathModeEnragePhase; - float cyanThreshold = Main.getGoodWorld ? 300f : 600f; + float cyanThreshold = CalamityWorld.LegendaryMode ? 300f : 600f; // Head is always the last segment to visually transition float transitionStart = cyanThreshold * 0.95f; bool drawCyan = NPC.Calamity().newAI[3] >= cyanThreshold; diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 127a782e6c..f703c894ef 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.AstrumDeus bool deathModeEnragePhase = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] == 3f; bool doubleWormPhase = NPC.Calamity().newAI[0] != 0f && !deathModeEnragePhase; - float cyanThreshold = Main.getGoodWorld ? 300f : 600f; + float cyanThreshold = CalamityWorld.LegendaryMode ? 300f : 600f; // Tail is always the first segment to visually transition float transitionStart = cyanThreshold * 0.75f; float transitionEnd = cyanThreshold * 0.8f; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs index a8f6e79f8c..b8aa9c21a1 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (npc.justHit || npc.life <= npc.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (npc.justHit || npc.life <= npc.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -399,7 +399,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs } Vector2 scourgePosition = npc.Center; - Vector2 predictionVector = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.player[npc.target].velocity * 20f : Vector2.Zero; + Vector2 predictionVector = CalamityWorld.LegendaryMode ? Main.player[npc.target].velocity * 20f : Vector2.Zero; float scourgeTargetX = player.Center.X + predictionVector.X; float scourgeTargetY = player.Center.Y + predictionVector.Y; @@ -432,7 +432,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs scourgeAcceleration *= accelerationMultiplier; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { scourgeMaxSpeed *= 1.15f; scourgeAcceleration *= 1.15f; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs index e7e3f546bb..946ed01765 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs @@ -90,7 +90,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (expertMode) astralFlameBarrageTimerIncrement += death ? (float)Math.Round(3f * (1f - lifeRatio)) : (float)Math.Round(2f * (1f - lifeRatio)); - float walkingVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 6f : 5f; + float walkingVelocity = CalamityWorld.LegendaryMode ? 6f : 5f; walkingVelocity += 3f * enrageScale; if (phase5) walkingVelocity += 2f; @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs walkingVelocity += 1.5f * (1f - lifeRatio); if (revenge) walkingVelocity += Math.Abs(npc.Center.X - player.Center.X) * 0.0025f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) walkingVelocity *= 1.15f; float walkingProjectileVelocity = walkingVelocity * 0.8f; @@ -531,11 +531,11 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs calamityGlobalNPC.newAI[1] = speedMultLimit; } - float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 27f : 20f; + float velocity = CalamityWorld.LegendaryMode ? 27f : 20f; velocity += 6f * enrageScale; if (expertMode) velocity += death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.15f; npc.velocity = (new Vector2(player.Center.X, player.Center.Y - 500f) - npc.Center).SafeNormalize(Vector2.Zero) * velocity; @@ -661,7 +661,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (Main.netMode != NetmodeID.MultiplayerClient) { - float laserVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 7f : death ? 6f : 5f; + float laserVelocity = CalamityWorld.LegendaryMode ? 7f : death ? 6f : 5f; int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 17 : death ? 15 : 13); int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20); @@ -714,7 +714,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs fallSpeed += 0.36f * enrageScale; if (expertMode) fallSpeed += death ? 0.36f * (1f - lifeRatio) : 0.24f * (1f - lifeRatio); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) fallSpeed += 0.5f; if (calamityGlobalNPC.newAI[1] > 0f) @@ -741,7 +741,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs velocityXCap += 3.6f * enrageScale; if (expertMode) velocityXCap += death ? 3.6f * (1f - lifeRatio) : 2.4f * (1f - lifeRatio); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) velocityXCap += 5f; if (calamityGlobalNPC.newAI[0] > 0f) @@ -954,7 +954,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (calamityGlobalNPC.newAI[1] > 0f && !reduceFallSpeed) maxFallSpeed *= calamityGlobalNPC.newAI[1] + 1f; - if (Main.getGoodWorld && !reduceFallSpeed) + if (CalamityWorld.LegendaryMode && !reduceFallSpeed) { gravity *= 1.15f; maxFallSpeed *= 1.15f; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs index c7bc0300cc..a4419a123b 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs @@ -97,7 +97,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) @@ -118,7 +118,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Become gradually more pissed as more worms are killed int gfbMaxWormCount = 10; int gfbWormCount = 0; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) gfbWormCount = NPC.CountNPCS(ModContent.NPCType()); if (gfbWormCount > gfbMaxWormCount) gfbWormCount = gfbMaxWormCount; @@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs int startIndexHeadTwo = startIndexHeadOne + phase2Length + 1; int headTwoID = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, npc.type, startIndexHeadTwo); Main.npc[headTwoID].Calamity().newAI[0] = 2f; - Main.npc[headTwoID].Calamity().newAI[3] = Main.getGoodWorld ? 300f : 600f; + Main.npc[headTwoID].Calamity().newAI[3] = CalamityWorld.LegendaryMode ? 300f : 600f; Main.npc[headTwoID].velocity = Vector2.Normalize(player.Center - Main.npc[headTwoID].Center) * 16f; Main.npc[headTwoID].timeLeft *= 20; Main.npc[headTwoID].ForceNetUpdate(); @@ -524,7 +524,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs speed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; turnSpeed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { speed *= 1.15f; turnSpeed *= 1.15f; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs index 2134f154b2..b0a00922b7 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs @@ -366,7 +366,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.chaseable = true; npc.ai[3] += 1f; npc.alpha = 0; - if (npc.ai[3] >= 2f || phase2 || Main.getGoodWorld) + if (npc.ai[3] >= 2f || phase2 || CalamityWorld.LegendaryMode) { npc.ai[0] = -1f; npc.ai[1] = 0f; @@ -419,7 +419,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs { int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 5f, projectileVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); Main.projectile[proj].timeLeft = 240; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Main.projectile[proj].extraUpdates += 1; } @@ -440,7 +440,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; int numProj = death ? 8 : 4; int spread = death ? 90 : 45; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { numProj *= 3; spread *= 2; @@ -454,7 +454,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs { Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); int proj2 = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Main.projectile[proj2].extraUpdates += 1; } } @@ -482,7 +482,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.chaseable = false; npc.localAI[0] += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.localAI[0] += 2f; if (expertMode) npc.localAI[0] += 1f - lifeRatio; @@ -520,7 +520,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); Main.projectile[proj].timeLeft = 300; Main.projectile[proj].tileCollide = false; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Main.projectile[proj].extraUpdates += 1; } } @@ -550,7 +550,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs { Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k); int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Main.projectile[proj].extraUpdates += 1; } @@ -561,7 +561,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs { Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k); int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255 * 0.75f, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Main.projectile[proj].extraUpdates += 1; } } @@ -653,7 +653,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs int damage = npc.GetProjectileDamage(type); Projectile.NewProjectile(npc.GetSource_FromAI(), source, laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(npc.GetSource_FromAI(), source, -laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); if (Main.zenithWorld) @@ -694,7 +694,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(npc.GetSource_FromAI(), source, laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(npc.GetSource_FromAI(), source, -laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI); if (Main.zenithWorld) @@ -716,7 +716,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(npc.GetSource_FromAI(), source.X, source.Y, npc.localAI[0], npc.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(npc.GetSource_FromAI(), source.X, source.Y, -npc.localAI[0], -npc.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.whoAmI); if (Main.zenithWorld) diff --git a/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs index 15d826ab41..ea6e34d8d2 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs @@ -88,7 +88,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (npc.localAI[2] > 0f || bossRush) enrageScale += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) enrageScale += 0.5f; if (enrageScale > 3f) @@ -252,7 +252,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs } // Max spawn amount - int maxBirbs = (CalamityWorld.LegendaryMode && revenge) ? 12 : revenge ? 3 : 2; + int maxBirbs = CalamityWorld.LegendaryMode ? 12 : revenge ? 3 : 2; // Variable for charging float chargeDistance = 600f; @@ -382,7 +382,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs bool spawnRight = player.velocity.X > 0f; for (int i = 0; i < totalProjectiles; i++) { - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) { @@ -449,13 +449,13 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs { int totalProjectiles = phase2 ? 40 : 48; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) totalProjectiles *= 2; float radians = MathHelper.TwoPi / totalProjectiles; int distance = phase2 ? 1200 : 1320; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) distance *= 2; bool spawnRight = player.velocity.X > 0f; @@ -564,7 +564,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs float velocity = 8f + (enrageScale - 1f) * 2f; float follyQuickFlySpeed = velocity + npc.ai[2] + follyQuickFlyTargetDirection.Length() / 120f; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) follyQuickFlySpeed *= 2f; float follyQuickFlyVelMult = 20f; @@ -573,7 +573,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.velocity = (npc.velocity * (follyQuickFlyVelMult - 1f) + follyQuickFlyTargetDirection) / follyQuickFlyVelMult; npc.ai[1] += 1f; - if (npc.ai[1] >= ((CalamityWorld.LegendaryMode && revenge) ? 90f : 180f)) + if (npc.ai[1] >= ((CalamityWorld.LegendaryMode) ? 90f : 180f)) { npc.TargetClosest(); npc.ai[0] = 0f; @@ -771,7 +771,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (Main.netMode != NetmodeID.MultiplayerClient) { - bool gfbSpawnFlag = CalamityWorld.LegendaryMode && revenge && (npc.ai[1] == 145f || npc.ai[1] == 150f || npc.ai[1] == 160f || npc.ai[1] == 165f); + bool gfbSpawnFlag = CalamityWorld.LegendaryMode && (npc.ai[1] == 145f || npc.ai[1] == 150f || npc.ai[1] == 160f || npc.ai[1] == 165f); bool spawnFlag = NPC.CountNPCS(ModContent.NPCType()) < maxBirbs && (npc.ai[1] == 140f || (revenge && npc.ai[1] == 155f) || npc.ai[1] == 170f || gfbSpawnFlag); if (spawnFlag) { @@ -933,7 +933,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs swarmerIdleTargetDist.Normalize(); swarmerIdleTargetDist *= swarmerIdleSpeed; npc.velocity = (npc.velocity * 29f + swarmerIdleTargetDist) / 30f; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) npc.velocity *= 1.15f; } else if (npc.velocity.Length() > 2f) @@ -981,7 +981,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs swarmerChargeTargetDist.Normalize(); swarmerChargeTargetDist *= swarmerChargeSpeed; npc.velocity = (npc.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) npc.velocity *= 1.15f; npc.ForceNetUpdate(); @@ -1009,7 +1009,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs swarmerDecelerateTargetDist.Normalize(); swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; npc.velocity = (npc.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) npc.velocity *= 1.15f; if (npc.velocity.X < 0f) @@ -1026,7 +1026,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.damage = npc.defDamage; npc.velocity = swarmerDecelerateTargetDist; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) npc.velocity *= 1.15f; if (npc.velocity.X < 0f) diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs index 7dfb5557da..39f773db3a 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs @@ -93,7 +93,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs SoundEngine.PlaySound(SoundID.Item109, npc.Center); calamityGlobalNPC.newAI[2] = 2f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) calamityGlobalNPC.newAI[3] = 0f; SpawnDust(); @@ -117,7 +117,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs SoundEngine.PlaySound(SoundID.Item109, npc.Center); calamityGlobalNPC.newAI[2] = 1f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) calamityGlobalNPC.newAI[3] = 0f; SpawnDust(); @@ -287,7 +287,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs baseVelocity += 1.5f * (1f - lifeRatio); baseAcceleration += 0.03f * (1f - lifeRatio); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { baseVelocity *= 1.15f; baseAcceleration *= 1.15f; @@ -355,7 +355,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (Main.zenithWorld) type = ModContent.ProjectileType(); - float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; + float gigaBlastFrequency = (CalamityWorld.LegendaryMode ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; float projSpeed = bossRush ? 6.25f : 5f; if (calamityGlobalNPC.newAI[3] <= 300f) { @@ -492,7 +492,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs return; } - else if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + else if (CalamityWorld.LegendaryMode) { if (calamityGlobalNPC.newAI[3] < 900f) calamityGlobalNPC.newAI[3] += 1f; @@ -580,7 +580,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs projectileVelocity += 3f * enrageScale; int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); - bool shootPredictiveShot = CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(); + bool shootPredictiveShot = CalamityWorld.LegendaryMode && Main.rand.NextBool(); Vector2 predictionVector = shootPredictiveShot ? player.velocity * 20f : Vector2.Zero; Vector2 fireballVelocity = Vector2.Normalize(player.Center + predictionVector - npc.Center) * projectileVelocity; Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f; @@ -862,7 +862,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs calCloneBroProjAttackMaxSpeed += 2f * enrageScale; calCloneBroProjAttackAccel += 0.06f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { calCloneBroProjAttackMaxSpeed *= 1.15f; calCloneBroProjAttackAccel *= 1.15f; @@ -989,7 +989,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs calCloneBroChargeSpeed += 2f; if (revenge) calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) calCloneBroChargeSpeed *= 1.25f; Vector2 calCloneBroChargeCenter = npc.Center; @@ -1196,7 +1196,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs calCloneBroProjAttackMaxSpeed += 2f * enrageScale; calCloneBroProjAttackAccel += 0.1f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { calCloneBroProjAttackMaxSpeed *= 1.15f; calCloneBroProjAttackAccel *= 1.15f; @@ -1320,7 +1320,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs calCloneBroChargeSpeed += 2f; if (revenge) calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) calCloneBroChargeSpeed *= 1.25f; Vector2 calCloneBroChargeCenter = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs index 7fc43d201c..211de577a9 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs @@ -62,7 +62,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs if (phase4) darkEnergyAmt += 1; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) darkEnergyAmt *= 2; // Spawn a few Dark Energies as soon as the fight starts @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs else if (npc.timeLeft < 1800) npc.timeLeft = 1800; - float tileEnrageMult = (CalamityWorld.LegendaryMode && revenge) ? 1.5f : bossRush ? 1.375f : 1f; + float tileEnrageMult = (CalamityWorld.LegendaryMode) ? 1.5f : bossRush ? 1.375f : 1f; npc.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !bossRush; // Set AI variable to be used by Dark Energies @@ -131,14 +131,14 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f)); // Decides whether Ceaseless moves closer to its target or not - float distanceRequiredToMove = (Main.getGoodWorld || !anyDarkEnergies) ? 320f : bossRush ? 600f : death ? 520f : revenge ? 480f : expertMode ? 440f : 400f; + float distanceRequiredToMove = (CalamityWorld.LegendaryMode || !anyDarkEnergies) ? 320f : bossRush ? 600f : death ? 520f : revenge ? 480f : expertMode ? 440f : 400f; bool move = Vector2.Distance(npc.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1); // Succ attack if (!anyDarkEnergies) { // This is here because it's used in multiple places - float suckDistance = (CalamityWorld.LegendaryMode && revenge) ? 2400f : bossRush ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f; + float suckDistance = (CalamityWorld.LegendaryMode) ? 2400f : bossRush ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f; // Move closer to the target before trying to succ if (movingDuringSuccPhase) @@ -474,7 +474,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs acceleration *= 2f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -484,8 +484,8 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs // Move between 8 different positions around the player, in order float maxDistance = 320f; - Vector2 moveToOffset = succ ? Vector2.Zero : Main.getGoodWorld ? new Vector2(0f, -maxDistance) : Vector2.Zero; - if (!succ && Main.getGoodWorld) + Vector2 moveToOffset = succ ? Vector2.Zero : CalamityWorld.LegendaryMode ? new Vector2(0f, -maxDistance) : Vector2.Zero; + if (!succ && CalamityWorld.LegendaryMode) { // Move to a new location every few seconds calamityGlobalNPC.newAI[2] += 1f; @@ -537,7 +537,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Vector2 distanceFromDestination = destination - npc.Center; // Movement - if (npc.Distance(destination) > maxDistance || succ || !Main.getGoodWorld) + if (npc.Distance(destination) > maxDistance || succ || !CalamityWorld.LegendaryMode) CalamityUtils.SmoothMovement(npc, 0f, distanceFromDestination, velocity, acceleration, true); } diff --git a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs index 281d6b94ab..6cda24b637 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs bool death = CalamityWorld.death || bossRush; float exhaustionGateValue = 360f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) exhaustionGateValue *= 0.5f; float numberOfAttacksBeforeExhaustion = 12f; @@ -147,7 +147,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs } // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) chargeVelocity *= 1.25f; if (exhausted) @@ -305,7 +305,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs } // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) chargeTime *= 2; // Set variables for spawn effects @@ -609,7 +609,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.damage = setDamage; // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge && npc.ai[2] % 10f == 0f) + if (CalamityWorld.LegendaryMode && npc.ai[2] % 10f == 0f) { // Rotation and direction int dir = Math.Sign(player.Center.X - npc.Center.X); @@ -781,7 +781,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 900f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 900f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 1800f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 1800f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); @@ -828,7 +828,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); @@ -984,7 +984,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.damage = setDamage; // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge && npc.ai[2] % 8f == 0f) + if (CalamityWorld.LegendaryMode && npc.ai[2] % 8f == 0f) { // Rotation and direction int dir = Math.Sign(player.Center.X - npc.Center.X); @@ -1141,13 +1141,13 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Vector2 phase2GoreDirection = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + npc.Center; int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; + int totalGore = CalamityWorld.LegendaryMode ? 40 : 20; for (int i = 0; i < totalGore; i++) { float velocityX = npc.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= Main.rand.NextFloat() + 0.5f; velocityY *= Main.rand.NextFloat() + 0.5f; @@ -1211,7 +1211,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, sharkronVelocity, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, sharkronVelocity, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); @@ -1379,7 +1379,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs npc.damage = setDamage; // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge && npc.ai[2] % 6f == 0f) + if (CalamityWorld.LegendaryMode && npc.ai[2] % 6f == 0f) { // Rotation and direction int dir = Math.Sign(player.Center.X - npc.Center.X); @@ -1517,13 +1517,13 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs Vector2 phase3GoreDirection = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + npc.Center; int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; + int totalGore = CalamityWorld.LegendaryMode ? 40 : 20; for (int i = 0; i < totalGore; i++) { float velocityX = npc.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= Main.rand.NextFloat() + 0.5f; velocityY *= Main.rand.NextFloat() + 0.5f; @@ -1546,7 +1546,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index de28c11370..f760d3aff0 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1979,11 +1979,11 @@ namespace CalamityMod.NPCs else if (npc.type == NPCID.KingSlime) { if (CalamityWorld.death) - npc.scale = Main.getGoodWorld ? 6f : 2.5f; + npc.scale = CalamityWorld.LegendaryMode ? 6f : 2.5f; else - npc.scale = Main.getGoodWorld ? 3f : 1.5f; + npc.scale = CalamityWorld.LegendaryMode ? 3f : 1.5f; - npc.lifeMax = (int)Math.Round(npc.lifeMax * (Main.getGoodWorld ? 1.8 : 1.5)); + npc.lifeMax = (int)Math.Round(npc.lifeMax * (CalamityWorld.LegendaryMode ? 1.8 : 1.5)); } else if ((npc.type == NPCID.Wraith || npc.type == NPCID.Mimic || npc.type == NPCID.Reaper || npc.type == NPCID.PresentMimic || npc.type == NPCID.SandElemental || npc.type == NPCID.Ghost) && CalamityWorld.LegendaryMode) { @@ -4124,14 +4124,14 @@ namespace CalamityMod.NPCs { npc.TargetClosest(); - float velocity = Main.getGoodWorld ? 12f : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 10.5f : 9f; + float velocity = CalamityWorld.LegendaryMode ? 12f : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 10.5f : 9f; if (npc.ai[1] == 70f) velocity *= 0.4f; npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; } - if (Main.getGoodWorld && !npc.dontTakeDamage) + if (CalamityWorld.LegendaryMode && !npc.dontTakeDamage) { if ((double)(npc.Center.Y / 16f) < Main.worldSurface) npc.dontTakeDamage = true; @@ -6779,7 +6779,7 @@ namespace CalamityMod.NPCs { if (Main.netMode != NetmodeID.MultiplayerClient) { - int slimeAmt = Main.getGoodWorld ? Main.rand.Next(6) + 10 : Main.rand.Next(2) + 2; // 2 to 3 extra + int slimeAmt = CalamityWorld.LegendaryMode ? Main.rand.Next(6) + 10 : Main.rand.Next(2) + 2; // 2 to 3 extra for (int s = 0; s < slimeAmt; s++) { int slime = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)(npc.position.Y + npc.height), NPCID.BlueSlime, 0, 0f, 0f, 0f, 0f, 255); @@ -6787,8 +6787,8 @@ namespace CalamityMod.NPCs npc2.SetDefaults(NPCID.BabySlime); npc2.velocity.X = npc.velocity.X * 2f; npc2.velocity.Y = npc.velocity.Y; - npc2.velocity.X += Main.rand.Next(-20, 20) * (Main.getGoodWorld ? 0.5f : 0.1f) + s * npc.direction * (Main.getGoodWorld ? 0.5f : 0.3f); - npc2.velocity.Y -= Main.rand.Next(0, 10) * (Main.getGoodWorld ? 0.5f : 0.1f) + s; + npc2.velocity.X += Main.rand.Next(-20, 20) * (CalamityWorld.LegendaryMode ? 0.5f : 0.1f) + s * npc.direction * (CalamityWorld.LegendaryMode ? 0.5f : 0.3f); + npc2.velocity.Y -= Main.rand.Next(0, 10) * (CalamityWorld.LegendaryMode ? 0.5f : 0.1f) + s; npc2.ai[0] = -1000 * Main.rand.Next(3); if (Main.dedServ && slime < Main.maxNPCs) @@ -6801,7 +6801,7 @@ namespace CalamityMod.NPCs case NPCID.CursedHammer: case NPCID.EnchantedSword: case NPCID.CrimsonAxe: - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.justHit = false; break; @@ -6812,13 +6812,13 @@ namespace CalamityMod.NPCs case NPCID.IceTortoise: case NPCID.BlackRecluse: case NPCID.BlackRecluseWall: - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.justHit = false; break; case NPCID.Paladin: - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.justHit = false; break; @@ -6826,7 +6826,7 @@ namespace CalamityMod.NPCs if (npc.type == NPCType()) { - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.justHit = false; } } @@ -7660,7 +7660,7 @@ namespace CalamityMod.NPCs if (npc.IsABestiaryIconDummy) return null; - if (Main.LocalPlayer.Calamity().trippy || (npc.type == NPCID.KingSlime && CalamityWorld.LegendaryMode && CalamityWorld.revenge)) + if (Main.LocalPlayer.Calamity().trippy || (npc.type == NPCID.KingSlime && CalamityWorld.LegendaryMode)) return new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB, Main.DiscoR); if (npc.type == NPCID.KingSlime && CalamityWorld.death) @@ -8352,7 +8352,7 @@ namespace CalamityMod.NPCs { Color currentColor = npc.GetAlpha(drawColor); float opacityScale = 1f - MathHelper.Lerp(0.34f, 1f, npc.life / (float)secondAfterimageSetHealthValue); - float opacity = Main.getGoodWorld ? 0.7f : opacityScale; + float opacity = CalamityWorld.LegendaryMode ? 0.7f : opacityScale; opacity = MathHelper.Clamp(opacity, 0f, 1f); currentColor.R = (byte)((float)(int)currentColor.R * opacity); @@ -8455,7 +8455,7 @@ namespace CalamityMod.NPCs Color currentColor = npc.GetAlpha(drawColor); float opacity = (1f - Main.npc[NPC.crimsonBoss].life / (float)Main.npc[NPC.crimsonBoss].lifeMax) * 2f; opacity *= opacity; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) opacity = 1f; opacity = MathHelper.Clamp(opacity, 0f, 1f); @@ -8492,7 +8492,7 @@ namespace CalamityMod.NPCs { currentColor = npc.GetAlpha(drawColor); float opacityScale = 1f - Main.npc[NPC.crimsonBoss].life / (float)secondAfterimageSetHealthValue; - opacity = Main.getGoodWorld ? 1f : opacityScale; + opacity = CalamityWorld.LegendaryMode ? 1f : opacityScale; opacity = MathHelper.Clamp(opacity, 0f, 1f); currentColor.R = (byte)((float)(int)currentColor.R * opacity); diff --git a/NPCs/CeaselessVoid/DarkEnergy.cs b/NPCs/CeaselessVoid/DarkEnergy.cs index 52f34259d9..ed609587c8 100644 --- a/NPCs/CeaselessVoid/DarkEnergy.cs +++ b/NPCs/CeaselessVoid/DarkEnergy.cs @@ -123,7 +123,7 @@ namespace CalamityMod.NPCs.CeaselessVoid if (NPC.Opacity > 1f) NPC.Opacity = 1f; - NPC.scale = MathHelper.Lerp(0.05f, Main.getGoodWorld ? 0.5f : 1f, NPC.Opacity); + NPC.scale = MathHelper.Lerp(0.05f, CalamityWorld.LegendaryMode ? 0.5f : 1f, NPC.Opacity); } else { diff --git a/NPCs/Crabulon/CrabShroom.cs b/NPCs/Crabulon/CrabShroom.cs index 2c3e928208..d31e1f70bc 100644 --- a/NPCs/Crabulon/CrabShroom.cs +++ b/NPCs/Crabulon/CrabShroom.cs @@ -31,13 +31,13 @@ namespace CalamityMod.NPCs.Crabulon NPC.GetNPCDamage(); NPC.width = 14; NPC.height = 14; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.scale = 2f; - NPC.lifeMax = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 180 : 15; + NPC.lifeMax = CalamityWorld.LegendaryMode ? 180 : 15; if (BossRushEvent.BossRushActive) NPC.lifeMax = 8000; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; AIType = -1; NPC.knockBackResist = 0.5f; @@ -71,7 +71,7 @@ namespace CalamityMod.NPCs.Crabulon bool death = CalamityWorld.death || BossRushEvent.BossRushActive; float xVelocityLimit = BossRushEvent.BossRushActive ? 12f : death ? 8f : revenge ? 6f : 5f; - float yVelocityLimit = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.25f : death ? 0.75f : revenge ? 0.9f : 1f; + float yVelocityLimit = CalamityWorld.LegendaryMode ? 0.25f : death ? 0.75f : revenge ? 0.9f : 1f; // Get a target if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.rotation = NPC.velocity.X * 0.1f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { float pushVelocity = 0.5f; foreach (NPC n in Main.ActiveNPCs) diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index fedab5f87a..d7b8c63f86 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.Crabulon NPC.Calamity().VulnerableToCold = true; NPC.Calamity().VulnerableToSickness = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.scale *= 1.5f; NPC.defense += 12; @@ -208,7 +208,7 @@ namespace CalamityMod.NPCs.Crabulon enrageScale += 1f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) enrageScale += 0.5f; if (NPC.ai[0] < 2f) @@ -285,7 +285,7 @@ namespace CalamityMod.NPCs.Crabulon walkingVelocity += 0.75f; if (phase4) walkingVelocity += 1f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) walkingVelocity *= 2f; bool shouldWalkSlower = false; @@ -982,7 +982,7 @@ namespace CalamityMod.NPCs.Crabulon { if (Main.netMode != NetmodeID.MultiplayerClient) { - int crabShroomSpawnFreq = (int)(NPC.lifeMax * ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.01 : Main.getGoodWorld ? 0.02 : 0.05)); + int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.01 : CalamityWorld.LegendaryMode ? 0.02 : 0.05)); if ((NPC.life + crabShroomSpawnFreq) < NPC.localAI[0]) { NPC.localAI[0] = NPC.life; @@ -994,8 +994,8 @@ namespace CalamityMod.NPCs.Crabulon int npcType = ModContent.NPCType(); int crabShroom = NPC.NewNPC(NPC.GetSource_FromAI(), x, y, npcType); Main.npc[crabShroom].SetDefaults(npcType); - Main.npc[crabShroom].velocity.X = Main.rand.Next(-50, 51) * (Main.getGoodWorld ? 0.2f : 0.1f); - Main.npc[crabShroom].velocity.Y = Main.rand.Next(-50, -31) * (Main.getGoodWorld ? 0.2f : 0.1f); + Main.npc[crabShroom].velocity.X = Main.rand.Next(-50, 51) * (CalamityWorld.LegendaryMode ? 0.2f : 0.1f); + Main.npc[crabShroom].velocity.Y = Main.rand.Next(-50, -31) * (CalamityWorld.LegendaryMode ? 0.2f : 0.1f); if (Main.dedServ && crabShroom < Main.maxNPCs) NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, crabShroom); } diff --git a/NPCs/Cryogen/Cryogen.cs b/NPCs/Cryogen/Cryogen.cs index 0f477936d4..5e29bf0c3a 100644 --- a/NPCs/Cryogen/Cryogen.cs +++ b/NPCs/Cryogen/Cryogen.cs @@ -111,7 +111,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.HitSound = HitSound; NPC.DeathSound = DeathSound; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.8f; if (Main.zenithWorld) @@ -294,7 +294,7 @@ namespace CalamityMod.NPCs.Cryogen else if (NPC.timeLeft < 1800) NPC.timeLeft = 1800; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { int spawnType = Main.zenithWorld ? NPCID.RedDevil : NPCID.IceGolem; if (!NPC.AnyNPCs(spawnType)) @@ -322,13 +322,13 @@ namespace CalamityMod.NPCs.Cryogen float chargePhaseGateValue = bossRush ? 240f : 360f; float chargeDuration = 60f; - float chargeTelegraphTime = NPC.ai[0] == 2f ? ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 60f : 80f) : ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 90f : 120f); + float chargeTelegraphTime = NPC.ai[0] == 2f ? (CalamityWorld.LegendaryMode ? 60f : 80f) : (CalamityWorld.LegendaryMode ? 90f : 120f); float chargeTelegraphMaxRotationIncrement = 1f; float chargeTelegraphRotationIncrement = chargeTelegraphMaxRotationIncrement / chargeTelegraphTime; float chargeSlowDownTime = 15f; - float chargeVelocityMin = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 24f : 12f; - float chargeVelocityMax = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 42f : 30f; - if (Main.getGoodWorld) + float chargeVelocityMin = CalamityWorld.LegendaryMode ? 24f : 12f; + float chargeVelocityMax = CalamityWorld.LegendaryMode ? 42f : 30f; + if (CalamityWorld.LegendaryMode) { chargePhaseGateValue *= 0.7f; chargeDuration *= 0.8f; @@ -414,7 +414,7 @@ namespace CalamityMod.NPCs.Cryogen playerYDist *= playerDistance; float inertia = 50f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.5f; NPC.velocity.X = (NPC.velocity.X * inertia + playerXDist) / (inertia + 1f); @@ -688,7 +688,7 @@ namespace CalamityMod.NPCs.Cryogen playerYDist *= playerDistance; float inertia = 50f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.5f; NPC.velocity.X = (NPC.velocity.X * inertia + playerXDist) / (inertia + 1f); @@ -851,7 +851,7 @@ namespace CalamityMod.NPCs.Cryogen playerYDist *= playerDistance; float inertia = 50f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.5f; NPC.velocity.X = (NPC.velocity.X * inertia + playerXDist) / (inertia + 1f); @@ -1130,7 +1130,7 @@ namespace CalamityMod.NPCs.Cryogen } float inertia = 30f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.5f; NPC.velocity.X = (NPC.velocity.X * inertia + playerchargeXDist) / (inertia + 1f); diff --git a/NPCs/Cryogen/CryogenShield.cs b/NPCs/Cryogen/CryogenShield.cs index bb4ee5cc49..47ec58b979 100644 --- a/NPCs/Cryogen/CryogenShield.cs +++ b/NPCs/Cryogen/CryogenShield.cs @@ -31,7 +31,7 @@ namespace CalamityMod.NPCs.Cryogen NPC.GetNPCDamage(); NPC.width = 216; NPC.height = 216; - NPC.scale *= (CalamityWorld.death || BossRushEvent.BossRushActive || Main.getGoodWorld) ? 0.8f : 1f; + NPC.scale *= (CalamityWorld.death || BossRushEvent.BossRushActive || CalamityWorld.LegendaryMode) ? 0.8f : 1f; NPC.DR_NERD(0.4f); NPC.LifeMaxNERB(2800, 3360, 33600); NPC.Opacity = 0f; diff --git a/NPCs/DesertScourge/DesertNuisanceBody.cs b/NPCs/DesertScourge/DesertNuisanceBody.cs index c5c3c4229e..9b572476d2 100644 --- a/NPCs/DesertScourge/DesertNuisanceBody.cs +++ b/NPCs/DesertScourge/DesertNuisanceBody.cs @@ -44,11 +44,11 @@ namespace CalamityMod.NPCs.DesertScourge NPC.height = 88; NPC.defense = 5; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.defense += 27; NPC.LifeMaxNERB(1500, 1800, 40000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax = 4800; NPC.aiStyle = -1; AIType = -1; @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.DesertScourge // Calculate contact damage based on velocity float maxChaseSpeed = Main.zenithWorld ? DesertNuisanceHead.SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? DesertNuisanceHead.SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? DesertNuisanceHead.SegmentVelocity_GoodWorld : death ? DesertNuisanceHead.SegmentVelocity_Death : DesertNuisanceHead.SegmentVelocity_Expert; maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); diff --git a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs index fc10337135..9201fcf04e 100644 --- a/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceBodyYoung.cs @@ -44,11 +44,11 @@ namespace CalamityMod.NPCs.DesertScourge NPC.height = 78; NPC.defense = 4; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.defense += 26; NPC.LifeMaxNERB(1300, 1560, 35000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax = 4000; NPC.aiStyle = -1; AIType = -1; @@ -181,7 +181,7 @@ namespace CalamityMod.NPCs.DesertScourge // Calculate contact damage based on velocity float maxChaseSpeed = Main.zenithWorld ? DesertNuisanceHeadYoung.SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? DesertNuisanceHeadYoung.SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? DesertNuisanceHeadYoung.SegmentVelocity_GoodWorld : death ? DesertNuisanceHeadYoung.SegmentVelocity_Death : DesertNuisanceHeadYoung.SegmentVelocity_Expert; maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); diff --git a/NPCs/DesertScourge/DesertNuisanceHead.cs b/NPCs/DesertScourge/DesertNuisanceHead.cs index f1bc6a6ad5..5b1f4cf895 100644 --- a/NPCs/DesertScourge/DesertNuisanceHead.cs +++ b/NPCs/DesertScourge/DesertNuisanceHead.cs @@ -56,14 +56,14 @@ namespace CalamityMod.NPCs.DesertScourge NPC.GetNPCDamage(); NPC.defense = 3; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.defense += 19; NPC.width = 88; NPC.height = 88; NPC.LifeMaxNERB(1500, 1800, 40000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax = 4800; NPC.aiStyle = -1; AIType = -1; @@ -146,7 +146,7 @@ namespace CalamityMod.NPCs.DesertScourge speed += 0.085f * enrageScale; turnSpeed += 0.17f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { speed *= 1.1f; turnSpeed *= 1.2f; @@ -168,7 +168,7 @@ namespace CalamityMod.NPCs.DesertScourge { int previous = NPC.whoAmI; int minLength = 8; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) minLength *= 2; int bodyTypeAIVariable = 0; @@ -272,7 +272,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.spriteDirection = -1; float maxChaseSpeed = Main.zenithWorld ? SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? SegmentVelocity_GoodWorld : death ? SegmentVelocity_Death : SegmentVelocity_Expert; maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); @@ -299,7 +299,7 @@ namespace CalamityMod.NPCs.DesertScourge } } - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { speed *= 1.5f; turnSpeed *= 1.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs index 58cd825560..62e8c3c773 100644 --- a/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceHeadYoung.cs @@ -48,14 +48,14 @@ namespace CalamityMod.NPCs.DesertScourge NPC.GetNPCDamage(); NPC.defense = 2; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.defense += 18; NPC.width = 78; NPC.height = 78; NPC.LifeMaxNERB(1300, 1560, 35000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax = 4000; NPC.aiStyle = -1; AIType = -1; @@ -142,7 +142,7 @@ namespace CalamityMod.NPCs.DesertScourge speed += 0.07f * enrageScale; turnSpeed += 0.14f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { speed *= 1.1f; turnSpeed *= 1.2f; @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.DesertScourge { int previous = NPC.whoAmI; int minLength = 8; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) minLength *= 2; int bodyTypeAIVariable = 0; @@ -311,7 +311,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.spriteDirection = -1; float maxChaseSpeed = Main.zenithWorld ? SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? SegmentVelocity_GoodWorld : death ? SegmentVelocity_Death : SegmentVelocity_Expert; maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); @@ -338,7 +338,7 @@ namespace CalamityMod.NPCs.DesertScourge } } - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { speed *= 1.5f; turnSpeed *= 1.5f; diff --git a/NPCs/DesertScourge/DesertNuisanceTail.cs b/NPCs/DesertScourge/DesertNuisanceTail.cs index 6769923e9b..e06bd14066 100644 --- a/NPCs/DesertScourge/DesertNuisanceTail.cs +++ b/NPCs/DesertScourge/DesertNuisanceTail.cs @@ -26,11 +26,11 @@ namespace CalamityMod.NPCs.DesertScourge NPC.height = 88; NPC.defense = 8; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.defense += 34; NPC.LifeMaxNERB(1500, 1800, 40000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax = 4800; NPC.aiStyle = -1; AIType = -1; @@ -137,7 +137,7 @@ namespace CalamityMod.NPCs.DesertScourge // Calculate contact damage based on velocity float maxChaseSpeed = Main.zenithWorld ? DesertNuisanceHead.SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? DesertNuisanceHead.SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? DesertNuisanceHead.SegmentVelocity_GoodWorld : death ? DesertNuisanceHead.SegmentVelocity_Death : DesertNuisanceHead.SegmentVelocity_Expert; maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); diff --git a/NPCs/DesertScourge/DesertNuisanceTailYoung.cs b/NPCs/DesertScourge/DesertNuisanceTailYoung.cs index 8b502c0df0..90b0fc0dc7 100644 --- a/NPCs/DesertScourge/DesertNuisanceTailYoung.cs +++ b/NPCs/DesertScourge/DesertNuisanceTailYoung.cs @@ -26,11 +26,11 @@ namespace CalamityMod.NPCs.DesertScourge NPC.height = 78; NPC.defense = 7; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.defense += 33; NPC.LifeMaxNERB(1300, 1560, 35000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax = 4000; NPC.aiStyle = -1; AIType = -1; @@ -145,7 +145,7 @@ namespace CalamityMod.NPCs.DesertScourge // Calculate contact damage based on velocity float maxChaseSpeed = Main.zenithWorld ? DesertNuisanceHeadYoung.SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? DesertNuisanceHeadYoung.SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? DesertNuisanceHeadYoung.SegmentVelocity_GoodWorld : death ? DesertNuisanceHeadYoung.SegmentVelocity_Death : DesertNuisanceHeadYoung.SegmentVelocity_Expert; maxChaseSpeed += maxChaseSpeed * 0.2f * (1f - lifeRatio); diff --git a/NPCs/DesertScourge/DesertScourgeBody.cs b/NPCs/DesertScourge/DesertScourgeBody.cs index 23d2a5c5a6..e6a8aed1fe 100644 --- a/NPCs/DesertScourge/DesertScourgeBody.cs +++ b/NPCs/DesertScourge/DesertScourgeBody.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.DR_NERD(0.05f); NPC.LifeMaxNERB(4200, 5000, 1150000); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 4; NPC.aiStyle = -1; AIType = -1; @@ -65,7 +65,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.netAlways = true; NPC.dontCountMe = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.4f; NPC.Calamity().VulnerableToCold = true; @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.DesertScourge // Calculate contact damage based on velocity float maxChaseSpeed = Main.zenithWorld ? DesertScourgeHead.SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? DesertScourgeHead.SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? DesertScourgeHead.SegmentVelocity_GoodWorld : death ? DesertScourgeHead.SegmentVelocity_Death : expertMode ? DesertScourgeHead.SegmentVelocity_Expert : DesertScourgeHead.SegmentVelocity_Normal; diff --git a/NPCs/DesertScourge/DesertScourgeHead.cs b/NPCs/DesertScourge/DesertScourgeHead.cs index de32d8946f..0595e9e6dc 100644 --- a/NPCs/DesertScourge/DesertScourgeHead.cs +++ b/NPCs/DesertScourge/DesertScourgeHead.cs @@ -95,7 +95,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.height = 104; NPC.LifeMaxNERB(4200, 5000, 1150000); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 4; NPC.aiStyle = -1; AIType = -1; @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.DeathSound = DeathSound; NPC.netAlways = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.4f; if (Main.zenithWorld) @@ -257,7 +257,7 @@ namespace CalamityMod.NPCs.DesertScourge speed += 0.085f * enrageScale; turnSpeed += 0.17f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { speed *= 1.1f; turnSpeed *= 1.2f; @@ -431,7 +431,7 @@ namespace CalamityMod.NPCs.DesertScourge { int previous = NPC.whoAmI; int minLength = death ? 24 : revenge ? 21 : expertMode ? 18 : 15; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) minLength *= 3; int bodyTypeAIVariable = 0; @@ -542,7 +542,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.spriteDirection = -1; float maxChaseSpeed = Main.zenithWorld ? SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? SegmentVelocity_GoodWorld : death ? SegmentVelocity_Death : expertMode ? SegmentVelocity_Expert : SegmentVelocity_Normal; @@ -601,15 +601,15 @@ namespace CalamityMod.NPCs.DesertScourge { // Spit a huge spread of sand upwards that falls down SoundEngine.PlaySound(SandBlastSound, NPC.Center); - float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 16f : bossRush ? 10f : death ? 8.5f : revenge ? 8f : expertMode ? 7.5f : 6f; + float velocity = CalamityWorld.LegendaryMode ? 16f : bossRush ? 10f : death ? 8.5f : revenge ? 8f : expertMode ? 7.5f : 6f; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); Vector2 projectileVelocity = (NPC.Center + NPC.velocity * 10f - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity; int numProj = bossRush ? 30 : death ? 24 : revenge ? 21 : expertMode ? 18 : 12; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) numProj *= 2; - int spread = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 120 : 90; + int spread = CalamityWorld.LegendaryMode ? 120 : 90; float rotation = MathHelper.ToRadians(spread); for (int i = 0; i < numProj; i++) { diff --git a/NPCs/DesertScourge/DesertScourgeTail.cs b/NPCs/DesertScourge/DesertScourgeTail.cs index 5415c8e938..d3ee5cce9e 100644 --- a/NPCs/DesertScourge/DesertScourgeTail.cs +++ b/NPCs/DesertScourge/DesertScourgeTail.cs @@ -30,7 +30,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.DR_NERD(0.1f); NPC.LifeMaxNERB(4200, 5000, 1150000); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 4; NPC.aiStyle = -1; AIType = -1; @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.DesertScourge NPC.netAlways = true; NPC.dontCountMe = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.4f; NPC.Calamity().VulnerableToCold = true; @@ -179,7 +179,7 @@ namespace CalamityMod.NPCs.DesertScourge // Calculate contact damage based on velocity float maxChaseSpeed = Main.zenithWorld ? DesertScourgeHead.SegmentVelocity_ZenithSeed : - Main.getGoodWorld ? DesertScourgeHead.SegmentVelocity_GoodWorld : + CalamityWorld.LegendaryMode ? DesertScourgeHead.SegmentVelocity_GoodWorld : death ? DesertScourgeHead.SegmentVelocity_Death : expertMode ? DesertScourgeHead.SegmentVelocity_Expert : DesertScourgeHead.SegmentVelocity_Normal; diff --git a/NPCs/DevourerofGods/DevourerofGodsBody.cs b/NPCs/DevourerofGods/DevourerofGodsBody.cs index 79e71a6b1d..25d2be171a 100644 --- a/NPCs/DevourerofGods/DevourerofGodsBody.cs +++ b/NPCs/DevourerofGods/DevourerofGodsBody.cs @@ -89,7 +89,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.BossBar = Main.BigBossProgressBar.NeverValid; NPC.dontCountMe = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.5f; // Scale HP in Master @@ -275,7 +275,7 @@ namespace CalamityMod.NPCs.DevourerofGods float segmentVelocity = bossRush ? 19f : death ? 17.5f : 16f; if (expertMode) segmentVelocity += 4f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) segmentVelocity *= 1.1f; // Calculate contact damage based on velocity diff --git a/NPCs/DevourerofGods/DevourerofGodsHead.cs b/NPCs/DevourerofGods/DevourerofGodsHead.cs index 2d1b9fc913..b33e0e5517 100644 --- a/NPCs/DevourerofGods/DevourerofGodsHead.cs +++ b/NPCs/DevourerofGods/DevourerofGodsHead.cs @@ -213,7 +213,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.DeathSound = SoundID.NPCDeath14; NPC.netAlways = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.5f; // Scale HP in Master @@ -425,7 +425,7 @@ namespace CalamityMod.NPCs.DevourerofGods groundPhaseTurnSpeed += Vector2.Distance(destination, NPC.Center) * 0.0002f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { segmentVelocity *= 1.1f; speed *= 1.1f; @@ -751,10 +751,10 @@ namespace CalamityMod.NPCs.DevourerofGods // Fireballs // Check angle and distance to make sure it's realistic that they'd be fired - if (NPC.Opacity >= 1f && (distanceFromTarget > 480f || (CalamityWorld.LegendaryMode && CalamityWorld.revenge)) && (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) + if (NPC.Opacity >= 1f && (distanceFromTarget > 480f || CalamityWorld.LegendaryMode) && (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) { calamityGlobalNPC.newAI[0] += 1f; - if (calamityGlobalNPC.newAI[0] >= ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 30f : 150f) && calamityGlobalNPC.newAI[0] % ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 30f : phase7 ? 30f : 60f) == 0f) + if (calamityGlobalNPC.newAI[0] >= (CalamityWorld.LegendaryMode ? 30f : 150f) && calamityGlobalNPC.newAI[0] % (CalamityWorld.LegendaryMode ? 30f : phase7 ? 30f : 60f) == 0f) { float fireballSpeed = 8f; Vector2 fireballVelocity = Vector2.Normalize(player.Center - NPC.Center) * fireballSpeed + NPC.velocity * 0.5f; @@ -769,7 +769,7 @@ namespace CalamityMod.NPCs.DevourerofGods if (Main.netMode != NetmodeID.MultiplayerClient) Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, fireballVelocity, type, damage, 0f, Main.myPlayer); - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { for (int l = 0; l < 8; l++) { @@ -1112,7 +1112,7 @@ namespace CalamityMod.NPCs.DevourerofGods speedCopy += Vector2.Distance(destination, NPC.Center) * 0.005f; turnSpeedCopy += Vector2.Distance(destination, NPC.Center) * 0.00025f; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { if ((player.Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) speedCopy *= 2f; @@ -1270,7 +1270,7 @@ namespace CalamityMod.NPCs.DevourerofGods else if (increaseSpeed) groundPhaseTurnSpeed *= 2f; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { if ((player.Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) segmentVelocity *= 2f; @@ -1871,7 +1871,7 @@ namespace CalamityMod.NPCs.DevourerofGods turnSpeedCopy += distanceFromTarget * 0.0001f * (1f - lifeRatio); } - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { if ((player.Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) speedCopy *= 2f; @@ -2015,7 +2015,7 @@ namespace CalamityMod.NPCs.DevourerofGods else if (increaseSpeed) groundPhaseTurnSpeed *= 2f; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { if ((player.Center - NPC.Center).SafeNormalize(Vector2.UnitY).ToRotation().AngleTowards(NPC.velocity.ToRotation(), MathHelper.PiOver4) == NPC.velocity.ToRotation()) segmentVelocity *= 2f; @@ -2331,7 +2331,7 @@ namespace CalamityMod.NPCs.DevourerofGods float mult = revenge ? 1.5f : 3f; for (int i = 0; i < totalSpreads; i++) { - int totalProjectiles = (CalamityWorld.LegendaryMode && revenge) ? 30 : bossRush ? 18 : 12; + int totalProjectiles = (CalamityWorld.LegendaryMode) ? 30 : bossRush ? 18 : 12; float radians = MathHelper.TwoPi / totalProjectiles; float newVelocity = finalVelocity - i * mult; float velocityMult = 1f + ((finalVelocity - newVelocity) / (newVelocity * 2f) / 100f); diff --git a/NPCs/DevourerofGods/DevourerofGodsTail.cs b/NPCs/DevourerofGods/DevourerofGodsTail.cs index ac2e7d6dc6..2dd5f1834d 100644 --- a/NPCs/DevourerofGods/DevourerofGodsTail.cs +++ b/NPCs/DevourerofGods/DevourerofGodsTail.cs @@ -85,7 +85,7 @@ namespace CalamityMod.NPCs.DevourerofGods NPC.takenDamageMultiplier = 1.25f; NPC.dontCountMe = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.5f; // Scale HP in Master @@ -309,7 +309,7 @@ namespace CalamityMod.NPCs.DevourerofGods float segmentVelocity = bossRush ? 19f : death ? 17.5f : 16f; if (expertMode) segmentVelocity += 4f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) segmentVelocity *= 1.1f; // Calculate contact damage based on velocity diff --git a/NPCs/ExoMechs/Apollo/Apollo.cs b/NPCs/ExoMechs/Apollo/Apollo.cs index b00a9ac876..b274341ca0 100644 --- a/NPCs/ExoMechs/Apollo/Apollo.cs +++ b/NPCs/ExoMechs/Apollo/Apollo.cs @@ -424,7 +424,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo float timeToLineUpAttack = 30f; float timeToLineUpCharge = bossRush ? 45f : death ? 60f : revenge ? 68f : expertMode ? 75f : 90f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { timeToLineUpAttack *= 0.5f; timeToLineUpCharge *= 0.5f; @@ -445,7 +445,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo // Charge velocity float chargeVelocity = bossRush ? 115f : death ? 105f : revenge ? 101.25f : expertMode ? 97.5f : 90f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { baseVelocity *= 1.5f; chargeVelocity *= 1.15f; @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo float rocketPhaseDuration = lastMechAlive ? 60f : 90f; int numRockets = nerfedAttacks ? 2 : 3; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) numRockets += 3; // Default vector to fly to @@ -488,7 +488,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo int randomLocationVarianceX = shouldGetBuffedByBerserkPhase ? 50 : 20; int randomLocationVarianceY = shouldGetBuffedByBerserkPhase ? 250 : 100; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { randomLocationVarianceX *= 2; randomLocationVarianceY *= 2; @@ -1180,7 +1180,7 @@ namespace CalamityMod.NPCs.ExoMechs.Apollo NPC.ForceNetUpdate(); // Plasma bolts on charge - if (Main.netMode != NetmodeID.MultiplayerClient && (!(Main.zenithWorld && !exoMechdusa) || (CalamityWorld.LegendaryMode && revenge))) + if (Main.netMode != NetmodeID.MultiplayerClient && (!(Main.zenithWorld && !exoMechdusa) || (CalamityWorld.LegendaryMode))) { int totalProjectiles = bossRush ? 16 : death ? 12 : 8; float radians = MathHelper.TwoPi / totalProjectiles; diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 167ada2582..416eb7870a 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -888,7 +888,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares else { // Enrage if the target is more than the deathray length away - if ((distanceFromTarget > DeathrayEnrageDistance || (CalamityWorld.LegendaryMode && revenge)) && EnragedState == (float)Enraged.No) + if ((distanceFromTarget > DeathrayEnrageDistance || (CalamityWorld.LegendaryMode)) && EnragedState == (float)Enraged.No) { // Play enrage sound if (Main.LocalPlayer.active && !Main.LocalPlayer.dead && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < soundDistance) @@ -908,7 +908,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares NPC.velocity *= decelerationVelocityMult; int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 9 : expertMode ? 8 : 6; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) totalProjectiles += 4; float radians = MathHelper.TwoPi / totalProjectiles; diff --git a/NPCs/ExoMechs/Artemis/Artemis.cs b/NPCs/ExoMechs/Artemis/Artemis.cs index 7818bae958..58abe447e0 100644 --- a/NPCs/ExoMechs/Artemis/Artemis.cs +++ b/NPCs/ExoMechs/Artemis/Artemis.cs @@ -457,7 +457,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis float attackPhaseGateValue = shouldGetBuffedByBerserkPhase ? berserkAttackTime : normalAttackTime; float timeToLineUpAttack = phase2 ? 30f : 45f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) timeToLineUpAttack *= 0.5f; // Spin variables @@ -496,7 +496,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis // Charge variables float chargeVelocity = nerfedAttacks ? 60f : bossRush ? 81f : death ? 74f : revenge ? 70.5f : expertMode ? 67f : 60f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeVelocity *= 1.15f; float chargeDistance = 2000f; @@ -521,7 +521,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis float baseVelocity = ((AIState == (int)Phase.Deathray || lineUpAttack || AIState == (int)Phase.LaserShotgun) ? 40f : 20f) * baseVelocityMult; float decelerationVelocityMult = 0.85f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseVelocity *= 1.5f; // Laser shotgun variables @@ -535,7 +535,7 @@ namespace CalamityMod.NPCs.ExoMechs.Artemis int randomLocationVarianceX = shouldGetBuffedByBerserkPhase ? 50 : 20; int randomLocationVarianceY = shouldGetBuffedByBerserkPhase ? 250 : 100; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { randomLocationVarianceX *= 2; randomLocationVarianceY *= 2; diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs index e2eda50072..f9381b3b1f 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody1.cs @@ -531,7 +531,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else baseVelocity *= increaseSpeedMult; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseVelocity *= 1.15f; // Calculate contact damage based on velocity diff --git a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs index 411630ec67..2fb50e7c18 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosBody2.cs @@ -534,7 +534,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else baseVelocity *= increaseSpeedMult; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseVelocity *= 1.15f; // Calculate contact damage based on velocity diff --git a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs index d4eb16b82b..e211d48748 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosHead.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosHead.cs @@ -253,7 +253,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos } public float GetSlowdownAreaEdgeRadius(bool lastMechAlive) => - (BossRushEvent.BossRushActive ? 400f : CalamityWorld.death ? 600f : CalamityWorld.revenge ? 700f : Main.expertMode ? 800f : 1000f) * (lastMechAlive ? 0.6f : 1f) * (Main.zenithWorld && !exoMechdusa ? 2 : Main.getGoodWorld ? 0.5f : 1f); + (BossRushEvent.BossRushActive ? 400f : CalamityWorld.death ? 600f : CalamityWorld.revenge ? 700f : Main.expertMode ? 800f : 1000f) * (lastMechAlive ? 0.6f : 1f) * (Main.zenithWorld && !exoMechdusa ? 2 : CalamityWorld.LegendaryMode ? 0.5f : 1f); public int CheckForOtherMechs(ref int targetIndex, out bool exoPrimeAlive, out bool exoTwinsAlive) { @@ -527,7 +527,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else baseVelocity *= increaseSpeedMult; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseVelocity *= 1.15f; float turnDegrees = baseVelocity * 0.1f * (shouldGetBuffedByBerserkPhase ? 1.25f : 1.1f); diff --git a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs index 8faffda3d8..90e279edff 100644 --- a/NPCs/ExoMechs/Thanatos/ThanatosTail.cs +++ b/NPCs/ExoMechs/Thanatos/ThanatosTail.cs @@ -532,7 +532,7 @@ namespace CalamityMod.NPCs.ExoMechs.Thanatos else baseVelocity *= increaseSpeedMult; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseVelocity *= 1.15f; // Calculate contact damage based on velocity diff --git a/NPCs/HiveMind/DankCreeper.cs b/NPCs/HiveMind/DankCreeper.cs index 9e5ae8406a..117610775c 100644 --- a/NPCs/HiveMind/DankCreeper.cs +++ b/NPCs/HiveMind/DankCreeper.cs @@ -24,10 +24,10 @@ namespace CalamityMod.NPCs.HiveMind NPC.lifeMax = 120; if (BossRushEvent.BossRushActive) NPC.lifeMax = 2000; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 4; - if ((CalamityWorld.LegendaryMode && CalamityWorld.revenge)) + if (CalamityWorld.LegendaryMode) NPC.reflectsProjectiles = true; NPC.aiStyle = -1; diff --git a/NPCs/HiveMind/DarkHeart.cs b/NPCs/HiveMind/DarkHeart.cs index e44757e78c..fa19aa7ce7 100644 --- a/NPCs/HiveMind/DarkHeart.cs +++ b/NPCs/HiveMind/DarkHeart.cs @@ -29,7 +29,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.lifeMax = 75; if (BossRushEvent.BossRushActive) NPC.lifeMax = 1800; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 4; NPC.aiStyle = -1; @@ -73,9 +73,9 @@ namespace CalamityMod.NPCs.HiveMind if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) NPC.TargetClosest(); - float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10f : death ? 7f : revenge ? 6f : 4f; - float acceleration = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.5f : death ? 0.35f : revenge ? 0.3f : 0.2f; - float deceleration = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.9f : death ? 0.95f : revenge ? 0.96f : 0.98f; + float velocity = CalamityWorld.LegendaryMode ? 10f : death ? 7f : revenge ? 6f : 4f; + float acceleration = CalamityWorld.LegendaryMode ? 0.5f : death ? 0.35f : revenge ? 0.3f : 0.2f; + float deceleration = CalamityWorld.LegendaryMode ? 0.9f : death ? 0.95f : revenge ? 0.96f : 0.98f; if (BossRushEvent.BossRushActive) { velocity *= 2f; @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.HiveMind if (dropRain && Main.netMode != NetmodeID.MultiplayerClient) { NPC.ai[0] += 1f; - float rainDropRate = Main.getGoodWorld ? 10f : death ? 15f : revenge ? 20f : 30f; + float rainDropRate = CalamityWorld.LegendaryMode ? 10f : death ? 15f : revenge ? 20f : 30f; if (NPC.ai[0] >= rainDropRate) { NPC.ai[0] = 0f; @@ -129,7 +129,7 @@ namespace CalamityMod.NPCs.HiveMind int shaderainYos = (int)(NPC.position.Y + NPC.height + 4f); int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - float randomXVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.rand.NextFloat() * 5f : 0f; + float randomXVelocity = CalamityWorld.LegendaryMode ? Main.rand.NextFloat() * 5f : 0f; float velocityY = 8f; Projectile.NewProjectile(NPC.GetSource_FromAI(), shaderainXPos, shaderainYos, randomXVelocity, velocityY, type, damage, 0f, Main.myPlayer); } diff --git a/NPCs/HiveMind/HiveBlob.cs b/NPCs/HiveMind/HiveBlob.cs index e3bcc35ee9..c763368275 100644 --- a/NPCs/HiveMind/HiveBlob.cs +++ b/NPCs/HiveMind/HiveBlob.cs @@ -34,7 +34,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.lifeMax = 50; if (BossRushEvent.BossRushActive) NPC.lifeMax = 1300; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.knockBackResist = 0.9f; @@ -110,7 +110,7 @@ namespace CalamityMod.NPCs.HiveMind float hiveMindVelocity = Main.npc[hiveMind].velocity.Length(); float relocateSpeed = getFuckedAI ? 1.2f : death ? 0.8f : revenge ? 0.7f : expertMode ? 0.6f : 0.5f; float acceleration = 0.8f; - float distanceFromMind = Main.getGoodWorld ? 256f : 128f; + float distanceFromMind = CalamityWorld.LegendaryMode ? 256f : 128f; float hiveMindX = Main.npc[hiveMind].Center.X; float hiveMindY = Main.npc[hiveMind].Center.Y; @@ -183,7 +183,7 @@ namespace CalamityMod.NPCs.HiveMind if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[Main.npc[hiveMind].target].position, Main.player[Main.npc[hiveMind].target].width, Main.player[Main.npc[hiveMind].target].height)) { float projSpeed = death ? 8f : revenge ? 7f : expertMode ? 6f : 4f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) projSpeed *= 1.5f; Vector2 projDirection = NPC.Center; @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.HiveMind playerDist = projSpeed / playerDist; playerX *= playerDist; playerY *= playerDist; - int type = (CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(5)) ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType(); + int type = (CalamityWorld.LegendaryMode && Main.rand.NextBool(5)) ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType(); int damage = type == ProjectileID.CursedFlameHostile ? 30 : NPC.GetProjectileDamage(type); Vector2 projectileVelocity = new Vector2(playerX, playerY); if (type == ProjectileID.CursedFlameHostile) diff --git a/NPCs/HiveMind/HiveBlob2.cs b/NPCs/HiveMind/HiveBlob2.cs index 47acb7e3dc..76ae6a25d1 100644 --- a/NPCs/HiveMind/HiveBlob2.cs +++ b/NPCs/HiveMind/HiveBlob2.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.lifeMax = 75; if (BossRushEvent.BossRushActive) NPC.lifeMax = 1300; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 2; NPC.knockBackResist = 0.9f; @@ -104,7 +104,7 @@ namespace CalamityMod.NPCs.HiveMind float hiveMindVelocity = Main.npc[hiveMind].velocity.Length(); float relocateSpeed = getFuckedAI ? 1.2f : death ? 0.8f : revenge ? 0.7f : expertMode ? 0.6f : 0.5f; float acceleration = 0.8f; - float distanceFromMind = Main.getGoodWorld ? 192f : 96f; + float distanceFromMind = CalamityWorld.LegendaryMode ? 192f : 96f; float hiveMindX = Main.npc[hiveMind].Center.X; float hiveMindY = Main.npc[hiveMind].Center.Y; @@ -177,7 +177,7 @@ namespace CalamityMod.NPCs.HiveMind if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[Main.npc[hiveMind].target].position, Main.player[Main.npc[hiveMind].target].width, Main.player[Main.npc[hiveMind].target].height)) { float projSpeed = death ? 8f : revenge ? 7f : expertMode ? 6f : 4f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) projSpeed *= 1.5f; Vector2 projDirection = NPC.Center; @@ -187,7 +187,7 @@ namespace CalamityMod.NPCs.HiveMind playerDist = projSpeed / playerDist; playerX *= playerDist; playerY *= playerDist; - int type = (CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(5)) ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType(); + int type = (CalamityWorld.LegendaryMode && Main.rand.NextBool(5)) ? ProjectileID.CursedFlameHostile : ModContent.ProjectileType(); int damage = type == ProjectileID.CursedFlameHostile ? 30 : NPC.GetProjectileDamage(type); Vector2 projectileVelocity = new Vector2(playerX, playerY); if (type == ProjectileID.CursedFlameHostile) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index dac83e0034..8904122f79 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.HiveMind vileSpitFireRate = 12; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { reelbackFade *= 10; arcTime *= 0.5f; @@ -574,7 +574,7 @@ namespace CalamityMod.NPCs.HiveMind { NPC.localAI[0] = 1f; int maxBlobs = death ? 15 : revenge ? 7 : expertMode ? 6 : 5; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxBlobs *= 2; if (Main.zenithWorld) maxBlobs = 50; @@ -1168,7 +1168,7 @@ namespace CalamityMod.NPCs.HiveMind int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); Vector2 cloudSpawnPos = new Vector2(NPC.position.X + Main.rand.Next(NPC.width), NPC.position.Y + Main.rand.Next(NPC.height)); - Vector2 randomVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.rand.NextVector2CircularEdge(4f, 4f) : Vector2.Zero; + Vector2 randomVelocity = CalamityWorld.LegendaryMode ? Main.rand.NextVector2CircularEdge(4f, 4f) : Vector2.Zero; Projectile.NewProjectile(NPC.GetSource_FromAI(), cloudSpawnPos, randomVelocity, type, damage, 0, Main.myPlayer, 11f); } diff --git a/NPCs/HiveMind/HiveTumor.cs b/NPCs/HiveMind/HiveTumor.cs index 8a3269a23c..209437e1ea 100644 --- a/NPCs/HiveMind/HiveTumor.cs +++ b/NPCs/HiveMind/HiveTumor.cs @@ -25,7 +25,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.width = 30; //324 NPC.height = 30; //216 NPC.defense = 0; - NPC.lifeMax = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10 : 1000; + NPC.lifeMax = CalamityWorld.LegendaryMode ? 10 : 1000; NPC.knockBackResist = 0f; NPC.chaseable = false; NPC.HitSound = SoundID.NPCHit1; @@ -131,7 +131,7 @@ namespace CalamityMod.NPCs.HiveMind { Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Demonite, hit.HitDirection, -1f, 0, default, 1f); } - if (Main.netMode != NetmodeID.MultiplayerClient && (!NPC.AnyNPCs(ModContent.NPCType()) || (CalamityWorld.LegendaryMode && CalamityWorld.revenge))) + if (Main.netMode != NetmodeID.MultiplayerClient && (!NPC.AnyNPCs(ModContent.NPCType()) || CalamityWorld.LegendaryMode)) { Vector2 spawnAt = NPC.Bottom; NPC.NewNPC(NPC.GetSource_Death(), (int)spawnAt.X, (int)spawnAt.Y, ModContent.NPCType()); diff --git a/NPCs/Leviathan/Anahita.cs b/NPCs/Leviathan/Anahita.cs index c1d15e08a3..221e6c3237 100644 --- a/NPCs/Leviathan/Anahita.cs +++ b/NPCs/Leviathan/Anahita.cs @@ -83,7 +83,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.8f; if (Main.zenithWorld) @@ -192,9 +192,9 @@ namespace CalamityMod.NPCs.Leviathan bubbleVelocity += 4f * enrageScale; if (!leviAlive) bubbleVelocity += 2f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) bubbleVelocity *= 1.15f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) bubbleVelocity *= 2f; // Phases @@ -617,14 +617,14 @@ namespace CalamityMod.NPCs.Leviathan float velocity = death ? 13.5f : 12f; velocity += 6f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.15f; Vector2 chargeSetupLocation = Vector2.Normalize(targetVector - NPC.Center - NPC.velocity) * velocity; float acceleration = death ? 0.28f : 0.25f; acceleration += 0.2f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) acceleration *= 1.15f; if (Math.Abs(NPC.Center.Y - targetVector.Y) > 50f * NPC.scale || Math.Abs(NPC.Center.X - player.Center.X) > 350f * NPC.scale) @@ -654,7 +654,7 @@ namespace CalamityMod.NPCs.Leviathan float telegraphDist = 500f; // In Legendary, the projectiles she fires is randomized - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { LegendaryModeAttackChosen = Main.rand.Next(3); if (LegendaryModeAttackChosen == 2) @@ -708,7 +708,7 @@ namespace CalamityMod.NPCs.Leviathan int totalProjectiles = 8; int projectileDistance = 600; int type = ModContent.ProjectileType(); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { float radians = MathHelper.TwoPi / totalProjectiles; int damage = NPC.GetProjectileDamage(type); @@ -827,7 +827,7 @@ namespace CalamityMod.NPCs.Leviathan if (revenge) chargeVelocity += 2f + (death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeVelocity *= 1.15f; NPC.velocity = Vector2.Normalize(player.Center - NPC.Center) * chargeVelocity; @@ -853,7 +853,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().canBreakPlayerDefense = true; NPC.damage = (int)Math.Round(NPC.defDamage * 1.5); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge && NPC.ai[1] % 5f == 0f) + if (CalamityWorld.LegendaryMode && NPC.ai[1] % 5f == 0f) { SoundEngine.PlaySound(SoundID.Item85, NPC.Center); Vector2 bubbleSpawnPos = new Vector2(NPC.position.X + (NPC.width / 2) + (15 * NPC.direction * NPC.scale), NPC.position.Y + 30 * NPC.scale); @@ -923,7 +923,7 @@ namespace CalamityMod.NPCs.Leviathan Vector2 chargeSetupLocation = Vector2.Normalize(player.Center + new Vector2(NPC.localAI[0], -distance) - NPC.Center - NPC.velocity) * 12f; float acceleration = revenge ? 0.75f : 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) acceleration *= 1.15f; NPC.SimpleFlyMovement(chargeSetupLocation, acceleration); @@ -980,7 +980,7 @@ namespace CalamityMod.NPCs.Leviathan if (DrawProjectileTelegraphTimer > 0) { Color telegraphColor = Color.Black; - switch (CalamityWorld.LegendaryMode && CalamityWorld.revenge ? LegendaryModeAttackChosen : (int)NPC.localAI[3]) + switch (CalamityWorld.LegendaryMode ? LegendaryModeAttackChosen : (int)NPC.localAI[3]) { case 0: telegraphColor = new Color(55, 70, 240); diff --git a/NPCs/Leviathan/AnahitasIceShield.cs b/NPCs/Leviathan/AnahitasIceShield.cs index cd2355115a..448a2afe0d 100644 --- a/NPCs/Leviathan/AnahitasIceShield.cs +++ b/NPCs/Leviathan/AnahitasIceShield.cs @@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().VulnerableToCold = false; NPC.Calamity().VulnerableToSickness = false; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.8f; } diff --git a/NPCs/Leviathan/AquaticAberration.cs b/NPCs/Leviathan/AquaticAberration.cs index 59dded4f7f..efb3e7f858 100644 --- a/NPCs/Leviathan/AquaticAberration.cs +++ b/NPCs/Leviathan/AquaticAberration.cs @@ -55,7 +55,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.3f; // Scale stats in Expert and Master diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 5a301b94a5..61310b6b58 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -84,7 +84,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().VulnerableToElectricity = true; NPC.Calamity().VulnerableToWater = false; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.3f; if (Main.zenithWorld) @@ -313,7 +313,7 @@ namespace CalamityMod.NPCs.Leviathan hoverAcceleration += death ? 0.15f * (1f - lifeRatio) : 0.1f * (1f - lifeRatio); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { hoverSpeed *= 1.15f; hoverAcceleration *= 1.15f; @@ -413,7 +413,7 @@ namespace CalamityMod.NPCs.Leviathan if (Main.zenithWorld) { - type = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? ProjectileID.BouncyBoulder : ProjectileID.Boulder; + type = CalamityWorld.LegendaryMode ? ProjectileID.BouncyBoulder : ProjectileID.Boulder; leviCenter.Y -= 5; //Shoot a bit more up since boulders are affected by gravity damage *= 2; } @@ -452,7 +452,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.ai[1] += activePlayerAmt / 2; bool spawnedAberration = false; - float aberrationSpawnDelay = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 20f : (!sirenAlive || phase4) ? 60f : 40f; + float aberrationSpawnDelay = CalamityWorld.LegendaryMode ? 20f : (!sirenAlive || phase4) ? 60f : 40f; if (NPC.ai[1] > aberrationSpawnDelay) { NPC.ai[1] = 0f; @@ -460,7 +460,7 @@ namespace CalamityMod.NPCs.Leviathan spawnedAberration = true; } - int spawnLimit = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10 : (sirenAlive && !phase4) ? 1 : (death ? 2 : 3); + int spawnLimit = CalamityWorld.LegendaryMode ? 10 : (sirenAlive && !phase4) ? 1 : (death ? 2 : 3); if (spawnedAberration && NPC.CountNPCS(ModContent.NPCType()) < spawnLimit) { SoundEngine.PlaySound(soundChoice with { Pitch = soundChoice.Pitch + extrapitch }, npcCenter); @@ -575,7 +575,7 @@ namespace CalamityMod.NPCs.Leviathan if (revenge && (!sirenAlive || phase4)) lineupSpeed += death ? 9f * (1f - lifeRatio) : 6f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) lineupSpeed *= 1.15f; Vector2 leviChargeCenter = npcCenter; @@ -611,7 +611,7 @@ namespace CalamityMod.NPCs.Leviathan chargeAcceleration += death ? 0.15f * (1f - lifeRatio) : 0.1f * (1f - lifeRatio); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { chargeSpeed *= 1.15f; chargeAcceleration *= 1.15f; diff --git a/NPCs/Leviathan/LeviathanStart.cs b/NPCs/Leviathan/LeviathanStart.cs index 19205bd748..35ddf96f39 100644 --- a/NPCs/Leviathan/LeviathanStart.cs +++ b/NPCs/Leviathan/LeviathanStart.cs @@ -1,6 +1,7 @@ using System.IO; using CalamityMod.CalPlayer; using CalamityMod.Items.Accessories; +using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -58,7 +59,7 @@ namespace CalamityMod.NPCs.Leviathan NPC.Calamity().VulnerableToWater = false; NPC.Calamity().ProvidesProximityRage = false; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.8f; } diff --git a/NPCs/NormalNPCs/ArmoredDiggerHead.cs b/NPCs/NormalNPCs/ArmoredDiggerHead.cs index 5f230ad2bb..c2ab126f4d 100644 --- a/NPCs/NormalNPCs/ArmoredDiggerHead.cs +++ b/NPCs/NormalNPCs/ArmoredDiggerHead.cs @@ -439,7 +439,7 @@ namespace CalamityMod.NPCs.NormalNPCs { if (!CalamityPlayer.areThereAnyDamnBosses && NPC.downedPlantBoss && !NPC.AnyNPCs(ModContent.NPCType())) { - float spawnRateDivisor = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 125f : CalamityWorld.revenge ? 425f : 500f; + float spawnRateDivisor = CalamityWorld.LegendaryMode ? 125f : CalamityWorld.revenge ? 425f : 500f; return 1 / spawnRateDivisor; } } diff --git a/NPCs/NormalNPCs/BloodlettingServant.cs b/NPCs/NormalNPCs/BloodlettingServant.cs index d2b172c462..21cbc7976d 100644 --- a/NPCs/NormalNPCs/BloodlettingServant.cs +++ b/NPCs/NormalNPCs/BloodlettingServant.cs @@ -38,7 +38,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.height = 30; if (Main.tenthAnniversaryWorld) NPC.scale *= 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.1f; NPC.defense = 5; @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.NormalNPCs bool charging = (attemptingToCharge && farEnoughForCharge && closeEnoughForCharge) || NPC.ai[1] > 0f; float projectileShootGateValue = CalamityWorld.death ? 180f : 270f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) projectileShootGateValue *= 0.5f; Vector2 lookAt = target.Center - NPC.Center; diff --git a/NPCs/NormalNPCs/Foveanator.cs b/NPCs/NormalNPCs/Foveanator.cs index 30d5b09bca..228c0e81b8 100644 --- a/NPCs/NormalNPCs/Foveanator.cs +++ b/NPCs/NormalNPCs/Foveanator.cs @@ -60,7 +60,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.height = 100; if (Main.tenthAnniversaryWorld) NPC.scale *= 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.8f; NPC.defense = 10; @@ -247,7 +247,7 @@ namespace CalamityMod.NPCs.NormalNPCs acceleration += phase1MaxAccelerationIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -302,7 +302,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (!Main.player[NPC.target].dead) { NPC.ai[3] += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.ai[3] += 0.5f; } @@ -346,7 +346,7 @@ namespace CalamityMod.NPCs.NormalNPCs chargeSpeed += 1f * enrageScale; if (death) chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed += 1f; NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; @@ -380,7 +380,7 @@ namespace CalamityMod.NPCs.NormalNPCs maxVelocity += 6f * enrageScale; if (death) maxVelocity += (phase1MaxChargeSpeedIncrease * 6f) * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxVelocity += 6f; if (NPC.velocity.Length() < maxVelocity) @@ -576,7 +576,7 @@ namespace CalamityMod.NPCs.NormalNPCs if (distanceFromDestination > distanceFromTarget) maxVelocity += MathHelper.Lerp(0f, 12f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -675,7 +675,7 @@ namespace CalamityMod.NPCs.NormalNPCs float chargeSpeed = 4.5f + (death ? 1.25f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); chargeSpeed += 4f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed *= 1.2f; NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; @@ -714,7 +714,7 @@ namespace CalamityMod.NPCs.NormalNPCs maxVelocity += 6f * enrageScale; if (death) maxVelocity += 7.5f * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxVelocity *= 1.2f; // Spawn Energy Bombs along the way @@ -782,7 +782,7 @@ namespace CalamityMod.NPCs.NormalNPCs maxVelocity += 6f * enrageScale; acceleration += 0.08f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; diff --git a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs index d766fc1f04..bcb3f9070d 100644 --- a/NPCs/NormalNPCs/PlanterasFreeTentacle.cs +++ b/NPCs/NormalNPCs/PlanterasFreeTentacle.cs @@ -81,7 +81,7 @@ namespace CalamityMod.NPCs.NormalNPCs bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { if (Main.rand.NextBool(5)) NPC.reflectsProjectiles = true; @@ -135,7 +135,7 @@ namespace CalamityMod.NPCs.NormalNPCs Vector2 idealVelocity = NPC.SafeDirectionTo(Main.player[NPC.target].Center) * (death ? 7f : 5.5f); float acceleration = death ? 0.14f : 0.105f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { idealVelocity *= 1.2f; acceleration *= 1.4f; diff --git a/NPCs/NormalNPCs/ShockstormShuttle.cs b/NPCs/NormalNPCs/ShockstormShuttle.cs index c41c3b21dc..66e4382050 100644 --- a/NPCs/NormalNPCs/ShockstormShuttle.cs +++ b/NPCs/NormalNPCs/ShockstormShuttle.cs @@ -4,6 +4,7 @@ using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Placeables.Ores; +using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; using Terraria.GameContent.Bestiary; @@ -89,8 +90,8 @@ namespace CalamityMod.NPCs.NormalNPCs npcPos.X += velocity.X; npcPos.Y += velocity.Y; - int spread = Main.getGoodWorld ? 100 : 20; - for (int i = 0; i < (Main.getGoodWorld ? 10 : 2); i++) + int spread = CalamityWorld.LegendaryMode ? 100 : 20; + for (int i = 0; i < (CalamityWorld.LegendaryMode ? 10 : 2); i++) { velocity = Main.player[NPC.target].Center - npcPos; targetDist = velocity.Length(); @@ -408,7 +409,7 @@ namespace CalamityMod.NPCs.NormalNPCs { return 0f; } - return SpawnCondition.Sky.Chance * (Main.getGoodWorld ? 0.5f : 0.1f); + return SpawnCondition.Sky.Chance * (CalamityWorld.LegendaryMode ? 0.5f : 0.1f); } public override void ModifyNPCLoot(NPCLoot npcLoot) diff --git a/NPCs/NormalNPCs/SkeletronPrime2.cs b/NPCs/NormalNPCs/SkeletronPrime2.cs index 76ea9c25c2..cd1fc136af 100644 --- a/NPCs/NormalNPCs/SkeletronPrime2.cs +++ b/NPCs/NormalNPCs/SkeletronPrime2.cs @@ -50,7 +50,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.height = 102; if (Main.tenthAnniversaryWorld) NPC.scale *= 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 1.1f; NPC.defense = 24; diff --git a/NPCs/OldDuke/SulphurousSharkron.cs b/NPCs/OldDuke/SulphurousSharkron.cs index e2b4fdfe64..b239e96ef1 100644 --- a/NPCs/OldDuke/SulphurousSharkron.cs +++ b/NPCs/OldDuke/SulphurousSharkron.cs @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.OldDuke if (Main.rand.NextBool(8) && Main.player[closestPlayer].statLife < Main.player[closestPlayer].statLifeMax2) Item.NewItem(NPC.GetSource_Loot(), (int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height, ItemID.Heart); - if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld) + if (Main.netMode != NetmodeID.MultiplayerClient && CalamityWorld.LegendaryMode) { int spawnX = NPC.width / 2; int type = ModContent.ProjectileType(); diff --git a/NPCs/Other/THELORDE.cs b/NPCs/Other/THELORDE.cs index 360e1a19fa..3262a9b565 100644 --- a/NPCs/Other/THELORDE.cs +++ b/NPCs/Other/THELORDE.cs @@ -584,8 +584,8 @@ namespace CalamityMod.NPCs.Other public override void ModifyNPCLoot(NPCLoot npcLoot) { double pisquaredover6 = Math.Pow(MathHelper.Pi, 2) / 6; - npcLoot.AddIf(() => CalamityWorld.LegendaryMode && CalamityWorld.revenge, ModContent.ItemType()); // guaranteed in legendarev mode - npcLoot.AddIf(() => !(CalamityWorld.LegendaryMode && CalamityWorld.revenge), ModContent.ItemType(), 27); // otherwise 1 in 27 + npcLoot.AddIf(() => CalamityWorld.LegendaryMode, ModContent.ItemType()); // guaranteed in legendarev mode + npcLoot.AddIf(() => !CalamityWorld.LegendaryMode, ModContent.ItemType(), 27); // otherwise 1 in 27 npcLoot.Add(ModContent.ItemType(), 1, 22, (int)(pisquaredover6 * 100)); } } diff --git a/NPCs/Perforator/PerforatorHive.cs b/NPCs/Perforator/PerforatorHive.cs index 144a0ed936..4b9461d401 100644 --- a/NPCs/Perforator/PerforatorHive.cs +++ b/NPCs/Perforator/PerforatorHive.cs @@ -252,12 +252,12 @@ namespace CalamityMod.NPCs.Perforator if (NPC.ai[3] == 0f && NPC.life > 0) NPC.ai[3] = NPC.lifeMax; - bool canSpawnWorms = !small || !medium || !large || Main.getGoodWorld; + bool canSpawnWorms = !small || !medium || !large || CalamityWorld.LegendaryMode; if (NPC.life > 0 && canSpawnWorms) { if (Main.netMode != NetmodeID.MultiplayerClient) { - int wormSpawnGateValue = (int)(NPC.lifeMax * (Main.getGoodWorld ? 0.15 : 0.25)); + int wormSpawnGateValue = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.15 : 0.25)); if ((NPC.life + wormSpawnGateValue) < NPC.ai[3]) { NPC.ai[3] = NPC.life; @@ -277,7 +277,7 @@ namespace CalamityMod.NPCs.Perforator wormType = ModContent.NPCType(); } - if (Main.getGoodWorld && lifeRatio < 0.5f) + if (CalamityWorld.LegendaryMode && lifeRatio < 0.5f) { if (lifeRatio > 0.35f) NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X + Main.rand.Next(-25, 26), (int)NPC.Center.Y + Main.rand.Next(-25, 26), ModContent.NPCType(), 1); @@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.Perforator // Emit ichor blobs if (phase2) { - if (wormsAlive == 0 || large || bossRush || floatAboveToFireBlobs || (CalamityWorld.LegendaryMode && CalamityWorld.revenge)) + if (wormsAlive == 0 || large || bossRush || floatAboveToFireBlobs || CalamityWorld.LegendaryMode) { NPC.ai[2] += 1f; if (NPC.ai[2] >= blobPhaseGateValue) @@ -360,7 +360,7 @@ namespace CalamityMod.NPCs.Perforator bool ichorBlobBigWormPhase = wormsAlive > 0 && large; int numBlobs = expertMode ? (ichorBlobBigWormPhase ? 4 : 6) : (ichorBlobBigWormPhase ? 2 : 4); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) numBlobs *= 2; int type = ModContent.ProjectileType(); @@ -373,7 +373,7 @@ namespace CalamityMod.NPCs.Perforator blobVelocity.Normalize(); blobVelocity *= Main.rand.Next(400, 801) * (bossRush ? 0.02f : 0.01f); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) blobVelocity *= Main.rand.NextFloat() + 1f; float blobVelocityYAdd = Math.Abs(blobVelocity.Y) * 0.25f; @@ -480,7 +480,7 @@ namespace CalamityMod.NPCs.Perforator int numProj = death ? 16 : revenge ? 14 : expertMode ? 12 : 10; if (phase3) numProj = death ? 12 : revenge ? 10 : expertMode ? 8 : 6; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) numProj *= 2; int spread = 75; diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index 79c8333645..ae0563d785 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -176,7 +176,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath float challengeAmt = (1f - lifeRatio) * 100f; float nukeBarrageChallengeAmt = (0.5f - lifeRatio) * 200f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { challengeAmt *= 1.5f; nukeBarrageChallengeAmt *= 1.5f; @@ -209,7 +209,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath // Missile countdown if (halfLife && MissileCountdown == 0) - MissileCountdown = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 300 : 600; + MissileCountdown = CalamityWorld.LegendaryMode ? 300 : 600; if (MissileCountdown > 1) MissileCountdown--; @@ -250,7 +250,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath if (enrageScale > 1.5f) enrageScale = 1.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) enrageScale += 0.5f; if (bossRush) @@ -545,7 +545,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.velocity *= 1.01f; // Spawn honey in legendary rev+ - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge && calamityGlobalNPC.newAI[0] % 6f == 0f) + if (CalamityWorld.LegendaryMode && calamityGlobalNPC.newAI[0] % 6f == 0f) { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -803,7 +803,7 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.direction = playerLocation < 0 ? 1 : -1; NPC.spriteDirection = NPC.direction; - if (NPC.ai[2] > ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 3f : 5f)) + if (NPC.ai[2] > (CalamityWorld.LegendaryMode ? 3f : 5f)) { NPC.ai[0] = -1f; NPC.ai[1] = 2f; diff --git a/NPCs/Polterghast/PhantomFuckYou.cs b/NPCs/Polterghast/PhantomFuckYou.cs index 5e0b097a77..7a829ce8d6 100644 --- a/NPCs/Polterghast/PhantomFuckYou.cs +++ b/NPCs/Polterghast/PhantomFuckYou.cs @@ -80,7 +80,7 @@ namespace CalamityMod.NPCs.Polterghast } float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; bool chargePhase = Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] >= chargePhaseGateValue - 60f; @@ -98,11 +98,11 @@ namespace CalamityMod.NPCs.Polterghast direction *= 0.5f; NPC.rotation = direction.ToRotation(); - if (!chargePhase || (CalamityWorld.LegendaryMode && CalamityWorld.revenge)) + if (!chargePhase || CalamityWorld.LegendaryMode) { NPC.ai[2] += 1f; float shootMineGateValue = 150f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) shootMineGateValue *= 0.5f; if (NPC.ai[2] >= shootMineGateValue) @@ -130,7 +130,7 @@ namespace CalamityMod.NPCs.Polterghast if (SPEEN < 0f) SPEEN = 0f; - NPC.ai[1] += (Main.getGoodWorld ? 1.5f : 0.5f) + SPEEN; + NPC.ai[1] += (CalamityWorld.LegendaryMode ? 1.5f : 0.5f) + SPEEN; } public override Color? GetAlpha(Color drawColor) => new Color(200, 200, 200, 0); diff --git a/NPCs/Polterghast/PolterPhantom.cs b/NPCs/Polterghast/PolterPhantom.cs index d5de2b05cd..c388f8f5fd 100644 --- a/NPCs/Polterghast/PolterPhantom.cs +++ b/NPCs/Polterghast/PolterPhantom.cs @@ -44,7 +44,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.defense = 45; NPC.DR_NERD(0.1f); NPC.LifeMaxNERB(62500, 75000, 60000); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.lifeMax *= 4; NPC.knockBackResist = 0f; @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.Polterghast Vector2 vector = NPC.Center; float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; float colorChangeTime = 180f; @@ -440,7 +440,7 @@ namespace CalamityMod.NPCs.Polterghast spriteEffects = SpriteEffects.FlipHorizontally; float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; float timeToReachFullColor = 120f; diff --git a/NPCs/Polterghast/Polterghast.cs b/NPCs/Polterghast/Polterghast.cs index 34c64b4665..5bd7df5b36 100644 --- a/NPCs/Polterghast/Polterghast.cs +++ b/NPCs/Polterghast/Polterghast.cs @@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.Polterghast // Velocity and acceleration calamityGlobalNPC.newAI[0] += 1f; float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; bool chargePhase = calamityGlobalNPC.newAI[0] >= chargePhaseGateValue; @@ -1120,7 +1120,7 @@ namespace CalamityMod.NPCs.Polterghast } float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; float timeToReachFullColor = 120f; diff --git a/NPCs/Polterghast/PolterghastHook.cs b/NPCs/Polterghast/PolterghastHook.cs index a31142c7f1..2afb116640 100644 --- a/NPCs/Polterghast/PolterghastHook.cs +++ b/NPCs/Polterghast/PolterghastHook.cs @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.Polterghast } float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; bool chargePhase = Main.npc[CalamityGlobalNPC.ghostBoss].Calamity().newAI[0] >= chargePhaseGateValue - 60f; @@ -150,7 +150,7 @@ namespace CalamityMod.NPCs.Polterghast NPC.ai[2] += 1f; if (NPC.ai[3] == 0f) { - if (NPC.ai[2] > ((CalamityWorld.LegendaryMode && revenge) ? 12f : 120f)) + if (NPC.ai[2] > ((CalamityWorld.LegendaryMode) ? 12f : 120f)) { NPC.ai[2] = 0f; NPC.ai[3] = 1f; @@ -183,7 +183,7 @@ namespace CalamityMod.NPCs.Polterghast private void Movement(bool phase2, bool expertMode, bool revenge, bool death, bool speedBoost, bool despawnBoost, float lifeRatio, float tileEnrageMult, Player player) { float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; float colorChangeTime = 180f; @@ -325,7 +325,7 @@ namespace CalamityMod.NPCs.Polterghast Color lightRed = new Color(255, 100, 100, 255); float chargePhaseGateValue = 480f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargePhaseGateValue *= 0.5f; float timeToReachFullColor = 120f; diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 81ecc448d3..43b7bc4470 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -329,7 +329,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm float ancientDoomGateValue = death ? 95f : revenge ? 100f : expertMode ? 105f : 120f; float lightningChargePhaseGateValue = death ? 120f : revenge ? 135f : expertMode ? 150f : 180f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { lightningRainDuration *= 0.5f; eidolonWyrmPhaseDuration *= 0.25f; @@ -448,7 +448,7 @@ namespace CalamityMod.NPCs.PrimordialWyrm // Velocity and turn speed values float velocityScale = death ? 1.8f : revenge ? 1.5f : expertMode ? 1.2f : 0f; float baseVelocity = (targetDownDeep ? 10f : 15f) + (targetDownDeep ? velocityScale : velocityScale * 1.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseVelocity *= 1.15f; float turnSpeed = baseVelocity * 0.015f; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs index 4afdca7d56..67639e3cc1 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianCommander.cs @@ -368,9 +368,9 @@ namespace CalamityMod.NPCs.ProfanedGuardians // Charge variables float chargeVelocityMult = 0.25f; float maxChargeVelocity = bossRush ? 32f : death ? 28f : revenge ? 26f : expertMode ? 24f : 20f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxChargeVelocity *= 1.15f; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) maxChargeVelocity *= 2f; float inertia = bossRush ? 40f : death ? 45f : revenge ? 47f : expertMode ? 50f : 55f; @@ -378,7 +378,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians inertia *= 0.8f; if (!phase1) inertia *= 0.75f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.8f; bool speedUp = Vector2.Distance(NPC.Center, player.Center) > 960f; @@ -457,7 +457,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians calamityGlobalNPC.newAI[0] = -NPC.direction; float velocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.25f; if (healerAlive) velocity *= 0.8f; @@ -792,7 +792,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians bool targetRanAwayAndWillNowBeFucked = NPC.ai[2] == 1f; bool boostVelocityToCatchUp = NPC.ai[1] == 0f || targetRanAwayAndWillNowBeFucked; float velocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.25f; if (boostVelocityToCatchUp) velocity *= 2f; @@ -849,7 +849,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians else if (NPC.ai[1] % spearShootDivisor == 0f) { float spearVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) spearVelocity *= 1.25f; if (boostVelocityToCatchUp) spearVelocity *= 1.5f; @@ -906,7 +906,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians float velocity = bossRush ? 4.5f : death ? 4f : revenge ? 3.75f : expertMode ? 3.5f : 3f; if (NPC.ai[1] < laserGateValue) velocity *= 6f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.25f; calamityGlobalNPC.newAI[0] = -NPC.direction; @@ -924,7 +924,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians // Limit Y velocity while firing laser if (NPC.ai[1] >= laserGateValue) { - float speedCap = Main.getGoodWorld ? 4f : 2f; + float speedCap = CalamityWorld.LegendaryMode ? 4f : 2f; if (NPC.velocity.Y > speedCap) NPC.velocity.Y = speedCap; if (NPC.velocity.Y < -speedCap) @@ -984,7 +984,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (revenge) Projectile.NewProjectile(NPC.GetSource_FromAI(), shootFrom, -laserVelocity, type, damage, 0f, Main.myPlayer, -beamDirection * MathHelper.TwoPi / rotation, NPC.whoAmI); - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { rotation *= 0.33f; laserVelocity = laserVelocity.RotatedBy(-(double)beamDirection * MathHelper.TwoPi / 2f); diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs index 8c0774d5d3..53af9efb83 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianDefender.cs @@ -262,7 +262,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians // Charge variables float chargeVelocityMult = 0.25f; float maxChargeVelocity = bossRush ? 25f : death ? 22f : revenge ? 20.5f : expertMode ? 19f : 16f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxChargeVelocity *= 1.15f; // Whether the commander is calling all guardians together for the laser attack @@ -382,7 +382,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians } float moveVelocity = bossRush ? 24f : death ? 22f : revenge ? 21f : expertMode ? 20f : 18f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) moveVelocity *= 1.25f; if (healerAlive) moveVelocity *= 0.8f; @@ -457,7 +457,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (distanceFromDestination.Length() > 40f) { float inertia = (commanderUsingLaser || commanderGoingLowOrHighInPhase1) ? 10f : 15f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.8f; NPC.velocity = (NPC.velocity * (inertia - 1) + desiredVelocity) / inertia; @@ -489,7 +489,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (NPC.ai[1] >= -throwRocksGateValue) { NPC.velocity *= 0.8f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.velocity *= 0.5f; } @@ -555,7 +555,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (distanceFromDestination.Length() > 40f) { float inertia = commanderGoingLowOrHighInPhase2 ? 8f : 15f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.8f; NPC.velocity = (NPC.velocity * (inertia - 1) + desiredVelocity) / inertia; diff --git a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs index 5a23446c69..a2fdabec4d 100644 --- a/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs +++ b/NPCs/ProfanedGuardians/ProfanedGuardianHealer.cs @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians bool useCrystalShards = AIState == (float)Phase.CrystalShards; float velocity = useCrystalShards ? (bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f) : (Main.npc[CalamityGlobalNPC.doughnutBoss].velocity.Length() + 5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.25f; float idealDistanceFromDestination = useCrystalShards ? 80f : 160f; @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians if (distanceFromDestination.Length() > 40f) { float inertia = 10f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.8f; NPC.velocity = (NPC.velocity * (inertia - 1) + desiredVelocity) / inertia; @@ -407,7 +407,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians float inertia = bossRush ? 28f : death ? 32f : revenge ? 34f : expertMode ? 36f : 40f; if (lifeRatio < 0.5f) inertia *= 0.8f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.8f; NPC.velocity = (NPC.velocity * (inertia - 1) + desiredVelocity) / inertia; diff --git a/NPCs/ProfanedGuardians/ProfanedRocks.cs b/NPCs/ProfanedGuardians/ProfanedRocks.cs index 64ea8d4e8b..379bf88d68 100644 --- a/NPCs/ProfanedGuardians/ProfanedRocks.cs +++ b/NPCs/ProfanedGuardians/ProfanedRocks.cs @@ -209,7 +209,7 @@ namespace CalamityMod.NPCs.ProfanedGuardians // Start off slow Vector2 finalVelocity = NPC.SafeDirectionTo(player.Center, -Vector2.UnitY) * chargeSpeed; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) finalVelocity *= Main.rand.NextFloat(1f, 1.7f); NPC.Calamity().newAI[2] = finalVelocity.X; diff --git a/NPCs/Providence/Providence.cs b/NPCs/Providence/Providence.cs index 7a97449c25..617ab71868 100644 --- a/NPCs/Providence/Providence.cs +++ b/NPCs/Providence/Providence.cs @@ -261,7 +261,7 @@ namespace CalamityMod.NPCs.Providence NPC.Calamity().VulnerableToSickness = false; NPC.Calamity().VulnerableToWater = true; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.25f; // Scale HP in Master @@ -884,7 +884,7 @@ namespace CalamityMod.NPCs.Providence acceleration = 2f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.2f; acceleration *= 1.2f; @@ -900,12 +900,12 @@ namespace CalamityMod.NPCs.Providence float moveUpThreshold = player.position.Y - (NPC.position.Y + NPC.height); if (moveUpThreshold < (laserPhaseSlow ? 150f : 200f)) // 150 - NPC.velocity.Y -= Main.getGoodWorld ? 0.4f : 0.2f; + NPC.velocity.Y -= CalamityWorld.LegendaryMode ? 0.4f : 0.2f; if (moveUpThreshold > (laserPhaseSlow ? 200f : 250f)) // 200 - NPC.velocity.Y += Main.getGoodWorld ? 0.4f : 0.2f; + NPC.velocity.Y += CalamityWorld.LegendaryMode ? 0.4f : 0.2f; float speedCap = laserPhaseSlow ? 2f : 6f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) speedCap *= 1.5f; if (NPC.velocity.Y > speedCap) @@ -1567,7 +1567,7 @@ namespace CalamityMod.NPCs.Providence { Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom, vector2, projectileType, holySpearDamage, 0f, Main.myPlayer); - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom, -vector2, projectileType, holySpearDamage, 0f, Main.myPlayer); } } @@ -1594,7 +1594,7 @@ namespace CalamityMod.NPCs.Providence { Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom, velocity2, projectileType, holySpearDamage, 0f, Main.myPlayer, 1f, 0f); - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom, -velocity2, projectileType, holySpearDamage, 0f, Main.myPlayer, 1f, 0f); } } diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index 1003555aee..a71e1c3a6f 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -497,7 +497,7 @@ namespace CalamityMod.NPCs.Ravager NPC.ai[1] += 1f; } - float jumpGateValue = Main.getGoodWorld ? 0f : 180f; + float jumpGateValue = CalamityWorld.LegendaryMode ? 0f : 180f; if (NPC.ai[1] >= jumpGateValue) { NPC.ai[1] = -20f; @@ -594,7 +594,7 @@ namespace CalamityMod.NPCs.Ravager bool anyRockPillars = NPC.AnyNPCs(ModContent.NPCType()); bool anyFlamePillars = NPC.AnyNPCs(ModContent.NPCType()); - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) { if (!expertMode || anyRockPillars || anyFlamePillars) SoundEngine.PlaySound(PillarSound, NPC.Center); @@ -636,12 +636,12 @@ namespace CalamityMod.NPCs.Ravager { SoundEngine.PlaySound(PillarSound, NPC.Center); } - if (!anyRockPillars || Main.getGoodWorld) + if (!anyRockPillars || CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X - spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(player.Center.X + spawnDistance * 1.25f), (int)player.Center.Y - 100, ModContent.NPCType()); } - else if (!anyFlamePillars || Main.getGoodWorld) + else if (!anyFlamePillars || CalamityWorld.LegendaryMode) { float distanceMultiplier = finalPhase ? 2.5f : 2f; NPC.NewNPC(NPC.GetSource_FromAI(), (int)player.Center.X - (int)(spawnDistance * distanceMultiplier), (int)player.Center.Y - 100, ModContent.NPCType()); diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index eb3761f198..e087815b33 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -138,12 +138,12 @@ namespace CalamityMod.NPCs.Signus double lifeRatio = NPC.life / (double)NPC.lifeMax; - lifeToAlpha = (int)((Main.getGoodWorld ? 200D : 100D) * (1D - lifeRatio)); + lifeToAlpha = (int)((CalamityWorld.LegendaryMode ? 200D : 100D) * (1D - lifeRatio)); int maxCharges = death ? 1 : revenge ? 2 : expertMode ? 3 : 4; int maxTeleports = (death && lifeRatio < 0.9) ? 1 : revenge ? 2 : expertMode ? 3 : 4; float inertia = bossRush ? 9f : death ? 10f : revenge ? 11f : expertMode ? 12f : 14f; float chargeVelocity = bossRush ? 16f : death ? 14f : revenge ? 13f : expertMode ? 12f : 10f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { inertia *= 0.5f; chargeVelocity *= 1.15f; @@ -197,7 +197,7 @@ namespace CalamityMod.NPCs.Signus else if (NPC.timeLeft < 1800) NPC.timeLeft = 1800; - if (lifeToAlpha < (Main.getGoodWorld ? 100 : 50) && NPC.ai[0] != 1f) + if (lifeToAlpha < (CalamityWorld.LegendaryMode ? 100 : 50) && NPC.ai[0] != 1f) { for (int i = 0; i < 2; i++) { @@ -263,7 +263,7 @@ namespace CalamityMod.NPCs.Signus playerYDist *= playerDistance; float inertia2 = 50f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia2 *= 0.5f; NPC.velocity.X = (NPC.velocity.X * inertia2 + playerXDist) / (inertia2 + 1f); @@ -298,7 +298,7 @@ namespace CalamityMod.NPCs.Signus if (expertMode) NPC.localAI[1] += death ? 3f * (float)(1D - lifeRatio) : 2f * (float)(1D - lifeRatio); - if (NPC.localAI[1] >= (Main.getGoodWorld ? 0f : 120f)) + if (NPC.localAI[1] >= (CalamityWorld.LegendaryMode ? 0f : 120f)) { NPC.localAI[1] = 0f; @@ -573,7 +573,7 @@ namespace CalamityMod.NPCs.Signus { if (Main.netMode != NetmodeID.MultiplayerClient) { - int totalLamps = (Main.getGoodWorld && !Main.zenithWorld) ? 10 : 5; + int totalLamps = (CalamityWorld.LegendaryMode && !Main.zenithWorld) ? 10 : 5; if (NPC.CountNPCS(ModContent.NPCType()) < totalLamps) { bool buffed = false; @@ -712,10 +712,10 @@ namespace CalamityMod.NPCs.Signus if ((phase2 || buffed) && NPC.ai[2] % 3f == 0f) { SoundEngine.PlaySound(SoundID.Item73, NPC.Center); - int type = (CalamityWorld.LegendaryMode && revenge) ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = (CalamityWorld.LegendaryMode && revenge) ? 60 : NPC.GetProjectileDamage(type); + int type = (CalamityWorld.LegendaryMode) ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int damage = (CalamityWorld.LegendaryMode) ? 60 : NPC.GetProjectileDamage(type); Vector2 velocity = Main.zenithWorld ? new Vector2(Main.rand.Next(-10, 11), Main.rand.Next(-10, 11)) : Vector2.Zero; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) { velocity = new Vector2(Main.rand.Next(-5, 6), Main.rand.Next(-5, 6)); } diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn.cs b/NPCs/SlimeGod/CorruptSlimeSpawn.cs index 9d19bc6ba6..474c9f9480 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn.cs @@ -26,11 +26,11 @@ namespace CalamityMod.NPCs.SlimeGod NPC.GetNPCDamage(); NPC.width = 40; NPC.height = 30; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.scale = 2f; NPC.defense = 6; - NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 360 : 180; + NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : CalamityWorld.LegendaryMode ? 360 : 180; NPC.knockBackResist = 0.7f; AnimationType = NPCID.Slimer; NPC.lavaImmune = false; diff --git a/NPCs/SlimeGod/CorruptSlimeSpawn2.cs b/NPCs/SlimeGod/CorruptSlimeSpawn2.cs index e8df94c69d..b22feaf472 100644 --- a/NPCs/SlimeGod/CorruptSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CorruptSlimeSpawn2.cs @@ -26,11 +26,11 @@ namespace CalamityMod.NPCs.SlimeGod NPC.GetNPCDamage(); NPC.width = 40; NPC.height = 30; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.scale = 2f; NPC.defense = 4; - NPC.lifeMax = BossRushEvent.BossRushActive ? 5000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 180 : 90; + NPC.lifeMax = BossRushEvent.BossRushActive ? 5000 : CalamityWorld.LegendaryMode ? 180 : 90; NPC.knockBackResist = 0.9f; AnimationType = NPCID.CorruptSlime; NPC.lavaImmune = false; diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs index 4cb9744c71..3c21567a51 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn.cs @@ -25,11 +25,11 @@ namespace CalamityMod.NPCs.SlimeGod NPC.GetNPCDamage(); NPC.width = 40; NPC.height = 30; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.scale = 2f; NPC.defense = 4; - NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 220 : 110; + NPC.lifeMax = BossRushEvent.BossRushActive ? 10000 : CalamityWorld.LegendaryMode ? 220 : 110; NPC.knockBackResist = 0.8f; AnimationType = NPCID.CorruptSlime; NPC.lavaImmune = false; diff --git a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs index 9f321b1817..3223c1ea4a 100644 --- a/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs +++ b/NPCs/SlimeGod/CrimsonSlimeSpawn2.cs @@ -32,11 +32,11 @@ namespace CalamityMod.NPCs.SlimeGod NPC.GetNPCDamage(); NPC.width = 40; NPC.height = 30; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.scale = 2f; NPC.defense = 6; - NPC.lifeMax = BossRushEvent.BossRushActive ? 12000 : (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 260 : 130; + NPC.lifeMax = BossRushEvent.BossRushActive ? 12000 : CalamityWorld.LegendaryMode ? 260 : 130; NPC.knockBackResist = 0.7f; NPC.lavaImmune = false; NPC.noGravity = false; diff --git a/NPCs/SlimeGod/CrimulanPaladin.cs b/NPCs/SlimeGod/CrimulanPaladin.cs index 07b540a747..6909ef9f42 100644 --- a/NPCs/SlimeGod/CrimulanPaladin.cs +++ b/NPCs/SlimeGod/CrimulanPaladin.cs @@ -112,7 +112,7 @@ namespace CalamityMod.NPCs.SlimeGod addedStretch = -landingRecoil; // Used for teleporting - float scale = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.6f : Main.getGoodWorld ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; // How fast the slime slams down float slamVelocity = bossRush ? 20f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; @@ -155,7 +155,7 @@ namespace CalamityMod.NPCs.SlimeGod if (lifeRatio <= 0.5f && Main.netMode != NetmodeID.MultiplayerClient && expertMode) { // Spread of random globs in meme mode - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { int type = ModContent.ProjectileType(); for (int i = 0; i < 30; i++) diff --git a/NPCs/SlimeGod/EbonianPaladin.cs b/NPCs/SlimeGod/EbonianPaladin.cs index c366736034..6cd7be29a6 100644 --- a/NPCs/SlimeGod/EbonianPaladin.cs +++ b/NPCs/SlimeGod/EbonianPaladin.cs @@ -101,7 +101,7 @@ namespace CalamityMod.NPCs.SlimeGod setDamage += 22; } - float scale = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.6f : Main.getGoodWorld ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; NPC.aiAction = 0; // Get a target @@ -131,7 +131,7 @@ namespace CalamityMod.NPCs.SlimeGod if (lifeRatio <= 0.5f && Main.netMode != NetmodeID.MultiplayerClient && expertMode) { - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { int type = ModContent.ProjectileType(); for (int i = 0; i < 30; i++) @@ -319,7 +319,7 @@ namespace CalamityMod.NPCs.SlimeGod { if (Main.netMode != NetmodeID.MultiplayerClient) { - int numProjectiles = Main.getGoodWorld ? 12 : death ? 6 : 4; + int numProjectiles = CalamityWorld.LegendaryMode ? 12 : death ? 6 : 4; float projectileVelocity = death ? 8f : 6f; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); @@ -499,15 +499,15 @@ namespace CalamityMod.NPCs.SlimeGod // Charge variables float chargeVelocityMult = 0.1f; float maxChargeVelocity = (bossRush || enraged) ? 12f : death ? 10f : revenge ? 9f : expertMode ? 8f : 6f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxChargeVelocity *= 1.15f; - if (CalamityWorld.LegendaryMode && revenge) + if (CalamityWorld.LegendaryMode) maxChargeVelocity *= 2f; float inertia = (bossRush || enraged) ? 100f : death ? 110f : revenge ? 114f : expertMode ? 120f : 130f; if (lifeRatio < 0.75f) inertia *= 0.8f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) inertia *= 0.8f; // Start charge diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index b6fe65cfe7..42f3e8c2fa 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -101,7 +101,7 @@ namespace CalamityMod.NPCs.SlimeGod NPC.npcSlots = 10f; NPC.width = 96; NPC.height = 98; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) NPC.scale = 2f; NPC.defense = 6; @@ -548,7 +548,7 @@ namespace CalamityMod.NPCs.SlimeGod flySpeed *= 1.1f; if (bossRush) flySpeed *= 1.2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) flySpeed *= 1.3f; Vector2 flyDestination = aggressionLevel >= (int)AggressionLevel.ChargeAtPlayer ? player.Center : player.Center - Vector2.UnitY * 320f; @@ -590,9 +590,9 @@ namespace CalamityMod.NPCs.SlimeGod float maxInertiaDistance = 600f; float totalInertiaAdjustmentDistance = maxInertiaDistance - minInertiaDistance; float distanceFromInertiaAdjustmentCutoff = distanceFromFlyDestination - minInertiaDistance; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxInertia *= 0.8f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) maxInertia *= Main.rand.NextFloat(0.2f, 1f); float inertia = distanceFromFlyDestination >= maxInertiaDistance ? maxInertia : diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index dfd3f73e7d..b588ad49fd 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.SlimeGod addedStretch = -landingRecoil; // Used for teleporting - float scale = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.6f : Main.getGoodWorld ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; // How fast the slime slams down float slamVelocity = bossRush ? 22.25f : death ? 18.25f : revenge ? 16.5f : expertMode ? 15.5f : 13.5f; diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index bbbd3c5e50..16c55de137 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -123,7 +123,7 @@ namespace CalamityMod.NPCs.SlimeGod addedStretch = -landingRecoil; - float scale = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.6f : Main.getGoodWorld ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; // How fast the slime slams down float slamVelocity = bossRush ? 20f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; diff --git a/NPCs/StormWeaver/StormWeaverBody.cs b/NPCs/StormWeaver/StormWeaverBody.cs index 0519194931..4e7b558647 100644 --- a/NPCs/StormWeaver/StormWeaverBody.cs +++ b/NPCs/StormWeaver/StormWeaverBody.cs @@ -69,7 +69,7 @@ namespace CalamityMod.NPCs.StormWeaver else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.7f; NPC.Calamity().VulnerableToElectricity = false; diff --git a/NPCs/StormWeaver/StormWeaverHead.cs b/NPCs/StormWeaver/StormWeaverHead.cs index e2488b3a43..57ac9cf977 100644 --- a/NPCs/StormWeaver/StormWeaverHead.cs +++ b/NPCs/StormWeaver/StormWeaverHead.cs @@ -121,7 +121,7 @@ namespace CalamityMod.NPCs.StormWeaver else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.7f; NPC.Calamity().VulnerableToElectricity = false; @@ -193,7 +193,7 @@ namespace CalamityMod.NPCs.StormWeaver bool phase4 = lifeRatio < 0.3f; // Update armored settings to naked settings - if (phase2 && (!CalamityWorld.LegendaryMode || !revenge)) + if (phase2 && !CalamityWorld.LegendaryMode) { // Spawn armor gore, roar and set other crucial variables if (!NPC.chaseable) @@ -280,7 +280,7 @@ namespace CalamityMod.NPCs.StormWeaver } // Used for body and tail projectile firing timings in phase 1 - if (!phase2 || (CalamityWorld.LegendaryMode && revenge)) + if (!phase2 || CalamityWorld.LegendaryMode) NPC.localAI[0] += 1f; } @@ -621,7 +621,7 @@ namespace CalamityMod.NPCs.StormWeaver } } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.4f; acceleration *= 1.4f; @@ -847,7 +847,7 @@ namespace CalamityMod.NPCs.StormWeaver float lifeRatio = NPC.life / (float)NPC.lifeMax; - bool phase2 = lifeRatio < 0.8f && (!CalamityWorld.LegendaryMode || !revenge); + bool phase2 = lifeRatio < 0.8f && !CalamityWorld.LegendaryMode; bool phase3 = lifeRatio < 0.55f; // Gate value that decides when Storm Weaver will charge diff --git a/NPCs/StormWeaver/StormWeaverTail.cs b/NPCs/StormWeaver/StormWeaverTail.cs index 4fb551873c..5d16fee8aa 100644 --- a/NPCs/StormWeaver/StormWeaverTail.cs +++ b/NPCs/StormWeaver/StormWeaverTail.cs @@ -68,7 +68,7 @@ namespace CalamityMod.NPCs.StormWeaver else if (Main.expertMode) NPC.scale *= 1.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.scale *= 0.7f; NPC.Calamity().VulnerableToElectricity = false; diff --git a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs index ce3a029a3b..37ab41f7fa 100644 --- a/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs +++ b/NPCs/SupremeCalamitas/SoulSeekerSupreme.cs @@ -210,7 +210,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas GeneralParticleHandler.SpawnParticle(spark2); } - float distanceFromSCal = Main.getGoodWorld ? 300f : 225f; + float distanceFromSCal = CalamityWorld.LegendaryMode ? 300f : 225f; NPC.position = SCal.Center - MathHelper.ToRadians(RotationalDegreeOffset).ToRotationVector2() * distanceFromSCal - NPC.Size * 0.5f; NPC.velocity = Vector2.Zero; RotationalDegreeOffset += 0.5f; diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index 667b952204..bf55046af4 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -454,7 +454,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas bool teleport = false; // permafrost and zenith scal are mutually exclusive unless it's legendary - bool zenithAI = Main.zenithWorld && (!permafrost || (CalamityWorld.LegendaryMode && revenge && permafrost)); + bool zenithAI = Main.zenithWorld && (!permafrost || (CalamityWorld.LegendaryMode && permafrost)); // Percent life remaining float lifeRatio = NPC.life / (float)NPC.lifeMax; @@ -489,7 +489,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas int bodyHeight = 42; int baseBulletHellProjectileGateValue = revenge ? 8 : expertMode ? 9 : 10; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) baseBulletHellProjectileGateValue -= 2; Vector2 vectorCenter = NPC.Center; @@ -1970,9 +1970,9 @@ namespace CalamityMod.NPCs.SupremeCalamitas else { SoundEngine.PlaySound(SoundID.Item74, NPC.Center); - int totalSeekers = Main.getGoodWorld ? 20 : 10; + int totalSeekers = CalamityWorld.LegendaryMode ? 20 : 10; int degreesBetweenEachSeeker = 360 / totalSeekers; - int distanceFromSCal = Main.getGoodWorld ? 300 : 225; + int distanceFromSCal = CalamityWorld.LegendaryMode ? 300 : 225; for (int i = 0; i < totalSeekers; i++) { int FireEye = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(vectorCenter.X + (Math.Sin(i * degreesBetweenEachSeeker) * distanceFromSCal)), (int)(vectorCenter.Y + (Math.Cos(i * degreesBetweenEachSeeker) * distanceFromSCal)), ModContent.NPCType(), NPC.whoAmI, 0, 0, 0, -1); @@ -2182,7 +2182,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float velocity = 12f; float acceleration = 0.12f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -2296,7 +2296,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float chargeVelocity = (wormAlive ? 26f : 30f) + (1f - lifeRatio) * 8f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeVelocity *= 1.15f; if (!canDespawn) @@ -2398,7 +2398,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float velocity = 32f; float acceleration = 1.2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -2477,7 +2477,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float velocity = 32f; float acceleration = 1.2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -2748,7 +2748,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float velocity = 12f; float acceleration = 0.12f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -2857,7 +2857,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float chargeVelocity = (wormAlive ? 26f : 30f) + (1f - lifeRatio) * 8f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeVelocity *= 1.15f; if (!canDespawn) @@ -2931,7 +2931,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float velocity = 32f; float acceleration = 1.2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -3015,7 +3015,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas float velocity = 32f; float acceleration = 1.2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs index 7847c6a171..52081a7f87 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs @@ -107,7 +107,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Phase 2 if (npc.ai[0] < 0f) { - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.brainOfGravity = npc.whoAmI; // Spawn gore @@ -237,7 +237,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float velocityScale = death ? 6f : 4.5f; float velocityBoost = velocityScale * (1f - lifeRatio); float nonChargeSpeed = (death ? 24f : 18f) + velocityBoost + 3f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) nonChargeSpeed *= 1.15f; float minInertia = death ? 50f : 75f; @@ -291,7 +291,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Velocity npc.velocity = (Main.player[npc.target].Center + (death ? Main.player[npc.target].velocity * 20f * enrageScale : Vector2.Zero) - npc.Center).SafeNormalize(Vector2.UnitY) * chargeVelocity; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.velocity *= 1.15f; } } @@ -336,7 +336,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * (-chargeVelocity - 2f * enrageScale); if (death) npc.velocity *= 1.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.velocity *= 1.15f; } } @@ -728,7 +728,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float targetYDistPhase1 = Main.player[npc.target].Center.Y - brainCenterPhase1.Y; float targetDistancePhase1 = (float)Math.Sqrt(targetXDistPhase1 * targetXDistPhase1 + targetYDistPhase1 * targetYDistPhase1); float maxMoveVelocity = (death ? 4f : 1.5f) + velocityScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) maxMoveVelocity *= 2f; if (targetDistancePhase1 < maxMoveVelocity) @@ -997,7 +997,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 destination = Main.player[npc.target].Center + (death ? Main.player[npc.target].velocity * 20f : Vector2.Zero); Vector2 targetDirection = destination - npc.Center; targetDirection = targetDirection.SafeNormalize(Vector2.UnitY); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { targetDirection *= chargeVelocity + 6f; npc.velocity = (npc.velocity * 49f + targetDirection) / 50f; @@ -1052,7 +1052,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses public static int GetBrainOfCthuluCreepersCountRevDeath() { - return CalamityWorld.LegendaryMode ? 40 : Main.getGoodWorld ? 35 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 30 : 20; + return CalamityWorld.LegendaryMode ? 40 : CalamityWorld.LegendaryMode ? 35 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 30 : 20; } private static float GetCrimsonBossKnockBack(NPC npc, int numPlayers, float lifeScale, float baseKnockBackResist) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs index 4f716d58db..2550684678 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs @@ -83,7 +83,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses idleTime = 20; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { iceMistFireRate = 30; iceMistSpeed = 15f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 2a3aaf073a..cc7839314e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -195,7 +195,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Total segment variable - int totalSegments = Main.getGoodWorld ? 100 : 80; + int totalSegments = CalamityWorld.LegendaryMode ? 100 : 80; // Calculate aggression based on how many broken segments there are float brokenSegmentAggressionMultiplier = 1f; @@ -230,7 +230,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (oblivionAlive) { calamityGlobalNPC.newAI[3] = 0f; - totalSegments = Main.getGoodWorld ? 75 : 60; + totalSegments = CalamityWorld.LegendaryMode ? 75 : 60; spitLaserSpreads = false; noFlyZoneBoxHeight = 2000; } @@ -264,7 +264,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses speed *= brokenSegmentAggressionMultiplier; turnSpeed *= brokenSegmentAggressionMultiplier; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { segmentVelocity *= 1.2f; speed *= 1.2f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs index 05ba82522b..ea9ef2d04b 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs @@ -58,7 +58,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses idlePhaseVelocity = 10f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { idlePhaseAcceleration *= 1.15f; idlePhaseVelocity *= 1.15f; @@ -86,7 +86,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeVelocity *= 1.13f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeVelocity *= 1.15f; int bubbleBelchPhaseTimer = death ? 60 : 80; @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float bubbleBelchPhaseAcceleration = death ? 0.35f : 0.3f; float bubbleBelchPhaseVelocity = death ? 5.5f : 5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { bubbleBelchPhaseAcceleration *= 1.5f; bubbleBelchPhaseVelocity *= 1.5f; @@ -112,7 +112,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float bubbleSpinPhaseVelocity = 20f; float bubbleSpinPhaseRotation = MathHelper.TwoPi / (bubbleSpinPhaseTimer / 2); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) bubbleSpinBubbleVelocity *= 1.5f; int spawnEffectPhaseTimer = 75; @@ -192,7 +192,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeTime += Main.rand.Next(5, 66); // Spawn cthulhunadoes in phase 3 - if (phase3AI && ((!phase4 && !deathModeSurprise) || Main.getGoodWorld)) + if (phase3AI && ((!phase4 && !deathModeSurprise) || CalamityWorld.LegendaryMode)) { calamityGlobalNPC.newAI[0] += 1f; float timeGateValue = 600f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs index 50a819dfd8..392bbf42bc 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EaterOfWorldsAI.cs @@ -94,7 +94,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.localAI[1] -= 1f; int vileSpitGateValue = (int)MathHelper.Lerp(death ? 45f : 90f, 900f, lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) vileSpitGateValue = (int)(vileSpitGateValue * 0.5f); Vector2 vileSpitShootLocation = npc.Center + npc.velocity; @@ -414,7 +414,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses segmentAcceleration += (npc.justHit ? 0.16f : 0.04f); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { segmentVelocity += 4f; segmentAcceleration += 0.05f; @@ -451,7 +451,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int npcWidth = npc.width; npcWidth = (int)(npcWidth * npc.scale); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npcWidth = 62; targetDistance = (targetDistance - npcWidth) / targetDistance; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs index 96ddd8c381..7476547f4f 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EmpressofLightAI.cs @@ -73,7 +73,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool visible = true; bool takeDamage = true; float lessTimeSpentPerPhaseMultiplier = phase2 ? (death ? 0.375f : 0.5f) : (death ? 0.75f : 1f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) lessTimeSpentPerPhaseMultiplier *= 0.2f; float extraPhaseTime; @@ -151,7 +151,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.damage = 0; float idleTimer = phase2 ? (death ? 10f : 15f) : (death ? 20f : 30f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) idleTimer *= 0.5f; if (idleTimer < 10f) idleTimer = 10f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs index 81121e90df..71ffb3da2d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/EyeOfCthulhuAI.cs @@ -144,7 +144,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses hoverAcceleration += 0.15f * (1f - lifeRatio); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { hoverSpeed += 3f; hoverAcceleration += 0.08f; @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[3] += 1f; float servantSpawnGateValue = death ? 10f : 40f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) servantSpawnGateValue *= 0.8f; if (npc.ai[3] >= servantSpawnGateValue && shootProjectile) @@ -226,7 +226,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeSpeed += 5f * enrageScale; if (death) chargeSpeed += 10f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed += 4f; npc.velocity = npc.SafeDirectionTo(Main.player[npc.target].Center) * chargeSpeed; @@ -240,7 +240,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.damage = npc.defDamage; int chargeDelay = death ? (75 - (int)Math.Round(30f * (1f - lifeRatio))) : 95; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeDelay -= 30; float slowDownGateValue = chargeDelay * (death ? 0.85f : 0.65f); @@ -256,7 +256,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses decelerationScalar = 0f; npc.velocity *= (MathHelper.Lerp(death ? 0.76f : 0.92f, death ? 0.88f : 0.96f, decelerationScalar)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.velocity *= 0.99f; if (npc.velocity.X > -0.1 && npc.velocity.X < 0.1) @@ -307,7 +307,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Avoid cheap bullshit npc.damage = 0; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.reflectsProjectiles = true; if (npc.ai[0] == 1f) @@ -326,13 +326,13 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.rotation += npc.ai[2]; float phaseChangeRate = death ? 2f : 1f; - float servantSpawnGateValue = Main.getGoodWorld ? 4f : 20f; + float servantSpawnGateValue = CalamityWorld.LegendaryMode ? 4f : 20f; npc.ai[1] += phaseChangeRate; if (npc.ai[1] % servantSpawnGateValue == 0f) { float servantVelocity = death ? 11.3f : 5.65f; Vector2 servantSpawnVelocity = Main.rand.NextVector2CircularEdge(servantVelocity, servantVelocity); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) servantSpawnVelocity *= 3f; Vector2 servantSpawnCenter = npc.Center + servantSpawnVelocity.SafeNormalize(Vector2.UnitY) * ProjectileOffset; @@ -457,7 +457,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { hoverSpeed += 1f; hoverAcceleration += 0.1f; @@ -520,7 +520,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeSpeed *= 1.15f; if (npc.ai[3] == 2f) chargeSpeed *= 1.3f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed *= 1.2f; npc.velocity = npc.SafeDirectionTo(Main.player[npc.target].Center) * chargeSpeed; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs index b7bc32aaa0..d57056008a 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/GolemAI.cs @@ -63,12 +63,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (tile.WallType == WallID.LihzahrdBrickUnsafe) enrage = false; else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; } else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; - if (bossRush || Main.getGoodWorld) + if (bossRush || CalamityWorld.LegendaryMode) enrage = true; npc.Calamity().CurrentlyEnraged = !bossRush && (enrage || turboEnrage); @@ -98,7 +98,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int despawnDistance = turboEnrage ? 7500 : enrage ? 6000 : 4500; // Deactivate torches - if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld && npc.velocity.Y > 0f) + if (Main.netMode != NetmodeID.MultiplayerClient && CalamityWorld.LegendaryMode && npc.velocity.Y > 0f) { for (int j = (int)(npc.position.X / 16f); (float)j < (npc.position.X + (float)npc.width) / 16f; j++) { @@ -115,7 +115,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Spawn arm dust - if (!Main.getGoodWorld) + if (!CalamityWorld.LegendaryMode) { if (!leftFistAlive) { @@ -190,7 +190,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (enrage) divisor = 5f; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) divisor = 2f; Vector2 projectileFirePos = new Vector2(npc.Center.X, npc.Center.Y - 60f); @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { int bodyLaser = Projectile.NewProjectile(npc.GetSource_FromAI(), projectileFirePos + laserVelocity.SafeNormalize(Vector2.UnitY) * 40f, laserVelocity, type, damage, 0f, Main.myPlayer); Main.projectile[bodyLaser].timeLeft = enrage ? 720 : 360; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) Main.projectile[bodyLaser].extraUpdates += 1; } } @@ -231,7 +231,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (npc.ai[1] > 0f) { npc.ai[1] += (death ? 2f : 1f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.ai[1] += 100f; if (enrage || death) @@ -530,7 +530,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses destination.Normalize(); destination *= projectileVelocity; int totalFireballsPerSide = 3; - int totalIterations = (turboEnrage && Main.getGoodWorld) ? 11 : death ? 25 : 35; + int totalIterations = (turboEnrage && CalamityWorld.LegendaryMode) ? 11 : death ? 25 : 35; float rotation = MathHelper.ToRadians(90); for (int i = 0; i < totalIterations; i++) { @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 perturbedSpeed = destination.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(totalIterations - 1))); int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.UnitY * (npc.height / 2 * 0.8f) * npc.scale + Vector2.Normalize(perturbedSpeed) * (npc.width / 3) * npc.scale, perturbedSpeed, type, damage, 0f, Main.myPlayer); Main.projectile[proj].timeLeft = enrage ? 480 : 240; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) Main.projectile[proj].extraUpdates += 1; } } @@ -578,7 +578,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 projVelocity = laserVelocity.RotatedBy(radians * j + MathHelper.PiOver2); int bodyLaser = Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom, projVelocity, type, damage, 0f, Main.myPlayer); Main.projectile[bodyLaser].timeLeft = enrage ? 720 : 360; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) Main.projectile[bodyLaser].extraUpdates += 1; } } @@ -643,8 +643,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses void CustomGravity(bool isSlamming) { - float gravity = turboEnrage ? (Main.getGoodWorld ? 1.15f : 0.85f) : enrage ? 0.75f : (!leftFistAlive && !rightFistAlive) ? 0.45f : 0.3f; - float maxFallSpeed = reduceFallSpeed ? 12f : turboEnrage ? (Main.getGoodWorld ? 40f : 30f) : enrage ? 25f : (!leftFistAlive && !rightFistAlive) ? 15f : 10f; + float gravity = turboEnrage ? (CalamityWorld.LegendaryMode ? 1.15f : 0.85f) : enrage ? 0.75f : (!leftFistAlive && !rightFistAlive) ? 0.45f : 0.3f; + float maxFallSpeed = reduceFallSpeed ? 12f : turboEnrage ? (CalamityWorld.LegendaryMode ? 40f : 30f) : enrage ? 25f : (!leftFistAlive && !rightFistAlive) ? 15f : 10f; if (isSlamming && !reduceFallSpeed) { gravity *= 4f; @@ -715,15 +715,15 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (tile.WallType == WallID.LihzahrdBrickUnsafe) enrage = false; else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; } else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; - if (bossRush || Main.getGoodWorld) + if (bossRush || CalamityWorld.LegendaryMode) enrage = true; - float aggression = turboEnrage ? (Main.getGoodWorld ? 4f : 3f) : enrage ? 2f : death ? 1.7f : 1f; + float aggression = turboEnrage ? (CalamityWorld.LegendaryMode ? 4f : 3f) : enrage ? 2f : death ? 1.7f : 1f; Vector2 fistCenter = golem.Center + golem.velocity + new Vector2(0f, -9f * npc.scale); fistCenter.X += (float)((npc.type == NPCID.GolemFistLeft) ? -84 : 78) * npc.scale; @@ -805,7 +805,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Dust dust = Dust.NewDustPerfect(npc.Center + largeRandDustRecoil + largeRandDustRadius + smallRandDustRadius, 228, largeRandDustRecoil); dust.fadeIn = 1.5f; dust.scale = 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) dust.noLight = true; dust.noGravity = true; @@ -846,7 +846,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Set damage npc.damage = npc.defDamage; - if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld) + if (Main.netMode != NetmodeID.MultiplayerClient && CalamityWorld.LegendaryMode) { for (int j = (int)(npc.position.X / 16f) - 1; (float)j < (npc.position.X + (float)npc.width) / 16f + 1f; j++) { @@ -1042,12 +1042,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (tile.WallType == WallID.LihzahrdBrickUnsafe) enrage = false; else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; } else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; - if (bossRush || Main.getGoodWorld) + if (bossRush || CalamityWorld.LegendaryMode) enrage = true; // Alpha @@ -1188,7 +1188,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { int bodyLaser = Projectile.NewProjectile(npc.GetSource_FromAI(), projectileFirePos + laserVelocity.SafeNormalize(Vector2.UnitY) * 40f, laserVelocity, projType, dmg, 0f, Main.myPlayer); Main.projectile[bodyLaser].timeLeft = enrage ? 600 : 300; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) Main.projectile[bodyLaser].extraUpdates += 1; npc.netUpdate = true; @@ -1217,7 +1217,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { int extraLasers = Projectile.NewProjectile(npc.GetSource_FromAI(), projectileFirePos + laserVelocity.SafeNormalize(Vector2.UnitY) * 40f, laserVelocity, projType, dmg, 0f, Main.myPlayer); Main.projectile[extraLasers].timeLeft = enrage ? 600 : 300; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) Main.projectile[extraLasers].extraUpdates += 1; npc.netUpdate = true; @@ -1286,12 +1286,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (tile.WallType == WallID.LihzahrdBrickUnsafe) enrage = false; else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; } else - turboEnrage = bossRush || Main.getGoodWorld; + turboEnrage = bossRush || CalamityWorld.LegendaryMode; - if (bossRush || Main.getGoodWorld) + if (bossRush || CalamityWorld.LegendaryMode) enrage = true; if (turboEnrage) @@ -1522,12 +1522,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int damage = npc.GetProjectileDamage(type); int freeHeadLaser = Projectile.NewProjectile(npc.GetSource_FromAI(), freeHeadProjSpawn + laserVelocity.SafeNormalize(Vector2.UnitY) * 40f, laserVelocity, type, damage, 0f, Main.myPlayer); Main.projectile[freeHeadLaser].timeLeft = enrage ? 600 : 300; - if (turboEnrage && Main.getGoodWorld) + if (turboEnrage && CalamityWorld.LegendaryMode) Main.projectile[freeHeadLaser].extraUpdates += 1; } } - if (!Main.getGoodWorld) + if (!CalamityWorld.LegendaryMode) { npc.position += npc.netOffset; int randDustOffset = Main.rand.Next(2) * 2 - 1; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs index b3fa63a8d6..8d6bc39693 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs @@ -27,7 +27,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool teleported = false; npc.aiAction = 0; float teleportScaleSpeed = 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { teleportScaleSpeed -= 1f - lifeRatio; teleportScale *= teleportScaleSpeed; @@ -317,7 +317,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[0] += teleportRate; teleportScale = MathHelper.Clamp((60f - npc.ai[0]) / 60f, 0f, 1f); teleportScale = 0.5f + teleportScale * 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) teleportScale *= teleportScaleSpeed; if (npc.ai[0] >= 60f) @@ -399,7 +399,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[0] += teleportRate; teleportScale = MathHelper.Clamp(npc.ai[0] / 30f, 0f, 1f); teleportScale = 0.5f + teleportScale * 0.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) teleportScale *= teleportScaleSpeed; if (npc.ai[0] >= 30f && Main.netMode != NetmodeID.MultiplayerClient) @@ -516,7 +516,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float jumpVelocityLimit = redCrystalAlive ? 3f : 4.5f; if (death) jumpVelocityLimit += 3f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) jumpVelocityLimit = 8f; if ((npc.direction == 1 && npc.velocity.X < jumpVelocityLimit) || (npc.direction == -1 && npc.velocity.X > -jumpVelocityLimit)) @@ -554,12 +554,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses return false; // Adjust size based on HP - float maxScale = death ? (Main.getGoodWorld ? 6f : 2.5f) : (Main.getGoodWorld ? 3f : 1.5f); + float maxScale = death ? (CalamityWorld.LegendaryMode ? 6f : 2.5f) : (CalamityWorld.LegendaryMode ? 3f : 1.5f); float minScale = death ? 0.5f : 0.75f; float maxScaledValue = maxScale - minScale; // Inversed scale in FTW - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) lifeRatio = (maxScaledValue - lifeRatio * maxScaledValue) + minScale; else lifeRatio = lifeRatio * maxScaledValue + minScale; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs index 15a895165c..7b5a439579 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/MoonLordAI.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (bossRush) aggressionLevel = 5; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) aggressionLevel = 6; if (npc.type == NPCID.MoonLordCore) @@ -811,7 +811,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (npc.localAI[1] < 0f) { npc.localAI[1] = 0f; - if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld && Main.remixWorld) + if (Main.netMode != NetmodeID.MultiplayerClient && CalamityWorld.LegendaryMode && Main.remixWorld) { for (int k = 0; k < 30; k++) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs index d6af968e23..58c09def7a 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/PlanteraAI.cs @@ -173,7 +173,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -649,7 +649,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (enrage) npc.localAI[1] += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.localAI[1] += 1f; float shootProjectileGateValue = death ? 30f : 60f; @@ -729,7 +729,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { npc.localAI[0] = 2f; int totalTentacles = death ? 12 : 8; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) totalTentacles += 6; if (CalamityWorld.LegendaryMode) totalTentacles *= 2; @@ -737,7 +737,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses for (int i = 0; i < totalTentacles; i++) NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PlanterasTentacle, npc.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { foreach (NPC n in Main.ActiveNPCs) { @@ -1095,7 +1095,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float hookMoveDistance = (float)Math.Sqrt(hookMoveX * hookMoveX + hookMoveY * hookMoveY); if (hookMoveDistance < 12f + velocity) { - if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld && npc.localAI[3] == 1f) + if (Main.netMode != NetmodeID.MultiplayerClient && CalamityWorld.LegendaryMode && npc.localAI[3] == 1f) { npc.localAI[3] = 0f; WorldGen.SpawnPlanteraThorns(npc.Center); @@ -1106,7 +1106,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } else { - if (Main.netMode != NetmodeID.MultiplayerClient && Main.getGoodWorld) + if (Main.netMode != NetmodeID.MultiplayerClient && CalamityWorld.LegendaryMode) npc.localAI[3] = 1f; hookMoveDistance = velocity / hookMoveDistance; @@ -1140,7 +1140,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { if (Main.rand.NextBool(5)) npc.reflectsProjectiles = true; @@ -1218,7 +1218,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses deceleration *= 0.75f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) tentacleAcceleration += 4f; // Fast retraction diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs index 6815bf8ea1..380f498762 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs @@ -47,8 +47,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses enrageScale += 0.5f; } - if (Main.getGoodWorld) - enrageScale += ((CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 1f : 0.5f); + if (CalamityWorld.LegendaryMode) + enrageScale += (CalamityWorld.LegendaryMode ? 1f : 0.5f); if (bossRush) enrageScale = 2f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs index 347925e93e..c46b92bfc1 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenSlimeAI.cs @@ -328,7 +328,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (death) { int numGelProjectiles = 12; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) numGelProjectiles = 15; float gelVelocity = death ? 20f : 16f; @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses break; float jumpVelocity = bossRush ? 9f : death ? 7f : 4.5f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) jumpVelocity = 12f; if ((npc.direction == 1 && npc.velocity.X < jumpVelocity) || (npc.direction == -1 && npc.velocity.X > 0f - jumpVelocity)) @@ -512,7 +512,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (phase2) slamDelay = 10; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) slamDelay = 0; if (npc.velocity.Y == 0f) @@ -626,7 +626,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.velocity.Y += bossRush ? 2f : death ? 1.75f : 1.5f; float slamVelocity = bossRush ? 15.99f : death ? 15.5f : 15f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { npc.velocity.Y += 1f; slamVelocity = 15.99f; @@ -732,7 +732,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses int numGelProjectiles = phase4 ? Main.rand.Next(9, 12) : phase2 ? Main.rand.Next(6, 9) : 12; if (phase5) numGelProjectiles += 6; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) numGelProjectiles = 20; float projectileVelocity = death ? 12f : 10.5f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs index fb166011a6..ede2fc2457 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs @@ -155,39 +155,39 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Hand variables bool handsDead = numHandsAlive == 0; - int numProj = Main.getGoodWorld ? 22 : death ? 5 : 3; - float spread = Main.getGoodWorld ? 180 : 60; + int numProj = CalamityWorld.LegendaryMode ? 22 : death ? 5 : 3; + float spread = CalamityWorld.LegendaryMode ? 180 : 60; float headSpinVelocityMult = bossRush ? (phase3 ? 18f : 9f) : (phase3 ? 12f : 4.5f); switch (numHandsAlive) { case 0: - numProj = Main.getGoodWorld ? 36 : death ? 9 : 7; - spread = Main.getGoodWorld ? 180 : death ? 90 : 82; + numProj = CalamityWorld.LegendaryMode ? 36 : death ? 9 : 7; + spread = CalamityWorld.LegendaryMode ? 180 : death ? 90 : 82; headSpinVelocityMult = bossRush ? (phase3 ? 18f : 12f) : (phase3 ? 12f : 6f); break; case 1: - numProj = Main.getGoodWorld ? 27 : death ? 7 : 5; - spread = Main.getGoodWorld ? 150 : death ? 76 : 68; + numProj = CalamityWorld.LegendaryMode ? 27 : death ? 7 : 5; + spread = CalamityWorld.LegendaryMode ? 150 : death ? 76 : 68; headSpinVelocityMult = bossRush ? (phase3 ? 15f : 10f) : (phase3 ? 11.5f : 5f); break; case 2: - numProj = Main.getGoodWorld ? 18 : death ? 6 : 4; - spread = Main.getGoodWorld ? 140 : death ? 70 : 62; + numProj = CalamityWorld.LegendaryMode ? 18 : death ? 6 : 4; + spread = CalamityWorld.LegendaryMode ? 140 : death ? 70 : 62; headSpinVelocityMult = bossRush ? (phase3 ? 13.5f : 9f) : (phase3 ? 11f : 4.5f); break; case 3: - numProj = Main.getGoodWorld ? 15 : death ? 5 : 3; - spread = Main.getGoodWorld ? 130 : death ? 64 : 56; + numProj = CalamityWorld.LegendaryMode ? 15 : death ? 5 : 3; + spread = CalamityWorld.LegendaryMode ? 130 : death ? 64 : 56; headSpinVelocityMult = bossRush ? (phase3 ? 12f : 8f) : (phase3 ? 10.5f : 4f); break; case 4: - numProj = Main.getGoodWorld ? 12 : death ? 4 : 3; - spread = Main.getGoodWorld ? 120 : 56; + numProj = CalamityWorld.LegendaryMode ? 12 : death ? 4 : 3; + spread = CalamityWorld.LegendaryMode ? 120 : 56; headSpinVelocityMult = bossRush ? (phase3 ? 10f : 7f) : (phase3 ? 10f : 3.5f); break; } @@ -367,7 +367,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if ((handsDead || death) && npc.ai[1] == 0f && !phase4) { float skullProjFrequency = bossRush ? 15f : phase2 ? (48f - (death ? 17.5f * (1f - lifeRatio) : 0f)) : 60f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) skullProjFrequency *= 0.8f; skullProjFrequency = (float)Math.Ceiling(skullProjFrequency); @@ -444,11 +444,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - float headYAcceleration = (Main.getGoodWorld ? 0.07f : death ? (0.06f + 0.04f * (1f - lifeRatio)) : 0.04f); + float headYAcceleration = (CalamityWorld.LegendaryMode ? 0.07f : death ? (0.06f + 0.04f * (1f - lifeRatio)) : 0.04f); float headYTopSpeed = headYAcceleration * 100f; - float headXAcceleration = (Main.getGoodWorld ? 0.21f : death ? (0.16f + 0.08f * (1f - lifeRatio)) : 0.08f); + float headXAcceleration = (CalamityWorld.LegendaryMode ? 0.21f : death ? (0.16f + 0.08f * (1f - lifeRatio)) : 0.08f); float headXTopSpeed = headXAcceleration * 100f; - float deceleration = Main.getGoodWorld ? 0.83f : death ? 0.86f : 0.89f; + float deceleration = CalamityWorld.LegendaryMode ? 0.83f : death ? 0.86f : 0.89f; if (bossRush) { @@ -545,7 +545,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Set damage npc.damage = npc.defDamage; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { npc.reflectsProjectiles = true; if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == 0f) @@ -646,7 +646,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float dashPhaseTime = death ? 210f : 300f; if (npc.ai[2] >= dashPhaseTime) { - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { if (Main.netMode != NetmodeID.MultiplayerClient && NPC.CountNPCS(NPCID.DarkCaster) < 6) { @@ -737,7 +737,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses headSpinVelocityMult *= baseDistanceVelocityMult; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) headSpinVelocityMult *= 1.3f; headSpinTargetDist = headSpinVelocityMult / headSpinTargetDist; @@ -902,7 +902,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float velocityMultiplier = MathHelper.Lerp(death ? 0.6f : 0.7f, 1f, skeletronLifeRatio); float velocityIncrement = MathHelper.Lerp(0.2f, death ? 0.4f : 0.3f, 1f - skeletronLifeRatio); float handSwipeVelocity = MathHelper.Lerp(16f, death ? 24f : 20f, 1f - skeletronLifeRatio); - float deceleration = Main.getGoodWorld ? 0.78f : death ? 0.82f : 0.86f; + float deceleration = CalamityWorld.LegendaryMode ? 0.78f : death ? 0.82f : 0.86f; if (death) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index 10f0500657..079c869044 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -170,7 +170,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses acceleration += phase1MaxAccelerationIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -224,7 +224,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (!Main.player[npc.target].dead) { npc.ai[3] += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.ai[3] += 0.5f; } @@ -269,7 +269,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeSpeed += 10f * enrageScale; if (death) chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed += 2f; npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitX * direction) * chargeSpeed; @@ -468,7 +468,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses maxVelocity += 4.5f * enrageScale; acceleration += 0.075f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -556,7 +556,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses maxVelocity += 4.5f * enrageScale; acceleration += 0.15f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -629,7 +629,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeSpeed += 10f * enrageScale; if (!spazAlive) chargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed += 2f; npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; @@ -750,7 +750,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeAcceleration *= 0.75f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { chargeSpeed *= 1.15f; chargeAcceleration *= 1.15f; @@ -934,7 +934,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses acceleration += phase1MaxAccelerationIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -979,7 +979,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (!Main.player[npc.target].dead) { npc.ai[3] += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) npc.ai[3] += 0.4f; } @@ -1025,7 +1025,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeSpeed += 8f * enrageScale; if (death) chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed *= 1.2f; npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitX * direction) * chargeSpeed; @@ -1236,7 +1236,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (distanceFromDestination > distanceFromTarget) maxVelocity += MathHelper.Lerp(0f, oblivionAlive ? 3f : death ? 8f : 6f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { maxVelocity *= 1.15f; acceleration *= 1.15f; @@ -1343,7 +1343,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float chargeSpeed = 18f + (death ? 5f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); chargeSpeed += 16f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed *= 1.2f; npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitX * direction) * chargeSpeed; @@ -1427,7 +1427,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses spazmatismPhase3ChargeSpeed += 10f * enrageScale; if (npc.ai[2] == -1f || (!retAlive && npc.ai[3] == secondFastCharge)) spazmatismPhase3ChargeSpeed *= 1.3f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) spazmatismPhase3ChargeSpeed *= 1.2f; Vector2 distanceVector = Main.player[npc.target].Center + (!retAlive && bossRush ? Main.player[npc.target].velocity * 20f : Vector2.Zero) - npc.Center; @@ -1551,7 +1551,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses chargeAcceleration *= 0.75f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { chargeSpeed *= 1.15f; chargeAcceleration *= 1.15f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs index 38aea8f081..e94a7788b1 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/WallOfFleshAI.cs @@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool phase2 = lifeRatio < 0.66f; bool phase3 = lifeRatio < 0.33f; - if (Main.getGoodWorld && Main.netMode != NetmodeID.MultiplayerClient && Main.rand.NextBool(180)) + if (CalamityWorld.LegendaryMode && Main.netMode != NetmodeID.MultiplayerClient && Main.rand.NextBool(180)) { if (NPC.CountNPCS(NPCID.FireImp) < 4) { @@ -327,7 +327,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (death) velocityX *= 1.2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= 1.1f; velocityX += 0.1f; diff --git a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs index 9b9ac80d81..97af54642c 100644 --- a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs +++ b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs @@ -4167,7 +4167,7 @@ PrepareToShoot: if (Main.netMode != NetmodeID.MultiplayerClient && !targetDead) { - if (Main.getGoodWorld && npc.type == NPCID.EaterofSouls) + if (CalamityWorld.LegendaryMode && npc.type == NPCID.EaterofSouls) { if (NPC.AnyNPCs(NPCID.EaterofWorldsHead)) { @@ -5433,7 +5433,7 @@ PrepareToShoot: } else { - if (Main.getGoodWorld && npc.type == NPCID.FireImp) + if (CalamityWorld.LegendaryMode && npc.type == NPCID.FireImp) { if (NPC.AnyNPCs(NPCID.WallofFlesh)) { @@ -6792,7 +6792,7 @@ PrepareToShoot: // If FTW is enabled, can fire 8 to 13 sand balls (random chance for 10x the amount) int projAmt = 1; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { projAmt = Main.rand.Next(8, 14); if (Main.rand.NextBool(1000) || Main.zenithWorld) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 12220297eb..2d02ef43ab 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -369,12 +369,12 @@ namespace CalamityMod.NPCs.Yharon enraged = false; if (Main.netMode != NetmodeID.MultiplayerClient) { - safeBox.X = (int)(player.Center.X - (Main.zenithWorld ? 1500f : Main.getGoodWorld ? 1000f : bossRush ? 2000f : revenge ? 3000f : 3500f)); + safeBox.X = (int)(player.Center.X - (Main.zenithWorld ? 1500f : CalamityWorld.LegendaryMode ? 1000f : bossRush ? 2000f : revenge ? 3000f : 3500f)); safeBox.Y = (int)Main.topWorld; - safeBox.Width = Main.zenithWorld ? 3000 : Main.getGoodWorld ? 2000 : bossRush ? 4000 : revenge ? 6000 : 7000; + safeBox.Width = Main.zenithWorld ? 3000 : CalamityWorld.LegendaryMode ? 2000 : bossRush ? 4000 : revenge ? 6000 : 7000; safeBox.Height = Main.maxTilesY * 16; - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X + (Main.zenithWorld ? 1500f : Main.getGoodWorld ? 1000f : bossRush ? 2000f : revenge ? 3000f : 3500f), player.Center.Y + 100f, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); - Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X - (Main.zenithWorld ? 1500f : Main.getGoodWorld ? 1000f : bossRush ? 2000f : revenge ? 3000f : 3500f), player.Center.Y + 100f, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X + (Main.zenithWorld ? 1500f : CalamityWorld.LegendaryMode ? 1000f : bossRush ? 2000f : revenge ? 3000f : 3500f), player.Center.Y + 100f, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X - (Main.zenithWorld ? 1500f : CalamityWorld.LegendaryMode ? 1000f : bossRush ? 2000f : revenge ? 3000f : 3500f), player.Center.Y + 100f, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer); } // Force Yharon to send a sync packet so that the arena gets sent immediately @@ -396,7 +396,7 @@ namespace CalamityMod.NPCs.Yharon protectionBoost = false; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) phaseSwitchTimer /= 2; // Set DR based on protection boost (aka enrage) @@ -1815,7 +1815,7 @@ namespace CalamityMod.NPCs.Yharon chargeSpeed *= velocityMult; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) phaseSwitchTimer *= 0.5f; if (NPC.ai[0] == 0f) @@ -2024,12 +2024,6 @@ namespace CalamityMod.NPCs.Yharon if (Main.netMode != NetmodeID.MultiplayerClient) { - if (CalamityWorld.LegendaryMode && revenge) - { - if (!NPC.AnyNPCs(ModContent.NPCType())) - NPC.SpawnOnPlayer(NPC.FindClosestPlayer(), ModContent.NPCType()); - } - float bulletHellTeleportLocationDistance = 540f; Vector2 teleportLocation = -Vector2.UnitY * bulletHellTeleportLocationDistance * (targetData.velocity.Y >= 0f).ToDirectionInt(); Vector2 center = targetData.Center + teleportLocation; diff --git a/Projectiles/Boss/ApolloChargeTelegraph.cs b/Projectiles/Boss/ApolloChargeTelegraph.cs index b038018e4c..3da901c212 100644 --- a/Projectiles/Boss/ApolloChargeTelegraph.cs +++ b/Projectiles/Boss/ApolloChargeTelegraph.cs @@ -43,7 +43,7 @@ namespace CalamityMod.Projectiles.Boss bool expertMode = Main.expertMode || bossRush; Projectile.timeLeft = bossRush ? 45 : death ? 60 : revenge ? 68 : expertMode ? 75 : 90; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.timeLeft /= 2; } @@ -85,7 +85,7 @@ namespace CalamityMod.Projectiles.Boss // Determine opacity float telegraphTotalTime = bossRush ? 45f : death ? 60f : revenge ? 68f : expertMode ? 75f : 90f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) telegraphTotalTime *= 0.5f; Projectile.Opacity = Utils.GetLerpValue(0f, 6f, Projectile.timeLeft, true) * Utils.GetLerpValue(telegraphTotalTime, telegraphTotalTime - 6f, Projectile.timeLeft, true); diff --git a/Projectiles/Boss/AresGaussNukeProjectile.cs b/Projectiles/Boss/AresGaussNukeProjectile.cs index e657cca25b..1881f84842 100644 --- a/Projectiles/Boss/AresGaussNukeProjectile.cs +++ b/Projectiles/Boss/AresGaussNukeProjectile.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Boss CooldownSlot = ImmunityCooldownID.Bosses; Projectile.timeLeft = timeLeft; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/ArtemisLaser.cs b/Projectiles/Boss/ArtemisLaser.cs index 454670d01a..a0220bfd95 100644 --- a/Projectiles/Boss/ArtemisLaser.cs +++ b/Projectiles/Boss/ArtemisLaser.cs @@ -106,7 +106,7 @@ namespace CalamityMod.Projectiles.Boss // 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.extraUpdates = Main.getGoodWorld ? 4 : 3; + Projectile.extraUpdates = CalamityWorld.LegendaryMode ? 4 : 3; Projectile.velocity = Velocity * (BossRushEvent.BossRushActive ? 1.25f : 1f); Velocity = Vector2.Zero; Projectile.netUpdate = true; diff --git a/Projectiles/Boss/AstralFlame.cs b/Projectiles/Boss/AstralFlame.cs index 99629bc81a..1d1de9d9f3 100644 --- a/Projectiles/Boss/AstralFlame.cs +++ b/Projectiles/Boss/AstralFlame.cs @@ -33,7 +33,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = 1; Projectile.timeLeft = 600; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/BrimstoneRay.cs b/Projectiles/Boss/BrimstoneRay.cs index 860895fc39..c5955b1f99 100644 --- a/Projectiles/Boss/BrimstoneRay.cs +++ b/Projectiles/Boss/BrimstoneRay.cs @@ -136,7 +136,7 @@ namespace CalamityMod.Projectiles.Boss Vector2 projVelocity = Projectile.velocity.RotatedBy(radians * j + MathHelper.PiOver2); int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), fireFrom, projVelocity, type, damage, 0f, Main.myPlayer, death ? 2f : 1f, 0f, projectileVelocityToPass); Main.projectile[proj].tileCollide = true; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Main.projectile[proj].extraUpdates += 1; } fireFrom += velocity * distanceBetweenProjectiles; diff --git a/Projectiles/Boss/DarkEnergyBall.cs b/Projectiles/Boss/DarkEnergyBall.cs index ad7fa65911..498edb8a4e 100644 --- a/Projectiles/Boss/DarkEnergyBall.cs +++ b/Projectiles/Boss/DarkEnergyBall.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = -1; Projectile.Opacity = 0f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/DarkEnergyBall2.cs b/Projectiles/Boss/DarkEnergyBall2.cs index 17076168fc..53e95b4bfe 100644 --- a/Projectiles/Boss/DarkEnergyBall2.cs +++ b/Projectiles/Boss/DarkEnergyBall2.cs @@ -32,7 +32,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = -1; Projectile.Opacity = 0f; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/DesertScourgeSpit.cs b/Projectiles/Boss/DesertScourgeSpit.cs index 15b83a8c5d..8f1271c812 100644 --- a/Projectiles/Boss/DesertScourgeSpit.cs +++ b/Projectiles/Boss/DesertScourgeSpit.cs @@ -25,12 +25,12 @@ namespace CalamityMod.Projectiles.Boss { Projectile.width = 16; Projectile.height = 16; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.scale = 2f; Projectile.hostile = true; Projectile.tileCollide = false; Projectile.penetrate = 1; - Projectile.timeLeft = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 900 : 600; + Projectile.timeLeft = CalamityWorld.LegendaryMode ? 900 : 600; Projectile.aiStyle = ProjAIStyleID.Arrow; Projectile.alpha = 255; } diff --git a/Projectiles/Boss/DoGBeam.cs b/Projectiles/Boss/DoGBeam.cs index 6be31c977f..7336ec46f6 100644 --- a/Projectiles/Boss/DoGBeam.cs +++ b/Projectiles/Boss/DoGBeam.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.penetrate = 1; Projectile.timeLeft = 960; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/Flarenado.cs b/Projectiles/Boss/Flarenado.cs index e8e1ce6b58..18c38a055e 100644 --- a/Projectiles/Boss/Flarenado.cs +++ b/Projectiles/Boss/Flarenado.cs @@ -129,7 +129,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.velocity.X = Main.rand.NextBool() ? -tornadoSpeed : tornadoSpeed; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.velocity.X *= 1.5f; } diff --git a/Projectiles/Boss/GreatSandBlast.cs b/Projectiles/Boss/GreatSandBlast.cs index b7fa0c573f..cbceb613d7 100644 --- a/Projectiles/Boss/GreatSandBlast.cs +++ b/Projectiles/Boss/GreatSandBlast.cs @@ -22,12 +22,12 @@ namespace CalamityMod.Projectiles.Boss { Projectile.width = 10; Projectile.height = 10; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.scale = 2f; Projectile.hostile = true; Projectile.tileCollide = false; Projectile.penetrate = 1; - Projectile.timeLeft = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 900 : 600; + Projectile.timeLeft = CalamityWorld.LegendaryMode ? 900 : 600; Projectile.aiStyle = ProjAIStyleID.Arrow; Projectile.alpha = 255; } diff --git a/Projectiles/Boss/HolyBlast.cs b/Projectiles/Boss/HolyBlast.cs index 4b2b1d3666..6023f80dfa 100644 --- a/Projectiles/Boss/HolyBlast.cs +++ b/Projectiles/Boss/HolyBlast.cs @@ -158,7 +158,7 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.owner == Main.myPlayer) { int totalProjectiles = !ProvUtils.StandardAI() ? 8 : 6; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) totalProjectiles *= 2; float radians = MathHelper.TwoPi / totalProjectiles; diff --git a/Projectiles/Boss/HolyBurnOrb.cs b/Projectiles/Boss/HolyBurnOrb.cs index 64c20b7f63..4874585c60 100644 --- a/Projectiles/Boss/HolyBurnOrb.cs +++ b/Projectiles/Boss/HolyBurnOrb.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.timeLeft = 160; } - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { if (Projectile.velocity.Length() < 12f && Projectile.ai[1] == 0f) { diff --git a/Projectiles/Boss/HolyFire.cs b/Projectiles/Boss/HolyFire.cs index 3385962d35..8cc4b52c1c 100644 --- a/Projectiles/Boss/HolyFire.cs +++ b/Projectiles/Boss/HolyFire.cs @@ -93,12 +93,12 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.owner == Main.myPlayer) { Vector2 velocity = new Vector2(0.01f, 0f); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) velocity *= Main.rand.NextFloat(1f, 2f); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) velocity *= Main.rand.NextFloat(1f, 2f); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f); @@ -109,12 +109,12 @@ namespace CalamityMod.Projectiles.Boss if (Projectile.owner == Main.myPlayer) { Vector2 velocity = new Vector2(0.05f, 0f); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) velocity *= Main.rand.NextFloat(1f, 2f); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) velocity *= Main.rand.NextFloat(1f, 2f); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, -velocity, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack, Projectile.owner, 1f); diff --git a/Projectiles/Boss/Infernado.cs b/Projectiles/Boss/Infernado.cs index 691c909e79..dbfda46530 100644 --- a/Projectiles/Boss/Infernado.cs +++ b/Projectiles/Boss/Infernado.cs @@ -131,7 +131,7 @@ namespace CalamityMod.Projectiles.Boss { Projectile.velocity.X = Main.rand.NextBool() ? -tornadoSpeed : tornadoSpeed; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) Projectile.velocity.X *= 1.5f; } diff --git a/Projectiles/Boss/MoltenBlast.cs b/Projectiles/Boss/MoltenBlast.cs index 457affed38..664acc90b4 100644 --- a/Projectiles/Boss/MoltenBlast.cs +++ b/Projectiles/Boss/MoltenBlast.cs @@ -153,7 +153,7 @@ namespace CalamityMod.Projectiles.Boss for (int b = 0; b < blobAmt; b++) { Vector2 velocity = CalamityUtils.RandomVelocity(100f, 70f, 100f) + additionalBlobVelocity; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) velocity *= 2f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), (int)Math.Round(Projectile.damage * 0.75), 0f, Projectile.owner); diff --git a/Projectiles/Boss/PhantomMine.cs b/Projectiles/Boss/PhantomMine.cs index fcadc0e03b..98d97725c7 100644 --- a/Projectiles/Boss/PhantomMine.cs +++ b/Projectiles/Boss/PhantomMine.cs @@ -39,7 +39,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.velocity *= Projectile.ai[0]; } - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + if (CalamityWorld.LegendaryMode) { if (Projectile.velocity.Length() >= Projectile.ai[0]) { diff --git a/Projectiles/Boss/ShadeNimbusHostile.cs b/Projectiles/Boss/ShadeNimbusHostile.cs index a4e68db418..cc42d08de0 100644 --- a/Projectiles/Boss/ShadeNimbusHostile.cs +++ b/Projectiles/Boss/ShadeNimbusHostile.cs @@ -50,7 +50,7 @@ namespace CalamityMod.Projectiles.Boss else { Projectile.ai[0] += 1f; - if (Projectile.ai[0] >= (Main.getGoodWorld ? 10f : 36f)) + if (Projectile.ai[0] >= (CalamityWorld.LegendaryMode ? 10f : 36f)) { Projectile.ai[0] = 0f; int rainSpawnX = (int)(Projectile.position.X + 14f + (float)Main.rand.Next(Projectile.width - 28)); diff --git a/Projectiles/Boss/THanosSideLaser.cs b/Projectiles/Boss/THanosSideLaser.cs index 89b47ae15d..7ee16eee49 100644 --- a/Projectiles/Boss/THanosSideLaser.cs +++ b/Projectiles/Boss/THanosSideLaser.cs @@ -94,7 +94,7 @@ namespace CalamityMod.Projectiles.Boss // 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.extraUpdates = Main.getGoodWorld ? 4 : 3; + Projectile.extraUpdates = CalamityWorld.LegendaryMode ? 4 : 3; Projectile.velocity = Velocity * (BossRushEvent.BossRushActive ? 1.25f : 1f); Velocity = Vector2.Zero; Projectile.netUpdate = true; diff --git a/Projectiles/Boss/ThanatosBeamStart.cs b/Projectiles/Boss/ThanatosBeamStart.cs index 1169549444..b0ae9f8529 100644 --- a/Projectiles/Boss/ThanatosBeamStart.cs +++ b/Projectiles/Boss/ThanatosBeamStart.cs @@ -137,7 +137,7 @@ namespace CalamityMod.Projectiles.Boss } // Periodically fire beams along the laser perpendicular to its direction. - float laserFireRate = (CalamityWorld.LegendaryMode && revenge) ? 60f : expertMode ? 80f : 160f; + float laserFireRate = (CalamityWorld.LegendaryMode) ? 60f : expertMode ? 80f : 160f; if (Main.npc[OwnerIndex].Calamity().newAI[2] % laserFireRate == 0f) { // Play a laser sound to go with the beams. @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Boss float radians = MathHelper.TwoPi / totalProjectiles; for (int j = 0; j < totalProjectiles; j++) { - Vector2 projVelocity = (CalamityWorld.LegendaryMode && revenge) ? new Vector2(Main.rand.Next(-12, 12), Main.rand.Next(-12, 12)) : Projectile.velocity.RotatedBy(radians * j + MathHelper.PiOver2) * 12f; + Vector2 projVelocity = (CalamityWorld.LegendaryMode) ? new Vector2(Main.rand.Next(-12, 12), Main.rand.Next(-12, 12)) : Projectile.velocity.RotatedBy(radians * j + MathHelper.PiOver2) * 12f; Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserFirePosition, projVelocity, type, damage, 0f, Main.myPlayer, 0f, -1f); } laserFirePosition += beamDirection * distanceBetweenProjectiles; diff --git a/Projectiles/Boss/ThanatosLaser.cs b/Projectiles/Boss/ThanatosLaser.cs index 75739ff077..46d82f7611 100644 --- a/Projectiles/Boss/ThanatosLaser.cs +++ b/Projectiles/Boss/ThanatosLaser.cs @@ -98,7 +98,7 @@ namespace CalamityMod.Projectiles.Boss // 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.extraUpdates = Main.getGoodWorld ? 4 : 3; + Projectile.extraUpdates = CalamityWorld.LegendaryMode ? 4 : 3; Projectile.velocity = Velocity * (BossRushEvent.BossRushActive ? 1.25f : 1f); Velocity = Vector2.Zero; Projectile.netUpdate = true; @@ -161,7 +161,7 @@ namespace CalamityMod.Projectiles.Boss // 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.extraUpdates = Main.getGoodWorld ? 4 : 3; + Projectile.extraUpdates = CalamityWorld.LegendaryMode ? 4 : 3; Projectile.velocity = Velocity * (BossRushEvent.BossRushActive ? 1.25f : 1f); Velocity = Vector2.Zero; Projectile.netUpdate = true; diff --git a/Projectiles/Boss/UnstableCrimulanGlob.cs b/Projectiles/Boss/UnstableCrimulanGlob.cs index 71ac79c0a2..ae55efbd51 100644 --- a/Projectiles/Boss/UnstableCrimulanGlob.cs +++ b/Projectiles/Boss/UnstableCrimulanGlob.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.tileCollide = false; Projectile.timeLeft = BossRushEvent.BossRushActive ? 640 : CalamityWorld.death ? 490 : CalamityWorld.revenge ? 440 : Main.expertMode ? 390 : 240; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/UnstableEbonianGlob.cs b/Projectiles/Boss/UnstableEbonianGlob.cs index 89b77b7a77..48e4bc7d82 100644 --- a/Projectiles/Boss/UnstableEbonianGlob.cs +++ b/Projectiles/Boss/UnstableEbonianGlob.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.tileCollide = false; Projectile.timeLeft = BossRushEvent.BossRushActive ? 780 : CalamityWorld.death ? 600 : CalamityWorld.revenge ? 540 : Main.expertMode ? 480 : 300; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.extraUpdates = 1; } diff --git a/Projectiles/Boss/YharonBulletHellVortex.cs b/Projectiles/Boss/YharonBulletHellVortex.cs index 4fde90ccdf..8497db0b18 100644 --- a/Projectiles/Boss/YharonBulletHellVortex.cs +++ b/Projectiles/Boss/YharonBulletHellVortex.cs @@ -62,7 +62,7 @@ namespace CalamityMod.Projectiles.Boss Projectile.hostile = true; Projectile.width = Projectile.height = (int)(408f * Projectile.scale); float inertia = 5f; - float speed = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 10.7f : 5.35f; + float speed = CalamityWorld.LegendaryMode ? 10.7f : 5.35f; float minDist = 160f; if (victim >= 0 && Main.player[victim].active && !Main.player[victim].dead) { @@ -79,7 +79,7 @@ namespace CalamityMod.Projectiles.Boss } // Fly away from other vortices - float pushForce = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 0.1f : 0.05f; + float pushForce = CalamityWorld.LegendaryMode ? 0.1f : 0.05f; for (int k = 0; k < Main.maxProjectiles; k++) { Projectile otherProj = Main.projectile[k]; diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index da046e41d1..62d606b23f 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2677,7 +2677,7 @@ namespace CalamityMod.Projectiles Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 0.3f; Main.dust[dust].velocity += projectile.velocity * 0.1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Main.dust[dust].noLight = true; } @@ -2727,7 +2727,7 @@ namespace CalamityMod.Projectiles Main.dust[dust].noGravity = true; Main.dust[dust].position = dustPosition; Main.dust[dust].velocity = dustVelocity; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Main.dust[dust].noLight = true; } @@ -4824,7 +4824,7 @@ namespace CalamityMod.Projectiles projectile.position = vector76; projectile.width = projectile.height = 22; - if (Main.getGoodWorld && !Main.remixWorld) + if (CalamityWorld.LegendaryMode && !Main.remixWorld) { int num1011 = 4; Vector2 center3 = projectile.position; diff --git a/Scenes/MusicScenes/AquaticScourgeMusicScene.cs b/Scenes/MusicScenes/AquaticScourgeMusicScene.cs index c9689876c6..70fb82de7f 100644 --- a/Scenes/MusicScenes/AquaticScourgeMusicScene.cs +++ b/Scenes/MusicScenes/AquaticScourgeMusicScene.cs @@ -1,6 +1,7 @@ using CalamityMod.Events; using CalamityMod.NPCs; using CalamityMod.NPCs.AquaticScourge; +using CalamityMod.World; using Terraria; using Terraria.ID; using Terraria.ModLoader; @@ -20,7 +21,7 @@ namespace CalamityMod.Systems { if (CalamityGlobalNPC.aquaticScourge == -1) return false; - return Main.npc[CalamityGlobalNPC.aquaticScourge].justHit || Main.npc[CalamityGlobalNPC.aquaticScourge].life <= Main.npc[CalamityGlobalNPC.aquaticScourge].lifeMax * 0.999 || BossRushEvent.BossRushActive || Main.getGoodWorld; + return Main.npc[CalamityGlobalNPC.aquaticScourge].justHit || Main.npc[CalamityGlobalNPC.aquaticScourge].life <= Main.npc[CalamityGlobalNPC.aquaticScourge].lifeMax * 0.999 || BossRushEvent.BossRushActive || CalamityWorld.LegendaryMode; } } } diff --git a/UI/VanillaBossBars/CeaselessVoidBossBar.cs b/UI/VanillaBossBars/CeaselessVoidBossBar.cs index 29fb7c446c..55c3541beb 100644 --- a/UI/VanillaBossBars/CeaselessVoidBossBar.cs +++ b/UI/VanillaBossBars/CeaselessVoidBossBar.cs @@ -40,7 +40,7 @@ namespace CalamityMod.UI.VanillaBossBars // Determine the shield health // Amount of Dark Energies expected from each phase/difficulty - int ExpectedBallsCounter = ((lifePercent <= 0.1f ? 3 : lifePercent <= 0.4f ? 2 : lifePercent <= 0.7f ? 1 : 0) + (CalamityWorld.death ? 6 : CalamityWorld.revenge ? 5 : Main.expertMode ? 4 : 3)) * (Main.getGoodWorld ? 6 : 3) + 2; + int ExpectedBallsCounter = ((lifePercent <= 0.1f ? 3 : lifePercent <= 0.4f ? 2 : lifePercent <= 0.7f ? 1 : 0) + (CalamityWorld.death ? 6 : CalamityWorld.revenge ? 5 : Main.expertMode ? 4 : 3)) * (CalamityWorld.LegendaryMode ? 6 : 3) + 2; // The Dark Energies will instantly all die at a certain point of their total max health float RatioToCombust = 0.2f; if (NPC.AnyNPCs(NPCType())) From 3b7f72a288058efd344d2fcb3484af8de99b7fac Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 2 Jun 2025 20:51:52 -0700 Subject: [PATCH 04/72] Better balanced Orderbringer Also improved it's custom rarity and gave it the iri exc legacy name --- Items/CalamityGlobalItemTooltip.cs | 76 +++++++++++++++++------ Items/Weapons/Melee/Orderbringer.cs | 9 ++- Projectiles/Melee/OrderbringerBeam.cs | 4 +- Projectiles/Melee/OrderbringerWaveProj.cs | 15 ++--- Projectiles/Melee/StarofOrder.cs | 15 +++-- 5 files changed, 75 insertions(+), 44 deletions(-) diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index db7cb600a7..7d0e330974 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -291,24 +291,6 @@ namespace CalamityMod.Items { if (item.type == ModContent.ItemType() || item.type == ModContent.ItemType()) nameLine.OverrideColor = new Color(Main.DiscoR, Main.DiscoG, Main.DiscoB); - if (item.type == ModContent.ItemType()) - { - float rate = Main.GlobalTimeWrappedHourly * 15; - List eColors = new List() - { - Color.PaleVioletRed, - Color.Coral, - Color.Khaki, - Color.PaleGreen, - Color.Turquoise, - Color.Violet - }; - - int colorIndex = (int)(rate / 2 % eColors.Count); - Color currentColor = eColors[colorIndex]; - Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; - nameLine.OverrideColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); - } // Developer items if (item.type == ModContent.ItemType()) @@ -1677,6 +1659,64 @@ namespace CalamityMod.Items return false; } + + if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType()) + { + Color rarityColor = Color.White; + Vector2 basePosition = new Vector2(line.X, line.Y); + + float rate = Main.GlobalTimeWrappedHourly * 29; + List eColors = new List() + { + Color.PaleVioletRed, + Color.Coral, + Color.Khaki, + Color.PaleGreen, + Color.Turquoise, + Color.Violet + }; + + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + + + float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * 3 / MathHelper.Pi); + sine = (float)Math.Pow(MathHelper.Lerp(sine, 0, 0.35f), 5); + Vector2 backScale = line.BaseScale; + Color backColor = usedColor; + Vector2 shake = Main.rand.NextVector2Circular(15, 15) * sine; + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); + + int draws = 20; + for (int i = 0; i < draws; i++) + { + shake = Main.rand.NextVector2Circular(15, 15) * sine; + Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (5 + 0.5f * sine); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake * 4 + backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread); + } + Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + + Vector2 drawPosition = basePosition; + Color drawColor = backColor; + Vector2 rotationPoint = texture.Size() * 0.5f; + for (int i = 0; i < 6; i++) + { + int length = line.Text.Length; + Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 10 + Vector2.UnitX * (i % 2 == 0 ? -7 * i : 7 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(1 - 0.05f * i * (1 + 0.2f * -sine), 1 + 0.75f * i * (1 + 0.2f * sine) * 1f) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None); + } + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); + + // Draw the front text as usual. + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, shake + basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread); + + return false; + } return true; } #endregion diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index bf2bd4daed..505652d794 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using CalamityMod.Dusts; using CalamityMod.Items.Materials; using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; @@ -18,6 +17,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { [LegacyName("GreatswordofBlah")] + [LegacyName("IridescentExcalibur")] public class Orderbringer : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; @@ -34,9 +34,9 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { Item.width = Item.height = 112; - Item.damage = 755; + Item.damage = 840; Item.DamageType = DamageClass.Melee; - Item.useAnimation = Item.useTime = 18; + Item.useAnimation = Item.useTime = 16; Item.useStyle = ItemUseStyleID.Swing; Item.useTurn = true; Item.knockBack = 8f; @@ -77,7 +77,6 @@ namespace CalamityMod.Items.Weapons.Melee playSound = true; int dir = -Math.Sign(player.Center.X - player.Calamity().mouseWorld.X); float startRot = MathHelper.ToRadians(-90) * dir * (swingCount % 2 == 0 ? 1 : -1); - //player.itemRotation = player.Center.DirectionTo(player.Calamity().mouseWorld).ToRotation() + startRot; } public override void MeleeEffects(Player player, Rectangle hitbox) { @@ -143,7 +142,7 @@ namespace CalamityMod.Items.Weapons.Melee } public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { - int beamDamage = player.CalcIntDamage(Item.damage * 0.5f); + int beamDamage = player.CalcIntDamage(Item.damage * 0.4f); Vector2 mouseClamped = player.ClampedMouseWorld(); SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f)}, player.Center); for (int i = 0; i < 2; i++) diff --git a/Projectiles/Melee/OrderbringerBeam.cs b/Projectiles/Melee/OrderbringerBeam.cs index 1a7eafdc0d..2fc3736a21 100644 --- a/Projectiles/Melee/OrderbringerBeam.cs +++ b/Projectiles/Melee/OrderbringerBeam.cs @@ -1,9 +1,7 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Terraria; -using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; diff --git a/Projectiles/Melee/OrderbringerWaveProj.cs b/Projectiles/Melee/OrderbringerWaveProj.cs index 477ed7fbbe..c75a37a4ae 100644 --- a/Projectiles/Melee/OrderbringerWaveProj.cs +++ b/Projectiles/Melee/OrderbringerWaveProj.cs @@ -1,16 +1,11 @@ using System; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using CalamityMod.Particles; -using Terraria.ModLoader; -using CalamityMod.Projectiles.Ranged; -using Microsoft.Xna.Framework.Graphics; -using System.ComponentModel; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; -using Microsoft.Build.ObjectModelRemoting; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { diff --git a/Projectiles/Melee/StarofOrder.cs b/Projectiles/Melee/StarofOrder.cs index da986a53c7..958b843c75 100644 --- a/Projectiles/Melee/StarofOrder.cs +++ b/Projectiles/Melee/StarofOrder.cs @@ -1,13 +1,12 @@ -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using CalamityMod.Particles; -using Terraria.ModLoader; -using Microsoft.Xna.Framework.Graphics; -using System; +using System; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { From 42162baeb732b9a1776cdc965178bdf1c6aad845 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 3 Jun 2025 00:37:44 -0400 Subject: [PATCH 05/72] Princess sells Prismatic Lacewing --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 37104cfa0b..330a259a1a 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -1251,6 +1251,7 @@ namespace CalamityMod.NPCs musicMod.TryFind("DevourerofGodsEulogyMusicBox", out ModItem eulogyBox); shop.AddWithCustomValue(ItemID.PrincessWeapon, Item.buyPrice(gold: 50), Condition.Hardmode) + .AddWithCustomValue(ItemID.EmpressButterfly, Item.buyPrice(gold: 15), Condition.InHallow) .Add(ItemType()) .AddWithCustomValue(interlude1Box.Type, Item.buyPrice(gold: 10), CalamityConditions.DownedCalamitasClone) .AddWithCustomValue(interlude2Box.Type, Item.buyPrice(gold: 10), Condition.DownedMoonLord) From 46339f2fc173c090d97669f690a35bed2c50d661 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 01:15:00 -0700 Subject: [PATCH 06/72] Updated GoJ Is now more Orderbringer-like --- Items/Weapons/Melee/GreatswordofJudgement.cs | 151 ++++++++++++------ Items/Weapons/Melee/Orderbringer.cs | 4 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 6 +- Projectiles/Melee/JudgementProj.cs | 16 +- Projectiles/Melee/StarofJudgement.cs | 27 ++-- 5 files changed, 136 insertions(+), 68 deletions(-) diff --git a/Items/Weapons/Melee/GreatswordofJudgement.cs b/Items/Weapons/Melee/GreatswordofJudgement.cs index 19486833cb..5b0b5fb1a8 100644 --- a/Items/Weapons/Melee/GreatswordofJudgement.cs +++ b/Items/Weapons/Melee/GreatswordofJudgement.cs @@ -1,85 +1,144 @@ -using CalamityMod.Dusts; +using System; +using CalamityMod.Items.Materials; using CalamityMod.Particles; using CalamityMod.Projectiles.Melee; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using Terraria; using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Melee { public class GreatswordofJudgement : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Weapons.Melee"; - private float swingRoatation = 0; - private int time = 0; - private Color mainColor; - private int swordDirection; - private int useTime = 20; - private int opacityAdjust = 0; - private float smearOpacity = 0; + public int time = 0; + public Vector2 bladeHitboxPos; + public float bladeRotation = 0; + public int bladeDirection = 0; + public float completion = 0; + public bool canHit => (completion >= 0.35f && completion <= 0.8f); + public int swingCount = 0; + public bool spawnProj = true; + public bool playSound = true; + + public Color clr = Color.MediumOrchid; + public override void SetDefaults() { Item.width = 78; Item.height = 78; - Item.damage = 155; + Item.damage = 240; Item.DamageType = DamageClass.Melee; Item.useStyle = ItemUseStyleID.Swing; - Item.useAnimation = Item.useTime = useTime; + Item.useAnimation = Item.useTime = 20; Item.useTurn = true; Item.knockBack = 7f; - Item.UseSound = SoundID.Item60; Item.autoReuse = true; Item.value = CalamityGlobalItem.RarityPurpleBuyPrice; Item.rare = ItemRarityID.Purple; Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 5f; + Item.shootSpeed = 5.5f; + } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + return false; } public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) { - float scale = 1.1f; + // Basically just insures the enemy is always able to be hit if they're in range, the actual collision check is done in CanHitNPC + float scale = 8f; Vector2 newSize = new Point(hitbox.Width, hitbox.Height).ToVector2() * scale; - hitbox = new Rectangle(hitbox.X - (int)((newSize.X - hitbox.Width) / 2f), hitbox.Y - (int)((newSize.Y - hitbox.Height) / 2f), (int)newSize.X, (int)newSize.Y); + hitbox = new Rectangle((int)(bladeHitboxPos.X - newSize.X / 2f), (int)(bladeHitboxPos.Y - newSize.Y / 2f), (int)newSize.X, (int)newSize.Y); + } + public override bool? CanHitNPC(Player player, NPC target) + { + Vector2 mPos = player.Calamity().mouseWorld; + Vector2 shootDir = player.Center.DirectionTo(mPos); + float _ = float.NaN; + bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30, player.Center + shootDir * 145, Item.width * 3f, ref _); + return ((canHit && hitCheck) ? null : false); } public override void UseAnimation(Player player) { - swordDirection = player.direction; + swingCount++; time = 0; - swingRoatation = 0; - mainColor = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; - opacityAdjust = 0; - smearOpacity = 0; + bladeDirection = player.direction; + bladeHitboxPos = player.Center; + bladeRotation = 0; + spawnProj = true; + playSound = true; + int dir = -Math.Sign(player.Center.X - player.Calamity().mouseWorld.X); + float startRot = MathHelper.ToRadians(-90) * dir * (swingCount % 2 == 0 ? 1 : -1); + + clr = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; } public override void MeleeEffects(Player player, Rectangle hitbox) { - opacityAdjust++; - if (opacityAdjust >= 5 && opacityAdjust <= 15 && smearOpacity < 0.9f) - smearOpacity += 0.1f; - else if (smearOpacity > 0) - smearOpacity -= 0.2f; + Vector2 mPos = player.Calamity().mouseWorld; + completion = (float)((float)time / ((float)(Item.useAnimation / player.GetAttackSpeed(DamageClass.Melee)))); + int dir = -Math.Sign(player.Center.X - mPos.X); + + float startRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? 1 : -1); + float endRot = MathHelper.ToRadians(-110) * dir * (swingCount % 2 == 0 ? -1 : 1); + float minRot = MathHelper.ToRadians(-150) * dir * (swingCount % 2 == 0 ? 1 : -1); + float cutoff = 0.2f; + float cutoff2 = 0.95f; + + Vector2 shootDir = player.Center.DirectionTo(mPos) * Item.shootSpeed; + + if (completion <= cutoff) + { + float lerp = Utils.GetLerpValue(0, cutoff, completion, true); + player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(startRot, minRot, CalamityUtils.EaseInOutExp(lerp, 4f, 4f)); + player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir; + } + else + { + if (playSound) + { + SoundStyle swing = new("CalamityMod/Sounds/Item/SwooshMid"); + SoundEngine.PlaySound(swing with { Pitch = Main.rand.NextFloat(0.1f, 0.3f), Volume = 1f }, player.Center); + playSound = false; + } + if (completion >= 0.65f && spawnProj) + { + Projectile.NewProjectile(player.GetSource_FromThis(), player.Center, shootDir, Item.shoot, Item.damage, Item.knockBack, player.whoAmI, 0f); + + Particle swipe = new CustomSpark(player.Center - shootDir * 5, shootDir.RotatedBy(0.4f * (dir * (swingCount % 2 == 0 ? 1 : -1))) * 2.5f, "CalamityMod/Particles/VerticalSmearLarge", false, (int)(14 / player.GetAttackSpeed(DamageClass.Melee)), 0.6f, clr, new Vector2(1f, 1f), true, false, 0, false, false); + GeneralParticleHandler.SpawnParticle(swipe); + + SoundEngine.PlaySound(SoundID.Item60, player.Center); + spawnProj = false; + } + float lerp = Utils.GetLerpValue(cutoff, cutoff2, completion, true); + player.itemRotation = player.Center.DirectionTo(mPos).ToRotation() + MathHelper.Lerp(minRot, endRot, CalamityUtils.EaseInOutExp(lerp, 6f, 2f)); + player.itemRotation += (MathHelper.Pi) * (dir == 1 ? 0 : 1) + MathHelper.PiOver4 * dir; + } + + float extraRot = (dir == 1 ? -MathHelper.PiOver4 : MathHelper.ToRadians(225)); + bladeHitboxPos = player.Center + (player.itemRotation + extraRot).ToRotationVector2() * 180; + + player.SetCompositeArmFront(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); + player.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, player.itemRotation + MathHelper.ToRadians(-130) * dir); + + player.itemLocation = player.Center; + player.direction = dir; time++; - swingRoatation += swordDirection == 1 ? 0.13f : -0.13f; - - float Rot = (swordDirection == -1 ? 1.8f : -1.8f) + swingRoatation; - if (swordDirection != player.direction) + } + public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) + { + int beamDamage = player.CalcIntDamage(Item.damage * 0.4f); + Vector2 mouseClamped = player.ClampedMouseWorld(); + SoundEngine.PlaySound(SoundID.Item84 with { Volume = 1f, Pitch = Main.rand.NextFloat(0.5f, 0.7f) }, player.Center); + for (int i = 0; i < 2; i++) { - swingRoatation *= -1; - swordDirection = player.direction; - } - Particle Smear = new SemiCircularSmearFade(player.Center, Vector2.Zero, mainColor * smearOpacity, Rot, Main.rand.NextFloat(1.95f, 2.2f), new Vector2(1, 1), 2, true, false, true, player.direction); - GeneralParticleHandler.SpawnParticle(Smear); - - if (Main.rand.NextBool(3)) - { - Vector2 dustVel = new Vector2(5 * swordDirection, -5).RotatedByRandom(1.55f) * Main.rand.NextFloat(0.7f, 1.3f); - Dust dust = Dust.NewDustPerfect(player.Center + dustVel * 9, 278); - dust.scale = Main.rand.NextFloat(0.4f, 0.55f); - dust.velocity = dustVel * 0.55f; - dust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; - dust.noGravity = true; + Vector2 vel = player.Center.DirectionFrom(target.Center).RotatedByRandom(0.7f) * Main.rand.NextFloat(18, 20); + Projectile.NewProjectile(player.GetSource_ItemUse(Item), player.Center, vel, ModContent.ProjectileType(), beamDamage, 0, player.whoAmI, 0, (i == 0 ? -1 : 1), 1); } } public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) @@ -90,6 +149,8 @@ namespace CalamityMod.Items.Weapons.Melee { CreateRecipe(). AddIngredient(ItemID.LunarBar, 7). + AddIngredient(). + AddIngredient(5). AddTile(TileID.LunarCraftingStation). Register(); } diff --git a/Items/Weapons/Melee/Orderbringer.cs b/Items/Weapons/Melee/Orderbringer.cs index 505652d794..2a05c47c20 100644 --- a/Items/Weapons/Melee/Orderbringer.cs +++ b/Items/Weapons/Melee/Orderbringer.cs @@ -25,7 +25,6 @@ namespace CalamityMod.Items.Weapons.Melee public Vector2 bladeHitboxPos; public float bladeRotation = 0; public int bladeDirection = 0; - public float bladeFX = 0; public float completion = 0; public bool canHit => (completion >= 0.35f && completion <= 0.8f); public int swingCount = 0; @@ -62,7 +61,7 @@ namespace CalamityMod.Items.Weapons.Melee Vector2 mPos = player.Calamity().mouseWorld; Vector2 shootDir = player.Center.DirectionTo(mPos); float _ = float.NaN; - bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center, player.Center + shootDir * 245, Item.width * 3f, ref _); + bool hitCheck = Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), player.Center - shootDir * 30, player.Center + shootDir * 245, Item.width * 3f, ref _); return ((canHit && hitCheck) ? null : false); } public override void UseAnimation(Player player) @@ -72,7 +71,6 @@ namespace CalamityMod.Items.Weapons.Melee bladeDirection = player.direction; bladeHitboxPos = player.Center; bladeRotation = 0; - bladeFX = 0; spawnProj = true; playSound = true; int dir = -Math.Sign(player.Center.X - player.Calamity().mouseWorld.X); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index 31ed7e73a1..f51d72f7fb 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -695,7 +695,11 @@ GrandGuardian: { GreatswordofJudgement: { DisplayName: Greatsword of Judgement - Tooltip: Fires a piercing energy wave that releases homing stars as it flies + Tooltip: + ''' +Fires a piercing energy wave that releases homing stars as it flies +Hits with the blade summon two stronger stars from behind you + ''' } Greentide: { diff --git a/Projectiles/Melee/JudgementProj.cs b/Projectiles/Melee/JudgementProj.cs index 583ad48e1e..9065cf775f 100644 --- a/Projectiles/Melee/JudgementProj.cs +++ b/Projectiles/Melee/JudgementProj.cs @@ -1,4 +1,5 @@ using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -26,7 +27,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.tileCollide = false; Projectile.timeLeft = 450; Projectile.DamageType = DamageClass.Melee; - Projectile.extraUpdates = 9; + Projectile.extraUpdates = 14; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; } @@ -49,10 +50,10 @@ namespace CalamityMod.Projectiles.Melee Projectile.scale += 0.0026f; hitboxSize += 0.4525f; Projectile.velocity *= 0.995f; - // Spawn 3 - if (time % 50 == 0 && time > 10) + // Spawn 2 + if (time % 85 == 0 && time > 10) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 0.8f, hitboxSize * 0.8f) - Projectile.velocity * 2, (-Projectile.velocity * 3).RotatedByRandom(0.9f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.2f), 3f, Projectile.owner, 0f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center + Main.rand.NextVector2Circular(hitboxSize * 0.8f, hitboxSize * 0.8f) - Projectile.velocity * 2, (-Projectile.velocity * 3).RotatedByRandom(0.9f), ModContent.ProjectileType(), (int)(Projectile.damage * 0.35f), 3f, Projectile.owner, 0f); } } else @@ -80,7 +81,7 @@ namespace CalamityMod.Projectiles.Melee if (Main.rand.NextBool(3)) { - Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize, hitboxSize) - Projectile.velocity * 2, 66); + Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(hitboxSize, hitboxSize) - Projectile.velocity * 2, ModContent.DustType()); trailDust.scale = Main.rand.NextFloat(0.7f, 0.85f) - (time < 150 ? 0 : time * 0.001f); trailDust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.85f, 1.5f); trailDust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; @@ -102,11 +103,10 @@ namespace CalamityMod.Projectiles.Melee { Texture2D tex = ModContent.Request(Texture).Value; float waveFade = Utils.GetLerpValue(0, 300, Projectile.timeLeft); - Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition, null, mainColor with { A = 0 } * fadeOut, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (0.2f * waveFade), 1 + (0.45f * waveFade)) * Projectile.scale, SpriteEffects.None, 0); + for (int i = 0; i < 5; i++) + Main.spriteBatch.Draw(tex, Projectile.Center - Main.screenPosition + (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 9 * i, null, mainColor with { A = 0 } * fadeOut * 0.6f, Projectile.rotation, tex.Size() / 2f, new Vector2(1 - (0.2f * waveFade) + 0.01f * i, 1 + (0.45f * waveFade) - 0.06f * i) * Projectile.scale, SpriteEffects.None, 0); return false; } - - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 180); public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Projectile.numHits > 0) diff --git a/Projectiles/Melee/StarofJudgement.cs b/Projectiles/Melee/StarofJudgement.cs index c272f3cc2c..fb825f10b1 100644 --- a/Projectiles/Melee/StarofJudgement.cs +++ b/Projectiles/Melee/StarofJudgement.cs @@ -7,6 +7,7 @@ using Terraria.ModLoader; using Microsoft.Xna.Framework.Graphics; using System; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Dusts; namespace CalamityMod.Projectiles.Melee { @@ -44,27 +45,33 @@ namespace CalamityMod.Projectiles.Melee Projectile.scale = (Projectile.ai[2] == 1 ? 0.75f : 0.5f); if (Projectile.ai[2] == 1) { - Projectile.localNPCHitCooldown = 7; - Projectile.penetrate = 4; + Projectile.localNPCHitCooldown = -1; + Projectile.penetrate = 1; + Projectile.extraUpdates = 1; } } Projectile.rotation += (Projectile.velocity.X + MathF.Abs(Projectile.velocity.Y) * Projectile.direction) * 0.01f; if (Projectile.ai[2] == 1) { - CalamityUtils.HomeInOnNPC(Projectile, true, 900f, 25, MathHelper.Clamp(30 - time, 15, 30)); - if (Main.rand.NextBool(4) && Projectile.numHits < 1) + if (time > 18) { - Particle spark = new GlowOrbParticle(Projectile.Center + Main.rand.NextVector2Circular(7, 7) - Projectile.velocity, -Projectile.velocity * Main.rand.NextFloat(0.5f, 0.8f), false, 13, 1f, mainColor * 0.5f); + CalamityUtils.HomeInOnNPC(Projectile, true, 900f, 25, MathHelper.Clamp(30 - time, 15, 30)); + } + else + Projectile.velocity = Projectile.velocity.RotatedBy(0.085f * Projectile.ai[1]); + if (time % 2 == 0) + { + Particle spark = new CustomSpark(Projectile.Center, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 13, 0.35f, mainColor * 0.75f, new Vector2(0.8f, 1.35f), true, false, shrinkSpeed: 0.3f); GeneralParticleHandler.SpawnParticle(spark); } } - else if (time > 15) + if (Projectile.ai[2] != 1 && time > 10) { CalamityUtils.HomeInOnNPC(Projectile, true, 700f * (Projectile.numHits > 1 ? 2 : 1), 20, 20f * (Projectile.numHits > 1 ? 5 : 1)); if (Main.rand.NextBool(3)) { - Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(5, 5) - Projectile.velocity, 66); + Dust trailDust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(5, 5) - Projectile.velocity, ModContent.DustType()); trailDust.scale = Main.rand.NextFloat(0.7f, 0.85f); trailDust.velocity = -Projectile.velocity * Main.rand.NextFloat(0.3f, 0.5f); trailDust.color = Main.rand.NextBool() ? Color.MediumPurple : Color.MediumOrchid; @@ -84,6 +91,7 @@ namespace CalamityMod.Projectiles.Melee Vector2 rotationPoint = texture.Size() * 0.5f; CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], drawColor * 0.5f, 1, texture, true, true); Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, SpriteEffects.None); + Main.EntitySpriteDraw(texture, drawPosition, null, Color.White with { A = 0 }, drawRotation, rotationPoint, Projectile.scale * 0.8f, SpriteEffects.None); return false; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) @@ -91,14 +99,11 @@ namespace CalamityMod.Projectiles.Melee if (!target.CanBeChasedBy()) Projectile.penetrate++; - int buffType = ModContent.BuffType(); - target.AddBuff(buffType, 60); - if (Projectile.ai[2] == 0) { Projectile.timeLeft = 180; time = 0; - Projectile.velocity *= 1.2f; + Projectile.velocity *= 1.1f; } } public override void OnKill(int timeLeft) From d74790a8184781069529fc6b20c4328cbd93bcee Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 01:22:37 -0700 Subject: [PATCH 07/72] Fixed Void Vortex MP bug --- Projectiles/Magic/VoidVortexProj.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Projectiles/Magic/VoidVortexProj.cs b/Projectiles/Magic/VoidVortexProj.cs index c0a5cfbf3f..314b58ac56 100644 --- a/Projectiles/Magic/VoidVortexProj.cs +++ b/Projectiles/Magic/VoidVortexProj.cs @@ -145,9 +145,12 @@ namespace CalamityMod.Projectiles.Magic Projectile.ExpandHitboxBy(400); Projectile.Damage(); - for (int k = 0; k < 12; k++) + if (Main.myPlayer == Projectile.owner) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), Projectile.damage / 6, 0f, Main.myPlayer, 0f, 0f, 3f); + for (int k = 0; k < 12; k++) + { + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, new Vector2(10, 10).RotatedByRandom(100) * Main.rand.NextFloat(0.4f, 0.55f), ModContent.ProjectileType(), Projectile.damage / 6, 0f, Main.myPlayer, 0f, 0f, 3f); + } } for (int k = 0; k < 40; k++) { From 2834b0bc3462b58222c91d793709b19d2f418e50 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 01:50:38 -0700 Subject: [PATCH 08/72] Small Vitriolic Viper fix --- Projectiles/Magic/VitriolicViperSpit.cs | 2 +- Sounds/Item/ViperSpit.ogg | Bin 29278 -> 26419 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/VitriolicViperSpit.cs b/Projectiles/Magic/VitriolicViperSpit.cs index 3dbd357902..441f6044a2 100644 --- a/Projectiles/Magic/VitriolicViperSpit.cs +++ b/Projectiles/Magic/VitriolicViperSpit.cs @@ -49,7 +49,7 @@ namespace CalamityMod.Projectiles.Magic } if (time > 3) - Projectile.Center += offset * direction; + Projectile.Center += offset * direction * Utils.GetLerpValue(3, 10, time, true); if (time > 3 && targetDist < 1400) { diff --git a/Sounds/Item/ViperSpit.ogg b/Sounds/Item/ViperSpit.ogg index b7fb928fa1c480cd7783377cdda1e74527d7f0c8..2be1d386cd0f6a594edcf3383e860c10a30d3738 100644 GIT binary patch delta 25214 zcmZ^K1yof**XX&IRvPIRk?!tN5RecQl>LjK>6A<92Y{7{9L)=pNOYOgKn?5s_+ z96$PFvGQ_r3vu()F>9EcxtUr!SkgUqaJPQ#=wNT|;L37K0EYIjIa~QFm_Hhr(}_tR zgpV7jZh|ZO5}Q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VhO4R{(n6{ls8USCKcWh1VmpY zZbaseMPL;3CQ&FQ!YSvyaj%t?ZQI$J(lW_%V=GD?d=wkQr@AT-93A_1QjL+A+$#>+ zPAf%c+5N~{?7h~*u-tgbYdFV6O~+}ivX=c<3?yes--o7cvd<51MocG^GRSp)b$KF_ z{7O_G;`*rJoRQmgrMutZADP$N>hbakWI_&xJoU_4pjiuyz3;6nZ)t?XbE`n9&um9t zIjij6VcMFTE6x5~j>_6Tb{X%NZqXlQ#$TP{+^&$v3|gTwmxoD Date: Tue, 3 Jun 2025 01:51:16 -0700 Subject: [PATCH 09/72] Dragon's Breath barrel miss protection --- Projectiles/Ranged/DragonsBreathFlames.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Projectiles/Ranged/DragonsBreathFlames.cs b/Projectiles/Ranged/DragonsBreathFlames.cs index d6a65bac8e..cec31f3c36 100644 --- a/Projectiles/Ranged/DragonsBreathFlames.cs +++ b/Projectiles/Ranged/DragonsBreathFlames.cs @@ -229,7 +229,18 @@ namespace CalamityMod.Projectiles.Ranged target.AddBuff(ModContent.BuffType(), 240); } - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.ai[1] == 1 ? 4 : Projectile.width + Time * 0.1f, targetHitbox); + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + Player Owner = Main.player[Projectile.owner]; + if (Time <= 1) + { + float _ = float.NaN; + return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Center, Owner.Center, Projectile.width, ref _); + } + else + return CalamityUtils.CircularHitboxCollision(Projectile.Center, Projectile.ai[1] == 1 ? 4 : Projectile.width + Time * 0.1f, targetHitbox); + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { if (Projectile.numHits > 0) From ce75b3058af85d4ed463b5f452be6c4f110c9c5c Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 01:51:33 -0700 Subject: [PATCH 10/72] Vanquisher Arrow rotation fix --- Projectiles/Ranged/VanquisherArrowProj.cs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Projectiles/Ranged/VanquisherArrowProj.cs b/Projectiles/Ranged/VanquisherArrowProj.cs index 30c1d474cd..4d5556908d 100644 --- a/Projectiles/Ranged/VanquisherArrowProj.cs +++ b/Projectiles/Ranged/VanquisherArrowProj.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Dusts; +using CalamityMod.Graphics.Metaballs; using CalamityMod.Items.Ammo; using CalamityMod.Particles; using CalamityMod.Projectiles.Typeless; @@ -26,6 +27,8 @@ namespace CalamityMod.Projectiles.Ranged public float HomingTime = 0; public Color MainColor; public NPC targeted; + public int rotDir = 0; + public float rotSpeed = 0; public override void SetStaticDefaults() { ProjectileID.Sets.CultistIsResistantTo[Type] = true; @@ -64,6 +67,8 @@ namespace CalamityMod.Projectiles.Ranged if (Time == 0) { + rotDir = (Main.rand.NextBool() ? -1 : 1); + rotSpeed = Main.rand.NextFloat(0.8f, 1.1f); Projectile.scale = 0.014f; Projectile.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX) * 7f; ProjectileSpeed = 30; @@ -96,34 +101,20 @@ namespace CalamityMod.Projectiles.Ranged { Projectile.timeLeft++; CalamityUtils.HomeInOnSelectedNPC(Projectile, targeted, true, 0.65f, 7, 0.98f, 0.95f, true); - //CalamityUtils.HomeInOnNPC(Projectile, true, 2000f, 12, 200f); } else if (Projectile.velocity.Length() < 7) Projectile.velocity = Vector2.Lerp(Projectile.velocity, Projectile.velocity.SafeNormalize(Vector2.UnitX) * 7f, 0.04f); if (HomingTime > 1) { HomingTime--; - Projectile.velocity = Projectile.velocity.RotatedByRandom(0.09f); + Projectile.velocity = Projectile.velocity.RotatedBy(0.2f * rotDir * rotSpeed * Utils.GetLerpValue(15, 5, HomingTime, true)); } Time++; } - - public override void PostDraw(Color lightColor) - { - //Color color = Color.White; - //Rectangle frame = new Rectangle(0, 0, Terraria.GameContent.TextureAssets.Projectile[Type].Value.Width, Terraria.GameContent.TextureAssets.Projectile[Type].Value.Height); - //Main.EntitySpriteDraw(ModContent.Request("CalamityMod/Items/Ammo/VanquisherArrowGlow").Value, Projectile.Center - Main.screenPosition, frame, color, Projectile.rotation, Projectile.Size / 2, 1f, SpriteEffects.None, 0); - } - - public override Color? GetAlpha(Color lightColor) - { - return lightColor; - } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - HomingTime = Main.rand.Next(10, 20 + 1) * Projectile.extraUpdates; + HomingTime = Main.rand.Next(12, 15 + 1) * Projectile.extraUpdates; target.AddBuff(ModContent.BuffType(), 180); } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) From 02060a0a80663c4c2b432a662466a5b5022e622c Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 04:21:57 -0700 Subject: [PATCH 11/72] Fixed small stuff on Xyk's Blessing And gave them custom tooltip effects --- CalPlayer/CalamityPlayer.cs | 1 + CalPlayer/CalamityPlayerMiscEffects.cs | 15 +- Items/Accessories/Vanity/XyksBlessingBlue.cs | 7 +- .../Accessories/Vanity/XyksBlessingOrange.cs | 6 +- Items/CalamityGlobalItemTooltip.cs | 123 ++++++++++++ .../Mods.CalamityMod.Items.Accessories.hjson | 4 +- Projectiles/Typeless/XykWings.cs | 177 +++++++++--------- 7 files changed, 231 insertions(+), 102 deletions(-) diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 3ad266c8db..8e722d25a9 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -957,6 +957,7 @@ namespace CalamityMod.CalPlayer public bool XykVisualsBlue = false; public bool XykVisualsOrange = false; public Color XykFXColor = Color.Black; + public int XykWingTimer = 0; public bool manaOverloader = false; /// Used for allowing Calamity slimes to be affected by Royal Gel. public bool royalGel = false; diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index bbbc40946b..a9a450e91a 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -254,12 +254,21 @@ namespace CalamityMod.CalPlayer foreach (Projectile p in Main.ActiveProjectiles) if (p.type == ModContent.ProjectileType() && p.owner == Player.whoAmI && p.ai[1] == 0) numOfActiveWings++; - bool spawnWings = numOfActiveWings < maxWingPieces && !Player.dead && Player.wingsLogic > 0 && !(Player.wingTime == Player.wingTimeMax && Player.velocity.Y == 0) && Player.wingTime > 0; + bool spawnWings = numOfActiveWings < maxWingPieces && !Player.dead && Player.wingsLogic > 0 && ((!(Player.wingTime == Player.wingTimeMax && Player.velocity.Y == 0) && Player.wingTime > 0) || XykWingTimer >= 3); if (spawnWings) { - int wingCount = numOfActiveWings; - Projectile wings = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI, wingCount); + if (XykWingTimer >= 3) + { + int wingCount = numOfActiveWings; + Projectile wings = Projectile.NewProjectileDirect(Player.GetSource_FromThis(), Player.Center, Vector2.Zero, ModContent.ProjectileType(), 0, 0f, Player.whoAmI, wingCount); + if (numOfActiveWings + 1 == maxWingPieces) + XykWingTimer = 0; + } + else + XykWingTimer++; } + else + XykWingTimer = 0; } // First Frame dash effects diff --git a/Items/Accessories/Vanity/XyksBlessingBlue.cs b/Items/Accessories/Vanity/XyksBlessingBlue.cs index 7df7a6b928..0ebe73db84 100644 --- a/Items/Accessories/Vanity/XyksBlessingBlue.cs +++ b/Items/Accessories/Vanity/XyksBlessingBlue.cs @@ -22,7 +22,6 @@ namespace CalamityMod.Items.Accessories.Vanity EquipLoader.AddEquipTexture(Mod, "CalamityMod/Projectiles/InvisibleProj", EquipType.Wings, this); } } - public override void SetStaticDefaults() { if (Main.dedServ) @@ -44,17 +43,15 @@ namespace CalamityMod.Items.Accessories.Vanity Item.width = 36; Item.height = 34; Item.accessory = true; - Item.consumable = true; Item.vanity = true; Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.Calamity().devItem = true; } public override bool CanRightClick() => true; - - public override void ModifyItemLoot(ItemLoot itemLoot) + public override void RightClick(Player player) { - itemLoot.Add(ModContent.ItemType()); + player.PutItemInInventoryFromItemUsage(ModContent.ItemType(), 1); } public override void UpdateVanity(Player player) { diff --git a/Items/Accessories/Vanity/XyksBlessingOrange.cs b/Items/Accessories/Vanity/XyksBlessingOrange.cs index 29f2d69f89..9e20a49940 100644 --- a/Items/Accessories/Vanity/XyksBlessingOrange.cs +++ b/Items/Accessories/Vanity/XyksBlessingOrange.cs @@ -44,17 +44,15 @@ namespace CalamityMod.Items.Accessories.Vanity Item.width = 36; Item.height = 34; Item.accessory = true; - Item.consumable = true; Item.vanity = true; Item.rare = ModContent.RarityType(); Item.value = CalamityGlobalItem.RarityBlueBuyPrice; Item.Calamity().devItem = true; } public override bool CanRightClick() => true; - - public override void ModifyItemLoot(ItemLoot itemLoot) + public override void RightClick(Player player) { - itemLoot.Add(ModContent.ItemType()); + player.PutItemInInventoryFromItemUsage(ModContent.ItemType(), 1); } public override void UpdateVanity(Player player) { diff --git a/Items/CalamityGlobalItemTooltip.cs b/Items/CalamityGlobalItemTooltip.cs index 2a35ce43b4..5cd62ffeb2 100644 --- a/Items/CalamityGlobalItemTooltip.cs +++ b/Items/CalamityGlobalItemTooltip.cs @@ -6,6 +6,7 @@ using CalamityMod.Balancing; using CalamityMod.CustomRecipes; using CalamityMod.DataStructures; using CalamityMod.Items.Accessories; +using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Armor.Demonshade; using CalamityMod.Items.PermanentBoosters; using CalamityMod.Items.Tools; @@ -1633,6 +1634,128 @@ namespace CalamityMod.Items #region Enchanted Rarity Text Drawing public override bool PreDrawTooltipLine(Item item, DrawableTooltipLine line, ref int yOffset) { + if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType()) + { + Color rarityColor = Color.White; + Vector2 basePosition = new Vector2(line.X, line.Y); + + float rate = Main.GlobalTimeWrappedHourly * 6; + List eColors = new List() + { + Color.DodgerBlue, + Color.Cyan, + Color.RoyalBlue + }; + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + + Vector2 backScale = line.BaseScale; + Color backColor = usedColor; + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); + + int draws = 20; + for (int i = 0; i < draws; i++) + { + Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread); + } + Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Texture2D square = ModContent.Request("CalamityMod/Particles/BloomRing").Value; + + Vector2 drawPosition = basePosition; + Color drawColor = backColor; + Vector2 rotationPoint = texture.Size() * 0.5f; + int length = line.Text.Length; + for (int i = 0; i < 8; i++) + { + Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None); + } + for (int i = 0; i < 10; i++) + { + float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (0 + i * 0.8f) / MathHelper.Pi); + float sine2 = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (5) / MathHelper.Pi); + float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi); + float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5)); + Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * -23 * squareSine * sine2 + new Vector2(5, 10); + for (int t = 0; t < 3; t++) + Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, square.Size() * 0.5f, (1.2f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None); + for (int t = 0; t < 3; t++) + Main.EntitySpriteDraw(texture, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), 0, texture.Size() * 0.5f, (0.65f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None); + } + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); + + // Draw the front text as usual. + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread); + + return false; + } + if (line.Name == "ItemName" && line.Mod == "Terraria" && item.type == ModContent.ItemType()) + { + Color rarityColor = Color.White; + Vector2 basePosition = new Vector2(line.X, line.Y); + + float rate = Main.GlobalTimeWrappedHourly * 6; + List eColors = new List() + { + new Color(248, 117, 52), + Color.Gold, + Color.Orange + }; + int colorIndex = (int)(rate / 2 % eColors.Count); + Color currentColor = eColors[colorIndex]; + Color nextColor = eColors[(colorIndex + 1) % eColors.Count]; + Color usedColor = Color.Lerp(currentColor, nextColor, rate % 2f > 1f ? 1f : rate % 1f); + + Vector2 backScale = line.BaseScale; + Color backColor = usedColor; + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.Additive, null, null, null, null, Main.UIScaleMatrix); + + int draws = 20; + for (int i = 0; i < draws; i++) + { + Vector2 backPosition = basePosition + (MathHelper.TwoPi * i / 20f).ToRotationVector2() * (3.5f); + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, backPosition, backColor, line.Rotation, line.Origin, backScale, line.MaxWidth, line.Spread); + } + Texture2D texture = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Texture2D texture2 = ModContent.Request("CalamityMod/Particles/SquareRotated").Value; + Texture2D square = ModContent.Request("CalamityMod/Particles/GlowSquareParticleThick").Value; + + Vector2 drawPosition = basePosition; + Color drawColor = backColor; + Vector2 rotationPoint = texture.Size() * 0.5f; + int length = line.Text.Length; + for (int i = 0; i < 8; i++) + { + Main.EntitySpriteDraw(texture, basePosition + Vector2.UnitX * length * 4 + Vector2.UnitY * 23 + Vector2.UnitX * (i % 2 == 0 ? -10 * i : 10 * i), null, drawColor, (MathHelper.PiOver2), rotationPoint, new Vector2(0.3f - 0.02f * i, 1 + 0.35f * i) * 0.3f * Main.rand.NextFloat(0.9f, 1f), SpriteEffects.None); + } + for (int i = 0; i < 10; i++) + { + float sine = (float)Math.Sin(Main.GlobalTimeWrappedHourly * (0 + i * 0.8f) / MathHelper.Pi); + float squareSine = (float)Math.Sin(i * 2.5f / MathHelper.Pi); + float clockSine = (float)Math.Sin((float)Math.Pow(Utils.GetLerpValue(0, 110, ((int)(Main.GlobalTimeWrappedHourly * (60 + i * 2)) % 120)), 5)); + Vector2 weirdPos = Vector2.UnitX * 53 * i * (Utils.GetLerpValue(20, 0, i, true)) + Vector2.UnitY * 23 * squareSine + Vector2.UnitY * 5.5f * sine + new Vector2(5, 10); + for (int t = 0; t < 3; t++) + Main.EntitySpriteDraw(square, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2 + MathHelper.PiOver4, square.Size() * 0.5f, (1 - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None); + for (int t = 0; t < 3; t++) + Main.EntitySpriteDraw(texture2, basePosition + weirdPos, null, drawColor * (1 - 0.03f * i), clockSine * MathHelper.PiOver2, texture2.Size() * 0.5f, (0.6f - 0.07f * t) * new Vector2(1, 1) * (0.25f * ((float)Math.Pow(Utils.GetLerpValue(11, 0, i, true), 3) + 0.2f)), SpriteEffects.None); + } + + Main.spriteBatch.End(); + Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, null, null, null, null, Main.UIScaleMatrix); + + // Draw the front text as usual. + ChatManager.DrawColorCodedStringWithShadow(Main.spriteBatch, line.Font, line.Text, basePosition, rarityColor, line.Rotation, line.Origin, line.BaseScale, line.MaxWidth, line.Spread); + + return false; + } // Special enchantment line color. if (line.Name == "ItemName" && line.Mod == "Terraria" && item.IsEnchanted()) { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index fe2992f93b..2a23878b03 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2203,7 +2203,7 @@ XyksBlessingBlue: { DisplayName: Xyk's Blessing (Blue) Tooltip: ''' - Applies visual effects to your dashes and deaths + Applies visual effects to your dashes, wings, and deaths to transform 'It's simply too much to turn back now; passion and time have long since stained it. [c/5f8ae1:Have I always been so selfish?'] @@ -2214,7 +2214,7 @@ XyksBlessingOrange: { DisplayName: Xyk's Blessing (Orange) Tooltip: ''' - Applies visual effects to your dashes and deaths + Applies visual effects to your dashes, wings, and deaths to transform 'Even so, the march of time waits for none. Recall that feeling of fulfillment, and show it to the world. [c/E1B65F:Prove that it was never a waste.'] diff --git a/Projectiles/Typeless/XykWings.cs b/Projectiles/Typeless/XykWings.cs index 222fc845b6..191990362d 100644 --- a/Projectiles/Typeless/XykWings.cs +++ b/Projectiles/Typeless/XykWings.cs @@ -26,7 +26,7 @@ namespace CalamityMod.Projectiles.Typeless public float backWingRot = 0; public int lastDir = 0; public float spawnFade = 0; - public float spawnFadePow => (Projectile.ai[1] == 5 ? 1 - (float)Math.Pow(spawnFade, 4) : (float)Math.Pow(spawnFade, 4)); + public float spawnFadePow => (Projectile.ai[1] == 5 ? (float)Math.Pow(spawnFade, 1) : (float)Math.Pow(spawnFade, 4)); public int deathFadeTimer = 0; public bool iAmTopWing = false; @@ -157,7 +157,7 @@ namespace CalamityMod.Projectiles.Typeless deathFadeTimer++; int fadeTime = (BreakApart ? 90 : 20); - spawnFade = Utils.GetLerpValue(0, fadeTime, deathFadeTimer, true); + spawnFade = Utils.GetLerpValue(fadeTime, 0, deathFadeTimer, true); Projectile.scale = intendedScale * spawnFadePow; if (deathFadeTimer >= fadeTime) { @@ -166,101 +166,103 @@ namespace CalamityMod.Projectiles.Typeless } return; } - - bool isFlying = Owner.controlJump; - bool isFalling = Owner.controlDown && !isFlying && Owner.velocity.Y > 0; - bool isUpBoosting = Owner.wingTime > 0 && Owner.controlJump && Owner.controlUp; - bool isHovering = Owner.wingTime > 0 && Owner.controlDown && Owner.controlJump && !isUpBoosting; - if (isFalling || timeFalling < 0) - timeFalling++; - else if (timeFalling > 0) - timeFalling -= 2; - float fallingLerp = (float)Math.Pow(Utils.GetLerpValue(0, 60, timeFalling, true), 3); - float topWingNum = (checkActiveWings() - 1); - - float sine = (float)Math.Sin((time * 0.35f * (isFalling ? 3 : (isHovering || isUpBoosting) ? 3.2f : isFlying ? 2f : 1) + wingNum * ((isHovering || isUpBoosting) ? 3f : 2f)) / MathHelper.Pi); - - if (Owner.dashDelay == -1 || isUpBoosting || isHovering || Owner.Calamity().adrenalineModeActive || Owner.Calamity().rageModeActive || isFalling && Owner.velocity.Y > 16) - { - dashfx = MathHelper.Lerp(dashfx, 1, 0.25f); - float bonusScale = 1; - if (Owner.Calamity().rageModeActive) - bonusScale += 0.25f; - if (Owner.Calamity().adrenalineModeActive) - bonusScale += 0.5f; - if (Projectile.scale < bonusScale) - Projectile.scale = bonusScale; - } else { - dashfx = MathHelper.Lerp(dashfx, 0, 0.03f); - if (dashfx > 0) - dashfx -= 0.01f; - else - dashfx = 0; - } + bool isFlying = Owner.controlJump; + bool isFalling = Owner.controlDown && !isFlying && Owner.velocity.Y > 0; + bool isUpBoosting = Owner.wingTime > 0 && Owner.controlJump && Owner.controlUp; + bool isHovering = Owner.wingTime > 0 && Owner.controlDown && Owner.controlJump && !isUpBoosting; + if (isFalling || timeFalling < 0) + timeFalling++; + else if (timeFalling > 0) + timeFalling -= 3; + float fallingLerp = (float)Math.Pow(Utils.GetLerpValue(0, 40, timeFalling, true), 3); + float topWingNum = (checkActiveWings() - 1); - float flapSpeed = MathHelper.Lerp(0.06f * (isHovering ? 2.5f : isFlying ? 2f : 1), 0.55f * (isHovering ? 2.5f : isFlying ? 2f : 1), (float)Math.Pow(Utils.GetLerpValue(-1, 1, sine), 3)); + float sine = (float)Math.Sin((time * 0.35f * (isFalling ? 3 : (isHovering || isUpBoosting) ? 3.2f : isFlying ? 2f : 1) + wingNum * ((isHovering || isUpBoosting) ? 3f : 2f)) / MathHelper.Pi); - wingFlapHeight = MathHelper.Lerp(wingFlapHeight, sine, flapSpeed) * spawnFadePow; - - for (int i = -1; i <= 1; i += 2) - { - float dir = i * lastDir; - Vector2 flightMovement = Vector2.UnitY.RotatedBy(isFalling ? MathHelper.ToRadians(13) * dir * fallingLerp : 0) * (-15 * Projectile.scale + 10 * (isFalling ? 0.35f : isUpBoosting ? 5f : isHovering ? 1.5f : isFlying ? 2.5f : 1) * wingFlapHeight) * ((Owner.velocity.Y == 0) ? 0 : 1); - float wingPartDist = (1.6f / (checkActiveWings() + 1)) * wingNum * (isFalling ? 1 - 0.3f * fallingLerp : isHovering ? 0.5f : 1); - Vector2 destination = (playerCenterPoint - (Vector2.UnitX.RotatedBy(isFalling ? MathHelper.ToRadians(13) * dir * fallingLerp : 0) * (22 + 7 * wingFlapHeight * (i == -1 ? 0.5f : 1)) * Projectile.scale).RotatedBy((-0.8f + (isFalling ? 0.7f * fallingLerp : 0) + wingPartDist + (wingNum == topWingNum ? 0.1f : wingNum == 0 ? -0.1f : 0)) * dir) * dir + (Vector2.One * (isFlying ? 0 : 1)).RotatedBy((time * 0.12f + wingNum * 0.9f) * dir)) + flightMovement; - - float lerpSpeed = (1 + wingNum * (0.1f + 0.15f * fallingLerp)); - float spawnDistance = 150; - if (i == 1) - expectedWingPosition1 += ((destination + destination.DirectionFrom(playerCenterPoint) * Math.Max(1, spawnDistance * (1 - spawnFadePow))) - expectedWingPosition1) / lerpSpeed; - else - expectedWingPosition2 += ((destination + (Vector2.UnitX * -6f * lastDir) + destination.DirectionFrom(playerCenterPoint) * Math.Max(1, spawnDistance * (1 - spawnFadePow))) - expectedWingPosition2) / lerpSpeed; - } - Projectile.Center = Owner.Center; - - Projectile.rotation = expectedWingPosition1.DirectionFrom(playerCenterPoint).ToRotation() - MathHelper.PiOver2; - backWingRot = expectedWingPosition2.DirectionFrom(playerCenterPoint).ToRotation() - MathHelper.PiOver2; - - if (wingNum == 0) - Lighting.AddLight(Owner.Center, Color.Lerp(drawColor, Color.White, 0.5f).ToVector3() * 1.1f * spawnFadePow); - - if (dashfx > 0.3f && (wingNum == checkActiveWings() - 1 || wingNum == 0)) - { - for (int i = -2; i <= 2; i += 1) + if (Owner.dashDelay == -1 || isUpBoosting || isHovering || Owner.Calamity().adrenalineModeActive || Owner.Calamity().rageModeActive || isFalling && Owner.velocity.Y > 16) { - if (i == 0) - i++; - - bool front = i > 0; - Vector2 pos1 = expectedWingPosition1 + (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * (45 + 5 * wingNum) * (Projectile.scale + 0.15f); - Vector2 pos2 = expectedWingPosition2 + (backWingRot + MathHelper.PiOver2).ToRotationVector2() * (15 + 3 * wingNum) * (Projectile.scale + 0.15f); - - if (Owner.Calamity().XykVisualsBlue) - { - bool circle = Main.rand.NextBool(3); - Dust dust = Dust.NewDustPerfect(front ? pos1 : pos2, circle ? ModContent.DustType() : ModContent.DustType(), Owner.velocity.RotatedByRandom(circle ? 0.5f : 0) * Main.rand.NextFloat(-0.5f, -0.2f) * dashfx); - dust.scale = Main.rand.NextFloat(1.3f, 1.4f) * (front ? 1 : 0.6f) * dashfx * (circle ? 0.6f : 1f) * (float)Math.Pow(Projectile.scale, 0.4f); - dust.noGravity = true; - dust.color = drawColor; - dust.noLightEmittence = true; - dust.fadeIn = 1.5f * (circle ? 0 : 1f); - } + dashfx = MathHelper.Lerp(dashfx, 1, 0.25f); + float bonusScale = 1; + if (Owner.Calamity().rageModeActive) + bonusScale += 0.25f; + if (Owner.Calamity().adrenalineModeActive) + bonusScale += 0.5f; + if (Projectile.scale < bonusScale) + Projectile.scale = bonusScale; + } + else + { + dashfx = MathHelper.Lerp(dashfx, 0, 0.03f); + if (dashfx > 0) + dashfx -= 0.01f; else + dashfx = 0; + } + + float flapSpeed = MathHelper.Lerp(0.06f * (isHovering ? 2.5f : isFlying ? 2f : 1), 0.55f * (isHovering ? 2.5f : isFlying ? 2f : 1), (float)Math.Pow(Utils.GetLerpValue(-1, 1, sine), 3)); + + wingFlapHeight = MathHelper.Lerp(wingFlapHeight, sine, flapSpeed) * spawnFadePow; + + for (int i = -1; i <= 1; i += 2) + { + float dir = i * lastDir; + Vector2 flightMovement = Vector2.UnitY.RotatedBy(isFalling ? MathHelper.ToRadians(13) * dir * fallingLerp : 0) * (-15 * Projectile.scale + 10 * (isFalling ? 0.35f : isUpBoosting ? 5f : isHovering ? 1.5f : isFlying ? 2.5f : 1) * wingFlapHeight) * ((Owner.velocity.Y == 0) ? 0 : 1); + float wingPartDist = (1.6f / (checkActiveWings() + 1)) * wingNum * (isFalling ? 1 - 0.3f * fallingLerp : isHovering ? 0.5f : 1); + Vector2 destination = (playerCenterPoint - (Vector2.UnitX.RotatedBy(isFalling ? MathHelper.ToRadians(13) * dir * fallingLerp : 0) * (22 + 7 * wingFlapHeight * (i == -1 ? 0.5f : 1)) * Projectile.scale).RotatedBy((-0.8f + (isFalling ? 0.7f * fallingLerp : 0) + wingPartDist + (wingNum == topWingNum ? 0.1f : wingNum == 0 ? -0.1f : 0)) * dir) * dir + (Vector2.One * (isFlying ? 0 : 1)).RotatedBy((time * 0.12f + wingNum * 0.9f) * dir)) + flightMovement; + + float lerpSpeed = (1 + wingNum * (0.1f + 0.15f * fallingLerp) / (Owner.moveSpeed * 0.3f + 1)); + float spawnDistance = 150; + if (i == 1) + expectedWingPosition1 += ((destination + destination.DirectionFrom(playerCenterPoint) * Math.Max(1, spawnDistance * (1 - spawnFadePow))) - expectedWingPosition1) / lerpSpeed; + else + expectedWingPosition2 += ((destination + (Vector2.UnitX * -6f * lastDir) + destination.DirectionFrom(playerCenterPoint) * Math.Max(1, spawnDistance * (1 - spawnFadePow))) - expectedWingPosition2) / lerpSpeed; + } + Projectile.Center = Owner.Center; + + Projectile.rotation = expectedWingPosition1.DirectionFrom(playerCenterPoint).ToRotation() - MathHelper.PiOver2; + backWingRot = expectedWingPosition2.DirectionFrom(playerCenterPoint).ToRotation() - MathHelper.PiOver2; + + if (wingNum == 0) + Lighting.AddLight(Owner.Center, Color.Lerp(drawColor, Color.White, 0.5f).ToVector3() * 1.1f * spawnFadePow); + + if (dashfx > 0.3f && (wingNum == checkActiveWings() - 1 || wingNum == 0)) + { + for (int i = -2; i <= 2; i += 1) { - bool square = Main.rand.NextBool(3); - Dust dust = Dust.NewDustPerfect(front ? pos1 : pos2, square ? ModContent.DustType() : ModContent.DustType(), Owner.velocity.RotatedByRandom(0.25f) * Main.rand.NextFloat(-0.5f, -0.2f) * dashfx); - dust.scale = Main.rand.NextFloat(0.8f, 1f) * (front ? 1 : 0.6f) * dashfx * (square ? 1 : 1.5f) * (float)Math.Pow(Projectile.scale, 0.4f); - dust.noGravity = true; - dust.color = drawColor; - dust.noLightEmittence = true; - dust.fadeIn = 0.1f * (square ? 1 : 3f); + if (i == 0) + i++; + + bool front = i > 0; + Vector2 pos1 = expectedWingPosition1 + (Projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * (45 + 5 * wingNum) * (Projectile.scale + 0.15f); + Vector2 pos2 = expectedWingPosition2 + (backWingRot + MathHelper.PiOver2).ToRotationVector2() * (15 + 3 * wingNum) * (Projectile.scale + 0.15f); + + if (Owner.Calamity().XykVisualsBlue) + { + bool circle = Main.rand.NextBool(3); + Dust dust = Dust.NewDustPerfect(front ? pos1 : pos2, circle ? ModContent.DustType() : ModContent.DustType(), Owner.velocity.RotatedByRandom(circle ? 0.5f : 0) * Main.rand.NextFloat(-0.5f, -0.2f) * dashfx); + dust.scale = Main.rand.NextFloat(1.3f, 1.4f) * (front ? 1 : 0.6f) * dashfx * (circle ? 0.6f : 1f) * (float)Math.Pow(Projectile.scale, 0.4f); + dust.noGravity = true; + dust.color = drawColor; + dust.noLightEmittence = true; + dust.fadeIn = 1.5f * (circle ? 0 : 1f); + } + else + { + bool square = Main.rand.NextBool(3); + Dust dust = Dust.NewDustPerfect(front ? pos1 : pos2, square ? ModContent.DustType() : ModContent.DustType(), Owner.velocity.RotatedByRandom(0.25f) * Main.rand.NextFloat(-0.5f, -0.2f) * dashfx); + dust.scale = Main.rand.NextFloat(0.8f, 1f) * (front ? 1 : 0.6f) * dashfx * (square ? 1 : 1.5f) * (float)Math.Pow(Projectile.scale, 0.4f); + dust.noGravity = true; + dust.color = drawColor; + dust.noLightEmittence = true; + dust.fadeIn = 0.1f * (square ? 1 : 3f); + } } } - } - time++; + time++; + } } public override bool PreDraw(ref Color lightColor) { @@ -310,7 +312,6 @@ namespace CalamityMod.Projectiles.Typeless Main.EntitySpriteDraw(tex, expectedWingPosition1 - Main.screenPosition, null, Color.Lerp(drawColor, Color.White, dashfx) with { A = 0 } * spawnFadePow * MathHelper.Lerp(1, 0.6f, dashfx), Projectile.rotation, new Vector2(tex.Width * 0.5f, 0), scale, lastDir == 1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0); Main.EntitySpriteDraw(tex, expectedWingPosition2 - Main.screenPosition, null, Color.Lerp(drawColor, Color.White, dashfx) with { A = 0 } * spawnFadePow * MathHelper.Lerp(1, 0.6f, dashfx), backWingRot, new Vector2(tex.Width * 0.5f, 0), scaleBack, lastDir == -1 ? SpriteEffects.None : SpriteEffects.FlipHorizontally, 0); - return false; } public int checkActiveWings() From b4d16f041a9b9f71cac6c13a6424f895f6d45ee6 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 3 Jun 2025 13:24:15 -0400 Subject: [PATCH 12/72] Murdered Oblivion in cold blood (mostly) No longer plays Boss 3 No longer has different type names No longer spawns Twins and Destroyer --- .../en-US/Mods.CalamityMod.NPCs.hjson | 7 +- NPCs/CalamityGlobalNPC.cs | 29 ----- .../Bosses/DestroyerAI.cs | 101 ++++++------------ .../Bosses/SkeletronPrimeAI.cs | 66 ------------ NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 87 ++++----------- .../SkeletronPrimeMasterMusicScene.cs | 14 --- 6 files changed, 54 insertions(+), 250 deletions(-) delete mode 100644 Scenes/MusicScenes/SkeletronPrimeMasterMusicScene.cs diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index ca33d6a044..88ed6fb8e1 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -189,12 +189,7 @@ Rotdog.DisplayName: Rotdog ScornEater.DisplayName: Scorn Eater ShockstormShuttle.DisplayName: Shockstorm Shuttle Shroomble.DisplayName: Shroomble -SkeletronOmega.DisplayName: Skeletron Omega -OmegaSaw.DisplayName: Omega Saw -OmegaLaser.DisplayName: Omega Laser -SkeletronPrime2.DisplayName: Skeletron Alpha -AlphaVice.DisplayName: Alpha Vice -AlphaCannon.DisplayName: Alpha Cannon +SkeletronPrime2.DisplayName: Skeletron Prime Stormlion.DisplayName: Stormlion StormlionSentry.DisplayName: Stormlion Sentry Sunskater.DisplayName: Sunskater diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 68ee28826c..900cd940e9 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -10195,34 +10195,5 @@ namespace CalamityMod.NPCs return result; } #endregion - - #region Type Name Changes - public override void ModifyTypeName(NPC npc, ref string typeName) - { - if (CalamityWorld.death || BossRushEvent.BossRushActive) - { - if (npc.type == NPCID.SkeletronPrime) - { - typeName = CalamityUtils.GetTextValue("NPCs.SkeletronOmega.DisplayName"); - } - if (npc.type == NPCID.PrimeSaw) - { - typeName = CalamityUtils.GetTextValue("NPCs.OmegaSaw.DisplayName"); - } - if (npc.type == NPCID.PrimeLaser) - { - typeName = CalamityUtils.GetTextValue("NPCs.OmegaLaser.DisplayName"); - } - if (npc.type == NPCID.PrimeVice) - { - typeName = CalamityUtils.GetTextValue("NPCs.AlphaVice.DisplayName"); - } - if (npc.type == NPCID.PrimeCannon) - { - typeName = CalamityUtils.GetTextValue("NPCs.AlphaCannon.DisplayName"); - } - } - } - #endregion } } diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 2a3aaf073a..c26be9d26d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -151,8 +151,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Check if other segments are still alive, if not, die - // Check for Oblivion too, since having a max power Destroyer during that fight would be turbo cancer - bool oblivionAlive = false; if (npc.type > NPCID.TheDestroyer) { bool shouldDespawn = true; @@ -179,27 +177,13 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.active = false; } } - else - { - if (death && !bossRush && npc.localAI[3] == 1f) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == NPCID.SkeletronPrime)) - { - oblivionAlive = true; - break; - } - } - } - } // Total segment variable int totalSegments = Main.getGoodWorld ? 100 : 80; // Calculate aggression based on how many broken segments there are float brokenSegmentAggressionMultiplier = 1f; - if (npc.type == NPCID.TheDestroyer && !oblivionAlive) + if (npc.type == NPCID.TheDestroyer) { int numProbeSegments = 0; for (int i = 0; i < Main.maxNPCs; i++) @@ -225,51 +209,39 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Increase velocity based on distance float velocityMultiplier = increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; + noFlyZoneBoxHeight -= death ? 400 : (int)(400f * (1f - lifeRatio)); - // If Oblivion is alive, don't fly, don't spit laser spreads, use the default vanilla no fly zone, reduce segment count to 60, use base speed and use base turn speed - if (oblivionAlive) + float segmentVelocityBoost = death ? (flyAtTarget ? 4.5f : 6f) * (1f - lifeRatio) : (flyAtTarget ? 3f : 4f) * (1f - lifeRatio); + float speedBoost = death ? (flyAtTarget ? 0.1125f : 0.15f) * (1f - lifeRatio) : (flyAtTarget ? 0.075f : 0.1f) * (1f - lifeRatio); + float turnSpeedBoost = death ? 0.18f * (1f - lifeRatio) : 0.12f * (1f - lifeRatio); + + segmentVelocity += segmentVelocityBoost; + speed += speedBoost; + turnSpeed += turnSpeedBoost; + + segmentVelocity += 5f * enrageScale; + speed += 0.05f * enrageScale; + turnSpeed += 0.075f * enrageScale; + + if (flyAtTarget) { - calamityGlobalNPC.newAI[3] = 0f; - totalSegments = Main.getGoodWorld ? 75 : 60; - spitLaserSpreads = false; - noFlyZoneBoxHeight = 2000; + float speedMultiplier = phase5 ? 1.8f : phase4 ? 1.65f : 1.5f; + speed *= speedMultiplier; } - else + + segmentVelocity *= velocityMultiplier; + speed *= velocityMultiplier; + turnSpeed *= velocityMultiplier; + + segmentVelocity *= brokenSegmentAggressionMultiplier; + speed *= brokenSegmentAggressionMultiplier; + turnSpeed *= brokenSegmentAggressionMultiplier; + + if (Main.getGoodWorld) { - noFlyZoneBoxHeight -= death ? 400 : (int)(400f * (1f - lifeRatio)); - - float segmentVelocityBoost = death ? (flyAtTarget ? 4.5f : 6f) * (1f - lifeRatio) : (flyAtTarget ? 3f : 4f) * (1f - lifeRatio); - float speedBoost = death ? (flyAtTarget ? 0.1125f : 0.15f) * (1f - lifeRatio) : (flyAtTarget ? 0.075f : 0.1f) * (1f - lifeRatio); - float turnSpeedBoost = death ? 0.18f * (1f - lifeRatio) : 0.12f * (1f - lifeRatio); - - segmentVelocity += segmentVelocityBoost; - speed += speedBoost; - turnSpeed += turnSpeedBoost; - - segmentVelocity += 5f * enrageScale; - speed += 0.05f * enrageScale; - turnSpeed += 0.075f * enrageScale; - - if (flyAtTarget) - { - float speedMultiplier = phase5 ? 1.8f : phase4 ? 1.65f : 1.5f; - speed *= speedMultiplier; - } - - segmentVelocity *= velocityMultiplier; - speed *= velocityMultiplier; - turnSpeed *= velocityMultiplier; - - segmentVelocity *= brokenSegmentAggressionMultiplier; - speed *= brokenSegmentAggressionMultiplier; - turnSpeed *= brokenSegmentAggressionMultiplier; - - if (Main.getGoodWorld) - { - segmentVelocity *= 1.2f; - speed *= 1.2f; - turnSpeed *= 1.2f; - } + segmentVelocity *= 1.2f; + speed *= 1.2f; + turnSpeed *= 1.2f; } bool probeLaunched = npc.ai[2] == 1f; @@ -287,9 +259,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses calamityGlobalNPC.newAI[2] -= 1f; } - // Regenerate Probes in Master Mode if the number of Probes is less than 40 and the number of living NPCs is less than the segment count + 40 (this limit is here just in case) - // This doesn't happen if Oblivion is alive - if (death && probeLaunched && !oblivionAlive) + // Regenerate Probes in Death Mode if the number of Probes is less than 40 and the number of living NPCs is less than the segment count + 40 (this limit is here just in case) + if (death && probeLaunched) { npc.localAI[2] += 1f; if (npc.localAI[2] >= 600f) @@ -770,8 +741,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Despawn - bool oblivionFightDespawn = (oblivionAlive && lifeRatio < 0.8f) && npc.localAI[3] == 1f; - if (player.dead || oblivionFightDespawn) + if (player.dead) { shouldFly = false; npc.velocity.Y += 2f; @@ -1034,12 +1004,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - // Force the fucker to turn around in ground phase in Master - // Turns slower if Oblivion is alive, for fairness + // Force the fucker to turn around in ground phase in Death if (npc.type == NPCID.TheDestroyer && death && !flyAtTarget) { if (npc.Distance(player.Center) > 2000f) - npc.velocity += (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? speed : turnSpeed); + npc.velocity += (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * turnSpeed; } if (NPC.IsMechQueenUp && npc.type == NPCID.TheDestroyer) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index e4889ff152..83d7210b95 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -182,73 +182,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Phases bool phase2 = lifeRatio < 0.66f; - bool spawnDestroyer = lifeRatio < 0.75f && death && !bossRush && npc.localAI[2] == 0f; bool phase3 = lifeRatio < 0.33f; - bool spawnRetinazer = lifeRatio < 0.5f && death && !bossRush && npc.localAI[2] == 1f; - - // Spawn The Destroyer in Master Mode (just like Oblivion from Avalon) - if (spawnDestroyer) - { - Player destroyerSpawnPlayer = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)]; - SoundEngine.PlaySound(SoundID.Roar, destroyerSpawnPlayer.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int destroyer = NPC.NewNPC(NPC.GetBossSpawnSource(destroyerSpawnPlayer.whoAmI), (int)destroyerSpawnPlayer.Center.X, (int)destroyerSpawnPlayer.Center.Y + 810, NPCID.TheDestroyer, 1); - if (destroyer != Main.maxNPCs) - { - Main.npc[destroyer].target = destroyerSpawnPlayer.whoAmI; - Main.npc[destroyer].timeLeft *= 20; - Main.npc[destroyer].localAI[3] = 1f; - Main.npc[destroyer].SyncVanillaLocalAI(); - string typeName = Main.npc[destroyer].TypeName; - if (Main.dedServ && destroyer < Main.maxNPCs) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, destroyer); - - AchievementsHelper.CheckMechaMayhem(); - - if (Main.netMode == NetmodeID.SinglePlayer) - Main.NewText(Language.GetTextValue("Announcement.HasAwoken", typeName), 175, 75); - else if (Main.dedServ) - ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", Main.npc[destroyer].GetTypeNetName()), new Color(175, 75, 255)); - } - } - - npc.localAI[2] = 1f; - npc.SyncVanillaLocalAI(); - } - - // Spawn Retinazer in Master Mode (just like Oblivion from Avalon) - if (spawnRetinazer) - { - Player retinazerSpawnPlayer = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)]; - SoundEngine.PlaySound(SoundID.Roar, retinazerSpawnPlayer.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int retinazer = NPC.NewNPC(NPC.GetBossSpawnSource(retinazerSpawnPlayer.whoAmI), (int)retinazerSpawnPlayer.Center.X, (int)retinazerSpawnPlayer.Center.Y - 810, NPCID.Retinazer, 1); - if (retinazer != Main.maxNPCs) - { - Main.npc[retinazer].target = retinazerSpawnPlayer.whoAmI; - Main.npc[retinazer].timeLeft *= 20; - Main.npc[retinazer].localAI[3] = 1f; - Main.npc[retinazer].SyncVanillaLocalAI(); - string typeName = Main.npc[retinazer].TypeName; - if (Main.dedServ && retinazer < Main.maxNPCs) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, retinazer); - - AchievementsHelper.CheckMechaMayhem(); - - if (Main.netMode == NetmodeID.SinglePlayer) - Main.NewText(Lang.misc[48].Value, 175, 75); - else if (Main.dedServ) - ChatHelper.BroadcastChatMessage(Lang.misc[48].ToNetworkText(), new Color(175, 75, 255)); - } - } - - npc.localAI[2] = 2f; - npc.SyncVanillaLocalAI(); - } // Despawn if (npc.ai[1] != 3f) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index 10f0500657..aedd0dc065 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -76,22 +76,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - // Check for Oblivion in Master Mode - bool oblivionAlive = false; - if (death && !bossRush && npc.localAI[3] == 1f) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == NPCID.SkeletronPrime)) - { - oblivionAlive = true; - break; - } - } - } - // Foveanator spawn - if (!oblivionAlive && death && calamityGlobalNPC.newAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient && !bossRush) + if (death && calamityGlobalNPC.newAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient && !bossRush) { NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType()); calamityGlobalNPC.newAI[0] = 1f; @@ -101,7 +87,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool foveanatorAlive = NPC.AnyNPCs(ModContent.NPCType()); // Phase HP ratios - float phase2LifeRatio = oblivionAlive ? 0.5f : death ? 0.85f : 0.7f; + float phase2LifeRatio = death ? 0.85f : 0.7f; float finalPhaseLifeRatio = death ? 0.4f : 0.25f; // Movement variables @@ -112,16 +98,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Phase duration variables float phase1MaxLaserPhaseDurationDecrease = death ? 120f : 300f; - // If Oblivion is alive reduce aggression of all attacks - if (oblivionAlive) - { - phase1MaxSpeedIncrease = death ? 1f : 2f; - phase1MaxAccelerationIncrease = death ? 0.0125f : 0.025f; - phase1MaxChargeSpeedIncrease = death ? 1.5f : 3f; - - phase1MaxLaserPhaseDurationDecrease = death ? 60f : 150f; - } - // Phase checks bool phase2 = lifeRatio < phase2LifeRatio; bool finalPhase = lifeRatio < finalPhaseLifeRatio; @@ -141,8 +117,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.reflectsProjectiles = false; // Despawn - bool oblivionFightDespawn = ((oblivionAlive && lifeRatio < 0.8f) || (oblivionAlive && !spazAlive && lifeRatio < 0.95f)) && npc.localAI[3] == 1f; - if (Main.player[npc.target].dead || oblivionFightDespawn) + if (Main.player[npc.target].dead) { npc.velocity.Y -= 0.04f; if (npc.timeLeft > 10) @@ -199,7 +174,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.SimpleFlyMovement(idealVelocity * maxVelocity, acceleration); float phaseGateValue = death ? (300f - phase1MaxLaserPhaseDurationDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))) : 450f; - float laserGateValue = oblivionAlive ? 60f : foveanatorAlive ? 45f : 30f; + float laserGateValue = foveanatorAlive ? 45f : 30f; if (NPC.IsMechQueenUp) { phaseGateValue = 900f; @@ -300,7 +275,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.rotation = npc.velocity.ToRotation() - MathHelper.PiOver2; float delayBeforeChargingAgain = (death ? 48f : 56f) - (death ? 3f * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f); - if (npc.ai[2] >= delayBeforeChargingAgain + (oblivionAlive ? 15f : 0f)) + if (npc.ai[2] >= delayBeforeChargingAgain) { npc.ai[3] += 1f; npc.ai[2] = 0f; @@ -387,7 +362,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses damage = (int)(damage * secondMechMultiplier); } - Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? 6f : 7f); + Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * 7f; int numProj = shootLaser ? 6 : 2; int spread = shootLaser ? 20 : 80; float rotation = MathHelper.ToRadians(spread); @@ -474,7 +449,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses acceleration *= 1.15f; } - float distanceFromTarget = oblivionAlive ? 480f : 420f; + float distanceFromTarget = 420f; Vector2 destination = Main.player[npc.target].Center - Vector2.UnitY * distanceFromTarget; float distanceFromDestination = (destination - npc.Center).Length(); Vector2 idealVelocity = (destination - npc.Center).SafeNormalize(Vector2.UnitX * direction); @@ -516,7 +491,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[1] += 1f + (death ? (phase2LifeRatio - lifeRatio) / phase2LifeRatio : 0f); - if (npc.localAI[1] >= (spazAlive ? (oblivionAlive ? 76f : foveanatorAlive ? 64f : 52f) : foveanatorAlive ? 39f : 26f)) + if (npc.localAI[1] >= (spazAlive ? (foveanatorAlive ? 64f : 52f) : foveanatorAlive ? 39f : 26f)) { if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { @@ -562,7 +537,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses acceleration *= 1.15f; } - float distanceFromTarget = oblivionAlive ? 480f : 420f; + float distanceFromTarget = 420f; Vector2 destination = Main.player[npc.target].Center + Vector2.UnitX * distanceFromTarget * direction; float distanceFromDestination = (destination - npc.Center).Length(); Vector2 idealVelocity = (destination - npc.Center).SafeNormalize(Vector2.UnitX * direction); @@ -573,7 +548,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[1] += 1f + (death ? (phase2LifeRatio - lifeRatio) / phase2LifeRatio : 0f); - if (npc.localAI[1] > (spazAlive ? (oblivionAlive ? 30f : foveanatorAlive ? 25f : 20f) : foveanatorAlive ? 15f : 10f)) + if (npc.localAI[1] > (spazAlive ? (foveanatorAlive ? 25f : 20f) : foveanatorAlive ? 15f : 10f)) { if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { @@ -843,24 +818,10 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - // Check for Oblivion in Master Mode - bool oblivionAlive = false; - if (death && !bossRush && npc.localAI[3] == 1f) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == NPCID.SkeletronPrime)) - { - oblivionAlive = true; - break; - } - } - } - bool foveanatorAlive = NPC.AnyNPCs(ModContent.NPCType()); // Phase HP ratios - float phase2LifeRatio = oblivionAlive ? 0.5f : death ? 0.85f : 0.7f; + float phase2LifeRatio = death ? 0.85f : 0.7f; float finalPhaseLifeRatio = death ? 0.3f : 0.15f; // Movement variables @@ -872,17 +833,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses float phase1MaxCursedFlamePhaseDurationDecrease = death ? 80f : 200f; float phase1MaxChargesDecrease = death ? 2f : 4f; - // If Oblivion is alive reduce aggression of all attacks - if (oblivionAlive) - { - phase1MaxSpeedIncrease = death ? 1.125f : 2.25f; - phase1MaxAccelerationIncrease = death ? 0.0375f : 0.075f; - phase1MaxChargeSpeedIncrease = death ? 1.5f : 3f; - - phase1MaxCursedFlamePhaseDurationDecrease = death ? 40f : 100f; - phase1MaxChargesDecrease = death ? 1f : 2f; - } - // Phase checks bool phase2 = lifeRatio < phase2LifeRatio; bool finalPhase = lifeRatio < finalPhaseLifeRatio; @@ -902,8 +852,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.reflectsProjectiles = false; // Despawn - bool oblivionFightDespawn = ((oblivionAlive && lifeRatio < 0.8f) || (oblivionAlive && !retAlive && lifeRatio < 0.95f)) && npc.localAI[3] == 1f; - if (Main.player[npc.target].dead || oblivionFightDespawn) + if (Main.player[npc.target].dead) { npc.velocity.Y -= 0.04f; if (npc.timeLeft > 10) @@ -940,7 +889,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses acceleration *= 1.15f; } - float distanceFromTarget = oblivionAlive ? 480f : 400f; + float distanceFromTarget = 400f; Vector2 destination = Main.player[npc.target].Center + Vector2.UnitX * distanceFromTarget * direction; float distanceFromDestination = (destination - npc.Center).Length(); Vector2 idealVelocity = (destination - npc.Center).SafeNormalize(Vector2.UnitX * direction); @@ -983,7 +932,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[3] += 0.4f; } - if (npc.ai[3] >= (oblivionAlive ? 60f : foveanatorAlive ? 45f : 30f)) + if (npc.ai[3] >= (foveanatorAlive ? 45f : 30f)) { npc.ai[3] = 0f; @@ -1058,7 +1007,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Charge 8 times float chargeTime = death ? 45f : 25f; - if (npc.ai[2] >= chargeTime + (oblivionAlive ? 15f : 0f)) + if (npc.ai[2] >= chargeTime) { // Reset AI array and go to cursed fireball phase npc.ai[3] += 1f; @@ -1144,7 +1093,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses damage = (int)(damage * secondMechMultiplier); } - Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * (oblivionAlive ? 12f : 16f) + Main.rand.NextVector2CircularEdge(3f, 3f); + Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * 16f + Main.rand.NextVector2CircularEdge(3f, 3f); int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 50f, projectileVelocity, type, damage, 0f, Main.myPlayer, 0f, 1f); Main.projectile[proj].tileCollide = false; } @@ -1234,7 +1183,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { // Boost speed if too far from target if (distanceFromDestination > distanceFromTarget) - maxVelocity += MathHelper.Lerp(0f, oblivionAlive ? 3f : death ? 8f : 6f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); + maxVelocity += MathHelper.Lerp(0f, death ? 8f : 6f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); if (Main.getGoodWorld) { @@ -1380,7 +1329,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.rotation = npc.velocity.ToRotation() - MathHelper.PiOver2; // Charges 5 times - if (npc.ai[2] >= (chargeTime * 1.6f) + (oblivionAlive ? 15f : 0f)) + if (npc.ai[2] >= chargeTime * 1.6f) { npc.ai[3] += 1f; npc.ai[2] = 0f; diff --git a/Scenes/MusicScenes/SkeletronPrimeMasterMusicScene.cs b/Scenes/MusicScenes/SkeletronPrimeMasterMusicScene.cs deleted file mode 100644 index e5597c0d2e..0000000000 --- a/Scenes/MusicScenes/SkeletronPrimeMasterMusicScene.cs +++ /dev/null @@ -1,14 +0,0 @@ -using CalamityMod.World; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Systems -{ - public class SkeletronPrimeMasterMusicScene : ModSceneEffect - { - public override int Music => MusicID.Boss3; // I spent 20 minutes trying to get this music to play while forgetting to actually override this in the first place _ YuH - public override SceneEffectPriority Priority => SceneEffectPriority.BossLow; - public override bool IsSceneEffectActive(Player player) => CalamityWorld.death && NPC.AnyNPCs(NPCID.SkeletronPrime) && Main.npc[NPC.FindFirstNPC(NPCID.SkeletronPrime)].Distance(player.Center) <= 525f * 16f; - } -} From d060fad9b74adc9a1acb20dfb578d7862e97eadb Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 4 Jun 2025 02:51:49 +0700 Subject: [PATCH 13/72] Added Aqult's set --- Items/Accessories/Vanity/LucisSight.cs | 32 ++++++++++++++++++ Items/Accessories/Vanity/LucisSight.png | Bin 0 -> 318 bytes Items/Accessories/Vanity/LucisSight_Face.png | Bin 0 -> 2245 bytes Items/Armor/Vanity/LucisBoots.cs | 22 ++++++++++++ Items/Armor/Vanity/LucisBoots.png | Bin 0 -> 279 bytes Items/Armor/Vanity/LucisBoots_Legs.png | Bin 0 -> 3810 bytes Items/Armor/Vanity/LucisHairstyle.cs | 22 ++++++++++++ Items/Armor/Vanity/LucisHairstyle.png | Bin 0 -> 576 bytes Items/Armor/Vanity/LucisHairstyle_Head.png | Bin 0 -> 5103 bytes Items/Armor/Vanity/LucisMilitaryUniform.cs | 22 ++++++++++++ Items/Armor/Vanity/LucisMilitaryUniform.png | Bin 0 -> 540 bytes .../Vanity/LucisMilitaryUniform_Body.png | Bin 0 -> 5853 bytes .../Mods.CalamityMod.Items.Accessories.hjson | 5 +++ .../Mods.CalamityMod.Items.Armor.Vanity.hjson | 15 ++++++++ NPCs/CalamityGlobalTownNPC.cs | 7 +++- 15 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 Items/Accessories/Vanity/LucisSight.cs create mode 100644 Items/Accessories/Vanity/LucisSight.png create mode 100644 Items/Accessories/Vanity/LucisSight_Face.png create mode 100644 Items/Armor/Vanity/LucisBoots.cs create mode 100644 Items/Armor/Vanity/LucisBoots.png create mode 100644 Items/Armor/Vanity/LucisBoots_Legs.png create mode 100644 Items/Armor/Vanity/LucisHairstyle.cs create mode 100644 Items/Armor/Vanity/LucisHairstyle.png create mode 100644 Items/Armor/Vanity/LucisHairstyle_Head.png create mode 100644 Items/Armor/Vanity/LucisMilitaryUniform.cs create mode 100644 Items/Armor/Vanity/LucisMilitaryUniform.png create mode 100644 Items/Armor/Vanity/LucisMilitaryUniform_Body.png diff --git a/Items/Accessories/Vanity/LucisSight.cs b/Items/Accessories/Vanity/LucisSight.cs new file mode 100644 index 0000000000..0afdc9724c --- /dev/null +++ b/Items/Accessories/Vanity/LucisSight.cs @@ -0,0 +1,32 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Accessories.Vanity +{ + [AutoloadEquip(EquipType.Face)] + public class LucisSight : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Accessories"; + + public override void SetStaticDefaults() + { + if (!Main.dedServ) + { + int equipSlot = EquipLoader.GetEquipSlot(Mod, Name, EquipType.Face); + ArmorIDs.Face.Sets.DrawInFaceUnderHairLayer[equipSlot] = true; + } + } + + public override void SetDefaults() + { + Item.width = 28; + Item.height = 18; + Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker + Item.rare = ItemRarityID.Pink; + Item.accessory = true; + Item.vanity = true; + Item.Calamity().donorItem = true; + } + } +} diff --git a/Items/Accessories/Vanity/LucisSight.png b/Items/Accessories/Vanity/LucisSight.png new file mode 100644 index 0000000000000000000000000000000000000000..47aa49c9a112dd36f4fc76969ffde25a649043e0 GIT binary patch literal 318 zcmV-E0m1%>P);00035NklT^nQbeBW?0 z#lz+3m{#bFklHyM3{{cq?Z&t=tHn}nlF2wV6dq4mC%(E~j1CCrgmhEDRh&ZHPsG{c zv0HW9pwu?O*9hT8%o2&Y%|i>-_mIqvRp^Y6&XR5#+xPI(W@2B9UlBe4jZ6^|3&&fR Q00000NkvXXu0mjf0L1Z$`v3p{ literal 0 HcmV?d00001 diff --git a/Items/Accessories/Vanity/LucisSight_Face.png b/Items/Accessories/Vanity/LucisSight_Face.png new file mode 100644 index 0000000000000000000000000000000000000000..b56c28cf6eef820f40c132c297c1a08355a38fce GIT binary patch literal 2245 zcmeAS@N?(olHy`uVBq!ia0vp^8Vn392^?%d*6dv(^+1ZTILO_JVcj{ImkbOXsh%#5 zAr*0NZ*4rQ>nYkAsKzAJ5MpqmQR5^dGrP33u#f`N1UD^CMVFVaR=1n&%HCuC_5HP- ztINx+pD&N^`Tza$kDC1k345JcIKvueU3Y8>UGS`QLW1auO4&KWf9~ej{qC=qef7Qm zkMk~X%|G)?(%5a9|L(r=^MC!X&+&EtZ0mpjj<{qp(nKkY#Day#34y&o?bw(mE8;QOM??}J*2wR(l{uDQZ{IPae0 zyw{TVoF(6BdvTNb!rPVyXJ2?bhg!;h79YI1b&9f~^@BfAr~Wj2&er_QJg@!8y)$o* z{@ia@|8G&NS5BcdOs4CbSynroeXVd%E8w%0#|Ew|d-#YHK5uQYds@+wH1;|1 z-ZSM3>U2}<4t$<)WA;k@YuA51*Uw_!C${2xaW_Ult3!ZrxIul{XomUk`c) z@y-Vum2YXUy1$nG``LY~VLj`suXmD=5(_DQsFVe%{#VJKem$t~${R>@fW1>8Csb|x z_2@6F|9@O_4_s&ZT9s!=dORS-+W$Sxo3l0Dv&s(q+&bka#5*?poqK2gN~)a;jCZpK z*^O1U+h>3iJn4RjV}H()K3xm!32)KQ%;)q&&+r315iJk$#QWfIN|V(6>!5^NteuXL zrt<$?|M~v+B!L>;fc4ACPO?@WAA%c!Hhgx*NVPw|?ESv@|Gn)yxP-|G806&qU^&y~ zZrkVWXZS4k-!Qg+@F(f~pN8j(8!NxOtbXtQe{X)Fs2WK*4Jn2p*|k0%l$g$~og)j$ zcHr1P@0^ssY~RoL=lkD#JAK&duy-D@IT^!zU~%Bjng+CieC?f?J) literal 0 HcmV?d00001 diff --git a/Items/Armor/Vanity/LucisBoots.cs b/Items/Armor/Vanity/LucisBoots.cs new file mode 100644 index 0000000000..da9ce01a0c --- /dev/null +++ b/Items/Armor/Vanity/LucisBoots.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor.Vanity +{ + [AutoloadEquip(EquipType.Legs)] + public class LucisBoots : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Armor.Vanity"; + + public override void SetDefaults() + { + Item.width = 28; + Item.height = 20; + Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker + Item.rare = ItemRarityID.Pink; + Item.vanity = true; + Item.Calamity().donorItem = true; + } + } +} diff --git a/Items/Armor/Vanity/LucisBoots.png b/Items/Armor/Vanity/LucisBoots.png new file mode 100644 index 0000000000000000000000000000000000000000..2b91e15ca468442a0ed9af6b856e647b3f3cae10 GIT binary patch literal 279 zcmV+y0qFjTP)tYn|NnJ@STDqjVsVl!O+ZqLLLa&hPO^!U$&g)U$wM%n)?EWMt?w!}{b*X>CC<`R@s^;l$K@^ok<|rBu|($_r%WCGtj!+_%@kPAAq+CQtReJ}1xh d{7doC#7`U!-rLWG$(jHF002ovPDHLkV1l~3deHy? literal 0 HcmV?d00001 diff --git a/Items/Armor/Vanity/LucisBoots_Legs.png b/Items/Armor/Vanity/LucisBoots_Legs.png new file mode 100644 index 0000000000000000000000000000000000000000..cb73585b170c0e5551899c24515a1559d991d4e4 GIT binary patch literal 3810 zcmcJSX;f3!7RRYgqiB#=WfVvt5h6uFkXi&{ z7(_6L5T+PGLg)&p%#+9rVQQFyL^T;hdXVpA+r0KPvD!61=$X~RM7C9s z>-Z1zPnr*H1YP$dr(chkKOk-%FZGCkR5muhIobFKqVm-<6h$fv@{|YrgNag9M9F%< zZ2wB^!0P0Oh$wt#zWM+nHAOX@%nlS(F8rKs#g23AtlSV@)rC^dCZqNA?AM6_q2-}G zPS{H2!pPx!>_-7=tEP}_q`iDkO`i@V8x_1(CsW@ox8d#l3u#D|G&9+5TA*6ME1!ko= z<0nfryDWTm$QzZJOV|ucB`7GJn0GrHks#JiGZwemavp#xofbdK+50&YlI}jbtb~b} z<8AFW2haK5&PM8mso@Be+?*#Sd$QF;7}qmY9yVkL6ZHcy+51*{P6bdE-!FdIe{CIw zyatT!JAUXIKu5i5>$IVxN*_9!n^Y~i5v=a(y%M>d(s;)=v#Gzl8aAeJe=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~Y~Zy~;(}zv!(KnKDq!nWpd6 zh#<6Vx2%T-mj;tbJdc>@6Df^EVI#&}llb16QDw{K;~YGVVn#L#&9wz$aqrh37j_Nt!>aLot$zA+`U8gk`Wk|S_vr?1cunXxhli|eq7i@PVI z%s|e=q@7d2EXF+?ZPkIA5|IXYdBz(oUJVB{W?q+g6PUw7N!KU&D?C8UAMG%7j5S`K z&9Os=YE1XHjDLjhQ$np?3HL6v6CRjWx}dJ{g{R$^aBCTD4LSOwq_5zX-cQCfQ{%^q zD2xAC>;xH}X9YD?hWI$qhIZ%hD6N|axH(ez2h?MXv<5J$B}^U$B%tPV6lKn?_9^H_ zQJ^tQ{j0_h>=Do@#zf@UxE43LXlyQtiF+_}yhov}e8K}xVev2lyQjna-48fO_4U&7 zD{FWXi4Sf*%{0^xyD?<$xAc||ihJ)3mowt1HaJXs#;8owS%e!F8j#!C=b-gYcCzXM z<)S_v4wWO9g<7*-`@rxHpm2^!h@_4rCH*W(xc#lGE{AE75S;hPkF)Ri1AD~ zW#-ql*4o "Items.Armor.Vanity"; + + public override void SetDefaults() + { + Item.width = 28; + Item.height = 20; + Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker + Item.rare = ItemRarityID.Pink; + Item.vanity = true; + Item.Calamity().donorItem = true; // Donor: xAqult (Sprites made by Gote) + } + } +} diff --git a/Items/Armor/Vanity/LucisHairstyle.png b/Items/Armor/Vanity/LucisHairstyle.png new file mode 100644 index 0000000000000000000000000000000000000000..5808d530128226d48344c08dd395cde73941613f GIT binary patch literal 576 zcmV-G0>AxW{!xZ8`d-g4}k%50L;Z(>e|7nUqx92ETryc zj^Y_x$7nGB@cyM_C45*K!bk&y#sRRz2=h5C?gA2v!ETJQ_5#zHEs&645RgOh%-aj6 zz*=&2e#8z+XBfz|hP7U9*083KdN0kG7H zD{j&244BW+^Ls^dFjxp?4lHdE3;~)u09Of!D^;WW3_Y$(%KOljfca*s`d~UN#TiVm znzI*7GY%RDpr>+JE`WIlJ+5K$FrUE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}PU-58ey!~HS8ghkha zhJm>+`3~6P2=zMeV;rFTvL1yQB{43FEPlg_cJyNsJ)|6?19C!9f@aJU{=i-i zSD$2Jv0<06?RcFa2bylKlBUjB=TO_2D<_5O<`Yq)eSV)anmveq6g4`m7{}) zt=~xBNN%u)a@{+p$s)s^IoH@7bgNGmIT%}FS97mi(}Xt5 z`u=hU{B_Y5XNQx8}FgIeJJs9b@-7q}IA%S_0G zDM%dqa&M!sp)LAeAJ;l4dq-CUVe`~W@Hv-d%zL9VE6C6)#ym%oDcvYH$3KbU|0rck zyxw1Oo@peQOO<-KifeiPoC`3w)G^2$Frak>D*Iz;7^Tx0V0sOid55MD1+pRF%|k1* zpBL;z1q4}+{}k`a?NxL6EC|zsMt0?LHx~~vyo&1}qz2MOJ#ej}Y53-Ls6f>S_jYUu z1soKjFgsvaTx*ex8U@<%2)I&6kwcR+8ZCHi0{2iPs?Fv5^uYoHfgPaFK((5Je*8ZIrfO|X|eVx17B{$(gH2(rT(UQFY literal 0 HcmV?d00001 diff --git a/Items/Armor/Vanity/LucisMilitaryUniform.cs b/Items/Armor/Vanity/LucisMilitaryUniform.cs new file mode 100644 index 0000000000..c2fde13007 --- /dev/null +++ b/Items/Armor/Vanity/LucisMilitaryUniform.cs @@ -0,0 +1,22 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Armor.Vanity +{ + [AutoloadEquip(EquipType.Body)] + public class LucisMilitaryUniform : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Armor.Vanity"; + + public override void SetDefaults() + { + Item.width = 26; + Item.height = 20; + Item.value = Item.buyPrice(gold: 10); // Sold by Steampunker + Item.rare = ItemRarityID.Pink; + Item.vanity = true; + Item.Calamity().donorItem = true; + } + } +} diff --git a/Items/Armor/Vanity/LucisMilitaryUniform.png b/Items/Armor/Vanity/LucisMilitaryUniform.png new file mode 100644 index 0000000000000000000000000000000000000000..d8017d98d069900b31109832b87b3c3dc47543b2 GIT binary patch liter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hv*nwMN28}Sc?utiS6FPe3ap^b2nKHe<(hl`_51HHSJN>~c7k2h- zF;K$T*x};MO??Z;^fpao@GwvOO&l=wDDKULV_@j&T$@xt@27 znLIHHEcQ~rYxrRZN&U5B(Gd#gG$0M@JkoDv3gfPG%~9Nz%spb)=cyoX3 zyk?XKJ#kH&Vp3OY-l=WOH+Qb92iVhfxtRrg+4ZMRNHHC-jY_Ai2&_60k2v+$#>`k) zQU4{@RStV>Y+;2_nTzcs)LE%Yn*!TsT(eHX*g}mB9T^OvAuqgy3ZM#5jsmCv%pL*k tmL@FRB;Yt@$_GK6^#861``a<-8U0P2>b-WLY7K&)cd)8IckLeNKLDv&t$zRj literal 0 HcmV?d00001 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index 2a23878b03..ef1dc5d284 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -2161,6 +2161,11 @@ HapuFruit: { Tooltip: "'A fruit that calms your nerves (may have unintended side effects)'" } +LucisSight: { + DisplayName: Luci's Sight + Tooltip: "'Fashionable glasses? In Earthia's current economy?!'" +} + OracleHeadphones: { DisplayName: Oracle Headphones Tooltip: "'Hey game's over!'" diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson index 7ac8dddb6c..dbcac168c2 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.Vanity.hjson @@ -128,6 +128,21 @@ LeviathanMask: { Tooltip: "" } +LucisBoots: { + DisplayName: Luci's Boots + Tooltip: "'One small step a time, you can do this.'" +} + +LucisHairstyle: { + DisplayName: Luci's Hairstyle + Tooltip: "'Hero of Light, Luci Skyshot.'" +} + +LucisMilitaryUniform: { + DisplayName: Luci's Military Uniform + Tooltip: "'Bearing the iconic Liberation Army insignia of freedom.'" +} + OldDukeMask: { DisplayName: Old Duke Mask Tooltip: "" diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 330a259a1a..2e8c0548e0 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using CalamityMod.Events; using CalamityMod.Items; using CalamityMod.Items.Accessories; +using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Ammo; using CalamityMod.Items.Armor; using CalamityMod.Items.Armor.Vanity; @@ -1207,7 +1208,11 @@ namespace CalamityMod.NPCs { shop.Add(ItemType(), Condition.NotRemixWorld) .Add(ItemID.PurpleSolution, Condition.InGraveyard, Condition.CrimsonWorld, Condition.NotRemixWorld) - .Add(ItemID.RedSolution, Condition.InGraveyard, Condition.CorruptWorld, Condition.NotRemixWorld); + .Add(ItemID.RedSolution, Condition.InGraveyard, Condition.CorruptWorld, Condition.NotRemixWorld) + .Add(ItemType()) + .Add(ItemType()) + .Add(ItemType()) + .Add(ItemType()); } if (type == NPCID.Wizard) From 651503f85aae28c971790e9d433a1d69b88e1e1f Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Wed, 4 Jun 2025 03:09:54 +0700 Subject: [PATCH 14/72] 2.1 im getting tired of that one build number is outdated from workshop text needing to be fixed every time we release a hotfix --- build.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.txt b/build.txt index 23f413337a..f89177c05d 100644 --- a/build.txt +++ b/build.txt @@ -1,5 +1,5 @@ author = The Calamity Dev Team -version = 2.0.4.006 +version = 2.1 displayName = Calamity Mod modReferences = CalamityModMusic homepage = https://discord.gg/calamity From f25ce7771e59d62fe249b55afaeaf0efa2e5bf6a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 3 Jun 2025 16:53:42 -0400 Subject: [PATCH 15/72] Bunch of Destroyer stuff 1 - Changed laser firing pattern to be rapid firing from head to tail, like in 1.5.0 2 - Decreased how often individual body segments fire lasers in Rev+ 3 - Destroyer and Probes no longer have further increased size in Death 4 - Fixed EoW and Destroyer forever having spawn DR outside of Rev (in-dev fix) 5 - Fixed Probes drawing backwards outside of Rev (in-dev fix) 6 - Changed Probe telegraph to be a sparkle instead of a glowmask --- NPCs/CalamityGlobalNPC.cs | 42 +++--- .../Bosses/DestroyerAI.cs | 123 +++++++++--------- 2 files changed, 79 insertions(+), 86 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 900cd940e9..ce7719554c 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1900,7 +1900,7 @@ namespace CalamityMod.NPCs else if (DestroyerIDList.Includes(npc.type)) { npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.25); - npc.scale *= Main.zenithWorld ? 2f : CalamityWorld.death ? 1.4f : 1.2f; + npc.scale *= Main.zenithWorld ? 2f : 1.2f; npc.npcSlots = 10f; } else if (npc.type == NPCID.Probe) @@ -1908,7 +1908,7 @@ namespace CalamityMod.NPCs if (CalamityWorld.death) npc.lifeMax = (int)Math.Round(npc.lifeMax * 2D); - npc.scale *= Main.zenithWorld ? 2f : CalamityWorld.death ? 1.4f : 1.2f; + npc.scale *= Main.zenithWorld ? 2f : 1.2f; } else if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType()) { @@ -3793,10 +3793,13 @@ namespace CalamityMod.NPCs ApplyDR(npc, ref modifiers); // Damage reduction on spawn for certain worm bosses. - if (EaterOfWorldsIDList.Includes(npc.type) && newAI[1] < EaterOfWorldsAI.DRIncreaseTime) - modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(BossRushEvent.BossRushActive ? 0.6f : 0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / EaterOfWorldsAI.DRIncreaseTime, 0f, 1f))); - if (DestroyerIDList.Includes(npc.type) && newAI[1] < DestroyerAI.DRIncreaseTime) - modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / DestroyerAI.DRIncreaseTime, 0f, 1f))); + if (CalamityWorld.revenge) + { + if (EaterOfWorldsIDList.Includes(npc.type) && newAI[1] < EaterOfWorldsAI.DRIncreaseTime) + modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(BossRushEvent.BossRushActive ? 0.6f : 0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / EaterOfWorldsAI.DRIncreaseTime, 0f, 1f))); + if (DestroyerIDList.Includes(npc.type) && newAI[1] < DestroyerAI.DRIncreaseTime) + modifiers.FinalDamage *= 1f - (float)Math.Sqrt(MathHelper.Lerp(0f, 0.99f, MathHelper.Clamp(1f - newAI[1] / DestroyerAI.DRIncreaseTime, 0f, 1f))); + } if (AstrumDeusIDList.Includes(npc.type)) { float drTime = newAI[0] != 0f ? 300f : 600f; @@ -6630,7 +6633,6 @@ namespace CalamityMod.NPCs #endregion - #region Summon Tag //doze 03-15-2025: A full refactor of the summon tag system to make it easier to use and more flexible. Ping me with any questions. private void EditSummonTagDamage(Projectile proj, NPC npc, ref NPC.HitModifiers modifiers) @@ -8084,7 +8086,7 @@ namespace CalamityMod.NPCs shouldDrawBool = false; } - if (npc.type == NPCID.Corruptor || npc.type == NPCID.BloodSquid || npc.type == NPCID.Probe || (npc.type == NPCID.HornetHoney && npc.ai[3] == 1f)) + if (npc.type == NPCID.Corruptor || npc.type == NPCID.BloodSquid || (npc.type == NPCID.HornetHoney && npc.ai[3] == 1f)) { Texture2D texture = TextureAssets.Npc[npc.type].Value; @@ -8439,10 +8441,8 @@ namespace CalamityMod.NPCs } else if (npc.type == NPCID.TheDestroyerBody && revenge) { - float shootProjectileTime = death ? (phase5 ? 120f : phase4 ? 150f : 180f) : 450f; - float bodySegmentTime = npc.ai[0] * (death ? 20f : 30f); - float shootProjectileGateValue = bodySegmentTime + shootProjectileTime; - float telegraphGateValue = shootProjectileGateValue - DestroyerAI.LaserTelegraphTime; + float shootProjectileTime = death ? (phase5 ? 180f : phase4 ? 270f : 360f) : 450f; + float telegraphGateValue = shootProjectileTime - DestroyerAI.LaserTelegraphTime; if (newAI[0] > telegraphGateValue) { switch (destroyerLaserColor) @@ -8486,22 +8486,18 @@ namespace CalamityMod.NPCs } // Laser telegraph - else if (npc.type == NPCID.Probe && CalamityClientConfig.Instance.EnableVanillaTextureEdits) + else if (npc.type == NPCID.Probe) { float eyeTelegraphGateValue = (NPC.IsMechQueenUp ? DestroyerAI.ProbeLaserGateValue_Mechdusa : BossRushEvent.BossRushActive ? DestroyerAI.ProbeLaserGateValue_BossRush : revenge ? DestroyerAI.ProbeLaserGateValue_Rev : DestroyerAI.ProbeLaserGateValue) - DestroyerAI.ProbeLaserTelegraphTime; - Texture2D glowTexture = ExtraTextureRefs.ProbeGlowmask.Value; + Texture2D glowTexture = Request("CalamityMod/Particles/Sparkle").Value; Vector2 halfSize = npc.frame.Size() / 2; - SpriteEffects spriteEffects = SpriteEffects.None; - if (npc.spriteDirection == -1) - spriteEffects = SpriteEffects.FlipHorizontally; + Vector2 drawPosition = npc.Center - screenPos + Vector2.UnitX.RotatedBy(npc.rotation) * (npc.width * 0.45f * npc.spriteDirection) + Vector2.UnitY * npc.gfxOffY; float colorScale = MathHelper.Clamp((npc.localAI[0] - eyeTelegraphGateValue) / DestroyerAI.ProbeLaserTelegraphTime, 0f, 1f); - Color drawColor2 = Color.Lerp(new Color(150, 0, 0, 192), new Color(255, 100, 150, 192), colorScale); - for (int i = 0; i < 2; i++) - { - spriteBatch.Draw(glowTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, - drawColor2, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); - } + Color drawColor2 = new Color(255, 100, 150, 192) * colorScale; + spriteBatch.SetBlendState(BlendState.Additive); + spriteBatch.Draw(glowTexture, drawPosition, npc.frame, drawColor2, npc.rotation, halfSize, npc.scale * 1.1f, SpriteEffects.None, 0f); + spriteBatch.SetBlendState(BlendState.AlphaBlend); } if (revenge) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index c26be9d26d..daf09376b2 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -311,13 +311,14 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (j == totalSegments) type = NPCID.TheDestroyerTail; - int segment = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X), (int)(npc.position.Y + npc.height), type, npc.whoAmI); - Main.npc[segment].ai[3] = npc.whoAmI; - Main.npc[segment].realLife = npc.whoAmI; - Main.npc[segment].ai[1] = index; - Main.npc[index].ai[0] = segment; - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, segment); - index = segment; + int segment = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X), (int)(npc.position.Y + npc.height), type, npc.whoAmI); + Main.npc[segment].ai[3] = npc.whoAmI; + Main.npc[segment].realLife = npc.whoAmI; + Main.npc[segment].ai[1] = index; + Main.npc[index].ai[0] = segment; + Main.npc[index].Calamity().newAI[0] = -90f - Main.npc[index].ai[0] * (death ? 12f : 3f); // This controls the delay between laser shots + NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, segment); + index = segment; } } @@ -412,28 +413,25 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Set laser color and type if (calamityGlobalNPC.destroyerLaserColor == -1 && !probeLaunched) { - if (Main.rand.NextBool(death ? OneInXChanceToFireLaser / (phase5 ? 4 : phase4 ? 3 : 2) : OneInXChanceToFireLaser)) + int random = phase3 ? 4 : phase2 ? 3 : 2; + switch (Main.rand.Next(random)) { - int random = phase3 ? 4 : phase2 ? 3 : 2; - switch (Main.rand.Next(random)) - { - case 0: - case 1: - calamityGlobalNPC.destroyerLaserColor = 0; - break; - case 2: - calamityGlobalNPC.destroyerLaserColor = 1; - break; - case 3: - calamityGlobalNPC.destroyerLaserColor = 2; - break; - } - - if (calamityGlobalNPC.newAI[2] > 0f || bossRush) + case 0: + case 1: + calamityGlobalNPC.destroyerLaserColor = 0; + break; + case 2: + calamityGlobalNPC.destroyerLaserColor = 1; + break; + case 3: calamityGlobalNPC.destroyerLaserColor = 2; - - npc.SyncDestroyerLaserColor(); + break; } + + if (calamityGlobalNPC.newAI[2] > 0f || bossRush) + calamityGlobalNPC.destroyerLaserColor = 2; + + npc.SyncDestroyerLaserColor(); } if (probeLaunched && ableToFireLaser) @@ -443,12 +441,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } // Laser rate of fire - float shootProjectileTime = death ? (phase5 ? 120f : phase4 ? 150f : 180f) : 450f; - float bodySegmentTime = npc.ai[0] * (death ? 20f : 30f); - float shootProjectileGateValue = bodySegmentTime + shootProjectileTime; - float laserTimerIncrement = (calamityGlobalNPC.newAI[0] > shootProjectileGateValue - LaserTelegraphTime) ? 1f : 2f; + float shootProjectileTime = death ? (phase5 ? 180f : phase4 ? 270f : 360f) : 450f; if (ableToFireLaser) - calamityGlobalNPC.newAI[0] += laserTimerIncrement; + calamityGlobalNPC.newAI[0] += 1f; if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -471,7 +466,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses break; } - if (calamityGlobalNPC.newAI[0] == shootProjectileGateValue - LaserTelegraphTime) + if (calamityGlobalNPC.newAI[0] == shootProjectileTime - LaserTelegraphTime) { Particle telegraph = new DestroyerReticleTelegraph( npc, @@ -482,7 +477,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses GeneralParticleHandler.SpawnParticle(telegraph); } - if (calamityGlobalNPC.newAI[0] == shootProjectileGateValue - SparkTelegraphTime) + if (calamityGlobalNPC.newAI[0] == shootProjectileTime - SparkTelegraphTime) { Particle spark = new DestroyerSparkTelegraph( npc, @@ -496,40 +491,44 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Shoot lasers // Shoot nothing if probe has been launched - if (calamityGlobalNPC.newAI[0] >= shootProjectileGateValue && ableToFireLaser) + if (calamityGlobalNPC.newAI[0] >= shootProjectileTime && ableToFireLaser) { + int numProbeSegments = 0; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == npc.type && Main.npc[i].ai[2] == 0f) + numProbeSegments++; + } + float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); + float laserShootTimeBonus = (int)MathHelper.Lerp(0f, shootProjectileTime - LaserTelegraphTime, 1f - lerpAmount); + // Controls the fire rate getting slower as health lowers if (!death) { - int numProbeSegments = 0; - for (int i = 0; i < Main.maxNPCs; i++) + if (npc.localAI[3] == 0f && phase2) { - if (Main.npc[i].active && Main.npc[i].type == npc.type && Main.npc[i].ai[2] == 0f) - numProbeSegments++; + npc.localAI[3] = 1f; + npc.SyncVanillaLocalAI(); + laserShootTimeBonus -= npc.ai[0] * 2f; + } + else if (npc.localAI[3] == 1f && phase3) + { + npc.localAI[3] = 2f; + npc.SyncVanillaLocalAI(); + laserShootTimeBonus -= npc.ai[0] * 2f; + } + else if (npc.localAI[3] == 2f && startFlightPhase) + { + npc.localAI[3] = 3f; + npc.SyncVanillaLocalAI(); + laserShootTimeBonus -= npc.ai[0]; } - float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); - float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); - calamityGlobalNPC.newAI[0] = laserShootTimeBonus; - npc.SyncExtraAI(); - CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults); } + calamityGlobalNPC.newAI[0] = laserShootTimeBonus; + npc.SyncExtraAI(); + CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults); if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) { - if (death) - { - int numProbeSegments = 0; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == npc.type && Main.npc[i].ai[2] == 0f) - numProbeSegments++; - } - float lerpAmount = MathHelper.Clamp(numProbeSegments / (float)totalSegments, 0f, 1f); - float laserShootTimeBonus = (int)MathHelper.Lerp(0f, (shootProjectileTime + bodySegmentTime * lerpAmount) - LaserTelegraphTime, 1f - lerpAmount); - calamityGlobalNPC.newAI[0] = laserShootTimeBonus; - npc.SyncExtraAI(); - CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults); - } - // Laser speed float projectileSpeed = (death ? 4.5f : 3.5f) + Main.rand.NextFloat() * 1.5f; projectileSpeed += enrageScale; @@ -713,9 +712,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses else if (npc.type == NPCID.TheDestroyerBody) { float shootProjectileTime = (CalamityWorld.death || BossRushEvent.BossRushActive) ? 270f : 450f; - float bodySegmentTime = npc.ai[0] * 30f; - float shootProjectileGateValue = bodySegmentTime + shootProjectileTime; - float telegraphGateValue = shootProjectileGateValue - LaserTelegraphTime; + float telegraphGateValue = shootProjectileTime - LaserTelegraphTime; if (calamityGlobalNPC.newAI[0] > telegraphGateValue) { switch (calamityGlobalNPC.destroyerLaserColor) @@ -1241,12 +1238,12 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (targetData.Center.X - npc.Center.X > 0f) { - npc.spriteDirection = -1; + npc.spriteDirection = 1; npc.rotation = (float)Math.Atan2(targetData.Center.Y - npc.Center.Y, targetData.Center.X - npc.Center.X); } else { - npc.spriteDirection = 1; + npc.spriteDirection = -1; npc.rotation = (float)Math.Atan2(targetData.Center.Y - npc.Center.Y, targetData.Center.X - npc.Center.X) + MathHelper.Pi; } From bebc57a75ec678e9ccf5848124dc704d9b8c715c Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 28 May 2025 12:58:01 -0700 Subject: [PATCH 16/72] Makes Holy Collider able to launch Provi's fireballs --- Projectiles/Melee/HolyColliderHoldout.cs | 29 +++++++++++++++++++---- Projectiles/Melee/HolyColliderHolyFire.cs | 2 +- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index ae4988b83b..85b81b9c35 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -5,6 +5,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.NPCs; using CalamityMod.Particles; using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.Boss; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -333,10 +334,29 @@ namespace CalamityMod.Projectiles.Melee for (int x = 0; x < Main.maxProjectiles; x++) { Projectile projectile = Main.projectile[x]; - if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 && projectile.active && projectile.type == ModContent.ProjectileType()) + bool isProviProj = (projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType() || + projectile.type == ModContent.ProjectileType()); + bool isAFireball = (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10) || isProviProj; + if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 + Math.Max(projectile.width, projectile.height) && projectile.active && isAFireball) { - projectile.ai[2] = 5; - projectile.owner = Owner.whoAmI; + if (isProviProj) + { + Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), projectile.Center, (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f, ModContent.ProjectileType(), (int)((Projectile.damage * 0.1) + projectile.damage), Projectile.knockBack, Projectile.owner, 0, 15, 5); + Particle orb2 = new CustomPulse(projectile.Center, Vector2.Zero, Color.Goldenrod, "CalamityMod/Particles/BloomRing", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0, 0.8f, 11); + GeneralParticleHandler.SpawnParticle(orb2); + if (projectile.type == ModContent.ProjectileType()) + projectile.active = false; + else + projectile.Kill(); + } + else + { + projectile.ai[2] = 5; + projectile.owner = Owner.whoAmI; + } } } } @@ -345,7 +365,8 @@ namespace CalamityMod.Projectiles.Melee for (int x = 0; x < Main.maxProjectiles; x++) { Projectile projectile = Main.projectile[x]; - if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 && projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10) + bool isAFireball = (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10); + if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 && isAFireball) { Vector2 launch = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f; projectile.velocity += launch; diff --git a/Projectiles/Melee/HolyColliderHolyFire.cs b/Projectiles/Melee/HolyColliderHolyFire.cs index fd51d02d91..828efb341a 100644 --- a/Projectiles/Melee/HolyColliderHolyFire.cs +++ b/Projectiles/Melee/HolyColliderHolyFire.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Projectiles.Melee public bool setStats = true; public static int statMax = 8; public int setStatTimer = statMax; - public int time = 0; + public ref float time => ref Projectile.ai[1]; public override void SetStaticDefaults() { Main.projFrames[Type] = 4; From 445ad6b0efa281da9307ac25cd241e0ca4a628c3 Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 28 May 2025 23:34:11 -0700 Subject: [PATCH 17/72] Better proj collision --- Projectiles/Melee/HolyColliderHoldout.cs | 4 ++-- Projectiles/Melee/HolyColliderHolyFire.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index 85b81b9c35..1ae89b259a 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -340,7 +340,7 @@ namespace CalamityMod.Projectiles.Melee projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()); bool isAFireball = (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10) || isProviProj; - if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 + Math.Max(projectile.width, projectile.height) && projectile.active && isAFireball) + if (Vector2.Distance(Owner.Center + (new Vector2(60, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 150 + Math.Max(projectile.width, projectile.height) && projectile.active && isAFireball) { if (isProviProj) { @@ -366,7 +366,7 @@ namespace CalamityMod.Projectiles.Melee { Projectile projectile = Main.projectile[x]; bool isAFireball = (projectile.active && projectile.type == ModContent.ProjectileType() && projectile.ai[0] != 10); - if (Vector2.Distance(Owner.Center + (new Vector2(100, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 100 && isAFireball) + if (Vector2.Distance(Owner.Center + (new Vector2(60, 0).RotatedBy(FinalRotation + MathHelper.ToRadians(-45))), projectile.Center) <= 150 && isAFireball) { Vector2 launch = (Owner.Center - Owner.Calamity().mouseWorld).SafeNormalize(Vector2.UnitY) * -2.5f; projectile.velocity += launch; diff --git a/Projectiles/Melee/HolyColliderHolyFire.cs b/Projectiles/Melee/HolyColliderHolyFire.cs index 828efb341a..d5b585955f 100644 --- a/Projectiles/Melee/HolyColliderHolyFire.cs +++ b/Projectiles/Melee/HolyColliderHolyFire.cs @@ -44,10 +44,13 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { Player Owner = Main.player[Projectile.owner]; - if (Projectile.ai[2] == 5 && time > 10 && Projectile.ai[0] != 10) + int hitTime = 13; // Time to pass before it can be launched + + if (Projectile.ai[2] == 5 && time >= hitTime && Projectile.ai[0] != 10) isLaunched = true; else Projectile.ai[2] = 0; + Projectile.scale = Utils.GetLerpValue(0, 40, Projectile.timeLeft, true); From b547614358eb2329a2c2471f00de81456d22bb80 Mon Sep 17 00:00:00 2001 From: Xyk Date: Wed, 28 May 2025 12:56:07 -0700 Subject: [PATCH 18/72] Fixed some bullets breaking when fired from Infinity and Svant --- Items/Weapons/Ranged/Infinity.cs | 4 ++-- Items/Weapons/Ranged/Svantechnical.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Ranged/Infinity.cs b/Items/Weapons/Ranged/Infinity.cs index 8a164a88ae..f2f5ffe8ec 100644 --- a/Items/Weapons/Ranged/Infinity.cs +++ b/Items/Weapons/Ranged/Infinity.cs @@ -64,8 +64,8 @@ namespace CalamityMod.Items.Weapons.Ranged { Vector2 helixVel1 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine)); Vector2 helixVel2 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(-sine)); - int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 1f); - int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 1f); + int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 1 : 0); + int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 1 : 0); } else if (player.altFunctionUse != 2) { diff --git a/Items/Weapons/Ranged/Svantechnical.cs b/Items/Weapons/Ranged/Svantechnical.cs index 2261b93f72..d8f1d3de75 100644 --- a/Items/Weapons/Ranged/Svantechnical.cs +++ b/Items/Weapons/Ranged/Svantechnical.cs @@ -65,9 +65,9 @@ namespace CalamityMod.Items.Weapons.Ranged Vector2 helixVel1 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine)); Vector2 helixVel2 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(-sine)); Vector2 helixVel3 = (velocity * Main.rand.NextFloat(0.9f, 1.1f)).RotatedBy(MathHelper.ToRadians(sine2)); - int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 2f); - int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 4f); - int shot3 = Projectile.NewProjectile(source, position.X, position.Y, helixVel3.X, helixVel3.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, 3f); + int shot1 = Projectile.NewProjectile(source, position.X, position.Y, helixVel1.X, helixVel1.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 2f : 0); + int shot2 = Projectile.NewProjectile(source, position.X, position.Y, helixVel2.X, helixVel2.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 4f : 0); + int shot3 = Projectile.NewProjectile(source, position.X, position.Y, helixVel3.X, helixVel3.Y, shotType, damage, knockback, player.whoAmI, 0f, 0, player.altFunctionUse != 2 ? 3f : 0); } else if (player.altFunctionUse != 2) { From 87b8f0f95bd03edf6b0f988d6f2e16c4c73fd245 Mon Sep 17 00:00:00 2001 From: Eddie Spaghetti Date: Tue, 3 Jun 2025 17:36:36 -0500 Subject: [PATCH 19/72] Refactors Refactored Aerospec and Auric armor to have readable internal names. --- .../{AerospecHat.cs => AerospecHeadMagic.cs} | 3 ++- .../{AerospecHat.png => AerospecHeadMagic.png} | Bin ...ospecHat_Head.png => AerospecHeadMagic_Head.png} | Bin .../{AerospecHelm.cs => AerospecHeadMelee.cs} | 5 +++-- .../{AerospecHelm.png => AerospecHeadMelee.png} | Bin ...specHelm_Head.png => AerospecHeadMelee_Head.png} | Bin .../{AerospecHood.cs => AerospecHeadRanged.cs} | 5 +++-- .../{AerospecHood.png => AerospecHeadRanged.png} | Bin ...pecHood_Head.png => AerospecHeadRanged_Head.png} | Bin .../{AerospecHeadgear.cs => AerospecHeadRogue.cs} | 5 +++-- .../{AerospecHeadgear.png => AerospecHeadRogue.png} | Bin ...Headgear_Head.png => AerospecHeadRogue_Head.png} | Bin .../{AerospecHelmet.cs => AerospecHeadSummon.cs} | 5 +++-- .../{AerospecHelmet.png => AerospecHeadSummon.png} | Bin ...cHelmet_Head.png => AerospecHeadSummon_Head.png} | Bin ...laWireHemmedVisage.cs => AuricTeslaHeadMagic.cs} | 5 +++-- ...WireHemmedVisage.png => AuricTeslaHeadMagic.png} | Bin ...Visage_Head.png => AuricTeslaHeadMagic_Head.png} | Bin ...uricTeslaRoyalHelm.cs => AuricTeslaHeadMelee.cs} | 5 +++-- ...icTeslaRoyalHelm.png => AuricTeslaHeadMelee.png} | Bin ...alHelm_Head.png => AuricTeslaHeadMelee_Head.png} | Bin ...slaHoodedFacemask.cs => AuricTeslaHeadRanged.cs} | 5 +++-- ...aHoodedFacemask.png => AuricTeslaHeadRanged.png} | Bin ...emask_Head.png => AuricTeslaHeadRanged_Head.png} | Bin ...ricTeslaPlumedHelm.cs => AuricTeslaHeadRogue.cs} | 3 ++- ...cTeslaPlumedHelm.png => AuricTeslaHeadRogue.png} | Bin ...edHelm_Head.png => AuricTeslaHeadRogue_Head.png} | Bin ...cTeslaSpaceHelmet.cs => AuricTeslaHeadSummon.cs} | 5 +++-- ...eslaSpaceHelmet.png => AuricTeslaHeadSummon.png} | Bin ...elmet_Head.png => AuricTeslaHeadSummon_Head.png} | Bin .../Mods.CalamityMod.Items.Armor.PostMoonLord.hjson | 10 +++++----- .../Mods.CalamityMod.Items.Armor.PreHardmode.hjson | 12 ++++++------ 32 files changed, 39 insertions(+), 29 deletions(-) rename Items/Armor/Aerospec/{AerospecHat.cs => AerospecHeadMagic.cs} (95%) rename Items/Armor/Aerospec/{AerospecHat.png => AerospecHeadMagic.png} (100%) rename Items/Armor/Aerospec/{AerospecHat_Head.png => AerospecHeadMagic_Head.png} (100%) rename Items/Armor/Aerospec/{AerospecHelm.cs => AerospecHeadMelee.cs} (94%) rename Items/Armor/Aerospec/{AerospecHelm.png => AerospecHeadMelee.png} (100%) rename Items/Armor/Aerospec/{AerospecHelm_Head.png => AerospecHeadMelee_Head.png} (100%) rename Items/Armor/Aerospec/{AerospecHood.cs => AerospecHeadRanged.cs} (94%) rename Items/Armor/Aerospec/{AerospecHood.png => AerospecHeadRanged.png} (100%) rename Items/Armor/Aerospec/{AerospecHood_Head.png => AerospecHeadRanged_Head.png} (100%) rename Items/Armor/Aerospec/{AerospecHeadgear.cs => AerospecHeadRogue.cs} (94%) rename Items/Armor/Aerospec/{AerospecHeadgear.png => AerospecHeadRogue.png} (100%) rename Items/Armor/Aerospec/{AerospecHeadgear_Head.png => AerospecHeadRogue_Head.png} (100%) rename Items/Armor/Aerospec/{AerospecHelmet.cs => AerospecHeadSummon.cs} (96%) rename Items/Armor/Aerospec/{AerospecHelmet.png => AerospecHeadSummon.png} (100%) rename Items/Armor/Aerospec/{AerospecHelmet_Head.png => AerospecHeadSummon_Head.png} (100%) rename Items/Armor/Auric/{AuricTeslaWireHemmedVisage.cs => AuricTeslaHeadMagic.cs} (96%) rename Items/Armor/Auric/{AuricTeslaWireHemmedVisage.png => AuricTeslaHeadMagic.png} (100%) rename Items/Armor/Auric/{AuricTeslaWireHemmedVisage_Head.png => AuricTeslaHeadMagic_Head.png} (100%) rename Items/Armor/Auric/{AuricTeslaRoyalHelm.cs => AuricTeslaHeadMelee.cs} (97%) rename Items/Armor/Auric/{AuricTeslaRoyalHelm.png => AuricTeslaHeadMelee.png} (100%) rename Items/Armor/Auric/{AuricTeslaRoyalHelm_Head.png => AuricTeslaHeadMelee_Head.png} (100%) rename Items/Armor/Auric/{AuricTeslaHoodedFacemask.cs => AuricTeslaHeadRanged.cs} (96%) rename Items/Armor/Auric/{AuricTeslaHoodedFacemask.png => AuricTeslaHeadRanged.png} (100%) rename Items/Armor/Auric/{AuricTeslaHoodedFacemask_Head.png => AuricTeslaHeadRanged_Head.png} (100%) rename Items/Armor/Auric/{AuricTeslaPlumedHelm.cs => AuricTeslaHeadRogue.cs} (97%) rename Items/Armor/Auric/{AuricTeslaPlumedHelm.png => AuricTeslaHeadRogue.png} (100%) rename Items/Armor/Auric/{AuricTeslaPlumedHelm_Head.png => AuricTeslaHeadRogue_Head.png} (100%) rename Items/Armor/Auric/{AuricTeslaSpaceHelmet.cs => AuricTeslaHeadSummon.cs} (96%) rename Items/Armor/Auric/{AuricTeslaSpaceHelmet.png => AuricTeslaHeadSummon.png} (100%) rename Items/Armor/Auric/{AuricTeslaSpaceHelmet_Head.png => AuricTeslaHeadSummon_Head.png} (100%) diff --git a/Items/Armor/Aerospec/AerospecHat.cs b/Items/Armor/Aerospec/AerospecHeadMagic.cs similarity index 95% rename from Items/Armor/Aerospec/AerospecHat.cs rename to Items/Armor/Aerospec/AerospecHeadMagic.cs index 5b81c6206c..084d548d20 100644 --- a/Items/Armor/Aerospec/AerospecHat.cs +++ b/Items/Armor/Aerospec/AerospecHeadMagic.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - public class AerospecHat : ModItem, ILocalizedModType + [LegacyName("AerospecHat")] + public class AerospecHeadMagic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; public override void SetDefaults() diff --git a/Items/Armor/Aerospec/AerospecHat.png b/Items/Armor/Aerospec/AerospecHeadMagic.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHat.png rename to Items/Armor/Aerospec/AerospecHeadMagic.png diff --git a/Items/Armor/Aerospec/AerospecHat_Head.png b/Items/Armor/Aerospec/AerospecHeadMagic_Head.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHat_Head.png rename to Items/Armor/Aerospec/AerospecHeadMagic_Head.png diff --git a/Items/Armor/Aerospec/AerospecHelm.cs b/Items/Armor/Aerospec/AerospecHeadMelee.cs similarity index 94% rename from Items/Armor/Aerospec/AerospecHelm.cs rename to Items/Armor/Aerospec/AerospecHeadMelee.cs index 0a8e39c35d..1d7b21e058 100644 --- a/Items/Armor/Aerospec/AerospecHelm.cs +++ b/Items/Armor/Aerospec/AerospecHeadMelee.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - public class AerospecHelm : ModItem, ILocalizedModType + [LegacyName("AerospecHelm")] + public class AerospecHeadMelee : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; public override void SetDefaults() @@ -52,7 +53,7 @@ namespace CalamityMod.Items.Armor.Aerospec AddIngredient(ItemID.SunplateBlock, 3). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). - SortBeforeFirstRecipesOf(ModContent.ItemType()). + SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Aerospec/AerospecHelm.png b/Items/Armor/Aerospec/AerospecHeadMelee.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHelm.png rename to Items/Armor/Aerospec/AerospecHeadMelee.png diff --git a/Items/Armor/Aerospec/AerospecHelm_Head.png b/Items/Armor/Aerospec/AerospecHeadMelee_Head.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHelm_Head.png rename to Items/Armor/Aerospec/AerospecHeadMelee_Head.png diff --git a/Items/Armor/Aerospec/AerospecHood.cs b/Items/Armor/Aerospec/AerospecHeadRanged.cs similarity index 94% rename from Items/Armor/Aerospec/AerospecHood.cs rename to Items/Armor/Aerospec/AerospecHeadRanged.cs index 6b41319026..01fc45869d 100644 --- a/Items/Armor/Aerospec/AerospecHood.cs +++ b/Items/Armor/Aerospec/AerospecHeadRanged.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - public class AerospecHood : ModItem, ILocalizedModType + [LegacyName("AerospecHood")] + public class AerospecHeadRanged : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; public override void SetDefaults() @@ -51,7 +52,7 @@ namespace CalamityMod.Items.Armor.Aerospec AddIngredient(ItemID.SunplateBlock, 3). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). - SortAfterFirstRecipesOf(ModContent.ItemType()). + SortAfterFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Aerospec/AerospecHood.png b/Items/Armor/Aerospec/AerospecHeadRanged.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHood.png rename to Items/Armor/Aerospec/AerospecHeadRanged.png diff --git a/Items/Armor/Aerospec/AerospecHood_Head.png b/Items/Armor/Aerospec/AerospecHeadRanged_Head.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHood_Head.png rename to Items/Armor/Aerospec/AerospecHeadRanged_Head.png diff --git a/Items/Armor/Aerospec/AerospecHeadgear.cs b/Items/Armor/Aerospec/AerospecHeadRogue.cs similarity index 94% rename from Items/Armor/Aerospec/AerospecHeadgear.cs rename to Items/Armor/Aerospec/AerospecHeadRogue.cs index e4e6d096d3..be4a49a3d4 100644 --- a/Items/Armor/Aerospec/AerospecHeadgear.cs +++ b/Items/Armor/Aerospec/AerospecHeadRogue.cs @@ -7,7 +7,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - public class AerospecHeadgear : ModItem, ILocalizedModType + [LegacyName("AerospecHeadgear")] + public class AerospecHeadRogue : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; public override void SetStaticDefaults() @@ -60,7 +61,7 @@ namespace CalamityMod.Items.Armor.Aerospec AddIngredient(ItemID.SunplateBlock, 3). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). - SortAfterFirstRecipesOf(ModContent.ItemType()). + SortAfterFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Aerospec/AerospecHeadgear.png b/Items/Armor/Aerospec/AerospecHeadRogue.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHeadgear.png rename to Items/Armor/Aerospec/AerospecHeadRogue.png diff --git a/Items/Armor/Aerospec/AerospecHeadgear_Head.png b/Items/Armor/Aerospec/AerospecHeadRogue_Head.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHeadgear_Head.png rename to Items/Armor/Aerospec/AerospecHeadRogue_Head.png diff --git a/Items/Armor/Aerospec/AerospecHelmet.cs b/Items/Armor/Aerospec/AerospecHeadSummon.cs similarity index 96% rename from Items/Armor/Aerospec/AerospecHelmet.cs rename to Items/Armor/Aerospec/AerospecHeadSummon.cs index 2ab7b3fd09..30c0bd3564 100644 --- a/Items/Armor/Aerospec/AerospecHelmet.cs +++ b/Items/Armor/Aerospec/AerospecHeadSummon.cs @@ -10,7 +10,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - public class AerospecHelmet : ModItem, ILocalizedModType + [LegacyName("AreospectHelmet")] + public class AerospecHeadSummon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; public static int ValkyrieDamage = 20; @@ -74,7 +75,7 @@ namespace CalamityMod.Items.Armor.Aerospec AddIngredient(ItemID.SunplateBlock, 3). AddIngredient(ItemID.Feather). AddTile(TileID.Anvils). - SortBeforeFirstRecipesOf(ModContent.ItemType()). + SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Aerospec/AerospecHelmet.png b/Items/Armor/Aerospec/AerospecHeadSummon.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHelmet.png rename to Items/Armor/Aerospec/AerospecHeadSummon.png diff --git a/Items/Armor/Aerospec/AerospecHelmet_Head.png b/Items/Armor/Aerospec/AerospecHeadSummon_Head.png similarity index 100% rename from Items/Armor/Aerospec/AerospecHelmet_Head.png rename to Items/Armor/Aerospec/AerospecHeadSummon_Head.png diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs b/Items/Armor/Auric/AuricTeslaHeadMagic.cs similarity index 96% rename from Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs rename to Items/Armor/Auric/AuricTeslaHeadMagic.cs index aa367ba49a..6c932422b7 100644 --- a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.cs +++ b/Items/Armor/Auric/AuricTeslaHeadMagic.cs @@ -12,7 +12,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Auric { [AutoloadEquip(EquipType.Head)] - public class AuricTeslaWireHemmedVisage : ModItem, ILocalizedModType + [LegacyName("AuricTeslaWireHemmedVisage")] + public class AuricTeslaHeadMagic : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PostMoonLord"; public override void SetDefaults() @@ -95,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(12). AddTile(). - SortBeforeFirstRecipesOf(ModContent.ItemType()). + SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage.png b/Items/Armor/Auric/AuricTeslaHeadMagic.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaWireHemmedVisage.png rename to Items/Armor/Auric/AuricTeslaHeadMagic.png diff --git a/Items/Armor/Auric/AuricTeslaWireHemmedVisage_Head.png b/Items/Armor/Auric/AuricTeslaHeadMagic_Head.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaWireHemmedVisage_Head.png rename to Items/Armor/Auric/AuricTeslaHeadMagic_Head.png diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs b/Items/Armor/Auric/AuricTeslaHeadMelee.cs similarity index 97% rename from Items/Armor/Auric/AuricTeslaRoyalHelm.cs rename to Items/Armor/Auric/AuricTeslaHeadMelee.cs index ce0b3e9aae..bb5430ef7a 100644 --- a/Items/Armor/Auric/AuricTeslaRoyalHelm.cs +++ b/Items/Armor/Auric/AuricTeslaHeadMelee.cs @@ -15,7 +15,8 @@ namespace CalamityMod.Items.Armor.Auric { [AutoloadEquip(EquipType.Head)] [LegacyName("AuricTeslaHelm")] - public class AuricTeslaRoyalHelm : ModItem, ILocalizedModType + [LegacyName("AuricTeslaRoyalHelm")] + public class AuricTeslaHeadMelee : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PostMoonLord"; public override void SetDefaults() @@ -103,7 +104,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(12). AddTile(). - SortBeforeFirstRecipesOf(ModContent.ItemType()). + SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm.png b/Items/Armor/Auric/AuricTeslaHeadMelee.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaRoyalHelm.png rename to Items/Armor/Auric/AuricTeslaHeadMelee.png diff --git a/Items/Armor/Auric/AuricTeslaRoyalHelm_Head.png b/Items/Armor/Auric/AuricTeslaHeadMelee_Head.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaRoyalHelm_Head.png rename to Items/Armor/Auric/AuricTeslaHeadMelee_Head.png diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs b/Items/Armor/Auric/AuricTeslaHeadRanged.cs similarity index 96% rename from Items/Armor/Auric/AuricTeslaHoodedFacemask.cs rename to Items/Armor/Auric/AuricTeslaHeadRanged.cs index 061585b631..27e6e250ed 100644 --- a/Items/Armor/Auric/AuricTeslaHoodedFacemask.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRanged.cs @@ -13,7 +13,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Auric { [AutoloadEquip(EquipType.Head)] - public class AuricTeslaHoodedFacemask : ModItem, ILocalizedModType + [LegacyName("AuricTeslaHoodedFacemask")] + public class AuricTeslaHeadRanged : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PostMoonLord"; public override void SetDefaults() @@ -98,7 +99,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(12). AddTile(). - SortBeforeFirstRecipesOf(ModContent.ItemType()). + SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask.png b/Items/Armor/Auric/AuricTeslaHeadRanged.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaHoodedFacemask.png rename to Items/Armor/Auric/AuricTeslaHeadRanged.png diff --git a/Items/Armor/Auric/AuricTeslaHoodedFacemask_Head.png b/Items/Armor/Auric/AuricTeslaHeadRanged_Head.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaHoodedFacemask_Head.png rename to Items/Armor/Auric/AuricTeslaHeadRanged_Head.png diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs b/Items/Armor/Auric/AuricTeslaHeadRogue.cs similarity index 97% rename from Items/Armor/Auric/AuricTeslaPlumedHelm.cs rename to Items/Armor/Auric/AuricTeslaHeadRogue.cs index e7bc207d37..bab13f54b6 100644 --- a/Items/Armor/Auric/AuricTeslaPlumedHelm.cs +++ b/Items/Armor/Auric/AuricTeslaHeadRogue.cs @@ -13,7 +13,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Auric { [AutoloadEquip(EquipType.Head)] - public class AuricTeslaPlumedHelm : ModItem, ILocalizedModType + [LegacyName("AuricTeslaPlumedHelm")] + public class AuricTeslaHeadRogue : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PostMoonLord"; public override void SetDefaults() diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm.png b/Items/Armor/Auric/AuricTeslaHeadRogue.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaPlumedHelm.png rename to Items/Armor/Auric/AuricTeslaHeadRogue.png diff --git a/Items/Armor/Auric/AuricTeslaPlumedHelm_Head.png b/Items/Armor/Auric/AuricTeslaHeadRogue_Head.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaPlumedHelm_Head.png rename to Items/Armor/Auric/AuricTeslaHeadRogue_Head.png diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs b/Items/Armor/Auric/AuricTeslaHeadSummon.cs similarity index 96% rename from Items/Armor/Auric/AuricTeslaSpaceHelmet.cs rename to Items/Armor/Auric/AuricTeslaHeadSummon.cs index b15fc1f6fd..44c56a3720 100644 --- a/Items/Armor/Auric/AuricTeslaSpaceHelmet.cs +++ b/Items/Armor/Auric/AuricTeslaHeadSummon.cs @@ -12,7 +12,8 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Auric { [AutoloadEquip(EquipType.Head)] - public class AuricTeslaSpaceHelmet : ModItem, ILocalizedModType + [LegacyName("AuricTeslaSpaceHelmet")] + public class AuricTeslaHeadSummon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PostMoonLord"; public override void SetDefaults() @@ -95,7 +96,7 @@ namespace CalamityMod.Items.Armor.Auric AddIngredient(). AddIngredient(12). AddTile(). - SortBeforeFirstRecipesOf(ModContent.ItemType()). + SortBeforeFirstRecipesOf(ModContent.ItemType()). Register(); } } diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet.png b/Items/Armor/Auric/AuricTeslaHeadSummon.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaSpaceHelmet.png rename to Items/Armor/Auric/AuricTeslaHeadSummon.png diff --git a/Items/Armor/Auric/AuricTeslaSpaceHelmet_Head.png b/Items/Armor/Auric/AuricTeslaHeadSummon_Head.png similarity index 100% rename from Items/Armor/Auric/AuricTeslaSpaceHelmet_Head.png rename to Items/Armor/Auric/AuricTeslaHeadSummon_Head.png diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson index 3f5b3eb4a3..645abad5d7 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PostMoonLord.hjson @@ -17,7 +17,7 @@ AuricTeslaCuisses: { ''' } -AuricTeslaHoodedFacemask: { +AuricTeslaHeadRanged: { DisplayName: Auric Tesla Hooded Facemask Tooltip: 30% increased ranged damage and critical strike chance SetBonus: @@ -45,7 +45,7 @@ AuricTeslaHoodedFacemask: { ''' } -AuricTeslaPlumedHelm: { +AuricTeslaHeadRogue: { DisplayName: Auric Tesla Plumed Helm Tooltip: ''' @@ -78,7 +78,7 @@ AuricTeslaPlumedHelm: { ''' } -AuricTeslaRoyalHelm: { +AuricTeslaHeadMelee: { DisplayName: Auric Tesla Royal Helm Tooltip: ''' @@ -112,7 +112,7 @@ AuricTeslaRoyalHelm: { ''' } -AuricTeslaSpaceHelmet: { +AuricTeslaHeadSummon: { DisplayName: Auric Tesla Space Helmet Tooltip: 15% increased summon damage SetBonus: @@ -142,7 +142,7 @@ AuricTeslaSpaceHelmet: { ''' } -AuricTeslaWireHemmedVisage: { +AuricTeslaHeadMagic: { DisplayName: Auric Tesla Wire-Hemmed Visage Tooltip: 30% increased magic damage, 20% increased magic critical strike chance, +100 max mana and 20% reduced mana usage SetBonus: diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index 3095f99502..45c5a42110 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -8,7 +8,7 @@ AerospecBreastplate: { ''' } -AerospecHat: { +AerospecHeadMagic: { DisplayName: Aerospec Hat Tooltip: 10% increased magic damage and +30 max mana SetBonus: @@ -18,7 +18,7 @@ AerospecHat: { ''' } -AerospecHeadgear: { +AerospecHeadRogue: { DisplayName: Aerospec Headgear Tooltip: 10% increased rogue damage and 5% increased movement speed SetBonus: @@ -28,17 +28,17 @@ AerospecHeadgear: { ''' } -AerospecHelm: { +AerospecHeadMelee: { DisplayName: Aerospec Helm Tooltip: 10% increased melee damage SetBonus: ''' - 5% increased movement speed and melee critical strike chance + Helm: 5% increased movement speed and melee critical strike chance Enemies are more likely to target you ''' } -AerospecHelmet: { +AerospecHeadSummon: { DisplayName: Aerospec Helmet Tooltip: 10% increased summon damage and 5% increased movement speed SetBonus: @@ -48,7 +48,7 @@ AerospecHelmet: { ''' } -AerospecHood: { +AerospecHeadRanged: { DisplayName: Aerospec Hood Tooltip: 10% increased ranged damage SetBonus: 5% increased movement speed and ranged critical strike chance From 2e4e10cb0396c81587b6935c3fab83941ab3b053 Mon Sep 17 00:00:00 2001 From: Eddie Spaghetti Date: Tue, 3 Jun 2025 17:59:31 -0500 Subject: [PATCH 20/72] Fixes Fixed minor mistakes --- Items/Armor/Aerospec/AerospecHeadSummon.cs | 2 +- .../en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Armor/Aerospec/AerospecHeadSummon.cs b/Items/Armor/Aerospec/AerospecHeadSummon.cs index 30c0bd3564..652ef4ea59 100644 --- a/Items/Armor/Aerospec/AerospecHeadSummon.cs +++ b/Items/Armor/Aerospec/AerospecHeadSummon.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - [LegacyName("AreospectHelmet")] + [LegacyName("AreospecHelmet")] public class AerospecHeadSummon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson index 45c5a42110..19a3b8ddc3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Armor.PreHardmode.hjson @@ -33,7 +33,7 @@ AerospecHeadMelee: { Tooltip: 10% increased melee damage SetBonus: ''' - Helm: 5% increased movement speed and melee critical strike chance + 5% increased movement speed and melee critical strike chance Enemies are more likely to target you ''' } From 50099f4293a30b3f8806dcc686dc054cc4a9b937 Mon Sep 17 00:00:00 2001 From: Cameron Ewell Date: Tue, 3 Jun 2025 19:10:51 -0400 Subject: [PATCH 21/72] Fix AerospecHelmet typo finally --- Items/Armor/Aerospec/AerospecHeadSummon.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Armor/Aerospec/AerospecHeadSummon.cs b/Items/Armor/Aerospec/AerospecHeadSummon.cs index 652ef4ea59..b54a722b93 100644 --- a/Items/Armor/Aerospec/AerospecHeadSummon.cs +++ b/Items/Armor/Aerospec/AerospecHeadSummon.cs @@ -10,7 +10,7 @@ using Terraria.ModLoader; namespace CalamityMod.Items.Armor.Aerospec { [AutoloadEquip(EquipType.Head)] - [LegacyName("AreospecHelmet")] + [LegacyName("AerospecHelmet")] public class AerospecHeadSummon : ModItem, ILocalizedModType { public new string LocalizationCategory => "Items.Armor.PreHardmode"; From d43b663fc2e16acd97b0ef7120419f6c377c7afc Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 20:54:22 -0700 Subject: [PATCH 22/72] DVD line improvements / balance --- CalPlayer/CalamityPlayerMiscEffects.cs | 4 + Items/Weapons/Magic/DeathValleyDuster.cs | 4 +- Items/Weapons/Magic/PrimordialAncient.cs | 7 +- Items/Weapons/Magic/PrimordialEarth.cs | 8 +- .../en-US/Mods.CalamityMod.Buffs.hjson | 4 +- ...Mods.CalamityMod.Items.Weapons.Magic.hjson | 6 +- .../Magic/DeathValleyDusterProjectile.cs | 38 ++++++++-- .../Magic/PrimordialAncientExplosion.cs | 3 + .../Magic/PrimordialAncientProjectile.cs | 73 +++++++++++++------ Projectiles/Magic/PrimordialEarthExplosion.cs | 3 + .../Magic/PrimordialEarthProjectile.cs | 70 +++++++++++++----- 11 files changed, 163 insertions(+), 57 deletions(-) diff --git a/CalPlayer/CalamityPlayerMiscEffects.cs b/CalPlayer/CalamityPlayerMiscEffects.cs index 40a564129d..dc1d30416e 100644 --- a/CalPlayer/CalamityPlayerMiscEffects.cs +++ b/CalPlayer/CalamityPlayerMiscEffects.cs @@ -3829,11 +3829,15 @@ namespace CalamityMod.CalPlayer { Player.GetDamage() += PrimordialEarth.BuffDamageBoost; Player.statDefense += PrimordialEarth.BuffDefenseBoost; + Player.manaRegenDelayBonus += 1; + Player.manaRegenBonus += 50 + (int)(400 * (float)Math.Pow((1 - ((float)Player.statMana / (float)Player.statManaMax2)), 2)); } if (aeolianEarthBuff) { Player.GetDamage() += PrimordialAncient.BuffDamageBoost; Player.endurance += PrimordialAncient.BuffDamageReductionBoost; + Player.manaRegenDelayBonus += 1; + Player.manaRegenBonus += 75 + (int)(600 * (float)Math.Pow((1 - ((float)Player.statMana / (float)Player.statManaMax2)), 2)); } if (frostFlare) diff --git a/Items/Weapons/Magic/DeathValleyDuster.cs b/Items/Weapons/Magic/DeathValleyDuster.cs index 1067e27f81..0a19d54c0c 100644 --- a/Items/Weapons/Magic/DeathValleyDuster.cs +++ b/Items/Weapons/Magic/DeathValleyDuster.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic Item.height = 40; Item.damage = 159; Item.DamageType = DamageClass.Magic; - Item.mana = 38; + Item.mana = 45; Item.useTime = 50; Item.useAnimation = 50; Item.useStyle = ItemUseStyleID.Shoot; @@ -33,6 +33,8 @@ namespace CalamityMod.Items.Weapons.Magic } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + if (player.velocity.Length() <= 12) + player.velocity += -velocity.SafeNormalize(Vector2.UnitX) * 5f; bool MaxMana = player.statMana >= (player.statManaMax2 - ((int)(Item.mana * player.manaCost))) && !player.HasBuff(BuffID.ManaSickness); Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI, 0f, 0f, MaxMana ? 1f : 0f); diff --git a/Items/Weapons/Magic/PrimordialAncient.cs b/Items/Weapons/Magic/PrimordialAncient.cs index 8da0f86ef4..0e5ae09073 100644 --- a/Items/Weapons/Magic/PrimordialAncient.cs +++ b/Items/Weapons/Magic/PrimordialAncient.cs @@ -24,9 +24,9 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 40; Item.height = 56; - Item.damage = 3900; + Item.damage = 5000; Item.DamageType = DamageClass.Magic; - Item.mana = 85; + Item.mana = 95; Item.useTime = 78; Item.useAnimation = 78; Item.useStyle = ItemUseStyleID.Shoot; @@ -41,6 +41,9 @@ namespace CalamityMod.Items.Weapons.Magic } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + if (player.velocity.Length() <= 16) + player.velocity += -velocity.SafeNormalize(Vector2.UnitX) * 7.5f; + bool MaxMana = player.statMana >= (player.statManaMax2 - ((int)(Item.mana * player.manaCost))) && !player.HasBuff(BuffID.ManaSickness); for (int i = -2; i <= 2; i++) { diff --git a/Items/Weapons/Magic/PrimordialEarth.cs b/Items/Weapons/Magic/PrimordialEarth.cs index bfe7b3b5d2..55fcdc89a0 100644 --- a/Items/Weapons/Magic/PrimordialEarth.cs +++ b/Items/Weapons/Magic/PrimordialEarth.cs @@ -38,10 +38,14 @@ namespace CalamityMod.Items.Weapons.Magic } public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { + if (player.velocity.Length() <= 14) + player.velocity += -velocity.SafeNormalize(Vector2.UnitX) * 6f; + + Vector2 staticSpeed = Utils.DirectionTo(player.Center, player.Calamity().mouseWorld) * Utils.Distance(player.Center, player.ClampedMouseWorld()) * 0.008f; bool MaxMana = player.statMana >= (player.statManaMax2 - ((int)(Item.mana * player.manaCost))) && !player.HasBuff(BuffID.ManaSickness); float rotation = 0.4f; - Projectile.NewProjectile(source, position, velocity.RotatedBy(-rotation), type, damage / 2, knockback, player.whoAmI, 0f, 1f, MaxMana ? 1f : 0f); - Projectile.NewProjectile(source, position, velocity.RotatedBy(rotation), type, damage / 2, knockback, player.whoAmI, 0f, 0f, MaxMana ? 1f : 0f); + Projectile.NewProjectile(source, position, staticSpeed.RotatedBy(-rotation), type, damage / 2, knockback, player.whoAmI, 0f, 1f, MaxMana ? 1f : 0f); + Projectile.NewProjectile(source, position, staticSpeed.RotatedBy(rotation), type, damage / 2, knockback, player.whoAmI, 0f, 0f, MaxMana ? 1f : 0f); return false; } diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index cbc1e06da4..971ac6e917 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -675,7 +675,7 @@ AeolianEarthBuff: { Description: ''' You are strengthened by primordial powers - Damage reduction increased by {0}%, damage increased by {1}% + Damage reduction increased by {0}%, damage increased by {1}%, and massively buffed mana regen ''' } @@ -885,7 +885,7 @@ SandsWindBuff: { Description: ''' You are strengthened by the powers of sand - Defense increased by {0}, damage increased by {1}% + Defense increased by {0}, damage increased by {1}%, and greatly buffed mana regen ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 427c9585ef..28265b59b3 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -246,7 +246,7 @@ DeathValleyDuster: { ''' Casts an enchanted blast of sand that passes through enemies and tiles Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the Sand's Wind Buff - The Sand's Wind Buff increases your defense by 10 and damage by 12% + The Sand's Wind Buff increases your defense by 10, damage by 12%, and greatly buffed mana regen ''' } @@ -654,7 +654,7 @@ PrimordialAncient: { ''' Casts five primordial sand blasts that converge at your cursor after a moment and create a giant explosion Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.AeolianEarthBuff.DisplayName} buff - The {$Buffs.AeolianEarthBuff.DisplayName} buff increases your damage reduction by {0}% and damage by {1}% + The {$Buffs.AeolianEarthBuff.DisplayName} buff increases your damage reduction by {0}%, damage by {1}%, and massively buffed mana regen ''' } @@ -664,7 +664,7 @@ PrimordialEarth: { ''' Casts two enchanted blasts of sand that coverge with each other and explode Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.SandsWindBuff.DisplayName} buff - The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0} and damage by {1}% + The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffed mana regen ''' } diff --git a/Projectiles/Magic/DeathValleyDusterProjectile.cs b/Projectiles/Magic/DeathValleyDusterProjectile.cs index 0fd107a6bf..33520aff80 100644 --- a/Projectiles/Magic/DeathValleyDusterProjectile.cs +++ b/Projectiles/Magic/DeathValleyDusterProjectile.cs @@ -10,6 +10,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; using System.Collections.Generic; +using CalamityMod.Items.Placeables.FurnitureMarnite; namespace CalamityMod.Projectiles.Magic { public class DeathValleyDusterProjectile : ModProjectile, ILocalizedModType @@ -34,7 +35,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = -1; - Projectile.extraUpdates = 4; + Projectile.extraUpdates = 7; Projectile.timeLeft = 400; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; @@ -60,7 +61,7 @@ namespace CalamityMod.Projectiles.Magic if (buffList[playerIndex] == false) { buffList[playerIndex] = true; - player.AddBuff(ModContent.BuffType(), 600); + player.AddBuff(ModContent.BuffType(), 720); int Dusts = 12; float radians = MathHelper.TwoPi / Dusts; @@ -141,7 +142,6 @@ namespace CalamityMod.Projectiles.Magic Projectile.rotation += Main.rand.NextFloat(0.01f, 0.18f) * (float)Projectile.direction * Projectile.Opacity * rotDirection; - if (Projectile.timeLeft <= 45) { Projectile.extraUpdates = 1; @@ -152,15 +152,37 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.95f); - if (Projectile.damage < 1) - Projectile.damage = 1; + float minMult = 0.25f; + int hitsToMinMult = 6; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + if (Projectile.numHits == 0) + { + Player Owner = Main.player[Projectile.owner]; + Owner.Calamity().GeneralScreenShakePower = 3.5f; + damageMult += 0.5f; + for (int i = 0; i < 3; i++) + SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact with { Volume = 0.9f, Pitch = -0.4f + i * 0.25f, MaxInstances = 3 }, Projectile.Center); + for (int i = 0; i < 14; i++) + { + float range = Main.rand.NextFloat(-0.5f, 0.5f); + float power = 1 - Math.Abs(range); + Vector2 vel = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(range) * Main.rand.NextFloat(45, 50) * power; + MediumMistParticle SandCloud = new MediumMistParticle(Projectile.Center, vel, Color.Peru, Color.PeachPuff, Main.rand.NextFloat(1.7f, 2.3f), 120f, Main.rand.NextFloat(0.03f, -0.03f)); + GeneralParticleHandler.SpawnParticle(SandCloud); + for (int b = 0; b < 5; b++) + { + Color clr = Color.Lerp((Main.rand.NextBool() ? Color.Peru : Color.PeachPuff), Color.Black, Main.rand.NextFloat(0.25f, 0.45f)); + Particle sand = new CustomSpark(Projectile.Center, vel.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.4f, 0.9f) * power, "CalamityMod/Particles/SmallSmoke", false, Main.rand.Next(15, 25 + 1), Projectile.scale * Main.rand.NextFloat(0.08f, 0.14f) * 7, clr, new Vector2(1, Main.rand.NextFloat(0.2f, 2f)), false, extraRotation: Main.rand.NextFloat(-4, 4), spin: Main.rand.NextFloat(-0.8f, 0.8f), affectedByLight: true); + GeneralParticleHandler.SpawnParticle(sand); + } + } + } + modifiers.SourceDamage *= damageMult; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - if (Projectile.numHits >= 3 && Projectile.timeLeft > 45) + if (Projectile.numHits >= 5 && Projectile.timeLeft > 45) { Projectile.timeLeft = 45; Projectile.velocity *= 0.4f; diff --git a/Projectiles/Magic/PrimordialAncientExplosion.cs b/Projectiles/Magic/PrimordialAncientExplosion.cs index 8b4f5a9c1a..0f24414cb2 100644 --- a/Projectiles/Magic/PrimordialAncientExplosion.cs +++ b/Projectiles/Magic/PrimordialAncientExplosion.cs @@ -28,6 +28,9 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 40, true); + if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.95f); if (Projectile.damage < 1) diff --git a/Projectiles/Magic/PrimordialAncientProjectile.cs b/Projectiles/Magic/PrimordialAncientProjectile.cs index 6eac8df489..1d04c30342 100644 --- a/Projectiles/Magic/PrimordialAncientProjectile.cs +++ b/Projectiles/Magic/PrimordialAncientProjectile.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using CalamityMod.Buffs.StatBuffs; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Particles; +using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; @@ -37,10 +38,10 @@ namespace CalamityMod.Projectiles.Magic Projectile.DamageType = DamageClass.Magic; Projectile.tileCollide = false; Projectile.penetrate = -1; - Projectile.extraUpdates = 6; + Projectile.extraUpdates = 8; Projectile.timeLeft = 430; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 40 * Projectile.extraUpdates; + Projectile.localNPCHitCooldown = -1; } public override void AI() { @@ -71,7 +72,7 @@ namespace CalamityMod.Projectiles.Magic if (buffList[playerIndex] == false) { buffList[playerIndex] = true; - player.AddBuff(ModContent.BuffType(), 840); + player.AddBuff(ModContent.BuffType(), 900); int Dusts = 8; float radians = MathHelper.TwoPi / Dusts; @@ -190,7 +191,6 @@ namespace CalamityMod.Projectiles.Magic GeneralParticleHandler.SpawnParticle(SandCloud); } - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + new Vector2(25, 25).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1.3f) * Projectile.scale, Main.rand.NextBool(5) ? 86 : 287, -Projectile.velocity * Main.rand.NextFloat(0.1f, 1.3f)); dust2.noGravity = true; dust2.scale = Main.rand.NextFloat(0.4f, 0.7f); @@ -203,21 +203,43 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - modifiers.SourceDamage *= 0.05f; + float minMult = 0.25f; + int hitsToMinMult = 6; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + if (Projectile.numHits == 0) + { + damageMult += 0.5f; + for (int i = 0; i < 3; i++) + SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact with { Volume = 0.9f, Pitch = -0.4f + i * 0.25f, MaxInstances = 9 }, Projectile.Center); + for (int i = 0; i < 6; i++) + { + float range = Main.rand.NextFloat(-0.3f, 0.3f); + float power = 1 - Math.Abs(range); + Vector2 vel = Projectile.Center.DirectionTo(target.Center).RotatedBy(range) * Main.rand.NextFloat(35, 40) * power; + MediumMistParticle SandCloud = new MediumMistParticle(Projectile.Center, vel, Color.Peru, Color.PeachPuff, Main.rand.NextFloat(1.7f, 2.3f), 120f, Main.rand.NextFloat(0.03f, -0.03f)); + GeneralParticleHandler.SpawnParticle(SandCloud); + for (int b = 0; b < 5; b++) + { + Color clr = Color.Lerp((Main.rand.NextBool() ? Color.Peru : Color.PeachPuff), Color.Black, Main.rand.NextFloat(0.25f, 0.45f)); + Particle sand = new CustomSpark(Projectile.Center, vel.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.4f, 0.9f) * power, "CalamityMod/Particles/SmallSmoke", false, Main.rand.Next(25, 35 + 1), Projectile.scale * Main.rand.NextFloat(0.08f, 0.14f) * 7, clr, new Vector2(1, Main.rand.NextFloat(0.2f, 2f)), false, extraRotation: Main.rand.NextFloat(-4, 4), spin: Main.rand.NextFloat(-0.8f, 0.8f), affectedByLight: true); + GeneralParticleHandler.SpawnParticle(sand); + } + } + } - if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.95f); - if (Projectile.damage < 1) - Projectile.damage = 1; + modifiers.SourceDamage *= damageMult * 0.03f; } public override void OnKill(int timeLeft) { Lighting.AddLight(Projectile.Center, Color.Purple.ToVector3() * 2); if (Projectile.ai[1] == 1) { - Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Purple, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0f, 0.82f, 11); + Player Owner = Main.player[Projectile.owner]; + Owner.Calamity().GeneralScreenShakePower = 8f; + + Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Purple, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.2f * 2f, 0.6f * 2.5f, 17); GeneralParticleHandler.SpawnParticle(orb); - Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0f, 0.74f, 11); + Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f * 2f, 0.5f * 2.5f, 17); GeneralParticleHandler.SpawnParticle(orb2); Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 1.5f, Projectile.owner); @@ -227,24 +249,33 @@ namespace CalamityMod.Projectiles.Magic Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.Purple, Color.White, 0.5f) * 0.55f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f * 2.3f, 18); GeneralParticleHandler.SpawnParticle(bolt2); - Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Peru * 0.55f, "CalamityMod/Particles/FlameExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.3f, 30); + Particle bolt3 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Peru * 0.55f, "CalamityMod/Particles/SmokeExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.4f, 23); GeneralParticleHandler.SpawnParticle(bolt3); - Particle bolt4 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.PeachPuff * 0.55f, "CalamityMod/Particles/FlameExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.3f * 1.35f, 30); + Particle bolt4 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.PeachPuff * 0.55f, "CalamityMod/Particles/SmokeExplosion", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 0.4f * 1.35f, 18); GeneralParticleHandler.SpawnParticle(bolt4); for (int i = 0; i < 140; i++) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(5) ? 86 : 287, new Vector2(21, 21).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1.3f)); - dust.noGravity = false; - dust.scale = Main.rand.NextFloat(0.8f, 1.3f); - if (dust.type == 86) + if (Main.rand.NextBool(5)) { - dust.noGravity = true; - dust.fadeIn = 0.5f; - dust.velocity *= 2; + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(5) ? 86 : 287, new Vector2(21, 21).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1.3f)); + dust.noGravity = false; + dust.scale = Main.rand.NextFloat(0.8f, 1.3f); + if (dust.type == 86) + { + dust.noGravity = true; + dust.fadeIn = 0.5f; + dust.velocity *= 2; + } + dust.alpha = 100; + } + else + { + Color clr = Color.Lerp((Main.rand.NextBool() ? Color.Peru : Color.PeachPuff), Color.Black, Main.rand.NextFloat(0.25f, 0.45f)); + Particle sand = new CustomSpark(Projectile.Center, (Vector2.One * Main.rand.NextFloat(9, 33)).RotatedByRandom(MathHelper.TwoPi), "CalamityMod/Particles/SmallSmoke", true, Main.rand.Next(25, 55 + 1), Projectile.scale * Main.rand.NextFloat(0.08f, 0.14f) * 23, clr, new Vector2(1, Main.rand.NextFloat(0.2f, 2f)), false, extraRotation: Main.rand.NextFloat(-4, 4), spin: Main.rand.NextFloat(-0.8f, 0.8f), affectedByLight: true); + GeneralParticleHandler.SpawnParticle(sand); } - dust.alpha = 100; } for (int i = 0; i < 30; i++) { diff --git a/Projectiles/Magic/PrimordialEarthExplosion.cs b/Projectiles/Magic/PrimordialEarthExplosion.cs index 7a2fc6d42f..3fc8e0e945 100644 --- a/Projectiles/Magic/PrimordialEarthExplosion.cs +++ b/Projectiles/Magic/PrimordialEarthExplosion.cs @@ -28,6 +28,9 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + Vector2 launchVel = Utils.DirectionTo(Projectile.Center, target.Center); + target.MoveNPC(launchVel, 20, true); + if (Projectile.numHits > 0) Projectile.damage = (int)(Projectile.damage * 0.9f); if (Projectile.damage < 1) diff --git a/Projectiles/Magic/PrimordialEarthProjectile.cs b/Projectiles/Magic/PrimordialEarthProjectile.cs index 6a5a77c9ef..83cd70b476 100644 --- a/Projectiles/Magic/PrimordialEarthProjectile.cs +++ b/Projectiles/Magic/PrimordialEarthProjectile.cs @@ -35,7 +35,7 @@ namespace CalamityMod.Projectiles.Magic Projectile.tileCollide = false; Projectile.DamageType = DamageClass.Magic; Projectile.penetrate = -1; - Projectile.extraUpdates = 6; + Projectile.extraUpdates = 9; Projectile.timeLeft = 132; // NOTE: Do not change this. Specific timing is needed for the weapon to function properly. Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = -1; @@ -71,7 +71,7 @@ namespace CalamityMod.Projectiles.Magic if (buffList[playerIndex] == false) { buffList[playerIndex] = true; - player.AddBuff(ModContent.BuffType(), 720); + player.AddBuff(ModContent.BuffType(), 840); int Dusts = 12; float radians = MathHelper.TwoPi / Dusts; @@ -135,7 +135,6 @@ namespace CalamityMod.Projectiles.Magic GeneralParticleHandler.SpawnParticle(SandCloud); } - Dust dust2 = Dust.NewDustPerfect(Projectile.Center + new Vector2(25, 25).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1.3f) * Projectile.scale, Main.rand.NextBool(8) ? 262 : 287, -Projectile.velocity * Main.rand.NextFloat(0.1f, 1.3f)); dust2.noGravity = true; dust2.scale = Main.rand.NextFloat(0.4f, 0.7f); @@ -148,36 +147,71 @@ namespace CalamityMod.Projectiles.Magic } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { - if (Projectile.numHits > 0) - Projectile.damage = (int)(Projectile.damage * 0.95f); - if (Projectile.damage < 1) - Projectile.damage = 1; + float minMult = 0.25f; + int hitsToMinMult = 6; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + if (Projectile.numHits == 0) + { + damageMult += 0.5f; + for (int i = 0; i < 3; i++) + SoundEngine.PlaySound(SoundID.DD2_MonkStaffGroundImpact with { Volume = 0.9f, Pitch = -0.4f + i * 0.25f, MaxInstances = 6 }, Projectile.Center); + for (int i = 0; i < 9; i++) + { + float range = Main.rand.NextFloat(-0.3f, 0.3f); + float power = 1 - Math.Abs(range); + Vector2 vel = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedBy(range) * Main.rand.NextFloat(35, 40) * power; + MediumMistParticle SandCloud = new MediumMistParticle(Projectile.Center, vel, Color.Peru, Color.PeachPuff, Main.rand.NextFloat(1.7f, 2.3f), 120f, Main.rand.NextFloat(0.03f, -0.03f)); + GeneralParticleHandler.SpawnParticle(SandCloud); + for (int b = 0; b < 6; b++) + { + Color clr = Color.Lerp((Main.rand.NextBool() ? Color.Peru : Color.PeachPuff), Color.Black, Main.rand.NextFloat(0.25f, 0.45f)); + Particle sand = new CustomSpark(Projectile.Center, vel.RotatedByRandom(0.4f) * Main.rand.NextFloat(0.4f, 0.9f) * power, "CalamityMod/Particles/SmallSmoke", false, Main.rand.Next(25, 35 + 1), Projectile.scale * Main.rand.NextFloat(0.08f, 0.14f) * 7, clr, new Vector2(1, Main.rand.NextFloat(0.2f, 2f)), false, extraRotation: Main.rand.NextFloat(-4, 4), spin: Main.rand.NextFloat(-0.8f, 0.8f), affectedByLight: true); + GeneralParticleHandler.SpawnParticle(sand); + } + } + } + modifiers.SourceDamage *= damageMult; } public override void OnKill(int timeLeft) { if (Projectile.ai[1] == 1) { - Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage * 2, Projectile.knockBack * 1.5f, Projectile.owner); + Player Owner = Main.player[Projectile.owner]; + Owner.Calamity().GeneralScreenShakePower = 5f; + + Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * 2.5f), 0, Projectile.owner); SoundStyle explo = new("CalamityMod/Sounds/Item/MagicRockImpact"); SoundEngine.PlaySound(explo with { Volume = 0.75f }, Projectile.Center); - //Particle bolt = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Gold * 0.3f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 1.86f, 15); - //GeneralParticleHandler.SpawnParticle(bolt); Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Gold * 0.55f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f, 15); GeneralParticleHandler.SpawnParticle(bolt2); + + Particle orb = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Gold, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.1f, 0.4f * 1.5f, 17); + GeneralParticleHandler.SpawnParticle(orb); + Particle orb2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.White, "CalamityMod/Particles/LargeBloom", new Vector2(1, 1), Main.rand.NextFloat(-10, 10), 0.05f, 0.3f * 1.5f, 17); + GeneralParticleHandler.SpawnParticle(orb2); } for (int i = 0; i < 65; i++) { - Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? 262 : 287, new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1.3f)); - dust.noGravity = false; - dust.scale = Main.rand.NextFloat(0.8f, 1.3f); - if (dust.type == 262) + if (Main.rand.NextBool(4)) { - dust.noGravity = true; - dust.fadeIn = 0.5f; - dust.velocity *= 2; + Dust dust = Dust.NewDustPerfect(Projectile.Center, Main.rand.NextBool(6) ? 262 : 287, new Vector2(7, 7).RotatedByRandom(100) * Main.rand.NextFloat(0.1f, 1.3f)); + dust.noGravity = false; + dust.scale = Main.rand.NextFloat(0.8f, 1.3f); + if (dust.type == 262) + { + dust.noGravity = true; + dust.fadeIn = 0.5f; + dust.velocity *= 2; + } + dust.alpha = 100; + } + else + { + Color clr = Color.Lerp((Main.rand.NextBool() ? Color.Peru : Color.PeachPuff), Color.Black, Main.rand.NextFloat(0.25f, 0.45f)); + Particle sand = new CustomSpark(Projectile.Center, (Vector2.One * Main.rand.NextFloat(6, 15)).RotatedByRandom(MathHelper.TwoPi), "CalamityMod/Particles/SmallSmoke", true, Main.rand.Next(20, 45 + 1), Projectile.scale * Main.rand.NextFloat(0.08f, 0.14f) * 8, clr, new Vector2(1, Main.rand.NextFloat(0.2f, 2f)), false, extraRotation: Main.rand.NextFloat(-4, 4), spin: Main.rand.NextFloat(-0.8f, 0.8f), affectedByLight: true); + GeneralParticleHandler.SpawnParticle(sand); } - dust.alpha = 100; } for (int i = 0; i < 9; i++) { From acb010ec1f99381b3467eb341be093b7d339c4c4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 4 Jun 2025 00:23:10 -0400 Subject: [PATCH 23/72] Fixed DVD line tooltip grammar Also removed the Probe glowmask file (forgot to do so earlier) --- ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png | Bin 594 -> 0 bytes .../Mods.CalamityMod.Items.Weapons.Magic.hjson | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png diff --git a/ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png b/ExtraTextures/VanillaBossGlowmasks/ProbeGlow.png deleted file mode 100644 index c0105e82e40e9adc2281a85bb8f551ee318245fd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 594 zcmV-Y0kdg0003bX+uL$Nkc;* zaB^>EX>4Tx04R~2kUdMoP!xurR;eH8mH#jRe``+l_U=}YN-iO0E?|bisx)Yf=pFe~+DKfWr$-KHXMtIX>vWgw5Syllc9u{>=a_J63usp_K< zyg$OK4{Oh`d|i>X`1@@YGp%ywpKtsESeSad^gZEa<4bO1wg zWnpw>WFU8GbZ8()Nlj2!fese{004AJL_t(Y$L-U>4TC@oMA5fs8=!;G1ybsu%GAL% zEhG{JYzdnKP(T1-4$R%2Z;#Ebi>R$_-CEo1HBU1E9o{K`Ag}H{K9!QrCV&A`R0tIQ+TbH7(!4IDv!_|z}NqucnHC*E9eKZnG+mpC@#GK000hUSV?A0 gO#mtY000O800000007cclK=n!07*qoM6N<$g4Ejd$^ZZW diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson index 28265b59b3..89d5f7e200 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Magic.hjson @@ -246,7 +246,7 @@ DeathValleyDuster: { ''' Casts an enchanted blast of sand that passes through enemies and tiles Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the Sand's Wind Buff - The Sand's Wind Buff increases your defense by 10, damage by 12%, and greatly buffed mana regen + The Sand's Wind Buff increases your defense by 10, damage by 12%, and greatly buffs mana regen ''' } @@ -654,7 +654,7 @@ PrimordialAncient: { ''' Casts five primordial sand blasts that converge at your cursor after a moment and create a giant explosion Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.AeolianEarthBuff.DisplayName} buff - The {$Buffs.AeolianEarthBuff.DisplayName} buff increases your damage reduction by {0}%, damage by {1}%, and massively buffed mana regen + The {$Buffs.AeolianEarthBuff.DisplayName} buff increases your damage reduction by {0}%, damage by {1}%, and massively buffs mana regen ''' } @@ -664,7 +664,7 @@ PrimordialEarth: { ''' Casts two enchanted blasts of sand that coverge with each other and explode Casting this spell at max mana while without mana sickness will cause it to give you and any player it hits the {$Buffs.SandsWindBuff.DisplayName} buff - The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffed mana regen + The {$Buffs.SandsWindBuff.DisplayName} buff increases your defense by {0}, damage by {1}%, and greatly buffs mana regen ''' } From f7d92016e1ceb750a0c0d03d23837cfceaa8fd26 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 4 Jun 2025 00:32:38 -0400 Subject: [PATCH 24/72] Moved back tomat on Thank You --- Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs index 073307f246..3d465cc42d 100644 --- a/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs +++ b/Items/Placeables/Furniture/DevPaintings/ThankYouPainting.cs @@ -91,6 +91,7 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "Spider Prov", "StipulateVenus", "Tobias", + "Tomat", "Triangle", "TYESKI (Universe)", "Uncle Danny", @@ -189,7 +190,6 @@ namespace CalamityMod.Items.Placeables.Furniture.DevPaintings "ThousandFields", "TikiWiki", "Tinymanx", - "Tomat", "Trivaxy", "Uberransy", "Vaikyia", From 56de3c2955575922434f7b2de961b3fa8ccb7941 Mon Sep 17 00:00:00 2001 From: Xyk Date: Tue, 3 Jun 2025 22:08:44 -0700 Subject: [PATCH 25/72] Sound fix --- .../en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 8 ++++---- Projectiles/Magic/PrimordialAncientProjectile.cs | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index f51d72f7fb..a7f7715998 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -696,10 +696,10 @@ GrandGuardian: { GreatswordofJudgement: { DisplayName: Greatsword of Judgement Tooltip: - ''' -Fires a piercing energy wave that releases homing stars as it flies -Hits with the blade summon two stronger stars from behind you - ''' + ''' + Fires a piercing energy wave that releases homing stars as it flies + Hits with the blade summon two stronger stars from behind you + ''' } Greentide: { diff --git a/Projectiles/Magic/PrimordialAncientProjectile.cs b/Projectiles/Magic/PrimordialAncientProjectile.cs index 1d04c30342..aa9db9e1f2 100644 --- a/Projectiles/Magic/PrimordialAncientProjectile.cs +++ b/Projectiles/Magic/PrimordialAncientProjectile.cs @@ -245,6 +245,8 @@ namespace CalamityMod.Projectiles.Magic Projectile.NewProjectile(Projectile.GetSource_FromThis(), Projectile.Center, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage, Projectile.knockBack * 1.5f, Projectile.owner); SoundStyle explo = new("CalamityMod/Sounds/Item/MineralMortarExplode"); SoundEngine.PlaySound(explo with { Volume = 0.9f }, Projectile.Center); + SoundStyle explo2 = new("CalamityMod/Sounds/Item/EarthMeteor"); + SoundEngine.PlaySound(explo2 with { Volume = 0.9f, Pitch = -0.3f }, Projectile.Center); Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Lerp(Color.Purple, Color.White, 0.5f) * 0.55f, "CalamityMod/Particles/BloomRing", Vector2.One, Main.rand.NextFloat(-10f, 10f), 0f, 2.56f * 2.3f, 18); GeneralParticleHandler.SpawnParticle(bolt2); From e8ee705cf9a50c6f069eb41dcdac2a43102c07c6 Mon Sep 17 00:00:00 2001 From: Listentowind <2926669682@qq.com> Date: Wed, 4 Jun 2025 17:29:53 +0800 Subject: [PATCH 26/72] Removed vanilla npc's Drunk Princess chat and duplicate sylvstaff projectiles localization why it still on this branch? --- .../Mods.CalamityMod.Projectiles.Magic.hjson | 2 -- .../en-US/Mods.CalamityMod.Vanilla.hjson | 19 ++----------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index c3c7de4c15..316d23fe65 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -261,5 +261,3 @@ WyvernFeatherPurple.DisplayName: Feather WyvernProjectile.DisplayName: Wyvern YharimsCrystalBeam.DisplayName: Yharim's Beam YharimsCrystalPrism.DisplayName: Yermes Christal -SylvBolt.DisplayName: Sylv Bolt -SylvRay.DisplayName: Sylv Ray diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index b037db0068..eb9bbf4fc6 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -339,7 +339,6 @@ DemolitionistChat: { DryadChat: { DarksunEclipse: There's a dark solar energy emanating from the moths that appear during this time. What's up with moths getting stronger as you do too? Hardmode: That starborne illness sits upon this land like a blister. Do even more vile forces of corruption exist in worlds beyond? - DrunkPrincessShroom: "{0} put me up to this." Mushroom: I'm not here for any reason! Just picking up mushrooms for uh, later use. SulphurSea: My Goddess is resting deep below this sea. If you may excuse me, I wish to pay my respects to her alone. } @@ -377,7 +376,6 @@ MechanicChat: { MoonLordDefeated: What do you mean your traps aren't making the cut? Don't look at me! Eclipse: Um... should my nightlight be on? AcidRain: Maybe I should've waterproofed my gadgets... They're starting to corrode. - DrunkPrincess: Well, I like {0}, but I, ah... I have my eyes on someone else. } MerchantChat: { @@ -407,7 +405,6 @@ PainterChat: { } PartyGirlChat: { - DrunkPrincess: I have a feeling we're going to have absolutely fantastic parties with {0} around! Eclipse1: I think my light display is turning into an accidental bug zapper. At least the monsters are enjoying it. Eclipse2: Ooh! I love parties where everyone wears a scary costume! } @@ -415,7 +412,6 @@ PartyGirlChat: { PirateChat: { PreLeviathan: Aye, I've heard of a mythical creature in the oceans, singing with an alluring voice. Careful when yer fishin out there. WetScourgeDefeated: I have to thank ye again for takin' care of that sea serpent. Or was that another one... - DrunkPrincess: Twenty-nine bottles of beer on the wall... SeaKing: I remember legends about that {0}. He ain't quite how the stories make him out to be though. Ocean: Now this is a scene that I can admire any time! I feel like something is watching me though. SulphurSea1: It ain't much of a sight, but there's still life living in these waters. @@ -442,18 +438,12 @@ SteampunkerChat: { StylistChat: { Hardmode: Please don't catch space lice. Or {0} lice. Or just lice in general. - DrunkPrincess1: "{0} is always trying to brighten my mood... even though, deep down, I know she's sad..." - DrunkPrincess2: Sometimes I catch {0} sneaking up from behind me. - DrunkPrincess3: "{0} has been smiling more often lately, even without alcohol. I think I can thank you for that, at least somewhat." ProfanedSoulCrystal1: They look so cute and yet, I can feel their immense power just by being near them. What are you? ProfanedSoulCrystal2: I hate to break it to you, but you don't have hair to cut or style, hun. ProfanedDonuts: Aww, they're so cute, do they have names? } -TavernkeepChat: { - FullMoon: Care for a little Moonshine? - DrunkPrincess: Sheesh, {0} is a little cruel, isn't she? I never claimed to be an expert on anything but ale! -} +TavernkeepChat.FullMoon: Care for a little Moonshine? TaxCollectorChat: { DoGDefeated: Devourer of what, you said? Devourer of Funds, if its payroll is anything to go by! @@ -463,12 +453,7 @@ TaxCollectorChat: { Has100Plat: BAH! Doesn't seem like I'll ever be able to quarrel with the debts of the town again! } -TravellingMerchantChat.DrunkPrincessMerchant: Tell {0} I'll take up her offer and meet with her at the back of {1}'s house. - -TruffleChat: { - Normal: I don't feel very safe; I think there's pigs following me around and it frightens me. - DrunkPrincess: Sometimes, {0} just looks at me funny and I'm not sure how I feel about that. -} +TruffleChat.Normal: I don't feel very safe; I think there's pigs following me around and it frightens me. WitchDoctorChat: { BloodMoon: This is as good a time as any to pick up the best ingredients for potions. From 2e7fbfd55b91bca4d30d583e41dd2cddb9553947 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 4 Jun 2025 08:21:07 -0400 Subject: [PATCH 27/72] oop lemme remove Probe glowmask loading --- ExtraTextures/ExtraTextureRefs.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/ExtraTextures/ExtraTextureRefs.cs b/ExtraTextures/ExtraTextureRefs.cs index bc86cb89a7..ab359512cb 100644 --- a/ExtraTextures/ExtraTextureRefs.cs +++ b/ExtraTextures/ExtraTextureRefs.cs @@ -19,7 +19,6 @@ namespace CalamityMod.ExtraTextures public static Asset DestroyerHeadGlowmask; public static Asset DestroyerBodyGlowmask; public static Asset DestroyerTailGlowmask; - public static Asset ProbeGlowmask; // Master Rev+ Skeletron Prime public static Asset ChadPrime; @@ -62,8 +61,6 @@ namespace CalamityMod.ExtraTextures DestroyerBodyGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad); DestroyerTailGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad); - ProbeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/ProbeGlow", AssetRequestMode.AsyncLoad); - ChadPrime = ModContent.Request("CalamityMod/ExtraTextures/ChadPrime", AssetRequestMode.AsyncLoad); ChadPrimeEyeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/ChadPrimeHeadGlow", AssetRequestMode.AsyncLoad); From 008da1ade0c270acb5fd0951cf81aea18c39aa2f Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 4 Jun 2025 11:11:14 -0400 Subject: [PATCH 28/72] 1 - Fixed Galaxia Phoenix's Pride making Yharon firewalls turn translucent 2 - Actually fixed Sylvestaff localization 3 - Removed additional clones from Rev+ Brain of Cthulhu, and slightly decreased downtime between later phase spins --- .../Mods.CalamityMod.Projectiles.Magic.hjson | 4 +- NPCs/CalamityGlobalNPC.cs | 98 +------------------ .../Bosses/BrainOfCthulhuAI.cs | 2 +- Projectiles/Boss/InfernadoRevenge.cs | 1 + 4 files changed, 5 insertions(+), 100 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson index 316d23fe65..16d495a2de 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Magic.hjson @@ -214,8 +214,8 @@ SpiritDust.DisplayName: Spirit Dust Starblast.DisplayName: Star StardustElementalBeam.DisplayName: Stardust Beam StickyFeather.DisplayName: Feather -SylveBolt.DisplayName: Sylv Bolt -SylveRay.DisplayName: Sylv Ray +SylvBolt.DisplayName: Sylv Bolt +SylvRay.DisplayName: Sylv Ray TacticiansElectricBoom.DisplayName: Electric Explosion TacticiansTrumpCardProj.DisplayName: Trump Beam TearsofHeavenProjectile.DisplayName: Tears of Heaven diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index ce7719554c..7bda915868 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -8502,104 +8502,8 @@ namespace CalamityMod.NPCs if (revenge) { - // Create additional afterimages in the cardinal directions in Rev+ - if (npc.type == NPCID.BrainofCthulhu) - { - float secondAfterimageSetHealthValue = (int)(npc.lifeMax * 0.8f); - if (npc.life < secondAfterimageSetHealthValue) - { - int totalAfterimages = death ? 12 : 4; - for (int i = 0; i < totalAfterimages; i++) - { - Color currentColor = npc.GetAlpha(drawColor); - float opacityScale = 1f - MathHelper.Lerp(0.34f, 1f, npc.life / (float)secondAfterimageSetHealthValue); - float opacity = Main.getGoodWorld ? 0.7f : opacityScale; - - opacity = MathHelper.Clamp(opacity, 0f, 1f); - currentColor.R = (byte)((float)(int)currentColor.R * opacity); - currentColor.G = (byte)((float)(int)currentColor.G * opacity); - currentColor.B = (byte)((float)(int)currentColor.B * opacity); - currentColor.A = (byte)((float)(int)currentColor.A * opacity); - - Vector2 position = npc.position; - float distanceFromTargetX = Math.Abs(npc.Center.X - Main.LocalPlayer.Center.X); - float distanceFromTargetY = Math.Abs(npc.Center.Y - Main.LocalPlayer.Center.Y); - if (i > 3) - { - currentColor *= 0.5f; - distanceFromTargetX *= 0.5f; - distanceFromTargetY *= 0.5f; - } - if (i > 7) - currentColor *= 0.5f; - - switch (i) - { - case 0: - case 4: - position.X = Main.LocalPlayer.Center.X - distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y; - break; - - case 1: - case 5: - position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY; - position.X = Main.LocalPlayer.Center.X; - break; - - case 2: - case 6: - position.X = Main.LocalPlayer.Center.X + distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y; - break; - - case 3: - case 7: - position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY; - position.X = Main.LocalPlayer.Center.X; - break; - - case 8: - position.X = Main.LocalPlayer.Center.X - distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY; - break; - - case 9: - position.X = Main.LocalPlayer.Center.X + distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY; - break; - - case 10: - position.X = Main.LocalPlayer.Center.X + distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY; - break; - - case 11: - position.X = Main.LocalPlayer.Center.X - distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY; - break; - - default: - break; - } - - position.X -= npc.width / 2; - position.Y -= npc.height / 2; - - Vector2 halfSize = npc.frame.Size() / 2; - SpriteEffects spriteEffects = SpriteEffects.None; - if (npc.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width(); - int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); - spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); - } - } - } - // Telegraph for charge and blood shots - else if (npc.type == NPCID.Creeper) + if (npc.type == NPCID.Creeper) { if (NPC.crimsonBoss < 0) return; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs index 7847c6a171..f8756c948e 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs @@ -527,7 +527,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (!despawn) npc.localAI[1] += 1f; - float teleportGateValue = npc.ai[0] == -6f ? 300f : 210f; + float teleportGateValue = npc.ai[0] == -6f ? 270f : 210f; if (npc.localAI[1] >= teleportGateValue) { npc.localAI[1] = 0f; diff --git a/Projectiles/Boss/InfernadoRevenge.cs b/Projectiles/Boss/InfernadoRevenge.cs index d193737273..7e73ff201f 100644 --- a/Projectiles/Boss/InfernadoRevenge.cs +++ b/Projectiles/Boss/InfernadoRevenge.cs @@ -75,6 +75,7 @@ namespace CalamityMod.Projectiles.Boss Main.spriteBatch.EnterShaderRegion(); GameShaders.Misc["CalamityMod:Bordernado"].UseSaturation(-0.2f); + GameShaders.Misc["CalamityMod:Bordernado"].UseOpacity(1f); GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request("Terraria/Images/Misc/Perlin")); Vector2[] drawPoints = new Vector2[5]; Vector2 upwardAscent = Vector2.UnitY * TornadoHeight; From ab3c6db0a42707eb5ce69da70625ed8cc22e2366 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Wed, 4 Jun 2025 17:29:30 -0400 Subject: [PATCH 29/72] Increased distance before CV moves to the player Also moved its AI code to its NPC file and refactored the AI a bit --- .../CalamityBossAIs/CeaselessVoidAI.cs | 619 ------------------ NPCs/CeaselessVoid/CeaselessVoid.cs | 597 ++++++++++++++++- 2 files changed, 574 insertions(+), 642 deletions(-) delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs deleted file mode 100644 index 7fc43d201c..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/CeaselessVoidAI.cs +++ /dev/null @@ -1,619 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; -using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class CeaselessVoidAI - { - public static void VanillaCeaselessVoidAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - CalamityGlobalNPC.voidBoss = npc.whoAmI; - - // Percent life remaining - double lifeRatio = npc.life / (double)npc.lifeMax; - - // Difficulty modes - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - // Phases - bool phase2 = lifeRatio <= 0.7; - bool phase3 = lifeRatio <= 0.4; - bool phase4 = lifeRatio <= 0.1; - bool theBigSucc = npc.life / (double)npc.lifeMax <= 0.1; - bool succSoHardThatYouDie = npc.life / (double)npc.lifeMax <= 0.005; - - // Spawn Dark Energies - int darkEnergyAmt = death ? 6 : revenge ? 5 : expertMode ? 4 : 3; - if (phase2) - darkEnergyAmt += 1; - if (phase3) - darkEnergyAmt += 1; - if (phase4) - darkEnergyAmt += 1; - - if (Main.getGoodWorld) - darkEnergyAmt *= 2; - - // Spawn a few Dark Energies as soon as the fight starts - int spacing = 360 / darkEnergyAmt; - int distance2 = 10; - if (npc.ai[2] == 0f) - { - npc.ai[2] = 1f; - for (int i = 0; i < darkEnergyAmt; i++) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 0f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 1f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 2f, 0f, 0f); - } - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 0.5f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 1.5f, 0f, 0f); - } - - // If there are any Dark Energies alive, change AI and don't take damage - bool anyDarkEnergies = NPC.AnyNPCs(ModContent.NPCType()); - bool movingDuringSuccPhase = npc.ai[3] == 0f; - npc.dontTakeDamage = anyDarkEnergies || theBigSucc || movingDuringSuccPhase; - - // 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(); - - Player player = Main.player[npc.target]; - - // Speed enrage - bool moveVeryFast = Vector2.Distance(npc.Center, player.Center) > 960f || (!player.ZoneDungeon && !bossRush && player.position.Y < Main.worldSurface * 16.0); - - // Despawn - if (!player.active || player.dead || Vector2.Distance(player.Center, npc.Center) > 5600f) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - if (!player.active || player.dead || Vector2.Distance(player.Center, npc.Center) > 5600f) - { - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; - npc.velocity.Y -= 0.1f; - if (npc.velocity.Y < -12f) - npc.velocity.Y = -12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - return; - } - } - else if (npc.timeLeft < 1800) - npc.timeLeft = 1800; - - float tileEnrageMult = (CalamityWorld.LegendaryMode && revenge) ? 1.5f : bossRush ? 1.375f : 1f; - npc.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !bossRush; - - // Set AI variable to be used by Dark Energies - npc.ai[1] = tileEnrageMult; - - // Increase projectile fire rate based on number of nearby active tiles - float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f)); - - // Decides whether Ceaseless moves closer to its target or not - float distanceRequiredToMove = (Main.getGoodWorld || !anyDarkEnergies) ? 320f : bossRush ? 600f : death ? 520f : revenge ? 480f : expertMode ? 440f : 400f; - bool move = Vector2.Distance(npc.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(npc.Center, 1, 1, player.Center, 1, 1); - - // Succ attack - if (!anyDarkEnergies) - { - // This is here because it's used in multiple places - float suckDistance = (CalamityWorld.LegendaryMode && revenge) ? 2400f : bossRush ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f; - - // Move closer to the target before trying to succ - if (movingDuringSuccPhase) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (move) - Movement(true); - else - npc.ai[3] = 1f; - } - else - { - // Set damage - npc.damage = npc.defDamage; - - // Use this to generate more and more dust in final phase - float finalPhaseDustRatio = 1f; - if (succSoHardThatYouDie) - { - finalPhaseDustRatio = 5f; - } - else if (theBigSucc) - { - float amount = (10f - (float)(npc.life / (double)npc.lifeMax) * 100f) / 10f; - finalPhaseDustRatio += MathHelper.Lerp(0f, 2f, amount); - } - - // Slow down - if (npc.velocity.Length() > 0.5f) - npc.velocity *= 0.8f; - else - npc.velocity = Vector2.Zero; - - // Move towards target again if they get outside the succ radius - float moveCloserGateValue = suckDistance * 0.8f; - if (Vector2.Distance(npc.Center, player.Center) > moveCloserGateValue) - npc.ai[3] = 0f; - - // Ceaseless Void sucks in dark energy in different patterns - // This attack also sucks in all players that are within reach of the succ - int dustRings = 3; - for (int h = 0; h < dustRings; h++) - { - float distanceDivisor = h + 1f; - float dustDistance = suckDistance / distanceDivisor; - int numDust = (int)(0.1f * MathHelper.TwoPi * dustDistance); - float angleIncrement = MathHelper.TwoPi / numDust; - Vector2 dustOffset = new Vector2(dustDistance, 0f); - dustOffset = dustOffset.RotatedByRandom(MathHelper.TwoPi); - - int var = (int)(dustDistance / finalPhaseDustRatio); - float dustVelocity = 24f / distanceDivisor * finalPhaseDustRatio; - for (int i = 0; i < numDust; i++) - { - if (Main.rand.NextBool(var)) - { - dustOffset = dustOffset.RotatedBy(angleIncrement); - int dust = Dust.NewDust(npc.Center, 1, 1, ModContent.DustType()); - Main.dust[dust].position = npc.Center + dustOffset; - Main.dust[dust].fadeIn = 1f; - Main.dust[dust].velocity = Vector2.Normalize(npc.Center - Main.dust[dust].position) * dustVelocity; - Main.dust[dust].scale = 3f - h; - } - } - } - - float succPower = 0.125f + finalPhaseDustRatio * 0.125f; - for (int i = 0; i < Main.maxPlayers; i++) - { - float distance = Vector2.Distance(Main.player[i].Center, npc.Center); - if (distance < suckDistance && Main.player[i].grappling[0] == -1) - { - if (Collision.CanHit(npc.Center, 1, 1, Main.player[i].Center, 1, 1)) - { - float distanceRatio = distance / suckDistance; - float multiplier = 1f - distanceRatio; - - if (Main.player[i].Center.X < npc.Center.X) - Main.player[i].velocity.X += succPower * multiplier; - else - Main.player[i].velocity.X -= succPower * multiplier; - } - } - } - - // Slowly die in final phase and then implode - // This phase lasts 20 seconds - if (theBigSucc && calamityGlobalNPC.newAI[1] % 60f == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int damageAmt = npc.lifeMax / 200; - npc.life -= damageAmt; - npc.DamageEffect(damageAmt); - } - - if (npc.life <= ((npc.lifeMax / 200) * 5) && !npc.ModNPC().playedbuildsound) - { - SoundEngine.PlaySound(CeaselessVoid.CeaselessVoid.BuildupSound, npc.Center); - npc.ModNPC().playedbuildsound = true; - } - - if (npc.life <= 0) - { - npc.life = 0; - npc.HitEffect(); - npc.checkDead(); - } - - npc.netUpdate = true; - } - - // Beam Portals - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (calamityGlobalNPC.newAI[1] == 0f) - { - int numBeamPortals = bossRush ? 4 : revenge ? 3 : 2; - float degrees = 360 / numBeamPortals; - float beamPortalDistance = bossRush ? 360f : death ? 400f : revenge ? 420f : expertMode ? 440f : 480f; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - for (int i = 0; i < numBeamPortals; i++) - { - float ai1 = i * degrees; - Projectile.NewProjectile(npc.GetSource_FromAI(), player.Center.X + (float)(Math.Sin(i * degrees) * beamPortalDistance), player.Center.Y + (float)(Math.Cos(i * degrees) * beamPortalDistance), 0f, 0f, type, damage, 0f, Main.myPlayer, ai1, 0f); - } - } - } - - // Use this timer to lessen Dark Energy projectile rate of fire while Beam Portals are active - float beamPortalTimeLeft = 600f; - bool summonLessDarkEnergies = false; - if (calamityGlobalNPC.newAI[1] < beamPortalTimeLeft) - { - calamityGlobalNPC.newAI[1] += 1f; - summonLessDarkEnergies = true; - } - else if (theBigSucc) - calamityGlobalNPC.newAI[1] += 1f; - - // Suck in Dark Energy projectiles from far away - calamityGlobalNPC.newAI[3] += 1f; - float darkEnergySpiralGateValue = (summonLessDarkEnergies ? 24f : 12f) * projectileFireRateMultiplier; - if (calamityGlobalNPC.newAI[3] >= darkEnergySpiralGateValue) - { - calamityGlobalNPC.newAI[3] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - bool normalSpread = npc.localAI[0] % 2f == 0f; - float speed = 0.5f; - int totalProjectiles = 4; - float radians = MathHelper.TwoPi / totalProjectiles; - double angleA = radians * 0.5; - double angleB = MathHelper.ToRadians(90f) - angleA; - float velocityX = (float)(speed * Math.Sin(angleA) / Math.Sin(angleB)); - Vector2 spinningPoint = normalSpread ? new Vector2(0f, -speed) : new Vector2(-velocityX, -speed); - float radialOffset = MathHelper.ToRadians(npc.localAI[1]); - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 spawnVector = npc.Center + Vector2.Normalize(spinningPoint.RotatedBy(radians * i + radialOffset)) * suckDistance; - Vector2 velocity = Vector2.Normalize(npc.Center - spawnVector) * speed; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - - npc.localAI[1] += 10f; - } - - // Summon some extra projectiles in Expert Mode - if (phase2 && expertMode) - { - npc.localAI[2] += 1f; - if (npc.localAI[2] >= 60f * projectileFireRateMultiplier) - { - npc.localAI[2] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - bool normalSpread = npc.localAI[0] % 2f != 0f; - float speed = 2f; - int totalProjectiles = 2; - float radians = MathHelper.TwoPi / totalProjectiles; - double angleA = radians * 0.5; - double angleB = MathHelper.ToRadians(90f) - angleA; - float velocityX = (float)(speed * Math.Sin(angleA) / Math.Sin(angleB)); - Vector2 spinningPoint = normalSpread ? new Vector2(0f, -speed) : new Vector2(-velocityX, -speed); - float radialOffset = MathHelper.ToRadians(npc.localAI[1] * 0.25f); - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 spawnVector = npc.Center + Vector2.Normalize(spinningPoint.RotatedBy(radians * i + radialOffset)) * suckDistance; - Vector2 velocity = Vector2.Normalize(npc.Center - spawnVector) * speed; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - } - } - - // Summon some extra projectiles in Revengeance Mode - if (phase4 && revenge) - { - npc.localAI[3] += 1f; - if (npc.localAI[3] >= 90f * projectileFireRateMultiplier) - { - npc.localAI[3] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - bool normalSpread = npc.localAI[0] % 2f == 0f; - float speed = 4f; - int totalProjectiles = 2; - float radians = MathHelper.TwoPi / totalProjectiles; - double angleA = radians * 0.5; - double angleB = MathHelper.ToRadians(90f) - angleA; - float velocityX = (float)(speed * Math.Sin(angleA) / Math.Sin(angleB)); - Vector2 spinningPoint = normalSpread ? new Vector2(0f, -speed) : new Vector2(-velocityX, -speed); - float radialOffset = MathHelper.ToRadians(npc.localAI[1] * 0.25f); - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 spawnVector = npc.Center + Vector2.Normalize(spinningPoint.RotatedBy(radians * i + radialOffset)) * suckDistance; - Vector2 velocity = Vector2.Normalize(npc.Center - spawnVector) * speed; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - } - } - } - } - else - { - // Avoid cheap bullshit - npc.damage = 0; - - if (move) - { - Movement(false); - } - else - { - // Slow down - if (npc.velocity.Length() > 0.5f) - npc.velocity *= 0.8f; - else - npc.velocity = Vector2.Zero; - } - - // Count up all Dark Energy HP values - int totalDarkEnergyHP = 0; - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC darkEnergy = Main.npc[i]; - if (darkEnergy.active && darkEnergy.type == ModContent.NPCType()) - totalDarkEnergyHP += darkEnergy.life; - } - - // Destroy all Dark Energies if their total HP is below 20% - int darkEnergyMaxHP = bossRush ? DarkEnergy.MaxBossRushHP : DarkEnergy.MaxHP; - //These are still needed so that CV Dark energy despawn works properly - double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; - darkEnergyMaxHP += (int)(darkEnergyMaxHP * HPBoost); - - int totalDarkEnergiesSpawned = darkEnergyAmt * 3 + 2; - int totalDarkEnergyMaxHP = darkEnergyMaxHP * totalDarkEnergiesSpawned; - int succPhaseGateValue = (int)(totalDarkEnergyMaxHP * 0.2); - if (totalDarkEnergyHP < succPhaseGateValue) - { - SoundEngine.PlaySound(SoundID.NPCDeath44, npc.Center); - - // Kill all Dark Energies - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC darkEnergy = Main.npc[i]; - if (darkEnergy.active && darkEnergy.type == ModContent.NPCType()) - { - darkEnergy.HitEffect(); - darkEnergy.active = false; - darkEnergy.netUpdate = true; - } - } - - // Generate a dust explosion - int dustAmt = 30; - int random = 3; - for (int j = 0; j < 10; j++) - { - random += j * 2; - int dustAmtSpawned = 0; - int scale = random * 13; - float dustPositionX = npc.Center.X - (scale / 2); - float dustPositionY = npc.Center.Y - (scale / 2); - while (dustAmtSpawned < dustAmt) - { - float dustVelocityX = Main.rand.Next(-random, random); - float dustVelocityY = Main.rand.Next(-random, random); - float dustVelocityScalar = random * 2f; - float dustVelocity = (float)Math.Sqrt(dustVelocityX * dustVelocityX + dustVelocityY * dustVelocityY); - dustVelocity = dustVelocityScalar / dustVelocity; - dustVelocityX *= dustVelocity; - dustVelocityY *= dustVelocity; - int dust = Dust.NewDust(new Vector2(dustPositionX, dustPositionY), scale, scale, (int)CalamityDusts.PurpleCosmilite, 0f, 0f, 100, default, 5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].position.X = npc.Center.X; - Main.dust[dust].position.Y = npc.Center.Y; - Main.dust[dust].position.X += Main.rand.Next(-10, 11); - Main.dust[dust].position.Y += Main.rand.Next(-10, 11); - Main.dust[dust].velocity.X = dustVelocityX; - Main.dust[dust].velocity.Y = dustVelocityY; - dustAmtSpawned++; - } - } - } - } - - // Basic movement towards a location - void Movement(bool succ) - { - float velocity = moveVeryFast ? 25f : bossRush ? 15f : ((expertMode ? 7.5f : 6f) + (float)(death ? 2f * (1D - lifeRatio) : 0f)) * tileEnrageMult; - float acceleration = (moveVeryFast ? 0.75f : bossRush ? 0.3f : death ? 0.2f : expertMode ? 0.16f : 0.12f) + (float)(death ? 0.04f * (1D - lifeRatio) : 0f) * tileEnrageMult; - - // Increase speed dramatically in succ phase - if (succ) - { - velocity *= 2f; - acceleration *= 2f; - } - - if (Main.getGoodWorld) - { - velocity *= 1.15f; - acceleration *= 1.15f; - } - - Vector2 destination = player.Center; - - // Move between 8 different positions around the player, in order - float maxDistance = 320f; - Vector2 moveToOffset = succ ? Vector2.Zero : Main.getGoodWorld ? new Vector2(0f, -maxDistance) : Vector2.Zero; - if (!succ && Main.getGoodWorld) - { - // Move to a new location every few seconds - calamityGlobalNPC.newAI[2] += 1f; - float newPositionGateValue = bossRush ? 120f : death ? 180f : revenge ? 210f : expertMode ? 240f : 300f; - if (calamityGlobalNPC.newAI[2] > newPositionGateValue) - { - calamityGlobalNPC.newAI[2] = 0f; - - npc.ai[0] += 1f; - if (npc.ai[0] > 7f) - npc.ai[0] = 0f; - } - - switch ((int)npc.ai[0]) - { - case 0: - break; - case 1: - moveToOffset.X = -maxDistance; - break; - case 2: - moveToOffset.X = -maxDistance; - moveToOffset.Y = 0f; - break; - case 3: - moveToOffset.X = -maxDistance; - moveToOffset.Y = maxDistance; - break; - case 4: - moveToOffset.Y = maxDistance; - break; - case 5: - moveToOffset.X = maxDistance; - moveToOffset.Y = maxDistance; - break; - case 6: - moveToOffset.X = maxDistance; - moveToOffset.Y = 0f; - break; - case 7: - moveToOffset.X = maxDistance; - break; - } - } - - destination += moveToOffset; - - // How far Ceaseless Void is from where it's supposed to be - Vector2 distanceFromDestination = destination - npc.Center; - - // Movement - if (npc.Distance(destination) > maxDistance || succ || !Main.getGoodWorld) - CalamityUtils.SmoothMovement(npc, 0f, distanceFromDestination, velocity, acceleration, true); - } - - // Spawn more Dark Energies as the fight progresses - if (calamityGlobalNPC.newAI[0] == 0f && npc.life > 0) - calamityGlobalNPC.newAI[0] = npc.lifeMax; - - if (npc.life > 0) - { - int healthGateValue = (int)(npc.lifeMax * 0.3); - if ((npc.life + healthGateValue) < calamityGlobalNPC.newAI[0]) - { - npc.TargetClosest(); - calamityGlobalNPC.newAI[0] = npc.life; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - npc.ai[3] = 0f; - npc.localAI[0] += 1f; - npc.localAI[1] = 0f; - npc.localAI[2] = 0f; - npc.localAI[3] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (phase4) - { - for (int i = 0; i < darkEnergyAmt; i++) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 0f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 2f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 4f, 0f, 0f); - } - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 1f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 3f, 0f, 0f); - } - else if (phase3) - { - for (int i = 0; i < darkEnergyAmt; i++) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 0f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 1.5f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 3f, 0f, 0f); - } - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 0.5f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 2f, 0f, 0f); - } - else - { - for (int i = 0; i < darkEnergyAmt; i++) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 0f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 1f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(npc.Center.Y + (Math.Cos(i * spacing) * distance2)), ModContent.NPCType(), npc.whoAmI, i * spacing, 2f, 0f, 0f); - } - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 1.5f, 0f, 0f); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(0) * distance2)), (int)(npc.Center.Y + (Math.Cos(0) * distance2)), ModContent.NPCType(), npc.whoAmI, 0f, 2.5f, 0f, 0f); - } - } - - // Despawn potentially hazardous projectiles when entering a new phase - for (int i = 0; i < Main.maxProjectiles; i++) - { - Projectile projectile = Main.projectile[i]; - if (projectile.active) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType() || - projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - if (projectile.timeLeft > 30) - projectile.timeLeft = 30; - } - } - } - } - } - } - } -} diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index 64336874e0..cc077b9f94 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -12,13 +12,14 @@ using CalamityMod.Items.Potions; using CalamityMod.Items.TreasureBags; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; using CalamityMod.Sounds; using CalamityMod.UI.VanillaBossBars; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; +using System; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -26,6 +27,7 @@ using Terraria.GameContent.Bestiary; using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; namespace CalamityMod.NPCs.CeaselessVoid { @@ -52,20 +54,18 @@ namespace CalamityMod.NPCs.CeaselessVoid NPCID.Sets.MPAllowedEnemies[Type] = true; if (!Main.dedServ) { - GlowTexture = ModContent.Request(Texture + "Glow", AssetRequestMode.AsyncLoad); + GlowTexture = Request(Texture + "Glow", AssetRequestMode.AsyncLoad); } } public override void SetDefaults() { - NPC.Calamity().canBreakPlayerDefense = true; NPC.GetNPCDamage(); NPC.npcSlots = 36f; NPC.width = 100; NPC.height = 100; NPC.defense = 80; - CalamityGlobalNPC global = NPC.Calamity(); - global.DR = 0.5f; + NPC.Calamity().DR = 0.5f; NPC.LifeMaxNERB(65000, 78000, 72000); NPC.value = Item.buyPrice(1, 0, 0, 0); NPC.aiStyle = -1; @@ -74,8 +74,9 @@ namespace CalamityMod.NPCs.CeaselessVoid NPC.noGravity = true; NPC.noTileCollide = true; NPC.boss = true; - NPC.BossBar = ModContent.GetInstance(); + NPC.BossBar = GetInstance(); NPC.DeathSound = DeathSound; + NPC.Calamity().canBreakPlayerDefense = true; NPC.Calamity().VulnerableToSickness = false; // Scale HP in Master @@ -125,7 +126,557 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void AI() { - CeaselessVoidAI.VanillaCeaselessVoidAI(NPC, Mod); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + CalamityGlobalNPC.voidBoss = NPC.whoAmI; + + // Percent life remaining + double lifeRatio = NPC.life / (double)NPC.lifeMax; + + // Difficulty modes + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + // Phases + bool phase2 = lifeRatio <= 0.7; + bool phase3 = lifeRatio <= 0.4; + bool phase4 = lifeRatio <= 0.1; + bool theBigSucc = NPC.life / (double)NPC.lifeMax <= 0.1; + bool succSoHardThatYouDie = NPC.life / (double)NPC.lifeMax <= 0.005; + + // Spawn Dark Energies + int darkEnergyAmt = death ? 6 : revenge ? 5 : expertMode ? 4 : 3; + if (phase2) + darkEnergyAmt += 1; + if (phase3) + darkEnergyAmt += 1; + if (phase4) + darkEnergyAmt += 1; + + if (Main.getGoodWorld) + darkEnergyAmt *= 2; + + // Spawn a few Dark Energies as soon as the fight starts + int spacing = 360 / darkEnergyAmt; + int distance2 = 10; + if (NPC.ai[2] == 0f) + { + NPC.ai[2] = 1f; + for (int i = 0; i < darkEnergyAmt; i++) + { + for (int j = 0; j < 3; j++) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(NPC.Center.Y + (Math.Cos(i * spacing) * distance2)), NPCType(), NPC.whoAmI, i * spacing, j); + } + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 0.5f); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 1.5f); + } + + // If there are any Dark Energies alive, change AI and don't take damage + bool anyDarkEnergies = NPC.AnyNPCs(NPCType()); + bool movingDuringSuccPhase = NPC.ai[3] == 0f; + NPC.dontTakeDamage = anyDarkEnergies || theBigSucc || movingDuringSuccPhase; + + // 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(); + + Player player = Main.player[NPC.target]; + + // Speed enrage + bool moveVeryFast = Vector2.Distance(NPC.Center, player.Center) > 960f || (!player.ZoneDungeon && !bossRush && player.position.Y < Main.worldSurface * 16.0); + + // Despawn + if (!player.active || player.dead || Vector2.Distance(player.Center, NPC.Center) > 5600f) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + if (!player.active || player.dead || Vector2.Distance(player.Center, NPC.Center) > 5600f) + { + if (NPC.velocity.Y > 3f) + NPC.velocity.Y = 3f; + NPC.velocity.Y -= 0.1f; + if (NPC.velocity.Y < -12f) + NPC.velocity.Y = -12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + return; + } + } + else if (NPC.timeLeft < 1800) + NPC.timeLeft = 1800; + + float tileEnrageMult = (CalamityWorld.LegendaryMode && revenge) ? 1.5f : bossRush ? 1.375f : 1f; + NPC.Calamity().CurrentlyEnraged = tileEnrageMult > 1f && !bossRush; + + // Set AI variable to be used by Dark Energies + NPC.ai[1] = tileEnrageMult; + + // Increase projectile fire rate based on number of nearby active tiles + float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f)); + + // Decides whether Ceaseless moves closer to its target or not + float distanceRequiredToMove = (Main.getGoodWorld || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f; + bool move = Vector2.Distance(NPC.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(NPC.Center, 1, 1, player.Center, 1, 1); + + // Succ attack + if (!anyDarkEnergies) + { + // This is here because it's used in multiple places + float suckDistance = (CalamityWorld.LegendaryMode && revenge) ? 2400f : bossRush ? 1920f : death ? 1600f : revenge ? 1440f : expertMode ? 1280f : 1040f; + + // Move closer to the target before trying to succ + if (movingDuringSuccPhase) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (move) + Movement(true); + else + NPC.ai[3] = 1f; + } + else + { + // Set damage + NPC.damage = NPC.defDamage; + + // Use this to generate more and more dust in final phase + float finalPhaseDustRatio = 1f; + if (succSoHardThatYouDie) + { + finalPhaseDustRatio = 5f; + } + else if (theBigSucc) + { + float amount = (10f - (float)(NPC.life / (double)NPC.lifeMax) * 100f) / 10f; + finalPhaseDustRatio += MathHelper.Lerp(0f, 2f, amount); + } + + // Slow down + if (NPC.velocity.Length() > 0.5f) + NPC.velocity *= 0.8f; + else + NPC.velocity = Vector2.Zero; + + // Move towards target again if they get outside the succ radius + float moveCloserGateValue = suckDistance * 0.8f; + if (Vector2.Distance(NPC.Center, player.Center) > moveCloserGateValue) + NPC.ai[3] = 0f; + + // Ceaseless Void sucks in dark energy in different patterns + // This attack also sucks in all players that are within reach of the succ + for (int h = 0; h < 3; h++) + { + float distanceDivisor = h + 1f; + float dustDistance = suckDistance / distanceDivisor; + int numDust = (int)(0.1f * MathHelper.TwoPi * dustDistance); + Vector2 dustOffset = Vector2.UnitX.RotatedByRandom(MathHelper.Pi) * dustDistance; + + int var = (int)(dustDistance / finalPhaseDustRatio); + float dustVelocity = 24f / distanceDivisor * finalPhaseDustRatio; + for (int i = 0; i < numDust; i++) + { + if (Main.rand.NextBool(var)) + { + dustOffset = dustOffset.RotatedBy(MathHelper.TwoPi / numDust); + Vector2 dustSpawn = NPC.Center + dustOffset; + Dust dust = Dust.NewDustPerfect(dustSpawn, DustType(), Utils.DirectionTo(dustSpawn, NPC.Center) * dustVelocity, Scale: 3 - h); + dust.fadeIn = 1f; + } + } + } + + float succPower = 0.125f + finalPhaseDustRatio * 0.125f; + for (int i = 0; i < Main.maxPlayers; i++) + { + float distance = Vector2.Distance(Main.player[i].Center, NPC.Center); + if (distance < suckDistance && Main.player[i].grappling[0] == -1) + { + if (Collision.CanHit(NPC.Center, 1, 1, Main.player[i].Center, 1, 1)) + { + float distanceRatio = distance / suckDistance; + float multiplier = 1f - distanceRatio; + + if (Main.player[i].Center.X < NPC.Center.X) + Main.player[i].velocity.X += succPower * multiplier; + else + Main.player[i].velocity.X -= succPower * multiplier; + } + } + } + + // Slowly die in final phase and then implode + // This phase lasts 20 seconds + if (theBigSucc && calamityGlobalNPC.newAI[1] % 60f == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int damageAmt = NPC.lifeMax / 200; + NPC.life -= damageAmt; + NPC.DamageEffect(damageAmt); + } + + if (NPC.life <= (NPC.lifeMax / 40) && !playedbuildsound) + { + SoundEngine.PlaySound(BuildupSound, NPC.Center); + playedbuildsound = true; + } + + if (NPC.life <= 0) + { + NPC.life = 0; + NPC.HitEffect(); + NPC.checkDead(); + } + + NPC.netUpdate = true; + } + + // Beam Portals + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (calamityGlobalNPC.newAI[1] == 0f) + { + int numBeamPortals = bossRush ? 4 : revenge ? 3 : 2; + float degrees = 360 / numBeamPortals; + float beamPortalDistance = bossRush ? 360f : death ? 400f : revenge ? 420f : expertMode ? 440f : 480f; + int type = ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + for (int i = 0; i < numBeamPortals; i++) + { + float ai1 = i * degrees; + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.Center.X + (float)(Math.Sin(i * degrees) * beamPortalDistance), player.Center.Y + (float)(Math.Cos(i * degrees) * beamPortalDistance), 0f, 0f, type, damage, 0f, Main.myPlayer, ai1, 0f); + } + } + } + + // Use this timer to lessen Dark Energy projectile rate of fire while Beam Portals are active + float beamPortalTimeLeft = 600f; + bool summonLessDarkEnergies = false; + if (calamityGlobalNPC.newAI[1] < beamPortalTimeLeft) + { + calamityGlobalNPC.newAI[1] += 1f; + summonLessDarkEnergies = true; + } + else if (theBigSucc) + calamityGlobalNPC.newAI[1] += 1f; + + // Suck in Dark Energy projectiles from far away + calamityGlobalNPC.newAI[3] += 1f; + float darkEnergySpiralGateValue = (summonLessDarkEnergies ? 24f : 12f) * projectileFireRateMultiplier; + if (calamityGlobalNPC.newAI[3] >= darkEnergySpiralGateValue) + { + calamityGlobalNPC.newAI[3] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + bool normalSpread = NPC.localAI[0] % 2f == 0f; + float speed = 0.5f; + int totalProjectiles = 4; + Vector2 spinningPoint = new Vector2(normalSpread ? 0f : -speed, -speed); + float radialOffset = MathHelper.ToRadians(NPC.localAI[1]); + for (int i = 0; i < totalProjectiles; i++) + { + Vector2 spawnVector = NPC.Center + Vector2.Normalize(spinningPoint.RotatedBy(MathHelper.TwoPi / totalProjectiles * i + radialOffset)) * suckDistance; + Vector2 velocity = Vector2.Normalize(NPC.Center - spawnVector) * speed; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + + NPC.localAI[1] += 10f; + } + + // Summon some extra projectiles in Expert Mode + if (phase2 && expertMode) + { + NPC.localAI[2] += 1f; + if (NPC.localAI[2] >= 60f * projectileFireRateMultiplier) + { + NPC.localAI[2] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + bool normalSpread = NPC.localAI[0] % 2f != 0f; + float speed = 2f; + int totalProjectiles = 2; + float radians = MathHelper.TwoPi / totalProjectiles; + double angleA = radians * 0.5; + double angleB = MathHelper.ToRadians(90f) - angleA; + float velocityX = (float)(speed * Math.Sin(angleA) / Math.Sin(angleB)); + Vector2 spinningPoint = new Vector2(normalSpread ? 0f : -velocityX, -speed); + float radialOffset = MathHelper.ToRadians(NPC.localAI[1] * 0.25f); + for (int i = 0; i < totalProjectiles; i++) + { + Vector2 spawnVector = NPC.Center + Vector2.Normalize(spinningPoint.RotatedBy(radians * i + radialOffset)) * suckDistance; + Vector2 velocity = Vector2.Normalize(NPC.Center - spawnVector) * speed; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + + // Summon some extra projectiles in Revengeance Mode + if (phase4 && revenge) + { + NPC.localAI[3] += 1f; + if (NPC.localAI[3] >= 90f * projectileFireRateMultiplier) + { + NPC.localAI[3] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + bool normalSpread = NPC.localAI[0] % 2f == 0f; + float speed = 4f; + int totalProjectiles = 2; + float radians = MathHelper.TwoPi / totalProjectiles; + double angleA = radians * 0.5; + double angleB = MathHelper.ToRadians(90f) - angleA; + float velocityX = (float)(speed * Math.Sin(angleA) / Math.Sin(angleB)); + Vector2 spinningPoint = new Vector2(normalSpread ? 0f : -velocityX, -speed); + float radialOffset = MathHelper.ToRadians(NPC.localAI[1] * 0.25f); + for (int i = 0; i < totalProjectiles; i++) + { + Vector2 spawnVector = NPC.Center + Vector2.Normalize(spinningPoint.RotatedBy(radians * i + radialOffset)) * suckDistance; + Vector2 velocity = Vector2.Normalize(NPC.Center - spawnVector) * speed; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + } + } + else + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (move) + { + Movement(false); + } + else + { + // Slow down + if (NPC.velocity.Length() > 0.5f) + NPC.velocity *= 0.8f; + else + NPC.velocity = Vector2.Zero; + } + + // Count up all Dark Energy HP values + int totalDarkEnergyHP = 0; + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC darkEnergy = Main.npc[i]; + if (darkEnergy.active && darkEnergy.type == NPCType()) + totalDarkEnergyHP += darkEnergy.life; + } + + // Destroy all Dark Energies if their total HP is below 20% + int darkEnergyMaxHP = bossRush ? DarkEnergy.MaxBossRushHP : DarkEnergy.MaxHP; + //These are still needed so that CV Dark energy despawn works properly + double HPBoost = CalamityServerConfig.Instance.BossHealthBoost * 0.01; + darkEnergyMaxHP += (int)(darkEnergyMaxHP * HPBoost); + + int totalDarkEnergiesSpawned = darkEnergyAmt * 3 + 2; + int totalDarkEnergyMaxHP = darkEnergyMaxHP * totalDarkEnergiesSpawned; + int succPhaseGateValue = (int)(totalDarkEnergyMaxHP * 0.2); + if (totalDarkEnergyHP < succPhaseGateValue) + { + SoundEngine.PlaySound(SoundID.NPCDeath44, NPC.Center); + + // Kill all Dark Energies + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC darkEnergy = Main.npc[i]; + if (darkEnergy.active && darkEnergy.type == NPCType()) + { + darkEnergy.HitEffect(); + darkEnergy.active = false; + darkEnergy.netUpdate = true; + } + } + + // Generate a dust explosion + int dustAmt = 30; + int random = 3; + for (int j = 0; j < 10; j++) + { + random += j * 2; + for (int d = 0; d < dustAmt; d++) + { + Vector2 dustVelocity = new Vector2(Main.rand.Next(-random, random), Main.rand.Next(-random, random)); + dustVelocity = Vector2.Normalize(dustVelocity) * random * 2f; + Dust realDust = Dust.NewDustPerfect(NPC.Center + Main.rand.NextVector2CircularEdge(10f, 10f), (int)CalamityDusts.PurpleCosmilite, dustVelocity, 100, default, 5f); + realDust.noGravity = true; + } + } + } + } + + // Basic movement towards a location + void Movement(bool succ) + { + float velocity = moveVeryFast ? 25f : bossRush ? 15f : ((expertMode ? 7.5f : 6f) + (float)(death ? 2f * (1D - lifeRatio) : 0f)) * tileEnrageMult; + float acceleration = (moveVeryFast ? 0.75f : bossRush ? 0.3f : death ? 0.2f : expertMode ? 0.16f : 0.12f) + (float)(death ? 0.04f * (1D - lifeRatio) : 0f) * tileEnrageMult; + + // Increase speed dramatically in succ phase + if (succ) + { + velocity *= 2f; + acceleration *= 2f; + } + + if (Main.getGoodWorld) + { + velocity *= 1.15f; + acceleration *= 1.15f; + } + + Vector2 destination = player.Center; + + // Move between 8 different positions around the player, in order + float maxDistance = 320f; + Vector2 moveToOffset = succ ? Vector2.Zero : Main.getGoodWorld ? new Vector2(0f, -maxDistance) : Vector2.Zero; + if (!succ && Main.getGoodWorld) + { + // Move to a new location every few seconds + calamityGlobalNPC.newAI[2] += 1f; + float newPositionGateValue = bossRush ? 120f : death ? 180f : revenge ? 210f : expertMode ? 240f : 300f; + if (calamityGlobalNPC.newAI[2] > newPositionGateValue) + { + calamityGlobalNPC.newAI[2] = 0f; + + NPC.ai[0] += 1f; + if (NPC.ai[0] > 7f) + NPC.ai[0] = 0f; + } + + switch ((int)NPC.ai[0]) + { + case 0: + break; + case 1: + moveToOffset.X = -maxDistance; + break; + case 2: + moveToOffset.X = -maxDistance; + moveToOffset.Y = 0f; + break; + case 3: + moveToOffset.X = -maxDistance; + moveToOffset.Y = maxDistance; + break; + case 4: + moveToOffset.Y = maxDistance; + break; + case 5: + moveToOffset.X = maxDistance; + moveToOffset.Y = maxDistance; + break; + case 6: + moveToOffset.X = maxDistance; + moveToOffset.Y = 0f; + break; + case 7: + moveToOffset.X = maxDistance; + break; + } + } + + destination += moveToOffset; + + // How far Ceaseless Void is from where it's supposed to be + Vector2 distanceFromDestination = destination - NPC.Center; + + // Movement + if (NPC.Distance(destination) > maxDistance || succ || !Main.getGoodWorld) + CalamityUtils.SmoothMovement(NPC, 0f, distanceFromDestination, velocity, acceleration, true); + } + + // Spawn more Dark Energies as the fight progresses + if (calamityGlobalNPC.newAI[0] == 0f && NPC.life > 0) + calamityGlobalNPC.newAI[0] = NPC.lifeMax; + + if (NPC.life > 0) + { + int healthGateValue = (int)(NPC.lifeMax * 0.3); + if ((NPC.life + healthGateValue) < calamityGlobalNPC.newAI[0]) + { + NPC.TargetClosest(); + calamityGlobalNPC.newAI[0] = NPC.life; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + NPC.ai[3] = 0f; + NPC.localAI[0] += 1f; + NPC.localAI[1] = 0f; + NPC.localAI[2] = 0f; + NPC.localAI[3] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (phase4) + { + for (int i = 0; i < darkEnergyAmt; i++) + { + for (int j = 0; j < 3; j++) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(NPC.Center.Y + (Math.Cos(i * spacing) * distance2)), NPCType(), NPC.whoAmI, i * spacing, j * 2f); + } + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 1f); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 3f); + } + else if (phase3) + { + for (int i = 0; i < darkEnergyAmt; i++) + { + for (int j = 0; j < 3; j++) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(NPC.Center.Y + (Math.Cos(i * spacing) * distance2)), NPCType(), NPC.whoAmI, i * spacing, j * 1.5f); + } + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 0.5f); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 2f); + } + else + { + for (int i = 0; i < darkEnergyAmt; i++) + { + for (int j = 0; j < 3; j++) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + (Math.Sin(i * spacing) * distance2)), (int)(NPC.Center.Y + (Math.Cos(i * spacing) * distance2)), NPCType(), NPC.whoAmI, i * spacing, j); + } + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 1.5f); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y + distance2), NPCType(), NPC.whoAmI, 0f, 2.5f); + } + } + + // Despawn potentially hazardous projectiles when entering a new phase + for (int i = 0; i < Main.maxProjectiles; i++) + { + Projectile projectile = Main.projectile[i]; + if (projectile.active) + { + if (projectile.type == ProjectileType() || projectile.type == ProjectileType() || + projectile.type == ProjectileType() || projectile.type == ProjectileType()) + { + if (projectile.timeLeft > 30) + projectile.timeLeft = 30; + } + } + } + } + } } public override bool CanHitPlayer(Player target, ref int cooldownSlot) @@ -219,7 +770,7 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void ModifyNPCLoot(NPCLoot npcLoot) { - npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); + npcLoot.Add(ItemDropRule.BossBag(ItemType())); // Normal drops: Everything that would otherwise be in the bag LeadingConditionRule normalOnly = new LeadingConditionRule(new Conditions.NotExpert()); @@ -228,40 +779,40 @@ namespace CalamityMod.NPCs.CeaselessVoid // Weapons int[] weapons = new int[] { - ModContent.ItemType(), - ModContent.ItemType(), + ItemType(), + ItemType(), }; normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, weapons)); // Materials - normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 10, 12)); + normalOnly.Add(DropHelper.PerPlayer(ItemType(), 1, 10, 12)); // Equipment - normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); + normalOnly.Add(DropHelper.PerPlayer(ItemType())); // Vanity - normalOnly.Add(ModContent.ItemType(), 7); - var godSlayerVanity = ItemDropRule.Common(ModContent.ItemType(), 20); - godSlayerVanity.OnSuccess(ItemDropRule.Common(ModContent.ItemType())); - godSlayerVanity.OnSuccess(ItemDropRule.Common(ModContent.ItemType())); + normalOnly.Add(ItemType(), 7); + var godSlayerVanity = ItemDropRule.Common(ItemType(), 20); + godSlayerVanity.OnSuccess(ItemDropRule.Common(ItemType())); + godSlayerVanity.OnSuccess(ItemDropRule.Common(ItemType())); normalOnly.Add(godSlayerVanity); - normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt); + normalOnly.Add(ItemType(), ThankYouPainting.DropInt); } - npcLoot.Add(ModContent.ItemType(), 10); + npcLoot.Add(ItemType(), 10); // Relic - npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ItemType()); // GFB Eclipse Mirror and Nucleogenesis drop var GFBOnly = npcLoot.DefineConditionalDropSet(DropHelper.GFB); { - GFBOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()), hideLootReport: true); - GFBOnly.Add(DropHelper.PerPlayer(ModContent.ItemType()), hideLootReport: true); + GFBOnly.Add(DropHelper.PerPlayer(ItemType()), hideLootReport: true); + GFBOnly.Add(DropHelper.PerPlayer(ItemType()), hideLootReport: true); } // Lore - npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCeaselessVoid, ModContent.ItemType(), desc: DropHelper.FirstKillText); + npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedCeaselessVoid, ItemType(), desc: DropHelper.FirstKillText); } public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) @@ -271,7 +822,7 @@ namespace CalamityMod.NPCs.CeaselessVoid public override void BossLoot(ref string name, ref int potionType) { - potionType = ModContent.ItemType(); + potionType = ItemType(); } public override void HitEffect(NPC.HitInfo hit) From 4629351c18fa12ea25df6137ed956a3631894f91 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Thu, 5 Jun 2025 04:56:11 +0700 Subject: [PATCH 30/72] screap --- Items/Materials/WulfrumMetalScrap.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Materials/WulfrumMetalScrap.cs b/Items/Materials/WulfrumMetalScrap.cs index 29df19b121..1f1031014f 100644 --- a/Items/Materials/WulfrumMetalScrap.cs +++ b/Items/Materials/WulfrumMetalScrap.cs @@ -60,7 +60,7 @@ namespace CalamityMod.Items.Materials return true; else { - spriteBatch.Draw(altTexture.Value, position, null, drawColor, 0, origin, altTexture.Size() / 2, SpriteEffects.None, 0); + spriteBatch.Draw(altTexture.Value, position, null, drawColor, 0, altTexture.Size() / 2, scale, SpriteEffects.None, 0); return false; } } From 1aacebbe4405402e823746dca7533911b60c276d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Jun 2025 00:47:57 -0400 Subject: [PATCH 31/72] More boss tweaks I've been sitting on 1 - Removed Hive Mind firing vile spit 2 - Cal Clone no longer has aimed hellblasts during BH2 3 - Removed Lunatic Cultist summoning an Ancient Vision after interrupting the ritual --- NPCs/CalClone/CalamitasClone.cs | 2 +- .../CalamityBossAIs/CalamitasCloneAI.cs | 5 +- NPCs/CalamityGlobalNPC.cs | 67 ------------------- NPCs/HiveMind/HiveMind.cs | 58 +--------------- .../VanillaNPCAIOverrides/Bosses/CultistAI.cs | 7 -- 5 files changed, 6 insertions(+), 133 deletions(-) diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 1fa25a84ae..86483769a4 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -134,7 +134,7 @@ namespace CalamityMod.NPCs.CalClone public override void AI() { - CalamitasCloneAI.VanillaCalamitasCloneAI(NPC, Mod, BulletHellWarnSlot); + CalamitasCloneAI.VanillaCalamitasCloneAI(NPC, BulletHellWarnSlot); } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs index 7dfb5557da..1f70165548 100644 --- a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs +++ b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs @@ -21,7 +21,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs { public static class CalamitasCloneAI { - public static void VanillaCalamitasCloneAI(NPC npc, Mod mod, SlotId warn) + public static void VanillaCalamitasCloneAI(NPC npc, SlotId warn) { CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); @@ -386,7 +386,8 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs int type = ModContent.ProjectileType(); int damage = npc.GetProjectileDamage(type); float projSpeed = bossRush ? 4.5f : 4f; - if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f) + // Blasts aimed directly at the player's horizontal position, does not spawn during the second bullet hell + if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f && calamityGlobalNPC.newAI[2] != 2f) { float distance = Main.rand.NextBool() ? -1000f : 1000f; float velocity = distance == -1000f ? projSpeed : -projSpeed; diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 7bda915868..545cc5dcef 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -4137,73 +4137,6 @@ namespace CalamityMod.NPCs return DukeFishronAI.BuffedDetonatingBubbleAI(npc, Mod); } - // Expert+ Hive Mind Vile Spits - if (npc.type == NPCID.VileSpitEaterOfWorlds) - { - if (Main.expertMode || BossRushEvent.BossRushActive) - { - if (npc.ai[1] >= 69f) - { - if (npc.target == Main.maxPlayers) - { - npc.TargetClosest(); - - float velocity = Main.getGoodWorld ? 12f : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 10.5f : 9f; - if (npc.ai[1] == 70f) - velocity *= 0.4f; - - npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; - } - - if (Main.getGoodWorld && !npc.dontTakeDamage) - { - if ((double)(npc.Center.Y / 16f) < Main.worldSurface) - npc.dontTakeDamage = true; - } - - npc.damage = npc.GetAttackDamage_ScaledByStrength(32f); - - npc.ai[0] += 1f; - if (npc.ai[0] > 3f) - npc.ai[0] = 3f; - - if (npc.ai[0] == 2f) - { - npc.position += npc.velocity; - SoundEngine.PlaySound(SoundID.NPCDeath9, npc.Center); - for (int i = 0; i < 20; i++) - { - int dust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f) + npc.netOffset, npc.width, npc.height, DustID.CorruptGibs, 0f, 0f, 100, default, 1.8f); - Main.dust[dust].velocity *= 1.3f; - Main.dust[dust].velocity += npc.velocity; - Main.dust[dust].noGravity = true; - } - } - - if (Collision.SolidCollision(npc.position, npc.width, npc.height)) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - npc.StrikeInstantKill(); - } - - npc.EncourageDespawn(100); - - npc.position += npc.netOffset; - for (int i = 0; i < 2; i++) - { - int dust = Dust.NewDust(new Vector2(npc.position.X, npc.position.Y + 2f), npc.width, npc.height, DustID.CorruptGibs, npc.velocity.X * 0.1f, npc.velocity.Y * 0.1f, 80, default, 1.3f); - Main.dust[dust].velocity *= 0.3f; - Main.dust[dust].noGravity = true; - } - - npc.rotation += 0.4f * npc.direction; - npc.position -= npc.netOffset; - - return false; - } - } - } - if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { switch (npc.type) diff --git a/NPCs/HiveMind/HiveMind.cs b/NPCs/HiveMind/HiveMind.cs index dac83e0034..1917f8fbce 100644 --- a/NPCs/HiveMind/HiveMind.cs +++ b/NPCs/HiveMind/HiveMind.cs @@ -74,7 +74,6 @@ namespace CalamityMod.NPCs.HiveMind private int rainDashAmount = 1; private int rainDashesPerformed = 0; private bool performingRainDashCombo = false; - private int vileSpitFireRate = 24; // Fire rate for Expert-exclusive Vile Spits during phase 1 teleports private int phase2timer = 360; private int rotationDirection; private double rotation; @@ -176,7 +175,6 @@ namespace CalamityMod.NPCs.HiveMind lungeTime = 28; driftSpeed = 2f; driftBoost = 2f; - vileSpitFireRate = 18; } if (death) @@ -189,7 +187,6 @@ namespace CalamityMod.NPCs.HiveMind lungeTime = 23; driftSpeed = 3.5f; driftBoost = 1.5f; - vileSpitFireRate = 15; } if (bossRush) @@ -200,7 +197,6 @@ namespace CalamityMod.NPCs.HiveMind lungeTime = 16; driftSpeed = 6f; driftBoost = 1f; - vileSpitFireRate = 12; } if (Main.getGoodWorld) @@ -674,15 +670,6 @@ namespace CalamityMod.NPCs.HiveMind burrowedDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.Center.Y), NPC.width, NPC.height / 2, DustID.Demonite, 0f, -3f, 100, default, 2.5f * NPC.scale); Main.dust[burrowedDust2].velocity *= 1f; } - - if (expertMode) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (Collision.CanHitLine(NPC.Center, 1, 1, player.Center, 1, 1) && NPC.Distance(player.Center) > 160f && burrowTimer % vileSpitFireRate == 0) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.VileSpitEaterOfWorlds, 0, 0f, 69f); - } - } } else if (burrowTimer == -60) { @@ -735,15 +722,6 @@ namespace CalamityMod.NPCs.HiveMind burrowedDust2 = Dust.NewDust(new Vector2(NPC.position.X, NPC.Center.Y), NPC.width, NPC.height / 2, DustID.Demonite, 0f, -3f, 100, default, 2.5f * NPC.scale); Main.dust[burrowedDust2].velocity *= 1f; } - - if (expertMode) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (Collision.CanHitLine(NPC.Center, 1, 1, player.Center, 1, 1) && NPC.Distance(player.Center) > 160f && burrowTimer % vileSpitFireRate == 0) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.VileSpitEaterOfWorlds, 0, 0f, 69f); - } - } } else if (burrowTimer == 0) { @@ -858,16 +836,6 @@ namespace CalamityMod.NPCs.HiveMind return; } - if (expertMode) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.localAI[2] += 1f; - if (Collision.CanHitLine(NPC.Center, 1, 1, player.Center, 1, 1) && NPC.Distance(player.Center) > 160f && NPC.localAI[2] % (vileSpitFireRate * 2) == 0) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.VileSpitEaterOfWorlds, 0, 0f, 69f); - } - } - NPC.velocity = player.Center - NPC.Center; phase2timer--; @@ -985,18 +953,7 @@ namespace CalamityMod.NPCs.HiveMind NPC.ForceNetUpdate(); if (NPC.alpha > 0) { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.Center = player.Center + new Vector2(teleportRadius, 0).RotatedBy(rotation); - - if (death) - { - NPC.localAI[2] += 1f; - if (Collision.CanHitLine(NPC.Center, 1, 1, player.Center, 1, 1) && NPC.Distance(player.Center) > 160f && NPC.localAI[2] % vileSpitFireRate == 0) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.VileSpitEaterOfWorlds, 0, 0f, 70f); - } - } - + NPC.Center = player.Center + new Vector2(teleportRadius, 0).RotatedBy(rotation); rotation += rotationIncrement * rotationDirection; phase2timer = lungesPerformed > 0 ? (lungeDelay / (lungesPerformed + 1)) : lungeDelay; @@ -1024,18 +981,7 @@ namespace CalamityMod.NPCs.HiveMind } else { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.Center = player.Center + new Vector2(teleportRadius, 0).RotatedBy(rotation); - - if (death) - { - NPC.localAI[2] += 1f; - if (Collision.CanHitLine(NPC.Center, 1, 1, player.Center, 1, 1) && NPC.Distance(player.Center) > 160f && NPC.localAI[2] % vileSpitFireRate == 0) - NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.VileSpitEaterOfWorlds, 0, 0f, 70f); - } - } - + NPC.Center = player.Center + new Vector2(teleportRadius, 0).RotatedBy(rotation); rotation += rotationIncrement * rotationDirection * phase2timer / lungeDelay; } } diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs index 4f716d58db..d75e76189f 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/CultistAI.cs @@ -157,13 +157,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses CalamityUtils.CalamityTargeting(npc, options); npc.netUpdate = true; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (!NPC.AnyNPCs(NPCID.AncientCultistSquidhead)) - NPC.NewNPC(npc.GetSource_FromAI(), (int)Main.projectile[(int)npc.ai[2]].Center.X, (int)Main.projectile[(int)npc.ai[2]].Center.Y, NPCID.AncientCultistSquidhead); - } - Main.projectile[(int)npc.ai[2]].ai[1] = -1f; Main.projectile[(int)npc.ai[2]].netUpdate = true; } From 9f4bd8455f1ab2f87ceea80b9cd1453bd385b9be Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Thu, 5 Jun 2025 08:17:06 -0500 Subject: [PATCH 32/72] fixed NPC Cap shader issue --- NPCs/CalamityDrawParameterNPC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/CalamityDrawParameterNPC.cs b/NPCs/CalamityDrawParameterNPC.cs index ca630f4f02..b05b4f6b4a 100644 --- a/NPCs/CalamityDrawParameterNPC.cs +++ b/NPCs/CalamityDrawParameterNPC.cs @@ -45,8 +45,8 @@ namespace CalamityMod.NPCs #region Load / Unload public override void Load() { - DrawingMiracleBlight = new bool[Main.maxNPCs]; - DrawingPolarity = new bool[Main.maxNPCs]; + DrawingMiracleBlight = new bool[Main.maxNPCs + 1]; + DrawingPolarity = new bool[Main.maxNPCs + 1]; } public override void Unload() From ebdc4899874c57d5a638064450c06bed697ce80a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Jun 2025 18:39:14 -0400 Subject: [PATCH 33/72] Removed Meteor Fist ignoring projectile NPCs since it was done purely for Hive Mind vile spit --- Projectiles/Rogue/MeteorFistProj.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Projectiles/Rogue/MeteorFistProj.cs b/Projectiles/Rogue/MeteorFistProj.cs index cc694bad98..13e1a8b6f4 100644 --- a/Projectiles/Rogue/MeteorFistProj.cs +++ b/Projectiles/Rogue/MeteorFistProj.cs @@ -110,9 +110,6 @@ namespace CalamityMod.Projectiles.Rogue return false; } public override bool? CanDamage() => Projectile.numHits == 0 ? null : false; - - // Fuck off stupid Vile Spits - public override bool? CanHitNPC(NPC target) => NPCID.Sets.ProjectileNPC[target.type] ? false : null; public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(BuffID.OnFire, 120); From f5def149772200164b2d71250ffb91b6b29fc430 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Jun 2025 22:13:55 -0400 Subject: [PATCH 34/72] Added Disgusting Meat Unobtainable debug item which can remove permanent boosters, dropping them as items --- Items/DisgustingMeat.cs | 60 ++++++++++++++++++ Items/DisgustingMeat.png | Bin 0 -> 434 bytes .../en-US/Mods.CalamityMod.Items.Misc.hjson | 11 ++++ 3 files changed, 71 insertions(+) create mode 100644 Items/DisgustingMeat.cs create mode 100644 Items/DisgustingMeat.png diff --git a/Items/DisgustingMeat.cs b/Items/DisgustingMeat.cs new file mode 100644 index 0000000000..e383ac2bbe --- /dev/null +++ b/Items/DisgustingMeat.cs @@ -0,0 +1,60 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Items.PermanentBoosters; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items +{ + public class DisgustingMeat : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Misc"; + + public override void SetDefaults() + { + Item.DefaultToFood(32, 30, 0, 0); + Item.value = 0; + Item.UseSound = SoundID.NPCDeath13; + Item.maxStack = 1; + Item.consumable = false; + } + + public override bool AltFunctionUse(Player player) => true; + public override bool? UseItem(Player player) + { + var calPlayer = player.Calamity(); + if (player.altFunctionUse == 2) + { + TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType()); + } + else + { + TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType()); + } + + return null; + } + + private static void TryDropBoosterItem(Player player, ref bool condition, int itemType) + { + if (condition) + { + condition = false; + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, itemType); + Main.item[drop].noGrabDelay = 100; + } + } + } +} diff --git a/Items/DisgustingMeat.png b/Items/DisgustingMeat.png new file mode 100644 index 0000000000000000000000000000000000000000..32e4aad4d2f8cb1940efd06e396ca278c4c7c196 GIT binary patch literal 434 zcmV;j0ZsmiP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0Y^zhK~z{r-IhN} z13?%^Upzn>8%e4(K~RIiMr?vYJb(nj(!we>fi#LJ0kINn1Pc!!XvhI96fDF>6hR0! zc9J?5h=u%Q{Mf`lS=||5m6tnPL&~|#Q!N^&2KNB0GL_G!+;Xu7Lc)MuI;(YcXO4nthSCI$O1B#@#XbB z0P}OxFu+{ will remove health and mana upgrades + will remove rage and adrenaline upgrades, plus other miscellaneous boosters + Removed boosters will be vomited out of you as items + ''' +} + MomentumCapacitor: { DisplayName: Momentum Capacitor GFBName: Burden Breaker From c365144ae9161ffd2d3c28b59d4f3b630e1019b0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 5 Jun 2025 23:25:38 -0400 Subject: [PATCH 35/72] 1 - Removed extra Creeper clones 2 - Actually fixed Skeletron Prime not spinning on the first spin attack 3 - Skeletron Prime no longer spawns Probes --- NPCs/CalamityGlobalNPC.cs | 93 +------------------ .../Bosses/SkeletronPrimeAI.cs | 9 +- 2 files changed, 6 insertions(+), 96 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 545cc5dcef..2a620e8b76 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -8218,7 +8218,6 @@ namespace CalamityMod.NPCs public override void PostDraw(NPC npc, SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) { - bool masterMode = Main.masterMode || BossRushEvent.BossRushActive; bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; bool death = CalamityWorld.death || BossRushEvent.BossRushActive; @@ -8457,10 +8456,10 @@ namespace CalamityMod.NPCs opacity = 1f; opacity = MathHelper.Clamp(opacity, 0f, 1f); - currentColor.R = (byte)((float)(int)currentColor.R * opacity); - currentColor.G = (byte)((float)(int)currentColor.G * opacity); - currentColor.B = (byte)((float)(int)currentColor.B * opacity); - currentColor.A = (byte)((float)(int)currentColor.A * opacity); + currentColor.R = (byte)(currentColor.R * opacity); + currentColor.G = (byte)(currentColor.G * opacity); + currentColor.B = (byte)(currentColor.B * opacity); + currentColor.A = (byte)(currentColor.A * opacity); int totalAfterimages = 4; for (int i = 0; i < totalAfterimages; i++) { @@ -8484,90 +8483,6 @@ namespace CalamityMod.NPCs int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); } - - float secondAfterimageSetHealthValue = (int)(Main.npc[NPC.crimsonBoss].lifeMax * 0.8f); - if (Main.npc[NPC.crimsonBoss].life < secondAfterimageSetHealthValue) - { - currentColor = npc.GetAlpha(drawColor); - float opacityScale = 1f - Main.npc[NPC.crimsonBoss].life / (float)secondAfterimageSetHealthValue; - opacity = Main.getGoodWorld ? 1f : opacityScale; - - opacity = MathHelper.Clamp(opacity, 0f, 1f); - currentColor.R = (byte)((float)(int)currentColor.R * opacity); - currentColor.G = (byte)((float)(int)currentColor.G * opacity); - currentColor.B = (byte)((float)(int)currentColor.B * opacity); - currentColor.A = (byte)((float)(int)currentColor.A * opacity); - totalAfterimages = death ? 12 : 4; - for (int i = 0; i < totalAfterimages; i++) - { - Vector2 position = npc.position; - float distanceFromTargetX = Math.Abs(npc.Center.X - Main.LocalPlayer.Center.X); - float distanceFromTargetY = Math.Abs(npc.Center.Y - Main.LocalPlayer.Center.Y); - if (i > 3) - { - currentColor *= 0.5f; - distanceFromTargetX *= 0.5f; - distanceFromTargetY *= 0.5f; - } - - switch (i) - { - case 0: - case 4: - position.X = Main.LocalPlayer.Center.X - distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y + distanceFromBrain.Y; - break; - - case 1: - case 5: - position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY; - position.X = Main.LocalPlayer.Center.X + distanceFromBrain.X; - break; - - case 2: - case 6: - position.X = Main.LocalPlayer.Center.X + distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y + distanceFromBrain.Y; - break; - - case 3: - case 7: - position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY; - position.X = Main.LocalPlayer.Center.X + distanceFromBrain.X; - break; - - case 8: - position.X = Main.LocalPlayer.Center.X - distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY; - break; - - case 9: - position.X = Main.LocalPlayer.Center.X + distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y - distanceFromTargetY; - break; - - case 10: - position.X = Main.LocalPlayer.Center.X + distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY; - break; - - case 11: - position.X = Main.LocalPlayer.Center.X - distanceFromTargetX; - position.Y = Main.LocalPlayer.Center.Y + distanceFromTargetY; - break; - - default: - break; - } - - position.X -= npc.width / 2; - position.Y -= npc.height / 2; - - int width = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Width(); - int height = TextureAssets.Npc[npc.type] is null ? 0 : TextureAssets.Npc[npc.type].Height(); - spriteBatch.Draw(TextureAssets.Npc[npc.type].Value, new Vector2(position.X - screenPos.X + (float)(npc.width / 2) - (float)width * npc.scale / 2f + halfSize.X * npc.scale, position.Y - screenPos.Y + (float)npc.height - (float)height * npc.scale / (float)Main.npcFrameCount[npc.type] + 4f + halfSize.Y * npc.scale + npc.gfxOffY), npc.frame, currentColor, npc.rotation, halfSize, npc.scale, spriteEffects, 0f); - } - } } float beginTelegraphGateValue = BrainOfCthulhuAI.TimeBeforeCreeperAttack - BrainOfCthulhuAI.CreeperTelegraphTime; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 83d7210b95..5c1d32375d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -37,6 +37,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Spawn arms if (calamityGlobalNPC.newAI[1] == 0f) { + CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults); calamityGlobalNPC.newAI[1] = 1f; if (Main.netMode != NetmodeID.MultiplayerClient) @@ -269,6 +270,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[2] = 0f; npc.ai[1] = shouldSpinAround ? 5f : 1f; + CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults); npc.netUpdate = true; } } @@ -652,13 +654,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses damage = (int)(damage * secondMechMultiplier); } - if (npc.localAI[0] % 3f == 0f) - { - int probeLimit = death ? 3 : 2; - if (NPC.CountNPCS(NPCID.Probe) < probeLimit) - NPC.NewNPC(npc.GetSource_FromAI(), (int)headCenter.X, (int)headCenter.Y + 30, NPCID.Probe); - } - int enragedSkulls = Projectile.NewProjectile(npc.GetSource_FromAI(), headCenter.X, headCenter.Y + 30f, enragedHeadSkullTargetX, enragedHeadSkullTargetY, type, damage, 0f, Main.myPlayer, -3f, 0f); Main.projectile[enragedSkulls].timeLeft = 480; Main.projectile[enragedSkulls].tileCollide = false; From 48e1c167fa566fafdeec8ddccb45e9b4d4ba463a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Jun 2025 13:45:51 -0400 Subject: [PATCH 36/72] Moved several boss AIs from the CalamityAIs folder to their actual files Bosses moved: Astrum Aureus, Brimstone Elemental, Calamitas Clone, Dragonfolly, Old Duke Also internally renamed Dragonfolly and Draconic Swarmers because I'm pretty sure Fabsol was the only person who insisted on keeping it Bumblefuck --- DataStructures/NPCStats.cs | 10 +- Events/BossRushEvent.cs | 2 +- Items/SummonItems/ExoticPheromones.cs | 4 +- Items/TreasureBags/DragonfollyBag.cs | 2 +- .../en-US/Mods.CalamityMod.NPCs.hjson | 4 + ModSupport/WeakReferenceSupport.cs | 2 +- NPCs/AstrumAureus/AstrumAureus.cs | 934 ++++++++- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 708 ++++++- NPCs/Bumblebirb/Bumblefuck.cs | 539 ------ NPCs/Bumblebirb/Bumblefuck2.cs | 153 -- NPCs/Bumblebirb/DraconicSwarmer.cs | 369 ++++ NPCs/Bumblebirb/Dragonfolly.cs | 1356 +++++++++++++ NPCs/CalClone/CalamitasClone.cs | 718 ++++++- NPCs/CalClone/Cataclysm.cs | 335 +++- NPCs/CalClone/Catastrophe.cs | 331 +++- .../CalamityBossAIs/AstrumAureusAI.cs | 969 ---------- .../CalamityBossAIs/BrimstoneElementalAI.cs | 734 ------- .../CalamityBossAIs/BumblebirbAI.cs | 1077 ----------- .../CalamityBossAIs/CalamitasCloneAI.cs | 1406 -------------- NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs | 1702 ----------------- NPCs/CalamityGlobalNPC.cs | 4 +- NPCs/NormalNPCs/WildBumblebirb.cs | 389 ++++ NPCs/NormalNPCs/WildBumblefuck.cs | 173 -- NPCs/OldDuke/OldDuke.cs | 1653 +++++++++++++++- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 4 +- NPCs/Yharon/Yharon.cs | 4 +- Projectiles/Boss/BirbAuraFlare.cs | 2 +- Scenes/MusicScenes/DragonfollyMusicScene.cs | 2 +- Systems/Collections/NPCs/BossHPScalingList.cs | 2 +- Systems/Collections/NPCs/BossTypeDict.cs | 2 +- .../Collections/NPCs/EnemyImmunitiesList.cs | 2 +- Tiles/MonsterBanner.cs | 2 +- UI/SpeedrunTimerUI.cs | 2 +- Utilities/NPCDebuffs.cs | 6 +- 34 files changed, 6807 insertions(+), 6795 deletions(-) delete mode 100644 NPCs/Bumblebirb/Bumblefuck.cs delete mode 100644 NPCs/Bumblebirb/Bumblefuck2.cs create mode 100644 NPCs/Bumblebirb/DraconicSwarmer.cs create mode 100644 NPCs/Bumblebirb/Dragonfolly.cs delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs create mode 100644 NPCs/NormalNPCs/WildBumblebirb.cs delete mode 100644 NPCs/NormalNPCs/WildBumblefuck.cs diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 18cef5a312..c346d23677 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -261,7 +261,7 @@ namespace CalamityMod { ModContent.NPCType(), 0.8 }, - { ModContent.NPCType(), 0.8 }, + { ModContent.NPCType(), 0.8 }, { ModContent.NPCType(), 0.8 }, { ModContent.NPCType(), 0.8 }, @@ -510,8 +510,8 @@ namespace CalamityMod { ModContent.NPCType(), new int[] { 100, 200, 220, 240, 300 } }, { ModContent.NPCType(), new int[] { 100, 200, 220, 232, 300 } }, - { ModContent.NPCType(), new int[] { 170, 256, 288, 320, 504 } }, - { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 435 } }, + { ModContent.NPCType(), new int[] { 170, 256, 288, 320, 504 } }, + { ModContent.NPCType(), new int[] { 145, 220, 242, 264, 435 } }, { ModContent.NPCType(), new int[] { 240, 360, 396, 432, 720 } }, { ModContent.NPCType(), new int[] { 175, 260, 288, 316, 525 } }, @@ -769,8 +769,8 @@ namespace CalamityMod { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 35, 50, 50, 0, 0 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 300, 332, 364, 600 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 140, 220, 244, 268, 420 } }, + { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 200, 300, 332, 364, 600 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 150, 264, 288, 312, 450 } }, // Split holy fire does: 113, 198, 216, 234, 338 { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 120, 192, 220, 248, 360 } }, diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index d3bf603ee5..42f0556052 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -309,7 +309,7 @@ namespace CalamityMod.Events NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, type); }, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), - new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType() }), + new Boss(ModContent.NPCType(), permittedNPCs: new int[] { ModContent.NPCType() }), new Boss(ModContent.NPCType(), TimeChangeContext.Day, type => { diff --git a/Items/SummonItems/ExoticPheromones.cs b/Items/SummonItems/ExoticPheromones.cs index 995118804c..6c6504bc90 100644 --- a/Items/SummonItems/ExoticPheromones.cs +++ b/Items/SummonItems/ExoticPheromones.cs @@ -34,12 +34,12 @@ namespace CalamityMod.Items.SummonItems public override bool CanUseItem(Player player) { - return player.ZoneJungle && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; + return player.ZoneJungle && !NPC.AnyNPCs(ModContent.NPCType()) && !BossRushEvent.BossRushActive; } public override bool? UseItem(Player player) { - CalamityUtils.SpawnBossUsingItem(player, SoundID.Roar); + CalamityUtils.SpawnBossUsingItem(player, SoundID.Roar); return true; } diff --git a/Items/TreasureBags/DragonfollyBag.cs b/Items/TreasureBags/DragonfollyBag.cs index bdbc785757..ac6f05ebad 100644 --- a/Items/TreasureBags/DragonfollyBag.cs +++ b/Items/TreasureBags/DragonfollyBag.cs @@ -57,7 +57,7 @@ namespace CalamityMod.Items.TreasureBags public override void ModifyItemLoot(ItemLoot itemLoot) { // Money - itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType())); + itemLoot.Add(ItemDropRule.CoinsBasedOnNPCValue(ModContent.NPCType())); // Materials itemLoot.Add(ModContent.ItemType(), 1, 30, 35); diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 88ed6fb8e1..125f690431 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -563,3 +563,7 @@ SeaKing: { Princess_LovesNPC: "{NPCName} always smiles when I'm nearby, I like being around him just for that!" } } + +WildBumblebirb.DisplayName: Wild Bumblebirb +DraconicSwarmer.DisplayName: Draconic Swarmer +Dragonfolly.DisplayName: Dragonfolly diff --git a/ModSupport/WeakReferenceSupport.cs b/ModSupport/WeakReferenceSupport.cs index e5aaf5bc23..65c8470dcf 100644 --- a/ModSupport/WeakReferenceSupport.cs +++ b/ModSupport/WeakReferenceSupport.cs @@ -741,7 +741,7 @@ namespace CalamityMod { string entryName = "Dragonfolly"; BossChecklistProgressionValues.TryGetValue(entryName, out float order); - int type = NPCType(); + int type = NPCType(); List collection = new List() { ItemType(), ItemType(), ItemType(), ItemType(), ItemType() }; AddBoss(bossChecklist, calamity, entryName, order, DownedDragonfolly, type, new Dictionary() { diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index ceada7f56a..4e84d6c3b8 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -19,12 +19,13 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; -using CalamityMod.NPCs.TownNPCs; +using CalamityMod.NPCs.VanillaNPCAIOverrides.RegularEnemies; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; +using System; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -153,7 +154,934 @@ namespace CalamityMod.NPCs.AstrumAureus public override void AI() { - AstrumAureusAI.VanillaAstrumAureusAI(NPC, Mod); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + CalamityGlobalNPC.astrumAureus = NPC.whoAmI; + + // Variables + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < (revenge ? 0.85f : expertMode ? 0.8f : 0.75f); + bool phase3 = lifeRatio < (revenge ? 0.7f : expertMode ? 0.6f : 0.5f); + bool phase4 = lifeRatio < (revenge ? 0.5f : 0.4f) && expertMode; + bool phase5 = lifeRatio < 0.3f && revenge; + + // Exhaustion + bool exhausted = NPC.ai[2] >= (phase3 ? 2f : 1f); + calamityGlobalNPC.DR = exhausted ? 0.2f : 0.4f; + NPC.defense = exhausted ? NPC.defDefense / 2 : NPC.defDefense; + + // 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(); + + Player player = Main.player[NPC.target]; + + // Don't fire projectiles and don't increment phase timers for 4 seconds after the teleport phase to avoid cheap bullshit + float noProjectileOrPhaseIncrementTime = 240f; + + bool dontAttack = NPC.localAI[3] > 0f; + if (dontAttack) + { + NPC.localAI[3] -= 1f; + if (NPC.Distance(player.Center) < 240f) + NPC.localAI[3] -= death ? 4f : expertMode ? 2f : 1f; + } + + float enrageScale = bossRush ? 1f : 0f; + if ((Main.IsItDay() && !player.Calamity().ZoneAstral) || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 1f; + } + + float astralFlameBarrageTimerIncrement = 1f; + if (expertMode) + astralFlameBarrageTimerIncrement += death ? (float)Math.Round(3f * (1f - lifeRatio)) : (float)Math.Round(2f * (1f - lifeRatio)); + + float walkingVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 6f : 5f; + walkingVelocity += 3f * enrageScale; + if (phase5) + walkingVelocity += 2f; + if (expertMode) + walkingVelocity += 1.5f * (1f - lifeRatio); + if (revenge) + walkingVelocity += Math.Abs(NPC.Center.X - player.Center.X) * 0.0025f; + if (Main.getGoodWorld) + walkingVelocity *= 1.15f; + + float walkingProjectileVelocity = walkingVelocity * 0.8f; + + // Direction + NPC.spriteDirection = (NPC.direction > 0) ? 1 : -1; + + // Used to reduce Aureus' fall speed + bool reduceFallSpeed = NPC.velocity.Y > 0f && Collision.SolidCollision(NPC.position + Vector2.UnitY * 1.1f * NPC.velocity.Y, NPC.width, NPC.height) && NPC.ai[0] == 4f; + + // Despawn + bool despawnDistance = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; + if (!player.active || player.dead || despawnDistance) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + if (!player.active || player.dead || despawnDistance) + { + NPC.noTileCollide = true; + + if (NPC.velocity.Y < -3f) + NPC.velocity.Y = -3f; + NPC.velocity.Y += 0.1f; + if (NPC.velocity.Y > 12f) + NPC.velocity.Y = 12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + if (NPC.ai[0] != 0f) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.localAI[2] = 0f; + NPC.localAI[3] = 0f; + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[1] = 0f; + NPC.netUpdate = true; + } + return; + } + } + else if (NPC.timeLeft < 1800) + NPC.timeLeft = 1800; + + bool geldonPhase1 = lifeRatio > 0.6f && lifeRatio <= 0.7f; + bool geldonPhase2 = lifeRatio <= 0.1f; + if (Main.zenithWorld && (geldonPhase1 || geldonPhase2)) + { + slimeProjCounter++; + if (slimeProjCounter % 180 == 0) + { + SoundEngine.PlaySound(SoundID.Item33, NPC.Center); // Intentionally keeping the old laser sound in GFB + + if (slimePhase == 1) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6; + float radians = MathHelper.TwoPi / totalProjectiles; + float velocity = 10f; + Vector2 spinningPoint = new Vector2(0f, -velocity); + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 1f); + } + } + slimePhase = 0; + } + else + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float aureusLaserSpeed = 7f; + float aureusLaserTargetX = player.Center.X - NPC.Center.X; + float aureusLaserTargetY = player.Center.Y - NPC.Center.Y; + float aureusLaserTargetDist = (float)Math.Sqrt(aureusLaserTargetX * aureusLaserTargetX + aureusLaserTargetY * aureusLaserTargetY); + aureusLaserTargetDist = aureusLaserSpeed / aureusLaserTargetDist; + aureusLaserTargetX *= aureusLaserTargetDist; + aureusLaserTargetY *= aureusLaserTargetDist; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, aureusLaserTargetX, aureusLaserTargetY, type, damage, 0f, Main.myPlayer); + for (int i = 0; i < 4; i++) + { + Vector2 offset = new Vector2(Main.rand.Next(-6, 7), Main.rand.Next(-6, 7)); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center.X, NPC.Center.Y, aureusLaserTargetX + offset.X, aureusLaserTargetY + offset.Y, type, damage, 0f, Main.myPlayer); + } + } + slimePhase = 1; + } + } + RevengeanceAndDeathAI.BuffedMimicAI(NPC, Mod); + NPC.noGravity = false; + NPC.noTileCollide = false; + return; + } + else + { + NPC.noGravity = true; + } + + // Emit light when not Idle + if (NPC.ai[0] != 1f) + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1.3f, 0.5f, 0f); + + // Fire projectiles while walking, teleporting, or falling + if (NPC.ai[0] == 2f || NPC.ai[0] >= 5f) + { + if (!dontAttack) + NPC.localAI[0] += NPC.ai[0] == 2f ? 1f : astralFlameBarrageTimerIncrement; + + float astralFlameBarrageGateValue = phase4 ? 30f : 60f; + if (NPC.localAI[0] >= astralFlameBarrageGateValue) + { + // Fire astral flames while teleporting + if (NPC.ai[0] >= 5f && NPC.ai[0] != 7) + { + NPC.localAI[0] = 0f; + SoundEngine.PlaySound(FlameCrystalSound, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float velocity = death ? (8f + NPC.localAI[2] * 0.025f) : 7f; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float spreadLimit = (phase4 ? 100f : 50f) + enrageScale * 50f; + float randomSpread = (Main.rand.NextFloat() - 0.5f) * spreadLimit; + Vector2 spawnVector = new Vector2(NPC.Center.X, NPC.Center.Y - 80f * NPC.scale); + Vector2 destination = new Vector2(spawnVector.X + randomSpread, spawnVector.Y - 100f * NPC.scale); + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, Vector2.Normalize(destination - spawnVector) * velocity, type, damage, 0f, Main.myPlayer); + } + } + } + + float laserBarrageGateValue = phase5 ? 160f : phase3 ? 120f : phase2 ? 80f : 60f; + if (NPC.localAI[0] >= laserBarrageGateValue) + { + // Fire astral lasers while walking + if (NPC.ai[0] == 2f) + { + NPC.localAI[0] = 0f; + + SoundEngine.PlaySound(LaserSound, NPC.Center); + + if (calamityGlobalNPC.newAI[2] == 0f) + { + calamityGlobalNPC.newAI[2] = 1f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxProjectiles = !phase2 ? (bossRush ? 5 : 3) : (bossRush ? 7 : 5); + int spread = !phase2 ? (bossRush ? 11 : 8) : (bossRush ? 12 : 10); + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 projectileVelocity = Vector2.Normalize(player.Center - NPC.Center) * walkingProjectileVelocity; + float rotation = MathHelper.ToRadians(spread); + for (int i = 0; i < maxProjectiles; i++) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, walkingProjectileVelocity * 2f); + } + + if (phase3) + { + float flameVelocity = walkingProjectileVelocity; + maxProjectiles = 2; + spread = 45; + + type = ModContent.ProjectileType(); + damage = NPC.GetProjectileDamage(type); + projectileVelocity = Vector2.Normalize(player.Center - NPC.Center) * flameVelocity; + rotation = MathHelper.ToRadians(spread); + for (int i = 0; i < maxProjectiles; i++) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer); + } + } + } + } + else + { + calamityGlobalNPC.newAI[2] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 19 : death ? 17 : 15); + int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20); + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int centralLaser = maxProjectiles / 2; + int[] lasersToNotFire = new int[6] { centralLaser - 3, centralLaser - 2, centralLaser - 1, centralLaser + 1, centralLaser + 2, centralLaser + 3 }; + Vector2 projectileVelocity = Vector2.Normalize(player.Center - NPC.Center) * walkingProjectileVelocity; + float rotation = MathHelper.ToRadians(spread); + for (int i = 0; i < maxProjectiles; i++) + { + if (i != lasersToNotFire[0] && i != lasersToNotFire[1] && i != lasersToNotFire[2] && i != lasersToNotFire[3] && i != lasersToNotFire[4] && i != lasersToNotFire[5]) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, walkingProjectileVelocity * 2f); + } + } + } + } + } + } + } + else + NPC.localAI[0] = 0f; + + // Start up + if (NPC.ai[0] == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.ai[0] = 1f; + NPC.netUpdate = true; + CustomGravity(); + } + + // Idle + else if (NPC.ai[0] == 1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Slow down + NPC.velocity.X *= 0.8f; + + // Stay vulnerable for 3 seconds + NPC.ai[1] += 1f; + if (NPC.Distance(player.Center) < 240f) + NPC.ai[1] += death ? 4f : expertMode ? 2f : 1f; + + if (NPC.ai[1] >= 180f || bossRush) + { + // Set AI to random state and reset other AI arrays + NPC.TargetClosest(); + switch (Main.rand.Next(phase3 ? 3 : 2)) + { + case 0: + NPC.ai[0] = 2f; + break; + + case 1: + NPC.ai[0] = 3f; + break; + + case 2: + NPC.ai[0] = 5f; + break; + + default: + break; + } + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + // Stop colliding with tiles if entering walking phase + NPC.noTileCollide = NPC.ai[0] == 2f; + + NPC.netUpdate = true; + } + else + CustomGravity(); + } + + // Walk + else if (NPC.ai[0] == 2f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Set walking direction + if (Math.Abs(NPC.Center.X - player.Center.X) < 200f * NPC.scale) + { + NPC.velocity.X *= 0.8f; + if (NPC.velocity.X > -0.1 && NPC.velocity.X < 0.1) + NPC.velocity.X = 0f; + } + else + { + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0 ? 1 : -1; + + if (NPC.direction > 0) + NPC.velocity.X = (NPC.velocity.X * 20f + walkingVelocity) / 21f; + if (NPC.direction < 0) + NPC.velocity.X = (NPC.velocity.X * 20f - walkingVelocity) / 21f; + } + + if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.Center, 1, 1) && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height) && player.position.Y <= NPC.position.Y + NPC.height && !NPC.collideX) + { + CustomGravity(); + NPC.noTileCollide = false; + } + else + { + NPC.noTileCollide = true; + + // Walk through tiles if colliding with tiles and player is out of reach + int aureusHitboxWidth = 80; + int aureusHitboxHeight = 20; + Vector2 aureusHitboxTileCollideSize = new Vector2(NPC.Center.X - (aureusHitboxWidth / 2), NPC.position.Y + NPC.height - aureusHitboxHeight); + + bool nearPlayerWalkingThroughTiles = false; + if (NPC.position.X < player.position.X && NPC.position.X + NPC.width > player.position.X + player.width && NPC.position.Y + NPC.height < player.position.Y + player.height - 16f) + nearPlayerWalkingThroughTiles = true; + + if (nearPlayerWalkingThroughTiles) + { + NPC.velocity.Y += 0.5f; + } + else if (Collision.SolidCollision(aureusHitboxTileCollideSize, aureusHitboxWidth, aureusHitboxHeight)) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y = 0f; + + if (NPC.velocity.Y > -0.2) + NPC.velocity.Y -= 0.025f; + else + NPC.velocity.Y -= 0.2f; + + if (NPC.velocity.Y < -4f) + NPC.velocity.Y = -4f; + } + else + { + if (NPC.velocity.Y < 0f) + NPC.velocity.Y = 0f; + + if (NPC.velocity.Y < 0.1) + NPC.velocity.Y += 0.025f; + else + NPC.velocity.Y += 0.5f; + } + } + + // Walk for a maximum of 6 seconds + if (!dontAttack) + { + NPC.ai[1] += 1f; + if (NPC.Distance(player.Center) < 240f) + NPC.ai[1] += death ? 4f : expertMode ? 2f : 1f; + } + + if (NPC.ai[1] >= ((bossRush ? 270f : 360f) - (death ? 90f * (1f - lifeRatio) : 0f))) + { + // Collide with tiles again + NPC.noTileCollide = false; + + // Set AI to next phase (Jump) and reset other AI + NPC.TargetClosest(); + NPC.ai[0] = exhausted ? 1f : 3f; + NPC.ai[1] = 0f; + NPC.ai[2] += 1f; + NPC.netUpdate = true; + } + + // Limit downward velocity + if (NPC.velocity.Y > 10f) + NPC.velocity.Y = 10f; + } + + // Jump + else if (NPC.ai[0] == 3f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.noTileCollide = false; + + if (NPC.velocity.Y == 0f) + { + // Slow down + NPC.velocity.X *= 0.8f; + + // Half second delay before jumping + if (!dontAttack) + NPC.ai[1] += 1f; + + if (NPC.ai[1] >= 30f) + { + NPC.ai[1] = -20f; + } + else if (NPC.ai[1] == -1f) + { + // Set damage + NPC.damage = NPC.defDamage; + + // Set jump velocity, reset and set AI to next phase (Stomp) + float distanceFromPlayerOnXAxis = NPC.Center.X - player.Center.X; + NPC.direction = distanceFromPlayerOnXAxis < 0 ? 1 : -1; + calamityGlobalNPC.newAI[3] = NPC.direction; + + // The limit for how much Aureus can multiply its jump velocity + float speedMultLimit = 1f; + + // Maxes out when the player is a full 2000 pixels away from or above Aureus + float multiplier = 1f / 2000f; + + // Increase Aureus jump velocity X if it's far enough away from the player + float distanceAwayFromTarget = Math.Abs(distanceFromPlayerOnXAxis); + float distanceGateValue = 400f; + bool increaseJumpVelocityX = distanceAwayFromTarget > distanceGateValue && expertMode; + if (increaseJumpVelocityX) + { + calamityGlobalNPC.newAI[0] = (distanceAwayFromTarget - distanceGateValue) * multiplier; + if (calamityGlobalNPC.newAI[0] > speedMultLimit) + calamityGlobalNPC.newAI[0] = speedMultLimit; + } + + // Increase Aureus jump velocity Y if it's far enough above the player + float distanceBelowTarget = NPC.position.Y - (player.position.Y + 80f); + bool increaseJumpVelocityY = distanceBelowTarget > 0f && revenge; + if (increaseJumpVelocityY) + { + calamityGlobalNPC.newAI[1] = distanceBelowTarget * multiplier; + if (calamityGlobalNPC.newAI[1] > speedMultLimit) + calamityGlobalNPC.newAI[1] = speedMultLimit; + } + + float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 27f : 20f; + velocity += 6f * enrageScale; + if (expertMode) + velocity += death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio); + if (Main.getGoodWorld) + velocity *= 1.15f; + + NPC.velocity = (new Vector2(player.Center.X, player.Center.Y - 500f) - NPC.Center).SafeNormalize(Vector2.Zero) * velocity; + NPC.velocity *= new Vector2(calamityGlobalNPC.newAI[0] + 1f, calamityGlobalNPC.newAI[1] + 1f); + + NPC.noTileCollide = true; + + NPC.ai[0] = 4f; + NPC.ai[1] = 0f; + + SoundEngine.PlaySound(JumpSound, NPC.Center); + + NPC.netUpdate = true; + } + } + + // Don't run custom gravity when starting a jump + if (NPC.ai[0] != 4f) + CustomGravity(); + } + + // Stomp + else if (NPC.ai[0] == 4f) + { + if (NPC.velocity.Y == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Play stomp sound. Gotta specify the filepath to avoid confusion between the namespace and NPC + SoundStyle soundToPlay = Main.zenithWorld ? ExoMechs.Ares.AresGaussNuke.NukeExplosionSound : StompSound; + SoundEngine.PlaySound(soundToPlay, NPC.Center); + + if (Main.zenithWorld) + { + float screenShakePower = 16 * Utils.GetLerpValue(1300f, 0f, NPC.Distance(Main.LocalPlayer.Center), true); + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < screenShakePower) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = screenShakePower; + } + + // Stomp and jump again, if stomped twice then reset and set AI to next phase (Teleport or Idle) + NPC.TargetClosest(); + NPC.localAI[1] += 1f; + float maxStompAmt = phase5 ? 5f : phase3 ? 2f : 3f; + if (NPC.localAI[1] >= maxStompAmt) + { + NPC.ai[0] = exhausted ? 1f : (phase3 ? 5f : 2f); + NPC.localAI[1] = 0f; + NPC.ai[2] += 1f; + NPC.ai[3] = 0f; + NPC.noTileCollide = false; + NPC.netUpdate = true; + } + else + { + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0 ? 1 : -1; + NPC.ai[0] = 3f; + NPC.ai[3] = 0f; + NPC.netUpdate = true; + } + + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + + // Spawn dust for visual effect + for (int i = (int)NPC.position.X - 20; i < (int)NPC.position.X + NPC.width + 40; i += 20) + { + for (int j = 0; j < 4; j++) + { + int stompDust = Dust.NewDust(new Vector2(NPC.position.X - 20f, NPC.position.Y + NPC.height), NPC.width + 20, 4, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); + Main.dust[stompDust].velocity *= 0.2f; + } + } + + // Fire lasers or flames on stomp + SoundEngine.PlaySound(LaserSound, NPC.Center); + + if (Main.zenithWorld) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = Main.rand.NextBool() ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6; + float radians = MathHelper.TwoPi / totalProjectiles; + float velocity = 10f; + Vector2 spinningPoint = new Vector2(0f, -velocity); + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 1f); + } + } + } + else if (calamityGlobalNPC.newAI[2] == 0f && phase2) + { + calamityGlobalNPC.newAI[2] = 1f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float flameVelocity = 6f; + int maxProjectiles = bossRush ? 4 : death ? 3 : 2; + int spread = bossRush ? 36 : death ? 28 : 20; + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 spawnVector = new Vector2(NPC.Center.X, NPC.Center.Y - 80f * NPC.scale); + Vector2 destination = new Vector2(spawnVector.X, spawnVector.Y + 100f * NPC.scale); + Vector2 projectileVelocity = Vector2.Normalize(destination - spawnVector) * flameVelocity; + float rotation = MathHelper.ToRadians(spread); + for (int i = 0; i < maxProjectiles; i++) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector + Vector2.Normalize(perturbedSpeed) * 100f, perturbedSpeed, type, damage, 0f, Main.myPlayer); + } + } + } + else + { + calamityGlobalNPC.newAI[2] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float laserVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 7f : death ? 6f : 5f; + int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 17 : death ? 15 : 13); + int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20); + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int[] lasersToNotFire = new int[4] { 1, 3, maxProjectiles - 2, maxProjectiles - 4 }; + Vector2 projectileVelocity = Vector2.Normalize(player.Center - NPC.Center) * laserVelocity; + float rotation = MathHelper.ToRadians(spread); + for (int i = 0; i < maxProjectiles; i++) + { + if (i != lasersToNotFire[0] && i != lasersToNotFire[1] && i != lasersToNotFire[2] && i != lasersToNotFire[3]) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, laserVelocity * 2f); + } + } + } + } + } + else + { + // Set damage + NPC.damage = NPC.defDamage; + + // Set velocities while falling, this happens before the stomp + // Fall through + if (!player.dead) + { + if ((player.position.Y > NPC.Bottom.Y && NPC.velocity.Y > 0f) || (player.position.Y < NPC.Bottom.Y && NPC.velocity.Y < 0f)) + NPC.noTileCollide = true; + else if ((NPC.velocity.Y > 0f && NPC.Bottom.Y > Main.player[NPC.target].Top.Y) || (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].Center, 1, 1) && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height))) + NPC.noTileCollide = false; + } + + if (NPC.position.X < player.position.X && NPC.position.X + NPC.width > player.position.X + player.width) + { + // Make sure Aureus falls quickly when directly on top of or below the player + if (NPC.ai[3] < 30f) + NPC.ai[3] = 30f; + + NPC.velocity.X *= 0.8f; + + if (NPC.Bottom.Y < player.position.Y) + { + // Make sure Aureus falls rather quickly + if (NPC.velocity.Y < -3f) + NPC.velocity.Y = -3f; + + float fallSpeed = 1.2f; + fallSpeed += 0.36f * enrageScale; + if (expertMode) + fallSpeed += death ? 0.36f * (1f - lifeRatio) : 0.24f * (1f - lifeRatio); + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + fallSpeed += 0.5f; + + if (calamityGlobalNPC.newAI[1] > 0f) + fallSpeed *= calamityGlobalNPC.newAI[1] + 1f; + + NPC.velocity.Y += fallSpeed; + } + } + else + { + // Push Aureus towards the player on the X axis if he's not directly on top of or below the player + float velocityXChange = 0.2f + Math.Abs(NPC.Center.X - player.Center.X) * 0.0001f; + velocityXChange += 0.1f * enrageScale; + + if (calamityGlobalNPC.newAI[0] > 0f) + velocityXChange *= calamityGlobalNPC.newAI[0] + 1f; + + if (NPC.direction < 0) + NPC.velocity.X -= velocityXChange; + else if (NPC.direction > 0) + NPC.velocity.X += velocityXChange; + + float velocityXCap = 12f; + velocityXCap += 3.6f * enrageScale; + if (expertMode) + velocityXCap += death ? 3.6f * (1f - lifeRatio) : 2.4f * (1f - lifeRatio); + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + velocityXCap += 5f; + + if (calamityGlobalNPC.newAI[0] > 0f) + velocityXCap *= calamityGlobalNPC.newAI[0] + 1f; + + float playerLocation = NPC.Center.X - player.Center.X; + int directionRelativeToTarget = playerLocation < 0 ? 1 : -1; + bool slowDown = directionRelativeToTarget != calamityGlobalNPC.newAI[3]; + + if (slowDown) + velocityXCap *= 0.333f; + + if (NPC.velocity.X < -velocityXCap) + NPC.velocity.X = -velocityXCap; + if (NPC.velocity.X > velocityXCap) + NPC.velocity.X = velocityXCap; + } + + // Don't start falling quickly until half a second has passed + NPC.ai[3] += 1f; + if (NPC.ai[3] > 30f) + CustomGravity(); + } + } + + // Teleport + else if (NPC.ai[0] == 5f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Slow down + NPC.velocity.X *= 0.8f; + + // Start teleport + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.localAI[1] += 1f; + if (death) + NPC.localAI[2] += 1.25f; + + if (phase4) + { + NPC.localAI[1] += 1f; + if (death) + NPC.localAI[2] += 1.25f; + } + + if (NPC.localAI[1] >= (bossRush ? 60f : death ? 180f : 240f)) + { + // Reset localAI and find a teleport destination + NPC.TargetClosest(); + NPC.localAI[1] = 0f; + + Vector2 vectorAimedAheadOfTarget = Main.player[NPC.target].Center + new Vector2((float)Math.Round(Main.player[NPC.target].velocity.X), 0f).SafeNormalize(Vector2.Zero) * 1000f; + Point point4 = vectorAimedAheadOfTarget.ToTileCoordinates(); + int teleportTries = 0; + while (teleportTries < 100) + { + teleportTries++; + int teleportTileX = Main.rand.Next(point4.X - 5, point4.X + 6); + int teleportTileY = Main.rand.Next(point4.Y - 5, point4.Y); + + if (!Main.tile[teleportTileX, teleportTileY].HasUnactuatedTile) + { + NPC.ai[1] = teleportTileX * 16 + 8; + NPC.ai[3] = teleportTileY * 16 + 16; + break; + } + } + + // Default teleport if the above conditions aren't met in 100 iterations + if (teleportTries >= 100) + { + Vector2 bottom = Main.player[Player.FindClosest(NPC.position, NPC.width, NPC.height)].Bottom; + NPC.ai[1] = bottom.X; + NPC.ai[3] = bottom.Y; + } + + // Set AI to next phase (Mid-teleport) + NPC.ai[0] = 6f; + NPC.netUpdate = true; + } + } + + CustomGravity(); + } + + // Mid-teleport + else if (NPC.ai[0] == 6f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (death) + NPC.localAI[2] += 1.25f; + + if (phase4) + { + if (death) + NPC.localAI[2] += 1.25f; + } + + // Turn invisible + NPC.alpha += 10; + if (NPC.alpha >= 255) + { + // Set position to teleport destination + NPC.Bottom = new Vector2(NPC.ai[1], NPC.ai[3]); + + // Reset alpha and set AI to next phase (End of teleport) + NPC.alpha = 255; + NPC.ai[0] = 7f; + NPC.localAI[2] = 0f; + NPC.netUpdate = true; + } + + // Play sound for cool effect + if (NPC.soundDelay == 0) + { + NPC.soundDelay = 15; + SoundEngine.PlaySound(TeleportSound, NPC.Center); + } + + // Emit dust to make the teleport pretty + for (int i = 0; i < 10; i++) + { + int teleportDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), NPC.velocity.X, NPC.velocity.Y, 255, default, 2f); + Main.dust[teleportDust].noGravity = true; + Main.dust[teleportDust].velocity *= 0.5f; + } + + CustomGravity(); + } + + // End of teleport + else if (NPC.ai[0] == 7f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Turn visible + NPC.alpha -= 10; + if (NPC.alpha <= 0) + { + // Spawn Aureus Spawns + bool spawnFlag = expertMode; + if (NPC.CountNPCS(ModContent.NPCType()) >= 2) + spawnFlag = false; + + if (spawnFlag && Main.netMode != NetmodeID.MultiplayerClient) + { + int aureusSpawn = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y - 25f * NPC.scale), ModContent.NPCType()); + Main.npc[aureusSpawn].velocity.Y = -10f; + Main.npc[aureusSpawn].netUpdate = true; + if (revenge) + { + aureusSpawn = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)(NPC.Center.Y - 25f * NPC.scale), ModContent.NPCType()); + Main.npc[aureusSpawn].velocity.Y = -15f; + Main.npc[aureusSpawn].netUpdate = true; + } + + if (death) + { + int damageAmt = NPC.lifeMax / 50; + NPC.life -= damageAmt; + if (NPC.life < 1) + NPC.life = 1; + + NPC.DamageEffect(damageAmt); + } + } + + // Reset alpha and set AI to next phase (Idle) + NPC.alpha = 0; + NPC.ai[0] = exhausted ? 1f : 2f; + NPC.ai[1] = 0f; + NPC.ai[2] += 1f; + NPC.localAI[3] = noProjectileOrPhaseIncrementTime; + + // Stop colliding with tiles if entering walking phase + NPC.noTileCollide = NPC.ai[0] == 2f; + + NPC.netUpdate = true; + } + + // Play sound at teleport destination for cool effect + if (NPC.soundDelay == 0) + { + NPC.soundDelay = 15; + SoundEngine.PlaySound(SoundID.Item109, NPC.Center); + } + + // Emit dust to make the teleport pretty + for (int i = 0; i < 10; i++) + { + int teleportDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, ModContent.DustType(), NPC.velocity.X, NPC.velocity.Y, 255, default, 2f); + Main.dust[teleportDust].noGravity = true; + Main.dust[teleportDust].velocity *= 0.5f; + } + + CustomGravity(); + } + + void CustomGravity() + { + float gravity = 0.36f + 0.12f * enrageScale; + float maxFallSpeed = reduceFallSpeed ? 12f : 12f + 4f * enrageScale; + + if (calamityGlobalNPC.newAI[1] > 0f && !reduceFallSpeed) + maxFallSpeed *= calamityGlobalNPC.newAI[1] + 1f; + + if (Main.getGoodWorld && !reduceFallSpeed) + { + gravity *= 1.15f; + maxFallSpeed *= 1.15f; + } + + NPC.velocity.Y += gravity; + if (NPC.velocity.Y > maxFallSpeed) + NPC.velocity.Y = maxFallSpeed; + } } public override void FindFrame(int frameHeight) diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 7a5a563e17..7bec19de5f 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -16,9 +16,12 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Projectiles.Enemy; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -123,7 +126,710 @@ namespace CalamityMod.NPCs.BrimstoneElemental public override void AI() { - BrimstoneElementalAI.VanillaBrimstoneElementalAI(NPC, Mod); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + // Used for Brimling AI states + CalamityGlobalNPC.brimstoneElemental = NPC.whoAmI; + + // Emit light + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1.2f, 0f, 0f); + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool despawnDistance = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; + + if (!player.active || player.dead || despawnDistance) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + if (!player.active || player.dead || despawnDistance) + { + NPC.rotation = NPC.velocity.X * 0.04f; + + if (NPC.velocity.Y > 3f) + NPC.velocity.Y = 3f; + NPC.velocity.Y -= 0.1f; + if (NPC.velocity.Y < -12f) + NPC.velocity.Y = -12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + if (NPC.ai[0] != 0f) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.localAI[0] = 0f; + NPC.localAI[1] = 0f; + NPC.netUpdate = true; + } + return; + } + } + else if (NPC.timeLeft < 1800) + NPC.timeLeft = 1800; + + // Reset defense + NPC.defense = NPC.defDefense; + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = NPC.ai[0] == 4f; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Variables for buffing the AI + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + bool phase2 = lifeRatio < 0.5f && revenge; + bool phase3 = lifeRatio < 0.33f; + + // Enrage + if ((!player.ZoneUnderworldHeight || !player.Calamity().ZoneCalamity) && !bossRush) + { + if (calamityGlobalNPC.newAI[3] > 0f) + calamityGlobalNPC.newAI[3] -= 1f; + } + else + calamityGlobalNPC.newAI[3] = CalamityGlobalNPC.biomeEnrageTimerMax; + + bool biomeEnraged = calamityGlobalNPC.newAI[3] <= 0f || bossRush; + + float enrageScale = bossRush ? 0.5f : 0f; + if (biomeEnraged && (!player.ZoneUnderworldHeight || bossRush)) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 0.5f; + } + if (biomeEnraged && (!player.Calamity().ZoneCalamity || bossRush)) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 1f; + } + + NPC.Calamity().DR = NPC.ai[0] == 4f ? 0.6f : 0.2f; + + // Emit dust + int dustAmt = (NPC.ai[0] == 2f) ? 2 : 1; + int size = (NPC.ai[0] == 2f) ? 50 : 35; + if (NPC.ai[0] != 1f) + { + for (int i = 0; i < 2; i++) + { + if (Main.rand.Next(3) < dustAmt) + { + int dust = Dust.NewDust(NPC.Center - new Vector2(size), size * 2, size * 2, DustID.LifeDrain, NPC.velocity.X * 0.5f, NPC.velocity.Y * 0.5f, 90, default, 1.5f); + Main.dust[dust].noGravity = true; + Main.dust[dust].velocity *= 0.2f; + Main.dust[dust].fadeIn = 1f; + } + } + } + + // Distance from destination where Brimmy stops moving + float movementDistanceGateValue = 100f; + + // How fast Brimmy moves to the destination + float baseVelocity = (death ? 6f : revenge ? 5.5f : expertMode ? 5f : 4.5f) * (NPC.ai[0] == 5f ? 0.05f : NPC.ai[0] == 3f ? 1.5f : 1f); + baseVelocity += 3f * enrageScale; + if (expertMode) + baseVelocity += death ? 3f * (1f - lifeRatio) : 2f * (1f - lifeRatio); + + float baseAcceleration = (death ? 0.12f : 0.1f) * (NPC.ai[0] == 5f ? 0.5f : NPC.ai[0] == 3f ? 1.5f : 1f); + baseAcceleration += 0.06f * enrageScale; + if (expertMode) + baseAcceleration += 0.03f * (1f - lifeRatio); + + // This is where Brimmy should be + Vector2 destination = NPC.ai[0] != 3f ? player.Center : new Vector2(player.Center.X, player.Center.Y - 300f); + + // How far Brimmy is from where she's supposed to be + Vector2 distanceFromDestination = destination - NPC.Center; + + // Movement + if (NPC.ai[0] != 4f) + CalamityUtils.SmoothMovement(NPC, movementDistanceGateValue, distanceFromDestination, baseVelocity, baseAcceleration, true); + + // Rotation and direction + if (NPC.ai[0] <= 2f || NPC.ai[0] == 5f) + { + NPC.rotation = NPC.velocity.X * 0.04f; + if (NPC.ai[0] != 5 || (NPC.ai[1] < 180f && NPC.ai[0] == 5f)) + { + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0f ? 1 : -1; + NPC.spriteDirection = NPC.direction; + } + } + + if (Main.zenithWorld) // in gfb, Brimmy channels the power of the other elementals. + { + int newMode; + if (lifeRatio <= 0.8f && lifeRatio > 0.6f) + { + newMode = 1; // Sand + } + else if (lifeRatio <= 0.6f && lifeRatio > 0.4f) + { + newMode = 2; // Rare Sand + } + else if (lifeRatio <= 0.4f && lifeRatio > 0.2f) + { + newMode = 3; // Cloud + } + else if (lifeRatio <= 0.2f) + { + newMode = 4; // Water + } + else + { + newMode = 0; // Brimstone, default + } + if (newMode != currentMode) + { + SoundEngine.PlaySound(SoundID.Item29, NPC.Center); + } + currentMode = newMode; + } + + if (NPC.ai[0] == -1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int phase; + int random = phase2 ? 6 : 5; + do phase = Main.rand.Next(random); + while (phase == NPC.ai[1] || (phase == 0 && phase3 && revenge) || phase == 1 || phase == 2 || (phase == 4 && NPC.localAI[3] != 0f)); + + NPC.ai[0] = phase; + NPC.ai[1] = 0f; + + // Cocoon phase cooldown + if (NPC.localAI[3] > 0f) + NPC.localAI[3] -= 1f; + else if (phase == 4) + { + NPC.localAI[3] = 3f; + SoundEngine.PlaySound(HideInShellSound, player.Center); + } + + // Prevent netUpdate from being blocked by the spam counter. + // A phase switch sync is a critical operation that must be synced. + NPC.ForceNetUpdate(false); + } + } + + // Pick a location to teleport to + else if (NPC.ai[0] == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.chaseable = true; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.localAI[1] += 1f; + if (NPC.Distance(player.Center) < 160f) + NPC.localAI[1] += death ? 4f : expertMode ? 2f : 1f; + + if (NPC.localAI[1] >= (bossRush ? 90f : death ? 120f : 180f)) + { + NPC.TargetClosest(); + NPC.localAI[1] = 0f; + int timer = 0; + int playerPosX; + int playerPosY; + while (true) + { + timer++; + playerPosX = (int)player.Center.X / 16; + playerPosY = (int)player.Center.Y / 16; + + int min = 12; + int max = 16; + + if (Main.rand.NextBool()) + playerPosX += Main.rand.Next(min, max); + else + playerPosX -= Main.rand.Next(min, max); + + if (Main.rand.NextBool()) + playerPosY += Main.rand.Next(min, max); + else + playerPosY -= Main.rand.Next(min, max); + + if (!WorldGen.SolidTile(playerPosX, playerPosY)) + break; + + if (timer > 100) + return; + } + NPC.ai[0] = 1f; + NPC.ai[1] = playerPosX; + NPC.ai[2] = playerPosY; + NPC.netUpdate = true; + } + } + } + + // Teleport to location + else if (NPC.ai[0] == 1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.chaseable = true; + Vector2 position = new Vector2(NPC.ai[1] * 16f - (NPC.width / 2), NPC.ai[2] * 16f - (NPC.height / 2)); + for (int m = 0; m < 5; m++) + { + int dust = Dust.NewDust(position, NPC.width, NPC.height, DustID.LifeDrain, 0f, -1f, 90, default, 2f); + Main.dust[dust].noGravity = true; + Main.dust[dust].fadeIn = 1f; + } + NPC.alpha += bossRush ? 8 : death ? 5 : revenge ? 4 : expertMode ? 3 : 2; + if (NPC.alpha >= 255) + { + int spawnType = currentMode == 3 ? NPCID.AngryNimbus : ModContent.NPCType(); + int enemyCount = currentMode == 3 ? 3 : 1; // 3 angry nimbi if cloud, otherwise 1 brimling + if (Main.netMode != NetmodeID.MultiplayerClient && NPC.CountNPCS(spawnType) < (death ? 1 : 2) && revenge && currentMode != 2) // dont spawn anything if gfb rare sand + { + for (int i = 0; i < enemyCount; i++) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, spawnType); + } + SoundEngine.PlaySound(TeleportSound, NPC.Center); + NPC.alpha = 255; + NPC.position = position; + for (int n = 0; n < 15; n++) + { + int warpDust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.LifeDrain, 0f, -1f, 90, default, 3f); + Main.dust[warpDust].noGravity = true; + } + NPC.ai[0] = 2f; + NPC.netUpdate = true; + } + } + + // Either teleport again or go to next AI state + else if (NPC.ai[0] == 2f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.alpha >= 255) + { + if (Main.zenithWorld) + { + SoundEngine.PlaySound(SoundID.Item68, NPC.Center); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 pos = NPC.Center; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), pos, new Vector2(0, 1), type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), pos, new Vector2(0, -1), type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), pos, new Vector2(1, 0), type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), pos, new Vector2(-1, 0), type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + } + if (currentMode >= 1 && currentMode <= 3) + { + int tornadoType = currentMode == 3 ? ModContent.ProjectileType() : ProjectileID.SandnadoHostileMark; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), pos, Vector2.Zero, tornadoType, damage, 0f, Main.myPlayer, 0f, 0f); + } + } + if (currentMode == 2) + { + int healAmt = NPC.lifeMax / 25; + if (healAmt > 0) + { + NPC.life += healAmt; + NPC.HealEffect(healAmt, true); + NPC.netUpdate = true; + } + } + } + } + + NPC.alpha -= 50; + if (NPC.alpha <= 0) + { + NPC.chaseable = true; + NPC.ai[3] += 1f; + NPC.alpha = 0; + if (NPC.ai[3] >= 2f || phase2 || Main.getGoodWorld) + { + NPC.ai[0] = -1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + } + else + { + NPC.ai[0] = 0f; + } + NPC.netUpdate = true; + } + } + + // Float above target and fire projectiles + else if (NPC.ai[0] == 3f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.chaseable = true; + NPC.rotation = NPC.velocity.X * 0.04f; + + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0f ? 1 : -1; + NPC.spriteDirection = NPC.direction; + + NPC.ai[1] += 1f; + float divisor = expertMode ? (death ? 80f : revenge ? 45f : 50f) - (float)Math.Ceiling(10f * (1f - lifeRatio)) : 50f; + divisor -= 3f * enrageScale; + float divisor2 = divisor * 2f; + + if (NPC.ai[1] % divisor == divisor - 1f) + { + float velocity = (death ? 7f : revenge ? 6f : 5f) + (2f * enrageScale) + (expertMode ? 3f * (1f - lifeRatio) : 0f); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + if (currentMode == 4) + { + type = ModContent.ProjectileType(); + SoundEngine.PlaySound(SoundID.Item30, player.Center); + } + else + { + SoundEngine.PlaySound(HellfireballSound, player.Center); + } + Vector2 projectileVelocity = (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 5f, projectileVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); + Main.projectile[proj].timeLeft = 240; + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + Main.projectile[proj].extraUpdates += 1; + } + + if (NPC.ai[1] % divisor2 == divisor2 - 1f) + { + velocity = (death ? 5f : 4f) + 2f * enrageScale; + type = ModContent.ProjectileType(); + damage = NPC.GetProjectileDamage(type); + if (currentMode == 4) + { + type = ModContent.ProjectileType(); + SoundEngine.PlaySound(SoundID.Item21, player.Center); + } + else + { + SoundEngine.PlaySound(DartSound, player.Center); + } + projectileVelocity = (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity; + int numProj = death ? 8 : 4; + int spread = death ? 90 : 45; + if (Main.getGoodWorld) + { + numProj *= 3; + spread *= 2; + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float rotation = MathHelper.ToRadians(spread); + float projectileVelocityToPass = velocity * 3f; + for (int i = 0; i < numProj; i++) + { + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); + int proj2 = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + Main.projectile[proj2].extraUpdates += 1; + } + } + } + } + + if (NPC.ai[1] >= divisor * (death ? 5f : 10f)) + { + NPC.TargetClosest(); + NPC.ai[0] = -1f; + NPC.ai[1] = 3f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.netUpdate = true; + } + } + + // Cocoon bullet hell + else if (NPC.ai[0] == 4f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.defense = NPC.defDefense * 4; + + NPC.chaseable = false; + NPC.localAI[0] += 1f; + if (Main.getGoodWorld) + NPC.localAI[0] += 2f; + if (expertMode) + NPC.localAI[0] += 1f - lifeRatio; + NPC.localAI[0] += enrageScale; + + if (NPC.localAI[0] >= 120f) + { + NPC.localAI[0] = 0f; + + float projectileSpeed = death ? 9f : revenge ? 8f : 6f; + projectileSpeed += 2f * enrageScale; + + Vector2 projectileVelocity = player.Center - NPC.Center; + + float radialOffset = 0.2f; + float diameter = 80f; + + projectileVelocity = projectileVelocity.SafeNormalize(Vector2.UnitY) * projectileSpeed; + + Vector2 velocity = projectileVelocity; + velocity = velocity.SafeNormalize(Vector2.UnitY); + velocity *= diameter; + + int totalProjectiles = 6; + float offsetAngle = MathHelper.Pi * radialOffset; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int j = 0; j < totalProjectiles; j++) + { + float radians = j - (totalProjectiles - 1f) / 2f; + Vector2 offset = velocity.RotatedBy(offsetAngle * radians); + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); + Main.projectile[proj].timeLeft = 300; + Main.projectile[proj].tileCollide = false; + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + Main.projectile[proj].extraUpdates += 1; + } + } + + totalProjectiles = 12; + float radians2 = MathHelper.TwoPi / totalProjectiles; + type = ModContent.ProjectileType(); + damage = NPC.GetProjectileDamage(type); + if (currentMode == 4) + { + type = ModContent.ProjectileType(); + SoundEngine.PlaySound(SoundID.Item26, player.Center); + } + else + { + SoundEngine.PlaySound(ShellFireSound, player.Center); + } + double angleA = radians2 * 0.5; + double angleB = MathHelper.ToRadians(90f) - angleA; + float velocityX = (float)(projectileSpeed * Math.Sin(angleA) / Math.Sin(angleB)); + Vector2 spinningPoint = NPC.localAI[2] % 2f == 0f ? new Vector2(0f, -projectileSpeed) : new Vector2(-velocityX, -projectileSpeed); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float projectileVelocityToPass = projectileSpeed * 3f; + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k); + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + Main.projectile[proj].extraUpdates += 1; + } + + if (death) + { + spinningPoint = NPC.localAI[2] % 2f == 0f ? new Vector2(-velocityX, -projectileSpeed) : new Vector2(0f, -projectileSpeed); + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k); + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255 * 0.75f, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + Main.projectile[proj].extraUpdates += 1; + } + } + } + + NPC.localAI[2] += 1f; + } + + NPC.velocity *= 0.95f; + NPC.rotation = NPC.velocity.X * 0.04f; + float playerLocation = NPC.Center.X - player.Center.X; + NPC.direction = playerLocation < 0f ? 1 : -1; + NPC.spriteDirection = NPC.direction; + + NPC.ai[1] += 1f; + if (NPC.ai[1] >= (death ? 240f : 300f)) + { + NPC.TargetClosest(); + NPC.ai[0] = -1f; + NPC.ai[1] = 4f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.localAI[0] = 0f; + NPC.netUpdate = true; + } + } + + // Laser beam attack + else if (NPC.ai[0] == 5f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.chaseable = true; + + NPC.defense = NPC.defDefense * 2; + + Vector2 source = new Vector2(NPC.Center.X + (NPC.spriteDirection > 0 ? 34f : -34f), NPC.Center.Y - 74f); + Vector2 aimAt = player.Center + player.velocity * 20f; + float aimResponsiveness = bossRush ? 0.05f : (NPC.ai[2] == 1f || death) ? 0.1f : 0.25f; + + Vector2 aimVector = (aimAt - source).SafeNormalize(Vector2.UnitY); + if (aimVector.HasNaNs()) + aimVector = -Vector2.UnitY; + aimVector = Vector2.Lerp(aimVector, NPC.velocity.SafeNormalize(Vector2.UnitY), aimResponsiveness).SafeNormalize(Vector2.UnitY); + aimVector *= 6f; + + Vector2 laserVelocity = aimVector.SafeNormalize(Vector2.UnitY); + if (laserVelocity.HasNaNs()) + laserVelocity = -Vector2.UnitY; + + calamityGlobalNPC.newAI[1] = laserVelocity.X; + calamityGlobalNPC.newAI[2] = laserVelocity.Y; + + // Rev = 190 + 165 = 355 + // Death = 165 + + NPC.ai[1] += 1f; + if (NPC.ai[1] >= 240f) + { + NPC.TargetClosest(); + NPC.ai[2] += 1f; + NPC.localAI[0] = 0f; + NPC.localAI[1] = 0f; + if (NPC.ai[2] >= (death ? 1f : 2f)) + { + NPC.ai[0] = -1f; + NPC.ai[1] = 5f; + NPC.ai[2] = 0f; + calamityGlobalNPC.newAI[0] = 0f; + } + else + { + NPC.ai[1] = 0f; + calamityGlobalNPC.newAI[0] = 0f; + } + } + else if (NPC.ai[1] >= 180f) + { + NPC.velocity *= 0.95f; + if (NPC.ai[1] == 180f) + { + SoundEngine.PlaySound(SoundID.Item68, source); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 laserVelocity2 = new Vector2(NPC.localAI[0], NPC.localAI[1]); + laserVelocity2 = laserVelocity2.SafeNormalize(Vector2.UnitY); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + if (Main.getGoodWorld) + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + + if (Main.zenithWorld) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, new Vector2(-laserVelocity2.X, laserVelocity2.Y), type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, new Vector2(laserVelocity2.X, -laserVelocity2.Y), type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); + } + } + } + } + else + { + float playSoundTimer = 30f; + if (NPC.ai[1] < 150f) + { + switch ((int)NPC.ai[2]) + { + case 0: + NPC.ai[1] += 0.5f; + break; + case 1: + NPC.ai[1] += 1f; + playSoundTimer = 40f; + break; + } + if (death) + { + NPC.ai[1] += 0.5f; + playSoundTimer += 10f; + } + } + + if (NPC.ai[1] % playSoundTimer == 0f) + SoundEngine.PlaySound(SoundID.Item20, NPC.Center); + + if (NPC.ai[1] < 150f && calamityGlobalNPC.newAI[0] == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); + if (Main.getGoodWorld) + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); + + if (Main.zenithWorld) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, new Vector2(-laserVelocity.X, laserVelocity.Y), ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), source, new Vector2(laserVelocity.X, -laserVelocity.Y), ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); + } + } + + calamityGlobalNPC.newAI[0] = 1f; + } + else + { + if (NPC.ai[1] == 150f) + { + NPC.localAI[0] = laserVelocity.X; + NPC.localAI[1] = laserVelocity.Y; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, NPC.localAI[0], NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); + if (Main.getGoodWorld) + Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, -NPC.localAI[0], -NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); + + if (Main.zenithWorld) + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, -NPC.localAI[0], NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); + Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, NPC.localAI[0], -NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); + } + } + } + } + } + } } public override bool CanHitPlayer(Player target, ref int cooldownSlot) diff --git a/NPCs/Bumblebirb/Bumblefuck.cs b/NPCs/Bumblebirb/Bumblefuck.cs deleted file mode 100644 index a5b097b190..0000000000 --- a/NPCs/Bumblebirb/Bumblefuck.cs +++ /dev/null @@ -1,539 +0,0 @@ -using System; -using System.IO; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Events; -using CalamityMod.Items.Accessories; -using CalamityMod.Items.Armor.Vanity; -using CalamityMod.Items.LoreItems; -using CalamityMod.Items.Materials; -using CalamityMod.Items.Mounts; -using CalamityMod.Items.Placeables.Furniture.BossRelics; -using CalamityMod.Items.Placeables.Furniture.DevPaintings; -using CalamityMod.Items.Placeables.Furniture.Trophies; -using CalamityMod.Items.Potions; -using CalamityMod.Items.TreasureBags; -using CalamityMod.Items.Weapons.Magic; -using CalamityMod.Items.Weapons.Melee; -using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.GameContent.Bestiary; -using Terraria.GameContent.ItemDropRules; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.Bumblebirb -{ - [AutoloadBossHead] - public class Bumblefuck : ModNPC - { - public static Asset GlowTexture; - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; - NPCID.Sets.TrailingMode[Type] = 1; - NPCID.Sets.BossBestiaryPriority.Add(Type); - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() - { - Scale = 0.5f, - PortraitScale = 0.85f, - PortraitPositionYOverride = 14f - }; - value.Position.X += 20f; - value.Position.Y += 8f; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - NPCID.Sets.MPAllowedEnemies[Type] = true; - if (!Main.dedServ) - { - GlowTexture = ModContent.Request("CalamityMod/NPCs/Bumblebirb/BirbGlow", AssetRequestMode.AsyncLoad); - } - } - - public override string Texture => "CalamityMod/NPCs/Bumblebirb/Birb"; - public override string BossHeadTexture => "CalamityMod/NPCs/Bumblebirb/Birb_Head_Boss"; - - public override void SetDefaults() - { - NPC.Calamity().canBreakPlayerDefense = true; - NPC.npcSlots = 32f; - NPC.aiStyle = -1; - AIType = -1; - NPC.GetNPCDamage(); - NPC.width = 130; - NPC.height = 100; - NPC.defense = 40; - NPC.DR_NERD(0.1f); - NPC.LifeMaxNERB(187500, 225000, 300000); // Old HP - 227500, 252500 - NPC.knockBackResist = 0f; - NPC.boss = true; - NPC.noTileCollide = true; - NPC.lavaImmune = true; - NPC.noGravity = true; - NPC.value = Item.buyPrice(1, 0, 0, 0); - NPC.HitSound = SoundID.NPCHit51; - NPC.DeathSound = SoundID.NPCDeath46; - NPC.Calamity().VulnerableToHeat = true; - NPC.Calamity().VulnerableToCold = true; - NPC.Calamity().VulnerableToSickness = true; - NPC.Calamity().VulnerableToElectricity = false; - - // Scale HP in Master - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC, true); - } - - public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) - { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] - { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, - new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Bumblefuck") - }); - } - - public override void SendExtraAI(BinaryWriter writer) - { - 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.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() - { - BumblebirbAI.VanillaBumblebirbAI(NPC, Mod); - } - - public override void FindFrame(int frameHeight) - { - CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); - - bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - - // Percent life remaining - float lifeRatio = NPC.life / (float)NPC.lifeMax; - - // Phases - bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death; - bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f); - bool birbSpawn = NPC.ai[0] == 4f && NPC.ai[1] > 0f; - - // Animation goes nyoom - if (Main.zenithWorld) - { - NPC.frameCounter += 4; - } - - float newPhaseTimer = 180f; - bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || - (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); - - if (phaseSwitchPhase || birbSpawn) - { - float frameGateValue = birbSpawn ? NPC.ai[1] : phase3 ? calamityGlobalNPC.newAI[1] : calamityGlobalNPC.newAI[0]; - int frameTimer = 180; - if (frameGateValue < (frameTimer - 60) || frameGateValue > (frameTimer - 20)) - { - NPC.frameCounter += 1D; - if (NPC.frameCounter > 5D) - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - } - if (NPC.frame.Y >= frameHeight * 5) - { - NPC.frame.Y = 0; - } - } - else - { - NPC.frame.Y = frameHeight * 4; - if (frameGateValue > (frameTimer - 50) && frameGateValue < (frameTimer - 25)) - { - NPC.frame.Y = frameHeight * 5; - } - } - } - else if (NPC.ai[0] == 5f) - { - int otherFrameTimer = 120; - if (NPC.ai[1] < (otherFrameTimer - 50) || NPC.ai[1] > (otherFrameTimer - 10)) - { - NPC.frameCounter += 1D; - if (NPC.frameCounter > 5D) - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - } - if (NPC.frame.Y >= frameHeight * 5) - { - NPC.frame.Y = 0; - } - } - else - { - NPC.frame.Y = frameHeight * 4; - if (NPC.ai[1] > (otherFrameTimer - 40) && NPC.ai[1] < (otherFrameTimer - 15)) - { - NPC.frame.Y = frameHeight * 5; - } - } - } - else - { - NPC.frameCounter += (NPC.ai[0] == 3.2f ? 1.5 : 1D); - if (NPC.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - } - if (NPC.frame.Y >= frameHeight * 5) - { - NPC.frame.Y = 0; - } - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); - - bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || BossRushEvent.BossRushActive; - - // Percent life remaining - float lifeRatio = NPC.life / (float)NPC.lifeMax; - - // Phases - bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death; - bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f); - - float newPhaseTimer = 180f; - bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || - (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); - - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); - Color color = drawColor; - Color altColor = Color.White; - - float lerpDrawTransition = 0f; - int newAITracker = 120; - int buffColorDampener = 60; - - if (phase3 && calamityGlobalNPC.newAI[3] == 1f) - { - color = CalamityGlobalNPC.buffColor(color, 0.9f, 0.6f, 0.2f, 1f); - } - else if (phase2 && calamityGlobalNPC.newAI[2] == 1f) - { - color = CalamityGlobalNPC.buffColor(color, 0.7f, 0.7f, 0.3f, 1f); - } - else if (phase2 && calamityGlobalNPC.newAI[0] > (float)newAITracker) - { - float phase2TranBuff = calamityGlobalNPC.newAI[0] - (float)newAITracker; - phase2TranBuff /= (float)buffColorDampener; - color = CalamityGlobalNPC.buffColor(color, 1f - 0.3f * phase2TranBuff, 1f - 0.3f * phase2TranBuff, 1f - 0.7f * phase2TranBuff, 1f); - } - - int afterimageAmt = 10; - int afterimageIncrement = 2; - if (NPC.ai[0] == 0f || NPC.ai[0] == 3.1f || NPC.ai[0] == 4f || NPC.ai[0] == 4.2f) - { - afterimageAmt = 4; - } - if (NPC.ai[0] == 1f || NPC.ai[0] == 3f || NPC.ai[0] == 4.1f) - { - afterimageAmt = 7; - } - if (NPC.ai[0] == 2f || NPC.ai[0] == 3.2f || (phase2 && calamityGlobalNPC.newAI[2] == 1f)) - { - altColor = Color.Yellow; - lerpDrawTransition = 0.5f; - } - else - { - color = altColor; - } - - if (CalamityClientConfig.Instance.Afterimages) - { - for (int i = 1; i < afterimageAmt; i += afterimageIncrement) - { - Color afterimageColor = color; - afterimageColor = Color.Lerp(afterimageColor, altColor, lerpDrawTransition); - afterimageColor = NPC.GetAlpha(afterimageColor); - afterimageColor *= (float)(afterimageAmt - i) / 15f; - Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; - afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - } - - int extraAfterimageAmt = 0; - float extraAfterimageDampener = 0f; - float afterimageScaler = 0f; - - if (NPC.ai[0] == 0f || NPC.ai[0] == 3.1f || NPC.ai[0] == 4f || NPC.ai[0] == 4.2f) - { - extraAfterimageAmt = 4; - } - - if (NPC.ai[0] == 5f) - { - if (NPC.ai[1] > 60f) - { - extraAfterimageAmt = 6; - extraAfterimageDampener = 1f - (float)Math.Cos((double)((NPC.ai[1] - 60f) / 30f * MathHelper.TwoPi)); - extraAfterimageDampener /= 3f; - afterimageScaler = 40f; - } - } - - if (phaseSwitchPhase) - { - if (phase3 && calamityGlobalNPC.newAI[1] > (float)newAITracker) - { - extraAfterimageAmt = 6; - extraAfterimageDampener = 1f - (float)Math.Cos((double)((calamityGlobalNPC.newAI[1] - (float)newAITracker) / (float)buffColorDampener * MathHelper.TwoPi)); - extraAfterimageDampener /= 3f; - afterimageScaler = 60f; - } - else if (phase2 && calamityGlobalNPC.newAI[0] > (float)newAITracker) - { - extraAfterimageAmt = 6; - extraAfterimageDampener = 1f - (float)Math.Cos((double)((calamityGlobalNPC.newAI[0] - (float)newAITracker) / (float)buffColorDampener * MathHelper.TwoPi)); - extraAfterimageDampener /= 3f; - afterimageScaler = 60f; - } - } - - if (CalamityClientConfig.Instance.Afterimages) - { - for (int j = 0; j < extraAfterimageAmt; j++) - { - Color extraAfterimageColor = altColor; - extraAfterimageColor = Color.Lerp(extraAfterimageColor, altColor, lerpDrawTransition); - extraAfterimageColor = NPC.GetAlpha(extraAfterimageColor); - extraAfterimageColor *= 1f - extraAfterimageDampener; - Vector2 extraAfterimageDrawPos = NPC.Center + ((float)j / (float)extraAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScaler * extraAfterimageDampener - screenPos; - extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; - extraAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, extraAfterimageDrawPos, NPC.frame, extraAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - } - - Color mainDrawingColor = altColor; - mainDrawingColor = Color.Lerp(mainDrawingColor, altColor, lerpDrawTransition); - mainDrawingColor = NPC.GetAlpha(mainDrawingColor); - Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; - drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, (phase3 && calamityGlobalNPC.newAI[3] == 1f ? mainDrawingColor : NPC.GetAlpha(altColor)), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - if (phase2) - { - texture2D15 = GlowTexture.Value; - Color glowmaskColor = Color.Lerp(Color.White, Color.Red, 0.5f); - altColor = Color.Red; - - lerpDrawTransition = 1f; - extraAfterimageDampener = 0.5f; - afterimageScaler = 10f; - afterimageIncrement = 1; - - if (phaseSwitchPhase) - { - float glowmaskDampener = (phase3 ? calamityGlobalNPC.newAI[1] : calamityGlobalNPC.newAI[0]) - (float)newAITracker; - glowmaskDampener /= (float)buffColorDampener; - altColor *= glowmaskDampener; - glowmaskColor *= glowmaskDampener; - } - - if (CalamityClientConfig.Instance.Afterimages) - { - for (int k = 1; k < afterimageAmt; k += afterimageIncrement) - { - Color glowmaskAfterimageColor = glowmaskColor; - glowmaskAfterimageColor = Color.Lerp(glowmaskAfterimageColor, altColor, lerpDrawTransition); - glowmaskAfterimageColor *= (float)(afterimageAmt - k) / 15f; - Vector2 glowmaskAfterimageDrawPos = NPC.oldPos[k] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; - glowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; - glowmaskAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, glowmaskAfterimageDrawPos, NPC.frame, glowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - - for (int l = 1; l < extraAfterimageAmt; l++) - { - Color extraGlowmaskAfterimageColor = glowmaskColor; - extraGlowmaskAfterimageColor = Color.Lerp(extraGlowmaskAfterimageColor, altColor, lerpDrawTransition); - extraGlowmaskAfterimageColor = NPC.GetAlpha(extraGlowmaskAfterimageColor); - extraGlowmaskAfterimageColor *= 1f - extraAfterimageDampener; - Vector2 extraGlowmaskAfterimageDrawPos = NPC.Center + ((float)l / (float)extraAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScaler * extraAfterimageDampener - screenPos; - extraGlowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; - extraGlowmaskAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, extraGlowmaskAfterimageDrawPos, NPC.frame, extraGlowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - } - - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - - return false; - } - - private static Color buffColor(Color newColor, float R, float G, float B, float A) - { - newColor.R = (byte)((float)newColor.R * R); - newColor.G = (byte)((float)newColor.G * G); - newColor.B = (byte)((float)newColor.B * B); - newColor.A = (byte)((float)newColor.A * A); - return newColor; - } - - public override void BossLoot(ref string name, ref int potionType) => potionType = ItemID.SuperHealingPotion; - - public override void ModifyNPCLoot(NPCLoot npcLoot) - { - npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); - - // Normal drops: Everything that would otherwise be in the bag - var normalOnly = npcLoot.DefineNormalOnlyDropSet(); - { - // Weapons - int[] items = new int[] - { - ModContent.ItemType(), - ModContent.ItemType(), - ModContent.ItemType() - }; - normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, items)); - normalOnly.Add(ModContent.ItemType(), 10); - - // Materials - normalOnly.Add(ModContent.ItemType(), 1, 25, 30); - - // Equipment - normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); - normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); - - // Vanity - normalOnly.Add(ModContent.ItemType(), 7); - normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt); - } - - npcLoot.Add(ModContent.ItemType(), 10); - - // Relic - npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); - - // GFB Omega Healing Potion drop - npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 50, 100), true); - - // Lore - npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType(), desc: DropHelper.FirstKillText); - } - - public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) - { - if (hurtInfo.Damage > 0) - target.AddBuff(ModContent.BuffType(), Main.zenithWorld ? 360 : 180); - } - - public override void OnKill() - { - // Don't bother running any of this in Boss Rush. - if (BossRushEvent.BossRushActive) - return; - - CalamityGlobalNPC.SetNewBossJustDowned(NPC); - - // Mark The Dragonfolly as dead - DownedBossSystem.downedDragonfolly = true; - CalamityNetcode.SyncWorld(); - - if (Main.zenithWorld) - { - int spacing = 40; - int amt = 7; - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < amt; i++) - { - Vector2 fireFrom = new Vector2(NPC.Center.X + (spacing * i) - (spacing * amt / 2), NPC.Center.Y - 900f); - Vector2 ai0 = NPC.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - - } - - public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) - { - NPC.lifeMax = (int)(NPC.lifeMax * 0.8f * balance * bossAdjustment); - NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier()); - } - - public override void ModifyTypeName(ref string typeName) - { - if (Main.zenithWorld) - { - typeName = CalamityUtils.GetTextValue("NPCs.Bumblebirb"); - } - } - - public override void HitEffect(NPC.HitInfo hit) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); - } - if (NPC.life <= 0) - { - for (int k = 0; k < 50; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); - } - if (!Main.dedServ) - { - for (int i = 0; i < 6; i++) // 1 head, 1 wing, 4 legs = 6. one wing due to them being chonky boyes now - { - string gore = "Bumble"; - float randomSpread = Main.rand.Next(-200, 201) / 100f; - gore += i == 0 ? "Head" : i > 1 ? "Leg" : "Wing"; - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find(gore).Type, 1f); - } - } - } - } - } -} diff --git a/NPCs/Bumblebirb/Bumblefuck2.cs b/NPCs/Bumblebirb/Bumblefuck2.cs deleted file mode 100644 index ef8f02eaf5..0000000000 --- a/NPCs/Bumblebirb/Bumblefuck2.cs +++ /dev/null @@ -1,153 +0,0 @@ -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.Bumblebirb -{ - public class Bumblefuck2 : ModNPC - { - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 5; - NPCID.Sets.TrailingMode[Type] = 1; - this.HideFromBestiary(); - } - - public override string Texture => "CalamityMod/NPCs/Bumblebirb/BumbleFolly"; - - public override void SetDefaults() - { - NPC.npcSlots = 1f; - NPC.aiStyle = -1; - AIType = -1; - NPC.GetNPCDamage(); - NPC.width = 120; - NPC.height = 80; - NPC.defense = 20; - NPC.LifeMaxNERB(9375, 11250, 5000); - NPC.knockBackResist = 0.15f; - NPC.lavaImmune = true; - NPC.noTileCollide = true; - NPC.noGravity = true; - NPC.HitSound = SoundID.NPCHit51; - NPC.DeathSound = SoundID.NPCDeath46; - NPC.Calamity().VulnerableToHeat = true; - NPC.Calamity().VulnerableToCold = true; - NPC.Calamity().VulnerableToSickness = true; - - // Scale stats in Expert and Master - CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); - } - - public override void AI() - { - BumblebirbAI.VanillaBumblebirb2AI(NPC, Mod, true); - } - - public override void OnKill() - { - int closestPlayer = Player.FindClosest(NPC.Center, 1, 1); - if (Main.rand.NextBool(4) && Main.player[closestPlayer].statLife < Main.player[closestPlayer].statLifeMax2) - Item.NewItem(NPC.GetSource_Loot(), (int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height, ItemID.Heart); - - if (Main.zenithWorld) - { - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < 5; i++) - { - Vector2 fireFrom = new Vector2(NPC.Center.X + (40 * i) - 120, NPC.Center.Y - 900f); - Vector2 ai0 = NPC.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - } - - public override void FindFrame(int frameHeight) - { - NPC.frameCounter += NPC.ai[0] == 2.1f ? 1.5 : 1D; - if (Main.zenithWorld) - { - NPC.frameCounter += 2D; - } - if (NPC.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - } - if (NPC.frame.Y >= frameHeight * 4) - { - NPC.frame.Y = 0; - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); - int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; - - if (CalamityClientConfig.Instance.Afterimages) - { - for (int i = 1; i < afterimageAmt; i += 2) - { - Color afterimageColor = drawColor; - afterimageColor = Color.Lerp(afterimageColor, Color.Gold, 0.5f); - afterimageColor = NPC.GetAlpha(afterimageColor); - afterimageColor *= (afterimageAmt - i) / 15f; - Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimageDrawPos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; - afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - } - - Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; - drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - return false; - } - - public override void ModifyTypeName(ref string typeName) - { - if (Main.zenithWorld) - { - typeName = CalamityUtils.GetTextValue("NPCs.Bumblebirb"); - } - } - - public override void HitEffect(NPC.HitInfo hit) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); - } - if (NPC.life <= 0) - { - for (int k = 0; k < 50; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); - } - } - } - } -} diff --git a/NPCs/Bumblebirb/DraconicSwarmer.cs b/NPCs/Bumblebirb/DraconicSwarmer.cs new file mode 100644 index 0000000000..f2156037e7 --- /dev/null +++ b/NPCs/Bumblebirb/DraconicSwarmer.cs @@ -0,0 +1,369 @@ +using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Sounds; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.Bumblebirb +{ + public class DraconicSwarmer : ModNPC + { + public override void SetStaticDefaults() + { + Main.npcFrameCount[Type] = 5; + NPCID.Sets.TrailingMode[Type] = 1; + this.HideFromBestiary(); + } + + public override string Texture => "CalamityMod/NPCs/Bumblebirb/BumbleFolly"; + + public override void SetDefaults() + { + NPC.npcSlots = 1f; + NPC.aiStyle = -1; + AIType = -1; + NPC.GetNPCDamage(); + NPC.width = 120; + NPC.height = 80; + NPC.defense = 20; + NPC.LifeMaxNERB(9375, 11250, 5000); + NPC.knockBackResist = 0.15f; + NPC.lavaImmune = true; + NPC.noTileCollide = true; + NPC.noGravity = true; + NPC.HitSound = SoundID.NPCHit51; + NPC.DeathSound = SoundID.NPCDeath46; + NPC.Calamity().VulnerableToHeat = true; + NPC.Calamity().VulnerableToCold = true; + NPC.Calamity().VulnerableToSickness = true; + + // Scale stats in Expert and Master + CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); + CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); + } + + public override void AI() + { + Player player = Main.player[NPC.target]; + + float rotationMult = 4f; + float rotationAmt = 0.04f; + + if (Vector2.Distance(player.Center, NPC.Center) > 5600f) + { + if (NPC.timeLeft > 5) + NPC.timeLeft = 5; + } + + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt * 1.25f) / 10f; + + if (NPC.ai[0] == 0f || NPC.ai[0] == 1f) + { + for (int i = 0; i < Main.maxNPCs; i++) + { + if (i != NPC.whoAmI && Main.npc[i].active && Main.npc[i].type == NPC.type) + { + Vector2 otherSwarmerDirection = Main.npc[i].Center - NPC.Center; + if (otherSwarmerDirection.Length() < (NPC.width + NPC.height)) + { + otherSwarmerDirection.Normalize(); + otherSwarmerDirection *= -0.1f; + NPC.velocity += otherSwarmerDirection; + NPC nPC6 = Main.npc[i]; + nPC6.velocity -= otherSwarmerDirection; + } + } + } + } + + if (NPC.target < 0 || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + { + NPC.TargetClosest(true); + Vector2 swarmerTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (Main.player[NPC.target].dead || swarmerTargetDist.Length() > 5600f) + NPC.ai[0] = -1f; + } + else + { + Vector2 swarmerCatchUpTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (NPC.ai[0] > 1f && swarmerCatchUpTargetDist.Length() > 3600f) + NPC.ai[0] = 1f; + } + + if (NPC.ai[0] == -1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + Vector2 swarmerDespawnVelMult = new Vector2(0f, -8f); + NPC.velocity = (NPC.velocity * 21f + swarmerDespawnVelMult) / 10f; + return; + } + + if (NPC.ai[0] == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.TargetClosest(true); + NPC.spriteDirection = NPC.direction; + + Vector2 swarmerIdleTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (swarmerIdleTargetDist.Length() > 2800f) + { + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + } + else if (swarmerIdleTargetDist.Length() > 400f) + { + float swarmerIdleSpeed = 9f + swarmerIdleTargetDist.Length() / 100f + NPC.ai[1] / 15f; + swarmerIdleTargetDist.Normalize(); + swarmerIdleTargetDist *= swarmerIdleSpeed; + NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + } + else if (NPC.velocity.Length() > 2f) + NPC.velocity *= 0.95f; + else if (NPC.velocity.Length() < 1f) + NPC.velocity *= 1.05f; + + NPC.ai[1] += 1f; + if (NPC.ai[1] >= 90f) + { + NPC.ai[1] = 0f; + NPC.ai[0] = 2f; + } + } + else + { + if (NPC.ai[0] == 1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.target < 0 || !Main.player[NPC.target].active || Main.player[NPC.target].dead) + NPC.TargetClosest(true); + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt) / 10f; + + Vector2 swarmerChargeTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (swarmerChargeTargetDist.Length() < 800f && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + } + + NPC.ai[2] += 0.0166666675f; + float swarmerChargeSpeed = 12f + NPC.ai[2] + swarmerChargeTargetDist.Length() / 150f; + float swarmerChargeVelMult = 25f; + swarmerChargeTargetDist.Normalize(); + swarmerChargeTargetDist *= swarmerChargeSpeed; + NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + + NPC.ForceNetUpdate(); + + return; + } + + if (NPC.ai[0] == 2f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult * 0.75f + NPC.velocity.X * rotationAmt * 1.25f) / 8f; + + Vector2 swarmerDecelerateTargetDist = Main.player[NPC.target].Center - NPC.Center; + swarmerDecelerateTargetDist.Y -= 8f; + float swarmerDecelerateSpeed = 18f; + float swarmerDecelerateVelMult = 8f; + swarmerDecelerateTargetDist.Normalize(); + swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; + NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + + NPC.ai[1] += 1f; + if (NPC.ai[1] > 10f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.velocity = swarmerDecelerateTargetDist; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.ai[0] = 2.1f; + NPC.ai[1] = 0f; + } + } + else if (NPC.ai[0] == 2.1f) + { + // Set damage + NPC.damage = NPC.defDamage; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + + NPC.velocity *= 1.01f; + + NPC.ai[1] += 1f; + if (NPC.ai[1] > 30f) + { + if (!Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + return; + } + + if (NPC.ai[1] > 60f) + { + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + } + } + } + } + + public override void OnKill() + { + int closestPlayer = Player.FindClosest(NPC.Center, 1, 1); + if (Main.rand.NextBool(4) && Main.player[closestPlayer].statLife < Main.player[closestPlayer].statLifeMax2) + Item.NewItem(NPC.GetSource_Loot(), (int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height, ItemID.Heart); + + if (Main.zenithWorld) + { + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < 5; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (40 * i) - 120, NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + } + + public override void FindFrame(int frameHeight) + { + NPC.frameCounter += NPC.ai[0] == 2.1f ? 1.5 : 1D; + if (Main.zenithWorld) + { + NPC.frameCounter += 2D; + } + if (NPC.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base + { + NPC.frameCounter = 0D; + NPC.frame.Y += frameHeight; + } + if (NPC.frame.Y >= frameHeight * 4) + { + NPC.frame.Y = 0; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (NPC.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); + int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; + + if (CalamityClientConfig.Instance.Afterimages) + { + for (int i = 1; i < afterimageAmt; i += 2) + { + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.Gold, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (afterimageAmt - i) / 15f; + Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; + afterimageDrawPos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; + afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + } + + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + + return false; + } + + public override void ModifyTypeName(ref string typeName) + { + if (Main.zenithWorld) + { + typeName = CalamityUtils.GetTextValue("NPCs.Bumblebirb"); + } + } + + public override void HitEffect(NPC.HitInfo hit) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); + } + if (NPC.life <= 0) + { + for (int k = 0; k < 50; k++) + { + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); + } + } + } + } +} diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs new file mode 100644 index 0000000000..268fadb66a --- /dev/null +++ b/NPCs/Bumblebirb/Dragonfolly.cs @@ -0,0 +1,1356 @@ +using System; +using System.IO; +using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; +using CalamityMod.Events; +using CalamityMod.Items.Accessories; +using CalamityMod.Items.Armor.Vanity; +using CalamityMod.Items.LoreItems; +using CalamityMod.Items.Materials; +using CalamityMod.Items.Mounts; +using CalamityMod.Items.Placeables.Furniture.BossRelics; +using CalamityMod.Items.Placeables.Furniture.DevPaintings; +using CalamityMod.Items.Placeables.Furniture.Trophies; +using CalamityMod.Items.Potions; +using CalamityMod.Items.TreasureBags; +using CalamityMod.Items.Weapons.Magic; +using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Items.Weapons.Ranged; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Sounds; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameContent.Bestiary; +using Terraria.GameContent.ItemDropRules; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.NPCs.Bumblebirb +{ + [AutoloadBossHead] + public class Dragonfolly : ModNPC + { + public static Asset GlowTexture; + public override void SetStaticDefaults() + { + Main.npcFrameCount[Type] = 6; + NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.BossBestiaryPriority.Add(Type); + NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() + { + Scale = 0.5f, + PortraitScale = 0.85f, + PortraitPositionYOverride = 14f + }; + value.Position.X += 20f; + value.Position.Y += 8f; + NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; + NPCID.Sets.MPAllowedEnemies[Type] = true; + if (!Main.dedServ) + { + GlowTexture = ModContent.Request("CalamityMod/NPCs/Bumblebirb/BirbGlow", AssetRequestMode.AsyncLoad); + } + } + + public override string Texture => "CalamityMod/NPCs/Bumblebirb/Birb"; + public override string BossHeadTexture => "CalamityMod/NPCs/Bumblebirb/Birb_Head_Boss"; + + public override void SetDefaults() + { + NPC.Calamity().canBreakPlayerDefense = true; + NPC.npcSlots = 32f; + NPC.aiStyle = -1; + AIType = -1; + NPC.GetNPCDamage(); + NPC.width = 130; + NPC.height = 100; + NPC.defense = 40; + NPC.DR_NERD(0.1f); + NPC.LifeMaxNERB(187500, 225000, 300000); // Old HP - 227500, 252500 + NPC.knockBackResist = 0f; + NPC.boss = true; + NPC.noTileCollide = true; + NPC.lavaImmune = true; + NPC.noGravity = true; + NPC.value = Item.buyPrice(1, 0, 0, 0); + NPC.HitSound = SoundID.NPCHit51; + NPC.DeathSound = SoundID.NPCDeath46; + NPC.Calamity().VulnerableToHeat = true; + NPC.Calamity().VulnerableToCold = true; + NPC.Calamity().VulnerableToSickness = true; + NPC.Calamity().VulnerableToElectricity = false; + + // Scale HP in Master + CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC, true); + } + + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.Bumblefuck") + }); + } + + public override void SendExtraAI(BinaryWriter writer) + { + 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.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(); + + // 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(); + + Player player = Main.player[NPC.target]; + + // Variables + float rotationMult = 3f; + float rotationAmt = 0.03f; + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = NPC.ai[0] == 3f || NPC.ai[0] == 3.1f || NPC.ai[0] == 3.2f; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // If target is outside the jungle for more than 5 seconds, enrage + if (!player.ZoneJungle) + { + if (NPC.localAI[1] < CalamityGlobalNPC.biomeEnrageTimerMax) + NPC.localAI[1] += 1f; + } + else + NPC.localAI[1] = 0f; + + // If dragonfolly is off screen, enrage for the next couple attacks + if (Vector2.Distance(player.Center, NPC.Center) > 1200f) + NPC.localAI[2] = 2f; + + // Enrage scale + float enrageScale = death ? 1.5f : 1f; + if (NPC.localAI[1] >= CalamityGlobalNPC.biomeEnrageTimerMax || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 1f; + } + + if (NPC.localAI[2] > 0f || bossRush) + enrageScale += 1f; + + if (Main.getGoodWorld) + enrageScale += 0.5f; + + if (enrageScale > 3f) + enrageScale = 3f; + + // Despawn + if (!player.active || player.dead || Vector2.Distance(player.Center, NPC.Center) > 5600f) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + + if (!player.active || player.dead || Vector2.Distance(player.Center, NPC.Center) > 5600f) + { + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt) / 10f; + + if (NPC.velocity.Y > 3f) + NPC.velocity.Y = 3f; + NPC.velocity.Y -= 0.2f; + if (NPC.velocity.Y < -12f) + NPC.velocity.Y = -12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + if (NPC.ai[0] != 0f) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + NPC.ForceNetUpdate(false); + } + + return; + } + } + else if (NPC.timeLeft < 1800) + NPC.timeLeft = 1800; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f); + bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f) && expertMode; + + float birbSpawnPhaseTimer = 180f; + float newPhaseTimer = 180f; + bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || + (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); + + calamityGlobalNPC.DR = (phaseSwitchPhase || NPC.ai[0] == 5f || (enrageScale == 3f && !bossRush)) ? (bossRush ? 0.99f : 0.55f) : 0.1f; + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phaseSwitchPhase || NPC.ai[0] == 5f || (enrageScale == 3f && !bossRush); + + int reducedSetDamage = (int)Math.Round(NPC.defDamage * 0.5); + + if (phaseSwitchPhase) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt) / 10f; + + if (phase3) + { + calamityGlobalNPC.newAI[1] += 1f; + + // Sound + if (calamityGlobalNPC.newAI[1] == newPhaseTimer - 60f) + { + float squawkpitch = Main.zenithWorld ? 1.3f : 0.25f; + SoundEngine.PlaySound(SoundID.DD2_BetsyScream with { Pitch = squawkpitch }, NPC.Center); + + if (Main.zenithWorld) + { + int spacing = 20; + int amt = 5; + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < amt; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (spacing * i) - (spacing * amt / 2), NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.defDamage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + } + + if (calamityGlobalNPC.newAI[1] >= newPhaseTimer) + { + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 1f; + calamityGlobalNPC.newAI[3] = 1f; + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.SyncExtraAI(); + NPC.ForceNetUpdate(false); + } + } + else + { + calamityGlobalNPC.newAI[0] += 1f; + + // Sound + if (calamityGlobalNPC.newAI[0] == newPhaseTimer - 60f) + { + float squawkpitch = Main.zenithWorld ? 1.3f : 0.25f; + SoundEngine.PlaySound(SoundID.DD2_BetsyScream with { Pitch = squawkpitch }, NPC.Center); + + if (Main.zenithWorld) + { + int spacing = 20; + int amt = 3; + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < amt; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (spacing * i) - (spacing * amt / 2), NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.defDamage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + } + + if (calamityGlobalNPC.newAI[0] >= newPhaseTimer) + { + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[2] = 1f; + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.SyncExtraAI(); + NPC.ForceNetUpdate(false); + } + } + + Vector2 follyTargetDirection = player.Center - NPC.Center; + float follyTargetDistance = 4f + follyTargetDirection.Length() / 100f; + float follyVelocityMult = 25f; + follyTargetDirection.Normalize(); + follyTargetDirection *= follyTargetDistance; + NPC.velocity = (NPC.velocity * (follyVelocityMult - 1f) + follyTargetDirection) / follyVelocityMult; + return; + } + + // Max spawn amount + int maxBirbs = (CalamityWorld.LegendaryMode && revenge) ? 12 : revenge ? 3 : 2; + + // Variable for charging + float chargeDistance = 600f; + if (phase2) + chargeDistance -= 50f; + if (phase3) + chargeDistance -= 50f; + chargeDistance -= (enrageScale - 1f) * 100f; + + // Phase switch + if (NPC.ai[0] == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.Center.X < player.Center.X - 2f) + NPC.direction = 1; + if (NPC.Center.X > player.Center.X + 2f) + NPC.direction = -1; + + // Direction and rotation + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt * 1.25f) / 10f; + + // Fly to target if target is too far away, otherwise get close to target and then slow down + Vector2 follyFlyTargetDirection = player.Center - NPC.Center; + follyFlyTargetDirection.Y -= 200f; + if (follyFlyTargetDirection.Length() > 2800f) + { + NPC.TargetClosest(); + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + else if (follyFlyTargetDirection.Length() > 240f) + { + float follyFlySpeed = 12f + (enrageScale - 1f) * 6f; + float follyFlyVelocityMult = 30f; + follyFlyTargetDirection.Normalize(); + follyFlyTargetDirection *= follyFlySpeed; + NPC.velocity = (NPC.velocity * (follyFlyVelocityMult - 1f) + follyFlyTargetDirection) / follyFlyVelocityMult; + } + else if (NPC.velocity.Length() > 2f) + NPC.velocity *= 0.95f; + else if (NPC.velocity.Length() < 1f) + NPC.velocity *= 1.05f; + + // Phase switch + NPC.ai[1] += 1f; + if (NPC.ai[1] >= 30f) + { + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + while (NPC.ai[0] == 0f) + { + if (phase2) + NPC.localAI[0] += 1f; + + if (NPC.localAI[0] >= (phase3 ? 7 : 9)) + { + NPC.TargetClosest(); + NPC.ai[0] = 5f; + NPC.localAI[0] = 0f; + + // Decrease the feather variable, feathers can be used again if it's at 0 + if (NPC.ai[3] > 0f) + NPC.ai[3] -= 1f; + + // Decrease enraged attacks by 1 + if (NPC.localAI[2] > 0f) + NPC.localAI[2] -= 1f; + + // Decrease amount of attacks until able to spawn small birbs again + if (NPC.localAI[3] > 0f) + NPC.localAI[3] -= 1f; + } + else + { + int follyAttackPicker = phase2 ? Main.rand.Next(2) + 1 : Main.rand.Next(3); + if (phase3) + follyAttackPicker = 1; + + float featherVelocity = 2f + (enrageScale - 1f); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + + if (follyAttackPicker == 0 && NPC.localAI[3] == 0f) + { + NPC.TargetClosest(); + NPC.ai[0] = 2f; + + // Decrease the feather variable, feathers can be used again if it's at 0 + if (NPC.ai[3] > 0f) + NPC.ai[3] -= 1f; + + // Decrease enraged attacks by 1 + if (NPC.localAI[2] > 0f) + NPC.localAI[2] -= 1f; + + // Birb will do at least 1 different attack before entering this phase again + NPC.localAI[3] = 1f; + } + else if (follyAttackPicker == 1) + { + NPC.TargetClosest(); + NPC.ai[0] = 3f; + + // Decrease enraged attacks by 1 + if (NPC.localAI[2] > 0f) + NPC.localAI[2] -= 1f; + + // Decrease amount of attacks until able to use other attacks again + if (NPC.localAI[3] > 0f) + NPC.localAI[3] -= 1f; + + if (phase2 && NPC.ai[3] == 0f) + { + NPC.ai[3] = 3f; + SoundEngine.PlaySound(SoundID.Item102, player.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int totalProjectiles = 40; + float radians = MathHelper.TwoPi / totalProjectiles; + int distance = 800; + bool spawnRight = player.velocity.X > 0f; + for (int i = 0; i < totalProjectiles; i++) + { + if (Main.getGoodWorld) + { + if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) + { + Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; + Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + if (i >= (int)(totalProjectiles * 0.625) && i <= (int)(totalProjectiles * 0.875)) + { + Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; + Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + else + { + if (spawnRight) + { + if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) + { + Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; + Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + else + { + if (i >= (int)(totalProjectiles * 0.625) && i <= (int)(totalProjectiles * 0.875)) + { + Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; + Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + } + } + else + { + // Decrease the feather variable, feathers can be used again if it's at 0 + if (NPC.ai[3] > 0f) + NPC.ai[3] -= 1f; + } + } + else if (NPC.CountNPCS(ModContent.NPCType()) < maxBirbs && NPC.localAI[3] == 0f) + { + NPC.TargetClosest(); + NPC.ai[0] = 4f; + + // Birb will do at least 2 different attacks before entering this phase again + NPC.localAI[3] = 2f; + + // Decrease enraged attacks by 1 + if (NPC.localAI[2] > 0f) + NPC.localAI[2] -= 1f; + + if (NPC.ai[3] == 0f) + { + NPC.ai[3] = 3f; + SoundEngine.PlaySound(SoundID.Item102, player.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int totalProjectiles = phase2 ? 40 : 48; + + if (Main.getGoodWorld) + totalProjectiles *= 2; + + float radians = MathHelper.TwoPi / totalProjectiles; + int distance = phase2 ? 1200 : 1320; + + if (Main.getGoodWorld) + distance *= 2; + + bool spawnRight = player.velocity.X > 0f; + for (int i = 0; i < totalProjectiles; i++) + { + if (spawnRight) + { + if (i >= totalProjectiles / 2) + break; + + Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; + Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + else + { + if (i >= totalProjectiles / 2) + { + Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; + Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; + Projectile.NewProjectile(NPC.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + } + else + { + // Decrease the feather variable, feathers can be used again if it's at 0 + if (NPC.ai[3] > 0f) + NPC.ai[3] -= 1f; + } + } + } + } + + NPC.ForceNetUpdate(false); + NPC.SyncExtraAI(); + } + } + + // Fly to target + else if (NPC.ai[0] == 1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt) / 10f; + + Vector2 follyTargetDirection = player.Center - NPC.Center; + if (follyTargetDirection.Length() < 800f) + { + NPC.TargetClosest(); + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + NPC.ForceNetUpdate(false); + NPC.SyncExtraAI(); + } + + float velocity = 14f + (enrageScale - 1f) * 4f; + float follyTargetDistance = velocity + follyTargetDirection.Length() / 100f; + float follyVelocityMult = 25f; + follyTargetDirection.Normalize(); + follyTargetDirection *= follyTargetDistance; + NPC.velocity = (NPC.velocity * (follyVelocityMult - 1f) + follyTargetDirection) / follyVelocityMult; + } + + // Fly towards target quickly + else if (NPC.ai[0] == 2f) + { + // Set reduced damage + NPC.damage = reducedSetDamage; + + if (NPC.target < 0 || !player.active || player.dead) + { + NPC.TargetClosest(); + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + NPC.ForceNetUpdate(false); + NPC.SyncExtraAI(); + } + + if (player.Center.X - 10f < NPC.Center.X) + NPC.direction = -1; + else if (player.Center.X + 10f > NPC.Center.X) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult * 0.5f + NPC.velocity.X * rotationAmt * 1.25f) / 5f; + + Vector2 follyQuickFlyTargetDirection = player.Center - NPC.Center; + follyQuickFlyTargetDirection.Y -= 20f; + NPC.ai[2] += 0.0222222228f; + if (expertMode) + NPC.ai[2] += 0.0166666675f; + + float velocity = 8f + (enrageScale - 1f) * 2f; + float follyQuickFlySpeed = velocity + NPC.ai[2] + follyQuickFlyTargetDirection.Length() / 120f; + if (CalamityWorld.LegendaryMode && revenge) + follyQuickFlySpeed *= 2f; + + float follyQuickFlyVelMult = 20f; + follyQuickFlyTargetDirection.Normalize(); + follyQuickFlyTargetDirection *= follyQuickFlySpeed; + NPC.velocity = (NPC.velocity * (follyQuickFlyVelMult - 1f) + follyQuickFlyTargetDirection) / follyQuickFlyVelMult; + + NPC.ai[1] += 1f; + if (NPC.ai[1] >= ((CalamityWorld.LegendaryMode && revenge) ? 90f : 180f)) + { + NPC.TargetClosest(); + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + NPC.ForceNetUpdate(false); + NPC.SyncExtraAI(); + } + } + + // Line up charge + else if (NPC.ai[0] == 3f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult * 0.5f + NPC.velocity.X * rotationAmt * 0.85f) / 5f; + + Vector2 follyLineUpTargetDirection = player.Center - NPC.Center; + follyLineUpTargetDirection.Y -= 12f; + if (NPC.Center.X > player.Center.X) + follyLineUpTargetDirection.X += chargeDistance; + else + follyLineUpTargetDirection.X -= chargeDistance; + + float verticalDistanceGateValue = (phase3 ? 100f : 20f) + (enrageScale - 1f) * 20f; + if (Math.Abs(NPC.Center.X - player.Center.X) > chargeDistance - 50f && Math.Abs(NPC.Center.Y - player.Center.Y) < verticalDistanceGateValue) + { + NPC.ai[0] = 3.1f; + NPC.ai[1] = 0f; + + NPC.ForceNetUpdate(false); + NPC.SyncExtraAI(); + } + + NPC.ai[1] += 0.0333333351f; + float velocity = 16f + (enrageScale - 1f) * 4f; + float follyLineUpSpeed = velocity + NPC.ai[1]; + float follyLineUpVelMult = 4f; + follyLineUpTargetDirection.Normalize(); + follyLineUpTargetDirection *= follyLineUpSpeed; + NPC.velocity = (NPC.velocity * (follyLineUpVelMult - 1f) + follyLineUpTargetDirection) / follyLineUpVelMult; + } + + // Prepare to charge + else if (NPC.ai[0] == 3.1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.rotation = (NPC.rotation * rotationMult * 0.5f + NPC.velocity.X * rotationAmt * 0.85f) / 5f; + + Vector2 follyChargePrepareTargetDirection = player.Center - NPC.Center; + follyChargePrepareTargetDirection.Y -= 12f; + float follyChargePrepareSpeed = 28f + (enrageScale - 1f) * 4f; + float follyChargePrepareVelMult = 8f; + follyChargePrepareTargetDirection.Normalize(); + follyChargePrepareTargetDirection *= follyChargePrepareSpeed; + NPC.velocity = (NPC.velocity * (follyChargePrepareVelMult - 1f) + follyChargePrepareTargetDirection) / follyChargePrepareVelMult; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + + NPC.ai[1] += 1f; + if (NPC.ai[1] > 10f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.velocity = follyChargePrepareTargetDirection; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.ai[0] = 3.2f; + NPC.ai[1] = NPC.direction; + + NPC.ForceNetUpdate(false); + NPC.SyncExtraAI(); + } + } + + // Charge + else if (NPC.ai[0] == 3.2f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.ai[2] += 0.0333333351f; + float velocity = 28f + (enrageScale - 1f) * 4f; + NPC.velocity.X = (velocity + NPC.ai[2]) * NPC.ai[1]; + + if ((NPC.ai[1] > 0f && NPC.Center.X > player.Center.X + (chargeDistance - 140f)) || (NPC.ai[1] < 0f && NPC.Center.X < player.Center.X - (chargeDistance - 140f))) + { + if (!Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + { + NPC.TargetClosest(); + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ForceNetUpdate(false); + } + else if (Math.Abs(NPC.Center.X - player.Center.X) > chargeDistance + 200f) + { + NPC.TargetClosest(); + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ForceNetUpdate(false); + } + } + + NPC.rotation = (NPC.rotation * rotationMult * 0.5f + NPC.velocity.X * rotationAmt * 0.85f) / 5f; + } + + // Birb spawn + else if (NPC.ai[0] == 4f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.ai[1] == 0f) + { + Vector2 destination2 = player.Center + new Vector2(0f, -200f); + Vector2 desiredVelocity2 = NPC.SafeDirectionTo(destination2, -Vector2.UnitY) * 18f; + NPC.SimpleFlyMovement(desiredVelocity2, 1.5f); + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + + NPC.ai[2] += 1f; + if (NPC.Distance(player.Center) < 600f || NPC.ai[2] >= 180f) + { + NPC.ai[1] = 1f; + NPC.ForceNetUpdate(false); + } + } + else + { + if (NPC.ai[1] < 90f) + NPC.velocity *= 0.95f; + else + NPC.velocity *= 0.98f; + + if (NPC.ai[1] == 90f) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y /= 3f; + + NPC.velocity.Y -= 3f; + } + + // Sound + if (NPC.ai[1] == birbSpawnPhaseTimer - 60f) + { + float squawkpitch = Main.zenithWorld ? 1.3f : 0.25f; + SoundEngine.PlaySound(SoundID.DD2_BetsyScream with { Pitch = squawkpitch }, NPC.Center); + + if (Main.zenithWorld) + { + int spacing = 30; + int amt = 3; + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < amt; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (spacing * i) - (spacing * amt / 2), NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + bool gfbSpawnFlag = CalamityWorld.LegendaryMode && revenge && (NPC.ai[1] == 145f || NPC.ai[1] == 150f || NPC.ai[1] == 160f || NPC.ai[1] == 165f); + bool spawnFlag = NPC.CountNPCS(ModContent.NPCType()) < maxBirbs && (NPC.ai[1] == 140f || (revenge && NPC.ai[1] == 155f) || NPC.ai[1] == 170f || gfbSpawnFlag); + if (spawnFlag) + { + Vector2 follySpawnCenter = NPC.Center + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 50f * (0.6f + Main.rand.NextFloat() * 0.4f); + if (Vector2.Distance(follySpawnCenter, player.Center) > 150f) + NPC.NewNPC(NPC.GetSource_FromAI(), (int)follySpawnCenter.X, (int)follySpawnCenter.Y, ModContent.NPCType(), NPC.whoAmI); + + NPC.ForceNetUpdate(false); + } + } + + NPC.ai[1] += 1f; + } + + if (NPC.ai[1] >= birbSpawnPhaseTimer) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.ForceNetUpdate(false); + } + } + + // Spit homing aura sphere + else if (NPC.ai[0] == 5f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + NPC.velocity *= 0.98f; + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt) / 10f; + + // Play sound + float aiGateValue = 120f; + if (NPC.ai[1] == aiGateValue - 30f) + { + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 follySpawnCenter = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; + float ai0 = (phase3 ? 2f : 0f) + (enrageScale - 1f); + if (ai0 > 3f) + ai0 = 3f; + + Projectile.NewProjectile(NPC.GetSource_FromAI(), follySpawnCenter.X, follySpawnCenter.Y, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, ai0, NPC.target + 1); + NPC.ForceNetUpdate(false); + } + + if (Main.zenithWorld) + { + int spacing = 30; + int amt = 3; + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < amt; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (spacing * i) - (spacing * amt / 2), NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + } + + NPC.ai[1] += 1f; + if (NPC.ai[1] >= aiGateValue) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ForceNetUpdate(false); + } + } + } + + public override void FindFrame(int frameHeight) + { + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death; + bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f); + bool birbSpawn = NPC.ai[0] == 4f && NPC.ai[1] > 0f; + + // Animation goes nyoom + if (Main.zenithWorld) + { + NPC.frameCounter += 4; + } + + float newPhaseTimer = 180f; + bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || + (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); + + if (phaseSwitchPhase || birbSpawn) + { + float frameGateValue = birbSpawn ? NPC.ai[1] : phase3 ? calamityGlobalNPC.newAI[1] : calamityGlobalNPC.newAI[0]; + int frameTimer = 180; + if (frameGateValue < (frameTimer - 60) || frameGateValue > (frameTimer - 20)) + { + NPC.frameCounter += 1D; + if (NPC.frameCounter > 5D) + { + NPC.frameCounter = 0D; + NPC.frame.Y += frameHeight; + } + if (NPC.frame.Y >= frameHeight * 5) + { + NPC.frame.Y = 0; + } + } + else + { + NPC.frame.Y = frameHeight * 4; + if (frameGateValue > (frameTimer - 50) && frameGateValue < (frameTimer - 25)) + { + NPC.frame.Y = frameHeight * 5; + } + } + } + else if (NPC.ai[0] == 5f) + { + int otherFrameTimer = 120; + if (NPC.ai[1] < (otherFrameTimer - 50) || NPC.ai[1] > (otherFrameTimer - 10)) + { + NPC.frameCounter += 1D; + if (NPC.frameCounter > 5D) + { + NPC.frameCounter = 0D; + NPC.frame.Y += frameHeight; + } + if (NPC.frame.Y >= frameHeight * 5) + { + NPC.frame.Y = 0; + } + } + else + { + NPC.frame.Y = frameHeight * 4; + if (NPC.ai[1] > (otherFrameTimer - 40) && NPC.ai[1] < (otherFrameTimer - 15)) + { + NPC.frame.Y = frameHeight * 5; + } + } + } + else + { + NPC.frameCounter += (NPC.ai[0] == 3.2f ? 1.5 : 1D); + if (NPC.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base + { + NPC.frameCounter = 0D; + NPC.frame.Y += frameHeight; + } + if (NPC.frame.Y >= frameHeight * 5) + { + NPC.frame.Y = 0; + } + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + bool revenge = CalamityWorld.revenge || BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || BossRushEvent.BossRushActive; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f) || death; + bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f); + + float newPhaseTimer = 180f; + bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || + (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); + + SpriteEffects spriteEffects = SpriteEffects.None; + if (NPC.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2((float)(TextureAssets.Npc[Type].Value.Width / 2), (float)(TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2)); + Color color = drawColor; + Color altColor = Color.White; + + float lerpDrawTransition = 0f; + int newAITracker = 120; + int buffColorDampener = 60; + + if (phase3 && calamityGlobalNPC.newAI[3] == 1f) + { + color = CalamityGlobalNPC.buffColor(color, 0.9f, 0.6f, 0.2f, 1f); + } + else if (phase2 && calamityGlobalNPC.newAI[2] == 1f) + { + color = CalamityGlobalNPC.buffColor(color, 0.7f, 0.7f, 0.3f, 1f); + } + else if (phase2 && calamityGlobalNPC.newAI[0] > (float)newAITracker) + { + float phase2TranBuff = calamityGlobalNPC.newAI[0] - (float)newAITracker; + phase2TranBuff /= (float)buffColorDampener; + color = CalamityGlobalNPC.buffColor(color, 1f - 0.3f * phase2TranBuff, 1f - 0.3f * phase2TranBuff, 1f - 0.7f * phase2TranBuff, 1f); + } + + int afterimageAmt = 10; + int afterimageIncrement = 2; + if (NPC.ai[0] == 0f || NPC.ai[0] == 3.1f || NPC.ai[0] == 4f || NPC.ai[0] == 4.2f) + { + afterimageAmt = 4; + } + if (NPC.ai[0] == 1f || NPC.ai[0] == 3f || NPC.ai[0] == 4.1f) + { + afterimageAmt = 7; + } + if (NPC.ai[0] == 2f || NPC.ai[0] == 3.2f || (phase2 && calamityGlobalNPC.newAI[2] == 1f)) + { + altColor = Color.Yellow; + lerpDrawTransition = 0.5f; + } + else + { + color = altColor; + } + + if (CalamityClientConfig.Instance.Afterimages) + { + for (int i = 1; i < afterimageAmt; i += afterimageIncrement) + { + Color afterimageColor = color; + afterimageColor = Color.Lerp(afterimageColor, altColor, lerpDrawTransition); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (float)(afterimageAmt - i) / 15f; + Vector2 afterimageDrawPos = NPC.oldPos[i] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + afterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; + afterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimageDrawPos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + } + + int extraAfterimageAmt = 0; + float extraAfterimageDampener = 0f; + float afterimageScaler = 0f; + + if (NPC.ai[0] == 0f || NPC.ai[0] == 3.1f || NPC.ai[0] == 4f || NPC.ai[0] == 4.2f) + { + extraAfterimageAmt = 4; + } + + if (NPC.ai[0] == 5f) + { + if (NPC.ai[1] > 60f) + { + extraAfterimageAmt = 6; + extraAfterimageDampener = 1f - (float)Math.Cos((double)((NPC.ai[1] - 60f) / 30f * MathHelper.TwoPi)); + extraAfterimageDampener /= 3f; + afterimageScaler = 40f; + } + } + + if (phaseSwitchPhase) + { + if (phase3 && calamityGlobalNPC.newAI[1] > (float)newAITracker) + { + extraAfterimageAmt = 6; + extraAfterimageDampener = 1f - (float)Math.Cos((double)((calamityGlobalNPC.newAI[1] - (float)newAITracker) / (float)buffColorDampener * MathHelper.TwoPi)); + extraAfterimageDampener /= 3f; + afterimageScaler = 60f; + } + else if (phase2 && calamityGlobalNPC.newAI[0] > (float)newAITracker) + { + extraAfterimageAmt = 6; + extraAfterimageDampener = 1f - (float)Math.Cos((double)((calamityGlobalNPC.newAI[0] - (float)newAITracker) / (float)buffColorDampener * MathHelper.TwoPi)); + extraAfterimageDampener /= 3f; + afterimageScaler = 60f; + } + } + + if (CalamityClientConfig.Instance.Afterimages) + { + for (int j = 0; j < extraAfterimageAmt; j++) + { + Color extraAfterimageColor = altColor; + extraAfterimageColor = Color.Lerp(extraAfterimageColor, altColor, lerpDrawTransition); + extraAfterimageColor = NPC.GetAlpha(extraAfterimageColor); + extraAfterimageColor *= 1f - extraAfterimageDampener; + Vector2 extraAfterimageDrawPos = NPC.Center + ((float)j / (float)extraAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScaler * extraAfterimageDampener - screenPos; + extraAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; + extraAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, extraAfterimageDrawPos, NPC.frame, extraAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + } + + Color mainDrawingColor = altColor; + mainDrawingColor = Color.Lerp(mainDrawingColor, altColor, lerpDrawTransition); + mainDrawingColor = NPC.GetAlpha(mainDrawingColor); + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, (phase3 && calamityGlobalNPC.newAI[3] == 1f ? mainDrawingColor : NPC.GetAlpha(altColor)), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + + if (phase2) + { + texture2D15 = GlowTexture.Value; + Color glowmaskColor = Color.Lerp(Color.White, Color.Red, 0.5f); + altColor = Color.Red; + + lerpDrawTransition = 1f; + extraAfterimageDampener = 0.5f; + afterimageScaler = 10f; + afterimageIncrement = 1; + + if (phaseSwitchPhase) + { + float glowmaskDampener = (phase3 ? calamityGlobalNPC.newAI[1] : calamityGlobalNPC.newAI[0]) - (float)newAITracker; + glowmaskDampener /= (float)buffColorDampener; + altColor *= glowmaskDampener; + glowmaskColor *= glowmaskDampener; + } + + if (CalamityClientConfig.Instance.Afterimages) + { + for (int k = 1; k < afterimageAmt; k += afterimageIncrement) + { + Color glowmaskAfterimageColor = glowmaskColor; + glowmaskAfterimageColor = Color.Lerp(glowmaskAfterimageColor, altColor, lerpDrawTransition); + glowmaskAfterimageColor *= (float)(afterimageAmt - k) / 15f; + Vector2 glowmaskAfterimageDrawPos = NPC.oldPos[k] + new Vector2((float)NPC.width, (float)NPC.height) / 2f - screenPos; + glowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; + glowmaskAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, glowmaskAfterimageDrawPos, NPC.frame, glowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + + for (int l = 1; l < extraAfterimageAmt; l++) + { + Color extraGlowmaskAfterimageColor = glowmaskColor; + extraGlowmaskAfterimageColor = Color.Lerp(extraGlowmaskAfterimageColor, altColor, lerpDrawTransition); + extraGlowmaskAfterimageColor = NPC.GetAlpha(extraGlowmaskAfterimageColor); + extraGlowmaskAfterimageColor *= 1f - extraAfterimageDampener; + Vector2 extraGlowmaskAfterimageDrawPos = NPC.Center + ((float)l / (float)extraAfterimageAmt * MathHelper.TwoPi + NPC.rotation).ToRotationVector2() * afterimageScaler * extraAfterimageDampener - screenPos; + extraGlowmaskAfterimageDrawPos -= new Vector2((float)texture2D15.Width, (float)(texture2D15.Height / Main.npcFrameCount[Type])) * NPC.scale / 2f; + extraGlowmaskAfterimageDrawPos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, extraGlowmaskAfterimageDrawPos, NPC.frame, extraGlowmaskAfterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + } + + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, glowmaskColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + + return false; + } + + private static Color buffColor(Color newColor, float R, float G, float B, float A) + { + newColor.R = (byte)((float)newColor.R * R); + newColor.G = (byte)((float)newColor.G * G); + newColor.B = (byte)((float)newColor.B * B); + newColor.A = (byte)((float)newColor.A * A); + return newColor; + } + + public override void BossLoot(ref string name, ref int potionType) => potionType = ItemID.SuperHealingPotion; + + public override void ModifyNPCLoot(NPCLoot npcLoot) + { + npcLoot.Add(ItemDropRule.BossBag(ModContent.ItemType())); + + // Normal drops: Everything that would otherwise be in the bag + var normalOnly = npcLoot.DefineNormalOnlyDropSet(); + { + // Weapons + int[] items = new int[] + { + ModContent.ItemType(), + ModContent.ItemType(), + ModContent.ItemType() + }; + normalOnly.Add(DropHelper.CalamityStyle(DropHelper.NormalWeaponDropRateFraction, items)); + normalOnly.Add(ModContent.ItemType(), 10); + + // Materials + normalOnly.Add(ModContent.ItemType(), 1, 25, 30); + + // Equipment + normalOnly.Add(DropHelper.PerPlayer(ModContent.ItemType())); + normalOnly.Add(ModContent.ItemType(), DropHelper.NormalWeaponDropRateFraction); + + // Vanity + normalOnly.Add(ModContent.ItemType(), 7); + normalOnly.Add(ModContent.ItemType(), ThankYouPainting.DropInt); + } + + npcLoot.Add(ModContent.ItemType(), 10); + + // Relic + npcLoot.DefineConditionalDropSet(DropHelper.RevAndMaster).Add(ModContent.ItemType()); + + // GFB Omega Healing Potion drop + npcLoot.DefineConditionalDropSet(DropHelper.GFB).Add(DropHelper.PerPlayer(ModContent.ItemType(), 1, 50, 100), true); + + // Lore + npcLoot.AddConditionalPerPlayer(() => !DownedBossSystem.downedDragonfolly, ModContent.ItemType(), desc: DropHelper.FirstKillText); + } + + public override void OnHitPlayer(Player target, Player.HurtInfo hurtInfo) + { + if (hurtInfo.Damage > 0) + target.AddBuff(ModContent.BuffType(), Main.zenithWorld ? 360 : 180); + } + + public override void OnKill() + { + // Don't bother running any of this in Boss Rush. + if (BossRushEvent.BossRushActive) + return; + + CalamityGlobalNPC.SetNewBossJustDowned(NPC); + + // Mark The Dragonfolly as dead + DownedBossSystem.downedDragonfolly = true; + CalamityNetcode.SyncWorld(); + + if (Main.zenithWorld) + { + int spacing = 40; + int amt = 7; + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < amt; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (spacing * i) - (spacing * amt / 2), NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + + } + + public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) + { + NPC.lifeMax = (int)(NPC.lifeMax * 0.8f * balance * bossAdjustment); + NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier()); + } + + public override void ModifyTypeName(ref string typeName) + { + if (Main.zenithWorld) + { + typeName = CalamityUtils.GetTextValue("NPCs.Bumblebirb"); + } + } + + public override void HitEffect(NPC.HitInfo hit) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); + } + if (NPC.life <= 0) + { + for (int k = 0; k < 50; k++) + { + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); + } + if (!Main.dedServ) + { + for (int i = 0; i < 6; i++) // 1 head, 1 wing, 4 legs = 6. one wing due to them being chonky boyes now + { + string gore = "Bumble"; + float randomSpread = Main.rand.Next(-200, 201) / 100f; + gore += i == 0 ? "Head" : i > 1 ? "Leg" : "Wing"; + Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity * randomSpread, Mod.Find(gore).Type, 1f); + } + } + } + } + } +} diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index 86483769a4..e4571acd7a 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -14,14 +14,14 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; using CalamityMod.NPCs.TownNPCs; -using CalamityMod.Sounds; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using ReLogic.Utilities; +using System; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -134,7 +134,719 @@ namespace CalamityMod.NPCs.CalClone public override void AI() { - CalamitasCloneAI.VanillaCalamitasCloneAI(NPC, BulletHellWarnSlot); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + // Emit light + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1f, 0f, 0f); + + // Variables for increasing difficulty + bool bossRush = BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool expertMode = Main.expertMode || bossRush; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.7f || death; + bool phase3 = lifeRatio < 0.35f; + bool phase4 = lifeRatio <= 0.1f && death; + + // Don't take damage during bullet hells + NPC.dontTakeDamage = calamityGlobalNPC.newAI[2] > 0f; + + // Variable for live brothers + bool brotherAlive = false; + + // For seekers + CalamityGlobalNPC.calamitas = NPC.whoAmI; + + // Seeker ring + if (calamityGlobalNPC.newAI[1] == 0f && phase3 && expertMode) + { + SoundEngine.PlaySound(SoundID.Item72, NPC.Center); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int seekerAmt = death ? 10 : 5; + int seekerSpread = 360 / seekerAmt; + int seekerDistance = death ? 180 : 150; + for (int i = 0; i < seekerAmt; i++) + { + int spawn = NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + (Math.Sin(i * seekerSpread) * seekerDistance)), (int)(NPC.Center.Y + (Math.Cos(i * seekerSpread) * seekerDistance)), ModContent.NPCType(), NPC.whoAmI, 0, 0, 0, -1); + Main.npc[spawn].ai[0] = i * seekerSpread; + } + } + + string key = "Mods.CalamityMod.Status.Boss.CalamitasBossText3"; + Color messageColor = Color.Orange; + CalamityUtils.DisplayLocalizedText(key, messageColor); + + calamityGlobalNPC.newAI[1] = 1f; + } + + // CIT 14SEP2024: Fixed bug where her phases would get offset by dealing a large amount of damage in a single hit to take her into a new phase. + // newAI[0] now starts at 1 and has 0.3 subtracted from it for each phase, instead of it storing her current health when she enters a new phase. + + // Do bullet hell or spawn brothers + if (calamityGlobalNPC.newAI[0] == 0f && NPC.life > 0) + calamityGlobalNPC.newAI[0] = 1f; + + // Bullet hells at 70% and 10%, brothers at 40% + if (NPC.life > 0) + { + int calClonePhaseThreshold = (int)(NPC.lifeMax * 0.3); + if (((NPC.life + calClonePhaseThreshold) / (float)NPC.lifeMax) < calamityGlobalNPC.newAI[0]) + { + calamityGlobalNPC.newAI[0] -= 0.3f; + if (calamityGlobalNPC.newAI[0] <= 0.1f) + { + SoundEngine.PlaySound(SoundID.Item109, NPC.Center); + calamityGlobalNPC.newAI[2] = 2f; + + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + calamityGlobalNPC.newAI[3] = 0f; + + SpawnDust(); + } + else if (calamityGlobalNPC.newAI[0] <= 0.4f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.position.Y + NPC.height, ModContent.NPCType(), NPC.whoAmI); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.position.Y + NPC.height, ModContent.NPCType(), NPC.whoAmI); + } + + string key = "Mods.CalamityMod.Status.Boss.CalamitasBossText2"; + Color messageColor = Color.Orange; + CalamityUtils.DisplayLocalizedText(key, messageColor); + + SpawnDust(); + } + else + { + SoundEngine.PlaySound(SoundID.Item109, NPC.Center); + calamityGlobalNPC.newAI[2] = 1f; + + if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + calamityGlobalNPC.newAI[3] = 0f; + + SpawnDust(); + } + } + } + + // Immunity if brothers are alive + if (CalamityGlobalNPC.cataclysm != -1) + { + if (Main.npc[CalamityGlobalNPC.cataclysm].active) + brotherAlive = true; + } + if (CalamityGlobalNPC.catastrophe != -1) + { + if (Main.npc[CalamityGlobalNPC.catastrophe].active) + brotherAlive = true; + } + + if (brotherAlive) + NPC.dontTakeDamage = true; + + void SpawnDust() + { + int dustAmt = 50; + int random = 3; + + for (int j = 0; j < 10; j++) + { + random += j; + int dustAmtSpawned = 0; + int scale = random * 6; + float dustPositionX = NPC.Center.X - (scale / 2); + float dustPositionY = NPC.Center.Y - (scale / 2); + while (dustAmtSpawned < dustAmt) + { + float dustVelocityX = Main.rand.Next(-random, random); + float dustVelocityY = Main.rand.Next(-random, random); + float dustVelocityScalar = random * 2f; + float dustVelocity = (float)Math.Sqrt(dustVelocityX * dustVelocityX + dustVelocityY * dustVelocityY); + dustVelocity = dustVelocityScalar / dustVelocity; + dustVelocityX *= dustVelocity; + dustVelocityY *= dustVelocity; + int dust = Dust.NewDust(new Vector2(dustPositionX, dustPositionY), scale, scale, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); + Main.dust[dust].noGravity = true; + Main.dust[dust].position.X = NPC.Center.X; + Main.dust[dust].position.Y = NPC.Center.Y; + Main.dust[dust].position.X += Main.rand.Next(-10, 11); + Main.dust[dust].position.Y += Main.rand.Next(-10, 11); + Main.dust[dust].velocity.X = dustVelocityX; + Main.dust[dust].velocity.Y = dustVelocityY; + dustAmtSpawned++; + } + } + } + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + // Target variable + Player player = Main.player[NPC.target]; + + float enrageScale = bossRush ? 1f : 0f; + if (Main.IsItDay() || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + // Rotation + Vector2 npcCenter = new Vector2(NPC.Center.X, NPC.position.Y + NPC.height - 59f); + Vector2 lookAt = new Vector2(player.position.X - (player.width / 2), player.position.Y - (player.height / 2)); + Vector2 rotationVector = npcCenter - lookAt; + + // Boss Rush predictive charge rotation + if (NPC.ai[1] == 4f && phase4 && bossRush) + { + // Velocity + float chargeVelocity = 30f; + chargeVelocity += 5f * enrageScale; + lookAt += Main.player[NPC.target].velocity * 20f; + rotationVector = Vector2.Normalize(npcCenter - lookAt) * chargeVelocity; + } + + float rotation = (float)Math.Atan2(rotationVector.Y, rotationVector.X) + MathHelper.PiOver2; + if (rotation < 0f) + rotation += MathHelper.TwoPi; + else if (rotation > MathHelper.TwoPi) + rotation -= MathHelper.TwoPi; + + float rotationAmt = 0.1f; + if (NPC.rotation < rotation) + { + if ((rotation - NPC.rotation) > MathHelper.Pi) + NPC.rotation -= rotationAmt; + else + NPC.rotation += rotationAmt; + } + else if (NPC.rotation > rotation) + { + if ((NPC.rotation - rotation) > MathHelper.Pi) + NPC.rotation += rotationAmt; + else + NPC.rotation -= rotationAmt; + } + + if (NPC.rotation > rotation - rotationAmt && NPC.rotation < rotation + rotationAmt) + NPC.rotation = rotation; + if (NPC.rotation < 0f) + NPC.rotation += MathHelper.TwoPi; + else if (NPC.rotation > MathHelper.TwoPi) + NPC.rotation -= MathHelper.TwoPi; + if (NPC.rotation > rotation - rotationAmt && NPC.rotation < rotation + rotationAmt) + NPC.rotation = rotation; + + // Despawn + if (!player.active || player.dead) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + if (!player.active || player.dead) + { + if (SoundEngine.TryGetActiveSound(BulletHellWarnSlot, out var warningSound) && warningSound.IsPlaying) + warningSound.Stop(); + + if (NPC.velocity.Y > 3f) + NPC.velocity.Y = 3f; + NPC.velocity.Y -= 0.1f; + if (NPC.velocity.Y < -12f) + NPC.velocity.Y = -12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + if (NPC.ai[1] != 0f) + { + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + NPC.alpha = 0; + NPC.netUpdate = true; + } + return; + } + } + else if (NPC.timeLeft < 1800) + NPC.timeLeft = 1800; + + // Distance from destination where Cal Clone stops moving + float movementDistanceGateValue = 100f; + + // How fast Cal Clone moves to the destination + float baseVelocity = (expertMode ? 10f : 8.5f) * (NPC.ai[1] == 4f ? 1.4f : 1f); + float baseAcceleration = (expertMode ? 0.18f : 0.155f) * (NPC.ai[1] == 4f ? 1.4f : 1f); + baseVelocity += 4f * enrageScale; + baseAcceleration += 0.1f * enrageScale; + if (revenge) + { + baseVelocity += 1.5f * (1f - lifeRatio); + baseAcceleration += 0.03f * (1f - lifeRatio); + } + if (death) + { + baseVelocity += 1.5f * (1f - lifeRatio); + baseAcceleration += 0.03f * (1f - lifeRatio); + } + if (Main.getGoodWorld) + { + baseVelocity *= 1.15f; + baseAcceleration *= 1.15f; + } + + // What side Cal Clone should be on, relative to the target + int xPos = 1; + if (NPC.Center.X < player.Center.X) + xPos = -1; + + // How far Cal Clone should be from the target + float averageDistance = 500f; + float chargeDistance = phase4 ? 300f : 400f; + + // This is where Cal Clone should be + Vector2 destination = (calamityGlobalNPC.newAI[2] > 0f || NPC.ai[1] == 0f) ? new Vector2(player.Center.X, player.Center.Y - averageDistance) : + NPC.ai[1] == 1f ? new Vector2(player.Center.X + averageDistance * xPos, player.Center.Y) : + new Vector2(player.Center.X + chargeDistance * xPos, player.Center.Y); + + // Add some random distance to the destination after certain attacks + if (NPC.localAI[0] == 1f) + { + NPC.localAI[0] = 0f; + NPC.localAI[2] = Main.rand.Next(-50, 51); + NPC.localAI[3] = Main.rand.Next(-300, 301); + NPC.netUpdate = true; + } + + // Add a bit of randomness to the destination + if (death) + { + destination.X += NPC.ai[1] == 0f ? NPC.localAI[3] : NPC.localAI[2]; + destination.Y += NPC.ai[1] == 0f ? NPC.localAI[2] : NPC.localAI[3]; + } + + // How far Cal Clone is from where she's supposed to be + Vector2 distanceFromDestination = destination - NPC.Center; + + // Movement + if (NPC.ai[1] == 0f || NPC.ai[1] == 1f || NPC.ai[1] == 4f || calamityGlobalNPC.newAI[2] > 0f) + CalamityUtils.SmoothMovement(NPC, movementDistanceGateValue, distanceFromDestination, baseVelocity, baseAcceleration, true); + + // Bullet hell phase + if (calamityGlobalNPC.newAI[2] > 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (calamityGlobalNPC.newAI[3] < 900f) + { + calamityGlobalNPC.newAI[3] += 1f; + NPC.dontTakeDamage = true; + NPC.alpha = 255; + + float rotX = player.Center.X - NPC.Center.X; + float rotY = player.Center.Y - NPC.Center.Y; + NPC.rotation = (float)Math.Atan2(rotY, rotX) - MathHelper.PiOver2; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (calamityGlobalNPC.newAI[2] == 2f) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + if (Main.zenithWorld) + type = ModContent.ProjectileType(); + + float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; + float projSpeed = bossRush ? 6.25f : 5f; + if (calamityGlobalNPC.newAI[3] <= 300f) + { + if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from top + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer); + } + else if (calamityGlobalNPC.newAI[3] <= 600f && calamityGlobalNPC.newAI[3] > 300f) + { + if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from right + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -projSpeed, 0f, type, damage, 0f, Main.myPlayer); + } + else if (calamityGlobalNPC.newAI[3] > 600f) + { + if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from top + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer); + } + } + } + + NPC.ai[0] += 1f; + float hellblastGateValue = (expertMode ? 12f : 16f) - enrageScale; + if (NPC.ai[0] >= hellblastGateValue) + { + NPC.ai[0] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float projSpeed = bossRush ? 4.5f : 4f; + // Blasts aimed directly at the player's horizontal position, does not spawn during the second bullet hell + if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f && calamityGlobalNPC.newAI[2] != 2f) + { + float distance = Main.rand.NextBool() ? -1000f : 1000f; + float velocity = distance == -1000f ? projSpeed : -projSpeed; + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + + if (calamityGlobalNPC.newAI[3] < 300f) // Blasts from above + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + else if (calamityGlobalNPC.newAI[3] < 600f) // Blasts from left and right + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 0.5f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 0.5f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + else // Blasts from above, left, and right + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed - 1f, type, damage, 0f, Main.myPlayer, 2f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 1f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 1f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + } + } + + if (calamityGlobalNPC.newAI[3] == 900f - 360f) + BulletHellWarnSlot = SoundEngine.PlaySound(CalamitasClone.BulletHellWarning, player.Center); + if (calamityGlobalNPC.newAI[3] > 900f - 360f) + { + if (SoundEngine.TryGetActiveSound(BulletHellWarnSlot, out var warningSound) && warningSound.IsPlaying) + warningSound.Position = player.Center; + } + } + else + { + NPC.ai[0] = 0f; + NPC.ai[3] = 0f; + NPC.localAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + calamityGlobalNPC.newAI[3] = 0f; + SoundEngine.PlaySound(CalamitasClone.BulletHellEnd, player.Center); + + // Prevent bullshit charge hits when second bullet hell ends. + if (phase4) + { + NPC.ai[1] = 4f; + NPC.ai[2] = -105f; + NPC.TargetClosest(); + } + else + { + if (death) + { + int AIState = Main.rand.Next(3); + switch (AIState) + { + case 0: + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + break; + case 1: + NPC.ai[1] = 1f; + NPC.ai[2] = 0f; + break; + case 2: + NPC.ai[1] = 4f; + NPC.ai[2] = -105f; + NPC.TargetClosest(); + break; + } + } + else + { + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + if (death) + NPC.localAI[0] = 1f; + } + + NPC.netUpdate = true; + + for (int x = 0; x < Main.maxProjectiles; x++) + { + Projectile projectile = Main.projectile[x]; + if (projectile.active) + { + if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) + { + if (projectile.timeLeft > 60) + projectile.timeLeft = 60; + } + else if (projectile.type == ModContent.ProjectileType()) + { + projectile.ai[2] = 1f; + + if (projectile.timeLeft > 60) + projectile.timeLeft = 60; + } + } + } + } + + return; + } + else if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) + { + if (calamityGlobalNPC.newAI[3] < 900f) + calamityGlobalNPC.newAI[3] += 1f; + else + calamityGlobalNPC.newAI[3] = 0f; + + NPC.ai[0] += 1f; + float hellblastGateValue = 30f - enrageScale; + if (NPC.ai[0] >= hellblastGateValue) + { + NPC.ai[0] = 0f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float projSpeed = bossRush ? 5f : 4f; + if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f) + { + float distance = Main.rand.NextBool() ? -1000f : 1000f; + float velocity = distance == -1000f ? projSpeed : -projSpeed; + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + + if (calamityGlobalNPC.newAI[3] < 300f) // Blasts from above + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + else if (calamityGlobalNPC.newAI[3] < 600f) // Blasts from left and right + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 0.5f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 0.5f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + else // Blasts from above, left, and right + { + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed - 1f, type, damage, 0f, Main.myPlayer, 2f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 1f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 1f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); + } + } + } + } + + NPC.alpha = NPC.dontTakeDamage ? 255 : 0; + + // Float above target and fire hellfireballs + if (NPC.ai[1] == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.ai[2] += 1f; + float phaseTimer = 400f - (death ? 120f * (1f - lifeRatio) : 0f); + if (NPC.ai[2] >= phaseTimer || phase4) + { + if (death && !phase4 && Main.rand.NextBool() && !brotherAlive) + NPC.ai[1] = 4f; + else + NPC.ai[1] = 1f; + + NPC.ai[2] = 0f; + if (death) + NPC.localAI[0] = 1f; + + NPC.netUpdate = true; + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.localAI[1] += 1f; + if (!brotherAlive) + { + if (expertMode) + NPC.localAI[1] += death ? 2f * (1f - lifeRatio) : 1f - lifeRatio; + if (revenge) + NPC.localAI[1] += 0.5f; + } + + if (NPC.localAI[1] >= (brotherAlive ? 180f : 120f)) + { + NPC.localAI[1] = 0f; + SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.HellfireballSound, NPC.Center); + + float projectileVelocity = expertMode ? 14f : 12.5f; + projectileVelocity += 3f * enrageScale; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + bool shootPredictiveShot = CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(); + Vector2 predictionVector = shootPredictiveShot ? player.velocity * 20f : Vector2.Zero; + Vector2 fireballVelocity = Vector2.Normalize(player.Center + predictionVector - NPC.Center) * projectileVelocity; + Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f; + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); + Main.projectile[proj].netUpdate = true; + } + } + } + + // Float to the side of the target and fire + else if (NPC.ai[1] == 1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.localAI[1] += 1f; + if (!brotherAlive) + { + if (revenge) + NPC.localAI[1] += 0.5f; + if (expertMode) + NPC.localAI[1] += 0.5f; + } + + if (NPC.localAI[1] >= (brotherAlive ? 75f : 50f) && Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) + { + NPC.localAI[1] = 0f; + + float projectileVelocity = expertMode ? 12.5f : 11f; + projectileVelocity += 3f * enrageScale; + int type = brotherAlive ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 fireballVelocity = Vector2.Normalize(player.Center - NPC.Center) * projectileVelocity; + Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f; + + if (!Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) + { + type = ModContent.ProjectileType(); + damage = NPC.GetProjectileDamage(type); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); + } + else + { + float ai0 = type == ModContent.ProjectileType() ? 1f : player.position.X; + float ai1 = type == ModContent.ProjectileType() ? 0f : player.position.Y; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, ai0, ai1); + } + } + } + + NPC.ai[2] += 1f; + float phaseTimer = 240f - (death ? 60f * (1f - lifeRatio) : 0f); + if (NPC.ai[2] >= phaseTimer || phase4) + { + if (death && !phase4 && Main.rand.NextBool() && !brotherAlive) + NPC.ai[1] = 0f; + else + NPC.ai[1] = !brotherAlive && phase2 && revenge ? 4f : 0f; + + NPC.ai[2] = 0f; + if (death) + NPC.localAI[0] = 1f; + + NPC.netUpdate = true; + } + } + else if (NPC.ai[1] == 2f) + { + // Set damage + NPC.damage = NPC.defDamage; + SoundEngine.PlaySound(CalamitasClone.ChargeSound, NPC.Center); + NPC.rotation = rotation; + + float chargeVelocity = phase4 ? 30f : death ? 28f : 25f; + chargeVelocity += 5f * enrageScale; + + Vector2 vector = Vector2.Normalize(player.Center + (phase4 && bossRush ? player.velocity * 20f : Vector2.Zero) - NPC.Center); + NPC.velocity = vector * chargeVelocity; + + NPC.ai[1] = 3f; + NPC.netUpdate = true; + } + else if (NPC.ai[1] == 3f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.ai[2] += 1f; + + float chargeTime = phase4 ? 35f : death ? 40f : 45f; + if (NPC.ai[2] >= chargeTime) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.velocity *= 0.9f; + if (NPC.velocity.X > -0.1 && NPC.velocity.X < 0.1) + NPC.velocity.X = 0f; + if (NPC.velocity.Y > -0.1 && NPC.velocity.Y < 0.1) + NPC.velocity.Y = 0f; + } + else + { + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) - MathHelper.PiOver2; + + // Leave behind slow hellblasts in Death Mode + if (Main.netMode != NetmodeID.MultiplayerClient && death && phase3 && NPC.ai[2] % (phase4 ? 6f : 10f) == 0f) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 fireballVelocity = CalamityWorld.LegendaryMode ? Main.rand.NextVector2CircularEdge(0.02f, 0.02f) : NPC.velocity * 0.01f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, fireballVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); + } + } + + if (NPC.ai[2] >= chargeTime + 10f) + { + if (!phase4) + NPC.ai[3] += 1f; + + NPC.ai[2] = 0f; + + NPC.rotation = rotation; + NPC.netUpdate = true; + + if (NPC.ai[3] >= 2f) + { + NPC.TargetClosest(); + NPC.ai[1] = 0f; + NPC.ai[3] = 0f; + return; + } + + NPC.ai[1] = 4f; + } + } + else + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= (phase4 ? 15f : 30f)) + { + NPC.ai[1] = 2f; + NPC.ai[2] = 0f; + if (death) + NPC.localAI[0] = 1f; + + NPC.netUpdate = true; + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index bec5c00aa9..a5cc956364 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -4,11 +4,12 @@ using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Weapons.Ranged; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; +using System; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -109,7 +110,337 @@ namespace CalamityMod.NPCs.CalClone public override void AI() { - CalamitasCloneAI.VanillaCataclysmAI(NPC, Mod); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + if (CalamityGlobalNPC.calamitas < 0 || !Main.npc[CalamityGlobalNPC.calamitas].active) + { + if (NPC.alpha < 255) + { + NPC.velocity *= 0.9f; + + NPC.alpha += 2; + if (NPC.alpha > 255) + NPC.alpha = 255; + + int dustAmount = (int)Math.Round(MathHelper.Lerp(1f, 5f, (255 - NPC.alpha) / 255f)); + for (int i = 0; i < dustAmount; i++) + { + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.LifeDrain, 0f, -1f, 90, default, Main.rand.NextFloat(0.5f, 2f)); + Main.dust[dust].noGravity = true; + Main.dust[dust].fadeIn = 1f; + } + } + else + NPC.active = false; + + NPC.active = false; + return; + } + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + CalamityGlobalNPC.cataclysm = NPC.whoAmI; + + // Emit light + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1f, 0f, 0f); + + bool bossRush = BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool expertMode = Main.expertMode || bossRush; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + float enrageScale = bossRush ? 1f : 0f; + if (Main.IsItDay() || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + float calCloneBroPlayerXDist = NPC.position.X + (NPC.width / 2) - player.position.X - (player.width / 2); + float calCloneBroPlayerYDist = NPC.position.Y + NPC.height - 59f - player.position.Y - (player.height / 2); + float calCloneBroRotation = (float)Math.Atan2(calCloneBroPlayerYDist, calCloneBroPlayerXDist) + MathHelper.PiOver2; + if (calCloneBroRotation < 0f) + calCloneBroRotation += MathHelper.TwoPi; + else if (calCloneBroRotation > MathHelper.TwoPi) + calCloneBroRotation -= MathHelper.TwoPi; + + float calCloneBroRotationSpeed = 0.15f; + if (NPC.rotation < calCloneBroRotation) + { + if ((calCloneBroRotation - NPC.rotation) > MathHelper.Pi) + NPC.rotation -= calCloneBroRotationSpeed; + else + NPC.rotation += calCloneBroRotationSpeed; + } + else if (NPC.rotation > calCloneBroRotation) + { + if ((NPC.rotation - calCloneBroRotation) > MathHelper.Pi) + NPC.rotation += calCloneBroRotationSpeed; + else + NPC.rotation -= calCloneBroRotationSpeed; + } + + if (NPC.rotation > calCloneBroRotation - calCloneBroRotationSpeed && NPC.rotation < calCloneBroRotation + calCloneBroRotationSpeed) + NPC.rotation = calCloneBroRotation; + if (NPC.rotation < 0f) + NPC.rotation += MathHelper.TwoPi; + else if (NPC.rotation > MathHelper.TwoPi) + NPC.rotation -= MathHelper.TwoPi; + if (NPC.rotation > calCloneBroRotation - calCloneBroRotationSpeed && NPC.rotation < calCloneBroRotation + calCloneBroRotationSpeed) + NPC.rotation = calCloneBroRotation; + + if (!player.active || player.dead) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + if (!player.active || player.dead) + { + if (NPC.velocity.Y > 3f) + NPC.velocity.Y = 3f; + NPC.velocity.Y -= 0.1f; + if (NPC.velocity.Y < -12f) + NPC.velocity.Y = -12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + if (NPC.ai[1] != 0f) + { + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.netUpdate = true; + } + + return; + } + } + + if (NPC.ai[1] == 0f) + { + // Avoid cheap bullshit + NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); + + float calCloneBroProjAttackMaxSpeed = 5f; + float calCloneBroProjAttackAccel = 0.1f; + calCloneBroProjAttackMaxSpeed += 2f * enrageScale; + calCloneBroProjAttackAccel += 0.06f * enrageScale; + + if (Main.getGoodWorld) + { + calCloneBroProjAttackMaxSpeed *= 1.15f; + calCloneBroProjAttackAccel *= 1.15f; + } + + int calCloneBroProjAttackDirection = 1; + if (NPC.position.X + (NPC.width / 2) < player.position.X + player.width) + calCloneBroProjAttackDirection = -1; + + Vector2 calCloneBroProjLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + float calCloneBroProjTargetX = player.position.X + (player.width / 2) + (calCloneBroProjAttackDirection * 180) - calCloneBroProjLocation.X; + float calCloneBroProjTargetY = player.position.Y + (player.height / 2) - calCloneBroProjLocation.Y; + float calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); + + if (expertMode) + { + if (calCloneBroProjTargetDist > 300f) + calCloneBroProjAttackMaxSpeed += 0.5f; + if (calCloneBroProjTargetDist > 400f) + calCloneBroProjAttackMaxSpeed += 0.5f; + if (calCloneBroProjTargetDist > 500f) + calCloneBroProjAttackMaxSpeed += 0.55f; + if (calCloneBroProjTargetDist > 600f) + calCloneBroProjAttackMaxSpeed += 0.55f; + if (calCloneBroProjTargetDist > 700f) + calCloneBroProjAttackMaxSpeed += 0.6f; + if (calCloneBroProjTargetDist > 800f) + calCloneBroProjAttackMaxSpeed += 0.6f; + } + + calCloneBroProjTargetDist = calCloneBroProjAttackMaxSpeed / calCloneBroProjTargetDist; + calCloneBroProjTargetX *= calCloneBroProjTargetDist; + calCloneBroProjTargetY *= calCloneBroProjTargetDist; + + if (NPC.velocity.X < calCloneBroProjTargetX) + { + NPC.velocity.X += calCloneBroProjAttackAccel; + if (NPC.velocity.X < 0f && calCloneBroProjTargetX > 0f) + NPC.velocity.X += calCloneBroProjAttackAccel; + } + else if (NPC.velocity.X > calCloneBroProjTargetX) + { + NPC.velocity.X -= calCloneBroProjAttackAccel; + if (NPC.velocity.X > 0f && calCloneBroProjTargetX < 0f) + NPC.velocity.X -= calCloneBroProjAttackAccel; + } + if (NPC.velocity.Y < calCloneBroProjTargetY) + { + NPC.velocity.Y += calCloneBroProjAttackAccel; + if (NPC.velocity.Y < 0f && calCloneBroProjTargetY > 0f) + NPC.velocity.Y += calCloneBroProjAttackAccel; + } + else if (NPC.velocity.Y > calCloneBroProjTargetY) + { + NPC.velocity.Y -= calCloneBroProjAttackAccel; + if (NPC.velocity.Y > 0f && calCloneBroProjTargetY < 0f) + NPC.velocity.Y -= calCloneBroProjAttackAccel; + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= (240f - (death ? 120f * (1f - lifeRatio) : 0f))) + { + NPC.ai[1] = 1f; + NPC.ai[2] = 0f; + NPC.target = 255; + NPC.netUpdate = true; + } + + bool fireDelay = NPC.ai[2] > 120f || NPC.life < NPC.lifeMax * 0.9; + if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height) && fireDelay) + { + if (NPC.localAI[2] == 0f) + SoundEngine.PlaySound(Cataclysm.FlamethrowerStart, NPC.Center); + + NPC.localAI[2] += 1f; + if (NPC.localAI[2] > 30f) + { + NPC.localAI[2] = 1f; + SoundEngine.PlaySound(Cataclysm.FlamethrowerLoop, NPC.Center); + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.localAI[1] += 3f; + if (revenge) + NPC.localAI[1] += 1f; + + if (NPC.localAI[1] > 12f) + { + NPC.localAI[1] = 0f; + float calCloneBroProjSpeed = NPC.AnyNPCs(ModContent.NPCType()) ? 4f : 6f; + calCloneBroProjSpeed += enrageScale; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + calCloneBroProjLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + calCloneBroProjTargetX = player.position.X + (player.width / 2) - calCloneBroProjLocation.X; + calCloneBroProjTargetY = player.position.Y + (player.height / 2) - calCloneBroProjLocation.Y; + calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); + calCloneBroProjTargetDist = calCloneBroProjSpeed / calCloneBroProjTargetDist; + calCloneBroProjTargetX *= calCloneBroProjTargetDist; + calCloneBroProjTargetY *= calCloneBroProjTargetDist; + calCloneBroProjTargetY += NPC.velocity.Y * 0.5f; + calCloneBroProjTargetX += NPC.velocity.X * 0.5f; + calCloneBroProjLocation.X -= calCloneBroProjTargetX; + calCloneBroProjLocation.Y -= calCloneBroProjTargetY; + Projectile.NewProjectile(NPC.GetSource_FromAI(), calCloneBroProjLocation.X, calCloneBroProjLocation.Y, calCloneBroProjTargetX, calCloneBroProjTargetY, type, damage, 0f, Main.myPlayer, 0f, 0f); + } + } + } + } + else + { + if (NPC.ai[1] == 1f) + { + // Set damage + NPC.damage = NPC.defDamage; + + SoundEngine.PlaySound(SoundID.Roar, NPC.Center); + NPC.rotation = calCloneBroRotation; + + float calCloneBroChargeSpeed = 14f + (death ? 4f * (1f - lifeRatio) : 0f); + calCloneBroChargeSpeed += 3f * enrageScale; + if (expertMode) + calCloneBroChargeSpeed += 2f; + if (revenge) + calCloneBroChargeSpeed += 2f; + if (Main.getGoodWorld) + calCloneBroChargeSpeed *= 1.25f; + + Vector2 calCloneBroChargeCenter = NPC.Center; + float calCloneBroChargeTargetXDist = player.Center.X - calCloneBroChargeCenter.X; + float calCloneBroChargeTargetYDist = player.Center.Y - calCloneBroChargeCenter.Y; + float calCloneBroChargeTargetDistance = (float)Math.Sqrt(calCloneBroChargeTargetXDist * calCloneBroChargeTargetXDist + calCloneBroChargeTargetYDist * calCloneBroChargeTargetYDist); + calCloneBroChargeTargetDistance = calCloneBroChargeSpeed / calCloneBroChargeTargetDistance; + NPC.velocity.X = calCloneBroChargeTargetXDist * calCloneBroChargeTargetDistance; + NPC.velocity.Y = calCloneBroChargeTargetYDist * calCloneBroChargeTargetDistance; + NPC.ai[1] = 2f; + + if (Main.zenithWorld) + { + SoundEngine.PlaySound(SupremeCalamitas.SupremeCalamitas.BrimstoneShotSound, NPC.Center); + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(ModContent.ProjectileType()); + if (bossRush) + damage /= 2; + + int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4; + float radians = MathHelper.TwoPi / totalProjectiles; + float velocity = 5f; + Vector2 spinningPoint = new Vector2(0f, -velocity); + float projectileVelocityToPass = velocity * 3f; + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileVelocityToPass); + } + + for (int i = 0; i < 6; i++) + Dust.NewDust(NPC.position + NPC.velocity, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f); + } + return; + } + + if (NPC.ai[1] == 2f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.ai[2] += 1f + (death ? 0.5f * (1f - lifeRatio) : 0f); + if (expertMode) + NPC.ai[2] += 0.25f; + if (revenge) + NPC.ai[2] += 0.25f; + + if (NPC.ai[2] >= 75f) + { + // Avoid cheap bullshit + NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); + + NPC.velocity.X *= 0.93f; + NPC.velocity.Y *= 0.93f; + + if (NPC.velocity.X > -0.1 && NPC.velocity.X < 0.1) + NPC.velocity.X = 0f; + if (NPC.velocity.Y > -0.1 && NPC.velocity.Y < 0.1) + NPC.velocity.Y = 0f; + } + else + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) - MathHelper.PiOver2; + + if (NPC.ai[2] >= 105f) + { + NPC.ai[3] += 1f; + NPC.ai[2] = 0f; + NPC.target = 255; + NPC.rotation = calCloneBroRotation; + if (NPC.ai[3] >= 3f) + { + NPC.ai[1] = 0f; + NPC.ai[3] = 0f; + return; + } + NPC.ai[1] = 1f; + } + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index dcae21a2da..73e07ab8e3 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -4,12 +4,14 @@ using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Placeables.Furniture.Trophies; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; +using System; using Terraria; +using Terraria.Audio; using Terraria.GameContent; using Terraria.GameContent.Bestiary; using Terraria.GameContent.ItemDropRules; @@ -103,7 +105,332 @@ namespace CalamityMod.NPCs.CalClone public override void AI() { - CalamitasCloneAI.VanillaCatastropheAI(NPC, Mod); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + if (CalamityGlobalNPC.calamitas < 0 || !Main.npc[CalamityGlobalNPC.calamitas].active) + { + if (NPC.alpha < 255) + { + NPC.velocity *= 0.9f; + + NPC.alpha += 2; + if (NPC.alpha > 255) + NPC.alpha = 255; + + int dustAmount = (int)Math.Round(MathHelper.Lerp(1f, 5f, (255 - NPC.alpha) / 255f)); + for (int i = 0; i < dustAmount; i++) + { + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.LifeDrain, 0f, -1f, 90, default, Main.rand.NextFloat(0.5f, 2f)); + Main.dust[dust].noGravity = true; + Main.dust[dust].fadeIn = 1f; + } + } + else + NPC.active = false; + + return; + } + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + CalamityGlobalNPC.catastrophe = NPC.whoAmI; + + // Emit light + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), 1f, 0f, 0f); + + bool bossRush = BossRushEvent.BossRushActive; + bool death = CalamityWorld.death || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool expertMode = Main.expertMode || bossRush; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + float enrageScale = bossRush ? 1f : 0f; + if (Main.IsItDay() || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + float calCloneBroPlayerXDist = NPC.position.X + (NPC.width / 2) - player.position.X - (player.width / 2); + float calCloneBroPlayerYDist = NPC.position.Y + NPC.height - 59f - player.position.Y - (player.height / 2); + float calCloneBroRotation = (float)Math.Atan2(calCloneBroPlayerYDist, calCloneBroPlayerXDist) + MathHelper.PiOver2; + if (calCloneBroRotation < 0f) + calCloneBroRotation += MathHelper.TwoPi; + else if (calCloneBroRotation > MathHelper.TwoPi) + calCloneBroRotation -= MathHelper.TwoPi; + + float calCloneBroRotationSpeed = 0.15f; + if (NPC.rotation < calCloneBroRotation) + { + if ((calCloneBroRotation - NPC.rotation) > MathHelper.Pi) + NPC.rotation -= calCloneBroRotationSpeed; + else + NPC.rotation += calCloneBroRotationSpeed; + } + else if (NPC.rotation > calCloneBroRotation) + { + if ((NPC.rotation - calCloneBroRotation) > MathHelper.Pi) + NPC.rotation += calCloneBroRotationSpeed; + else + NPC.rotation -= calCloneBroRotationSpeed; + } + + if (NPC.rotation > calCloneBroRotation - calCloneBroRotationSpeed && NPC.rotation < calCloneBroRotation + calCloneBroRotationSpeed) + NPC.rotation = calCloneBroRotation; + if (NPC.rotation < 0f) + NPC.rotation += MathHelper.TwoPi; + else if (NPC.rotation > MathHelper.TwoPi) + NPC.rotation -= MathHelper.TwoPi; + if (NPC.rotation > calCloneBroRotation - calCloneBroRotationSpeed && NPC.rotation < calCloneBroRotation + calCloneBroRotationSpeed) + NPC.rotation = calCloneBroRotation; + + if (!player.active || player.dead) + { + NPC.TargetClosest(false); + player = Main.player[NPC.target]; + if (!player.active || player.dead) + { + if (NPC.velocity.Y > 3f) + NPC.velocity.Y = 3f; + NPC.velocity.Y -= 0.1f; + if (NPC.velocity.Y < -12f) + NPC.velocity.Y = -12f; + + if (NPC.timeLeft > 60) + NPC.timeLeft = 60; + + if (NPC.ai[1] != 0f) + { + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.netUpdate = true; + } + + return; + } + } + + if (NPC.ai[1] == 0f) + { + // Avoid cheap bullshit + NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); + + float calCloneBroProjAttackMaxSpeed = 4.5f; + float calCloneBroProjAttackAccel = 0.2f; + calCloneBroProjAttackMaxSpeed += 2f * enrageScale; + calCloneBroProjAttackAccel += 0.1f * enrageScale; + + if (Main.getGoodWorld) + { + calCloneBroProjAttackMaxSpeed *= 1.15f; + calCloneBroProjAttackAccel *= 1.15f; + } + + int calCloneBroProjAttackDirection = 1; + if (NPC.Center.X < player.Center.X) + calCloneBroProjAttackDirection = -1; + + Vector2 calCloneBroProjLocation = NPC.Center; + float calCloneBroProjTargetX = player.Center.X + (calCloneBroProjAttackDirection * 180) - calCloneBroProjLocation.X; + float calCloneBroProjTargetY = player.Center.Y - calCloneBroProjLocation.Y; + float calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); + + if (expertMode) + { + if (calCloneBroProjTargetDist > 300f) + calCloneBroProjAttackMaxSpeed += 0.5f; + if (calCloneBroProjTargetDist > 400f) + calCloneBroProjAttackMaxSpeed += 0.5f; + if (calCloneBroProjTargetDist > 500f) + calCloneBroProjAttackMaxSpeed += 0.55f; + if (calCloneBroProjTargetDist > 600f) + calCloneBroProjAttackMaxSpeed += 0.55f; + if (calCloneBroProjTargetDist > 700f) + calCloneBroProjAttackMaxSpeed += 0.6f; + if (calCloneBroProjTargetDist > 800f) + calCloneBroProjAttackMaxSpeed += 0.6f; + } + + calCloneBroProjTargetDist = calCloneBroProjAttackMaxSpeed / calCloneBroProjTargetDist; + calCloneBroProjTargetX *= calCloneBroProjTargetDist; + calCloneBroProjTargetY *= calCloneBroProjTargetDist; + + if (NPC.velocity.X < calCloneBroProjTargetX) + { + NPC.velocity.X += calCloneBroProjAttackAccel; + if (NPC.velocity.X < 0f && calCloneBroProjTargetX > 0f) + NPC.velocity.X += calCloneBroProjAttackAccel; + } + else if (NPC.velocity.X > calCloneBroProjTargetX) + { + NPC.velocity.X -= calCloneBroProjAttackAccel; + if (NPC.velocity.X > 0f && calCloneBroProjTargetX < 0f) + NPC.velocity.X -= calCloneBroProjAttackAccel; + } + if (NPC.velocity.Y < calCloneBroProjTargetY) + { + NPC.velocity.Y += calCloneBroProjAttackAccel; + if (NPC.velocity.Y < 0f && calCloneBroProjTargetY > 0f) + NPC.velocity.Y += calCloneBroProjAttackAccel; + } + else if (NPC.velocity.Y > calCloneBroProjTargetY) + { + NPC.velocity.Y -= calCloneBroProjAttackAccel; + if (NPC.velocity.Y > 0f && calCloneBroProjTargetY < 0f) + NPC.velocity.Y -= calCloneBroProjAttackAccel; + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= (180f - (death ? 90f * (1f - lifeRatio) : 0f))) + { + NPC.ai[1] = 1f; + NPC.ai[2] = 0f; + NPC.target = 255; + NPC.netUpdate = true; + } + + bool fireDelay = NPC.ai[2] > 120f || lifeRatio < 0.9f; + if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height) && fireDelay) + { + NPC.localAI[2] += 1f; + if (NPC.localAI[2] > 36f) + { + NPC.localAI[2] = 0f; + SoundEngine.PlaySound(SoundID.Item34, NPC.Center); + } + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.localAI[1] += 1f; + if (revenge) + NPC.localAI[1] += 0.5f; + + if (NPC.localAI[1] > 50f) + { + NPC.localAI[1] = 0f; + float calCloneBroProjSpeed = death ? 14f : 12f; + calCloneBroProjSpeed += 3f * enrageScale; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + calCloneBroProjLocation = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + calCloneBroProjTargetX = player.position.X + (player.width / 2) - calCloneBroProjLocation.X; + calCloneBroProjTargetY = player.position.Y + (player.height / 2) - calCloneBroProjLocation.Y; + calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); + calCloneBroProjTargetDist = calCloneBroProjSpeed / calCloneBroProjTargetDist; + calCloneBroProjTargetX *= calCloneBroProjTargetDist; + calCloneBroProjTargetY *= calCloneBroProjTargetDist; + calCloneBroProjTargetY += NPC.velocity.Y * 0.5f; + calCloneBroProjTargetX += NPC.velocity.X * 0.5f; + calCloneBroProjLocation.X -= calCloneBroProjTargetX; + calCloneBroProjLocation.Y -= calCloneBroProjTargetY; + Projectile.NewProjectile(NPC.GetSource_FromAI(), calCloneBroProjLocation.X, calCloneBroProjLocation.Y, calCloneBroProjTargetX, calCloneBroProjTargetY, type, damage, 0f, Main.myPlayer, 0f, 0f); + } + } + } + } + else + { + if (NPC.ai[1] == 1f) + { + // Set damage + NPC.damage = NPC.defDamage; + + SoundEngine.PlaySound(SoundID.Roar, NPC.Center); + NPC.rotation = calCloneBroRotation; + + float calCloneBroChargeSpeed = (NPC.AnyNPCs(ModContent.NPCType()) ? 12f : 16f) + (death ? 4f * (1f - lifeRatio) : 0f); + calCloneBroChargeSpeed += 4f * enrageScale; + if (expertMode) + calCloneBroChargeSpeed += 2f; + if (revenge) + calCloneBroChargeSpeed += 2f; + if (Main.getGoodWorld) + calCloneBroChargeSpeed *= 1.25f; + + Vector2 calCloneBroChargeCenter = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); + float calCloneBroChargeTargetXDist = player.position.X + (player.width / 2) - calCloneBroChargeCenter.X; + float calCloneBroChargeTargetYDist = player.position.Y + (player.height / 2) - calCloneBroChargeCenter.Y; + float calCloneBroChargeTargetDistance = (float)Math.Sqrt(calCloneBroChargeTargetXDist * calCloneBroChargeTargetXDist + calCloneBroChargeTargetYDist * calCloneBroChargeTargetYDist); + calCloneBroChargeTargetDistance = calCloneBroChargeSpeed / calCloneBroChargeTargetDistance; + NPC.velocity.X = calCloneBroChargeTargetXDist * calCloneBroChargeTargetDistance; + NPC.velocity.Y = calCloneBroChargeTargetYDist * calCloneBroChargeTargetDistance; + NPC.ai[1] = 2f; + + if (Main.zenithWorld) + { + SoundEngine.PlaySound(SupremeCalamitas.SupremeCalamitas.BrimstoneShotSound, NPC.Center); + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(ModContent.ProjectileType()); + if (bossRush) + damage /= 2; + + int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4; + float radians = MathHelper.TwoPi / totalProjectiles; + float velocity = 5f; + Vector2 spinningPoint = new Vector2(0f, -velocity); + float projectileVelocityToPass = velocity * 3f; + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileVelocityToPass); + } + + for (int i = 0; i < 6; i++) + Dust.NewDust(NPC.position + NPC.velocity, NPC.width, NPC.height, (int)CalamityDusts.Brimstone, 0f, 0f); + } + return; + } + + if (NPC.ai[1] == 2f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.ai[2] += 1f + (death ? 0.5f * (1f - lifeRatio) : 0f); + if (expertMode) + NPC.ai[2] += 0.25f; + if (revenge) + NPC.ai[2] += 0.25f; + + if (NPC.ai[2] >= 60f) //50 + { + // Avoid cheap bullshit + NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); + + NPC.velocity.X *= 0.93f; + NPC.velocity.Y *= 0.93f; + + if (NPC.velocity.X > -0.1 && NPC.velocity.X < 0.1) + NPC.velocity.X = 0f; + if (NPC.velocity.Y > -0.1 && NPC.velocity.Y < 0.1) + NPC.velocity.Y = 0f; + } + else + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) - MathHelper.PiOver2; + + if (NPC.ai[2] >= 90f) //80 + { + NPC.ai[3] += 1f; + NPC.ai[2] = 0f; + NPC.rotation = calCloneBroRotation; + if (NPC.ai[3] >= 4f) + { + NPC.ai[1] = 0f; + NPC.ai[3] = 0f; + return; + } + NPC.ai[1] = 1f; + } + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs deleted file mode 100644 index e7e3f546bb..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumAureusAI.cs +++ /dev/null @@ -1,969 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; -using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; -using CalamityMod.NPCs.VanillaNPCAIOverrides.RegularEnemies; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class AstrumAureusAI - { - public static void VanillaAstrumAureusAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - CalamityGlobalNPC.astrumAureus = npc.whoAmI; - - // Variables - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Phases - bool phase2 = lifeRatio < (revenge ? 0.85f : expertMode ? 0.8f : 0.75f); - bool phase3 = lifeRatio < (revenge ? 0.7f : expertMode ? 0.6f : 0.5f); - bool phase4 = lifeRatio < (revenge ? 0.5f : 0.4f) && expertMode; - bool phase5 = lifeRatio < 0.3f && revenge; - - // Exhaustion - bool exhausted = npc.ai[2] >= (phase3 ? 2f : 1f); - calamityGlobalNPC.DR = exhausted ? 0.2f : 0.4f; - npc.defense = exhausted ? npc.defDefense / 2 : npc.defDefense; - - // 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(); - - Player player = Main.player[npc.target]; - - // Don't fire projectiles and don't increment phase timers for 4 seconds after the teleport phase to avoid cheap bullshit - float noProjectileOrPhaseIncrementTime = 240f; - - bool dontAttack = npc.localAI[3] > 0f; - if (dontAttack) - { - npc.localAI[3] -= 1f; - if (npc.Distance(player.Center) < 240f) - npc.localAI[3] -= death ? 4f : expertMode ? 2f : 1f; - } - - float enrageScale = bossRush ? 1f : 0f; - if ((Main.IsItDay() && !player.Calamity().ZoneAstral) || bossRush) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 1f; - } - - float astralFlameBarrageTimerIncrement = 1f; - if (expertMode) - astralFlameBarrageTimerIncrement += death ? (float)Math.Round(3f * (1f - lifeRatio)) : (float)Math.Round(2f * (1f - lifeRatio)); - - float walkingVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 6f : 5f; - walkingVelocity += 3f * enrageScale; - if (phase5) - walkingVelocity += 2f; - if (expertMode) - walkingVelocity += 1.5f * (1f - lifeRatio); - if (revenge) - walkingVelocity += Math.Abs(npc.Center.X - player.Center.X) * 0.0025f; - if (Main.getGoodWorld) - walkingVelocity *= 1.15f; - - float walkingProjectileVelocity = walkingVelocity * 0.8f; - - // Direction - npc.spriteDirection = (npc.direction > 0) ? 1 : -1; - - // Used to reduce Aureus' fall speed - bool reduceFallSpeed = npc.velocity.Y > 0f && Collision.SolidCollision(npc.position + Vector2.UnitY * 1.1f * npc.velocity.Y, npc.width, npc.height) && npc.ai[0] == 4f; - - // Despawn - bool despawnDistance = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; - if (!player.active || player.dead || despawnDistance) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - if (!player.active || player.dead || despawnDistance) - { - npc.noTileCollide = true; - - if (npc.velocity.Y < -3f) - npc.velocity.Y = -3f; - npc.velocity.Y += 0.1f; - if (npc.velocity.Y > 12f) - npc.velocity.Y = 12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - if (npc.ai[0] != 0f) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.localAI[2] = 0f; - npc.localAI[3] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.newAI[1] = 0f; - npc.netUpdate = true; - } - return; - } - } - else if (npc.timeLeft < 1800) - npc.timeLeft = 1800; - - bool geldonPhase1 = lifeRatio > 0.6f && lifeRatio <= 0.7f; - bool geldonPhase2 = lifeRatio <= 0.1f; - if (Main.zenithWorld && (geldonPhase1 || geldonPhase2)) - { - AstrumAureus.AstrumAureus astrumAureus = npc.ModNPC(); - astrumAureus.slimeProjCounter++; - if (astrumAureus.slimeProjCounter % 180 == 0) - { - SoundEngine.PlaySound(SoundID.Item33, npc.Center); // Intentionally keeping the old laser sound in GFB - - if (astrumAureus.slimePhase == 1) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6; - float radians = MathHelper.TwoPi / totalProjectiles; - float velocity = 10f; - Vector2 spinningPoint = new Vector2(0f, -velocity); - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 1f); - } - } - astrumAureus.slimePhase = 0; - } - else - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float aureusLaserSpeed = 7f; - float aureusLaserTargetX = player.Center.X - npc.Center.X; - float aureusLaserTargetY = player.Center.Y - npc.Center.Y; - float aureusLaserTargetDist = (float)Math.Sqrt(aureusLaserTargetX * aureusLaserTargetX + aureusLaserTargetY * aureusLaserTargetY); - aureusLaserTargetDist = aureusLaserSpeed / aureusLaserTargetDist; - aureusLaserTargetX *= aureusLaserTargetDist; - aureusLaserTargetY *= aureusLaserTargetDist; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X, npc.Center.Y, aureusLaserTargetX, aureusLaserTargetY, type, damage, 0f, Main.myPlayer); - for (int i = 0; i < 4; i++) - { - Vector2 offset = new Vector2(Main.rand.Next(-6, 7), Main.rand.Next(-6, 7)); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X, npc.Center.Y, aureusLaserTargetX + offset.X, aureusLaserTargetY + offset.Y, type, damage, 0f, Main.myPlayer); - } - } - astrumAureus.slimePhase = 1; - } - } - RevengeanceAndDeathAI.BuffedMimicAI(npc, mod); - npc.noGravity = false; - npc.noTileCollide = false; - return; - } - else - { - npc.noGravity = true; - } - - // Emit light when not Idle - if (npc.ai[0] != 1f) - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1.3f, 0.5f, 0f); - - // Fire projectiles while walking, teleporting, or falling - if (npc.ai[0] == 2f || npc.ai[0] >= 5f) - { - if (!dontAttack) - npc.localAI[0] += npc.ai[0] == 2f ? 1f : astralFlameBarrageTimerIncrement; - - float astralFlameBarrageGateValue = phase4 ? 30f : 60f; - if (npc.localAI[0] >= astralFlameBarrageGateValue) - { - // Fire astral flames while teleporting - if (npc.ai[0] >= 5f && npc.ai[0] != 7) - { - npc.localAI[0] = 0f; - SoundEngine.PlaySound(AstrumAureus.AstrumAureus.FlameCrystalSound, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float velocity = death ? (8f + npc.localAI[2] * 0.025f) : 7f; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float spreadLimit = (phase4 ? 100f : 50f) + enrageScale * 50f; - float randomSpread = (Main.rand.NextFloat() - 0.5f) * spreadLimit; - Vector2 spawnVector = new Vector2(npc.Center.X, npc.Center.Y - 80f * npc.scale); - Vector2 destination = new Vector2(spawnVector.X + randomSpread, spawnVector.Y - 100f * npc.scale); - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, Vector2.Normalize(destination - spawnVector) * velocity, type, damage, 0f, Main.myPlayer); - } - } - } - - float laserBarrageGateValue = phase5 ? 160f : phase3 ? 120f : phase2 ? 80f : 60f; - if (npc.localAI[0] >= laserBarrageGateValue) - { - // Fire astral lasers while walking - if (npc.ai[0] == 2f) - { - npc.localAI[0] = 0f; - - SoundEngine.PlaySound(AstrumAureus.AstrumAureus.LaserSound, npc.Center); - - if (calamityGlobalNPC.newAI[2] == 0f) - { - calamityGlobalNPC.newAI[2] = 1f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int maxProjectiles = !phase2 ? (bossRush ? 5 : 3) : (bossRush ? 7 : 5); - int spread = !phase2 ? (bossRush ? 11 : 8) : (bossRush ? 12 : 10); - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 projectileVelocity = Vector2.Normalize(player.Center - npc.Center) * walkingProjectileVelocity; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < maxProjectiles; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, walkingProjectileVelocity * 2f); - } - - if (phase3) - { - float flameVelocity = walkingProjectileVelocity; - maxProjectiles = 2; - spread = 45; - - type = ModContent.ProjectileType(); - damage = npc.GetProjectileDamage(type); - projectileVelocity = Vector2.Normalize(player.Center - npc.Center) * flameVelocity; - rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < maxProjectiles; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer); - } - } - } - } - else - { - calamityGlobalNPC.newAI[2] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 19 : death ? 17 : 15); - int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20); - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int centralLaser = maxProjectiles / 2; - int[] lasersToNotFire = new int[6] { centralLaser - 3, centralLaser - 2, centralLaser - 1, centralLaser + 1, centralLaser + 2, centralLaser + 3 }; - Vector2 projectileVelocity = Vector2.Normalize(player.Center - npc.Center) * walkingProjectileVelocity; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < maxProjectiles; i++) - { - if (i != lasersToNotFire[0] && i != lasersToNotFire[1] && i != lasersToNotFire[2] && i != lasersToNotFire[3] && i != lasersToNotFire[4] && i != lasersToNotFire[5]) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, walkingProjectileVelocity * 2f); - } - } - } - } - } - } - } - else - npc.localAI[0] = 0f; - - // Start up - if (npc.ai[0] == 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.ai[0] = 1f; - npc.netUpdate = true; - CustomGravity(); - } - - // Idle - else if (npc.ai[0] == 1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Slow down - npc.velocity.X *= 0.8f; - - // Stay vulnerable for 3 seconds - npc.ai[1] += 1f; - if (npc.Distance(player.Center) < 240f) - npc.ai[1] += death ? 4f : expertMode ? 2f : 1f; - - if (npc.ai[1] >= 180f || bossRush) - { - // Set AI to random state and reset other AI arrays - npc.TargetClosest(); - switch (Main.rand.Next(phase3 ? 3 : 2)) - { - case 0: - npc.ai[0] = 2f; - break; - - case 1: - npc.ai[0] = 3f; - break; - - case 2: - npc.ai[0] = 5f; - break; - - default: - break; - } - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - // Stop colliding with tiles if entering walking phase - npc.noTileCollide = npc.ai[0] == 2f; - - npc.netUpdate = true; - } - else - CustomGravity(); - } - - // Walk - else if (npc.ai[0] == 2f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Set walking direction - if (Math.Abs(npc.Center.X - player.Center.X) < 200f * npc.scale) - { - npc.velocity.X *= 0.8f; - if (npc.velocity.X > -0.1 && npc.velocity.X < 0.1) - npc.velocity.X = 0f; - } - else - { - float playerLocation = npc.Center.X - player.Center.X; - npc.direction = playerLocation < 0 ? 1 : -1; - - if (npc.direction > 0) - npc.velocity.X = (npc.velocity.X * 20f + walkingVelocity) / 21f; - if (npc.direction < 0) - npc.velocity.X = (npc.velocity.X * 20f - walkingVelocity) / 21f; - } - - if (Collision.CanHit(npc.position, npc.width, npc.height, player.Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height) && player.position.Y <= npc.position.Y + npc.height && !npc.collideX) - { - CustomGravity(); - npc.noTileCollide = false; - } - else - { - npc.noTileCollide = true; - - // Walk through tiles if colliding with tiles and player is out of reach - int aureusHitboxWidth = 80; - int aureusHitboxHeight = 20; - Vector2 aureusHitboxTileCollideSize = new Vector2(npc.Center.X - (aureusHitboxWidth / 2), npc.position.Y + npc.height - aureusHitboxHeight); - - bool nearPlayerWalkingThroughTiles = false; - if (npc.position.X < player.position.X && npc.position.X + npc.width > player.position.X + player.width && npc.position.Y + npc.height < player.position.Y + player.height - 16f) - nearPlayerWalkingThroughTiles = true; - - if (nearPlayerWalkingThroughTiles) - { - npc.velocity.Y += 0.5f; - } - else if (Collision.SolidCollision(aureusHitboxTileCollideSize, aureusHitboxWidth, aureusHitboxHeight)) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y = 0f; - - if (npc.velocity.Y > -0.2) - npc.velocity.Y -= 0.025f; - else - npc.velocity.Y -= 0.2f; - - if (npc.velocity.Y < -4f) - npc.velocity.Y = -4f; - } - else - { - if (npc.velocity.Y < 0f) - npc.velocity.Y = 0f; - - if (npc.velocity.Y < 0.1) - npc.velocity.Y += 0.025f; - else - npc.velocity.Y += 0.5f; - } - } - - // Walk for a maximum of 6 seconds - if (!dontAttack) - { - npc.ai[1] += 1f; - if (npc.Distance(player.Center) < 240f) - npc.ai[1] += death ? 4f : expertMode ? 2f : 1f; - } - - if (npc.ai[1] >= ((bossRush ? 270f : 360f) - (death ? 90f * (1f - lifeRatio) : 0f))) - { - // Collide with tiles again - npc.noTileCollide = false; - - // Set AI to next phase (Jump) and reset other AI - npc.TargetClosest(); - npc.ai[0] = exhausted ? 1f : 3f; - npc.ai[1] = 0f; - npc.ai[2] += 1f; - npc.netUpdate = true; - } - - // Limit downward velocity - if (npc.velocity.Y > 10f) - npc.velocity.Y = 10f; - } - - // Jump - else if (npc.ai[0] == 3f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.noTileCollide = false; - - if (npc.velocity.Y == 0f) - { - // Slow down - npc.velocity.X *= 0.8f; - - // Half second delay before jumping - if (!dontAttack) - npc.ai[1] += 1f; - - if (npc.ai[1] >= 30f) - { - npc.ai[1] = -20f; - } - else if (npc.ai[1] == -1f) - { - // Set damage - npc.damage = npc.defDamage; - - // Set jump velocity, reset and set AI to next phase (Stomp) - float distanceFromPlayerOnXAxis = npc.Center.X - player.Center.X; - npc.direction = distanceFromPlayerOnXAxis < 0 ? 1 : -1; - calamityGlobalNPC.newAI[3] = npc.direction; - - // The limit for how much Aureus can multiply its jump velocity - float speedMultLimit = 1f; - - // Maxes out when the player is a full 2000 pixels away from or above Aureus - float multiplier = 1f / 2000f; - - // Increase Aureus jump velocity X if it's far enough away from the player - float distanceAwayFromTarget = Math.Abs(distanceFromPlayerOnXAxis); - float distanceGateValue = 400f; - bool increaseJumpVelocityX = distanceAwayFromTarget > distanceGateValue && expertMode; - if (increaseJumpVelocityX) - { - calamityGlobalNPC.newAI[0] = (distanceAwayFromTarget - distanceGateValue) * multiplier; - if (calamityGlobalNPC.newAI[0] > speedMultLimit) - calamityGlobalNPC.newAI[0] = speedMultLimit; - } - - // Increase Aureus jump velocity Y if it's far enough above the player - float distanceBelowTarget = npc.position.Y - (player.position.Y + 80f); - bool increaseJumpVelocityY = distanceBelowTarget > 0f && revenge; - if (increaseJumpVelocityY) - { - calamityGlobalNPC.newAI[1] = distanceBelowTarget * multiplier; - if (calamityGlobalNPC.newAI[1] > speedMultLimit) - calamityGlobalNPC.newAI[1] = speedMultLimit; - } - - float velocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 27f : 20f; - velocity += 6f * enrageScale; - if (expertMode) - velocity += death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio); - if (Main.getGoodWorld) - velocity *= 1.15f; - - npc.velocity = (new Vector2(player.Center.X, player.Center.Y - 500f) - npc.Center).SafeNormalize(Vector2.Zero) * velocity; - npc.velocity *= new Vector2(calamityGlobalNPC.newAI[0] + 1f, calamityGlobalNPC.newAI[1] + 1f); - - npc.noTileCollide = true; - - npc.ai[0] = 4f; - npc.ai[1] = 0f; - - SoundEngine.PlaySound(AstrumAureus.AstrumAureus.JumpSound, npc.Center); - - npc.netUpdate = true; - } - } - - // Don't run custom gravity when starting a jump - if (npc.ai[0] != 4f) - CustomGravity(); - } - - // Stomp - else if (npc.ai[0] == 4f) - { - if (npc.velocity.Y == 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Play stomp sound. Gotta specify the filepath to avoid confusion between the namespace and npc - SoundStyle soundToPlay = Main.zenithWorld ? NPCs.ExoMechs.Ares.AresGaussNuke.NukeExplosionSound : NPCs.AstrumAureus.AstrumAureus.StompSound; - SoundEngine.PlaySound(soundToPlay, npc.Center); - - if (Main.zenithWorld) - { - float screenShakePower = 16 * Utils.GetLerpValue(1300f, 0f, npc.Distance(Main.LocalPlayer.Center), true); - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < screenShakePower) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = screenShakePower; - } - - // Stomp and jump again, if stomped twice then reset and set AI to next phase (Teleport or Idle) - npc.TargetClosest(); - npc.localAI[1] += 1f; - float maxStompAmt = phase5 ? 5f : phase3 ? 2f : 3f; - if (npc.localAI[1] >= maxStompAmt) - { - npc.ai[0] = exhausted ? 1f : (phase3 ? 5f : 2f); - npc.localAI[1] = 0f; - npc.ai[2] += 1f; - npc.ai[3] = 0f; - npc.noTileCollide = false; - npc.netUpdate = true; - } - else - { - float playerLocation = npc.Center.X - player.Center.X; - npc.direction = playerLocation < 0 ? 1 : -1; - npc.ai[0] = 3f; - npc.ai[3] = 0f; - npc.netUpdate = true; - } - - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - - // Spawn dust for visual effect - for (int i = (int)npc.position.X - 20; i < (int)npc.position.X + npc.width + 40; i += 20) - { - for (int j = 0; j < 4; j++) - { - int stompDust = Dust.NewDust(new Vector2(npc.position.X - 20f, npc.position.Y + npc.height), npc.width + 20, 4, ModContent.DustType(), 0f, 0f, 100, default, 1.5f); - Main.dust[stompDust].velocity *= 0.2f; - } - } - - // Fire lasers or flames on stomp - SoundEngine.PlaySound(AstrumAureus.AstrumAureus.LaserSound, npc.Center); - - if (Main.zenithWorld) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = Main.rand.NextBool() ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int totalProjectiles = bossRush ? 14 : death ? 12 : revenge ? 10 : expertMode ? 8 : 6; - float radians = MathHelper.TwoPi / totalProjectiles; - float velocity = 10f; - Vector2 spinningPoint = new Vector2(0f, -velocity); - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 1f); - } - } - } - else if (calamityGlobalNPC.newAI[2] == 0f && phase2) - { - calamityGlobalNPC.newAI[2] = 1f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float flameVelocity = 6f; - int maxProjectiles = bossRush ? 4 : death ? 3 : 2; - int spread = bossRush ? 36 : death ? 28 : 20; - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 spawnVector = new Vector2(npc.Center.X, npc.Center.Y - 80f * npc.scale); - Vector2 destination = new Vector2(spawnVector.X, spawnVector.Y + 100f * npc.scale); - Vector2 projectileVelocity = Vector2.Normalize(destination - spawnVector) * flameVelocity; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < maxProjectiles; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector + Vector2.Normalize(perturbedSpeed) * 100f, perturbedSpeed, type, damage, 0f, Main.myPlayer); - } - } - } - else - { - calamityGlobalNPC.newAI[2] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float laserVelocity = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? 7f : death ? 6f : 5f; - int maxProjectiles = !phase3 ? (bossRush ? 13 : death ? 11 : 9) : (bossRush ? 17 : death ? 15 : 13); - int spread = !phase3 ? (bossRush ? 20 : death ? 18 : 16) : (bossRush ? 24 : death ? 22 : 20); - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int[] lasersToNotFire = new int[4] { 1, 3, maxProjectiles - 2, maxProjectiles - 4 }; - Vector2 projectileVelocity = Vector2.Normalize(player.Center - npc.Center) * laserVelocity; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < maxProjectiles; i++) - { - if (i != lasersToNotFire[0] && i != lasersToNotFire[1] && i != lasersToNotFire[2] && i != lasersToNotFire[3]) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(maxProjectiles - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, perturbedSpeed, type, damage, 0f, Main.myPlayer, 0f, laserVelocity * 2f); - } - } - } - } - } - else - { - // Set damage - npc.damage = npc.defDamage; - - // Set velocities while falling, this happens before the stomp - // Fall through - if (!player.dead) - { - if ((player.position.Y > npc.Bottom.Y && npc.velocity.Y > 0f) || (player.position.Y < npc.Bottom.Y && npc.velocity.Y < 0f)) - npc.noTileCollide = true; - else if ((npc.velocity.Y > 0f && npc.Bottom.Y > Main.player[npc.target].Top.Y) || (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].Center, 1, 1) && !Collision.SolidCollision(npc.position, npc.width, npc.height))) - npc.noTileCollide = false; - } - - if (npc.position.X < player.position.X && npc.position.X + npc.width > player.position.X + player.width) - { - // Make sure Aureus falls quickly when directly on top of or below the player - if (npc.ai[3] < 30f) - npc.ai[3] = 30f; - - npc.velocity.X *= 0.8f; - - if (npc.Bottom.Y < player.position.Y) - { - // Make sure Aureus falls rather quickly - if (npc.velocity.Y < -3f) - npc.velocity.Y = -3f; - - float fallSpeed = 1.2f; - fallSpeed += 0.36f * enrageScale; - if (expertMode) - fallSpeed += death ? 0.36f * (1f - lifeRatio) : 0.24f * (1f - lifeRatio); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - fallSpeed += 0.5f; - - if (calamityGlobalNPC.newAI[1] > 0f) - fallSpeed *= calamityGlobalNPC.newAI[1] + 1f; - - npc.velocity.Y += fallSpeed; - } - } - else - { - // Push Aureus towards the player on the X axis if he's not directly on top of or below the player - float velocityXChange = 0.2f + Math.Abs(npc.Center.X - player.Center.X) * 0.0001f; - velocityXChange += 0.1f * enrageScale; - - if (calamityGlobalNPC.newAI[0] > 0f) - velocityXChange *= calamityGlobalNPC.newAI[0] + 1f; - - if (npc.direction < 0) - npc.velocity.X -= velocityXChange; - else if (npc.direction > 0) - npc.velocity.X += velocityXChange; - - float velocityXCap = 12f; - velocityXCap += 3.6f * enrageScale; - if (expertMode) - velocityXCap += death ? 3.6f * (1f - lifeRatio) : 2.4f * (1f - lifeRatio); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - velocityXCap += 5f; - - if (calamityGlobalNPC.newAI[0] > 0f) - velocityXCap *= calamityGlobalNPC.newAI[0] + 1f; - - float playerLocation = npc.Center.X - player.Center.X; - int directionRelativeToTarget = playerLocation < 0 ? 1 : -1; - bool slowDown = directionRelativeToTarget != calamityGlobalNPC.newAI[3]; - - if (slowDown) - velocityXCap *= 0.333f; - - if (npc.velocity.X < -velocityXCap) - npc.velocity.X = -velocityXCap; - if (npc.velocity.X > velocityXCap) - npc.velocity.X = velocityXCap; - } - - // Don't start falling quickly until half a second has passed - npc.ai[3] += 1f; - if (npc.ai[3] > 30f) - CustomGravity(); - } - } - - // Teleport - else if (npc.ai[0] == 5f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Slow down - npc.velocity.X *= 0.8f; - - // Start teleport - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 1f; - if (death) - npc.localAI[2] += 1.25f; - - if (phase4) - { - npc.localAI[1] += 1f; - if (death) - npc.localAI[2] += 1.25f; - } - - if (npc.localAI[1] >= (bossRush ? 60f : death ? 180f : 240f)) - { - // Reset localAI and find a teleport destination - npc.TargetClosest(); - npc.localAI[1] = 0f; - - Vector2 vectorAimedAheadOfTarget = Main.player[npc.target].Center + new Vector2((float)Math.Round(Main.player[npc.target].velocity.X), 0f).SafeNormalize(Vector2.Zero) * 1000f; - Point point4 = vectorAimedAheadOfTarget.ToTileCoordinates(); - int teleportTries = 0; - while (teleportTries < 100) - { - teleportTries++; - int teleportTileX = Main.rand.Next(point4.X - 5, point4.X + 6); - int teleportTileY = Main.rand.Next(point4.Y - 5, point4.Y); - - if (!Main.tile[teleportTileX, teleportTileY].HasUnactuatedTile) - { - npc.ai[1] = teleportTileX * 16 + 8; - npc.ai[3] = teleportTileY * 16 + 16; - break; - } - } - - // Default teleport if the above conditions aren't met in 100 iterations - if (teleportTries >= 100) - { - Vector2 bottom = Main.player[Player.FindClosest(npc.position, npc.width, npc.height)].Bottom; - npc.ai[1] = bottom.X; - npc.ai[3] = bottom.Y; - } - - // Set AI to next phase (Mid-teleport) - npc.ai[0] = 6f; - npc.netUpdate = true; - } - } - - CustomGravity(); - } - - // Mid-teleport - else if (npc.ai[0] == 6f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (death) - npc.localAI[2] += 1.25f; - - if (phase4) - { - if (death) - npc.localAI[2] += 1.25f; - } - - // Turn invisible - npc.alpha += 10; - if (npc.alpha >= 255) - { - // Set position to teleport destination - npc.Bottom = new Vector2(npc.ai[1], npc.ai[3]); - - // Reset alpha and set AI to next phase (End of teleport) - npc.alpha = 255; - npc.ai[0] = 7f; - npc.localAI[2] = 0f; - npc.netUpdate = true; - } - - // Play sound for cool effect - if (npc.soundDelay == 0) - { - npc.soundDelay = 15; - SoundEngine.PlaySound(AstrumAureus.AstrumAureus.TeleportSound, npc.Center); - } - - // Emit dust to make the teleport pretty - for (int i = 0; i < 10; i++) - { - int teleportDust = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType(), npc.velocity.X, npc.velocity.Y, 255, default, 2f); - Main.dust[teleportDust].noGravity = true; - Main.dust[teleportDust].velocity *= 0.5f; - } - - CustomGravity(); - } - - // End of teleport - else if (npc.ai[0] == 7f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Turn visible - npc.alpha -= 10; - if (npc.alpha <= 0) - { - // Spawn Aureus Spawns - bool spawnFlag = expertMode; - if (NPC.CountNPCS(ModContent.NPCType()) >= 2) - spawnFlag = false; - - if (spawnFlag && Main.netMode != NetmodeID.MultiplayerClient) - { - int aureusSpawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)(npc.Center.Y - 25f * npc.scale), ModContent.NPCType()); - Main.npc[aureusSpawn].velocity.Y = -10f; - Main.npc[aureusSpawn].netUpdate = true; - if (revenge) - { - aureusSpawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)(npc.Center.Y - 25f * npc.scale), ModContent.NPCType()); - Main.npc[aureusSpawn].velocity.Y = -15f; - Main.npc[aureusSpawn].netUpdate = true; - } - - if (death) - { - int damageAmt = npc.lifeMax / 50; - npc.life -= damageAmt; - if (npc.life < 1) - npc.life = 1; - - npc.DamageEffect(damageAmt); - } - } - - // Reset alpha and set AI to next phase (Idle) - npc.alpha = 0; - npc.ai[0] = exhausted ? 1f : 2f; - npc.ai[1] = 0f; - npc.ai[2] += 1f; - npc.localAI[3] = noProjectileOrPhaseIncrementTime; - - // Stop colliding with tiles if entering walking phase - npc.noTileCollide = npc.ai[0] == 2f; - - npc.netUpdate = true; - } - - // Play sound at teleport destination for cool effect - if (npc.soundDelay == 0) - { - npc.soundDelay = 15; - SoundEngine.PlaySound(SoundID.Item109, npc.Center); - } - - // Emit dust to make the teleport pretty - for (int i = 0; i < 10; i++) - { - int teleportDust = Dust.NewDust(npc.position, npc.width, npc.height, ModContent.DustType(), npc.velocity.X, npc.velocity.Y, 255, default, 2f); - Main.dust[teleportDust].noGravity = true; - Main.dust[teleportDust].velocity *= 0.5f; - } - - CustomGravity(); - } - - void CustomGravity() - { - float gravity = 0.36f + 0.12f * enrageScale; - float maxFallSpeed = reduceFallSpeed ? 12f : 12f + 4f * enrageScale; - - if (calamityGlobalNPC.newAI[1] > 0f && !reduceFallSpeed) - maxFallSpeed *= calamityGlobalNPC.newAI[1] + 1f; - - if (Main.getGoodWorld && !reduceFallSpeed) - { - gravity *= 1.15f; - maxFallSpeed *= 1.15f; - } - - npc.velocity.Y += gravity; - if (npc.velocity.Y > maxFallSpeed) - npc.velocity.Y = maxFallSpeed; - } - } - } -} diff --git a/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs deleted file mode 100644 index 2134f154b2..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/BrimstoneElementalAI.cs +++ /dev/null @@ -1,734 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class BrimstoneElementalAI - { - public static void VanillaBrimstoneElementalAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - BrimstoneElemental.BrimstoneElemental brimmy = npc.ModNPC(); - - // Used for Brimling AI states - CalamityGlobalNPC.brimstoneElemental = npc.whoAmI; - - // Emit light - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1.2f, 0f, 0f); - - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) - npc.TargetClosest(); - - Player player = Main.player[npc.target]; - - bool despawnDistance = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; - - if (!player.active || player.dead || despawnDistance) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - if (!player.active || player.dead || despawnDistance) - { - npc.rotation = npc.velocity.X * 0.04f; - - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; - npc.velocity.Y -= 0.1f; - if (npc.velocity.Y < -12f) - npc.velocity.Y = -12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - if (npc.ai[0] != 0f) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.localAI[0] = 0f; - npc.localAI[1] = 0f; - npc.netUpdate = true; - } - return; - } - } - else if (npc.timeLeft < 1800) - npc.timeLeft = 1800; - - CalamityPlayer modPlayer = player.Calamity(); - - // Reset defense - npc.defense = npc.defDefense; - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = npc.ai[0] == 4f; - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Variables for buffing the AI - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - bool phase2 = lifeRatio < 0.5f && revenge; - bool phase3 = lifeRatio < 0.33f; - - // Enrage - if ((!player.ZoneUnderworldHeight || !modPlayer.ZoneCalamity) && !bossRush) - { - if (calamityGlobalNPC.newAI[3] > 0f) - calamityGlobalNPC.newAI[3] -= 1f; - } - else - calamityGlobalNPC.newAI[3] = CalamityGlobalNPC.biomeEnrageTimerMax; - - bool biomeEnraged = calamityGlobalNPC.newAI[3] <= 0f || bossRush; - - float enrageScale = bossRush ? 0.5f : 0f; - if (biomeEnraged && (!player.ZoneUnderworldHeight || bossRush)) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 0.5f; - } - if (biomeEnraged && (!modPlayer.ZoneCalamity || bossRush)) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 1f; - } - - npc.Calamity().DR = npc.ai[0] == 4f ? 0.6f : 0.2f; - - // Emit dust - int dustAmt = (npc.ai[0] == 2f) ? 2 : 1; - int size = (npc.ai[0] == 2f) ? 50 : 35; - if (npc.ai[0] != 1f) - { - for (int i = 0; i < 2; i++) - { - if (Main.rand.Next(3) < dustAmt) - { - int dust = Dust.NewDust(npc.Center - new Vector2(size), size * 2, size * 2, DustID.LifeDrain, npc.velocity.X * 0.5f, npc.velocity.Y * 0.5f, 90, default, 1.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 0.2f; - Main.dust[dust].fadeIn = 1f; - } - } - } - - // Distance from destination where Brimmy stops moving - float movementDistanceGateValue = 100f; - - // How fast Brimmy moves to the destination - float baseVelocity = (death ? 6f : revenge ? 5.5f : expertMode ? 5f : 4.5f) * (npc.ai[0] == 5f ? 0.05f : npc.ai[0] == 3f ? 1.5f : 1f); - baseVelocity += 3f * enrageScale; - if (expertMode) - baseVelocity += death ? 3f * (1f - lifeRatio) : 2f * (1f - lifeRatio); - - float baseAcceleration = (death ? 0.12f : 0.1f) * (npc.ai[0] == 5f ? 0.5f : npc.ai[0] == 3f ? 1.5f : 1f); - baseAcceleration += 0.06f * enrageScale; - if (expertMode) - baseAcceleration += 0.03f * (1f - lifeRatio); - - // This is where Brimmy should be - Vector2 destination = npc.ai[0] != 3f ? player.Center : new Vector2(player.Center.X, player.Center.Y - 300f); - - // How far Brimmy is from where she's supposed to be - Vector2 distanceFromDestination = destination - npc.Center; - - // Movement - if (npc.ai[0] != 4f) - CalamityUtils.SmoothMovement(npc, movementDistanceGateValue, distanceFromDestination, baseVelocity, baseAcceleration, true); - - // Rotation and direction - if (npc.ai[0] <= 2f || npc.ai[0] == 5f) - { - npc.rotation = npc.velocity.X * 0.04f; - if (npc.ai[0] != 5 || (npc.ai[1] < 180f && npc.ai[0] == 5f)) - { - float playerLocation = npc.Center.X - player.Center.X; - npc.direction = playerLocation < 0f ? 1 : -1; - npc.spriteDirection = npc.direction; - } - } - - if (Main.zenithWorld) // in gfb, Brimmy channels the power of the other elementals. - { - int newMode; - if (lifeRatio <= 0.8f && lifeRatio > 0.6f) - { - newMode = 1; // Sand - } - else if (lifeRatio <= 0.6f && lifeRatio > 0.4f) - { - newMode = 2; // Rare Sand - } - else if (lifeRatio <= 0.4f && lifeRatio > 0.2f) - { - newMode = 3; // Cloud - } - else if (lifeRatio <= 0.2f) - { - newMode = 4; // Water - } - else - { - newMode = 0; // Brimstone, default - } - if (newMode != brimmy.currentMode) - { - SoundEngine.PlaySound(SoundID.Item29, npc.Center); - } - brimmy.currentMode = newMode; - } - - if (npc.ai[0] == -1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int phase; - int random = phase2 ? 6 : 5; - do phase = Main.rand.Next(random); - while (phase == npc.ai[1] || (phase == 0 && phase3 && revenge) || phase == 1 || phase == 2 || (phase == 4 && npc.localAI[3] != 0f)); - - npc.ai[0] = phase; - npc.ai[1] = 0f; - - // Cocoon phase cooldown - if (npc.localAI[3] > 0f) - npc.localAI[3] -= 1f; - else if (phase == 4) - { - npc.localAI[3] = 3f; - SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.HideInShellSound, player.Center); - } - - // Prevent netUpdate from being blocked by the spam counter. - // A phase switch sync is a critical operation that must be synced. - npc.ForceNetUpdate(false); - } - } - - // Pick a location to teleport to - else if (npc.ai[0] == 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.chaseable = true; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 1f; - if (npc.Distance(player.Center) < 160f) - npc.localAI[1] += death ? 4f : expertMode ? 2f : 1f; - - if (npc.localAI[1] >= (bossRush ? 90f : death ? 120f : 180f)) - { - npc.TargetClosest(); - npc.localAI[1] = 0f; - int timer = 0; - int playerPosX; - int playerPosY; - while (true) - { - timer++; - playerPosX = (int)player.Center.X / 16; - playerPosY = (int)player.Center.Y / 16; - - int min = 12; - int max = 16; - - if (Main.rand.NextBool()) - playerPosX += Main.rand.Next(min, max); - else - playerPosX -= Main.rand.Next(min, max); - - if (Main.rand.NextBool()) - playerPosY += Main.rand.Next(min, max); - else - playerPosY -= Main.rand.Next(min, max); - - if (!WorldGen.SolidTile(playerPosX, playerPosY)) - break; - - if (timer > 100) - return; - } - npc.ai[0] = 1f; - npc.ai[1] = playerPosX; - npc.ai[2] = playerPosY; - npc.netUpdate = true; - } - } - } - - // Teleport to location - else if (npc.ai[0] == 1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.chaseable = true; - Vector2 position = new Vector2(npc.ai[1] * 16f - (npc.width / 2), npc.ai[2] * 16f - (npc.height / 2)); - for (int m = 0; m < 5; m++) - { - int dust = Dust.NewDust(position, npc.width, npc.height, DustID.LifeDrain, 0f, -1f, 90, default, 2f); - Main.dust[dust].noGravity = true; - Main.dust[dust].fadeIn = 1f; - } - npc.alpha += bossRush ? 8 : death ? 5 : revenge ? 4 : expertMode ? 3 : 2; - if (npc.alpha >= 255) - { - int spawnType = brimmy.currentMode == 3 ? NPCID.AngryNimbus : ModContent.NPCType(); - int enemyCount = brimmy.currentMode == 3 ? 3 : 1; // 3 angry nimbi if cloud, otherwise 1 brimling - if (Main.netMode != NetmodeID.MultiplayerClient && NPC.CountNPCS(spawnType) < (death ? 1 : 2) && revenge && brimmy.currentMode != 2) // dont spawn anything if gfb rare sand - { - for (int i = 0; i < enemyCount; i++) - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, spawnType); - } - SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.TeleportSound, npc.Center); - npc.alpha = 255; - npc.position = position; - for (int n = 0; n < 15; n++) - { - int warpDust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.LifeDrain, 0f, -1f, 90, default, 3f); - Main.dust[warpDust].noGravity = true; - } - npc.ai[0] = 2f; - npc.netUpdate = true; - } - } - - // Either teleport again or go to next AI state - else if (npc.ai[0] == 2f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.alpha >= 255) - { - if (Main.zenithWorld) - { - SoundEngine.PlaySound(SoundID.Item68, npc.Center); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 pos = npc.Center; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), pos, new Vector2(0, 1), type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - Projectile.NewProjectile(npc.GetSource_FromAI(), pos, new Vector2(0, -1), type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - Projectile.NewProjectile(npc.GetSource_FromAI(), pos, new Vector2(1, 0), type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - Projectile.NewProjectile(npc.GetSource_FromAI(), pos, new Vector2(-1, 0), type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - } - if (brimmy.currentMode >= 1 && brimmy.currentMode <= 3) - { - int tornadoType = brimmy.currentMode == 3 ? ModContent.ProjectileType() : ProjectileID.SandnadoHostileMark; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), pos, Vector2.Zero, tornadoType, damage, 0f, Main.myPlayer, 0f, 0f); - } - } - if (brimmy.currentMode == 2) - { - int healAmt = npc.lifeMax / 25; - if (healAmt > 0) - { - npc.life += healAmt; - npc.HealEffect(healAmt, true); - npc.netUpdate = true; - } - } - } - } - - npc.alpha -= 50; - if (npc.alpha <= 0) - { - npc.chaseable = true; - npc.ai[3] += 1f; - npc.alpha = 0; - if (npc.ai[3] >= 2f || phase2 || Main.getGoodWorld) - { - npc.ai[0] = -1f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - } - else - { - npc.ai[0] = 0f; - } - npc.netUpdate = true; - } - } - - // Float above target and fire projectiles - else if (npc.ai[0] == 3f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.chaseable = true; - npc.rotation = npc.velocity.X * 0.04f; - - float playerLocation = npc.Center.X - player.Center.X; - npc.direction = playerLocation < 0f ? 1 : -1; - npc.spriteDirection = npc.direction; - - npc.ai[1] += 1f; - float divisor = expertMode ? (death ? 80f : revenge ? 45f : 50f) - (float)Math.Ceiling(10f * (1f - lifeRatio)) : 50f; - divisor -= 3f * enrageScale; - float divisor2 = divisor * 2f; - - if (npc.ai[1] % divisor == divisor - 1f) - { - float velocity = (death ? 7f : revenge ? 6f : 5f) + (2f * enrageScale) + (expertMode ? 3f * (1f - lifeRatio) : 0f); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - if (brimmy.currentMode == 4) - { - type = ModContent.ProjectileType(); - SoundEngine.PlaySound(SoundID.Item30, player.Center); - } - else - { - SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.HellfireballSound, player.Center); - } - Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity.SafeNormalize(Vector2.UnitY) * 5f, projectileVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); - Main.projectile[proj].timeLeft = 240; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - Main.projectile[proj].extraUpdates += 1; - } - - if (npc.ai[1] % divisor2 == divisor2 - 1f) - { - velocity = (death ? 5f : 4f) + 2f * enrageScale; - type = ModContent.ProjectileType(); - damage = npc.GetProjectileDamage(type); - if (brimmy.currentMode == 4) - { - type = ModContent.ProjectileType(); - SoundEngine.PlaySound(SoundID.Item21, player.Center); - } - else - { - SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.DartSound, player.Center); - } - projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; - int numProj = death ? 8 : 4; - int spread = death ? 90 : 45; - if (Main.getGoodWorld) - { - numProj *= 3; - spread *= 2; - } - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float rotation = MathHelper.ToRadians(spread); - float projectileVelocityToPass = velocity * 3f; - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - int proj2 = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 5f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - Main.projectile[proj2].extraUpdates += 1; - } - } - } - } - - if (npc.ai[1] >= divisor * (death ? 5f : 10f)) - { - npc.TargetClosest(); - npc.ai[0] = -1f; - npc.ai[1] = 3f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.netUpdate = true; - } - } - - // Cocoon bullet hell - else if (npc.ai[0] == 4f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.defense = npc.defDefense * 4; - - npc.chaseable = false; - npc.localAI[0] += 1f; - if (Main.getGoodWorld) - npc.localAI[0] += 2f; - if (expertMode) - npc.localAI[0] += 1f - lifeRatio; - npc.localAI[0] += enrageScale; - - if (npc.localAI[0] >= 120f) - { - npc.localAI[0] = 0f; - - float projectileSpeed = death ? 9f : revenge ? 8f : 6f; - projectileSpeed += 2f * enrageScale; - - Vector2 projectileVelocity = player.Center - npc.Center; - - float radialOffset = 0.2f; - float diameter = 80f; - - projectileVelocity = projectileVelocity.SafeNormalize(Vector2.UnitY) * projectileSpeed; - - Vector2 velocity = projectileVelocity; - velocity = velocity.SafeNormalize(Vector2.UnitY); - velocity *= diameter; - - int totalProjectiles = 6; - float offsetAngle = (float)Math.PI * radialOffset; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int j = 0; j < totalProjectiles; j++) - { - float radians = j - (totalProjectiles - 1f) / 2f; - Vector2 offset = velocity.RotatedBy(offsetAngle * radians); - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, projectileVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); - Main.projectile[proj].timeLeft = 300; - Main.projectile[proj].tileCollide = false; - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - Main.projectile[proj].extraUpdates += 1; - } - } - - totalProjectiles = 12; - float radians2 = MathHelper.TwoPi / totalProjectiles; - type = ModContent.ProjectileType(); - damage = npc.GetProjectileDamage(type); - if (brimmy.currentMode == 4) - { - type = ModContent.ProjectileType(); - SoundEngine.PlaySound(SoundID.Item26, player.Center); - } - else - { - SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.ShellFireSound, player.Center); - } - double angleA = radians2 * 0.5; - double angleB = MathHelper.ToRadians(90f) - angleA; - float velocityX = (float)(projectileSpeed * Math.Sin(angleA) / Math.Sin(angleB)); - Vector2 spinningPoint = npc.localAI[2] % 2f == 0f ? new Vector2(0f, -projectileSpeed) : new Vector2(-velocityX, -projectileSpeed); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float projectileVelocityToPass = projectileSpeed * 3f; - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k); - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - Main.projectile[proj].extraUpdates += 1; - } - - if (death) - { - spinningPoint = npc.localAI[2] % 2f == 0f ? new Vector2(-velocityX, -projectileSpeed) : new Vector2(0f, -projectileSpeed); - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 vector255 = spinningPoint.RotatedBy(radians2 * k); - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255 * 0.75f, type, damage, 0f, Main.myPlayer, 1f, 0f, projectileVelocityToPass); - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - Main.projectile[proj].extraUpdates += 1; - } - } - } - - npc.localAI[2] += 1f; - } - - npc.velocity *= 0.95f; - npc.rotation = npc.velocity.X * 0.04f; - float playerLocation = npc.Center.X - player.Center.X; - npc.direction = playerLocation < 0f ? 1 : -1; - npc.spriteDirection = npc.direction; - - npc.ai[1] += 1f; - if (npc.ai[1] >= (death ? 240f : 300f)) - { - npc.TargetClosest(); - npc.ai[0] = -1f; - npc.ai[1] = 4f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.localAI[0] = 0f; - npc.netUpdate = true; - } - } - - // Laser beam attack - else if (npc.ai[0] == 5f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.chaseable = true; - - npc.defense = npc.defDefense * 2; - - Vector2 source = new Vector2(npc.Center.X + (npc.spriteDirection > 0 ? 34f : -34f), npc.Center.Y - 74f); - Vector2 aimAt = player.Center + player.velocity * 20f; - float aimResponsiveness = bossRush ? 0.05f : (npc.ai[2] == 1f || death) ? 0.1f : 0.25f; - - Vector2 aimVector = (aimAt - source).SafeNormalize(Vector2.UnitY); - if (aimVector.HasNaNs()) - aimVector = -Vector2.UnitY; - aimVector = (Vector2.Lerp(aimVector, npc.velocity.SafeNormalize(Vector2.UnitY), aimResponsiveness)).SafeNormalize(Vector2.UnitY); - aimVector *= 6f; - - Vector2 laserVelocity = aimVector.SafeNormalize(Vector2.UnitY); - if (laserVelocity.HasNaNs()) - laserVelocity = -Vector2.UnitY; - - calamityGlobalNPC.newAI[1] = laserVelocity.X; - calamityGlobalNPC.newAI[2] = laserVelocity.Y; - - // Rev = 190 + 165 = 355 - // Death = 165 - - npc.ai[1] += 1f; - if (npc.ai[1] >= 240f) - { - npc.TargetClosest(); - npc.ai[2] += 1f; - npc.localAI[0] = 0f; - npc.localAI[1] = 0f; - if (npc.ai[2] >= (death ? 1f : 2f)) - { - npc.ai[0] = -1f; - npc.ai[1] = 5f; - npc.ai[2] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - } - else - { - npc.ai[1] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - } - } - else if (npc.ai[1] >= 180f) - { - npc.velocity *= 0.95f; - if (npc.ai[1] == 180f) - { - SoundEngine.PlaySound(SoundID.Item68, source); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 laserVelocity2 = new Vector2(npc.localAI[0], npc.localAI[1]); - laserVelocity2 = laserVelocity2.SafeNormalize(Vector2.UnitY); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - - Projectile.NewProjectile(npc.GetSource_FromAI(), source, laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - if (Main.getGoodWorld) - Projectile.NewProjectile(npc.GetSource_FromAI(), source, -laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - - if (Main.zenithWorld) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), source, new Vector2(-laserVelocity2.X, laserVelocity2.Y), type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - Projectile.NewProjectile(npc.GetSource_FromAI(), source, new Vector2(laserVelocity2.X, -laserVelocity2.Y), type, damage, 0f, Main.myPlayer, 0f, npc.whoAmI); - } - } - } - } - else - { - float playSoundTimer = 30f; - if (npc.ai[1] < 150f) - { - switch ((int)npc.ai[2]) - { - case 0: - npc.ai[1] += 0.5f; - break; - case 1: - npc.ai[1] += 1f; - playSoundTimer = 40f; - break; - } - if (death) - { - npc.ai[1] += 0.5f; - playSoundTimer += 10f; - } - } - - if (npc.ai[1] % playSoundTimer == 0f) - SoundEngine.PlaySound(SoundID.Item20, npc.Center); - - if (npc.ai[1] < 150f && calamityGlobalNPC.newAI[0] == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), source, laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI); - if (Main.getGoodWorld) - Projectile.NewProjectile(npc.GetSource_FromAI(), source, -laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI); - - if (Main.zenithWorld) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), source, new Vector2(-laserVelocity.X, laserVelocity.Y), ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI); - Projectile.NewProjectile(npc.GetSource_FromAI(), source, new Vector2(laserVelocity.X, -laserVelocity.Y), ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, npc.whoAmI); - } - } - - calamityGlobalNPC.newAI[0] = 1f; - } - else - { - if (npc.ai[1] == 150f) - { - npc.localAI[0] = laserVelocity.X; - npc.localAI[1] = laserVelocity.Y; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), source.X, source.Y, npc.localAI[0], npc.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.whoAmI); - if (Main.getGoodWorld) - Projectile.NewProjectile(npc.GetSource_FromAI(), source.X, source.Y, -npc.localAI[0], -npc.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.whoAmI); - - if (Main.zenithWorld) - { - Projectile.NewProjectile(npc.GetSource_FromAI(), source.X, source.Y, -npc.localAI[0], npc.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.whoAmI); - Projectile.NewProjectile(npc.GetSource_FromAI(), source.X, source.Y, npc.localAI[0], -npc.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, npc.whoAmI); - } - } - } - } - } - } - } - } -} diff --git a/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs deleted file mode 100644 index 15d826ab41..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/BumblebirbAI.cs +++ /dev/null @@ -1,1077 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; -using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class BumblebirbAI - { - public static void VanillaBumblebirbAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - // 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(); - - Player player = Main.player[npc.target]; - - // Variables - float rotationMult = 3f; - float rotationAmt = 0.03f; - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = npc.ai[0] == 3f || npc.ai[0] == 3.1f || npc.ai[0] == 3.2f; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - - // If target is outside the jungle for more than 5 seconds, enrage - if (!player.ZoneJungle) - { - if (npc.localAI[1] < CalamityGlobalNPC.biomeEnrageTimerMax) - npc.localAI[1] += 1f; - } - else - npc.localAI[1] = 0f; - - // If dragonfolly is off screen, enrage for the next couple attacks - if (Vector2.Distance(player.Center, npc.Center) > 1200f) - npc.localAI[2] = 2f; - - // Enrage scale - float enrageScale = death ? 1.5f : 1f; - if (npc.localAI[1] >= CalamityGlobalNPC.biomeEnrageTimerMax || bossRush) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 1f; - } - - if (npc.localAI[2] > 0f || bossRush) - enrageScale += 1f; - - if (Main.getGoodWorld) - enrageScale += 0.5f; - - if (enrageScale > 3f) - enrageScale = 3f; - - // Despawn - if (!player.active || player.dead || Vector2.Distance(player.Center, npc.Center) > 5600f) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - - if (!player.active || player.dead || Vector2.Distance(player.Center, npc.Center) > 5600f) - { - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt) / 10f; - - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; - npc.velocity.Y -= 0.2f; - if (npc.velocity.Y < -12f) - npc.velocity.Y = -12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - if (npc.ai[0] != 0f) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - npc.ForceNetUpdate(false); - } - - return; - } - } - else if (npc.timeLeft < 1800) - npc.timeLeft = 1800; - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Phases - bool phase2 = lifeRatio < (revenge ? 0.75f : 0.5f); - bool phase3 = lifeRatio < (death ? 0.4f : revenge ? 0.25f : 0.1f) && expertMode; - - float birbSpawnPhaseTimer = 180f; - float newPhaseTimer = 180f; - bool phaseSwitchPhase = (phase2 && calamityGlobalNPC.newAI[0] < newPhaseTimer && calamityGlobalNPC.newAI[2] != 1f) || - (phase3 && calamityGlobalNPC.newAI[1] < newPhaseTimer && calamityGlobalNPC.newAI[3] != 1f); - - calamityGlobalNPC.DR = (phaseSwitchPhase || npc.ai[0] == 5f || (enrageScale == 3f && !bossRush)) ? (bossRush ? 0.99f : 0.55f) : 0.1f; - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = phaseSwitchPhase || npc.ai[0] == 5f || (enrageScale == 3f && !bossRush); - - int reducedSetDamage = (int)Math.Round(npc.defDamage * 0.5); - - if (phaseSwitchPhase) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else if (npc.velocity.X > 0f) - npc.direction = 1; - - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt) / 10f; - - if (phase3) - { - calamityGlobalNPC.newAI[1] += 1f; - - // Sound - if (calamityGlobalNPC.newAI[1] == newPhaseTimer - 60f) - { - float squawkpitch = Main.zenithWorld ? 1.3f : 0.25f; - SoundEngine.PlaySound(SoundID.DD2_BetsyScream with { Pitch = squawkpitch }, npc.Center); - - if (Main.zenithWorld) - { - int spacing = 20; - int amt = 5; - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, npc.Center - Vector2.UnitY * 300f); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < amt; i++) - { - Vector2 fireFrom = new Vector2(npc.Center.X + (spacing * i) - (spacing * amt / 2), npc.Center.Y - 900f); - Vector2 ai0 = npc.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), npc.defDamage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - } - - if (calamityGlobalNPC.newAI[1] >= newPhaseTimer) - { - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 1f; - calamityGlobalNPC.newAI[3] = 1f; - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.SyncExtraAI(); - npc.ForceNetUpdate(false); - } - } - else - { - calamityGlobalNPC.newAI[0] += 1f; - - // Sound - if (calamityGlobalNPC.newAI[0] == newPhaseTimer - 60f) - { - float squawkpitch = Main.zenithWorld ? 1.3f : 0.25f; - SoundEngine.PlaySound(SoundID.DD2_BetsyScream with { Pitch = squawkpitch }, npc.Center); - - if (Main.zenithWorld) - { - int spacing = 20; - int amt = 3; - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, npc.Center - Vector2.UnitY * 300f); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < amt; i++) - { - Vector2 fireFrom = new Vector2(npc.Center.X + (spacing * i) - (spacing * amt / 2), npc.Center.Y - 900f); - Vector2 ai0 = npc.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), npc.defDamage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - } - - if (calamityGlobalNPC.newAI[0] >= newPhaseTimer) - { - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.newAI[2] = 1f; - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.SyncExtraAI(); - npc.ForceNetUpdate(false); - } - } - - Vector2 follyTargetDirection = player.Center - npc.Center; - float follyTargetDistance = 4f + follyTargetDirection.Length() / 100f; - float follyVelocityMult = 25f; - follyTargetDirection.Normalize(); - follyTargetDirection *= follyTargetDistance; - npc.velocity = (npc.velocity * (follyVelocityMult - 1f) + follyTargetDirection) / follyVelocityMult; - return; - } - - // Max spawn amount - int maxBirbs = (CalamityWorld.LegendaryMode && revenge) ? 12 : revenge ? 3 : 2; - - // Variable for charging - float chargeDistance = 600f; - if (phase2) - chargeDistance -= 50f; - if (phase3) - chargeDistance -= 50f; - chargeDistance -= (enrageScale - 1f) * 100f; - - // Phase switch - if (npc.ai[0] == 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.Center.X < player.Center.X - 2f) - npc.direction = 1; - if (npc.Center.X > player.Center.X + 2f) - npc.direction = -1; - - // Direction and rotation - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt * 1.25f) / 10f; - - // Fly to target if target is too far away, otherwise get close to target and then slow down - Vector2 follyFlyTargetDirection = player.Center - npc.Center; - follyFlyTargetDirection.Y -= 200f; - if (follyFlyTargetDirection.Length() > 2800f) - { - npc.TargetClosest(); - npc.ai[0] = 1f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - else if (follyFlyTargetDirection.Length() > 240f) - { - float follyFlySpeed = 12f + (enrageScale - 1f) * 6f; - float follyFlyVelocityMult = 30f; - follyFlyTargetDirection.Normalize(); - follyFlyTargetDirection *= follyFlySpeed; - npc.velocity = (npc.velocity * (follyFlyVelocityMult - 1f) + follyFlyTargetDirection) / follyFlyVelocityMult; - } - else if (npc.velocity.Length() > 2f) - npc.velocity *= 0.95f; - else if (npc.velocity.Length() < 1f) - npc.velocity *= 1.05f; - - // Phase switch - npc.ai[1] += 1f; - if (npc.ai[1] >= 30f) - { - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - while (npc.ai[0] == 0f) - { - if (phase2) - npc.localAI[0] += 1f; - - if (npc.localAI[0] >= (phase3 ? 7 : 9)) - { - npc.TargetClosest(); - npc.ai[0] = 5f; - npc.localAI[0] = 0f; - - // Decrease the feather variable, feathers can be used again if it's at 0 - if (npc.ai[3] > 0f) - npc.ai[3] -= 1f; - - // Decrease enraged attacks by 1 - if (npc.localAI[2] > 0f) - npc.localAI[2] -= 1f; - - // Decrease amount of attacks until able to spawn small birbs again - if (npc.localAI[3] > 0f) - npc.localAI[3] -= 1f; - } - else - { - int follyAttackPicker = phase2 ? Main.rand.Next(2) + 1 : Main.rand.Next(3); - if (phase3) - follyAttackPicker = 1; - - float featherVelocity = 2f + (enrageScale - 1f); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - - if (follyAttackPicker == 0 && npc.localAI[3] == 0f) - { - npc.TargetClosest(); - npc.ai[0] = 2f; - - // Decrease the feather variable, feathers can be used again if it's at 0 - if (npc.ai[3] > 0f) - npc.ai[3] -= 1f; - - // Decrease enraged attacks by 1 - if (npc.localAI[2] > 0f) - npc.localAI[2] -= 1f; - - // Birb will do at least 1 different attack before entering this phase again - npc.localAI[3] = 1f; - } - else if (follyAttackPicker == 1) - { - npc.TargetClosest(); - npc.ai[0] = 3f; - - // Decrease enraged attacks by 1 - if (npc.localAI[2] > 0f) - npc.localAI[2] -= 1f; - - // Decrease amount of attacks until able to use other attacks again - if (npc.localAI[3] > 0f) - npc.localAI[3] -= 1f; - - if (phase2 && npc.ai[3] == 0f) - { - npc.ai[3] = 3f; - SoundEngine.PlaySound(SoundID.Item102, player.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int totalProjectiles = 40; - float radians = MathHelper.TwoPi / totalProjectiles; - int distance = 800; - bool spawnRight = player.velocity.X > 0f; - for (int i = 0; i < totalProjectiles; i++) - { - if (Main.getGoodWorld) - { - if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) - { - Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; - Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - if (i >= (int)(totalProjectiles * 0.625) && i <= (int)(totalProjectiles * 0.875)) - { - Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; - Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - else - { - if (spawnRight) - { - if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) - { - Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; - Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - else - { - if (i >= (int)(totalProjectiles * 0.625) && i <= (int)(totalProjectiles * 0.875)) - { - Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; - Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - } - } - } - } - else - { - // Decrease the feather variable, feathers can be used again if it's at 0 - if (npc.ai[3] > 0f) - npc.ai[3] -= 1f; - } - } - else if (NPC.CountNPCS(ModContent.NPCType()) < maxBirbs && npc.localAI[3] == 0f) - { - npc.TargetClosest(); - npc.ai[0] = 4f; - - // Birb will do at least 2 different attacks before entering this phase again - npc.localAI[3] = 2f; - - // Decrease enraged attacks by 1 - if (npc.localAI[2] > 0f) - npc.localAI[2] -= 1f; - - if (npc.ai[3] == 0f) - { - npc.ai[3] = 3f; - SoundEngine.PlaySound(SoundID.Item102, player.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int totalProjectiles = phase2 ? 40 : 48; - - if (Main.getGoodWorld) - totalProjectiles *= 2; - - float radians = MathHelper.TwoPi / totalProjectiles; - int distance = phase2 ? 1200 : 1320; - - if (Main.getGoodWorld) - distance *= 2; - - bool spawnRight = player.velocity.X > 0f; - for (int i = 0; i < totalProjectiles; i++) - { - if (spawnRight) - { - if (i >= totalProjectiles / 2) - break; - - Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; - Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - else - { - if (i >= totalProjectiles / 2) - { - Vector2 spawnVector = player.Center + Vector2.Normalize(new Vector2(0f, -featherVelocity).RotatedBy(radians * i)) * distance; - Vector2 velocity = Vector2.Normalize(player.Center - spawnVector) * featherVelocity; - Projectile.NewProjectile(npc.GetSource_FromAI(), spawnVector, velocity, type, damage, 0f, Main.myPlayer); - } - } - } - } - } - else - { - // Decrease the feather variable, feathers can be used again if it's at 0 - if (npc.ai[3] > 0f) - npc.ai[3] -= 1f; - } - } - } - } - - npc.ForceNetUpdate(false); - npc.SyncExtraAI(); - } - } - - // Fly to target - else if (npc.ai[0] == 1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else if (npc.velocity.X > 0f) - npc.direction = 1; - - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt) / 10f; - - Vector2 follyTargetDirection = player.Center - npc.Center; - if (follyTargetDirection.Length() < 800f) - { - npc.TargetClosest(); - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - npc.ForceNetUpdate(false); - npc.SyncExtraAI(); - } - - float velocity = 14f + (enrageScale - 1f) * 4f; - float follyTargetDistance = velocity + follyTargetDirection.Length() / 100f; - float follyVelocityMult = 25f; - follyTargetDirection.Normalize(); - follyTargetDirection *= follyTargetDistance; - npc.velocity = (npc.velocity * (follyVelocityMult - 1f) + follyTargetDirection) / follyVelocityMult; - } - - // Fly towards target quickly - else if (npc.ai[0] == 2f) - { - // Set reduced damage - npc.damage = reducedSetDamage; - - if (npc.target < 0 || !player.active || player.dead) - { - npc.TargetClosest(); - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - npc.ForceNetUpdate(false); - npc.SyncExtraAI(); - } - - if (player.Center.X - 10f < npc.Center.X) - npc.direction = -1; - else if (player.Center.X + 10f > npc.Center.X) - npc.direction = 1; - - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult * 0.5f + npc.velocity.X * rotationAmt * 1.25f) / 5f; - - Vector2 follyQuickFlyTargetDirection = player.Center - npc.Center; - follyQuickFlyTargetDirection.Y -= 20f; - npc.ai[2] += 0.0222222228f; - if (expertMode) - npc.ai[2] += 0.0166666675f; - - float velocity = 8f + (enrageScale - 1f) * 2f; - float follyQuickFlySpeed = velocity + npc.ai[2] + follyQuickFlyTargetDirection.Length() / 120f; - if (CalamityWorld.LegendaryMode && revenge) - follyQuickFlySpeed *= 2f; - - float follyQuickFlyVelMult = 20f; - follyQuickFlyTargetDirection.Normalize(); - follyQuickFlyTargetDirection *= follyQuickFlySpeed; - npc.velocity = (npc.velocity * (follyQuickFlyVelMult - 1f) + follyQuickFlyTargetDirection) / follyQuickFlyVelMult; - - npc.ai[1] += 1f; - if (npc.ai[1] >= ((CalamityWorld.LegendaryMode && revenge) ? 90f : 180f)) - { - npc.TargetClosest(); - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - npc.ForceNetUpdate(false); - npc.SyncExtraAI(); - } - } - - // Line up charge - else if (npc.ai[0] == 3f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else - npc.direction = 1; - - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult * 0.5f + npc.velocity.X * rotationAmt * 0.85f) / 5f; - - Vector2 follyLineUpTargetDirection = player.Center - npc.Center; - follyLineUpTargetDirection.Y -= 12f; - if (npc.Center.X > player.Center.X) - follyLineUpTargetDirection.X += chargeDistance; - else - follyLineUpTargetDirection.X -= chargeDistance; - - float verticalDistanceGateValue = (phase3 ? 100f : 20f) + (enrageScale - 1f) * 20f; - if (Math.Abs(npc.Center.X - player.Center.X) > chargeDistance - 50f && Math.Abs(npc.Center.Y - player.Center.Y) < verticalDistanceGateValue) - { - npc.ai[0] = 3.1f; - npc.ai[1] = 0f; - - npc.ForceNetUpdate(false); - npc.SyncExtraAI(); - } - - npc.ai[1] += 0.0333333351f; - float velocity = 16f + (enrageScale - 1f) * 4f; - float follyLineUpSpeed = velocity + npc.ai[1]; - float follyLineUpVelMult = 4f; - follyLineUpTargetDirection.Normalize(); - follyLineUpTargetDirection *= follyLineUpSpeed; - npc.velocity = (npc.velocity * (follyLineUpVelMult - 1f) + follyLineUpTargetDirection) / follyLineUpVelMult; - } - - // Prepare to charge - else if (npc.ai[0] == 3.1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.rotation = (npc.rotation * rotationMult * 0.5f + npc.velocity.X * rotationAmt * 0.85f) / 5f; - - Vector2 follyChargePrepareTargetDirection = player.Center - npc.Center; - follyChargePrepareTargetDirection.Y -= 12f; - float follyChargePrepareSpeed = 28f + (enrageScale - 1f) * 4f; - float follyChargePrepareVelMult = 8f; - follyChargePrepareTargetDirection.Normalize(); - follyChargePrepareTargetDirection *= follyChargePrepareSpeed; - npc.velocity = (npc.velocity * (follyChargePrepareVelMult - 1f) + follyChargePrepareTargetDirection) / follyChargePrepareVelMult; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else - npc.direction = 1; - - npc.spriteDirection = npc.direction; - - npc.ai[1] += 1f; - if (npc.ai[1] > 10f) - { - // Set damage - npc.damage = npc.defDamage; - - npc.velocity = follyChargePrepareTargetDirection; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else - npc.direction = 1; - - npc.ai[0] = 3.2f; - npc.ai[1] = npc.direction; - - npc.ForceNetUpdate(false); - npc.SyncExtraAI(); - } - } - - // Charge - else if (npc.ai[0] == 3.2f) - { - // Set damage - npc.damage = npc.defDamage; - - npc.ai[2] += 0.0333333351f; - float velocity = 28f + (enrageScale - 1f) * 4f; - npc.velocity.X = (velocity + npc.ai[2]) * npc.ai[1]; - - if ((npc.ai[1] > 0f && npc.Center.X > player.Center.X + (chargeDistance - 140f)) || (npc.ai[1] < 0f && npc.Center.X < player.Center.X - (chargeDistance - 140f))) - { - if (!Collision.SolidCollision(npc.position, npc.width, npc.height)) - { - npc.TargetClosest(); - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ForceNetUpdate(false); - } - else if (Math.Abs(npc.Center.X - player.Center.X) > chargeDistance + 200f) - { - npc.TargetClosest(); - npc.ai[0] = 1f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ForceNetUpdate(false); - } - } - - npc.rotation = (npc.rotation * rotationMult * 0.5f + npc.velocity.X * rotationAmt * 0.85f) / 5f; - } - - // Birb spawn - else if (npc.ai[0] == 4f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.ai[1] == 0f) - { - Vector2 destination2 = player.Center + new Vector2(0f, -200f); - Vector2 desiredVelocity2 = npc.SafeDirectionTo(destination2, -Vector2.UnitY) * 18f; - npc.SimpleFlyMovement(desiredVelocity2, 1.5f); - - if (npc.velocity.X < 0f) - npc.direction = -1; - else - npc.direction = 1; - - npc.spriteDirection = npc.direction; - - npc.ai[2] += 1f; - if (npc.Distance(player.Center) < 600f || npc.ai[2] >= 180f) - { - npc.ai[1] = 1f; - npc.ForceNetUpdate(false); - } - } - else - { - if (npc.ai[1] < 90f) - npc.velocity *= 0.95f; - else - npc.velocity *= 0.98f; - - if (npc.ai[1] == 90f) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y /= 3f; - - npc.velocity.Y -= 3f; - } - - // Sound - if (npc.ai[1] == birbSpawnPhaseTimer - 60f) - { - float squawkpitch = Main.zenithWorld ? 1.3f : 0.25f; - SoundEngine.PlaySound(SoundID.DD2_BetsyScream with { Pitch = squawkpitch }, npc.Center); - - if (Main.zenithWorld) - { - int spacing = 30; - int amt = 3; - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, npc.Center - Vector2.UnitY * 300f); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < amt; i++) - { - Vector2 fireFrom = new Vector2(npc.Center.X + (spacing * i) - (spacing * amt / 2), npc.Center.Y - 900f); - Vector2 ai0 = npc.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), npc.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - } - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - bool gfbSpawnFlag = CalamityWorld.LegendaryMode && revenge && (npc.ai[1] == 145f || npc.ai[1] == 150f || npc.ai[1] == 160f || npc.ai[1] == 165f); - bool spawnFlag = NPC.CountNPCS(ModContent.NPCType()) < maxBirbs && (npc.ai[1] == 140f || (revenge && npc.ai[1] == 155f) || npc.ai[1] == 170f || gfbSpawnFlag); - if (spawnFlag) - { - Vector2 follySpawnCenter = npc.Center + (MathHelper.TwoPi * Main.rand.NextFloat()).ToRotationVector2() * new Vector2(2f, 1f) * 50f * (0.6f + Main.rand.NextFloat() * 0.4f); - if (Vector2.Distance(follySpawnCenter, player.Center) > 150f) - NPC.NewNPC(npc.GetSource_FromAI(), (int)follySpawnCenter.X, (int)follySpawnCenter.Y, ModContent.NPCType(), npc.whoAmI); - - npc.ForceNetUpdate(false); - } - } - - npc.ai[1] += 1f; - } - - if (npc.ai[1] >= birbSpawnPhaseTimer) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.ForceNetUpdate(false); - } - } - - // Spit homing aura sphere - else if (npc.ai[0] == 5f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - npc.velocity *= 0.98f; - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt) / 10f; - - // Play sound - float aiGateValue = 120f; - if (npc.ai[1] == aiGateValue - 30f) - { - SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 follySpawnCenter = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + npc.Center; - float ai0 = (phase3 ? 2f : 0f) + (enrageScale - 1f); - if (ai0 > 3f) - ai0 = 3f; - - Projectile.NewProjectile(npc.GetSource_FromAI(), follySpawnCenter.X, follySpawnCenter.Y, 0f, 0f, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, ai0, npc.target + 1); - npc.ForceNetUpdate(false); - } - - if (Main.zenithWorld) - { - int spacing = 30; - int amt = 3; - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, npc.Center - Vector2.UnitY * 300f); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < amt; i++) - { - Vector2 fireFrom = new Vector2(npc.Center.X + (spacing * i) - (spacing * amt / 2), npc.Center.Y - 900f); - Vector2 ai0 = npc.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(npc.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), npc.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - } - - npc.ai[1] += 1f; - if (npc.ai[1] >= aiGateValue) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ForceNetUpdate(false); - } - } - } - - public static void VanillaBumblebirb2AI(NPC npc, Mod mod, bool bossMinion) - { - Player player = Main.player[npc.target]; - - float rotationMult = 4f; - float rotationAmt = 0.04f; - - if (Vector2.Distance(player.Center, npc.Center) > 5600f) - { - if (npc.timeLeft > 5) - npc.timeLeft = 5; - } - - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt * 1.25f) / 10f; - - if (npc.ai[0] == 0f || npc.ai[0] == 1f) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type) - { - Vector2 otherSwarmerDirection = Main.npc[i].Center - npc.Center; - if (otherSwarmerDirection.Length() < (npc.width + npc.height)) - { - otherSwarmerDirection.Normalize(); - otherSwarmerDirection *= -0.1f; - npc.velocity += otherSwarmerDirection; - NPC nPC6 = Main.npc[i]; - nPC6.velocity -= otherSwarmerDirection; - } - } - } - } - - if (npc.target < 0 || Main.player[npc.target].dead || !Main.player[npc.target].active) - { - npc.TargetClosest(true); - Vector2 swarmerTargetDist = Main.player[npc.target].Center - npc.Center; - if (Main.player[npc.target].dead || swarmerTargetDist.Length() > (bossMinion ? 5600f : 2800f)) - npc.ai[0] = -1f; - } - else - { - Vector2 swarmerCatchUpTargetDist = Main.player[npc.target].Center - npc.Center; - if (npc.ai[0] > 1f && swarmerCatchUpTargetDist.Length() > 3600f) - npc.ai[0] = 1f; - } - - if (npc.ai[0] == -1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - Vector2 swarmerDespawnVelMult = new Vector2(0f, -8f); - npc.velocity = (npc.velocity * 21f + swarmerDespawnVelMult) / 10f; - return; - } - - if (npc.ai[0] == 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.TargetClosest(true); - npc.spriteDirection = npc.direction; - - Vector2 swarmerIdleTargetDist = Main.player[npc.target].Center - npc.Center; - if (swarmerIdleTargetDist.Length() > 2800f) - { - npc.ai[0] = 1f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - } - else if (swarmerIdleTargetDist.Length() > 400f) - { - float swarmerIdleSpeed = (bossMinion ? 9f : 7f) + swarmerIdleTargetDist.Length() / 100f + npc.ai[1] / 15f; - swarmerIdleTargetDist.Normalize(); - swarmerIdleTargetDist *= swarmerIdleSpeed; - npc.velocity = (npc.velocity * 29f + swarmerIdleTargetDist) / 30f; - if (Main.getGoodWorld && !Main.zenithWorld) - npc.velocity *= 1.15f; - } - else if (npc.velocity.Length() > 2f) - npc.velocity *= 0.95f; - else if (npc.velocity.Length() < 1f) - npc.velocity *= 1.05f; - - npc.ai[1] += 1f; - if (npc.ai[1] >= (bossMinion ? 90f : 105f)) - { - npc.ai[1] = 0f; - npc.ai[0] = 2f; - } - } - else - { - if (npc.ai[0] == 1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.target < 0 || !Main.player[npc.target].active || Main.player[npc.target].dead) - npc.TargetClosest(true); - - if (npc.velocity.X < 0f) - npc.direction = -1; - else if (npc.velocity.X > 0f) - npc.direction = 1; - - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult + npc.velocity.X * rotationAmt) / 10f; - - Vector2 swarmerChargeTargetDist = Main.player[npc.target].Center - npc.Center; - if (swarmerChargeTargetDist.Length() < 800f && !Collision.SolidCollision(npc.position, npc.width, npc.height)) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - } - - npc.ai[2] += 0.0166666675f; - float swarmerChargeSpeed = (bossMinion ? 12f : 9f) + npc.ai[2] + swarmerChargeTargetDist.Length() / 150f; - float swarmerChargeVelMult = 25f; - swarmerChargeTargetDist.Normalize(); - swarmerChargeTargetDist *= swarmerChargeSpeed; - npc.velocity = (npc.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) - npc.velocity *= 1.15f; - - npc.ForceNetUpdate(); - - return; - } - - if (npc.ai[0] == 2f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else if (npc.velocity.X > 0f) - npc.direction = 1; - - npc.spriteDirection = npc.direction; - npc.rotation = (npc.rotation * rotationMult * 0.75f + npc.velocity.X * rotationAmt * 1.25f) / 8f; - - Vector2 swarmerDecelerateTargetDist = Main.player[npc.target].Center - npc.Center; - swarmerDecelerateTargetDist.Y -= 8f; - float swarmerDecelerateSpeed = bossMinion ? 18f : 14f; - float swarmerDecelerateVelMult = 8f; - swarmerDecelerateTargetDist.Normalize(); - swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; - npc.velocity = (npc.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) - npc.velocity *= 1.15f; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else - npc.direction = 1; - - npc.spriteDirection = npc.direction; - - npc.ai[1] += 1f; - if (npc.ai[1] > 10f) - { - // Set damage - npc.damage = npc.defDamage; - - npc.velocity = swarmerDecelerateTargetDist; - if (Main.getGoodWorld && !Main.zenithWorld) - npc.velocity *= 1.15f; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else - npc.direction = 1; - - npc.ai[0] = 2.1f; - npc.ai[1] = 0f; - } - } - else if (npc.ai[0] == 2.1f) - { - // Set damage - npc.damage = npc.defDamage; - - if (npc.velocity.X < 0f) - npc.direction = -1; - else if (npc.velocity.X > 0f) - npc.direction = 1; - - npc.spriteDirection = npc.direction; - - npc.velocity *= 1.01f; - - npc.ai[1] += 1f; - if (npc.ai[1] > 30f) - { - if (!Collision.SolidCollision(npc.position, npc.width, npc.height)) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - return; - } - - if (npc.ai[1] > 60f) - { - npc.ai[0] = 1f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - } - } - } - } - } -} diff --git a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs deleted file mode 100644 index 1f70165548..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/CalamitasCloneAI.cs +++ /dev/null @@ -1,1406 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.CalClone; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using ReLogic.Utilities; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class CalamitasCloneAI - { - public static void VanillaCalamitasCloneAI(NPC npc, SlotId warn) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - // Emit light - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f); - - // Variables for increasing difficulty - bool bossRush = BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool expertMode = Main.expertMode || bossRush; - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Phases - bool phase2 = lifeRatio < 0.7f || death; - bool phase3 = lifeRatio < 0.35f; - bool phase4 = lifeRatio <= 0.1f && death; - - // Don't take damage during bullet hells - npc.dontTakeDamage = calamityGlobalNPC.newAI[2] > 0f; - - // Variable for live brothers - bool brotherAlive = false; - - // For seekers - CalamityGlobalNPC.calamitas = npc.whoAmI; - - // Seeker ring - if (calamityGlobalNPC.newAI[1] == 0f && phase3 && expertMode) - { - SoundEngine.PlaySound(SoundID.Item72, npc.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int seekerAmt = death ? 10 : 5; - int seekerSpread = 360 / seekerAmt; - int seekerDistance = death ? 180 : 150; - for (int i = 0; i < seekerAmt; i++) - { - int spawn = NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + (Math.Sin(i * seekerSpread) * seekerDistance)), (int)(npc.Center.Y + (Math.Cos(i * seekerSpread) * seekerDistance)), ModContent.NPCType(), npc.whoAmI, 0, 0, 0, -1); - Main.npc[spawn].ai[0] = i * seekerSpread; - } - } - - string key = "Mods.CalamityMod.Status.Boss.CalamitasBossText3"; - Color messageColor = Color.Orange; - CalamityUtils.DisplayLocalizedText(key, messageColor); - - calamityGlobalNPC.newAI[1] = 1f; - } - - // CIT 14SEP2024: Fixed bug where her phases would get offset by dealing a large amount of damage in a single hit to take her into a new phase. - // newAI[0] now starts at 1 and has 0.3 subtracted from it for each phase, instead of it storing her current health when she enters a new phase. - - // Do bullet hell or spawn brothers - if (calamityGlobalNPC.newAI[0] == 0f && npc.life > 0) - calamityGlobalNPC.newAI[0] = 1f; - - // Bullet hells at 70% and 10%, brothers at 40% - if (npc.life > 0) - { - int calClonePhaseThreshold = (int)(npc.lifeMax * 0.3); - if (((npc.life + calClonePhaseThreshold) / (float)npc.lifeMax) < calamityGlobalNPC.newAI[0]) - { - calamityGlobalNPC.newAI[0] -= 0.3f; - if (calamityGlobalNPC.newAI[0] <= 0.1f) - { - SoundEngine.PlaySound(SoundID.Item109, npc.Center); - calamityGlobalNPC.newAI[2] = 2f; - - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - calamityGlobalNPC.newAI[3] = 0f; - - SpawnDust(); - } - else if (calamityGlobalNPC.newAI[0] <= 0.4f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.position.Y + npc.height, ModContent.NPCType(), npc.whoAmI); - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.position.Y + npc.height, ModContent.NPCType(), npc.whoAmI); - } - - string key = "Mods.CalamityMod.Status.Boss.CalamitasBossText2"; - Color messageColor = Color.Orange; - CalamityUtils.DisplayLocalizedText(key, messageColor); - - SpawnDust(); - } - else - { - SoundEngine.PlaySound(SoundID.Item109, npc.Center); - calamityGlobalNPC.newAI[2] = 1f; - - if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - calamityGlobalNPC.newAI[3] = 0f; - - SpawnDust(); - } - } - } - - // Immunity if brothers are alive - if (CalamityGlobalNPC.cataclysm != -1) - { - if (Main.npc[CalamityGlobalNPC.cataclysm].active) - brotherAlive = true; - } - if (CalamityGlobalNPC.catastrophe != -1) - { - if (Main.npc[CalamityGlobalNPC.catastrophe].active) - brotherAlive = true; - } - - if (brotherAlive) - npc.dontTakeDamage = true; - - void SpawnDust() - { - int dustAmt = 50; - int random = 3; - - for (int j = 0; j < 10; j++) - { - random += j; - int dustAmtSpawned = 0; - int scale = random * 6; - float dustPositionX = npc.Center.X - (scale / 2); - float dustPositionY = npc.Center.Y - (scale / 2); - while (dustAmtSpawned < dustAmt) - { - float dustVelocityX = Main.rand.Next(-random, random); - float dustVelocityY = Main.rand.Next(-random, random); - float dustVelocityScalar = random * 2f; - float dustVelocity = (float)Math.Sqrt(dustVelocityX * dustVelocityX + dustVelocityY * dustVelocityY); - dustVelocity = dustVelocityScalar / dustVelocity; - dustVelocityX *= dustVelocity; - dustVelocityY *= dustVelocity; - int dust = Dust.NewDust(new Vector2(dustPositionX, dustPositionY), scale, scale, (int)CalamityDusts.Brimstone, 0f, 0f, 100, default, 2f); - Main.dust[dust].noGravity = true; - Main.dust[dust].position.X = npc.Center.X; - Main.dust[dust].position.Y = npc.Center.Y; - Main.dust[dust].position.X += Main.rand.Next(-10, 11); - Main.dust[dust].position.Y += Main.rand.Next(-10, 11); - Main.dust[dust].velocity.X = dustVelocityX; - Main.dust[dust].velocity.Y = dustVelocityY; - dustAmtSpawned++; - } - } - } - - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) - npc.TargetClosest(); - - // Target variable - Player player = Main.player[npc.target]; - - float enrageScale = bossRush ? 1f : 0f; - if (Main.IsItDay() || bossRush) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 2f; - } - - // Rotation - Vector2 npcCenter = new Vector2(npc.Center.X, npc.position.Y + npc.height - 59f); - Vector2 lookAt = new Vector2(player.position.X - (player.width / 2), player.position.Y - (player.height / 2)); - Vector2 rotationVector = npcCenter - lookAt; - - // Boss Rush predictive charge rotation - if (npc.ai[1] == 4f && phase4 && bossRush) - { - // Velocity - float chargeVelocity = 30f; - chargeVelocity += 5f * enrageScale; - lookAt += Main.player[npc.target].velocity * 20f; - rotationVector = Vector2.Normalize(npcCenter - lookAt) * chargeVelocity; - } - - float rotation = (float)Math.Atan2(rotationVector.Y, rotationVector.X) + MathHelper.PiOver2; - if (rotation < 0f) - rotation += MathHelper.TwoPi; - else if (rotation > MathHelper.TwoPi) - rotation -= MathHelper.TwoPi; - - float rotationAmt = 0.1f; - if (npc.rotation < rotation) - { - if ((rotation - npc.rotation) > MathHelper.Pi) - npc.rotation -= rotationAmt; - else - npc.rotation += rotationAmt; - } - else if (npc.rotation > rotation) - { - if ((npc.rotation - rotation) > MathHelper.Pi) - npc.rotation += rotationAmt; - else - npc.rotation -= rotationAmt; - } - - if (npc.rotation > rotation - rotationAmt && npc.rotation < rotation + rotationAmt) - npc.rotation = rotation; - if (npc.rotation < 0f) - npc.rotation += MathHelper.TwoPi; - else if (npc.rotation > MathHelper.TwoPi) - npc.rotation -= MathHelper.TwoPi; - if (npc.rotation > rotation - rotationAmt && npc.rotation < rotation + rotationAmt) - npc.rotation = rotation; - - // Despawn - if (!player.active || player.dead) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - if (!player.active || player.dead) - { - if (SoundEngine.TryGetActiveSound(warn, out var warningSound) && warningSound.IsPlaying) - warningSound.Stop(); - - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; - npc.velocity.Y -= 0.1f; - if (npc.velocity.Y < -12f) - npc.velocity.Y = -12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - if (npc.ai[1] != 0f) - { - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - npc.alpha = 0; - npc.netUpdate = true; - } - return; - } - } - else if (npc.timeLeft < 1800) - npc.timeLeft = 1800; - - // Distance from destination where Cal Clone stops moving - float movementDistanceGateValue = 100f; - - // How fast Cal Clone moves to the destination - float baseVelocity = (expertMode ? 10f : 8.5f) * (npc.ai[1] == 4f ? 1.4f : 1f); - float baseAcceleration = (expertMode ? 0.18f : 0.155f) * (npc.ai[1] == 4f ? 1.4f : 1f); - baseVelocity += 4f * enrageScale; - baseAcceleration += 0.1f * enrageScale; - if (revenge) - { - baseVelocity += 1.5f * (1f - lifeRatio); - baseAcceleration += 0.03f * (1f - lifeRatio); - } - if (death) - { - baseVelocity += 1.5f * (1f - lifeRatio); - baseAcceleration += 0.03f * (1f - lifeRatio); - } - if (Main.getGoodWorld) - { - baseVelocity *= 1.15f; - baseAcceleration *= 1.15f; - } - - // What side Cal Clone should be on, relative to the target - int xPos = 1; - if (npc.Center.X < player.Center.X) - xPos = -1; - - // How far Cal Clone should be from the target - float averageDistance = 500f; - float chargeDistance = phase4 ? 300f : 400f; - - // This is where Cal Clone should be - Vector2 destination = (calamityGlobalNPC.newAI[2] > 0f || npc.ai[1] == 0f) ? new Vector2(player.Center.X, player.Center.Y - averageDistance) : - npc.ai[1] == 1f ? new Vector2(player.Center.X + averageDistance * xPos, player.Center.Y) : - new Vector2(player.Center.X + chargeDistance * xPos, player.Center.Y); - - // Add some random distance to the destination after certain attacks - if (npc.localAI[0] == 1f) - { - npc.localAI[0] = 0f; - npc.localAI[2] = Main.rand.Next(-50, 51); - npc.localAI[3] = Main.rand.Next(-300, 301); - npc.netUpdate = true; - } - - // Add a bit of randomness to the destination - if (death) - { - destination.X += npc.ai[1] == 0f ? npc.localAI[3] : npc.localAI[2]; - destination.Y += npc.ai[1] == 0f ? npc.localAI[2] : npc.localAI[3]; - } - - // How far Cal Clone is from where she's supposed to be - Vector2 distanceFromDestination = destination - npc.Center; - - // Movement - if (npc.ai[1] == 0f || npc.ai[1] == 1f || npc.ai[1] == 4f || calamityGlobalNPC.newAI[2] > 0f) - CalamityUtils.SmoothMovement(npc, movementDistanceGateValue, distanceFromDestination, baseVelocity, baseAcceleration, true); - - // Bullet hell phase - if (calamityGlobalNPC.newAI[2] > 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (calamityGlobalNPC.newAI[3] < 900f) - { - calamityGlobalNPC.newAI[3] += 1f; - npc.dontTakeDamage = true; - npc.alpha = 255; - - float rotX = player.Center.X - npc.Center.X; - float rotY = player.Center.Y - npc.Center.Y; - npc.rotation = (float)Math.Atan2(rotY, rotX) - MathHelper.PiOver2; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (calamityGlobalNPC.newAI[2] == 2f) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - if (Main.zenithWorld) - type = ModContent.ProjectileType(); - - float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; - float projSpeed = bossRush ? 6.25f : 5f; - if (calamityGlobalNPC.newAI[3] <= 300f) - { - if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from top - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer); - } - else if (calamityGlobalNPC.newAI[3] <= 600f && calamityGlobalNPC.newAI[3] > 300f) - { - if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from right - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -projSpeed, 0f, type, damage, 0f, Main.myPlayer); - } - else if (calamityGlobalNPC.newAI[3] > 600f) - { - if (calamityGlobalNPC.newAI[3] % gigaBlastFrequency == 0f) // Blasts from top - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer); - } - } - } - - npc.ai[0] += 1f; - float hellblastGateValue = (expertMode ? 12f : 16f) - enrageScale; - if (npc.ai[0] >= hellblastGateValue) - { - npc.ai[0] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float projSpeed = bossRush ? 4.5f : 4f; - // Blasts aimed directly at the player's horizontal position, does not spawn during the second bullet hell - if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f && calamityGlobalNPC.newAI[2] != 2f) - { - float distance = Main.rand.NextBool() ? -1000f : 1000f; - float velocity = distance == -1000f ? projSpeed : -projSpeed; - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - - if (calamityGlobalNPC.newAI[3] < 300f) // Blasts from above - { - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - else if (calamityGlobalNPC.newAI[3] < 600f) // Blasts from left and right - { - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 0.5f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 0.5f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - else // Blasts from above, left, and right - { - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed - 1f, type, damage, 0f, Main.myPlayer, 2f, 0f); - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 1f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 1f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - } - } - - if (calamityGlobalNPC.newAI[3] == 900f - 360f) - warn = SoundEngine.PlaySound(CalamitasClone.BulletHellWarning, player.Center); - if (calamityGlobalNPC.newAI[3] > 900f - 360f) - { - if (SoundEngine.TryGetActiveSound(warn, out var warningSound) && warningSound.IsPlaying) - warningSound.Position = player.Center; - } - } - else - { - npc.ai[0] = 0f; - npc.ai[3] = 0f; - npc.localAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - calamityGlobalNPC.newAI[3] = 0f; - SoundEngine.PlaySound(CalamitasClone.BulletHellEnd, player.Center); - - // Prevent bullshit charge hits when second bullet hell ends. - if (phase4) - { - npc.ai[1] = 4f; - npc.ai[2] = -105f; - npc.TargetClosest(); - } - else - { - if (death) - { - int AIState = Main.rand.Next(3); - switch (AIState) - { - case 0: - npc.ai[1] = 0f; - npc.ai[2] = 0f; - break; - case 1: - npc.ai[1] = 1f; - npc.ai[2] = 0f; - break; - case 2: - npc.ai[1] = 4f; - npc.ai[2] = -105f; - npc.TargetClosest(); - break; - } - } - else - { - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - if (death) - npc.localAI[0] = 1f; - } - - npc.netUpdate = true; - - for (int x = 0; x < Main.maxProjectiles; x++) - { - Projectile projectile = Main.projectile[x]; - if (projectile.active) - { - if (projectile.type == ModContent.ProjectileType() || projectile.type == ModContent.ProjectileType()) - { - if (projectile.timeLeft > 60) - projectile.timeLeft = 60; - } - else if (projectile.type == ModContent.ProjectileType()) - { - projectile.ai[2] = 1f; - - if (projectile.timeLeft > 60) - projectile.timeLeft = 60; - } - } - } - } - - return; - } - else if (CalamityWorld.LegendaryMode && CalamityWorld.revenge) - { - if (calamityGlobalNPC.newAI[3] < 900f) - calamityGlobalNPC.newAI[3] += 1f; - else - calamityGlobalNPC.newAI[3] = 0f; - - npc.ai[0] += 1f; - float hellblastGateValue = 30f - enrageScale; - if (npc.ai[0] >= hellblastGateValue) - { - npc.ai[0] = 0f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float projSpeed = bossRush ? 5f : 4f; - if (calamityGlobalNPC.newAI[3] % (hellblastGateValue * 6f) == 0f) - { - float distance = Main.rand.NextBool() ? -1000f : 1000f; - float velocity = distance == -1000f ? projSpeed : -projSpeed; - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + distance, player.position.Y, velocity, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - - if (calamityGlobalNPC.newAI[3] < 300f) // Blasts from above - { - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - else if (calamityGlobalNPC.newAI[3] < 600f) // Blasts from left and right - { - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 0.5f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 0.5f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - else // Blasts from above, left, and right - { - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + Main.rand.Next(-1000, 1001), player.position.Y - 1000f, 0f, projSpeed - 1f, type, damage, 0f, Main.myPlayer, 2f, 0f); - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X + 1000f, player.position.Y + Main.rand.Next(-1000, 1001), -(projSpeed - 1f), 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - Projectile.NewProjectile(npc.GetSource_FromAI(), player.position.X - 1000f, player.position.Y + Main.rand.Next(-1000, 1001), projSpeed - 1f, 0f, type, damage, 0f, Main.myPlayer, 2f, 0f); - } - } - } - } - - npc.alpha = npc.dontTakeDamage ? 255 : 0; - - // Float above target and fire hellfireballs - if (npc.ai[1] == 0f) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.ai[2] += 1f; - float phaseTimer = 400f - (death ? 120f * (1f - lifeRatio) : 0f); - if (npc.ai[2] >= phaseTimer || phase4) - { - if (death && !phase4 && Main.rand.NextBool() && !brotherAlive) - npc.ai[1] = 4f; - else - npc.ai[1] = 1f; - - npc.ai[2] = 0f; - if (death) - npc.localAI[0] = 1f; - - npc.netUpdate = true; - } - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 1f; - if (!brotherAlive) - { - if (expertMode) - npc.localAI[1] += death ? 2f * (1f - lifeRatio) : 1f - lifeRatio; - if (revenge) - npc.localAI[1] += 0.5f; - } - - if (npc.localAI[1] >= (brotherAlive ? 180f : 120f)) - { - npc.localAI[1] = 0f; - SoundEngine.PlaySound(BrimstoneElemental.BrimstoneElemental.HellfireballSound, npc.Center); - - float projectileVelocity = expertMode ? 14f : 12.5f; - projectileVelocity += 3f * enrageScale; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - bool shootPredictiveShot = CalamityWorld.LegendaryMode && CalamityWorld.revenge && Main.rand.NextBool(); - Vector2 predictionVector = shootPredictiveShot ? player.velocity * 20f : Vector2.Zero; - Vector2 fireballVelocity = Vector2.Normalize(player.Center + predictionVector - npc.Center) * projectileVelocity; - Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f; - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); - Main.projectile[proj].netUpdate = true; - } - } - } - - // Float to the side of the target and fire - else if (npc.ai[1] == 1f) - { - // Avoid cheap bullshit - npc.damage = 0; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 1f; - if (!brotherAlive) - { - if (revenge) - npc.localAI[1] += 0.5f; - if (expertMode) - npc.localAI[1] += 0.5f; - } - - if (npc.localAI[1] >= (brotherAlive ? 75f : 50f) && Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) - { - npc.localAI[1] = 0f; - - float projectileVelocity = expertMode ? 12.5f : 11f; - projectileVelocity += 3f * enrageScale; - int type = brotherAlive ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 fireballVelocity = Vector2.Normalize(player.Center - npc.Center) * projectileVelocity; - Vector2 offset = Vector2.Normalize(fireballVelocity) * 40f; - - if (!Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) - { - type = ModContent.ProjectileType(); - damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, player.position.X, player.position.Y); - } - else - { - float ai0 = type == ModContent.ProjectileType() ? 1f : player.position.X; - float ai1 = type == ModContent.ProjectileType() ? 0f : player.position.Y; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + offset, fireballVelocity, type, damage, 0f, Main.myPlayer, ai0, ai1); - } - } - } - - npc.ai[2] += 1f; - float phaseTimer = 240f - (death ? 60f * (1f - lifeRatio) : 0f); - if (npc.ai[2] >= phaseTimer || phase4) - { - if (death && !phase4 && Main.rand.NextBool() && !brotherAlive) - npc.ai[1] = 0f; - else - npc.ai[1] = !brotherAlive && phase2 && revenge ? 4f : 0f; - - npc.ai[2] = 0f; - if (death) - npc.localAI[0] = 1f; - - npc.netUpdate = true; - } - } - else if (npc.ai[1] == 2f) - { - // Set damage - npc.damage = npc.defDamage; - SoundEngine.PlaySound(CalamitasClone.ChargeSound, npc.Center); - npc.rotation = rotation; - - float chargeVelocity = phase4 ? 30f : death ? 28f : 25f; - chargeVelocity += 5f * enrageScale; - - Vector2 vector = Vector2.Normalize(player.Center + (phase4 && bossRush ? player.velocity * 20f : Vector2.Zero) - npc.Center); - npc.velocity = vector * chargeVelocity; - - npc.ai[1] = 3f; - npc.netUpdate = true; - } - else if (npc.ai[1] == 3f) - { - // Set damage - npc.damage = npc.defDamage; - - npc.ai[2] += 1f; - - float chargeTime = phase4 ? 35f : death ? 40f : 45f; - if (npc.ai[2] >= chargeTime) - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.velocity *= 0.9f; - if (npc.velocity.X > -0.1 && npc.velocity.X < 0.1) - npc.velocity.X = 0f; - if (npc.velocity.Y > -0.1 && npc.velocity.Y < 0.1) - npc.velocity.Y = 0f; - } - else - { - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) - MathHelper.PiOver2; - - // Leave behind slow hellblasts in Death Mode - if (Main.netMode != NetmodeID.MultiplayerClient && death && phase3 && npc.ai[2] % (phase4 ? 6f : 10f) == 0f) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 fireballVelocity = CalamityWorld.LegendaryMode ? Main.rand.NextVector2CircularEdge(0.02f, 0.02f) : npc.velocity * 0.01f; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, fireballVelocity, type, damage, 0f, Main.myPlayer, 1f, 0f); - } - } - - if (npc.ai[2] >= chargeTime + 10f) - { - if (!phase4) - npc.ai[3] += 1f; - - npc.ai[2] = 0f; - - npc.rotation = rotation; - npc.netUpdate = true; - - if (npc.ai[3] >= 2f) - { - npc.TargetClosest(); - npc.ai[1] = 0f; - npc.ai[3] = 0f; - return; - } - - npc.ai[1] = 4f; - } - } - else - { - // Avoid cheap bullshit - npc.damage = 0; - - npc.ai[2] += 1f; - if (npc.ai[2] >= (phase4 ? 15f : 30f)) - { - npc.ai[1] = 2f; - npc.ai[2] = 0f; - if (death) - npc.localAI[0] = 1f; - - npc.netUpdate = true; - } - } - } - - public static void VanillaCataclysmAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - if (CalamityGlobalNPC.calamitas < 0 || !Main.npc[CalamityGlobalNPC.calamitas].active) - { - if (npc.alpha < 255) - { - npc.velocity *= 0.9f; - - npc.alpha += 2; - if (npc.alpha > 255) - npc.alpha = 255; - - int dustAmount = (int)Math.Round(MathHelper.Lerp(1f, 5f, (255 - npc.alpha) / 255f)); - for (int i = 0; i < dustAmount; i++) - { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.LifeDrain, 0f, -1f, 90, default, Main.rand.NextFloat(0.5f, 2f)); - Main.dust[dust].noGravity = true; - Main.dust[dust].fadeIn = 1f; - } - } - else - npc.active = false; - - npc.active = false; - return; - } - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - CalamityGlobalNPC.cataclysm = npc.whoAmI; - - // Emit light - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f); - - bool bossRush = BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool expertMode = Main.expertMode || bossRush; - - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) - npc.TargetClosest(); - - Player player = Main.player[npc.target]; - - float enrageScale = bossRush ? 1f : 0f; - if (Main.IsItDay() || bossRush) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 2f; - } - - float calCloneBroPlayerXDist = npc.position.X + (npc.width / 2) - player.position.X - (player.width / 2); - float calCloneBroPlayerYDist = npc.position.Y + npc.height - 59f - player.position.Y - (player.height / 2); - float calCloneBroRotation = (float)Math.Atan2(calCloneBroPlayerYDist, calCloneBroPlayerXDist) + MathHelper.PiOver2; - if (calCloneBroRotation < 0f) - calCloneBroRotation += MathHelper.TwoPi; - else if (calCloneBroRotation > MathHelper.TwoPi) - calCloneBroRotation -= MathHelper.TwoPi; - - float calCloneBroRotationSpeed = 0.15f; - if (npc.rotation < calCloneBroRotation) - { - if ((calCloneBroRotation - npc.rotation) > MathHelper.Pi) - npc.rotation -= calCloneBroRotationSpeed; - else - npc.rotation += calCloneBroRotationSpeed; - } - else if (npc.rotation > calCloneBroRotation) - { - if ((npc.rotation - calCloneBroRotation) > MathHelper.Pi) - npc.rotation += calCloneBroRotationSpeed; - else - npc.rotation -= calCloneBroRotationSpeed; - } - - if (npc.rotation > calCloneBroRotation - calCloneBroRotationSpeed && npc.rotation < calCloneBroRotation + calCloneBroRotationSpeed) - npc.rotation = calCloneBroRotation; - if (npc.rotation < 0f) - npc.rotation += MathHelper.TwoPi; - else if (npc.rotation > MathHelper.TwoPi) - npc.rotation -= MathHelper.TwoPi; - if (npc.rotation > calCloneBroRotation - calCloneBroRotationSpeed && npc.rotation < calCloneBroRotation + calCloneBroRotationSpeed) - npc.rotation = calCloneBroRotation; - - if (!player.active || player.dead) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - if (!player.active || player.dead) - { - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; - npc.velocity.Y -= 0.1f; - if (npc.velocity.Y < -12f) - npc.velocity.Y = -12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - if (npc.ai[1] != 0f) - { - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.netUpdate = true; - } - - return; - } - } - - if (npc.ai[1] == 0f) - { - // Avoid cheap bullshit - npc.damage = (int)Math.Round(npc.defDamage * 0.5); - - float calCloneBroProjAttackMaxSpeed = 5f; - float calCloneBroProjAttackAccel = 0.1f; - calCloneBroProjAttackMaxSpeed += 2f * enrageScale; - calCloneBroProjAttackAccel += 0.06f * enrageScale; - - if (Main.getGoodWorld) - { - calCloneBroProjAttackMaxSpeed *= 1.15f; - calCloneBroProjAttackAccel *= 1.15f; - } - - int calCloneBroProjAttackDirection = 1; - if (npc.position.X + (npc.width / 2) < player.position.X + player.width) - calCloneBroProjAttackDirection = -1; - - Vector2 calCloneBroProjLocation = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); - float calCloneBroProjTargetX = player.position.X + (player.width / 2) + (calCloneBroProjAttackDirection * 180) - calCloneBroProjLocation.X; - float calCloneBroProjTargetY = player.position.Y + (player.height / 2) - calCloneBroProjLocation.Y; - float calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); - - if (expertMode) - { - if (calCloneBroProjTargetDist > 300f) - calCloneBroProjAttackMaxSpeed += 0.5f; - if (calCloneBroProjTargetDist > 400f) - calCloneBroProjAttackMaxSpeed += 0.5f; - if (calCloneBroProjTargetDist > 500f) - calCloneBroProjAttackMaxSpeed += 0.55f; - if (calCloneBroProjTargetDist > 600f) - calCloneBroProjAttackMaxSpeed += 0.55f; - if (calCloneBroProjTargetDist > 700f) - calCloneBroProjAttackMaxSpeed += 0.6f; - if (calCloneBroProjTargetDist > 800f) - calCloneBroProjAttackMaxSpeed += 0.6f; - } - - calCloneBroProjTargetDist = calCloneBroProjAttackMaxSpeed / calCloneBroProjTargetDist; - calCloneBroProjTargetX *= calCloneBroProjTargetDist; - calCloneBroProjTargetY *= calCloneBroProjTargetDist; - - if (npc.velocity.X < calCloneBroProjTargetX) - { - npc.velocity.X += calCloneBroProjAttackAccel; - if (npc.velocity.X < 0f && calCloneBroProjTargetX > 0f) - npc.velocity.X += calCloneBroProjAttackAccel; - } - else if (npc.velocity.X > calCloneBroProjTargetX) - { - npc.velocity.X -= calCloneBroProjAttackAccel; - if (npc.velocity.X > 0f && calCloneBroProjTargetX < 0f) - npc.velocity.X -= calCloneBroProjAttackAccel; - } - if (npc.velocity.Y < calCloneBroProjTargetY) - { - npc.velocity.Y += calCloneBroProjAttackAccel; - if (npc.velocity.Y < 0f && calCloneBroProjTargetY > 0f) - npc.velocity.Y += calCloneBroProjAttackAccel; - } - else if (npc.velocity.Y > calCloneBroProjTargetY) - { - npc.velocity.Y -= calCloneBroProjAttackAccel; - if (npc.velocity.Y > 0f && calCloneBroProjTargetY < 0f) - npc.velocity.Y -= calCloneBroProjAttackAccel; - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= (240f - (death ? 120f * (1f - lifeRatio) : 0f))) - { - npc.ai[1] = 1f; - npc.ai[2] = 0f; - npc.target = 255; - npc.netUpdate = true; - } - - bool fireDelay = npc.ai[2] > 120f || npc.life < npc.lifeMax * 0.9; - if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && fireDelay) - { - if (npc.localAI[2] == 0f) - SoundEngine.PlaySound(Cataclysm.FlamethrowerStart, npc.Center); - - npc.localAI[2] += 1f; - if (npc.localAI[2] > 30f) - { - npc.localAI[2] = 1f; - SoundEngine.PlaySound(Cataclysm.FlamethrowerLoop, npc.Center); - } - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 3f; - if (revenge) - npc.localAI[1] += 1f; - - if (npc.localAI[1] > 12f) - { - npc.localAI[1] = 0f; - float calCloneBroProjSpeed = NPC.AnyNPCs(ModContent.NPCType()) ? 4f : 6f; - calCloneBroProjSpeed += enrageScale; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - calCloneBroProjLocation = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); - calCloneBroProjTargetX = player.position.X + (player.width / 2) - calCloneBroProjLocation.X; - calCloneBroProjTargetY = player.position.Y + (player.height / 2) - calCloneBroProjLocation.Y; - calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); - calCloneBroProjTargetDist = calCloneBroProjSpeed / calCloneBroProjTargetDist; - calCloneBroProjTargetX *= calCloneBroProjTargetDist; - calCloneBroProjTargetY *= calCloneBroProjTargetDist; - calCloneBroProjTargetY += npc.velocity.Y * 0.5f; - calCloneBroProjTargetX += npc.velocity.X * 0.5f; - calCloneBroProjLocation.X -= calCloneBroProjTargetX; - calCloneBroProjLocation.Y -= calCloneBroProjTargetY; - Projectile.NewProjectile(npc.GetSource_FromAI(), calCloneBroProjLocation.X, calCloneBroProjLocation.Y, calCloneBroProjTargetX, calCloneBroProjTargetY, type, damage, 0f, Main.myPlayer, 0f, 0f); - } - } - } - } - else - { - if (npc.ai[1] == 1f) - { - // Set damage - npc.damage = npc.defDamage; - - SoundEngine.PlaySound(SoundID.Roar, npc.Center); - npc.rotation = calCloneBroRotation; - - float calCloneBroChargeSpeed = 14f + (death ? 4f * (1f - lifeRatio) : 0f); - calCloneBroChargeSpeed += 3f * enrageScale; - if (expertMode) - calCloneBroChargeSpeed += 2f; - if (revenge) - calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) - calCloneBroChargeSpeed *= 1.25f; - - Vector2 calCloneBroChargeCenter = npc.Center; - float calCloneBroChargeTargetXDist = player.Center.X - calCloneBroChargeCenter.X; - float calCloneBroChargeTargetYDist = player.Center.Y - calCloneBroChargeCenter.Y; - float calCloneBroChargeTargetDistance = (float)Math.Sqrt(calCloneBroChargeTargetXDist * calCloneBroChargeTargetXDist + calCloneBroChargeTargetYDist * calCloneBroChargeTargetYDist); - calCloneBroChargeTargetDistance = calCloneBroChargeSpeed / calCloneBroChargeTargetDistance; - npc.velocity.X = calCloneBroChargeTargetXDist * calCloneBroChargeTargetDistance; - npc.velocity.Y = calCloneBroChargeTargetYDist * calCloneBroChargeTargetDistance; - npc.ai[1] = 2f; - - if (Main.zenithWorld) - { - SoundEngine.PlaySound(SupremeCalamitas.SupremeCalamitas.BrimstoneShotSound, npc.Center); - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(ModContent.ProjectileType()); - if (bossRush) - damage /= 2; - - int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4; - float radians = MathHelper.TwoPi / totalProjectiles; - float velocity = 5f; - Vector2 spinningPoint = new Vector2(0f, -velocity); - float projectileVelocityToPass = velocity * 3f; - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileVelocityToPass); - } - - for (int i = 0; i < 6; i++) - Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f); - } - return; - } - - if (npc.ai[1] == 2f) - { - // Set damage - npc.damage = npc.defDamage; - - npc.ai[2] += 1f + (death ? 0.5f * (1f - lifeRatio) : 0f); - if (expertMode) - npc.ai[2] += 0.25f; - if (revenge) - npc.ai[2] += 0.25f; - - if (npc.ai[2] >= 75f) - { - // Avoid cheap bullshit - npc.damage = (int)Math.Round(npc.defDamage * 0.5); - - npc.velocity.X *= 0.93f; - npc.velocity.Y *= 0.93f; - - if (npc.velocity.X > -0.1 && npc.velocity.X < 0.1) - npc.velocity.X = 0f; - if (npc.velocity.Y > -0.1 && npc.velocity.Y < 0.1) - npc.velocity.Y = 0f; - } - else - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) - MathHelper.PiOver2; - - if (npc.ai[2] >= 105f) - { - npc.ai[3] += 1f; - npc.ai[2] = 0f; - npc.target = 255; - npc.rotation = calCloneBroRotation; - if (npc.ai[3] >= 3f) - { - npc.ai[1] = 0f; - npc.ai[3] = 0f; - return; - } - npc.ai[1] = 1f; - } - } - } - } - - public static void VanillaCatastropheAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - if (CalamityGlobalNPC.calamitas < 0 || !Main.npc[CalamityGlobalNPC.calamitas].active) - { - if (npc.alpha < 255) - { - npc.velocity *= 0.9f; - - npc.alpha += 2; - if (npc.alpha > 255) - npc.alpha = 255; - - int dustAmount = (int)Math.Round(MathHelper.Lerp(1f, 5f, (255 - npc.alpha) / 255f)); - for (int i = 0; i < dustAmount; i++) - { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.LifeDrain, 0f, -1f, 90, default, Main.rand.NextFloat(0.5f, 2f)); - Main.dust[dust].noGravity = true; - Main.dust[dust].fadeIn = 1f; - } - } - else - npc.active = false; - - return; - } - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - CalamityGlobalNPC.catastrophe = npc.whoAmI; - - // Emit light - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), 1f, 0f, 0f); - - bool bossRush = BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool expertMode = Main.expertMode || bossRush; - - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) - npc.TargetClosest(); - - Player player = Main.player[npc.target]; - - float enrageScale = bossRush ? 1f : 0f; - if (Main.IsItDay() || bossRush) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 2f; - } - - float calCloneBroPlayerXDist = npc.position.X + (npc.width / 2) - player.position.X - (player.width / 2); - float calCloneBroPlayerYDist = npc.position.Y + npc.height - 59f - player.position.Y - (player.height / 2); - float calCloneBroRotation = (float)Math.Atan2(calCloneBroPlayerYDist, calCloneBroPlayerXDist) + MathHelper.PiOver2; - if (calCloneBroRotation < 0f) - calCloneBroRotation += MathHelper.TwoPi; - else if (calCloneBroRotation > MathHelper.TwoPi) - calCloneBroRotation -= MathHelper.TwoPi; - - float calCloneBroRotationSpeed = 0.15f; - if (npc.rotation < calCloneBroRotation) - { - if ((calCloneBroRotation - npc.rotation) > MathHelper.Pi) - npc.rotation -= calCloneBroRotationSpeed; - else - npc.rotation += calCloneBroRotationSpeed; - } - else if (npc.rotation > calCloneBroRotation) - { - if ((npc.rotation - calCloneBroRotation) > MathHelper.Pi) - npc.rotation += calCloneBroRotationSpeed; - else - npc.rotation -= calCloneBroRotationSpeed; - } - - if (npc.rotation > calCloneBroRotation - calCloneBroRotationSpeed && npc.rotation < calCloneBroRotation + calCloneBroRotationSpeed) - npc.rotation = calCloneBroRotation; - if (npc.rotation < 0f) - npc.rotation += MathHelper.TwoPi; - else if (npc.rotation > MathHelper.TwoPi) - npc.rotation -= MathHelper.TwoPi; - if (npc.rotation > calCloneBroRotation - calCloneBroRotationSpeed && npc.rotation < calCloneBroRotation + calCloneBroRotationSpeed) - npc.rotation = calCloneBroRotation; - - if (!player.active || player.dead) - { - npc.TargetClosest(false); - player = Main.player[npc.target]; - if (!player.active || player.dead) - { - if (npc.velocity.Y > 3f) - npc.velocity.Y = 3f; - npc.velocity.Y -= 0.1f; - if (npc.velocity.Y < -12f) - npc.velocity.Y = -12f; - - if (npc.timeLeft > 60) - npc.timeLeft = 60; - - if (npc.ai[1] != 0f) - { - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.netUpdate = true; - } - - return; - } - } - - if (npc.ai[1] == 0f) - { - // Avoid cheap bullshit - npc.damage = (int)Math.Round(npc.defDamage * 0.5); - - float calCloneBroProjAttackMaxSpeed = 4.5f; - float calCloneBroProjAttackAccel = 0.2f; - calCloneBroProjAttackMaxSpeed += 2f * enrageScale; - calCloneBroProjAttackAccel += 0.1f * enrageScale; - - if (Main.getGoodWorld) - { - calCloneBroProjAttackMaxSpeed *= 1.15f; - calCloneBroProjAttackAccel *= 1.15f; - } - - int calCloneBroProjAttackDirection = 1; - if (npc.Center.X < player.Center.X) - calCloneBroProjAttackDirection = -1; - - Vector2 calCloneBroProjLocation = npc.Center; - float calCloneBroProjTargetX = player.Center.X + (calCloneBroProjAttackDirection * 180) - calCloneBroProjLocation.X; - float calCloneBroProjTargetY = player.Center.Y - calCloneBroProjLocation.Y; - float calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); - - if (expertMode) - { - if (calCloneBroProjTargetDist > 300f) - calCloneBroProjAttackMaxSpeed += 0.5f; - if (calCloneBroProjTargetDist > 400f) - calCloneBroProjAttackMaxSpeed += 0.5f; - if (calCloneBroProjTargetDist > 500f) - calCloneBroProjAttackMaxSpeed += 0.55f; - if (calCloneBroProjTargetDist > 600f) - calCloneBroProjAttackMaxSpeed += 0.55f; - if (calCloneBroProjTargetDist > 700f) - calCloneBroProjAttackMaxSpeed += 0.6f; - if (calCloneBroProjTargetDist > 800f) - calCloneBroProjAttackMaxSpeed += 0.6f; - } - - calCloneBroProjTargetDist = calCloneBroProjAttackMaxSpeed / calCloneBroProjTargetDist; - calCloneBroProjTargetX *= calCloneBroProjTargetDist; - calCloneBroProjTargetY *= calCloneBroProjTargetDist; - - if (npc.velocity.X < calCloneBroProjTargetX) - { - npc.velocity.X += calCloneBroProjAttackAccel; - if (npc.velocity.X < 0f && calCloneBroProjTargetX > 0f) - npc.velocity.X += calCloneBroProjAttackAccel; - } - else if (npc.velocity.X > calCloneBroProjTargetX) - { - npc.velocity.X -= calCloneBroProjAttackAccel; - if (npc.velocity.X > 0f && calCloneBroProjTargetX < 0f) - npc.velocity.X -= calCloneBroProjAttackAccel; - } - if (npc.velocity.Y < calCloneBroProjTargetY) - { - npc.velocity.Y += calCloneBroProjAttackAccel; - if (npc.velocity.Y < 0f && calCloneBroProjTargetY > 0f) - npc.velocity.Y += calCloneBroProjAttackAccel; - } - else if (npc.velocity.Y > calCloneBroProjTargetY) - { - npc.velocity.Y -= calCloneBroProjAttackAccel; - if (npc.velocity.Y > 0f && calCloneBroProjTargetY < 0f) - npc.velocity.Y -= calCloneBroProjAttackAccel; - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= (180f - (death ? 90f * (1f - lifeRatio) : 0f))) - { - npc.ai[1] = 1f; - npc.ai[2] = 0f; - npc.target = 255; - npc.netUpdate = true; - } - - bool fireDelay = npc.ai[2] > 120f || lifeRatio < 0.9f; - if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height) && fireDelay) - { - npc.localAI[2] += 1f; - if (npc.localAI[2] > 36f) - { - npc.localAI[2] = 0f; - SoundEngine.PlaySound(SoundID.Item34, npc.Center); - } - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.localAI[1] += 1f; - if (revenge) - npc.localAI[1] += 0.5f; - - if (npc.localAI[1] > 50f) - { - npc.localAI[1] = 0f; - float calCloneBroProjSpeed = death ? 14f : 12f; - calCloneBroProjSpeed += 3f * enrageScale; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - calCloneBroProjLocation = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); - calCloneBroProjTargetX = player.position.X + (player.width / 2) - calCloneBroProjLocation.X; - calCloneBroProjTargetY = player.position.Y + (player.height / 2) - calCloneBroProjLocation.Y; - calCloneBroProjTargetDist = (float)Math.Sqrt(calCloneBroProjTargetX * calCloneBroProjTargetX + calCloneBroProjTargetY * calCloneBroProjTargetY); - calCloneBroProjTargetDist = calCloneBroProjSpeed / calCloneBroProjTargetDist; - calCloneBroProjTargetX *= calCloneBroProjTargetDist; - calCloneBroProjTargetY *= calCloneBroProjTargetDist; - calCloneBroProjTargetY += npc.velocity.Y * 0.5f; - calCloneBroProjTargetX += npc.velocity.X * 0.5f; - calCloneBroProjLocation.X -= calCloneBroProjTargetX; - calCloneBroProjLocation.Y -= calCloneBroProjTargetY; - Projectile.NewProjectile(npc.GetSource_FromAI(), calCloneBroProjLocation.X, calCloneBroProjLocation.Y, calCloneBroProjTargetX, calCloneBroProjTargetY, type, damage, 0f, Main.myPlayer, 0f, 0f); - } - } - } - } - else - { - if (npc.ai[1] == 1f) - { - // Set damage - npc.damage = npc.defDamage; - - SoundEngine.PlaySound(SoundID.Roar, npc.Center); - npc.rotation = calCloneBroRotation; - - float calCloneBroChargeSpeed = (NPC.AnyNPCs(ModContent.NPCType()) ? 12f : 16f) + (death ? 4f * (1f - lifeRatio) : 0f); - calCloneBroChargeSpeed += 4f * enrageScale; - if (expertMode) - calCloneBroChargeSpeed += 2f; - if (revenge) - calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) - calCloneBroChargeSpeed *= 1.25f; - - Vector2 calCloneBroChargeCenter = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height * 0.5f); - float calCloneBroChargeTargetXDist = player.position.X + (player.width / 2) - calCloneBroChargeCenter.X; - float calCloneBroChargeTargetYDist = player.position.Y + (player.height / 2) - calCloneBroChargeCenter.Y; - float calCloneBroChargeTargetDistance = (float)Math.Sqrt(calCloneBroChargeTargetXDist * calCloneBroChargeTargetXDist + calCloneBroChargeTargetYDist * calCloneBroChargeTargetYDist); - calCloneBroChargeTargetDistance = calCloneBroChargeSpeed / calCloneBroChargeTargetDistance; - npc.velocity.X = calCloneBroChargeTargetXDist * calCloneBroChargeTargetDistance; - npc.velocity.Y = calCloneBroChargeTargetYDist * calCloneBroChargeTargetDistance; - npc.ai[1] = 2f; - - if (Main.zenithWorld) - { - SoundEngine.PlaySound(SupremeCalamitas.SupremeCalamitas.BrimstoneShotSound, npc.Center); - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(ModContent.ProjectileType()); - if (bossRush) - damage /= 2; - - int totalProjectiles = bossRush ? 12 : death ? 10 : revenge ? 8 : expertMode ? 6 : 4; - float radians = MathHelper.TwoPi / totalProjectiles; - float velocity = 5f; - Vector2 spinningPoint = new Vector2(0f, -velocity); - float projectileVelocityToPass = velocity * 3f; - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 velocity2 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity2, type, damage, 0f, Main.myPlayer, 0f, 0f, projectileVelocityToPass); - } - - for (int i = 0; i < 6; i++) - Dust.NewDust(npc.position + npc.velocity, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, 0f); - } - return; - } - - if (npc.ai[1] == 2f) - { - // Set damage - npc.damage = npc.defDamage; - - npc.ai[2] += 1f + (death ? 0.5f * (1f - lifeRatio) : 0f); - if (expertMode) - npc.ai[2] += 0.25f; - if (revenge) - npc.ai[2] += 0.25f; - - if (npc.ai[2] >= 60f) //50 - { - // Avoid cheap bullshit - npc.damage = (int)Math.Round(npc.defDamage * 0.5); - - npc.velocity.X *= 0.93f; - npc.velocity.Y *= 0.93f; - - if (npc.velocity.X > -0.1 && npc.velocity.X < 0.1) - npc.velocity.X = 0f; - if (npc.velocity.Y > -0.1 && npc.velocity.Y < 0.1) - npc.velocity.Y = 0f; - } - else - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) - MathHelper.PiOver2; - - if (npc.ai[2] >= 90f) //80 - { - npc.ai[3] += 1f; - npc.ai[2] = 0f; - npc.rotation = calCloneBroRotation; - if (npc.ai[3] >= 4f) - { - npc.ai[1] = 0f; - npc.ai[3] = 0f; - return; - } - npc.ai[1] = 1f; - } - } - } - } - } -} diff --git a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs deleted file mode 100644 index 281d6b94ab..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/OldDukeAI.cs +++ /dev/null @@ -1,1702 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; -using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; -using CalamityMod.Particles; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.Systems; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class OldDukeAI - { - public static void VanillaOldDukeAI(NPC npc, Mod mod) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - OldDuke.OldDuke modNPC = npc.ModNPC(); - - npc.Calamity().canBreakPlayerDefense = true; - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Variables - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - float exhaustionGateValue = 360f; - if (Main.getGoodWorld) - exhaustionGateValue *= 0.5f; - - float numberOfAttacksBeforeExhaustion = 12f; - float exhaustionIncreasePerAttack = exhaustionGateValue * (1f / numberOfAttacksBeforeExhaustion); - bool exhausted = calamityGlobalNPC.newAI[1] == 1f; - bool phase2 = lifeRatio <= (death ? OldDuke.OldDuke.LifePercentagePhase2_Death : revenge ? OldDuke.OldDuke.LifePercentagePhase2_Revenge : OldDuke.OldDuke.LifePercentagePhase2_Normal); - bool phase3 = lifeRatio <= (death ? OldDuke.OldDuke.LifePercentagePhase3_Death : (revenge ? OldDuke.OldDuke.LifePercentagePhase3_Revenge : OldDuke.OldDuke.LifePercentagePhase3_Expert)) && expertMode; - bool phase2AI = npc.ai[0] > 4f; - bool phase3AI = npc.ai[0] > 9f; - - int phase = (npc.ModNPC as OldDuke.OldDuke).Phase; - - bool charging = npc.ai[3] < 10f; - float pie = (float)Math.PI; - - if (calamityGlobalNPC.newAI[0] >= exhaustionGateValue) - calamityGlobalNPC.newAI[1] = 1f; - - float alphaScale = (255 - npc.alpha) / 255f; - float redLight = (phase3AI ? 0.4f : phase2AI ? 0.64f : 0.88f) * alphaScale; - float greenLight = (phase3AI ? 1.2f : phase2AI ? 0.8f : 0.4f) * alphaScale; - Lighting.AddLight((int)((npc.position.X + (npc.width / 2)) / 16f), (int)((npc.position.Y + (npc.height / 2)) / 16f), redLight, greenLight, 0f); - - if (CalamityServerConfig.Instance.BossesStopWeather) - CalamityWorld.StopRain(); - else if (!Main.raining && !BossRushEvent.BossRushActive) - CalamityWorld.StartRain(); - - // Adjust stats - int setDamage = npc.defDamage; - calamityGlobalNPC.DR = exhausted ? 0f : 0.5f; - npc.defense = exhausted ? 0 : npc.defDefense; - if (phase3AI) - { - setDamage = (int)Math.Round(setDamage * 1.2); - npc.defense = exhausted ? 0 : npc.defDefense - 40; - } - else if (phase2AI) - { - setDamage = (int)Math.Round(setDamage * 1.1); - npc.defense = exhausted ? 0 : npc.defDefense - 20; - } - - int idlePhaseTimer = expertMode ? 55 : 60; - float idlePhaseAcceleration = expertMode ? 0.75f : 0.7f; - float idlePhaseVelocity = expertMode ? 14f : 13f; - if (phase3AI) - { - idlePhaseAcceleration = expertMode ? 0.6f : 0.55f; - idlePhaseVelocity = expertMode ? 12f : 11f; - } - else if (phase2AI & charging) - { - idlePhaseAcceleration = expertMode ? 0.8f : 0.75f; - idlePhaseVelocity = expertMode ? 15f : 14f; - } - - int chargeTime = expertMode ? 34 : 36; - float chargeVelocity = expertMode ? 20f : 19f; - if (phase3AI) - { - chargeTime = expertMode ? 28 : 30; - chargeVelocity = expertMode ? 26f : 25f; - } - else if (charging & phase2AI) - { - chargeTime = expertMode ? 31 : 33; - chargeVelocity = expertMode ? 24f : 23f; - } - - if (bossRush) - { - idlePhaseTimer = 35; - idlePhaseAcceleration *= 1.25f; - idlePhaseVelocity *= 1.2f; - chargeTime -= 3; - chargeVelocity *= 1.25f; - } - else if (death) - { - idlePhaseTimer = 51; - idlePhaseAcceleration *= 1.05f; - idlePhaseVelocity *= 1.05f; - chargeTime -= 2; - chargeVelocity *= 1.1f; - } - else if (revenge) - { - idlePhaseTimer = 53; - idlePhaseAcceleration *= 1.025f; - idlePhaseVelocity *= 1.025f; - chargeTime -= 1; - chargeVelocity *= 1.05f; - } - - // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge) - chargeVelocity *= 1.25f; - - if (exhausted) - idlePhaseVelocity *= 0.25f; - - // Variables - int maxToothBallBelches = bossRush ? 5 : death ? 4 : 3; - int toothBallBelchPhaseDivisor = bossRush ? 24 : death ? 30 : 40; - int toothBallBelchPhaseTimer = toothBallBelchPhaseDivisor * maxToothBallBelches; - float toothBallBelchPhaseAcceleration = bossRush ? 0.95f : death ? 0.6f : 0.55f; - float toothBallBelchPhaseVelocity = bossRush ? 14f : death ? 10f : 9f; - float toothBallFinalVelocity = death ? 14f : revenge ? 13f : 12f; - float goreVelocityX = death ? 8f : revenge ? 7.5f : expertMode ? 7f : 6f; - float goreVelocityY = death ? 10.5f : revenge ? 10f : expertMode ? 9.5f : 8f; - float sharkronVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; - int attackTimer = 120; - int phaseTransitionTimer = 180; - int teleportPauseTimer = 30; - int toothBallSpinPhaseDivisor = bossRush ? 27 : death ? 32 : 45; - int toothBallSpinTimer = maxToothBallBelches * toothBallSpinPhaseDivisor; - float spinTime = toothBallSpinTimer / 2f; - float toothBallSpinToothBallVelocity = bossRush ? 14f : death ? 9.5f : 9f; - float spinAttackSpeed = Main.zenithWorld ? 44f : 22f; - float spinSpeed = MathHelper.TwoPi / spinTime; - - Player player = Main.player[npc.target]; - - // Get target - if (npc.target < 0 || npc.target == Main.maxPlayers || player.dead || !player.active) - { - npc.TargetClosest(); - player = Main.player[npc.target]; - npc.netUpdate = true; - } - - // Despawn safety, make sure to target another player if the current player target is too far away - if (Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) - npc.TargetClosest(); - - // Despawn - if (player.dead || Vector2.Distance(player.Center, npc.Center) > 8800f) - { - npc.TargetClosest(); - - npc.velocity.Y -= 0.4f; - - if (npc.timeLeft > 10) - npc.timeLeft = 10; - - if (npc.timeLeft == 1) - { - AcidRainEvent.AccumulatedKillPoints = 0; - AcidRainEvent.HasTriedToSummonOldDuke = false; - AcidRainEvent.UpdateInvasion(false); - npc.timeLeft = 0; - } - - if (npc.ai[0] > 4f) - npc.ai[0] = 5f; - else - npc.ai[0] = 0f; - - npc.ai[2] = 0f; - } - - if (exhausted) - { - npc.Calamity().canBreakPlayerDefense = false; - - // Play exhausted sound - if (calamityGlobalNPC.newAI[0] % 60f == 0f && Main.LocalPlayer.active && !Main.LocalPlayer.dead && Vector2.Distance(Main.LocalPlayer.Center, npc.Center) < 2800f) - SoundEngine.PlaySound(OldDuke.OldDuke.HuffSound with { Volume = OldDuke.OldDuke.HuffSound.Volume * 1.25f }, Main.LocalPlayer.Center); - - if (Main.zenithWorld) - { - float screenShakePower = 10 * Utils.GetLerpValue(800f, 0f, npc.Distance(Main.LocalPlayer.Center), true); - if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < screenShakePower) - Main.LocalPlayer.Calamity().GeneralScreenShakePower = screenShakePower; - - if (calamityGlobalNPC.newAI[0] == exhaustionGateValue) - SoundEngine.PlaySound(SoundID.NPCDeath64 with { Pitch = SoundID.NPCDeath64.Pitch - 0.9f, Volume = SoundID.NPCDeath64.Volume + 0.4f }, player.Center); // fart - - if (Main.netMode != NetmodeID.MultiplayerClient && calamityGlobalNPC.newAI[0] % 5f == 0f) - { - Vector2 dist = player.Center - npc.Center; - dist.Normalize(); - dist *= 3; - dist.X += Main.rand.NextFloat(-0.5f, 0.5f); - dist.Y += Main.rand.NextFloat(-0.5f, 0.5f); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, -dist, type, damage, 0, Main.myPlayer); - } - } - - calamityGlobalNPC.newAI[0] -= bossRush ? 1.5f : 1f; - if (calamityGlobalNPC.newAI[0] <= 0f) - { - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.newAI[1] = 0f; - } - } - - // Enrage variable - bool enrage = !bossRush && - (player.position.Y < 300f || player.position.Y > Main.worldSurface * 16.0 || - (player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000))); - - // Check for the flipped Abyss - if (Main.remixWorld) - { - enrage = !bossRush && - (player.position.Y < Main.UnderworldLayer * 16 * 0.8f || player.position.Y > Main.UnderworldLayer * 16 || - (player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000))); - } - - // Enrage - if (enrage) - { - if (npc.localAI[1] > 0f) - npc.localAI[1] -= 1f; - } - else - npc.localAI[1] = CalamityGlobalNPC.biomeEnrageTimerMax; - - bool biomeEnraged = npc.localAI[1] <= 0f; - - npc.Calamity().CurrentlyEnraged = biomeEnraged || bossRush; - - // Increased DR while transitioning phases and not exhausted - if (!exhausted) - calamityGlobalNPC.DR = (npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f) ? (bossRush ? 0.99f : 0.75f) : 0.5f; - - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = npc.ai[0] == -1f || npc.ai[0] == 4f || npc.ai[0] == 9f; - - // Enrage - if (biomeEnraged) - { - toothBallBelchPhaseTimer = 60; - toothBallBelchPhaseDivisor = 20; - toothBallBelchPhaseAcceleration = 1f; - toothBallBelchPhaseVelocity = 15f; - goreVelocityX = 12f; - goreVelocityY = 16f; - sharkronVelocity = 20f; - idlePhaseTimer = 20; - idlePhaseAcceleration = 1.2f; - idlePhaseVelocity = 20f; - chargeTime = 25; - chargeVelocity += 8f; - toothBallSpinPhaseDivisor = 24; - toothBallSpinToothBallVelocity = 15f; - setDamage *= 2; - npc.defense = npc.defDefense * 3; - } - - // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge) - chargeTime *= 2; - - // Set variables for spawn effects - if (npc.localAI[0] == 0f) - { - npc.alpha = 255; - - npc.velocity.Y = -12f; - npc.velocity.X = Main.rand.NextFloat(-2f, 2f); - - npc.localAI[0] = 1f; - npc.rotation = 0f; - if (Main.netMode != NetmodeID.MultiplayerClient) - { - npc.ai[0] = -1f; - npc.netUpdate = true; - } - } - - // Rotation - float rateOfRotation = 0.04f; - if (npc.ai[0] == 1f || npc.ai[0] == 6f || npc.ai[0] == 7f || npc.ai[0] == 14f) - rateOfRotation = 0f; - if (npc.ai[0] == 3f || npc.ai[0] == 4f) - rateOfRotation = 0.01f; - if (npc.ai[0] == 8f || npc.ai[0] == 13f) - rateOfRotation = 0.05f; - - Vector2 rotationVector = player.Center - npc.Center; - if (calamityGlobalNPC.newAI[1] != 1f && !player.dead) - { - // Rotate to show direction of predictive charge - if (npc.ai[0] == 0f && !phase2) - { - if (npc.ai[3] < 6f) - { - rateOfRotation = 0.1f; - rotationVector = Vector2.Normalize(player.Center + player.velocity * 20f - npc.Center) * chargeVelocity; - } - } - else if (npc.ai[0] == 5f && !phase3) - { - if (npc.ai[3] < 4f) - { - rateOfRotation = 0.1f; - rotationVector = Vector2.Normalize(player.Center + player.velocity * 20f - npc.Center) * chargeVelocity; - } - } - else if (npc.ai[0] == 10f) - { - if (npc.ai[3] < 8f && npc.ai[3] != 1f && npc.ai[3] != 4f) - { - rateOfRotation = 0.1f; - rotationVector = Vector2.Normalize(player.Center + player.velocity * 20f - npc.Center) * chargeVelocity; - } - } - } - - float dukeRotationSpeed = (float)Math.Atan2(rotationVector.Y, rotationVector.X); - if (npc.spriteDirection == 1) - dukeRotationSpeed += pie; - if (dukeRotationSpeed < 0f) - dukeRotationSpeed += MathHelper.TwoPi; - if (dukeRotationSpeed > MathHelper.TwoPi) - dukeRotationSpeed -= MathHelper.TwoPi; - if (npc.ai[0] == -1f || npc.ai[0] == 3f || npc.ai[0] == 4f) - dukeRotationSpeed = 0f; - if (npc.ai[0] == 8f || npc.ai[0] == 13f) - dukeRotationSpeed = pie * 0.1666666667f * npc.spriteDirection; - - if (npc.rotation < dukeRotationSpeed) - { - if (dukeRotationSpeed - npc.rotation > pie) - npc.rotation -= rateOfRotation; - else - npc.rotation += rateOfRotation; - } - if (npc.rotation > dukeRotationSpeed) - { - if (npc.rotation - dukeRotationSpeed > pie) - npc.rotation += rateOfRotation; - else - npc.rotation -= rateOfRotation; - } - - if ((npc.ai[0] != 8f && npc.ai[0] != 13f) || npc.spriteDirection == 1) - { - if (npc.rotation > dukeRotationSpeed - rateOfRotation && npc.rotation < dukeRotationSpeed + rateOfRotation) - npc.rotation = dukeRotationSpeed; - if (npc.rotation < 0f) - npc.rotation += MathHelper.TwoPi; - if (npc.rotation > MathHelper.TwoPi) - npc.rotation -= MathHelper.TwoPi; - if (npc.rotation > dukeRotationSpeed - rateOfRotation && npc.rotation < dukeRotationSpeed + rateOfRotation) - npc.rotation = dukeRotationSpeed; - } - - // Alpha adjustments - if (npc.ai[0] != -1f && (npc.ai[0] < 9f || npc.ai[0] > 12f)) - { - if (Collision.SolidCollision(npc.position, npc.width, npc.height)) - npc.alpha += 15; - else - npc.alpha -= 15; - - if (npc.alpha < 0) - npc.alpha = 0; - if (npc.alpha > 150) - npc.alpha = 150; - } - - // Spawn effects - if (npc.ai[0] == -1f) - { - npc.alpha = (int)MathHelper.Lerp(npc.alpha, 0, 0.2f); - - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - if (npc.Calamity().newAI[3] == 0f) - npc.velocity *= 0.98f; - - // Direction - int dukeFaceDirection = Math.Sign(player.Center.X - npc.Center.X); - if (dukeFaceDirection != 0) - { - npc.direction = dukeFaceDirection; - npc.spriteDirection = -npc.direction; - } - - // Alpha - if (npc.ai[2] > 20f) - { - npc.velocity *= 0.9f; - - npc.alpha -= 5; - if (Collision.SolidCollision(npc.position, npc.width, npc.height)) - npc.alpha += 15; - if (npc.alpha < 0) - npc.alpha = 0; - if (npc.alpha > 150) - npc.alpha = 150; - } - - if (npc.ai[2] == 75) - { - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - CalamityUtils.AddScreenshakeAt(npc.Center, 14); - SoundEngine.PlaySound(SoundID.DD2_BetsyFlameBreath.WithPitchOffset(-0.5f), npc.Center); - SoundEngine.PlaySound(OldDuke.OldDuke.DashSoundP3, npc.Center); - } - - if (npc.ai[2] >= 75f) - { - float sd = player.Center.X > npc.Center.X ? -1f : 1f; - - (npc.ModNPC as OldDuke.OldDuke).shake = 2f; - npc.rotation = MathHelper.Lerp(MathHelper.WrapAngle(npc.rotation), MathHelper.ToRadians(sd == 1f ? 75f : -75f), 0.2f); - - if (npc.ai[2] % 5f == 1f) - { - Vector2 mouthCenter = npc.Center + new Vector2(-80 * sd, 0).RotatedBy(npc.rotation); - - float factor = (npc.ai[2] - 75f) / 50f; - - float a = MathHelper.Lerp(1f, 0f, factor); - - GeneralParticleHandler.SpawnParticle(new CustomPulse(mouthCenter, Vector2.Zero, new Color(55, 55, 55).MultiplyRGBA(new Color(a, a, a, a)), "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.05f, 0.08f + (0.15f * factor), 10)); - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= 125f) - { - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.netUpdate = true; - } - } - - // Phase 1 - else if (npc.ai[0] == 0f && !player.dead) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((npc.Center - player.Center).X); - - Vector2 phase1IdleSpeed = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -300f) - npc.Center - npc.velocity) * idlePhaseVelocity; - npc.SimpleFlyMovement(phase1IdleSpeed, idlePhaseAcceleration); - - // Rotation and direction - int dukeLookAt = Math.Sign(player.Center.X - npc.Center.X); - if (dukeLookAt != 0) - { - if (npc.ai[2] == 0f && dukeLookAt != npc.direction) - npc.rotation += pie; - - npc.direction = dukeLookAt; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - // Phase switch - if (calamityGlobalNPC.newAI[1] != 1f || (phase2 && !phase2AI)) - { - npc.ai[2] += 1f; - if (npc.ai[2] >= idlePhaseTimer || (phase2 && !phase2AI)) - { - int oldDukeAttackPicker = 0; - switch ((int)npc.ai[3]) - { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - oldDukeAttackPicker = 1; - break; - case 6: - npc.ai[3] = 1f; - oldDukeAttackPicker = 2; - break; - case 7: - npc.ai[3] = 0f; - oldDukeAttackPicker = 3; - break; - } - - if (phase2) - oldDukeAttackPicker = 4; - - // Set velocity for charge - if (oldDukeAttackPicker == 1) - { - npc.ai[0] = 1f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - // Velocity - Vector2 distanceVector = player.Center + player.velocity * 20f - npc.Center; - npc.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - DoChargeBurst(npc, 0); - - // Direction - if (dukeLookAt != 0) - { - npc.direction = dukeLookAt; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - } - - // Tooth Balls - else if (oldDukeAttackPicker == 2) - { - npc.ai[0] = 2f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - // Call sharks from the sides of the screen - else if (oldDukeAttackPicker == 3) - { - npc.ai[0] = 3f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - // Go to phase 2 - else if (oldDukeAttackPicker == 4) - { - npc.ai[0] = 4f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - npc.netUpdate = true; - } - } - } - - // Charge - else if (npc.ai[0] == 1f) - { - // Set damage - npc.damage = setDamage; - - // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge && npc.ai[2] % 10f == 0f) - { - // Rotation and direction - int dir = Math.Sign(player.Center.X - npc.Center.X); - if (dir != 0) - { - if (npc.ai[2] == 0f && dir != npc.direction) - npc.rotation += pie; - - npc.direction = dir; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - Vector2 distanceVector = player.Center + player.velocity * 20f - npc.Center; - npc.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (dir != 0) - { - npc.direction = dir; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - } - else - { - // Accelerate - npc.velocity *= 1.01f; - } - - // Spawn dust - Vector2 vel = npc.velocity; - vel.Normalize(); - vel *= 55f; - - DoChargeVisual(npc, phase); - - GeneralParticleHandler.SpawnParticle(new SparkParticle(npc.Center + vel + vel.RotatedBy(MathHelper.ToRadians(90)), vel / 7f, false, 20, 0.75f, new Color(155, 155, 155, 55), true)); - GeneralParticleHandler.SpawnParticle(new SparkParticle(npc.Center + vel + vel.RotatedBy(MathHelper.ToRadians(-90)), vel / 7f, false, 20, 0.75f, new Color(155, 155, 155, 55), true)); - - npc.ai[2] += 1f; - if (npc.ai[2] >= chargeTime) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Tooth Ball belch - else if (npc.ai[0] == 2f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((npc.Center - player.Center).X); - - Vector2 toothBallBelchPhaseSpeed = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -300f) - npc.Center - npc.velocity) * toothBallBelchPhaseVelocity; - npc.SimpleFlyMovement(toothBallBelchPhaseSpeed, toothBallBelchPhaseAcceleration); - - // Play sounds and spawn Tooth Balls - if (npc.ai[2] == 0f) - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - if (npc.ai[2] % toothBallBelchPhaseDivisor == 0f) - { - if (npc.ai[2] != 0f) - SoundEngine.PlaySound(OldDuke.OldDuke.VomitSound, npc.Center); - - Vector2 toothBallDirection = Vector2.Normalize(player.Center - npc.Center) * (npc.width + 20) / 2f + npc.Center; - Vector2 toothBallVelocity = Vector2.Normalize(Main.player[npc.target].Center - npc.Center) * toothBallFinalVelocity; - Vector2 toothBallSpawnPos = new Vector2(toothBallDirection.X, toothBallDirection.Y + 45f); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int toothBall = NPC.NewNPC(npc.GetSource_FromAI(), (int)toothBallSpawnPos.X, (int)toothBallSpawnPos.Y, ModContent.NPCType(), 0, toothBallVelocity.X, toothBallVelocity.Y); - Main.npc[toothBall].velocity = Vector2.Normalize(toothBallVelocity) * npc.velocity.Length(); - Main.npc[toothBall].netUpdate = true; - } - - for (int i = 0; i < 50; i++) - { - int dustID; - switch (Main.rand.Next(6)) - { - case 0: - case 1: - case 2: - case 3: - dustID = (int)CalamityDusts.SulphurousSeaAcid; - break; - default: - dustID = DustID.Blood; - break; - } - - // Choose a random speed and angle to belch out the vomit - float dustSpeed = Main.rand.NextFloat(3.0f, 12.0f); - float angleRandom = 0.06f; - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(toothBallVelocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - // Pick a size for the vomit particles - float scale = Main.rand.NextFloat(1f, 2f); - - // Actually spawn the vomit - int idx = Dust.NewDust(toothBallSpawnPos, 40, 40, dustID, dustVel.X, dustVel.Y, 0, default, scale); - Main.dust[idx].noGravity = true; - } - } - - // Direction - int toothBallLookAt = Math.Sign(player.Center.X - npc.Center.X); - if (toothBallLookAt != 0) - { - npc.direction = toothBallLookAt; - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - npc.spriteDirection = -npc.direction; - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= toothBallBelchPhaseTimer) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Call sharks from the sides of the screen - else if (npc.ai[0] == 3f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - npc.velocity *= 0.98f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - - // Play sound and spawn sharks - if (npc.ai[2] == attackTimer - 30) - SoundEngine.PlaySound(OldDuke.OldDuke.VomitSound, npc.Center); - - if (npc.ai[2] >= attackTimer - 90) - { - if (npc.ai[2] % 18f == 0f) - { - calamityGlobalNPC.newAI[2] += 100f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 900f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 900f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - - if (Main.getGoodWorld) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 1800f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 1800f), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - } - } - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= attackTimer) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - calamityGlobalNPC.newAI[2] = 0f; - npc.ai[0] = 0f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Transition to phase 2 and call sharks from below - else if (npc.ai[0] == 4f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - npc.velocity *= 0.98f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - - // Sound - if (npc.ai[2] == phaseTransitionTimer - 60) - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - if (npc.ai[2] >= phaseTransitionTimer - 60) - { - if (npc.ai[2] % 18f == 0f) - { - calamityGlobalNPC.newAI[2] += 150f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); - - if (Main.getGoodWorld) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); - } - } - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= phaseTransitionTimer) - { - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - npc.ai[0] = 5f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Phase 2 - else if (npc.ai[0] == 5f && !player.dead) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((npc.Center - player.Center).X); - - Vector2 dukePhase2IdleSpeed = Vector2.Normalize(player.Center + new Vector2(npc.ai[1], -300f) - npc.Center - npc.velocity) * idlePhaseVelocity; - npc.SimpleFlyMovement(dukePhase2IdleSpeed, idlePhaseAcceleration); - - // Direction and rotation - int phase2FaceDirection = Math.Sign(player.Center.X - npc.Center.X); - if (phase2FaceDirection != 0) - { - if (npc.ai[2] == 0f && phase2FaceDirection != npc.direction) - npc.rotation += pie; - - npc.direction = phase2FaceDirection; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - // Phase switch - if (calamityGlobalNPC.newAI[1] != 1f || (phase3 && !phase3AI)) - { - npc.ai[2] += 1f; - if (npc.ai[2] >= idlePhaseTimer || (phase3 && !phase3AI)) - { - int phase2AttackPicker = 0; - switch ((int)npc.ai[3]) - { - case 0: - case 1: - case 2: - case 3: - phase2AttackPicker = 1; - break; - case 4: - npc.ai[3] = 1f; - phase2AttackPicker = 2; - break; - case 5: - npc.ai[3] = 0f; - phase2AttackPicker = 3; - break; - } - - if (phase3) - phase2AttackPicker = 4; - - // Set velocity for charge - if (phase2AttackPicker == 1) - { - npc.ai[0] = 6f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - // Velocity and rotation - Vector2 distanceVector = player.Center + player.velocity * 20f - npc.Center; - npc.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (phase2FaceDirection != 0) - { - npc.direction = phase2FaceDirection; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - DoChargeBurst(npc, 1); - } - - // Set velocity for spin - else if (phase2AttackPicker == 2) - { - // Velocity and rotation - npc.velocity = Vector2.Normalize(player.Center - npc.Center) * spinAttackSpeed; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (phase2FaceDirection != 0) - { - npc.direction = phase2FaceDirection; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - npc.ai[0] = 7f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - else if (phase2AttackPicker == 3) - { - npc.ai[0] = 8f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - // Go to next phase - else if (phase2AttackPicker == 4) - { - npc.ai[0] = 9f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - npc.netUpdate = true; - } - } - } - - // Charge - else if (npc.ai[0] == 6f) - { - // Set damage - npc.damage = setDamage; - - // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge && npc.ai[2] % 8f == 0f) - { - // Rotation and direction - int dir = Math.Sign(player.Center.X - npc.Center.X); - if (dir != 0) - { - if (npc.ai[2] == 0f && dir != npc.direction) - npc.rotation += pie; - - npc.direction = dir; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - Vector2 distanceVector = player.Center + player.velocity * 20f - npc.Center; - npc.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (dir != 0) - { - npc.direction = dir; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - } - else - { - // Accelerate - npc.velocity *= 1.01f; - } - - DoChargeVisual(npc, phase); - - npc.ai[2] += 1f; - if (npc.ai[2] >= chargeTime) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - npc.ai[0] = 5f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Tooth Ball and Vortex spin - else if (npc.ai[0] == 7f) - { - // Set damage - npc.damage = 0; - - // Play sounds and spawn Tooth Balls and a Vortex - if (npc.ai[2] == 0f) - { - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - SoundEngine.PlaySound(OldDuke.OldDuke.VortexSpawnSound, npc.Center); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 vortexSpawn = npc.Center + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / MathHelper.TwoPi; - if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(npc.GetSource_FromAI(), vortexSpawn, Vector2.Zero, type, damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y); - } - - if (npc.ai[2] % toothBallSpinPhaseDivisor == 0f) - { - if (npc.ai[2] != 0f) - SoundEngine.PlaySound(OldDuke.OldDuke.VomitSound, npc.Center); - - Vector2 phase2ToothBallDirection = Vector2.Normalize(npc.velocity) * (npc.width + 20) / 2f + npc.Center; - Vector2 toothBallVelocity = Vector2.Normalize(npc.velocity).RotatedBy(MathHelper.PiOver2 * npc.direction) * toothBallSpinToothBallVelocity; - Vector2 toothBallSpawnPos = new Vector2(phase2ToothBallDirection.X, phase2ToothBallDirection.Y + 45f); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int toothBall = NPC.NewNPC(npc.GetSource_FromAI(), (int)toothBallSpawnPos.X, (int)toothBallSpawnPos.Y, ModContent.NPCType(), 0, toothBallVelocity.X, toothBallVelocity.Y); - Main.npc[toothBall].target = npc.target; - Main.npc[toothBall].velocity = Vector2.Normalize(toothBallVelocity) * toothBallSpinToothBallVelocity * 0.5f; - Main.npc[toothBall].netUpdate = true; - Main.npc[toothBall].ai[3] = 30f; - } - - for (int i = 0; i < 50; i++) - { - int dustID; - switch (Main.rand.Next(6)) - { - case 0: - case 1: - case 2: - case 3: - dustID = (int)CalamityDusts.SulphurousSeaAcid; - break; - default: - dustID = DustID.Blood; - break; - } - - // Choose a random speed and angle to belch out the vomit - float dustSpeed = Main.rand.NextFloat(3.0f, 12.0f); - float angleRandom = 0.06f; - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(toothBallVelocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - // Pick a size for the vomit particles - float scale = Main.rand.NextFloat(1f, 2f); - - // Actually spawn the vomit - int idx = Dust.NewDust(toothBallSpawnPos, 40, 40, dustID, dustVel.X, dustVel.Y, 0, default, scale); - Main.dust[idx].noGravity = true; - } - } - - // Velocity and rotation - npc.velocity = npc.velocity.RotatedBy(-(double)spinSpeed * (float)npc.direction); - npc.rotation -= spinSpeed * npc.direction; - - npc.ai[2] += 1f; - if (npc.ai[2] >= toothBallSpinTimer) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - npc.ai[0] = 5f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Vomit a huge amount of gore into the sky and call sharks from the sides of the screen - else if (npc.ai[0] == 8f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - npc.velocity *= 0.98f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - - // Play sound - if (npc.ai[2] == attackTimer - 30) - { - SoundEngine.PlaySound(OldDuke.OldDuke.VomitSound, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 phase2GoreDirection = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + npc.Center; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; - for (int i = 0; i < totalGore; i++) - { - float velocityX = npc.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - - if (Main.getGoodWorld) - { - velocityX *= Main.rand.NextFloat() + 0.5f; - velocityY *= Main.rand.NextFloat() + 0.5f; - } - - Projectile.NewProjectile(npc.GetSource_FromAI(), phase2GoreDirection.X, phase2GoreDirection.Y, velocityX, -velocityY, type, damage, 0f, Main.myPlayer, 0f, 0f); - } - } - } - - if (npc.ai[2] >= attackTimer - 90) - { - if (npc.ai[2] % 18f == 0f) - { - calamityGlobalNPC.newAI[2] += 100f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float x = 900f - calamityGlobalNPC.newAI[2]; - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - } - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= attackTimer) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - calamityGlobalNPC.newAI[2] = 0f; - npc.ai[0] = 5f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Transition to phase 3 and summon sharks from above - else if (npc.ai[0] == 9f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - npc.velocity *= 0.98f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - - // Sound - if (npc.ai[2] == phaseTransitionTimer - 60) - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - if (npc.ai[2] >= phaseTransitionTimer - 60) - { - if (npc.ai[2] % 18f == 0f) - { - calamityGlobalNPC.newAI[2] += 200f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, sharkronVelocity, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(npc.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, sharkronVelocity, 255); - - if (Main.getGoodWorld) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(npc.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); - } - } - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= phaseTransitionTimer) - { - calamityGlobalNPC.newAI[0] = 0f; - calamityGlobalNPC.newAI[1] = 0f; - calamityGlobalNPC.newAI[2] = 0f; - npc.ai[0] = 10f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Phase 3 - else if (npc.ai[0] == 10f && !player.dead) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Alpha - npc.alpha -= 25; - if (npc.alpha < 0) - npc.alpha = 0; - - // Movement location - if (npc.ai[1] == 0f) - npc.ai[1] = 500 * Math.Sign((npc.Center - player.Center).X); - - Vector2 desiredVelocity = Vector2.Normalize(player.Center + new Vector2(-npc.ai[1], -300f) - npc.Center - npc.velocity) * idlePhaseVelocity; - npc.SimpleFlyMovement(desiredVelocity, idlePhaseAcceleration); - - // Rotation and direction - int phase3FaceDirection = Math.Sign(player.Center.X - npc.Center.X); - if (phase3FaceDirection != 0) - { - if (npc.ai[2] == 0f && phase3FaceDirection != npc.direction) - { - npc.rotation += pie; - for (int l = 0; l < npc.oldPos.Length; l++) - npc.oldPos[l] = Vector2.Zero; - } - - npc.direction = phase3FaceDirection; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - // Phase switch - if (calamityGlobalNPC.newAI[1] != 1f) - { - npc.ai[2] += 1f; - if (npc.ai[2] >= idlePhaseTimer) - { - int phase3AttackPicker = 0; - switch ((int)npc.ai[3]) - { - case 0: - case 2: - case 3: - case 5: - case 6: - case 7: - phase3AttackPicker = 1; - break; - case 1: - case 8: - phase3AttackPicker = 2; - break; - case 4: - npc.ai[3] = 1f; - phase3AttackPicker = 3; - break; - case 9: - npc.ai[3] = 6f; - phase3AttackPicker = 4; - break; - } - - // Set velocity for charge - if (phase3AttackPicker == 1) - { - npc.ai[0] = 11f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - // Velocity and rotation - Vector2 distanceVector = player.Center + player.velocity * 20f - npc.Center; - npc.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (phase3FaceDirection != 0) - { - npc.direction = phase3FaceDirection; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - DoChargeBurst(npc, 2); - } - - // Pause - else if (phase3AttackPicker == 2) - { - npc.ai[0] = 12f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - else if (phase3AttackPicker == 3) - { - npc.ai[0] = 13f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - // Set velocity for spin - else if (phase3AttackPicker == 4) - { - // Velocity and rotation - npc.velocity = Vector2.Normalize(player.Center - npc.Center) * spinAttackSpeed; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (phase3FaceDirection != 0) - { - npc.direction = phase3FaceDirection; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - npc.ai[0] = 14f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - } - - npc.netUpdate = true; - } - } - } - - // Charge - else if (npc.ai[0] == 11f) - { - // Set damage - npc.damage = setDamage; - - // The dumbest thing to ever exist - if (CalamityWorld.LegendaryMode && revenge && npc.ai[2] % 6f == 0f) - { - // Rotation and direction - int dir = Math.Sign(player.Center.X - npc.Center.X); - if (dir != 0) - { - if (npc.ai[2] == 0f && dir != npc.direction) - npc.rotation += pie; - - npc.direction = dir; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - - Vector2 distanceVector = player.Center + player.velocity * 20f - npc.Center; - npc.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X); - - // Direction - if (dir != 0) - { - npc.direction = dir; - - if (npc.spriteDirection == 1) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - } - else - { - // Accelerate - npc.velocity *= 1.01f; - } - - DoChargeVisual(npc, phase); - - npc.ai[2] += 1f; - if (npc.ai[2] >= chargeTime) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - npc.ai[0] = 10f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.ai[3] += 2f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Pause before teleport - else if (npc.ai[0] == 12f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Alpha - if (npc.alpha < 255 && npc.ai[2] >= teleportPauseTimer - 15f) - { - npc.alpha += 17; - if (npc.alpha > 255) - npc.alpha = 255; - } - - // Velocity - npc.velocity *= 0.98f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - - // Play sound - if (npc.ai[2] == teleportPauseTimer / 2) - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[2] == teleportPauseTimer - 1f) - { - // Teleport location - if (npc.ai[1] == 0f) - npc.ai[1] = 600 * Math.Sign((npc.Center - player.Center).X); - - // Rotation and direction - Vector2 center = player.Center + new Vector2(npc.ai[1], -300f); - Vector2 npcCenter = npc.Center = center; - int phase3TeleportFaceDirection = Math.Sign(player.Center.X - npcCenter.X); - if (phase3TeleportFaceDirection != 0) - { - if (npc.ai[2] == 0f && phase3TeleportFaceDirection != npc.direction) - { - npc.rotation += pie; - for (int n = 0; n < npc.oldPos.Length; n++) - npc.oldPos[n] = Vector2.Zero; - } - - npc.direction = phase3TeleportFaceDirection; - - if (npc.spriteDirection != -npc.direction) - npc.rotation += pie; - - npc.spriteDirection = -npc.direction; - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= teleportPauseTimer) - { - npc.ai[0] = 10f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - - npc.ai[3] += 2f; - if (npc.ai[3] >= 9f) - npc.ai[3] = 0f; - - npc.netUpdate = true; - } - } - - // Vomit a huge amount of gore into the sky and call sharks from the sides of the screen - else if (npc.ai[0] == 13f) - { - // Avoid cheap bullshit - npc.damage = 0; - - // Velocity - npc.velocity *= 0.98f; - npc.velocity.Y = MathHelper.Lerp(npc.velocity.Y, 0f, 0.02f); - - // Play sound - if (npc.ai[2] == attackTimer - 30) - { - SoundEngine.PlaySound(OldDuke.OldDuke.VomitSound, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 phase3GoreDirection = npc.rotation.ToRotationVector2() * (Vector2.UnitX * npc.direction) * (npc.width + 20) / 2f + npc.Center; - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; - for (int i = 0; i < totalGore; i++) - { - float velocityX = npc.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - - if (Main.getGoodWorld) - { - velocityX *= Main.rand.NextFloat() + 0.5f; - velocityY *= Main.rand.NextFloat() + 0.5f; - } - - Projectile.NewProjectile(npc.GetSource_FromAI(), phase3GoreDirection.X, phase3GoreDirection.Y, velocityX, -velocityY, type, damage, 0f, Main.myPlayer, 0f, 0f); - } - } - } - - if (npc.ai[2] >= attackTimer - 90) - { - if (npc.ai[2] % 18f == 0f) - { - calamityGlobalNPC.newAI[2] += 150f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float x = 900f - calamityGlobalNPC.newAI[2]; - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - - if (Main.getGoodWorld) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X + x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - NPC.NewNPC(npc.GetSource_FromAI(), (int)(npc.Center.X - x), (int)(npc.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, npc.whoAmI, 0f, 255); - } - } - } - } - - npc.ai[2] += 1f; - if (npc.ai[2] >= attackTimer) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - calamityGlobalNPC.newAI[2] = 0f; - npc.ai[0] = 10f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - // Tooth Ball and Vortex spin - else if (npc.ai[0] == 14f) - { - // Set damage - npc.damage = 0; - - // Play sounds and spawn Tooth Balls and a Vortex - if (npc.ai[2] == 0f) - { - modNPC.RoarSoundSlot = SoundEngine.PlaySound(OldDuke.OldDuke.RoarSound, npc.Center); - - SoundEngine.PlaySound(OldDuke.OldDuke.VortexSpawnSound, npc.Center); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - Vector2 vortexSpawn = npc.Center + npc.velocity.RotatedBy(MathHelper.PiOver2 * -npc.direction) * spinTime / MathHelper.TwoPi; - if (Main.netMode != NetmodeID.MultiplayerClient) - Projectile.NewProjectile(npc.GetSource_FromAI(), vortexSpawn, Vector2.Zero, type, damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y); - } - - if (npc.ai[2] % toothBallSpinPhaseDivisor == 0f) - { - if (npc.ai[2] != 0f) - SoundEngine.PlaySound(OldDuke.OldDuke.VomitSound, npc.Center); - - Vector2 phase3ToothBallDirection = Vector2.Normalize(npc.velocity) * (npc.width + 20) / 2f + npc.Center; - Vector2 toothBallVelocity = Vector2.Normalize(npc.velocity).RotatedBy(MathHelper.PiOver2 * npc.direction) * toothBallSpinToothBallVelocity; - Vector2 toothBallSpawnPos = new Vector2(phase3ToothBallDirection.X, phase3ToothBallDirection.Y + 45f); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int toothBall = NPC.NewNPC(npc.GetSource_FromAI(), (int)toothBallSpawnPos.X, (int)toothBallSpawnPos.Y, ModContent.NPCType(), 0, toothBallVelocity.X, toothBallVelocity.Y); - Main.npc[toothBall].target = npc.target; - Main.npc[toothBall].velocity = Vector2.Normalize(toothBallVelocity) * toothBallSpinToothBallVelocity * 0.5f; - Main.npc[toothBall].netUpdate = true; - Main.npc[toothBall].ai[3] = 60f; - } - - for (int i = 0; i < 50; i++) - { - int dustID; - switch (Main.rand.Next(6)) - { - case 0: - case 1: - case 2: - case 3: - dustID = (int)CalamityDusts.SulphurousSeaAcid; - break; - default: - dustID = DustID.Blood; - break; - } - - // Choose a random speed and angle to belch out the vomit - float dustSpeed = Main.rand.NextFloat(3.0f, 12.0f); - float angleRandom = 0.06f; - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(toothBallVelocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - // Pick a size for the vomit particles - float scale = Main.rand.NextFloat(1f, 2f); - - // Actually spawn the vomit - int idx = Dust.NewDust(toothBallSpawnPos, 40, 40, dustID, dustVel.X, dustVel.Y, 0, default, scale); - Main.dust[idx].noGravity = true; - } - } - - // Velocity and rotation - npc.velocity = npc.velocity.RotatedBy(-(double)spinSpeed * npc.direction); - npc.rotation -= spinSpeed * npc.direction; - - npc.ai[2] += 1f; - if (npc.ai[2] >= toothBallSpinTimer) - { - calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; - npc.ai[0] = 10f; - npc.ai[1] = 0f; - npc.ai[2] = 0f; - npc.TargetClosest(); - npc.netUpdate = true; - } - } - - if (SoundEngine.TryGetActiveSound(modNPC.RoarSoundSlot, out var roarSound) && roarSound.IsPlaying) - roarSound.Position = npc.Center; - } - - static Color FireGreen = new Color(155, 255, 55); - - static void DoChargeBurst(NPC npc, int phase) - { - SoundEngine.PlaySound(phase > 1 ? OldDuke.OldDuke.DashSoundP3 : OldDuke.OldDuke.DashSound, npc.Center); - - if (phase > 1) - { - for (int i = 0; i < 30; i++) - { - float fl = Main.rand.NextFloat(-60f, 60f); - GeneralParticleHandler.SpawnParticle(new SparkParticle(npc.Center + (Vector2.Zero.DirectionTo(npc.velocity) * 20f) + new Vector2(0f, fl).RotatedBy(Vector2.Zero.AngleTo(npc.velocity)), (-npc.velocity * Main.rand.NextFloat(2f)).RotatedBy(MathHelper.ToRadians(fl)), false, 25, Main.rand.NextFloat(0.3f, 1.2f), FireGreen)); - } - - CalamityUtils.AddScreenshakeAt(npc.Center, 10f, 3000f); - - SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact, npc.Center); - SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, npc.Center); - GeneralParticleHandler.SpawnParticle(new CustomPulse(npc.Center, -npc.velocity / 3f, FireGreen, "CalamityMod/Particles/DustyCircleHardEdge", new Vector2(0.4f, 1.2f), Vector2.Zero.AngleTo(npc.velocity) + (Main.rand.NextBool() ? 0 : -MathHelper.Pi), 0.05f, 0.2f, 20)); - GeneralParticleHandler.SpawnParticle(new CustomPulse(npc.Center, -npc.velocity / 2f, FireGreen, "CalamityMod/Particles/FlameExplosion", new Vector2(0.4f, 1.2f), Vector2.Zero.AngleTo(npc.velocity) + (Main.rand.NextBool() ? 0 : -MathHelper.Pi), 0.1f, 0.4f, 20)); - } - } - - static void DoChargeVisual(NPC npc, int phase) - { - float progress = npc.ai[2]; - - int chargeTime = 36; - - Color col = Color.Lerp(phase > 0 ? FireGreen : new Color(100, 100, 100, 55), new Color(55, 55, 55, 55), progress / chargeTime); - - if (phase > 1) - { - if (Math.Floor(VisualTimerSystem.GlobalVisualTimer % 6f) < 1f) - GeneralParticleHandler.SpawnParticle(new CustomPulse(npc.Center, npc.velocity / 3f, col, "CalamityMod/Particles/DustyCircleHardEdge", new Vector2(0.4f, 1f), Vector2.Zero.AngleTo(npc.velocity) + (Main.rand.NextBool() ? 0 : -MathHelper.Pi), 0.04f, 0.1f, 20)); - - (npc.ModNPC as OldDuke.OldDuke).NuclearOverlayVisual = 1f; - } - - if (Main.rand.NextBool()) - GeneralParticleHandler.SpawnParticle(new CustomSpark(npc.Center - (npc.velocity * 2f), npc.velocity / 2f, "CalamityMod/Particles/ForwardSmear", false, 10, Main.rand.NextFloat(0.3f, 0.5f), col, new Vector2(1f, Main.rand.NextFloat(1.45f, 1.6f)), fadeIn: true, extraRotation: MathHelper.ToRadians(180f))); - } - } -} diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 2a620e8b76..05ce02c117 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1614,7 +1614,7 @@ namespace CalamityMod.NPCs { NPCType(), 10800 }, // 3:00 (180 seconds) { NPCType(), 10800 }, // 3:00 (180 seconds) { NPCType(), 5400 }, // 1:30 (90 seconds) - { NPCType(), 7200 }, // 2:00 (120 seconds) + { NPCType(), 7200 }, // 2:00 (120 seconds) { NPCType(), 14400 }, // 4:00 (240 seconds) { NPCType(), 10800 }, // 3:00 (180 seconds) { NPCType(), 1200 }, // 0:20 (20 seconds) @@ -9002,7 +9002,7 @@ namespace CalamityMod.NPCs { return DownedBossSystem.downedGuardians; } - else if (type == NPCType()) + else if (type == NPCType()) { return DownedBossSystem.downedDragonfolly; } diff --git a/NPCs/NormalNPCs/WildBumblebirb.cs b/NPCs/NormalNPCs/WildBumblebirb.cs new file mode 100644 index 0000000000..7ffe5fe3a8 --- /dev/null +++ b/NPCs/NormalNPCs/WildBumblebirb.cs @@ -0,0 +1,389 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Banners; +using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Sounds; +using CalamityMod.World; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.GameContent; +using Terraria.GameContent.Bestiary; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ModLoader.Utilities; + +namespace CalamityMod.NPCs.NormalNPCs +{ + public class WildBumblebirb : ModNPC + { + public override void SetStaticDefaults() + { + Main.npcFrameCount[Type] = 5; + NPCID.Sets.TrailingMode[Type] = 1; + NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() + { + Position = Vector2.UnitX * 36f + }; + NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; + } + + public override string Texture => "CalamityMod/NPCs/Bumblebirb/BumbleFolly"; + + public override void SetDefaults() + { + NPC.npcSlots = 1f; + NPC.aiStyle = -1; + AIType = -1; + NPC.damage = 90; + NPC.width = 120; + NPC.height = 80; + NPC.defense = 20; + NPC.LifeMaxNERB(9375, 11250, 5000); // Old HP - 12000, 15000 + NPC.knockBackResist = 0.15f; + NPC.lavaImmune = true; + NPC.noTileCollide = true; + NPC.noGravity = true; + NPC.HitSound = SoundID.NPCHit51; + NPC.DeathSound = SoundID.NPCDeath46; + Banner = NPC.type; + BannerItem = ModContent.ItemType(); + NPC.Calamity().VulnerableToHeat = true; + NPC.Calamity().VulnerableToCold = true; + NPC.Calamity().VulnerableToSickness = true; + + // Scale stats in Expert and Master + CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); + CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); + } + + public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) + { + bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] + { + BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, + new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WildBumblefuck") + }); + } + + public override float SpawnChance(NPCSpawnInfo spawnInfo) + { + if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneSunkenSea || !spawnInfo.Player.ZoneJungle) + return 0f; + + // Keep this as a separate if check, because it's a loop and we don't want to be checking it constantly. + if (NPC.AnyNPCs(NPC.type)) + return 0f; + + return SpawnCondition.SurfaceJungle.Chance * 0.14f; + } + + public override void AI() + { + Player player = Main.player[NPC.target]; + + float rotationMult = 4f; + float rotationAmt = 0.04f; + + if (Vector2.Distance(player.Center, NPC.Center) > 5600f) + { + if (NPC.timeLeft > 5) + NPC.timeLeft = 5; + } + + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt * 1.25f) / 10f; + + if (NPC.ai[0] == 0f || NPC.ai[0] == 1f) + { + for (int i = 0; i < Main.maxNPCs; i++) + { + if (i != NPC.whoAmI && Main.npc[i].active && Main.npc[i].type == NPC.type) + { + Vector2 otherSwarmerDirection = Main.npc[i].Center - NPC.Center; + if (otherSwarmerDirection.Length() < (NPC.width + NPC.height)) + { + otherSwarmerDirection.Normalize(); + otherSwarmerDirection *= -0.1f; + NPC.velocity += otherSwarmerDirection; + NPC nPC6 = Main.npc[i]; + nPC6.velocity -= otherSwarmerDirection; + } + } + } + } + + if (NPC.target < 0 || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + { + NPC.TargetClosest(true); + Vector2 swarmerTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (Main.player[NPC.target].dead || swarmerTargetDist.Length() > 2800f) + NPC.ai[0] = -1f; + } + else + { + Vector2 swarmerCatchUpTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (NPC.ai[0] > 1f && swarmerCatchUpTargetDist.Length() > 3600f) + NPC.ai[0] = 1f; + } + + if (NPC.ai[0] == -1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + Vector2 swarmerDespawnVelMult = new Vector2(0f, -8f); + NPC.velocity = (NPC.velocity * 21f + swarmerDespawnVelMult) / 10f; + return; + } + + if (NPC.ai[0] == 0f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + NPC.TargetClosest(true); + NPC.spriteDirection = NPC.direction; + + Vector2 swarmerIdleTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (swarmerIdleTargetDist.Length() > 2800f) + { + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + } + else if (swarmerIdleTargetDist.Length() > 400f) + { + float swarmerIdleSpeed = 7f + swarmerIdleTargetDist.Length() / 100f + NPC.ai[1] / 15f; + swarmerIdleTargetDist.Normalize(); + swarmerIdleTargetDist *= swarmerIdleSpeed; + NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + } + else if (NPC.velocity.Length() > 2f) + NPC.velocity *= 0.95f; + else if (NPC.velocity.Length() < 1f) + NPC.velocity *= 1.05f; + + NPC.ai[1] += 1f; + if (NPC.ai[1] >= 105f) + { + NPC.ai[1] = 0f; + NPC.ai[0] = 2f; + } + } + else + { + if (NPC.ai[0] == 1f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.target < 0 || !Main.player[NPC.target].active || Main.player[NPC.target].dead) + NPC.TargetClosest(true); + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult + NPC.velocity.X * rotationAmt) / 10f; + + Vector2 swarmerChargeTargetDist = Main.player[NPC.target].Center - NPC.Center; + if (swarmerChargeTargetDist.Length() < 800f && !Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + } + + NPC.ai[2] += 0.0166666675f; + float swarmerChargeSpeed = 9f + NPC.ai[2] + swarmerChargeTargetDist.Length() / 150f; + float swarmerChargeVelMult = 25f; + swarmerChargeTargetDist.Normalize(); + swarmerChargeTargetDist *= swarmerChargeSpeed; + NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + + NPC.ForceNetUpdate(); + + return; + } + + if (NPC.ai[0] == 2f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + NPC.rotation = (NPC.rotation * rotationMult * 0.75f + NPC.velocity.X * rotationAmt * 1.25f) / 8f; + + Vector2 swarmerDecelerateTargetDist = Main.player[NPC.target].Center - NPC.Center; + swarmerDecelerateTargetDist.Y -= 8f; + float swarmerDecelerateSpeed = 14f; + float swarmerDecelerateVelMult = 8f; + swarmerDecelerateTargetDist.Normalize(); + swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; + NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + + NPC.ai[1] += 1f; + if (NPC.ai[1] > 10f) + { + // Set damage + NPC.damage = NPC.defDamage; + + NPC.velocity = swarmerDecelerateTargetDist; + if (Main.getGoodWorld && !Main.zenithWorld) + NPC.velocity *= 1.15f; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else + NPC.direction = 1; + + NPC.ai[0] = 2.1f; + NPC.ai[1] = 0f; + } + } + else if (NPC.ai[0] == 2.1f) + { + // Set damage + NPC.damage = NPC.defDamage; + + if (NPC.velocity.X < 0f) + NPC.direction = -1; + else if (NPC.velocity.X > 0f) + NPC.direction = 1; + + NPC.spriteDirection = NPC.direction; + + NPC.velocity *= 1.01f; + + NPC.ai[1] += 1f; + if (NPC.ai[1] > 30f) + { + if (!Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + return; + } + + if (NPC.ai[1] > 60f) + { + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + } + } + } + } + + public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 5, 7); + public override void OnKill() + { + if (Main.zenithWorld) + { + SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + for (int i = 0; i < 5; i++) + { + Vector2 fireFrom = new Vector2(NPC.Center.X + (40 * i) - 120, NPC.Center.Y - 900f); + Vector2 ai0 = NPC.Center - fireFrom; + float ai = Main.rand.Next(100); + Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); + } + } + } + } + + public override void FindFrame(int frameHeight) + { + NPC.frameCounter += NPC.ai[0] == 2.1f ? 1.5 : 1D; + if (Main.zenithWorld) + { + NPC.frameCounter += 2D; + } + if (NPC.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base + { + NPC.frameCounter = 0D; + NPC.frame.Y += frameHeight; + } + if (NPC.frame.Y >= frameHeight * 4) + { + NPC.frame.Y = 0; + } + } + + public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) + { + SpriteEffects spriteEffects = SpriteEffects.None; + if (NPC.spriteDirection == 1) + spriteEffects = SpriteEffects.FlipHorizontally; + + Texture2D texture2D15 = TextureAssets.Npc[Type].Value; + Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); + int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; + + if (CalamityClientConfig.Instance.Afterimages) + { + for (int i = 1; i < afterimageAmt; i += 2) + { + Color afterimageColor = drawColor; + afterimageColor = Color.Lerp(afterimageColor, Color.Gold, 0.5f); + afterimageColor = NPC.GetAlpha(afterimageColor); + afterimageColor *= (afterimageAmt - i) / 15f; + Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; + afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; + afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + } + } + + Vector2 drawLocation = NPC.Center - screenPos; + drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; + drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); + spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); + + return false; + } + + public override void HitEffect(NPC.HitInfo hit) + { + for (int k = 0; k < 5; k++) + { + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); + } + if (NPC.life <= 0) + { + for (int k = 0; k < 50; k++) + { + Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); + } + } + } + } +} diff --git a/NPCs/NormalNPCs/WildBumblefuck.cs b/NPCs/NormalNPCs/WildBumblefuck.cs deleted file mode 100644 index b0be162495..0000000000 --- a/NPCs/NormalNPCs/WildBumblefuck.cs +++ /dev/null @@ -1,173 +0,0 @@ -using CalamityMod.Items.Materials; -using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.GameContent.Bestiary; -using Terraria.ID; -using Terraria.ModLoader; -using Terraria.ModLoader.Utilities; - -namespace CalamityMod.NPCs.NormalNPCs -{ - public class WildBumblefuck : ModNPC - { - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 5; - NPCID.Sets.TrailingMode[Type] = 1; - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() - { - Position = Vector2.UnitX * 36f - }; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; - } - - public override string Texture => "CalamityMod/NPCs/Bumblebirb/BumbleFolly"; - - public override void SetDefaults() - { - NPC.npcSlots = 1f; - NPC.aiStyle = -1; - AIType = -1; - NPC.damage = 90; - NPC.width = 120; - NPC.height = 80; - NPC.defense = 20; - NPC.LifeMaxNERB(9375, 11250, 5000); // Old HP - 12000, 15000 - NPC.knockBackResist = 0.15f; - NPC.lavaImmune = true; - NPC.noTileCollide = true; - NPC.noGravity = true; - NPC.HitSound = SoundID.NPCHit51; - NPC.DeathSound = SoundID.NPCDeath46; - Banner = NPC.type; - BannerItem = ModContent.ItemType(); - NPC.Calamity().VulnerableToHeat = true; - NPC.Calamity().VulnerableToCold = true; - NPC.Calamity().VulnerableToSickness = true; - - // Scale stats in Expert and Master - CalamityGlobalNPC.AdjustExpertModeStatScaling(NPC); - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC); - } - - public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry) - { - bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] - { - BestiaryDatabaseNPCsPopulator.CommonTags.SpawnConditions.Biomes.Jungle, - new FlavorTextBestiaryInfoElement("Mods.CalamityMod.Bestiary.WildBumblefuck") - }); - } - - public override float SpawnChance(NPCSpawnInfo spawnInfo) - { - if (spawnInfo.PlayerSafe || !NPC.downedMoonlord || spawnInfo.Player.Calamity().ZoneSunkenSea || !spawnInfo.Player.ZoneJungle) - return 0f; - - // Keep this as a separate if check, because it's a loop and we don't want to be checking it constantly. - if (NPC.AnyNPCs(NPC.type)) - return 0f; - - return SpawnCondition.SurfaceJungle.Chance * 0.14f; - } - - public override void AI() - { - BumblebirbAI.VanillaBumblebirb2AI(NPC, Mod, false); - } - - public override void ModifyNPCLoot(NPCLoot npcLoot) => npcLoot.Add(ModContent.ItemType(), 1, 5, 7); - public override void OnKill() - { - if (Main.zenithWorld) - { - SoundEngine.PlaySound(CommonCalamitySounds.LightningSound, NPC.Center - Vector2.UnitY * 300f); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - for (int i = 0; i < 5; i++) - { - Vector2 fireFrom = new Vector2(NPC.Center.X + (40 * i) - 120, NPC.Center.Y - 900f); - Vector2 ai0 = NPC.Center - fireFrom; - float ai = Main.rand.Next(100); - Vector2 velocity = Vector2.Normalize(ai0.RotatedByRandom(MathHelper.PiOver4)) * 7f; - Projectile.NewProjectile(NPC.GetSource_FromAI(), fireFrom.X, fireFrom.Y, velocity.X, velocity.Y, ModContent.ProjectileType(), NPC.damage, 0f, Main.myPlayer, ai0.ToRotation(), ai); - } - } - } - } - - public override void FindFrame(int frameHeight) - { - NPC.frameCounter += NPC.ai[0] == 2.1f ? 1.5 : 1D; - if (Main.zenithWorld) - { - NPC.frameCounter += 2D; - } - if (NPC.frameCounter > 4D) //iban said the time between frames was 5 so using that as a base - { - NPC.frameCounter = 0D; - NPC.frame.Y += frameHeight; - } - if (NPC.frame.Y >= frameHeight * 4) - { - NPC.frame.Y = 0; - } - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - Texture2D texture2D15 = TextureAssets.Npc[Type].Value; - Vector2 halfSizeTexture = new Vector2(TextureAssets.Npc[Type].Value.Width / 2, TextureAssets.Npc[Type].Value.Height / Main.npcFrameCount[Type] / 2); - int afterimageAmt = NPC.ai[0] == 2.1f ? 7 : 0; - - if (CalamityClientConfig.Instance.Afterimages) - { - for (int i = 1; i < afterimageAmt; i += 2) - { - Color afterimageColor = drawColor; - afterimageColor = Color.Lerp(afterimageColor, Color.Gold, 0.5f); - afterimageColor = NPC.GetAlpha(afterimageColor); - afterimageColor *= (afterimageAmt - i) / 15f; - Vector2 afterimagePos = NPC.oldPos[i] + new Vector2(NPC.width, NPC.height) / 2f - screenPos; - afterimagePos -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; - afterimagePos += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, afterimagePos, NPC.frame, afterimageColor, NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - } - } - - Vector2 drawLocation = NPC.Center - screenPos; - drawLocation -= new Vector2(texture2D15.Width, texture2D15.Height / Main.npcFrameCount[Type]) * NPC.scale / 2f; - drawLocation += halfSizeTexture * NPC.scale + new Vector2(0f, NPC.gfxOffY); - spriteBatch.Draw(texture2D15, drawLocation, NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, halfSizeTexture, NPC.scale, spriteEffects, 0f); - - return false; - } - - public override void HitEffect(NPC.HitInfo hit) - { - for (int k = 0; k < 5; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); - } - if (NPC.life <= 0) - { - for (int k = 0; k < 50; k++) - { - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.CopperCoin, hit.HitDirection, -1f, 0, default, 1f); - } - } - } - } -} diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 88e48e8dbe..1d6b35bf42 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -18,9 +18,9 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Particles; +using CalamityMod.Projectiles.Boss; using CalamityMod.Systems; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -59,8 +59,8 @@ namespace CalamityMod.NPCs.OldDuke public static readonly SoundStyle VortexSpawnSound = new("CalamityMod/Sounds/Custom/OldDukeVortexSpawn"); public static readonly SoundStyle DashSound = new("CalamityMod/Sounds/Custom/OldDukeDash"); public static readonly SoundStyle DashSoundP3 = new("CalamityMod/Sounds/Custom/OldDukeDashP3"); - - public SlotId RoarSoundSlot; + private static Color FireGreen = new Color(155, 255, 55); + private SlotId RoarSoundSlot; public static Asset GlowTexture; @@ -143,24 +143,1667 @@ namespace CalamityMod.NPCs.OldDuke NPC.Calamity().newAI[i] = reader.ReadSingle(); } + #region Visual Helper Methods + static void DoChargeBurst(NPC npc, int phase) + { + SoundEngine.PlaySound(phase > 1 ? DashSoundP3 : DashSound, npc.Center); + + if (phase > 1) + { + for (int i = 0; i < 30; i++) + { + float fl = Main.rand.NextFloat(-60f, 60f); + GeneralParticleHandler.SpawnParticle(new SparkParticle(npc.Center + (Vector2.Zero.DirectionTo(npc.velocity) * 20f) + new Vector2(0f, fl).RotatedBy(Vector2.Zero.AngleTo(npc.velocity)), (-npc.velocity * Main.rand.NextFloat(2f)).RotatedBy(MathHelper.ToRadians(fl)), false, 25, Main.rand.NextFloat(0.3f, 1.2f), FireGreen)); + } + + CalamityUtils.AddScreenshakeAt(npc.Center, 10f, 3000f); + + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballImpact, npc.Center); + SoundEngine.PlaySound(SoundID.DD2_BetsyFireballShot, npc.Center); + GeneralParticleHandler.SpawnParticle(new CustomPulse(npc.Center, -npc.velocity / 3f, FireGreen, "CalamityMod/Particles/DustyCircleHardEdge", new Vector2(0.4f, 1.2f), Vector2.Zero.AngleTo(npc.velocity) + (Main.rand.NextBool() ? 0 : -MathHelper.Pi), 0.05f, 0.2f, 20)); + GeneralParticleHandler.SpawnParticle(new CustomPulse(npc.Center, -npc.velocity / 2f, FireGreen, "CalamityMod/Particles/FlameExplosion", new Vector2(0.4f, 1.2f), Vector2.Zero.AngleTo(npc.velocity) + (Main.rand.NextBool() ? 0 : -MathHelper.Pi), 0.1f, 0.4f, 20)); + } + } + static void DoChargeVisual(NPC npc, int phase) + { + float progress = npc.ai[2]; + int chargeTime = 36; + + Color col = Color.Lerp(phase > 0 ? FireGreen : new Color(100, 100, 100, 55), new Color(55, 55, 55, 55), progress / chargeTime); + + if (phase > 1) + { + if (Math.Floor(VisualTimerSystem.GlobalVisualTimer % 6f) < 1f) + GeneralParticleHandler.SpawnParticle(new CustomPulse(npc.Center, npc.velocity / 3f, col, "CalamityMod/Particles/DustyCircleHardEdge", new Vector2(0.4f, 1f), Vector2.Zero.AngleTo(npc.velocity) + (Main.rand.NextBool() ? 0 : -MathHelper.Pi), 0.04f, 0.1f, 20)); + + (npc.ModNPC as OldDuke).NuclearOverlayVisual = 1f; + } + + if (Main.rand.NextBool()) + GeneralParticleHandler.SpawnParticle(new CustomSpark(npc.Center - (npc.velocity * 2f), npc.velocity / 2f, "CalamityMod/Particles/ForwardSmear", false, 10, Main.rand.NextFloat(0.3f, 0.5f), col, new Vector2(1f, Main.rand.NextFloat(1.45f, 1.6f)), fadeIn: true, extraRotation: MathHelper.ToRadians(180f))); + } + #endregion + public override void AI() { + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); shake = MathHelper.Lerp(shake, 0f, 0.1f); + // Percent life remaining float lifeRatio = NPC.life / (float)NPC.lifeMax; + // Variables bool bossRush = BossRushEvent.BossRushActive; bool expertMode = Main.expertMode || bossRush; bool revenge = CalamityWorld.revenge || bossRush; bool death = CalamityWorld.death || bossRush; + float exhaustionGateValue = 360f; + if (Main.getGoodWorld) + exhaustionGateValue *= 0.5f; + + float numberOfAttacksBeforeExhaustion = 12f; + float exhaustionIncreasePerAttack = exhaustionGateValue * (1f / numberOfAttacksBeforeExhaustion); + bool exhausted = calamityGlobalNPC.newAI[1] == 1f; bool phase2 = lifeRatio <= (death ? LifePercentagePhase2_Death : revenge ? LifePercentagePhase2_Revenge : LifePercentagePhase2_Normal); bool phase3 = lifeRatio <= (death ? LifePercentagePhase3_Death : (revenge ? LifePercentagePhase3_Revenge : LifePercentagePhase3_Expert)) && expertMode; - + bool phase2AI = NPC.ai[0] > 4f; + bool phase3AI = NPC.ai[0] > 9f; + Phase = phase3 ? 2 : phase2 ? 1 : 0; NuclearOverlayVisual = (Phase == 2 && NPC.Calamity().newAI[1] != 1) ? MathHelper.Lerp(NuclearOverlayVisual, 0.2f, 0.2f) : MathHelper.Lerp(NuclearOverlayVisual, 0f, 0.1f); - OldDukeAI.VanillaOldDukeAI(NPC, Mod); + NPC.Calamity().canBreakPlayerDefense = true; + + bool charging = NPC.ai[3] < 10f; + if (calamityGlobalNPC.newAI[0] >= exhaustionGateValue) + calamityGlobalNPC.newAI[1] = 1f; + + float alphaScale = (255 - NPC.alpha) / 255f; + float redLight = (phase3AI ? 0.4f : phase2AI ? 0.64f : 0.88f) * alphaScale; + float greenLight = (phase3AI ? 1.2f : phase2AI ? 0.8f : 0.4f) * alphaScale; + Lighting.AddLight((int)((NPC.position.X + (NPC.width / 2)) / 16f), (int)((NPC.position.Y + (NPC.height / 2)) / 16f), redLight, greenLight, 0f); + + if (CalamityServerConfig.Instance.BossesStopWeather) + CalamityWorld.StopRain(); + else if (!Main.raining && !BossRushEvent.BossRushActive) + CalamityWorld.StartRain(); + + // Adjust stats + int setDamage = NPC.defDamage; + calamityGlobalNPC.DR = exhausted ? 0f : 0.5f; + NPC.defense = exhausted ? 0 : NPC.defDefense; + if (phase3AI) + { + setDamage = (int)Math.Round(setDamage * 1.2); + NPC.defense = exhausted ? 0 : NPC.defDefense - 40; + } + else if (phase2AI) + { + setDamage = (int)Math.Round(setDamage * 1.1); + NPC.defense = exhausted ? 0 : NPC.defDefense - 20; + } + + int idlePhaseTimer = expertMode ? 55 : 60; + float idlePhaseAcceleration = expertMode ? 0.75f : 0.7f; + float idlePhaseVelocity = expertMode ? 14f : 13f; + if (phase3AI) + { + idlePhaseAcceleration = expertMode ? 0.6f : 0.55f; + idlePhaseVelocity = expertMode ? 12f : 11f; + } + else if (phase2AI & charging) + { + idlePhaseAcceleration = expertMode ? 0.8f : 0.75f; + idlePhaseVelocity = expertMode ? 15f : 14f; + } + + int chargeTime = expertMode ? 34 : 36; + float chargeVelocity = expertMode ? 20f : 19f; + if (phase3AI) + { + chargeTime = expertMode ? 28 : 30; + chargeVelocity = expertMode ? 26f : 25f; + } + else if (charging & phase2AI) + { + chargeTime = expertMode ? 31 : 33; + chargeVelocity = expertMode ? 24f : 23f; + } + + if (bossRush) + { + idlePhaseTimer = 35; + idlePhaseAcceleration *= 1.25f; + idlePhaseVelocity *= 1.2f; + chargeTime -= 3; + chargeVelocity *= 1.25f; + } + else if (death) + { + idlePhaseTimer = 51; + idlePhaseAcceleration *= 1.05f; + idlePhaseVelocity *= 1.05f; + chargeTime -= 2; + chargeVelocity *= 1.1f; + } + else if (revenge) + { + idlePhaseTimer = 53; + idlePhaseAcceleration *= 1.025f; + idlePhaseVelocity *= 1.025f; + chargeTime -= 1; + chargeVelocity *= 1.05f; + } + + // The dumbest thing to ever exist + if (CalamityWorld.LegendaryMode && revenge) + chargeVelocity *= 1.25f; + + if (exhausted) + idlePhaseVelocity *= 0.25f; + + // Variables + int maxToothBallBelches = bossRush ? 5 : death ? 4 : 3; + int toothBallBelchPhaseDivisor = bossRush ? 24 : death ? 30 : 40; + int toothBallBelchPhaseTimer = toothBallBelchPhaseDivisor * maxToothBallBelches; + float toothBallBelchPhaseAcceleration = bossRush ? 0.95f : death ? 0.6f : 0.55f; + float toothBallBelchPhaseVelocity = bossRush ? 14f : death ? 10f : 9f; + float toothBallFinalVelocity = death ? 14f : revenge ? 13f : 12f; + float goreVelocityX = death ? 8f : revenge ? 7.5f : expertMode ? 7f : 6f; + float goreVelocityY = death ? 10.5f : revenge ? 10f : expertMode ? 9.5f : 8f; + float sharkronVelocity = bossRush ? 18f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; + int attackTimer = 120; + int phaseTransitionTimer = 180; + int teleportPauseTimer = 30; + int toothBallSpinPhaseDivisor = bossRush ? 27 : death ? 32 : 45; + int toothBallSpinTimer = maxToothBallBelches * toothBallSpinPhaseDivisor; + float spinTime = toothBallSpinTimer / 2f; + float toothBallSpinToothBallVelocity = bossRush ? 14f : death ? 9.5f : 9f; + float spinAttackSpeed = Main.zenithWorld ? 44f : 22f; + float spinSpeed = MathHelper.TwoPi / spinTime; + + Player player = Main.player[NPC.target]; + + // Get target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || player.dead || !player.active) + { + NPC.TargetClosest(); + player = Main.player[NPC.target]; + NPC.netUpdate = true; + } + + // Despawn safety, make sure to target another player if the current player target is too far away + if (Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles) + NPC.TargetClosest(); + + // Despawn + if (player.dead || Vector2.Distance(player.Center, NPC.Center) > 8800f) + { + NPC.TargetClosest(); + + NPC.velocity.Y -= 0.4f; + + if (NPC.timeLeft > 10) + NPC.timeLeft = 10; + + if (NPC.timeLeft == 1) + { + AcidRainEvent.AccumulatedKillPoints = 0; + AcidRainEvent.HasTriedToSummonOldDuke = false; + AcidRainEvent.UpdateInvasion(false); + NPC.timeLeft = 0; + } + + if (NPC.ai[0] > 4f) + NPC.ai[0] = 5f; + else + NPC.ai[0] = 0f; + + NPC.ai[2] = 0f; + } + + if (exhausted) + { + NPC.Calamity().canBreakPlayerDefense = false; + + // Play exhausted sound + if (calamityGlobalNPC.newAI[0] % 60f == 0f && Main.LocalPlayer.active && !Main.LocalPlayer.dead && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < 2800f) + SoundEngine.PlaySound(HuffSound with { Volume = HuffSound.Volume * 1.25f }, Main.LocalPlayer.Center); + + if (Main.zenithWorld) + { + float screenShakePower = 10 * Utils.GetLerpValue(800f, 0f, NPC.Distance(Main.LocalPlayer.Center), true); + if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < screenShakePower) + Main.LocalPlayer.Calamity().GeneralScreenShakePower = screenShakePower; + + if (calamityGlobalNPC.newAI[0] == exhaustionGateValue) + SoundEngine.PlaySound(SoundID.NPCDeath64 with { Pitch = SoundID.NPCDeath64.Pitch - 0.9f, Volume = SoundID.NPCDeath64.Volume + 0.4f }, player.Center); // fart + + if (Main.netMode != NetmodeID.MultiplayerClient && calamityGlobalNPC.newAI[0] % 5f == 0f) + { + Vector2 dist = player.Center - NPC.Center; + dist.Normalize(); + dist *= 3; + dist.X += Main.rand.NextFloat(-0.5f, 0.5f); + dist.Y += Main.rand.NextFloat(-0.5f, 0.5f); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, -dist, type, damage, 0, Main.myPlayer); + } + } + + calamityGlobalNPC.newAI[0] -= bossRush ? 1.5f : 1f; + if (calamityGlobalNPC.newAI[0] <= 0f) + { + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[1] = 0f; + } + } + + // Enrage variable + bool enrage = !bossRush && + (player.position.Y < 300f || player.position.Y > Main.worldSurface * 16.0 || + (player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000))); + + // Check for the flipped Abyss + if (Main.remixWorld) + { + enrage = !bossRush && + (player.position.Y < Main.UnderworldLayer * 16 * 0.8f || player.position.Y > Main.UnderworldLayer * 16 || + (player.position.X > 8000f && player.position.X < (Main.maxTilesX * 16 - 8000))); + } + + // Enrage + if (enrage) + { + if (NPC.localAI[1] > 0f) + NPC.localAI[1] -= 1f; + } + else + NPC.localAI[1] = CalamityGlobalNPC.biomeEnrageTimerMax; + + bool biomeEnraged = NPC.localAI[1] <= 0f; + + NPC.Calamity().CurrentlyEnraged = biomeEnraged || bossRush; + + // Increased DR while transitioning phases and not exhausted + if (!exhausted) + calamityGlobalNPC.DR = (NPC.ai[0] == -1f || NPC.ai[0] == 4f || NPC.ai[0] == 9f) ? (bossRush ? 0.99f : 0.75f) : 0.5f; + + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = NPC.ai[0] == -1f || NPC.ai[0] == 4f || NPC.ai[0] == 9f; + + // Enrage + if (biomeEnraged) + { + toothBallBelchPhaseTimer = 60; + toothBallBelchPhaseDivisor = 20; + toothBallBelchPhaseAcceleration = 1f; + toothBallBelchPhaseVelocity = 15f; + goreVelocityX = 12f; + goreVelocityY = 16f; + sharkronVelocity = 20f; + idlePhaseTimer = 20; + idlePhaseAcceleration = 1.2f; + idlePhaseVelocity = 20f; + chargeTime = 25; + chargeVelocity += 8f; + toothBallSpinPhaseDivisor = 24; + toothBallSpinToothBallVelocity = 15f; + setDamage *= 2; + NPC.defense = NPC.defDefense * 3; + } + + // The dumbest thing to ever exist + if (CalamityWorld.LegendaryMode && revenge) + chargeTime *= 2; + + // Set variables for spawn effects + if (NPC.localAI[0] == 0f) + { + NPC.alpha = 255; + + NPC.velocity.Y = -12f; + NPC.velocity.X = Main.rand.NextFloat(-2f, 2f); + + NPC.localAI[0] = 1f; + NPC.rotation = 0f; + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.ai[0] = -1f; + NPC.netUpdate = true; + } + } + + // Rotation + float rateOfRotation = 0.04f; + if (NPC.ai[0] == 1f || NPC.ai[0] == 6f || NPC.ai[0] == 7f || NPC.ai[0] == 14f) + rateOfRotation = 0f; + if (NPC.ai[0] == 3f || NPC.ai[0] == 4f) + rateOfRotation = 0.01f; + if (NPC.ai[0] == 8f || NPC.ai[0] == 13f) + rateOfRotation = 0.05f; + + Vector2 rotationVector = player.Center - NPC.Center; + if (calamityGlobalNPC.newAI[1] != 1f && !player.dead) + { + // Rotate to show direction of predictive charge + if (NPC.ai[0] == 0f && !phase2) + { + if (NPC.ai[3] < 6f) + { + rateOfRotation = 0.1f; + rotationVector = Vector2.Normalize(player.Center + player.velocity * 20f - NPC.Center) * chargeVelocity; + } + } + else if (NPC.ai[0] == 5f && !phase3) + { + if (NPC.ai[3] < 4f) + { + rateOfRotation = 0.1f; + rotationVector = Vector2.Normalize(player.Center + player.velocity * 20f - NPC.Center) * chargeVelocity; + } + } + else if (NPC.ai[0] == 10f) + { + if (NPC.ai[3] < 8f && NPC.ai[3] != 1f && NPC.ai[3] != 4f) + { + rateOfRotation = 0.1f; + rotationVector = Vector2.Normalize(player.Center + player.velocity * 20f - NPC.Center) * chargeVelocity; + } + } + } + + float dukeRotationSpeed = (float)Math.Atan2(rotationVector.Y, rotationVector.X); + if (NPC.spriteDirection == 1) + dukeRotationSpeed += MathHelper.Pi; + if (dukeRotationSpeed < 0f) + dukeRotationSpeed += MathHelper.TwoPi; + if (dukeRotationSpeed > MathHelper.TwoPi) + dukeRotationSpeed -= MathHelper.TwoPi; + if (NPC.ai[0] == -1f || NPC.ai[0] == 3f || NPC.ai[0] == 4f) + dukeRotationSpeed = 0f; + if (NPC.ai[0] == 8f || NPC.ai[0] == 13f) + dukeRotationSpeed = MathHelper.Pi * 0.1666666667f * NPC.spriteDirection; + + if (NPC.rotation < dukeRotationSpeed) + { + if (dukeRotationSpeed - NPC.rotation > MathHelper.Pi) + NPC.rotation -= rateOfRotation; + else + NPC.rotation += rateOfRotation; + } + if (NPC.rotation > dukeRotationSpeed) + { + if (NPC.rotation - dukeRotationSpeed > MathHelper.Pi) + NPC.rotation += rateOfRotation; + else + NPC.rotation -= rateOfRotation; + } + + if ((NPC.ai[0] != 8f && NPC.ai[0] != 13f) || NPC.spriteDirection == 1) + { + if (NPC.rotation > dukeRotationSpeed - rateOfRotation && NPC.rotation < dukeRotationSpeed + rateOfRotation) + NPC.rotation = dukeRotationSpeed; + if (NPC.rotation < 0f) + NPC.rotation += MathHelper.TwoPi; + if (NPC.rotation > MathHelper.TwoPi) + NPC.rotation -= MathHelper.TwoPi; + if (NPC.rotation > dukeRotationSpeed - rateOfRotation && NPC.rotation < dukeRotationSpeed + rateOfRotation) + NPC.rotation = dukeRotationSpeed; + } + + // Alpha adjustments + if (NPC.ai[0] != -1f && (NPC.ai[0] < 9f || NPC.ai[0] > 12f)) + { + if (Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + NPC.alpha += 15; + else + NPC.alpha -= 15; + + if (NPC.alpha < 0) + NPC.alpha = 0; + if (NPC.alpha > 150) + NPC.alpha = 150; + } + + // Spawn effects + if (NPC.ai[0] == -1f) + { + NPC.alpha = (int)MathHelper.Lerp(NPC.alpha, 0, 0.2f); + + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + if (NPC.Calamity().newAI[3] == 0f) + NPC.velocity *= 0.98f; + + // Direction + int dukeFaceDirection = Math.Sign(player.Center.X - NPC.Center.X); + if (dukeFaceDirection != 0) + { + NPC.direction = dukeFaceDirection; + NPC.spriteDirection = -NPC.direction; + } + + // Alpha + if (NPC.ai[2] > 20f) + { + NPC.velocity *= 0.9f; + + NPC.alpha -= 5; + if (Collision.SolidCollision(NPC.position, NPC.width, NPC.height)) + NPC.alpha += 15; + if (NPC.alpha < 0) + NPC.alpha = 0; + if (NPC.alpha > 150) + NPC.alpha = 150; + } + + if (NPC.ai[2] == 75) + { + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + CalamityUtils.AddScreenshakeAt(NPC.Center, 14); + SoundEngine.PlaySound(SoundID.DD2_BetsyFlameBreath.WithPitchOffset(-0.5f), NPC.Center); + SoundEngine.PlaySound(DashSoundP3, NPC.Center); + } + + if (NPC.ai[2] >= 75f) + { + float sd = player.Center.X > NPC.Center.X ? -1f : 1f; + + shake = 2f; + NPC.rotation = MathHelper.Lerp(MathHelper.WrapAngle(NPC.rotation), MathHelper.ToRadians(sd == 1f ? 75f : -75f), 0.2f); + + if (NPC.ai[2] % 5f == 1f) + { + Vector2 mouthCenter = NPC.Center + new Vector2(-80 * sd, 0).RotatedBy(NPC.rotation); + + float factor = (NPC.ai[2] - 75f) / 50f; + + float a = MathHelper.Lerp(1f, 0f, factor); + + GeneralParticleHandler.SpawnParticle(new CustomPulse(mouthCenter, Vector2.Zero, new Color(55, 55, 55).MultiplyRGBA(new Color(a, a, a, a)), "CalamityMod/Particles/DustyCircleHardEdge", Vector2.One, Main.rand.NextFloat(MathHelper.TwoPi), 0.05f, 0.08f + (0.15f * factor), 10)); + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= 125f) + { + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.netUpdate = true; + } + } + + // Phase 1 + else if (NPC.ai[0] == 0f && !player.dead) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + if (NPC.ai[1] == 0f) + NPC.ai[1] = 500 * Math.Sign((NPC.Center - player.Center).X); + + Vector2 phase1IdleSpeed = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -300f) - NPC.Center - NPC.velocity) * idlePhaseVelocity; + NPC.SimpleFlyMovement(phase1IdleSpeed, idlePhaseAcceleration); + + // Rotation and direction + int dukeLookAt = Math.Sign(player.Center.X - NPC.Center.X); + if (dukeLookAt != 0) + { + if (NPC.ai[2] == 0f && dukeLookAt != NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.direction = dukeLookAt; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + // Phase switch + if (calamityGlobalNPC.newAI[1] != 1f || (phase2 && !phase2AI)) + { + NPC.ai[2] += 1f; + if (NPC.ai[2] >= idlePhaseTimer || (phase2 && !phase2AI)) + { + int oldDukeAttackPicker = 0; + switch ((int)NPC.ai[3]) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + oldDukeAttackPicker = 1; + break; + case 6: + NPC.ai[3] = 1f; + oldDukeAttackPicker = 2; + break; + case 7: + NPC.ai[3] = 0f; + oldDukeAttackPicker = 3; + break; + } + + if (phase2) + oldDukeAttackPicker = 4; + + // Set velocity for charge + if (oldDukeAttackPicker == 1) + { + NPC.ai[0] = 1f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + // Velocity + Vector2 distanceVector = player.Center + player.velocity * 20f - NPC.Center; + NPC.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + DoChargeBurst(NPC, 0); + + // Direction + if (dukeLookAt != 0) + { + NPC.direction = dukeLookAt; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + } + + // Tooth Balls + else if (oldDukeAttackPicker == 2) + { + NPC.ai[0] = 2f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + // Call sharks from the sides of the screen + else if (oldDukeAttackPicker == 3) + { + NPC.ai[0] = 3f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + // Go to phase 2 + else if (oldDukeAttackPicker == 4) + { + NPC.ai[0] = 4f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + NPC.netUpdate = true; + } + } + } + + // Charge + else if (NPC.ai[0] == 1f) + { + // Set damage + NPC.damage = setDamage; + + // The dumbest thing to ever exist + if (CalamityWorld.LegendaryMode && revenge && NPC.ai[2] % 10f == 0f) + { + // Rotation and direction + int dir = Math.Sign(player.Center.X - NPC.Center.X); + if (dir != 0) + { + if (NPC.ai[2] == 0f && dir != NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.direction = dir; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + Vector2 distanceVector = player.Center + player.velocity * 20f - NPC.Center; + NPC.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (dir != 0) + { + NPC.direction = dir; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + } + else + { + // Accelerate + NPC.velocity *= 1.01f; + } + + // Spawn dust + Vector2 vel = NPC.velocity; + vel.Normalize(); + vel *= 55f; + + DoChargeVisual(NPC, Phase); + + GeneralParticleHandler.SpawnParticle(new SparkParticle(NPC.Center + vel + vel.RotatedBy(MathHelper.ToRadians(90)), vel / 7f, false, 20, 0.75f, new Color(155, 155, 155, 55), true)); + GeneralParticleHandler.SpawnParticle(new SparkParticle(NPC.Center + vel + vel.RotatedBy(MathHelper.ToRadians(-90)), vel / 7f, false, 20, 0.75f, new Color(155, 155, 155, 55), true)); + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= chargeTime) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] += 2f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Tooth Ball belch + else if (NPC.ai[0] == 2f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + if (NPC.ai[1] == 0f) + NPC.ai[1] = 500 * Math.Sign((NPC.Center - player.Center).X); + + Vector2 toothBallBelchPhaseSpeed = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -300f) - NPC.Center - NPC.velocity) * toothBallBelchPhaseVelocity; + NPC.SimpleFlyMovement(toothBallBelchPhaseSpeed, toothBallBelchPhaseAcceleration); + + // Play sounds and spawn Tooth Balls + if (NPC.ai[2] == 0f) + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + if (NPC.ai[2] % toothBallBelchPhaseDivisor == 0f) + { + if (NPC.ai[2] != 0f) + SoundEngine.PlaySound(VomitSound, NPC.Center); + + Vector2 toothBallDirection = Vector2.Normalize(player.Center - NPC.Center) * (NPC.width + 20) / 2f + NPC.Center; + Vector2 toothBallVelocity = Vector2.Normalize(Main.player[NPC.target].Center - NPC.Center) * toothBallFinalVelocity; + Vector2 toothBallSpawnPos = new Vector2(toothBallDirection.X, toothBallDirection.Y + 45f); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int toothBall = NPC.NewNPC(NPC.GetSource_FromAI(), (int)toothBallSpawnPos.X, (int)toothBallSpawnPos.Y, ModContent.NPCType(), 0, toothBallVelocity.X, toothBallVelocity.Y); + Main.npc[toothBall].velocity = Vector2.Normalize(toothBallVelocity) * NPC.velocity.Length(); + Main.npc[toothBall].netUpdate = true; + } + + for (int i = 0; i < 50; i++) + { + int dustID; + switch (Main.rand.Next(6)) + { + case 0: + case 1: + case 2: + case 3: + dustID = (int)CalamityDusts.SulphurousSeaAcid; + break; + default: + dustID = DustID.Blood; + break; + } + + // Choose a random speed and angle to belch out the vomit + float dustSpeed = Main.rand.NextFloat(3.0f, 12.0f); + float angleRandom = 0.06f; + Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(toothBallVelocity.ToRotation()); + dustVel = dustVel.RotatedBy(-angleRandom); + dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); + + // Pick a size for the vomit particles + float scale = Main.rand.NextFloat(1f, 2f); + + // Actually spawn the vomit + int idx = Dust.NewDust(toothBallSpawnPos, 40, 40, dustID, dustVel.X, dustVel.Y, 0, default, scale); + Main.dust[idx].noGravity = true; + } + } + + // Direction + int toothBallLookAt = Math.Sign(player.Center.X - NPC.Center.X); + if (toothBallLookAt != 0) + { + NPC.direction = toothBallLookAt; + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + NPC.spriteDirection = -NPC.direction; + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= toothBallBelchPhaseTimer) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Call sharks from the sides of the screen + else if (NPC.ai[0] == 3f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + NPC.velocity *= 0.98f; + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, 0f, 0.02f); + + // Play sound and spawn sharks + if (NPC.ai[2] == attackTimer - 30) + SoundEngine.PlaySound(VomitSound, NPC.Center); + + if (NPC.ai[2] >= attackTimer - 90) + { + if (NPC.ai[2] % 18f == 0f) + { + calamityGlobalNPC.newAI[2] += 100f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + + if (Main.getGoodWorld) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + } + } + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= attackTimer) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + calamityGlobalNPC.newAI[2] = 0f; + NPC.ai[0] = 0f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Transition to phase 2 and call sharks from below + else if (NPC.ai[0] == 4f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + NPC.velocity *= 0.98f; + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, 0f, 0.02f); + + // Sound + if (NPC.ai[2] == phaseTransitionTimer - 60) + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + if (NPC.ai[2] >= phaseTransitionTimer - 60) + { + if (NPC.ai[2] % 18f == 0f) + { + calamityGlobalNPC.newAI[2] += 150f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); + + if (Main.getGoodWorld) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); + } + } + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= phaseTransitionTimer) + { + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + NPC.ai[0] = 5f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Phase 2 + else if (NPC.ai[0] == 5f && !player.dead) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + if (NPC.ai[1] == 0f) + NPC.ai[1] = 500 * Math.Sign((NPC.Center - player.Center).X); + + Vector2 dukePhase2IdleSpeed = Vector2.Normalize(player.Center + new Vector2(NPC.ai[1], -300f) - NPC.Center - NPC.velocity) * idlePhaseVelocity; + NPC.SimpleFlyMovement(dukePhase2IdleSpeed, idlePhaseAcceleration); + + // Direction and rotation + int phase2FaceDirection = Math.Sign(player.Center.X - NPC.Center.X); + if (phase2FaceDirection != 0) + { + if (NPC.ai[2] == 0f && phase2FaceDirection != NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.direction = phase2FaceDirection; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + // Phase switch + if (calamityGlobalNPC.newAI[1] != 1f || (phase3 && !phase3AI)) + { + NPC.ai[2] += 1f; + if (NPC.ai[2] >= idlePhaseTimer || (phase3 && !phase3AI)) + { + int phase2AttackPicker = 0; + switch ((int)NPC.ai[3]) + { + case 0: + case 1: + case 2: + case 3: + phase2AttackPicker = 1; + break; + case 4: + NPC.ai[3] = 1f; + phase2AttackPicker = 2; + break; + case 5: + NPC.ai[3] = 0f; + phase2AttackPicker = 3; + break; + } + + if (phase3) + phase2AttackPicker = 4; + + // Set velocity for charge + if (phase2AttackPicker == 1) + { + NPC.ai[0] = 6f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + // Velocity and rotation + Vector2 distanceVector = player.Center + player.velocity * 20f - NPC.Center; + NPC.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (phase2FaceDirection != 0) + { + NPC.direction = phase2FaceDirection; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + DoChargeBurst(NPC, 1); + } + + // Set velocity for spin + else if (phase2AttackPicker == 2) + { + // Velocity and rotation + NPC.velocity = Vector2.Normalize(player.Center - NPC.Center) * spinAttackSpeed; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (phase2FaceDirection != 0) + { + NPC.direction = phase2FaceDirection; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + NPC.ai[0] = 7f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + else if (phase2AttackPicker == 3) + { + NPC.ai[0] = 8f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + // Go to next phase + else if (phase2AttackPicker == 4) + { + NPC.ai[0] = 9f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + NPC.netUpdate = true; + } + } + } + + // Charge + else if (NPC.ai[0] == 6f) + { + // Set damage + NPC.damage = setDamage; + + // The dumbest thing to ever exist + if (CalamityWorld.LegendaryMode && revenge && NPC.ai[2] % 8f == 0f) + { + // Rotation and direction + int dir = Math.Sign(player.Center.X - NPC.Center.X); + if (dir != 0) + { + if (NPC.ai[2] == 0f && dir != NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.direction = dir; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + Vector2 distanceVector = player.Center + player.velocity * 20f - NPC.Center; + NPC.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (dir != 0) + { + NPC.direction = dir; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + } + else + { + // Accelerate + NPC.velocity *= 1.01f; + } + + DoChargeVisual(NPC, Phase); + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= chargeTime) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + NPC.ai[0] = 5f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] += 2f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Tooth Ball and Vortex spin + else if (NPC.ai[0] == 7f) + { + // Set damage + NPC.damage = 0; + + // Play sounds and spawn Tooth Balls and a Vortex + if (NPC.ai[2] == 0f) + { + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + SoundEngine.PlaySound(VortexSpawnSound, NPC.Center); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 vortexSpawn = NPC.Center + NPC.velocity.RotatedBy(MathHelper.PiOver2 * -NPC.direction) * spinTime / MathHelper.TwoPi; + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(NPC.GetSource_FromAI(), vortexSpawn, Vector2.Zero, type, damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y); + } + + if (NPC.ai[2] % toothBallSpinPhaseDivisor == 0f) + { + if (NPC.ai[2] != 0f) + SoundEngine.PlaySound(VomitSound, NPC.Center); + + Vector2 phase2ToothBallDirection = Vector2.Normalize(NPC.velocity) * (NPC.width + 20) / 2f + NPC.Center; + Vector2 toothBallVelocity = Vector2.Normalize(NPC.velocity).RotatedBy(MathHelper.PiOver2 * NPC.direction) * toothBallSpinToothBallVelocity; + Vector2 toothBallSpawnPos = new Vector2(phase2ToothBallDirection.X, phase2ToothBallDirection.Y + 45f); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int toothBall = NPC.NewNPC(NPC.GetSource_FromAI(), (int)toothBallSpawnPos.X, (int)toothBallSpawnPos.Y, ModContent.NPCType(), 0, toothBallVelocity.X, toothBallVelocity.Y); + Main.npc[toothBall].target = NPC.target; + Main.npc[toothBall].velocity = Vector2.Normalize(toothBallVelocity) * toothBallSpinToothBallVelocity * 0.5f; + Main.npc[toothBall].netUpdate = true; + Main.npc[toothBall].ai[3] = 30f; + } + + for (int i = 0; i < 50; i++) + { + int dustID; + switch (Main.rand.Next(6)) + { + case 0: + case 1: + case 2: + case 3: + dustID = (int)CalamityDusts.SulphurousSeaAcid; + break; + default: + dustID = DustID.Blood; + break; + } + + // Choose a random speed and angle to belch out the vomit + float dustSpeed = Main.rand.NextFloat(3.0f, 12.0f); + float angleRandom = 0.06f; + Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(toothBallVelocity.ToRotation()); + dustVel = dustVel.RotatedBy(-angleRandom); + dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); + + // Pick a size for the vomit particles + float scale = Main.rand.NextFloat(1f, 2f); + + // Actually spawn the vomit + int idx = Dust.NewDust(toothBallSpawnPos, 40, 40, dustID, dustVel.X, dustVel.Y, 0, default, scale); + Main.dust[idx].noGravity = true; + } + } + + // Velocity and rotation + NPC.velocity = NPC.velocity.RotatedBy(-(double)spinSpeed * (float)NPC.direction); + NPC.rotation -= spinSpeed * NPC.direction; + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= toothBallSpinTimer) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + NPC.ai[0] = 5f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Vomit a huge amount of gore into the sky and call sharks from the sides of the screen + else if (NPC.ai[0] == 8f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + NPC.velocity *= 0.98f; + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, 0f, 0.02f); + + // Play sound + if (NPC.ai[2] == attackTimer - 30) + { + SoundEngine.PlaySound(VomitSound, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 phase2GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int totalGore = Main.getGoodWorld ? 40 : 20; + for (int i = 0; i < totalGore; i++) + { + float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); + float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); + + if (Main.getGoodWorld) + { + velocityX *= Main.rand.NextFloat() + 0.5f; + velocityY *= Main.rand.NextFloat() + 0.5f; + } + + Projectile.NewProjectile(NPC.GetSource_FromAI(), phase2GoreDirection.X, phase2GoreDirection.Y, velocityX, -velocityY, type, damage, 0f, Main.myPlayer, 0f, 0f); + } + } + } + + if (NPC.ai[2] >= attackTimer - 90) + { + if (NPC.ai[2] % 18f == 0f) + { + calamityGlobalNPC.newAI[2] += 100f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float x = 900f - calamityGlobalNPC.newAI[2]; + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + } + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= attackTimer) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + calamityGlobalNPC.newAI[2] = 0f; + NPC.ai[0] = 5f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Transition to phase 3 and summon sharks from above + else if (NPC.ai[0] == 9f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + NPC.velocity *= 0.98f; + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, 0f, 0.02f); + + // Sound + if (NPC.ai[2] == phaseTransitionTimer - 60) + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + if (NPC.ai[2] >= phaseTransitionTimer - 60) + { + if (NPC.ai[2] % 18f == 0f) + { + calamityGlobalNPC.newAI[2] += 200f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, sharkronVelocity, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, sharkronVelocity, 255); + + if (Main.getGoodWorld) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); + } + } + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= phaseTransitionTimer) + { + calamityGlobalNPC.newAI[0] = 0f; + calamityGlobalNPC.newAI[1] = 0f; + calamityGlobalNPC.newAI[2] = 0f; + NPC.ai[0] = 10f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Phase 3 + else if (NPC.ai[0] == 10f && !player.dead) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Alpha + NPC.alpha -= 25; + if (NPC.alpha < 0) + NPC.alpha = 0; + + // Movement location + if (NPC.ai[1] == 0f) + NPC.ai[1] = 500 * Math.Sign((NPC.Center - player.Center).X); + + Vector2 desiredVelocity = Vector2.Normalize(player.Center + new Vector2(-NPC.ai[1], -300f) - NPC.Center - NPC.velocity) * idlePhaseVelocity; + NPC.SimpleFlyMovement(desiredVelocity, idlePhaseAcceleration); + + // Rotation and direction + int phase3FaceDirection = Math.Sign(player.Center.X - NPC.Center.X); + if (phase3FaceDirection != 0) + { + if (NPC.ai[2] == 0f && phase3FaceDirection != NPC.direction) + { + NPC.rotation += MathHelper.Pi; + for (int l = 0; l < NPC.oldPos.Length; l++) + NPC.oldPos[l] = Vector2.Zero; + } + + NPC.direction = phase3FaceDirection; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + // Phase switch + if (calamityGlobalNPC.newAI[1] != 1f) + { + NPC.ai[2] += 1f; + if (NPC.ai[2] >= idlePhaseTimer) + { + int phase3AttackPicker = 0; + switch ((int)NPC.ai[3]) + { + case 0: + case 2: + case 3: + case 5: + case 6: + case 7: + phase3AttackPicker = 1; + break; + case 1: + case 8: + phase3AttackPicker = 2; + break; + case 4: + NPC.ai[3] = 1f; + phase3AttackPicker = 3; + break; + case 9: + NPC.ai[3] = 6f; + phase3AttackPicker = 4; + break; + } + + // Set velocity for charge + if (phase3AttackPicker == 1) + { + NPC.ai[0] = 11f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + // Velocity and rotation + Vector2 distanceVector = player.Center + player.velocity * 20f - NPC.Center; + NPC.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (phase3FaceDirection != 0) + { + NPC.direction = phase3FaceDirection; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + DoChargeBurst(NPC, 2); + } + + // Pause + else if (phase3AttackPicker == 2) + { + NPC.ai[0] = 12f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + else if (phase3AttackPicker == 3) + { + NPC.ai[0] = 13f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + // Set velocity for spin + else if (phase3AttackPicker == 4) + { + // Velocity and rotation + NPC.velocity = Vector2.Normalize(player.Center - NPC.Center) * spinAttackSpeed; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (phase3FaceDirection != 0) + { + NPC.direction = phase3FaceDirection; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + NPC.ai[0] = 14f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + } + + NPC.netUpdate = true; + } + } + } + + // Charge + else if (NPC.ai[0] == 11f) + { + // Set damage + NPC.damage = setDamage; + + // The dumbest thing to ever exist + if (CalamityWorld.LegendaryMode && revenge && NPC.ai[2] % 6f == 0f) + { + // Rotation and direction + int dir = Math.Sign(player.Center.X - NPC.Center.X); + if (dir != 0) + { + if (NPC.ai[2] == 0f && dir != NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.direction = dir; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + + Vector2 distanceVector = player.Center + player.velocity * 20f - NPC.Center; + NPC.velocity = Vector2.Normalize(distanceVector) * chargeVelocity; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X); + + // Direction + if (dir != 0) + { + NPC.direction = dir; + + if (NPC.spriteDirection == 1) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + } + else + { + // Accelerate + NPC.velocity *= 1.01f; + } + + DoChargeVisual(NPC, Phase); + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= chargeTime) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + NPC.ai[0] = 10f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.ai[3] += 2f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Pause before teleport + else if (NPC.ai[0] == 12f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Alpha + if (NPC.alpha < 255 && NPC.ai[2] >= teleportPauseTimer - 15f) + { + NPC.alpha += 17; + if (NPC.alpha > 255) + NPC.alpha = 255; + } + + // Velocity + NPC.velocity *= 0.98f; + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, 0f, 0.02f); + + // Play sound + if (NPC.ai[2] == teleportPauseTimer / 2) + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient && NPC.ai[2] == teleportPauseTimer - 1f) + { + // Teleport location + if (NPC.ai[1] == 0f) + NPC.ai[1] = 600 * Math.Sign((NPC.Center - player.Center).X); + + // Rotation and direction + Vector2 center = player.Center + new Vector2(NPC.ai[1], -300f); + Vector2 npcCenter = NPC.Center = center; + int phase3TeleportFaceDirection = Math.Sign(player.Center.X - npcCenter.X); + if (phase3TeleportFaceDirection != 0) + { + if (NPC.ai[2] == 0f && phase3TeleportFaceDirection != NPC.direction) + { + NPC.rotation += MathHelper.Pi; + for (int n = 0; n < NPC.oldPos.Length; n++) + NPC.oldPos[n] = Vector2.Zero; + } + + NPC.direction = phase3TeleportFaceDirection; + + if (NPC.spriteDirection != -NPC.direction) + NPC.rotation += MathHelper.Pi; + + NPC.spriteDirection = -NPC.direction; + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= teleportPauseTimer) + { + NPC.ai[0] = 10f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + + NPC.ai[3] += 2f; + if (NPC.ai[3] >= 9f) + NPC.ai[3] = 0f; + + NPC.netUpdate = true; + } + } + + // Vomit a huge amount of gore into the sky and call sharks from the sides of the screen + else if (NPC.ai[0] == 13f) + { + // Avoid cheap bullshit + NPC.damage = 0; + + // Velocity + NPC.velocity *= 0.98f; + NPC.velocity.Y = MathHelper.Lerp(NPC.velocity.Y, 0f, 0.02f); + + // Play sound + if (NPC.ai[2] == attackTimer - 30) + { + SoundEngine.PlaySound(VomitSound, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + Vector2 phase3GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int totalGore = Main.getGoodWorld ? 40 : 20; + for (int i = 0; i < totalGore; i++) + { + float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); + float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); + + if (Main.getGoodWorld) + { + velocityX *= Main.rand.NextFloat() + 0.5f; + velocityY *= Main.rand.NextFloat() + 0.5f; + } + + Projectile.NewProjectile(NPC.GetSource_FromAI(), phase3GoreDirection.X, phase3GoreDirection.Y, velocityX, -velocityY, type, damage, 0f, Main.myPlayer, 0f, 0f); + } + } + } + + if (NPC.ai[2] >= attackTimer - 90) + { + if (NPC.ai[2] % 18f == 0f) + { + calamityGlobalNPC.newAI[2] += 150f; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float x = 900f - calamityGlobalNPC.newAI[2]; + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + + if (Main.getGoodWorld) + { + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); + } + } + } + } + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= attackTimer) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + calamityGlobalNPC.newAI[2] = 0f; + NPC.ai[0] = 10f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + // Tooth Ball and Vortex spin + else if (NPC.ai[0] == 14f) + { + // Set damage + NPC.damage = 0; + + // Play sounds and spawn Tooth Balls and a Vortex + if (NPC.ai[2] == 0f) + { + RoarSoundSlot = SoundEngine.PlaySound(RoarSound, NPC.Center); + + SoundEngine.PlaySound(VortexSpawnSound, NPC.Center); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + Vector2 vortexSpawn = NPC.Center + NPC.velocity.RotatedBy(MathHelper.PiOver2 * -NPC.direction) * spinTime / MathHelper.TwoPi; + if (Main.netMode != NetmodeID.MultiplayerClient) + Projectile.NewProjectile(NPC.GetSource_FromAI(), vortexSpawn, Vector2.Zero, type, damage, 0f, Main.myPlayer, vortexSpawn.X, vortexSpawn.Y); + } + + if (NPC.ai[2] % toothBallSpinPhaseDivisor == 0f) + { + if (NPC.ai[2] != 0f) + SoundEngine.PlaySound(VomitSound, NPC.Center); + + Vector2 phase3ToothBallDirection = Vector2.Normalize(NPC.velocity) * (NPC.width + 20) / 2f + NPC.Center; + Vector2 toothBallVelocity = Vector2.Normalize(NPC.velocity).RotatedBy(MathHelper.PiOver2 * NPC.direction) * toothBallSpinToothBallVelocity; + Vector2 toothBallSpawnPos = new Vector2(phase3ToothBallDirection.X, phase3ToothBallDirection.Y + 45f); + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int toothBall = NPC.NewNPC(NPC.GetSource_FromAI(), (int)toothBallSpawnPos.X, (int)toothBallSpawnPos.Y, ModContent.NPCType(), 0, toothBallVelocity.X, toothBallVelocity.Y); + Main.npc[toothBall].target = NPC.target; + Main.npc[toothBall].velocity = Vector2.Normalize(toothBallVelocity) * toothBallSpinToothBallVelocity * 0.5f; + Main.npc[toothBall].netUpdate = true; + Main.npc[toothBall].ai[3] = 60f; + } + + for (int i = 0; i < 50; i++) + { + int dustID; + switch (Main.rand.Next(6)) + { + case 0: + case 1: + case 2: + case 3: + dustID = (int)CalamityDusts.SulphurousSeaAcid; + break; + default: + dustID = DustID.Blood; + break; + } + + // Choose a random speed and angle to belch out the vomit + float dustSpeed = Main.rand.NextFloat(3.0f, 12.0f); + float angleRandom = 0.06f; + Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(toothBallVelocity.ToRotation()); + dustVel = dustVel.RotatedBy(-angleRandom); + dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); + + // Pick a size for the vomit particles + float scale = Main.rand.NextFloat(1f, 2f); + + // Actually spawn the vomit + int idx = Dust.NewDust(toothBallSpawnPos, 40, 40, dustID, dustVel.X, dustVel.Y, 0, default, scale); + Main.dust[idx].noGravity = true; + } + } + + // Velocity and rotation + NPC.velocity = NPC.velocity.RotatedBy(-(double)spinSpeed * NPC.direction); + NPC.rotation -= spinSpeed * NPC.direction; + + NPC.ai[2] += 1f; + if (NPC.ai[2] >= toothBallSpinTimer) + { + calamityGlobalNPC.newAI[0] += exhaustionIncreasePerAttack; + NPC.ai[0] = 10f; + NPC.ai[1] = 0f; + NPC.ai[2] = 0f; + NPC.TargetClosest(); + NPC.netUpdate = true; + } + } + + if (SoundEngine.TryGetActiveSound(RoarSoundSlot, out var roarSound) && roarSound.IsPlaying) + roarSound.Position = NPC.Center; } public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index bf97d47107..a9f4887dc0 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -3180,10 +3180,10 @@ namespace CalamityMod.NPCs.SupremeCalamitas { for (int x = 0; x < 5; x++) { - NPC.NewNPC(NPC.GetSource_FromAI(), spawnX + 50, tempSpawnY, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSource_FromAI(), spawnX + 50, tempSpawnY, ModContent.NPCType()); spawnX += spawnXAdd; - NPC.NewNPC(NPC.GetSource_FromAI(), spawnX2 - 50, tempSpawnY, ModContent.NPCType()); + NPC.NewNPC(NPC.GetSource_FromAI(), spawnX2 - 50, tempSpawnY, ModContent.NPCType()); spawnX2 -= spawnXAdd; tempSpawnY += spawnYAdd; } diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 12220297eb..2fa1d38708 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -2026,8 +2026,8 @@ namespace CalamityMod.NPCs.Yharon { if (CalamityWorld.LegendaryMode && revenge) { - if (!NPC.AnyNPCs(ModContent.NPCType())) - NPC.SpawnOnPlayer(NPC.FindClosestPlayer(), ModContent.NPCType()); + if (!NPC.AnyNPCs(ModContent.NPCType())) + NPC.SpawnOnPlayer(NPC.FindClosestPlayer(), ModContent.NPCType()); } float bulletHellTeleportLocationDistance = 540f; diff --git a/Projectiles/Boss/BirbAuraFlare.cs b/Projectiles/Boss/BirbAuraFlare.cs index cb17ddd3fd..9c8cf55d24 100644 --- a/Projectiles/Boss/BirbAuraFlare.cs +++ b/Projectiles/Boss/BirbAuraFlare.cs @@ -114,7 +114,7 @@ namespace CalamityMod.Projectiles.Boss float y = projTileX * 16 + 900; Vector2 laserVelocity = new Vector2(x, 160f) - new Vector2(x, y); int type = ModContent.ProjectileType(); - int damage = Projectile.GetProjectileDamage(ModContent.NPCType()); + int damage = Projectile.GetProjectileDamage(ModContent.NPCType()); if (Projectile.ai[0] >= 2f) { x += 1000f; diff --git a/Scenes/MusicScenes/DragonfollyMusicScene.cs b/Scenes/MusicScenes/DragonfollyMusicScene.cs index b005c124a8..ae42983e18 100644 --- a/Scenes/MusicScenes/DragonfollyMusicScene.cs +++ b/Scenes/MusicScenes/DragonfollyMusicScene.cs @@ -9,7 +9,7 @@ namespace CalamityMod.Systems { public override SceneEffectPriority Priority => SceneEffectPriority.BossMedium; - public override int NPCType => ModContent.NPCType(); + public override int NPCType => ModContent.NPCType(); public override int? MusicModMusic => CalamityMod.Instance.GetMusicFromMusicMod("Dragonfolly"); public override int VanillaMusic => MusicID.Boss4; public override int OtherworldMusic => MusicID.OtherworldlyBoss2; diff --git a/Systems/Collections/NPCs/BossHPScalingList.cs b/Systems/Collections/NPCs/BossHPScalingList.cs index 5912dbbc55..8527fc2b5e 100644 --- a/Systems/Collections/NPCs/BossHPScalingList.cs +++ b/Systems/Collections/NPCs/BossHPScalingList.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Systems.Collections NPCType(), NPCType(), NPCType(), - NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Systems/Collections/NPCs/BossTypeDict.cs b/Systems/Collections/NPCs/BossTypeDict.cs index 20ddc6d87e..c04456463f 100644 --- a/Systems/Collections/NPCs/BossTypeDict.cs +++ b/Systems/Collections/NPCs/BossTypeDict.cs @@ -78,7 +78,7 @@ namespace CalamityMod.Systems.Collections { NPCType(), 28 }, { NPCID.MoonLordCore, 29 }, { NPCType(), 30 }, - { NPCType(), 31 }, + { NPCType(), 31 }, { NPCType(), 32 }, { NPCType(), 33 }, { NPCType(), 34 }, diff --git a/Systems/Collections/NPCs/EnemyImmunitiesList.cs b/Systems/Collections/NPCs/EnemyImmunitiesList.cs index 60d1d76aa7..f6f625b1d2 100644 --- a/Systems/Collections/NPCs/EnemyImmunitiesList.cs +++ b/Systems/Collections/NPCs/EnemyImmunitiesList.cs @@ -162,7 +162,7 @@ namespace CalamityMod.Systems.Collections NPCType(), NPCType(), NPCType(), - NPCType(), + NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Tiles/MonsterBanner.cs b/Tiles/MonsterBanner.cs index a62018f05a..7ec43cdd31 100644 --- a/Tiles/MonsterBanner.cs +++ b/Tiles/MonsterBanner.cs @@ -108,7 +108,7 @@ namespace CalamityMod.Tiles npc = NPCType(); break; case 11: - npc = NPCType(); // There's also the boss variant but I dont think we want banners to affect them? + npc = NPCType(); // There's also the boss variant but I dont think we want banners to affect them? break; /*case 12: npc = NPCType(); - Formerly Sea Urchin diff --git a/UI/SpeedrunTimerUI.cs b/UI/SpeedrunTimerUI.cs index 19eb113455..5e7d334499 100644 --- a/UI/SpeedrunTimerUI.cs +++ b/UI/SpeedrunTimerUI.cs @@ -118,7 +118,7 @@ namespace CalamityMod.UI 28 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, 29 => TextureAssets.NpcHeadBoss[8].Value, // Moon Lord 30 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, - 31 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, + 31 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, 32 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, 33 => TextureAssets.NpcHeadBoss[NPCID.Sets.BossHeadTextures[ModContent.NPCType()]].Value, 34 => ModContent.Request("CalamityMod/NPCs/StormWeaver/StormWeaverHeadNaked_Head_Boss").Value, diff --git a/Utilities/NPCDebuffs.cs b/Utilities/NPCDebuffs.cs index cdea134597..9f0f06c931 100644 --- a/Utilities/NPCDebuffs.cs +++ b/Utilities/NPCDebuffs.cs @@ -249,9 +249,9 @@ namespace CalamityMod { ModContent.NPCType(), holy }, { ModContent.NPCType(), holy }, - { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType() }) }, - { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType() }) }, + { ModContent.NPCType(), new(GeneralImmunityStatus.None, new int[] { ModContent.BuffType() }) }, { ModContent.NPCType(), holy }, { ModContent.NPCType(), holy }, From 21fc78b5b63c938092ebcf1721d0152e5f9627ef Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Jun 2025 15:19:36 -0400 Subject: [PATCH 37/72] Moved Aquatic Scourge and Astrum Deus AIs from CalamityAIs to files Deleted the CalamityAIs folder, and moved CalamityRegularEnemyAI into the NormalNPCs folder --- NPCs/Abyss/Laserfish.cs | 2 +- NPCs/Abyss/MorayEel.cs | 2 +- NPCs/Abyss/ToxicMinnow.cs | 2 +- NPCs/Abyss/Viperfish.cs | 2 +- NPCs/AquaticScourge/AquaticScourgeBody.cs | 249 ++++- NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 221 ++++- NPCs/AquaticScourge/AquaticScourgeHead.cs | 468 ++++++++- NPCs/AquaticScourge/AquaticScourgeTail.cs | 219 ++++- NPCs/AstrumDeus/AstrumDeusBody.cs | 333 ++++++- NPCs/AstrumDeus/AstrumDeusHead.cs | 657 ++++++++++++- NPCs/AstrumDeus/AstrumDeusTail.cs | 226 ++++- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 1 - NPCs/Bumblebirb/DraconicSwarmer.cs | 3 +- .../CalamityBossAIs/AquaticScourgeAI.cs | 628 ------------ .../CalamityBossAIs/AstrumDeusAI.cs | 915 ------------------ NPCs/Crags/DespairStone.cs | 2 +- NPCs/NormalNPCs/Bohldohr.cs | 1 - .../CalamityRegularEnemyAI.cs | 257 +++-- NPCs/NormalNPCs/CrawlerAmber.cs | 1 - NPCs/NormalNPCs/CrawlerAmethyst.cs | 1 - NPCs/NormalNPCs/CrawlerCrystal.cs | 1 - NPCs/NormalNPCs/CrawlerDiamond.cs | 1 - NPCs/NormalNPCs/CrawlerEmerald.cs | 1 - NPCs/NormalNPCs/CrawlerRuby.cs | 1 - NPCs/NormalNPCs/CrawlerSapphire.cs | 1 - NPCs/NormalNPCs/CrawlerTopaz.cs | 1 - NPCs/NormalNPCs/Cryon.cs | 1 - NPCs/NormalNPCs/Frogfish.cs | 1 - NPCs/NormalNPCs/PhantomSpirit.cs | 1 - NPCs/NormalNPCs/PhantomSpiritL.cs | 1 - NPCs/NormalNPCs/PhantomSpiritM.cs | 1 - NPCs/NormalNPCs/PhantomSpiritS.cs | 1 - NPCs/NormalNPCs/Rimehound.cs | 1 - NPCs/NormalNPCs/WildBumblebirb.cs | 1 - NPCs/Signus/CosmicLantern.cs | 2 +- NPCs/SulphurousSea/Gnasher.cs | 2 +- NPCs/SulphurousSea/Sulflounder.cs | 2 +- NPCs/SulphurousSea/Toxicatfish.cs | 2 +- NPCs/SunkenSea/AlphaSeaMinnow.cs | 1 - NPCs/SunkenSea/PodobooKoi.cs | 1 - NPCs/SunkenSea/SeaMinnow.cs | 2 +- 41 files changed, 2481 insertions(+), 1735 deletions(-) delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs delete mode 100644 NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs rename NPCs/{CalamityAIs/CalamityRegularEnemyAIs => NormalNPCs}/CalamityRegularEnemyAI.cs (65%) diff --git a/NPCs/Abyss/Laserfish.cs b/NPCs/Abyss/Laserfish.cs index e15e91f222..04906775dd 100644 --- a/NPCs/Abyss/Laserfish.cs +++ b/NPCs/Abyss/Laserfish.cs @@ -2,7 +2,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; diff --git a/NPCs/Abyss/MorayEel.cs b/NPCs/Abyss/MorayEel.cs index 69c7dc7c72..4cbaa373e4 100644 --- a/NPCs/Abyss/MorayEel.cs +++ b/NPCs/Abyss/MorayEel.cs @@ -2,7 +2,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Melee; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.GameContent.ItemDropRules; diff --git a/NPCs/Abyss/ToxicMinnow.cs b/NPCs/Abyss/ToxicMinnow.cs index 3fbf5c0ef8..5f54401431 100644 --- a/NPCs/Abyss/ToxicMinnow.cs +++ b/NPCs/Abyss/ToxicMinnow.cs @@ -3,7 +3,7 @@ using System.IO; using CalamityMod.BiomeManagers; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.Projectiles.Enemy; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; diff --git a/NPCs/Abyss/Viperfish.cs b/NPCs/Abyss/Viperfish.cs index 2fed796aaa..8e5d0c06e6 100644 --- a/NPCs/Abyss/Viperfish.cs +++ b/NPCs/Abyss/Viperfish.cs @@ -4,7 +4,7 @@ using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Melee; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index b0db3298e4..c7a580569b 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -1,15 +1,19 @@ using System.IO; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; +using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; using Terraria.ModLoader; +using CalamityMod.Systems.Collections; namespace CalamityMod.NPCs.AquaticScourge { @@ -89,7 +93,248 @@ namespace CalamityMod.NPCs.AquaticScourge public override void AI() { - AquaticScourgeAI.VanillaAquaticScourgeAI(NPC, Mod, false); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + bool getFuckedAI = Main.zenithWorld; + + // Adjust hostility and stats + bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + { + if (nonHostile) + { + // Kiss my motherfucking ass you piece of shit game + NPC.timeLeft *= 20; + NPC.npcSlots = 16f; + CalamityGlobalNPC.BossKillTimes.TryGetValue(NPC.type, out int revKillTime); + calamityGlobalNPC.KillTime = revKillTime; + calamityGlobalNPC.newAI[0] = 1f; + nonHostile = false; + NPC.chaseable = true; + NPC.netUpdate = true; + } + } + else + NPC.damage = 0; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.75f; + bool phase3 = lifeRatio < 0.5f; + bool phase4 = lifeRatio < 0.25f; + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + if (NPC.life > Main.npc[(int)NPC.ai[1]].life) + NPC.life = Main.npc[(int)NPC.ai[1]].life; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool notOcean = player.position.Y < 300f || + player.position.Y > Main.worldSurface * 16.0 || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + + // Check for the flipped Abyss + if (Main.remixWorld) + { + notOcean = player.position.Y < Main.UnderworldLayer * 0.8f || player.position.Y > Main.UnderworldLayer || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + } + + bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush; + float enrageScale = bossRush ? 1f : 0f; + if (biomeEnraged) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = getFuckedAI; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // Fire teeth + if (calamityGlobalNPC.newAI[0] == 1f && (!phase3 || phase4)) + { + NPC.localAI[0] += 1f; + float shootProjectile = 300; + float timer = NPC.ai[0] + 15f; + float divisor = timer + shootProjectile; + + if (NPC.localAI[0] % divisor == 0f && (NPC.ai[0] % 3f == 0f || getFuckedAI || !death)) + { + NPC.TargetClosest(); + if (Collision.CanHit(NPC.position, NPC.width, NPC.height, player.position, player.width, player.height)) + { + SoundEngine.PlaySound(SoundID.Item17, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float toothVelocity = death ? 9f : 8f; + Vector2 projectileVelocity = (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float accelerate = phase4 ? 1f : 0f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity * 5f, projectileVelocity * toothVelocity, type, damage, 0f, Main.myPlayer, accelerate, 0f); + } + + NPC.netUpdate = true; + } + } + } + + // Kill body and tail + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + { + shouldDespawn = false; + break; + } + } + if (!shouldDespawn) + { + if (NPC.ai[1] <= 0f) + shouldDespawn = true; + else if (Main.npc[(int)NPC.ai[1]].life <= 0) + shouldDespawn = true; + } + if (shouldDespawn) + { + NPC.life = 0; + NPC.HitEffect(0, 10.0); + NPC.checkDead(); + NPC.active = false; + } + + float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 12800f : 6400f; + if (player.dead || Vector2.Distance(NPC.Center, player.Center) > maxDistance || (nonHostile && biomeEnraged)) + { + calamityGlobalNPC.newAI[1] = 1f; + NPC.TargetClosest(false); + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + { + for (int a = 0; a < Main.npc.Length; a++) + { + int type = Main.npc[a].type; + if (AquaticScourgeIDList.Includes(type)) + Main.npc[a].active = false; + } + } + } + else + calamityGlobalNPC.newAI[1] = 0f; + + // Change direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + // Alpha changes + if (Main.npc[(int)NPC.ai[1]].alpha < 128) + { + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + } + + Vector2 scourgePosition = NPC.Center; + Vector2 predictionVector = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.player[NPC.target].velocity * 20f : Vector2.Zero; + float scourgeTargetX = player.Center.X + predictionVector.X; + float scourgeTargetY = player.Center.Y + predictionVector.Y; + + // Velocity and movement + float scourgeMaxSpeed = 5f; + if (calamityGlobalNPC.newAI[0] == 1f) + { + scourgeMaxSpeed = revenge ? 14.4f : 12f; + if (expertMode) + scourgeMaxSpeed += 2.4f * (1f - lifeRatio); + scourgeMaxSpeed += 3f * enrageScale; + if (death || getFuckedAI) + { + scourgeMaxSpeed += 5f; + scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; + } + + if (Main.getGoodWorld) + scourgeMaxSpeed *= 1.15f; + } + + scourgeTargetX = (int)(scourgeTargetX / 16f) * 16; + scourgeTargetY = (int)(scourgeTargetY / 16f) * 16; + scourgePosition.X = (int)(scourgePosition.X / 16f) * 16; + scourgePosition.Y = (int)(scourgePosition.Y / 16f) * 16; + scourgeTargetX -= scourgePosition.X; + scourgeTargetY -= scourgePosition.Y; + + if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) + { + try + { + scourgePosition = NPC.Center; + scourgeTargetX = Main.npc[(int)NPC.ai[1]].Center.X - scourgePosition.X; + scourgeTargetY = Main.npc[(int)NPC.ai[1]].Center.Y - scourgePosition.Y; + } + catch + { + } + + NPC.rotation = (float)Math.Atan2(scourgeTargetY, scourgeTargetX) + MathHelper.PiOver2; + float scourgeTargetDist = (float)Math.Sqrt(scourgeTargetX * scourgeTargetX + scourgeTargetY * scourgeTargetY); + int scourgeWidth = NPC.width; + scourgeTargetDist = (scourgeTargetDist - scourgeWidth) / scourgeTargetDist; + scourgeTargetX *= scourgeTargetDist; + scourgeTargetY *= scourgeTargetDist; + NPC.velocity = Vector2.Zero; + NPC.position.X = NPC.position.X + scourgeTargetX; + NPC.position.Y = NPC.position.Y + scourgeTargetY; + + if (scourgeTargetX < 0f) + NPC.spriteDirection = -1; + else if (scourgeTargetX > 0f) + NPC.spriteDirection = 1; + } + + // Calculate contact damage based on velocity + if (!nonHostile) + { + float minimalContactDamageVelocity = scourgeMaxSpeed * 0.25f; + float minimalDamageVelocity = scourgeMaxSpeed * 0.5f; + float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); + if (bodyAndTailVelocity <= minimalContactDamageVelocity) + NPC.damage = 0; + else + { + float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index ae65703e57..66ec3f5969 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -1,11 +1,15 @@ -using System.IO; +using System; +using System.IO; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Systems.Collections; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Terraria; +using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; @@ -88,7 +92,218 @@ namespace CalamityMod.NPCs.AquaticScourge public override void AI() { - AquaticScourgeAI.VanillaAquaticScourgeAI(NPC, Mod, false); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + bool getFuckedAI = Main.zenithWorld; + + // Adjust hostility and stats + bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + { + if (nonHostile) + { + // Kiss my motherfucking ass you piece of shit game + NPC.timeLeft *= 20; + NPC.npcSlots = 16f; + CalamityGlobalNPC.BossKillTimes.TryGetValue(NPC.type, out int revKillTime); + calamityGlobalNPC.KillTime = revKillTime; + calamityGlobalNPC.newAI[0] = 1f; + nonHostile = false; + NPC.chaseable = true; + NPC.netUpdate = true; + } + } + else + NPC.damage = 0; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.75f; + bool phase3 = lifeRatio < 0.5f; + bool phase4 = lifeRatio < 0.25f; + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + if (NPC.life > Main.npc[(int)NPC.ai[1]].life) + NPC.life = Main.npc[(int)NPC.ai[1]].life; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool notOcean = player.position.Y < 300f || + player.position.Y > Main.worldSurface * 16.0 || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + + // Check for the flipped Abyss + if (Main.remixWorld) + { + notOcean = player.position.Y < Main.UnderworldLayer * 0.8f || player.position.Y > Main.UnderworldLayer || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + } + + bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush; + float enrageScale = bossRush ? 1f : 0f; + if (biomeEnraged) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = getFuckedAI; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // Kill body and tail + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + { + shouldDespawn = false; + break; + } + } + if (!shouldDespawn) + { + if (NPC.ai[1] <= 0f) + shouldDespawn = true; + else if (Main.npc[(int)NPC.ai[1]].life <= 0) + shouldDespawn = true; + } + if (shouldDespawn) + { + NPC.life = 0; + NPC.HitEffect(0, 10.0); + NPC.checkDead(); + NPC.active = false; + } + + float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 12800f : 6400f; + if (player.dead || Vector2.Distance(NPC.Center, player.Center) > maxDistance || (nonHostile && biomeEnraged)) + { + calamityGlobalNPC.newAI[1] = 1f; + NPC.TargetClosest(false); + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + { + for (int a = 0; a < Main.npc.Length; a++) + { + int type = Main.npc[a].type; + if (AquaticScourgeIDList.Includes(type)) + Main.npc[a].active = false; + } + } + } + else + calamityGlobalNPC.newAI[1] = 0f; + + // Change direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + // Alpha changes + if (Main.npc[(int)NPC.ai[1]].alpha < 128) + { + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + } + + Vector2 scourgePosition = NPC.Center; + Vector2 predictionVector = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.player[NPC.target].velocity * 20f : Vector2.Zero; + float scourgeTargetX = player.Center.X + predictionVector.X; + float scourgeTargetY = player.Center.Y + predictionVector.Y; + + // Velocity and movement + float scourgeMaxSpeed = 5f; + if (calamityGlobalNPC.newAI[0] == 1f) + { + scourgeMaxSpeed = revenge ? 14.4f : 12f; + if (expertMode) + scourgeMaxSpeed += 2.4f * (1f - lifeRatio); + scourgeMaxSpeed += 3f * enrageScale; + if (death || getFuckedAI) + { + scourgeMaxSpeed += 5f; + scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; + } + + if (Main.getGoodWorld) + scourgeMaxSpeed *= 1.15f; + } + + scourgeTargetX = (int)(scourgeTargetX / 16f) * 16; + scourgeTargetY = (int)(scourgeTargetY / 16f) * 16; + scourgePosition.X = (int)(scourgePosition.X / 16f) * 16; + scourgePosition.Y = (int)(scourgePosition.Y / 16f) * 16; + scourgeTargetX -= scourgePosition.X; + scourgeTargetY -= scourgePosition.Y; + + if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) + { + try + { + scourgePosition = NPC.Center; + scourgeTargetX = Main.npc[(int)NPC.ai[1]].Center.X - scourgePosition.X; + scourgeTargetY = Main.npc[(int)NPC.ai[1]].Center.Y - scourgePosition.Y; + } + catch + { + } + + NPC.rotation = (float)Math.Atan2(scourgeTargetY, scourgeTargetX) + MathHelper.PiOver2; + float scourgeTargetDist = (float)Math.Sqrt(scourgeTargetX * scourgeTargetX + scourgeTargetY * scourgeTargetY); + int scourgeWidth = NPC.width; + scourgeTargetDist = (scourgeTargetDist - scourgeWidth) / scourgeTargetDist; + scourgeTargetX *= scourgeTargetDist; + scourgeTargetY *= scourgeTargetDist; + NPC.velocity = Vector2.Zero; + NPC.position.X = NPC.position.X + scourgeTargetX; + NPC.position.Y = NPC.position.Y + scourgeTargetY; + + if (scourgeTargetX < 0f) + NPC.spriteDirection = -1; + else if (scourgeTargetX > 0f) + NPC.spriteDirection = 1; + } + + // Calculate contact damage based on velocity + if (!nonHostile) + { + float minimalContactDamageVelocity = scourgeMaxSpeed * 0.25f; + float minimalDamageVelocity = scourgeMaxSpeed * 0.5f; + float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); + if (bodyAndTailVelocity <= minimalContactDamageVelocity) + NPC.damage = 0; + else + { + float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 4acad4c1dc..bb2ce5cee8 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -1,5 +1,6 @@ using System.IO; using CalamityMod.BiomeManagers; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; using CalamityMod.Items.Accessories; @@ -16,13 +17,13 @@ using CalamityMod.Items.Weapons.Melee; 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.CalamityAIs.CalamityBossAIs; -using CalamityMod.NPCs.TownNPCs; +using CalamityMod.Projectiles.Boss; +using CalamityMod.Projectiles.Enemy; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using Terraria; using Terraria.Audio; using Terraria.GameContent; @@ -30,6 +31,7 @@ using Terraria.GameContent.Bestiary; using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.ModLoader; +using CalamityMod.Systems.Collections; namespace CalamityMod.NPCs.AquaticScourge { @@ -131,7 +133,465 @@ namespace CalamityMod.NPCs.AquaticScourge public override void AI() { - AquaticScourgeAI.VanillaAquaticScourgeAI(NPC, Mod, true); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + bool getFuckedAI = Main.zenithWorld; + CalamityGlobalNPC.aquaticScourge = NPC.whoAmI; + + // Adjust hostility and stats + bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + { + if (nonHostile) + { + // Kiss my motherfucking ass you piece of shit game + NPC.timeLeft *= 20; + NPC.npcSlots = 16f; + CalamityGlobalNPC.BossKillTimes.TryGetValue(NPC.type, out int revKillTime); + calamityGlobalNPC.KillTime = revKillTime; + calamityGlobalNPC.newAI[0] = 1f; + nonHostile = false; + NPC.boss = true; + NPC.chaseable = true; + NPC.netUpdate = true; + } + } + else + NPC.damage = 0; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.75f; + bool phase3 = lifeRatio < 0.5f; + bool phase4 = lifeRatio < 0.25f; + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool notOcean = player.position.Y < 300f || + player.position.Y > Main.worldSurface * 16.0 || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + + // Check for the flipped Abyss + if (Main.remixWorld) + { + notOcean = player.position.Y < Main.UnderworldLayer * 0.8f || player.position.Y > Main.UnderworldLayer || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + } + + // Enrage + if (notOcean && !player.Calamity().ZoneSulphur && !bossRush) + { + if (NPC.localAI[2] > 0f) + NPC.localAI[2] -= 1f; + } + else + NPC.localAI[2] = CalamityGlobalNPC.biomeEnrageTimerMax; + + bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush; + + float enrageScale = bossRush ? 1f : 0f; + if (biomeEnraged) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + // Circular movement + float colorFadeTimeAfterSpiral = 90f; + float spiralGateValue = 480f; + bool doSpiral = false; + if (calamityGlobalNPC.newAI[0] == 1f && calamityGlobalNPC.newAI[2] == 1f && (revenge || getFuckedAI)) + { + doSpiral = calamityGlobalNPC.newAI[1] == 0f && calamityGlobalNPC.newAI[3] >= spiralGateValue; + if (Vector2.Distance(NPC.Center, player.Center) < (getFuckedAI ? 1600f : 1000f) || doSpiral) + calamityGlobalNPC.newAI[3] += 1f; + + if (doSpiral) + { + NPC.localAI[3] = colorFadeTimeAfterSpiral; + + // Vomit acid mist + float acidMistBarfDivisor = getFuckedAI ? 2f : ((float)Math.Floor(bossRush ? 4f : death ? 5f : 6f) * (phase3 ? 1.5f : 1f)); + if (calamityGlobalNPC.newAI[3] % acidMistBarfDivisor == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float mistVelocity = death ? 10f : 8f; + Vector2 projectileVelocity = (NPC.Center + NPC.velocity * 10f - NPC.Center).SafeNormalize(Vector2.UnitY); + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + projectileVelocity * 5f, projectileVelocity * mistVelocity, type, damage, 0f, Main.myPlayer); + Main.projectile[proj].tileCollide = false; + Main.projectile[proj].timeLeft = getFuckedAI ? 240 : 600; + } + } + + // Vomit circular spreads of acid clouds while in phase 3 + float toxicCloudBarfDivisor = bossRush ? 20f : death ? 30f : 40f; + if (calamityGlobalNPC.newAI[3] % toxicCloudBarfDivisor == 0f && phase3) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + int totalProjectiles = (phase4 ? 6 : 9) + (getFuckedAI ? Main.rand.Next(-2, 3) : (int)((calamityGlobalNPC.newAI[3] - spiralGateValue) / toxicCloudBarfDivisor) * (phase4 ? 2 : 3)); + float radians = MathHelper.TwoPi / totalProjectiles; + float cloudVelocity = 1f + enrageScale; + Vector2 spinningPoint = new Vector2(0f, -cloudVelocity); + for (int k = 0; k < totalProjectiles; k++) + { + Vector2 vector255 = spinningPoint.RotatedBy(radians * k); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer); + } + } + } + + // Velocity boost + if (calamityGlobalNPC.newAI[3] == spiralGateValue) + { + NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY); + NPC.velocity *= 24f; + } + + // Spin velocity + float velocity = (float)(MathHelper.Pi * 2D) / 120f; + // In GFB, contracts the radius as the fight progresses + if (getFuckedAI) + velocity *= phase3 ? 1.5f : phase2 ? 1.25f : 1f; + NPC.velocity = NPC.velocity.RotatedBy(-(double)velocity * NPC.localAI[1]); + // Speed up even more in GFB for more radius + if (getFuckedAI && NPC.velocity.Length() <= 32f) + NPC.velocity *= 1.1f; + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; + + // Reset and charge at target + // Don't reset in GFB + if (!getFuckedAI && calamityGlobalNPC.newAI[3] >= spiralGateValue + 120f) + { + calamityGlobalNPC.newAI[3] = 0f; + NPC.TargetClosest(); + } + } + else + { + if (!Collision.CanHit(NPC.Center, 1, 1, player.position, player.width, player.height) && calamityGlobalNPC.newAI[3] > 300f) + calamityGlobalNPC.newAI[3] -= 2f; + + if (NPC.localAI[3] > 0f) + NPC.localAI[3] -= 1f; + + NPC.localAI[1] = NPC.Center.X - player.Center.X < 0 ? 1f : -1f; + } + } + + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = doSpiral || getFuckedAI; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // Spawn segments + if (calamityGlobalNPC.newAI[2] == 0f && NPC.ai[0] == 0f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int maxLength = getFuckedAI ? 24 : death ? 80 : revenge ? 40 : expertMode ? 35 : 30; + int Previous = NPC.whoAmI; + for (int segments = 0; segments < maxLength; segments++) + { + int lol; + if (segments >= 0 && segments < maxLength - 1) + { + if (segments % 2 == 0) + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI); + else + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType(), NPC.whoAmI); + } + else + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, 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); + Previous = lol; + } + } + + calamityGlobalNPC.newAI[2] = 1f; + } + + // Big barf attack + if (calamityGlobalNPC.newAI[0] == 1f && (!doSpiral && phase2) || (getFuckedAI && !phase3)) + { + NPC.localAI[0] += 1f; + if (NPC.localAI[0] >= (revenge ? 360f : 420f)) + { + if (Vector2.Distance(player.Center, NPC.Center) > 320f) + { + NPC.localAI[0] = 0f; + NPC.netUpdate = true; + SoundEngine.PlaySound(SoundID.NPCDeath13, NPC.Center); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int totalProjectiles = bossRush ? 10 : expertMode ? 8 : 6; + if (phase3) + totalProjectiles *= 2; + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + for (int i = 0; i < totalProjectiles; i++) + { + Vector2 velocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + velocity = velocity.SafeNormalize(Vector2.UnitY); + velocity *= Main.rand.Next(phase3 ? 300 : 100, 401) * 0.01f; + + float maximumVelocityMult = death ? 0.75f : 0.5f; + if (expertMode) + velocity *= 1f + (maximumVelocityMult * (0.5f - lifeRatio)); + + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + velocity.SafeNormalize(Vector2.UnitY) * 5f, velocity, type, damage, 0f, Main.myPlayer); + } + } + } + } + } + + if (NPC.life > Main.npc[(int)NPC.ai[0]].life) + NPC.life = Main.npc[(int)NPC.ai[0]].life; + + float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 12800f : 6400f; + if (player.dead || Vector2.Distance(NPC.Center, player.Center) > maxDistance || (nonHostile && biomeEnraged)) + { + calamityGlobalNPC.newAI[1] = 1f; + NPC.TargetClosest(false); + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + { + for (int a = 0; a < Main.npc.Length; a++) + { + int type = Main.npc[a].type; + if (AquaticScourgeIDList.Includes(type)) + Main.npc[a].active = false; + } + } + } + else + calamityGlobalNPC.newAI[1] = 0f; + + // Change direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + // Alpha changes + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + + Vector2 scourgePosition = NPC.Center; + Vector2 predictionVector = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.player[NPC.target].velocity * 20f : Vector2.Zero; + float scourgeTargetX = player.Center.X + predictionVector.X; + float scourgeTargetY = player.Center.Y + predictionVector.Y; + + // Velocity and movement + float scourgeMaxSpeed = 5f; + float scourgeAcceleration = 0.08f; + if (calamityGlobalNPC.newAI[0] == 1f) + { + scourgeMaxSpeed = revenge ? 14.4f : 12f; + scourgeAcceleration = revenge ? 0.18f : 0.15f; + if (expertMode) + { + scourgeMaxSpeed += 2.4f * (1f - lifeRatio); + scourgeAcceleration += 0.03f * (1f - lifeRatio); + } + scourgeMaxSpeed += 3f * enrageScale; + scourgeAcceleration += 0.06f * enrageScale; + if (death || getFuckedAI) + { + scourgeMaxSpeed += 5f; + scourgeAcceleration -= getFuckedAI ? 0f : 0.03f; + scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; + scourgeAcceleration += Vector2.Distance(player.Center, NPC.Center) * 0.000045f; + } + + // Increase acceleration after spiral attack + if (NPC.localAI[3] > 0f) + { + float accelerationMultiplier = MathHelper.Lerp(1f, 2f, NPC.localAI[3] / colorFadeTimeAfterSpiral); + scourgeAcceleration *= accelerationMultiplier; + } + + if (Main.getGoodWorld) + { + scourgeMaxSpeed *= 1.15f; + scourgeAcceleration *= 1.15f; + } + } + + if (!doSpiral) + { + if (calamityGlobalNPC.newAI[0] != 1f) + { + scourgeTargetY += 400; + if (Math.Abs(NPC.Center.X - player.Center.X) < 500f) + { + if (NPC.velocity.X > 0f) + scourgeTargetX = player.Center.X + 600f; + else + scourgeTargetX = player.Center.X - 600f; + } + } + + float scourgeHigherSpeed = scourgeMaxSpeed * 1.3f; + float scourgeLowerSpeed = scourgeMaxSpeed * 0.7f; + float scourgeSpeed = NPC.velocity.Length(); + if (scourgeSpeed > 0f) + { + if (scourgeSpeed > scourgeHigherSpeed) + { + NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY); + NPC.velocity *= scourgeHigherSpeed; + } + else if (scourgeSpeed < scourgeLowerSpeed) + { + NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY); + NPC.velocity *= scourgeLowerSpeed; + } + } + } + + scourgeTargetX = (int)(scourgeTargetX / 16f) * 16; + scourgeTargetY = (int)(scourgeTargetY / 16f) * 16; + scourgePosition.X = (int)(scourgePosition.X / 16f) * 16; + scourgePosition.Y = (int)(scourgePosition.Y / 16f) * 16; + scourgeTargetX -= scourgePosition.X; + scourgeTargetY -= scourgePosition.Y; + float scourgeTargetDist = (float)Math.Sqrt(scourgeTargetX * scourgeTargetX + scourgeTargetY * scourgeTargetY); + + if (!doSpiral) + { + float scourgeAbsoluteTargetX = Math.Abs(scourgeTargetX); + float scourgeAbsoluteTargetY = Math.Abs(scourgeTargetY); + float scourgeTimeToReachTarget = scourgeMaxSpeed / scourgeTargetDist; + scourgeTargetX *= scourgeTimeToReachTarget; + scourgeTargetY *= scourgeTimeToReachTarget; + + if ((NPC.velocity.X > 0f && scourgeTargetX > 0f) || (NPC.velocity.X < 0f && scourgeTargetX < 0f) || (NPC.velocity.Y > 0f && scourgeTargetY > 0f) || (NPC.velocity.Y < 0f && scourgeTargetY < 0f)) + { + if (NPC.velocity.X < scourgeTargetX) + { + NPC.velocity.X += scourgeAcceleration; + } + else + { + if (NPC.velocity.X > scourgeTargetX) + NPC.velocity.X -= scourgeAcceleration; + } + + if (NPC.velocity.Y < scourgeTargetY) + { + NPC.velocity.Y += scourgeAcceleration; + } + else + { + if (NPC.velocity.Y > scourgeTargetY) + NPC.velocity.Y -= scourgeAcceleration; + } + + if (Math.Abs(scourgeTargetY) < scourgeMaxSpeed * 0.2 && ((NPC.velocity.X > 0f && scourgeTargetX < 0f) || (NPC.velocity.X < 0f && scourgeTargetX > 0f))) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y += scourgeAcceleration * 2f; + else + NPC.velocity.Y -= scourgeAcceleration * 2f; + } + + if (Math.Abs(scourgeTargetX) < scourgeMaxSpeed * 0.2 && ((NPC.velocity.Y > 0f && scourgeTargetY < 0f) || (NPC.velocity.Y < 0f && scourgeTargetY > 0f))) + { + if (NPC.velocity.X > 0f) + NPC.velocity.X += scourgeAcceleration * 2f; + else + NPC.velocity.X -= scourgeAcceleration * 2f; + } + } + else + { + if (scourgeAbsoluteTargetX > scourgeAbsoluteTargetY) + { + if (NPC.velocity.X < scourgeTargetX) + NPC.velocity.X += scourgeAcceleration * 1.1f; + else if (NPC.velocity.X > scourgeTargetX) + NPC.velocity.X -= scourgeAcceleration * 1.1f; + + if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < scourgeMaxSpeed * 0.5) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y += scourgeAcceleration; + else + NPC.velocity.Y -= scourgeAcceleration; + } + } + else + { + if (NPC.velocity.Y < scourgeTargetY) + NPC.velocity.Y += scourgeAcceleration * 1.1f; + else if (NPC.velocity.Y > scourgeTargetY) + NPC.velocity.Y -= scourgeAcceleration * 1.1f; + + if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < scourgeMaxSpeed * 0.5) + { + if (NPC.velocity.X > 0f) + NPC.velocity.X += scourgeAcceleration; + else + NPC.velocity.X -= scourgeAcceleration; + } + } + } + + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; + } + + // Calculate contact damage based on velocity + if (!nonHostile) + { + float minimalContactDamageVelocity = scourgeMaxSpeed * 0.25f; + float minimalDamageVelocity = scourgeMaxSpeed * 0.5f; + if (NPC.velocity.Length() <= minimalContactDamageVelocity) + NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); + else + { + float velocityDamageScalar = MathHelper.Clamp((NPC.velocity.Length() - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp((float)Math.Round(NPC.defDamage * 0.5), NPC.defDamage, velocityDamageScalar); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 989e090678..75cdc27014 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -1,7 +1,9 @@ -using System.IO; +using System; +using System.IO; +using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Events; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Systems.Collections; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -88,7 +90,218 @@ namespace CalamityMod.NPCs.AquaticScourge public override void AI() { - AquaticScourgeAI.VanillaAquaticScourgeAI(NPC, Mod, false); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + bool getFuckedAI = Main.zenithWorld; + + // Adjust hostility and stats + bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + { + if (nonHostile) + { + // Kiss my motherfucking ass you piece of shit game + NPC.timeLeft *= 20; + NPC.npcSlots = 16f; + CalamityGlobalNPC.BossKillTimes.TryGetValue(NPC.type, out int revKillTime); + calamityGlobalNPC.KillTime = revKillTime; + calamityGlobalNPC.newAI[0] = 1f; + nonHostile = false; + NPC.chaseable = true; + NPC.netUpdate = true; + } + } + else + NPC.damage = 0; + + // Percent life remaining + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases + bool phase2 = lifeRatio < 0.75f; + bool phase3 = lifeRatio < 0.5f; + bool phase4 = lifeRatio < 0.25f; + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + if (NPC.life > Main.npc[(int)NPC.ai[1]].life) + NPC.life = Main.npc[(int)NPC.ai[1]].life; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool notOcean = player.position.Y < 300f || + player.position.Y > Main.worldSurface * 16.0 || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + + // Check for the flipped Abyss + if (Main.remixWorld) + { + notOcean = player.position.Y < Main.UnderworldLayer * 0.8f || player.position.Y > Main.UnderworldLayer || + (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); + } + + bool biomeEnraged = NPC.localAI[2] <= 0f || bossRush; + float enrageScale = bossRush ? 1f : 0f; + if (biomeEnraged) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 2f; + } + + // Adjust slowing debuff immunity + bool immuneToSlowingDebuffs = getFuckedAI; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; + NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; + + // Kill body and tail + bool shouldDespawn = true; + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) + { + shouldDespawn = false; + break; + } + } + if (!shouldDespawn) + { + if (NPC.ai[1] <= 0f) + shouldDespawn = true; + else if (Main.npc[(int)NPC.ai[1]].life <= 0) + shouldDespawn = true; + } + if (shouldDespawn) + { + NPC.life = 0; + NPC.HitEffect(0, 10.0); + NPC.checkDead(); + NPC.active = false; + } + + float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 12800f : 6400f; + if (player.dead || Vector2.Distance(NPC.Center, player.Center) > maxDistance || (nonHostile && biomeEnraged)) + { + calamityGlobalNPC.newAI[1] = 1f; + NPC.TargetClosest(false); + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + NPC.velocity.Y += 2f; + + if (NPC.position.Y > Main.worldSurface * 16D) + { + for (int a = 0; a < Main.npc.Length; a++) + { + int type = Main.npc[a].type; + if (AquaticScourgeIDList.Includes(type)) + Main.npc[a].active = false; + } + } + } + else + calamityGlobalNPC.newAI[1] = 0f; + + // Change direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + // Alpha changes + if (Main.npc[(int)NPC.ai[1]].alpha < 128) + { + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + } + + Vector2 scourgePosition = NPC.Center; + Vector2 predictionVector = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.player[NPC.target].velocity * 20f : Vector2.Zero; + float scourgeTargetX = player.Center.X + predictionVector.X; + float scourgeTargetY = player.Center.Y + predictionVector.Y; + + // Velocity and movement + float scourgeMaxSpeed = 5f; + if (calamityGlobalNPC.newAI[0] == 1f) + { + scourgeMaxSpeed = revenge ? 14.4f : 12f; + if (expertMode) + scourgeMaxSpeed += 2.4f * (1f - lifeRatio); + scourgeMaxSpeed += 3f * enrageScale; + if (death || getFuckedAI) + { + scourgeMaxSpeed += 5f; + scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; + } + + if (Main.getGoodWorld) + scourgeMaxSpeed *= 1.15f; + } + + scourgeTargetX = (int)(scourgeTargetX / 16f) * 16; + scourgeTargetY = (int)(scourgeTargetY / 16f) * 16; + scourgePosition.X = (int)(scourgePosition.X / 16f) * 16; + scourgePosition.Y = (int)(scourgePosition.Y / 16f) * 16; + scourgeTargetX -= scourgePosition.X; + scourgeTargetY -= scourgePosition.Y; + + if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) + { + try + { + scourgePosition = NPC.Center; + scourgeTargetX = Main.npc[(int)NPC.ai[1]].Center.X - scourgePosition.X; + scourgeTargetY = Main.npc[(int)NPC.ai[1]].Center.Y - scourgePosition.Y; + } + catch + { + } + + NPC.rotation = (float)Math.Atan2(scourgeTargetY, scourgeTargetX) + MathHelper.PiOver2; + float scourgeTargetDist = (float)Math.Sqrt(scourgeTargetX * scourgeTargetX + scourgeTargetY * scourgeTargetY); + int scourgeWidth = NPC.width; + scourgeTargetDist = (scourgeTargetDist - scourgeWidth) / scourgeTargetDist; + scourgeTargetX *= scourgeTargetDist; + scourgeTargetY *= scourgeTargetDist; + NPC.velocity = Vector2.Zero; + NPC.position.X = NPC.position.X + scourgeTargetX; + NPC.position.Y = NPC.position.Y + scourgeTargetY; + + if (scourgeTargetX < 0f) + NPC.spriteDirection = -1; + else if (scourgeTargetX > 0f) + NPC.spriteDirection = 1; + } + + // Calculate contact damage based on velocity + if (!nonHostile) + { + float minimalContactDamageVelocity = scourgeMaxSpeed * 0.25f; + float minimalDamageVelocity = scourgeMaxSpeed * 0.5f; + float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); + if (bodyAndTailVelocity <= minimalContactDamageVelocity) + NPC.damage = 0; + else + { + float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index ecfa2a3a11..53a82bf6cd 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -1,13 +1,16 @@ -using System.IO; +using System; +using System.IO; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using CalamityMod.Events; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; +using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; @@ -112,7 +115,331 @@ namespace CalamityMod.NPCs.AstrumDeus public override void AI() { - AstrumDeusAI.VanillaAstrumDeusAI(NPC, Mod, false); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + // Difficulty variables + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + float enrageScale = bossRush ? 0.5f : 0f; + if (Main.IsItDay() || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 1.5f; + } + + // Deus cannot hit for 3 seconds or while invulnerable + bool doNotDealDamage = calamityGlobalNPC.newAI[1] < 180f || NPC.dontTakeDamage; + if (doNotDealDamage) + NPC.damage = 0; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool increaseSpeed = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles; + bool increaseSpeedMore = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; + + // Inflict Extreme Gravity to nearby players + if (revenge) + { + if (!Main.dedServ) + { + if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < CalamityGlobalNPC.CatchUpDistance350Tiles) + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 2); + } + } + + // Life + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases based on life percentage + bool halfHealth = lifeRatio < 0.5f; + bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f; + bool startFlightPhase = lifeRatio < 0.8f || death || doubleWormPhase; + bool phase2 = lifeRatio < 0.5f && doubleWormPhase && expertMode; + bool phase3 = lifeRatio < 0.2f && doubleWormPhase && expertMode; + bool splittingMines = lifeRatio < 0.7f; + bool movingMines = lifeRatio < 0.3f && doubleWormPhase && expertMode; + bool deathModeEnragePhase_Head = calamityGlobalNPC.newAI[0] == 3f; + bool deathModeEnragePhase_BodyAndTail = false; + + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing + float resistanceTime = doubleWormPhase ? 300f : 600f; + + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; + + // Flight timer + float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) + calamityGlobalNPC.newAI[3] = 0f; + // Sound effect for swapping between attack behaviors in phase 2 + if (doubleWormPhase && calamityGlobalNPC.newAI[3] % aiSwitchTimer == 0f && !(deathModeEnragePhase_Head || deathModeEnragePhase_BodyAndTail)) + SoundEngine.PlaySound(AstrumDeusHead.SplitSound with { Pitch = -0.2f, Volume = 0.9f }, player.Center); + + // Phase for flying at the player + bool flyAtTarget = calamityGlobalNPC.newAI[3] >= (aiSwitchTimer * 0.5f) && startFlightPhase; + + // Length of worms + int phase1Length = death ? 80 : revenge ? 70 : expertMode ? 60 : 50; + int phase2Length = death ? 40 : revenge ? 35 : expertMode ? 30 : 25; + int gfbLength = death ? 8 : revenge ? 7 : expertMode ? 6 : 5; + int maxLength = Main.zenithWorld && doubleWormPhase ? gfbLength : doubleWormPhase ? phase2Length : phase1Length; + + // Become gradually more pissed as more worms are killed + int gfbMaxWormCount = 10; + int gfbWormCount = 0; + if (CalamityWorld.LegendaryMode && revenge) + gfbWormCount = NPC.CountNPCS(ModContent.NPCType()); + if (gfbWormCount > gfbMaxWormCount) + gfbWormCount = gfbMaxWormCount; + if (gfbWormCount > 0) + enrageScale += (gfbMaxWormCount - gfbWormCount) * 0.111f; + + // Copy dontTakeDamage and Opacity from head + NPC.dontTakeDamage = Main.npc[(int)NPC.ai[2]].dontTakeDamage; + NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; + deathModeEnragePhase_BodyAndTail = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] == 3f; + if (deathModeEnragePhase_BodyAndTail) + { + NPC.defense = 25; + calamityGlobalNPC.DR = 0.15f; + } + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + + // Alpha effects + if (Main.npc[(int)NPC.ai[1]].alpha < 128 && !NPC.dontTakeDamage) + { + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + } + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + int headType = ModContent.NPCType(); + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].type != headType || !Main.npc[i].active) + continue; + shouldDespawn = false; + break; + } + if (shouldDespawn) + { + if (Main.npc.IndexInRange((int)NPC.ai[1]) && Main.npc[(int)NPC.ai[1]].active && 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; + NPC.ForceNetUpdate(false); + } + + // Direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + if (NPC.life > Main.npc[(int)NPC.ai[1]].life) + NPC.life = Main.npc[(int)NPC.ai[1]].life; + + bool hasJustSpawned = calamityGlobalNPC.newAI[1] < resistanceTime * 0.4f && !doubleWormPhase; // Speed boost for the first 4 seconds after spawning + float segmentVelocity = hasJustSpawned ? 25f : deathModeEnragePhase_Head ? 19f : death ? 17.5f : 16f; + + float segmentVelocityBoost = 5f * (1f - lifeRatio); + segmentVelocity += segmentVelocityBoost; + segmentVelocity += 4f * enrageScale; + + if (revenge) + { + float revMultiplier = 1.1f; + segmentVelocity *= revMultiplier; + } + + // Shoot lasers + NPC.localAI[0] += 1f; + + int shootTime = (doubleWormPhase && expertMode) ? 2 : 1; + float shootProjectile = (doubleWormPhase && expertMode) ? 200 : 400; + float timer = NPC.ai[0] + 15f; + float divisor = timer + shootProjectile; + bool canFireProjectiles = NPC.Opacity >= 1f; + bool shootGodRays = phase2 || deathModeEnragePhase_BodyAndTail; + + if (canFireProjectiles) + { + if (!flyAtTarget || deathModeEnragePhase_BodyAndTail) + { + float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f; + if (NPC.localAI[0] % divisor == 0f && NPC.ai[0] % laserDivisor == 0f) + { + NPC.TargetClosest(); + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (deathModeEnragePhase_BodyAndTail) + { + Vector2 velocity = Vector2.Zero; + if (movingMines) + { + Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + randomMineMovement.Normalize(); + randomMineMovement *= Main.rand.Next(90, 121) * 0.01f; + velocity = randomMineMovement; + } + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float split = (splittingMines && NPC.ai[0] % 3f == 0f) ? 1f : 0f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); + } + } + + if (Vector2.Distance(player.Center, NPC.Center) > 80f) + { + if (Main.netMode != NetmodeID.MultiplayerClient) + { + float deusLaserSpeed = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f; + + Vector2 deusLaserCenter = NPC.Center; + float deusLaserTargetX = player.Center.X - deusLaserCenter.X; + float deusLaserTargetY = player.Center.Y - deusLaserCenter.Y; + float deusLaserTargetDist = (float)Math.Sqrt(deusLaserTargetX * deusLaserTargetX + deusLaserTargetY * deusLaserTargetY); + deusLaserTargetDist = deusLaserSpeed / deusLaserTargetDist; + deusLaserTargetX *= deusLaserTargetDist; + deusLaserTargetY *= deusLaserTargetDist; + deusLaserCenter.X += deusLaserTargetX * 5f; + deusLaserCenter.Y += deusLaserTargetY * 5f; + + Vector2 shootDirection = new Vector2(deusLaserTargetX, deusLaserTargetY).SafeNormalize(Vector2.UnitY); + Vector2 laserVelocity = shootDirection * deusLaserSpeed; + + int type = shootGodRays ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + if (shootGodRays) + { + SoundEngine.PlaySound(AstrumDeusHead.GodRaySound, NPC.Center); + // Waving beams need to start offset so they cross each other neatly. + float waveSideOffset = Main.rand.NextFloat(9f, 14f); + Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset; + + for (int i = -1; i <= 1; i += 2) + { + Vector2 laserStartPos = deusLaserCenter + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f); + Projectile godRay = Projectile.NewProjectileDirect(NPC.GetSource_FromAI(), laserStartPos, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + + // Tell this Phased God Ray exactly which way it should be waving. + godRay.localAI[1] = i * 0.5f; + } + } + else + { + SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); + Projectile.NewProjectile(NPC.GetSource_FromAI(), deusLaserCenter, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); + } + } + } + } + } + else + { + if (NPC.localAI[0] % divisor == 0f && NPC.ai[0] % 2f == 0f) + { + Vector2 velocity = Vector2.Zero; + if (movingMines) + { + Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); + randomMineMovement.Normalize(); + randomMineMovement *= Main.rand.Next(30, 121) * 0.01f; + velocity = randomMineMovement; + } + + int type = ModContent.ProjectileType(); + int damage = NPC.GetProjectileDamage(type); + float split = (splittingMines && NPC.ai[0] % 3f == 0f) ? 1f : 0f; + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); + } + } + } + + // Follow the head + Vector2 segmentCenter = NPC.Center; + float segmentTargetX = player.Center.X; + float segmentTargetY = player.Center.Y; + segmentTargetX = (int)(segmentTargetX / 16f) * 16; + segmentTargetY = (int)(segmentTargetY / 16f) * 16; + segmentCenter.X = (int)(segmentCenter.X / 16f) * 16; + segmentCenter.Y = (int)(segmentCenter.Y / 16f) * 16; + segmentTargetX -= segmentCenter.X; + segmentTargetY -= segmentCenter.Y; + + if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) + { + try + { + segmentCenter = NPC.Center; + segmentTargetX = Main.npc[(int)NPC.ai[1]].Center.X - segmentCenter.X; + segmentTargetY = Main.npc[(int)NPC.ai[1]].Center.Y - segmentCenter.Y; + } + catch + { + } + + NPC.rotation = (float)Math.Atan2(segmentTargetY, segmentTargetX) + MathHelper.PiOver2; + float segmentTargetDist = (float)Math.Sqrt(segmentTargetX * segmentTargetX + segmentTargetY * segmentTargetY); + int segmentWidth = NPC.width; + segmentTargetDist = (segmentTargetDist - segmentWidth) / segmentTargetDist; + segmentTargetX *= segmentTargetDist; + segmentTargetY *= segmentTargetDist; + NPC.velocity = Vector2.Zero; + NPC.position.X = NPC.position.X + segmentTargetX; + NPC.position.Y = NPC.position.Y + segmentTargetY; + + if (segmentTargetX < 0f) + NPC.spriteDirection = -1; + else if (segmentTargetX > 0f) + NPC.spriteDirection = 1; + } + + // Play spawn sound on Deus on the first frame because otherwise the sound wouldn't play properly in multiplayer + if (calamityGlobalNPC.newAI[1] == 0f && !doubleWormPhase) + { + SoundEngine.PlaySound(AstrumDeusHead.SpawnSound, NPC.Center); + calamityGlobalNPC.newAI[1] = 1f; + } + + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing + if (calamityGlobalNPC.newAI[1] < resistanceTime && ((NPC.position - NPC.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 1f)) + calamityGlobalNPC.newAI[1] += 1f; + + // Calculate contact damage based on velocity + if (!doNotDealDamage) + { + float minimalContactDamageVelocity = segmentVelocity * 0.25f; + float minimalDamageVelocity = segmentVelocity * 0.5f; + float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); + if (bodyAndTailVelocity <= minimalContactDamageVelocity) + NPC.damage = 0; + else + { + float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index eb5c436317..f590b2477c 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -1,6 +1,7 @@ -using System.IO; -using CalamityMod.BiomeManagers; +using System; +using System.IO; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Accessories; @@ -17,8 +18,7 @@ using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Rogue; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; +using CalamityMod.Packets; using CalamityMod.UI.VanillaBossBars; using CalamityMod.World; using Microsoft.Xna.Framework; @@ -149,7 +149,652 @@ namespace CalamityMod.NPCs.AstrumDeus public override void AI() { - AstrumDeusAI.VanillaAstrumDeusAI(NPC, Mod, true); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + // Difficulty variables + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + float enrageScale = bossRush ? 0.5f : 0f; + if (Main.IsItDay() || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 1.5f; + } + + // Deus cannot hit for 3 seconds or while invulnerable + bool doNotDealDamage = calamityGlobalNPC.newAI[1] < 180f || NPC.dontTakeDamage; + if (doNotDealDamage) + NPC.damage = 0; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool increaseSpeed = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles; + bool increaseSpeedMore = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; + + // Despawn safety, make sure to target another player if the current player target is too far away + if (increaseSpeedMore) + NPC.TargetClosest(); + + // Inflict Extreme Gravity to nearby players + if (revenge) + { + if (!Main.dedServ) + { + if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < CalamityGlobalNPC.CatchUpDistance350Tiles) + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 2); + } + } + + // Life + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases based on life percentage + bool halfHealth = lifeRatio < 0.5f; + bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f; + bool startFlightPhase = lifeRatio < 0.8f || death || doubleWormPhase; + bool phase2 = lifeRatio < 0.5f && doubleWormPhase && expertMode; + bool phase3 = lifeRatio < 0.2f && doubleWormPhase && expertMode; + bool splittingMines = lifeRatio < 0.7f; + bool movingMines = lifeRatio < 0.3f && doubleWormPhase && expertMode; + bool deathModeEnragePhase_Head = calamityGlobalNPC.newAI[0] == 3f; + bool deathModeEnragePhase_BodyAndTail = false; + + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing + float resistanceTime = doubleWormPhase ? 300f : 600f; + + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; + + // Flight timer + float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) + calamityGlobalNPC.newAI[3] = 0f; + // Sound effect for swapping between attack behaviors in phase 2 + if (doubleWormPhase && calamityGlobalNPC.newAI[3] % aiSwitchTimer == 0f && !(deathModeEnragePhase_Head || deathModeEnragePhase_BodyAndTail)) + SoundEngine.PlaySound(SplitSound with { Pitch = -0.2f, Volume = 0.9f }, player.Center); + + // Phase for flying at the player + bool flyAtTarget = calamityGlobalNPC.newAI[3] >= (aiSwitchTimer * 0.5f) && startFlightPhase; + + // Length of worms + int phase1Length = death ? 80 : revenge ? 70 : expertMode ? 60 : 50; + int phase2Length = death ? 40 : revenge ? 35 : expertMode ? 30 : 25; + int gfbLength = death ? 8 : revenge ? 7 : expertMode ? 6 : 5; + int maxLength = Main.zenithWorld && doubleWormPhase ? gfbLength : doubleWormPhase ? phase2Length : phase1Length; + + // Become gradually more pissed as more worms are killed + int gfbMaxWormCount = 10; + int gfbWormCount = 0; + if (CalamityWorld.LegendaryMode && revenge) + gfbWormCount = NPC.CountNPCS(ModContent.NPCType()); + if (gfbWormCount > gfbMaxWormCount) + gfbWormCount = gfbMaxWormCount; + if (gfbWormCount > 0) + enrageScale += (gfbMaxWormCount - gfbWormCount) * 0.111f; + + // Split into two worms + float splitAnimationTime = 180f; + bool oneWormAlive = NPC.CountNPCS(ModContent.NPCType()) < 2; + bool deathModeFinalWormEnrage = death && doubleWormPhase && oneWormAlive && calamityGlobalNPC.newAI[1] >= resistanceTime; + if (deathModeFinalWormEnrage) + { + if (calamityGlobalNPC.newAI[0] != 3f) + { + SoundEngine.PlaySound(SplitSound, player.Center); + calamityGlobalNPC.newAI[0] = 3f; + NPC.defense = 12; + calamityGlobalNPC.DR = 0.075f; + + // Despawns the other deus worm segments + int bodyID = ModContent.NPCType(); + int tailID = ModContent.NPCType(); + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC wormseg = Main.npc[i]; + if (!wormseg.active) + continue; + + if ((wormseg.type == bodyID || wormseg.type == tailID) && Main.npc[(int)wormseg.ai[2]].Calamity().newAI[0] != 3f) + { + wormseg.life = 0; + wormseg.active = false; + } + } + } + + calamityGlobalNPC.newAI[2] += 10f; + if (calamityGlobalNPC.newAI[2] > 162f) + calamityGlobalNPC.newAI[2] = 162f; + + NPC.Opacity = MathHelper.Clamp(1f - (calamityGlobalNPC.newAI[2] / splitAnimationTime), 0f, 1f); + } + + bool despawnRemainingWorm = doubleWormPhase && oneWormAlive && !death; + if ((halfHealth && calamityGlobalNPC.newAI[0] == 0f) || despawnRemainingWorm) + { + NPC.dontTakeDamage = true; + + calamityGlobalNPC.newAI[2] += despawnRemainingWorm ? 10f : 1f; + NPC.Opacity = MathHelper.Clamp(1f - (calamityGlobalNPC.newAI[2] / splitAnimationTime), 0f, 1f); + + bool despawning = calamityGlobalNPC.newAI[2] == splitAnimationTime; + + // + // CODE TWEAKED BY: OZZATRON + // September 20th, 2020 + // reason: fixing Astrum Deus death mode NPC cap bug + // + + // Despawn the unsplit Astrum Deus and spawn two half-size Astrum Deus worms. + if (despawning) + { + // If this is already a split worm (newAI[0] != 0f) then don't do anything. At all. + if (doubleWormPhase) + return; + + // Mark all existing body and tail segments as inactive. This instantly frees up their NPC slots for the freshly spawned worms. + int bodyID = ModContent.NPCType(); + int tailID = ModContent.NPCType(); + for (int i = 0; i < Main.maxNPCs; i++) + { + NPC wormseg = Main.npc[i]; + if (!wormseg.active) + continue; + if (wormseg.type == bodyID || wormseg.type == tailID) + { + wormseg.life = 0; + wormseg.active = false; + } + } + + // The unsplit Astrum Deus worm head will die next frame. + NPC.life = 0; + + // Do not spawn worms client side. The server handles this. + if (Main.netMode != NetmodeID.MultiplayerClient) + { + int wormamt = Main.zenithWorld ? 5 : 1; + for (int i = 0; i < wormamt; i++) + { + // Now that the original worm doesn't exist, startCount can be zero. + // int startCount = NPC.whoAmI + phase1Length + 1; + int startIndexHeadOne = 1; + int headOneID = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPC.type, startIndexHeadOne); + Main.npc[headOneID].Calamity().newAI[0] = 1f; + Main.npc[headOneID].velocity = Vector2.Normalize(player.Center - Main.npc[headOneID].Center) * 16f; + Main.npc[headOneID].timeLeft *= 20; + Main.npc[headOneID].ForceNetUpdate(); + + // On server, immediately send the correct extra AI of this head to clients. + if (Main.dedServ) + { + SyncCalamityNPCAIArrayPacket.Send(Main.npc[headOneID]); + } + + // Make sure the second split worm is also contiguous. + int startIndexHeadTwo = startIndexHeadOne + phase2Length + 1; + int headTwoID = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPC.type, startIndexHeadTwo); + Main.npc[headTwoID].Calamity().newAI[0] = 2f; + Main.npc[headTwoID].Calamity().newAI[3] = Main.getGoodWorld ? 300f : 600f; + Main.npc[headTwoID].velocity = Vector2.Normalize(player.Center - Main.npc[headTwoID].Center) * 16f; + Main.npc[headTwoID].timeLeft *= 20; + Main.npc[headTwoID].ForceNetUpdate(); + + // On server, immediately send the correct extra AI of this head to clients. + if (Main.dedServ) + { + SyncCalamityNPCAIArrayPacket.Send(Main.npc[headTwoID]); + } + } + + SoundEngine.PlaySound(AstrumDeusHead.SplitSound, player.Center); + } + return; + } + } + + if (Main.zenithWorld && calamityGlobalNPC.newAI[1] < 10f) // desync the deuses + { + float pushForce = 0.25f; + for (int k = 0; k < Main.maxNPCs; k++) + { + NPC otherDeus = Main.npc[k]; + // Short circuits to make the loop as fast as possible + if (!otherDeus.active || k == NPC.whoAmI) + continue; + + // If the other projectile is indeed the same owned by the same player and they're too close, nudge them away. + bool sameProjType = otherDeus.type == NPC.type; + float taxicabDist = Vector2.Distance(NPC.Center, otherDeus.Center); + float distancegate = 320f; + if (sameProjType && taxicabDist < distancegate) + { + if (NPC.position.X < otherDeus.position.X) + NPC.velocity.X -= pushForce; + else + NPC.velocity.X += pushForce; + + if (NPC.position.Y < otherDeus.position.Y) + NPC.velocity.Y -= pushForce; + else + NPC.velocity.Y += pushForce; + } + } + } + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + + // Alpha effects + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + + // Direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + if (Main.netMode != NetmodeID.MultiplayerClient) + { + if (NPC.ai[0] == 0f) + { + int Previous = NPC.whoAmI; + int bodyType = ModContent.NPCType(); + int tailType = ModContent.NPCType(); + for (int segments = 0; segments < maxLength; segments++) + { + int lol; + if (segments >= 0 && segments < maxLength - 1) + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, bodyType, NPC.whoAmI); + else + lol = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, tailType, NPC.whoAmI); + + if (segments % 2 == 0) + Main.npc[lol].localAI[3] = 1f; + + Main.npc[lol].realLife = NPC.whoAmI; + Main.npc[lol].Calamity().newAI[0] = Main.npc[Previous].Calamity().newAI[0]; + Main.npc[lol].Calamity().newAI[3] = Main.npc[Previous].Calamity().newAI[3]; + + if (Main.dedServ) + { + SyncCalamityNPCAIArrayPacket.Send(Main.npc[lol]); + } + + Main.npc[lol].ai[3] = segments + 1; + 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); + Previous = lol; + } + } + } + + if (NPC.life > Main.npc[(int)NPC.ai[0]].life) + NPC.life = Main.npc[(int)NPC.ai[0]].life; + + bool hasJustSpawned = calamityGlobalNPC.newAI[1] < resistanceTime * 0.4f && !doubleWormPhase; // Speed boost for the first 4 seconds after spawning + float segmentVelocity = hasJustSpawned ? 25f : deathModeEnragePhase_Head ? 19f : death ? 17.5f : 16f; + + float segmentVelocityBoost = 5f * (1f - lifeRatio); + segmentVelocity += segmentVelocityBoost; + segmentVelocity += 4f * enrageScale; + + if (revenge) + { + float revMultiplier = 1.1f; + segmentVelocity *= revMultiplier; + } + + int headTilePositionX = (int)(NPC.position.X / 16f) - 1; + int headTileWidthPosX = (int)((NPC.position.X + NPC.width) / 16f) + 2; + int headTilePositionY = (int)(NPC.position.Y / 16f) - 1; + int headTileWidthPosY = (int)((NPC.position.Y + NPC.height) / 16f) + 2; + + if (headTilePositionX < 0) + headTilePositionX = 0; + if (headTileWidthPosX > Main.maxTilesX) + headTileWidthPosX = Main.maxTilesX; + if (headTilePositionY < 0) + headTilePositionY = 0; + if (headTileWidthPosY > Main.maxTilesY) + headTileWidthPosY = Main.maxTilesY; + + // Fly or not + bool shouldFly = flyAtTarget; + if (!shouldFly) + { + for (int k = headTilePositionX; k < headTileWidthPosX; k++) + { + for (int l = headTilePositionY; l < headTileWidthPosY; l++) + { + if (Main.tile[k, l] != null && ((Main.tile[k, l].HasUnactuatedTile && (Main.tileSolid[Main.tile[k, l].TileType] || (Main.tileSolidTop[Main.tile[k, l].TileType] && Main.tile[k, l].TileFrameY == 0))) || Main.tile[k, l].LiquidAmount > 64)) + { + Vector2 vector2; + vector2.X = k * 16f; + vector2.Y = l * 16f; + if (NPC.position.X + NPC.width > vector2.X && NPC.position.X < vector2.X + 16f && NPC.position.Y + NPC.height > vector2.Y && NPC.position.Y < vector2.Y + 16f) + { + shouldFly = true; + break; + } + } + } + } + } + + // Start flying if target is not within a certain distance + if (!shouldFly) + { + NPC.localAI[1] = 1f; + + Rectangle rectangle = new Rectangle((int)NPC.position.X, (int)NPC.position.Y, NPC.width, NPC.height); + int noFlyZone = 200; + int heightReduction = death ? 130 : (int)(130f * (1f - lifeRatio)); + int height = 400 - heightReduction; + bool outsideNoFlyZone = true; + + if (NPC.position.Y > player.position.Y) + { + for (int m = 0; m < Main.maxPlayers; m++) + { + if (Main.player[m].active) + { + Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - noFlyZone, (int)Main.player[m].position.Y - noFlyZone, noFlyZone * 2, height); + if (rectangle.Intersects(rectangle2)) + { + outsideNoFlyZone = false; + break; + } + } + } + + if (outsideNoFlyZone) + shouldFly = true; + } + } + else + NPC.localAI[1] = 0f; + + // Despawn + if (player.dead) + { + shouldFly = false; + float velocity = 2f; + NPC.velocity.Y -= velocity; + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + segmentVelocity *= 2f; + NPC.velocity.Y -= velocity; + } + + int headType = ModContent.NPCType(); + int bodyType = ModContent.NPCType(); + int tailType = ModContent.NPCType(); + if ((double)NPC.position.Y < Main.topWorld + 16f) + { + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].type == headType || Main.npc[i].type == bodyType || Main.npc[i].type == tailType) + { + Main.npc[i].active = false; + Main.npc[i].ForceNetUpdate(false); + } + } + } + } + + // Speed and movement + float speedBoost = death ? (0.1f * (1f - lifeRatio)) : (0.13f * (1f - lifeRatio)); + float turnSpeedBoost = death ? (0.18f * (1f - lifeRatio)) : (0.2f * (1f - lifeRatio)); + float speed = (hasJustSpawned ? 0.26f : deathModeEnragePhase_Head ? 0.2f : death ? 0.18f : 0.13f) + speedBoost; + float turnSpeed = (hasJustSpawned ? 0.3f : deathModeEnragePhase_Head ? 0.27f : death ? 0.25f : 0.2f) + turnSpeedBoost; + speed += 0.05f * enrageScale; + turnSpeed += 0.08f * enrageScale; + + if (flyAtTarget) + { + float speedMultiplier = deathModeEnragePhase_Head ? 1.25f : doubleWormPhase ? (phase3 ? 1.25f : phase2 ? 1.2f : 1.15f) : 1f; + speed *= speedMultiplier; + } + + if (revenge) + { + float revMultiplier = 1.1f; + speed *= revMultiplier; + turnSpeed *= revMultiplier; + } + + speed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; + turnSpeed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; + + if (Main.getGoodWorld) + { + speed *= 1.15f; + turnSpeed *= 1.15f; + } + + Vector2 deusCenter = NPC.Center; + float deusTargetX = player.Center.X; + float deusTargetY = player.Center.Y; + deusTargetX = (int)(deusTargetX / 16f) * 16; + deusTargetY = (int)(deusTargetY / 16f) * 16; + deusCenter.X = (int)(deusCenter.X / 16f) * 16; + deusCenter.Y = (int)(deusCenter.Y / 16f) * 16; + deusTargetX -= deusCenter.X; + deusTargetY -= deusCenter.Y; + + if (!shouldFly) + { + NPC.velocity.Y += 0.15f; + if (NPC.velocity.Y > segmentVelocity) + NPC.velocity.Y = segmentVelocity; + + // This bool exists to stop the strange wiggle behavior when worms are falling down + bool slowXVelocity = Math.Abs(NPC.velocity.X) > speed; + if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < segmentVelocity * 0.4) + { + if (NPC.velocity.X < 0f) + NPC.velocity.X -= speed * 1.1f; + else + NPC.velocity.X += speed * 1.1f; + } + else if (NPC.velocity.Y == segmentVelocity) + { + if (slowXVelocity) + { + if (NPC.velocity.X < deusTargetX) + NPC.velocity.X += speed; + else if (NPC.velocity.X > deusTargetX) + NPC.velocity.X -= speed; + } + else + NPC.velocity.X = 0f; + } + else if (NPC.velocity.Y > 4f) + { + if (slowXVelocity) + { + if (NPC.velocity.X < 0f) + NPC.velocity.X += speed * 0.9f; + else + NPC.velocity.X -= speed * 0.9f; + } + else + NPC.velocity.X = 0f; + } + } + else + { + float deusTargetDist = (float)Math.Sqrt(deusTargetX * deusTargetX + deusTargetY * deusTargetY); + float deusAbsoluteTargetX = Math.Abs(deusTargetX); + float deusAbsoluteTargetY = Math.Abs(deusTargetY); + float deusTimeToReachTarget = segmentVelocity / deusTargetDist; + deusTargetX *= deusTimeToReachTarget; + deusTargetY *= deusTimeToReachTarget; + + bool speedUpWhileFlying = false; + if (flyAtTarget) + { + if (((NPC.velocity.X > 0f && deusTargetX < 0f) || (NPC.velocity.X < 0f && deusTargetX > 0f) || (NPC.velocity.Y > 0f && deusTargetY < 0f) || (NPC.velocity.Y < 0f && deusTargetY > 0f)) && Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y) > speed / 2f && deusTargetDist < 400f) + { + speedUpWhileFlying = true; + + if (Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y) < segmentVelocity) + NPC.velocity *= 1.1f; + } + + if (NPC.position.Y > player.position.Y) + { + speedUpWhileFlying = true; + + if (Math.Abs(NPC.velocity.X) < segmentVelocity / 2f) + { + if (NPC.velocity.X == 0f) + NPC.velocity.X -= NPC.direction; + + NPC.velocity.X *= 1.1f; + } + else if (NPC.velocity.Y > -segmentVelocity) + NPC.velocity.Y -= speed; + } + } + + if (!speedUpWhileFlying) + { + if (!flyAtTarget) + { + if (((NPC.velocity.X > 0f && deusTargetX > 0f) || (NPC.velocity.X < 0f && deusTargetX < 0f)) && ((NPC.velocity.Y > 0f && deusTargetY > 0f) || (NPC.velocity.Y < 0f && deusTargetY < 0f))) + { + if (NPC.velocity.X < deusTargetX) + NPC.velocity.X += turnSpeed; + else if (NPC.velocity.X > deusTargetX) + NPC.velocity.X -= turnSpeed; + + if (NPC.velocity.Y < deusTargetY) + NPC.velocity.Y += turnSpeed; + else if (NPC.velocity.Y > deusTargetY) + NPC.velocity.Y -= turnSpeed; + } + } + + if ((NPC.velocity.X > 0f && deusTargetX > 0f) || (NPC.velocity.X < 0f && deusTargetX < 0f) || (NPC.velocity.Y > 0f && deusTargetY > 0f) || (NPC.velocity.Y < 0f && deusTargetY < 0f)) + { + if (NPC.velocity.X < deusTargetX) + NPC.velocity.X += speed; + else if (NPC.velocity.X > deusTargetX) + NPC.velocity.X -= speed; + + if (NPC.velocity.Y < deusTargetY) + NPC.velocity.Y += speed; + else if (NPC.velocity.Y > deusTargetY) + NPC.velocity.Y -= speed; + + if (Math.Abs(deusTargetY) < segmentVelocity * 0.2 && ((NPC.velocity.X > 0f && deusTargetX < 0f) || (NPC.velocity.X < 0f && deusTargetX > 0f))) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y += speed * 2f; + else + NPC.velocity.Y -= speed * 2f; + } + + if (Math.Abs(deusTargetX) < segmentVelocity * 0.2 && ((NPC.velocity.Y > 0f && deusTargetY < 0f) || (NPC.velocity.Y < 0f && deusTargetY > 0f))) + { + if (NPC.velocity.X > 0f) + NPC.velocity.X += speed * 2f; + else + NPC.velocity.X -= speed * 2f; + } + } + else if (deusAbsoluteTargetX > deusAbsoluteTargetY) + { + if (NPC.velocity.X < deusTargetX) + NPC.velocity.X += speed * 1.1f; + else if (NPC.velocity.X > deusTargetX) + NPC.velocity.X -= speed * 1.1f; + + if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < segmentVelocity * 0.5) + { + if (NPC.velocity.Y > 0f) + NPC.velocity.Y += speed; + else + NPC.velocity.Y -= speed; + } + } + else + { + if (NPC.velocity.Y < deusTargetY) + NPC.velocity.Y += speed * 1.1f; + else if (NPC.velocity.Y > deusTargetY) + NPC.velocity.Y -= speed * 1.1f; + + if ((Math.Abs(NPC.velocity.X) + Math.Abs(NPC.velocity.Y)) < segmentVelocity * 0.5) + { + if (NPC.velocity.X > 0f) + NPC.velocity.X += speed; + else + NPC.velocity.X -= speed; + } + } + } + } + + if (shouldFly) + { + if (NPC.localAI[0] != 1f) + NPC.ForceNetUpdate(false); + + NPC.localAI[0] = 1f; + } + else + { + if (NPC.localAI[0] != 0f) + NPC.ForceNetUpdate(false); + + NPC.localAI[0] = 0f; + } + + if (((NPC.velocity.X > 0f && NPC.oldVelocity.X < 0f) || (NPC.velocity.X < 0f && NPC.oldVelocity.X > 0f) || (NPC.velocity.Y > 0f && NPC.oldVelocity.Y < 0f) || (NPC.velocity.Y < 0f && NPC.oldVelocity.Y > 0f)) && !NPC.justHit) + NPC.ForceNetUpdate(false); + + NPC.rotation = (float)Math.Atan2(NPC.velocity.Y, NPC.velocity.X) + MathHelper.PiOver2; + + // Play spawn sound on Deus on the first frame because otherwise the sound wouldn't play properly in multiplayer + if (calamityGlobalNPC.newAI[1] == 0f && !doubleWormPhase) + { + SoundEngine.PlaySound(SpawnSound, NPC.Center); + calamityGlobalNPC.newAI[1] = 1f; + } + + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing + if (calamityGlobalNPC.newAI[1] < resistanceTime && ((NPC.position - NPC.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 1f)) + calamityGlobalNPC.newAI[1] += 1f; + + // Calculate contact damage based on velocity + if (!doNotDealDamage) + { + float minimalContactDamageVelocity = segmentVelocity * 0.25f; + float minimalDamageVelocity = segmentVelocity * 0.5f; + if (NPC.velocity.Length() <= minimalContactDamageVelocity) + NPC.damage = (int)Math.Round(NPC.defDamage * 0.5); + else + { + float velocityDamageScalar = MathHelper.Clamp((NPC.velocity.Length() - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp((float)Math.Round(NPC.defDamage * 0.5), NPC.defDamage, velocityDamageScalar); + } + } } public override bool CheckActive() @@ -274,7 +919,7 @@ namespace CalamityMod.NPCs.AstrumDeus public override void BossLoot(ref string name, ref int potionType) => potionType = ModContent.ItemType(); - public static bool ShouldNotDropThings(NPC npc) => npc.Calamity().newAI[0] == 0f || ((CalamityWorld.death || BossRushEvent.BossRushActive) && npc.Calamity().newAI[0] != 3f); + public static bool ShouldNotDropThings(NPC NPC) => NPC.Calamity().newAI[0] == 0f || ((CalamityWorld.death || BossRushEvent.BossRushActive) && NPC.Calamity().newAI[0] != 3f); public override bool SpecialOnKill() { diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 127a782e6c..2e12004722 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -1,13 +1,15 @@ -using System.IO; +using System; +using System.IO; using CalamityMod.Buffs.DamageOverTime; +using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Dusts; using CalamityMod.Events; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; using Terraria; +using Terraria.Audio; using Terraria.GameContent; using Terraria.ID; using Terraria.Localization; @@ -96,7 +98,225 @@ namespace CalamityMod.NPCs.AstrumDeus public override void AI() { - AstrumDeusAI.VanillaAstrumDeusAI(NPC, Mod, false); + CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); + + // Difficulty variables + bool bossRush = BossRushEvent.BossRushActive; + bool expertMode = Main.expertMode || bossRush; + bool revenge = CalamityWorld.revenge || bossRush; + bool death = CalamityWorld.death || bossRush; + + float enrageScale = bossRush ? 0.5f : 0f; + if (Main.IsItDay() || bossRush) + { + NPC.Calamity().CurrentlyEnraged = !bossRush; + enrageScale += 1.5f; + } + + // Deus cannot hit for 3 seconds or while invulnerable + bool doNotDealDamage = calamityGlobalNPC.newAI[1] < 180f || NPC.dontTakeDamage; + if (doNotDealDamage) + NPC.damage = 0; + + // Get a target + if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) + NPC.TargetClosest(); + + Player player = Main.player[NPC.target]; + + bool increaseSpeed = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles; + bool increaseSpeedMore = Vector2.Distance(player.Center, NPC.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; + + // Inflict Extreme Gravity to nearby players + if (revenge) + { + if (!Main.dedServ) + { + if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && Vector2.Distance(Main.LocalPlayer.Center, NPC.Center) < CalamityGlobalNPC.CatchUpDistance350Tiles) + Main.LocalPlayer.AddBuff(ModContent.BuffType(), 2); + } + } + + // Life + float lifeRatio = NPC.life / (float)NPC.lifeMax; + + // Phases based on life percentage + bool halfHealth = lifeRatio < 0.5f; + bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f; + bool startFlightPhase = lifeRatio < 0.8f || death || doubleWormPhase; + bool phase2 = lifeRatio < 0.5f && doubleWormPhase && expertMode; + bool phase3 = lifeRatio < 0.2f && doubleWormPhase && expertMode; + bool splittingMines = lifeRatio < 0.7f; + bool movingMines = lifeRatio < 0.3f && doubleWormPhase && expertMode; + bool deathModeEnragePhase_Head = calamityGlobalNPC.newAI[0] == 3f; + bool deathModeEnragePhase_BodyAndTail = false; + + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing + float resistanceTime = doubleWormPhase ? 300f : 600f; + + calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; + + // Flight timer + float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + + calamityGlobalNPC.newAI[3] += 1f; + if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) + calamityGlobalNPC.newAI[3] = 0f; + // Sound effect for swapping between attack behaviors in phase 2 + if (doubleWormPhase && calamityGlobalNPC.newAI[3] % aiSwitchTimer == 0f && !(deathModeEnragePhase_Head || deathModeEnragePhase_BodyAndTail)) + SoundEngine.PlaySound(AstrumDeusHead.SplitSound with { Pitch = -0.2f, Volume = 0.9f }, player.Center); + + // Phase for flying at the player + bool flyAtTarget = calamityGlobalNPC.newAI[3] >= (aiSwitchTimer * 0.5f) && startFlightPhase; + + // Length of worms + int phase1Length = death ? 80 : revenge ? 70 : expertMode ? 60 : 50; + int phase2Length = death ? 40 : revenge ? 35 : expertMode ? 30 : 25; + int gfbLength = death ? 8 : revenge ? 7 : expertMode ? 6 : 5; + int maxLength = Main.zenithWorld && doubleWormPhase ? gfbLength : doubleWormPhase ? phase2Length : phase1Length; + + // Become gradually more pissed as more worms are killed + int gfbMaxWormCount = 10; + int gfbWormCount = 0; + if (CalamityWorld.LegendaryMode && revenge) + gfbWormCount = NPC.CountNPCS(ModContent.NPCType()); + if (gfbWormCount > gfbMaxWormCount) + gfbWormCount = gfbMaxWormCount; + if (gfbWormCount > 0) + enrageScale += (gfbMaxWormCount - gfbWormCount) * 0.111f; + + // Copy dontTakeDamage and Opacity from head + NPC.dontTakeDamage = Main.npc[(int)NPC.ai[2]].dontTakeDamage; + NPC.Opacity = Main.npc[(int)NPC.ai[2]].Opacity; + deathModeEnragePhase_BodyAndTail = Main.npc[(int)NPC.ai[2]].Calamity().newAI[0] == 3f; + if (deathModeEnragePhase_BodyAndTail) + { + NPC.defense = 25; + calamityGlobalNPC.DR = 0.15f; + } + + // Set worm variable + if (NPC.ai[2] > 0f) + NPC.realLife = (int)NPC.ai[2]; + + // Alpha effects + if (Main.npc[(int)NPC.ai[1]].alpha < 128 && !NPC.dontTakeDamage) + { + NPC.alpha -= 42; + if (NPC.alpha < 0) + NPC.alpha = 0; + } + + // Check if other segments are still alive, if not, die + bool shouldDespawn = true; + int headType = ModContent.NPCType(); + for (int i = 0; i < Main.maxNPCs; i++) + { + if (Main.npc[i].type != headType || !Main.npc[i].active) + continue; + shouldDespawn = false; + break; + } + if (shouldDespawn) + { + if (Main.npc.IndexInRange((int)NPC.ai[1]) && Main.npc[(int)NPC.ai[1]].active && 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; + NPC.ForceNetUpdate(false); + } + + // Direction + if (NPC.velocity.X < 0f) + NPC.spriteDirection = -1; + else if (NPC.velocity.X > 0f) + NPC.spriteDirection = 1; + + if (NPC.life > Main.npc[(int)NPC.ai[1]].life) + NPC.life = Main.npc[(int)NPC.ai[1]].life; + + bool hasJustSpawned = calamityGlobalNPC.newAI[1] < resistanceTime * 0.4f && !doubleWormPhase; // Speed boost for the first 4 seconds after spawning + float segmentVelocity = hasJustSpawned ? 25f : deathModeEnragePhase_Head ? 19f : death ? 17.5f : 16f; + + float segmentVelocityBoost = 5f * (1f - lifeRatio); + segmentVelocity += segmentVelocityBoost; + segmentVelocity += 4f * enrageScale; + + if (revenge) + { + float revMultiplier = 1.1f; + segmentVelocity *= revMultiplier; + } + + // Follow the head + Vector2 segmentCenter = NPC.Center; + float segmentTargetX = player.Center.X; + float segmentTargetY = player.Center.Y; + segmentTargetX = (int)(segmentTargetX / 16f) * 16; + segmentTargetY = (int)(segmentTargetY / 16f) * 16; + segmentCenter.X = (int)(segmentCenter.X / 16f) * 16; + segmentCenter.Y = (int)(segmentCenter.Y / 16f) * 16; + segmentTargetX -= segmentCenter.X; + segmentTargetY -= segmentCenter.Y; + + if (NPC.ai[1] > 0f && NPC.ai[1] < Main.npc.Length) + { + try + { + segmentCenter = NPC.Center; + segmentTargetX = Main.npc[(int)NPC.ai[1]].Center.X - segmentCenter.X; + segmentTargetY = Main.npc[(int)NPC.ai[1]].Center.Y - segmentCenter.Y; + } + catch + { + } + + NPC.rotation = (float)Math.Atan2(segmentTargetY, segmentTargetX) + MathHelper.PiOver2; + float segmentTargetDist = (float)Math.Sqrt(segmentTargetX * segmentTargetX + segmentTargetY * segmentTargetY); + int segmentWidth = NPC.width; + segmentTargetDist = (segmentTargetDist - segmentWidth) / segmentTargetDist; + segmentTargetX *= segmentTargetDist; + segmentTargetY *= segmentTargetDist; + NPC.velocity = Vector2.Zero; + NPC.position.X = NPC.position.X + segmentTargetX; + NPC.position.Y = NPC.position.Y + segmentTargetY; + + if (segmentTargetX < 0f) + NPC.spriteDirection = -1; + else if (segmentTargetX > 0f) + NPC.spriteDirection = 1; + } + + // Play spawn sound on Deus on the first frame because otherwise the sound wouldn't play properly in multiplayer + if (calamityGlobalNPC.newAI[1] == 0f && !doubleWormPhase) + { + SoundEngine.PlaySound(AstrumDeusHead.SpawnSound, NPC.Center); + calamityGlobalNPC.newAI[1] = 1f; + } + + // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing + if (calamityGlobalNPC.newAI[1] < resistanceTime && ((NPC.position - NPC.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 1f)) + calamityGlobalNPC.newAI[1] += 1f; + + // Calculate contact damage based on velocity + if (!doNotDealDamage) + { + float minimalContactDamageVelocity = segmentVelocity * 0.25f; + float minimalDamageVelocity = segmentVelocity * 0.5f; + float bodyAndTailVelocity = (NPC.position - NPC.oldPosition).Length(); + if (bodyAndTailVelocity <= minimalContactDamageVelocity) + NPC.damage = 0; + else + { + float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); + NPC.damage = (int)MathHelper.Lerp(0f, NPC.defDamage, velocityDamageScalar); + } + } } public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 7bec19de5f..82f36a3842 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -15,7 +15,6 @@ using CalamityMod.Items.Weapons.Magic; using CalamityMod.Items.Weapons.Melee; using CalamityMod.Items.Weapons.Ranged; using CalamityMod.Items.Weapons.Summon; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; using CalamityMod.World; diff --git a/NPCs/Bumblebirb/DraconicSwarmer.cs b/NPCs/Bumblebirb/DraconicSwarmer.cs index f2156037e7..803380b88f 100644 --- a/NPCs/Bumblebirb/DraconicSwarmer.cs +++ b/NPCs/Bumblebirb/DraconicSwarmer.cs @@ -1,5 +1,4 @@ -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; -using CalamityMod.Projectiles.Boss; +using CalamityMod.Projectiles.Boss; using CalamityMod.Sounds; using CalamityMod.World; using Microsoft.Xna.Framework; diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs deleted file mode 100644 index a8f6e79f8c..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/AquaticScourgeAI.cs +++ /dev/null @@ -1,628 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; -using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class AquaticScourgeAI - { - public static void VanillaAquaticScourgeAI(NPC npc, Mod mod, bool head) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - bool getFuckedAI = Main.zenithWorld; - - if (head) - CalamityGlobalNPC.aquaticScourge = npc.whoAmI; - - // Adjust hostility and stats - bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (npc.justHit || npc.life <= npc.lifeMax * 0.999 || bossRush || Main.getGoodWorld) - { - if (nonHostile) - { - // Kiss my motherfucking ass you piece of shit game - npc.timeLeft *= 20; - npc.npcSlots = 16f; - CalamityGlobalNPC.BossKillTimes.TryGetValue(npc.type, out int revKillTime); - calamityGlobalNPC.KillTime = revKillTime; - calamityGlobalNPC.newAI[0] = 1f; - nonHostile = false; - npc.boss = head; - npc.chaseable = true; - npc.netUpdate = true; - } - } - else - npc.damage = 0; - - // Percent life remaining - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Phases - bool phase2 = lifeRatio < 0.75f; - bool phase3 = lifeRatio < 0.5f; - bool phase4 = lifeRatio < 0.25f; - - // Set worm variable - if (npc.ai[2] > 0f) - npc.realLife = (int)npc.ai[2]; - - if (!head) - { - if (npc.life > Main.npc[(int)npc.ai[1]].life) - npc.life = Main.npc[(int)npc.ai[1]].life; - } - - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) - npc.TargetClosest(); - - Player player = Main.player[npc.target]; - - bool notOcean = player.position.Y < 300f || - player.position.Y > Main.worldSurface * 16.0 || - (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); - - // Check for the flipped Abyss - if (Main.remixWorld) - { - notOcean = player.position.Y < Main.UnderworldLayer * 0.8f || player.position.Y > Main.UnderworldLayer || - (player.position.X > 7680f && player.position.X < (Main.maxTilesX * 16 - 7680)); - } - - // Enrage - if (head) - { - if (notOcean && !player.Calamity().ZoneSulphur && !bossRush) - { - if (npc.localAI[2] > 0f) - npc.localAI[2] -= 1f; - } - else - npc.localAI[2] = CalamityGlobalNPC.biomeEnrageTimerMax; - } - - bool biomeEnraged = npc.localAI[2] <= 0f || bossRush; - - float enrageScale = bossRush ? 1f : 0f; - if (biomeEnraged) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 2f; - } - - // Circular movement - float colorFadeTimeAfterSpiral = 90f; - float spiralGateValue = 480f; - bool doSpiral = false; - if (head && calamityGlobalNPC.newAI[0] == 1f && calamityGlobalNPC.newAI[2] == 1f && (revenge || getFuckedAI)) - { - doSpiral = calamityGlobalNPC.newAI[1] == 0f && calamityGlobalNPC.newAI[3] >= spiralGateValue; - if (Vector2.Distance(npc.Center, player.Center) < (getFuckedAI ? 1600f : 1000f) || doSpiral) - calamityGlobalNPC.newAI[3] += 1f; - - if (doSpiral) - { - npc.localAI[3] = colorFadeTimeAfterSpiral; - - // Vomit acid mist - float acidMistBarfDivisor = getFuckedAI ? 2f : ((float)Math.Floor(bossRush ? 4f : death ? 5f : 6f) * (phase3 ? 1.5f : 1f)); - if (calamityGlobalNPC.newAI[3] % acidMistBarfDivisor == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float mistVelocity = death ? 10f : 8f; - Vector2 projectileVelocity = (npc.Center + npc.velocity * 10f - npc.Center).SafeNormalize(Vector2.UnitY); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int proj = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity * 5f, projectileVelocity * mistVelocity, type, damage, 0f, Main.myPlayer); - Main.projectile[proj].tileCollide = false; - Main.projectile[proj].timeLeft = getFuckedAI ? 240 : 600; - } - } - - // Vomit circular spreads of acid clouds while in phase 3 - float toxicCloudBarfDivisor = bossRush ? 20f : death ? 30f : 40f; - if (calamityGlobalNPC.newAI[3] % toxicCloudBarfDivisor == 0f && phase3) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - int totalProjectiles = (phase4 ? 6 : 9) + (getFuckedAI ? Main.rand.Next(-2, 3) : (int)((calamityGlobalNPC.newAI[3] - spiralGateValue) / toxicCloudBarfDivisor) * (phase4 ? 2 : 3)); - float radians = MathHelper.TwoPi / totalProjectiles; - float cloudVelocity = 1f + enrageScale; - Vector2 spinningPoint = new Vector2(0f, -cloudVelocity); - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 vector255 = spinningPoint.RotatedBy(radians * k); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + vector255.SafeNormalize(Vector2.UnitY) * 5f, vector255, type, damage, 0f, Main.myPlayer); - } - } - } - - // Velocity boost - if (calamityGlobalNPC.newAI[3] == spiralGateValue) - { - npc.velocity = npc.velocity.SafeNormalize(Vector2.UnitY); - npc.velocity *= 24f; - } - - // Spin velocity - float velocity = (float)(Math.PI * 2D) / 120f; - // In GFB, contracts the radius as the fight progresses - if (getFuckedAI) - velocity *= phase3 ? 1.5f : phase2 ? 1.25f : 1f; - npc.velocity = npc.velocity.RotatedBy(-(double)velocity * npc.localAI[1]); - // Speed up even more in GFB for more radius - if (getFuckedAI && npc.velocity.Length() <= 32f) - npc.velocity *= 1.1f; - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + MathHelper.PiOver2; - - // Reset and charge at target - // Don't reset in GFB - if (!getFuckedAI && calamityGlobalNPC.newAI[3] >= spiralGateValue + 120f) - { - calamityGlobalNPC.newAI[3] = 0f; - npc.TargetClosest(); - } - } - else - { - if (!Collision.CanHit(npc.Center, 1, 1, player.position, player.width, player.height) && calamityGlobalNPC.newAI[3] > 300f) - calamityGlobalNPC.newAI[3] -= 2f; - - if (npc.localAI[3] > 0f) - npc.localAI[3] -= 1f; - - npc.localAI[1] = npc.Center.X - player.Center.X < 0 ? 1f : -1f; - } - } - - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = doSpiral || getFuckedAI; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - - if (head) - { - // Spawn segments - if (calamityGlobalNPC.newAI[2] == 0f && npc.ai[0] == 0f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int maxLength = getFuckedAI ? 24 : death ? 80 : revenge ? 40 : expertMode ? 35 : 30; - int Previous = npc.whoAmI; - for (int segments = 0; segments < maxLength; segments++) - { - int lol; - if (segments >= 0 && segments < maxLength - 1) - { - if (segments % 2 == 0) - lol = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType(), npc.whoAmI); - else - lol = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType(), npc.whoAmI); - } - else - lol = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, 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); - Previous = lol; - } - } - - calamityGlobalNPC.newAI[2] = 1f; - } - - // Big barf attack - if (calamityGlobalNPC.newAI[0] == 1f && (!doSpiral && phase2) || (getFuckedAI && !phase3)) - { - npc.localAI[0] += 1f; - if (npc.localAI[0] >= (revenge ? 360f : 420f)) - { - if (Vector2.Distance(player.Center, npc.Center) > 320f) - { - npc.localAI[0] = 0f; - npc.netUpdate = true; - SoundEngine.PlaySound(SoundID.NPCDeath13, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int totalProjectiles = bossRush ? 10 : expertMode ? 8 : 6; - if (phase3) - totalProjectiles *= 2; - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - for (int i = 0; i < totalProjectiles; i++) - { - Vector2 velocity = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - velocity = velocity.SafeNormalize(Vector2.UnitY); - velocity *= Main.rand.Next(phase3 ? 300 : 100, 401) * 0.01f; - - float maximumVelocityMult = death ? 0.75f : 0.5f; - if (expertMode) - velocity *= 1f + (maximumVelocityMult * (0.5f - lifeRatio)); - - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + velocity.SafeNormalize(Vector2.UnitY) * 5f, velocity, type, damage, 0f, Main.myPlayer); - } - } - } - } - } - } - - // Fire teeth depending on body type - else - { - if (calamityGlobalNPC.newAI[0] == 1f && (!phase3 || phase4)) - { - npc.localAI[0] += 1f; - float shootProjectile = 300; - float timer = npc.ai[0] + 15f; - float divisor = timer + shootProjectile; - - if (npc.type == ModContent.NPCType()) - { - if (npc.localAI[0] % divisor == 0f && (npc.ai[0] % 3f == 0f || getFuckedAI || !death)) - { - npc.TargetClosest(); - if (Collision.CanHit(npc.position, npc.width, npc.height, player.position, player.width, player.height)) - { - SoundEngine.PlaySound(SoundID.Item17, npc.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float toothVelocity = death ? 9f : 8f; - Vector2 projectileVelocity = (player.Center - npc.Center).SafeNormalize(Vector2.UnitY); - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float accelerate = phase4 ? 1f : 0f; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + projectileVelocity * 5f, projectileVelocity * toothVelocity, type, damage, 0f, Main.myPlayer, accelerate, 0f); - } - - npc.netUpdate = true; - } - } - } - } - } - - // Kill body and tail - if (!head) - { - bool shouldDespawn = true; - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].active && Main.npc[i].type == ModContent.NPCType()) - { - shouldDespawn = false; - break; - } - } - if (!shouldDespawn) - { - if (npc.ai[1] <= 0f) - shouldDespawn = true; - else if (Main.npc[(int)npc.ai[1]].life <= 0) - shouldDespawn = true; - } - if (shouldDespawn) - { - npc.life = 0; - npc.HitEffect(0, 10.0); - npc.checkDead(); - npc.active = false; - } - } - else - { - if (npc.life > Main.npc[(int)npc.ai[0]].life) - npc.life = Main.npc[(int)npc.ai[0]].life; - } - - float maxDistance = calamityGlobalNPC.newAI[0] == 1f ? 12800f : 6400f; - if (player.dead || Vector2.Distance(npc.Center, player.Center) > maxDistance || (nonHostile && biomeEnraged)) - { - calamityGlobalNPC.newAI[1] = 1f; - npc.TargetClosest(false); - npc.velocity.Y += 2f; - - if (npc.position.Y > Main.worldSurface * 16D) - npc.velocity.Y += 2f; - - if (npc.position.Y > Main.worldSurface * 16D) - { - for (int a = 0; a < Main.npc.Length; a++) - { - int type = Main.npc[a].type; - if (type == ModContent.NPCType() || type == ModContent.NPCType() || type == ModContent.NPCType() || type == ModContent.NPCType()) - Main.npc[a].active = false; - } - } - } - else - calamityGlobalNPC.newAI[1] = 0f; - - // Change direction - if (npc.velocity.X < 0f) - npc.spriteDirection = -1; - else if (npc.velocity.X > 0f) - npc.spriteDirection = 1; - - // Alpha changes - if (head || Main.npc[(int)npc.ai[1]].alpha < 128) - { - npc.alpha -= 42; - if (npc.alpha < 0) - npc.alpha = 0; - } - - Vector2 scourgePosition = npc.Center; - Vector2 predictionVector = (CalamityWorld.LegendaryMode && CalamityWorld.revenge) ? Main.player[npc.target].velocity * 20f : Vector2.Zero; - float scourgeTargetX = player.Center.X + predictionVector.X; - float scourgeTargetY = player.Center.Y + predictionVector.Y; - - // Velocity and movement - float scourgeMaxSpeed = 5f; - float scourgeAcceleration = 0.08f; - if (calamityGlobalNPC.newAI[0] == 1f) - { - scourgeMaxSpeed = revenge ? 14.4f : 12f; - scourgeAcceleration = revenge ? 0.18f : 0.15f; - if (expertMode) - { - scourgeMaxSpeed += 2.4f * (1f - lifeRatio); - scourgeAcceleration += 0.03f * (1f - lifeRatio); - } - scourgeMaxSpeed += 3f * enrageScale; - scourgeAcceleration += 0.06f * enrageScale; - if (death || getFuckedAI) - { - scourgeMaxSpeed += 5f; - scourgeAcceleration -= getFuckedAI ? 0f : 0.03f; - scourgeMaxSpeed += Vector2.Distance(player.Center, npc.Center) * 0.001f; - scourgeAcceleration += Vector2.Distance(player.Center, npc.Center) * 0.000045f; - } - - // Increase acceleration after spiral attack - if (npc.localAI[3] > 0f) - { - float accelerationMultiplier = MathHelper.Lerp(1f, 2f, npc.localAI[3] / colorFadeTimeAfterSpiral); - scourgeAcceleration *= accelerationMultiplier; - } - - if (Main.getGoodWorld) - { - scourgeMaxSpeed *= 1.15f; - scourgeAcceleration *= 1.15f; - } - } - - if (head && !doSpiral) - { - if (calamityGlobalNPC.newAI[0] != 1f) - { - scourgeTargetY += 400; - if (Math.Abs(npc.Center.X - player.Center.X) < 500f) - { - if (npc.velocity.X > 0f) - scourgeTargetX = player.Center.X + 600f; - else - scourgeTargetX = player.Center.X - 600f; - } - } - - float scourgeHigherSpeed = scourgeMaxSpeed * 1.3f; - float scourgeLowerSpeed = scourgeMaxSpeed * 0.7f; - float scourgeSpeed = npc.velocity.Length(); - if (scourgeSpeed > 0f) - { - if (scourgeSpeed > scourgeHigherSpeed) - { - npc.velocity = npc.velocity.SafeNormalize(Vector2.UnitY); - npc.velocity *= scourgeHigherSpeed; - } - else if (scourgeSpeed < scourgeLowerSpeed) - { - npc.velocity = npc.velocity.SafeNormalize(Vector2.UnitY); - npc.velocity *= scourgeLowerSpeed; - } - } - } - - scourgeTargetX = (int)(scourgeTargetX / 16f) * 16; - scourgeTargetY = (int)(scourgeTargetY / 16f) * 16; - scourgePosition.X = (int)(scourgePosition.X / 16f) * 16; - scourgePosition.Y = (int)(scourgePosition.Y / 16f) * 16; - scourgeTargetX -= scourgePosition.X; - scourgeTargetY -= scourgePosition.Y; - float scourgeTargetDist = (float)Math.Sqrt(scourgeTargetX * scourgeTargetX + scourgeTargetY * scourgeTargetY); - - if (!head) - { - if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) - { - try - { - scourgePosition = npc.Center; - scourgeTargetX = Main.npc[(int)npc.ai[1]].Center.X - scourgePosition.X; - scourgeTargetY = Main.npc[(int)npc.ai[1]].Center.Y - scourgePosition.Y; - } - catch - { - } - - npc.rotation = (float)Math.Atan2(scourgeTargetY, scourgeTargetX) + MathHelper.PiOver2; - scourgeTargetDist = (float)Math.Sqrt(scourgeTargetX * scourgeTargetX + scourgeTargetY * scourgeTargetY); - int scourgeWidth = npc.width; - scourgeTargetDist = (scourgeTargetDist - scourgeWidth) / scourgeTargetDist; - scourgeTargetX *= scourgeTargetDist; - scourgeTargetY *= scourgeTargetDist; - npc.velocity = Vector2.Zero; - npc.position.X = npc.position.X + scourgeTargetX; - npc.position.Y = npc.position.Y + scourgeTargetY; - - if (scourgeTargetX < 0f) - npc.spriteDirection = -1; - else if (scourgeTargetX > 0f) - npc.spriteDirection = 1; - } - } - else if (!doSpiral) - { - float scourgeAbsoluteTargetX = Math.Abs(scourgeTargetX); - float scourgeAbsoluteTargetY = Math.Abs(scourgeTargetY); - float scourgeTimeToReachTarget = scourgeMaxSpeed / scourgeTargetDist; - scourgeTargetX *= scourgeTimeToReachTarget; - scourgeTargetY *= scourgeTimeToReachTarget; - - if ((npc.velocity.X > 0f && scourgeTargetX > 0f) || (npc.velocity.X < 0f && scourgeTargetX < 0f) || (npc.velocity.Y > 0f && scourgeTargetY > 0f) || (npc.velocity.Y < 0f && scourgeTargetY < 0f)) - { - if (npc.velocity.X < scourgeTargetX) - { - npc.velocity.X += scourgeAcceleration; - } - else - { - if (npc.velocity.X > scourgeTargetX) - npc.velocity.X -= scourgeAcceleration; - } - - if (npc.velocity.Y < scourgeTargetY) - { - npc.velocity.Y += scourgeAcceleration; - } - else - { - if (npc.velocity.Y > scourgeTargetY) - npc.velocity.Y -= scourgeAcceleration; - } - - if (Math.Abs(scourgeTargetY) < scourgeMaxSpeed * 0.2 && ((npc.velocity.X > 0f && scourgeTargetX < 0f) || (npc.velocity.X < 0f && scourgeTargetX > 0f))) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y += scourgeAcceleration * 2f; - else - npc.velocity.Y -= scourgeAcceleration * 2f; - } - - if (Math.Abs(scourgeTargetX) < scourgeMaxSpeed * 0.2 && ((npc.velocity.Y > 0f && scourgeTargetY < 0f) || (npc.velocity.Y < 0f && scourgeTargetY > 0f))) - { - if (npc.velocity.X > 0f) - npc.velocity.X += scourgeAcceleration * 2f; - else - npc.velocity.X -= scourgeAcceleration * 2f; - } - } - else - { - if (scourgeAbsoluteTargetX > scourgeAbsoluteTargetY) - { - if (npc.velocity.X < scourgeTargetX) - npc.velocity.X += scourgeAcceleration * 1.1f; - else if (npc.velocity.X > scourgeTargetX) - npc.velocity.X -= scourgeAcceleration * 1.1f; - - if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < scourgeMaxSpeed * 0.5) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y += scourgeAcceleration; - else - npc.velocity.Y -= scourgeAcceleration; - } - } - else - { - if (npc.velocity.Y < scourgeTargetY) - npc.velocity.Y += scourgeAcceleration * 1.1f; - else if (npc.velocity.Y > scourgeTargetY) - npc.velocity.Y -= scourgeAcceleration * 1.1f; - - if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < scourgeMaxSpeed * 0.5) - { - if (npc.velocity.X > 0f) - npc.velocity.X += scourgeAcceleration; - else - npc.velocity.X -= scourgeAcceleration; - } - } - } - - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + MathHelper.PiOver2; - } - - // Calculate contact damage based on velocity - if (!nonHostile) - { - float minimalContactDamageVelocity = scourgeMaxSpeed * 0.25f; - float minimalDamageVelocity = scourgeMaxSpeed * 0.5f; - if (head) - { - if (npc.velocity.Length() <= minimalContactDamageVelocity) - { - npc.damage = (int)Math.Round(npc.defDamage * 0.5); - } - else - { - float velocityDamageScalar = MathHelper.Clamp((npc.velocity.Length() - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - npc.damage = (int)MathHelper.Lerp((float)Math.Round(npc.defDamage * 0.5), npc.defDamage, velocityDamageScalar); - } - } - else - { - float bodyAndTailVelocity = (npc.position - npc.oldPosition).Length(); - if (bodyAndTailVelocity <= minimalContactDamageVelocity) - { - npc.damage = 0; - } - else - { - float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - npc.damage = (int)MathHelper.Lerp(0f, npc.defDamage, velocityDamageScalar); - } - } - } - } - } -} diff --git a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs b/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs deleted file mode 100644 index c7bc0300cc..0000000000 --- a/NPCs/CalamityAIs/CalamityBossAIs/AstrumDeusAI.cs +++ /dev/null @@ -1,915 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; -using CalamityMod.Dusts; -using CalamityMod.Events; -using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; -using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; -using CalamityMod.NPCs.SulphurousSea; -using CalamityMod.NPCs.SunkenSea; -using CalamityMod.Packets; -using CalamityMod.Projectiles.Boss; -using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.CalamityAIs.CalamityBossAIs -{ - public static class AstrumDeusAI - { - public static void VanillaAstrumDeusAI(NPC npc, Mod mod, bool head) - { - CalamityGlobalNPC calamityGlobalNPC = npc.Calamity(); - - // Difficulty variables - bool bossRush = BossRushEvent.BossRushActive; - bool expertMode = Main.expertMode || bossRush; - bool revenge = CalamityWorld.revenge || bossRush; - bool death = CalamityWorld.death || bossRush; - - float enrageScale = bossRush ? 0.5f : 0f; - if (Main.IsItDay() || bossRush) - { - npc.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 1.5f; - } - - // Deus cannot hit for 3 seconds or while invulnerable - bool doNotDealDamage = calamityGlobalNPC.newAI[1] < 180f || npc.dontTakeDamage; - if (doNotDealDamage) - npc.damage = 0; - - // Get a target - if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) - npc.TargetClosest(); - - Player player = Main.player[npc.target]; - - bool increaseSpeed = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance200Tiles; - bool increaseSpeedMore = Vector2.Distance(player.Center, npc.Center) > CalamityGlobalNPC.CatchUpDistance350Tiles; - - // Despawn safety, make sure to target another player if the current player target is too far away - if (increaseSpeedMore && head) - npc.TargetClosest(); - - // Inflict Extreme Gravity to nearby players - if (revenge) - { - if (!Main.dedServ) - { - if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && Vector2.Distance(Main.LocalPlayer.Center, npc.Center) < CalamityGlobalNPC.CatchUpDistance350Tiles) - Main.LocalPlayer.AddBuff(ModContent.BuffType(), 2); - } - } - - // Life - float lifeRatio = npc.life / (float)npc.lifeMax; - - // Phases based on life percentage - bool halfHealth = lifeRatio < 0.5f; - bool doubleWormPhase = calamityGlobalNPC.newAI[0] != 0f; - bool startFlightPhase = lifeRatio < 0.8f || death || doubleWormPhase; - bool phase2 = lifeRatio < 0.5f && doubleWormPhase && expertMode; - bool phase3 = lifeRatio < 0.2f && doubleWormPhase && expertMode; - bool splittingMines = lifeRatio < 0.7f; - bool movingMines = lifeRatio < 0.3f && doubleWormPhase && expertMode; - bool deathModeEnragePhase_Head = calamityGlobalNPC.newAI[0] == 3f; - bool deathModeEnragePhase_BodyAndTail = false; - - // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing - float resistanceTime = doubleWormPhase ? 300f : 600f; - - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; - - // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); - - calamityGlobalNPC.newAI[3] += 1f; - if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) - calamityGlobalNPC.newAI[3] = 0f; - // Sound effect for swapping between attack behaviors in phase 2 - if (doubleWormPhase && calamityGlobalNPC.newAI[3] % aiSwitchTimer == 0f && !(deathModeEnragePhase_Head || deathModeEnragePhase_BodyAndTail)) - SoundEngine.PlaySound(AstrumDeusHead.SplitSound with { Pitch = -0.2f, Volume = 0.9f }, player.Center); - - // Phase for flying at the player - bool flyAtTarget = calamityGlobalNPC.newAI[3] >= (aiSwitchTimer * 0.5f) && startFlightPhase; - - // Length of worms - int phase1Length = death ? 80 : revenge ? 70 : expertMode ? 60 : 50; - int phase2Length = death ? 40 : revenge ? 35 : expertMode ? 30 : 25; - int gfbLength = death ? 8 : revenge ? 7 : expertMode ? 6 : 5; - int maxLength = Main.zenithWorld && doubleWormPhase ? gfbLength : doubleWormPhase ? phase2Length : phase1Length; - - // Become gradually more pissed as more worms are killed - int gfbMaxWormCount = 10; - int gfbWormCount = 0; - if (CalamityWorld.LegendaryMode && revenge) - gfbWormCount = NPC.CountNPCS(ModContent.NPCType()); - if (gfbWormCount > gfbMaxWormCount) - gfbWormCount = gfbMaxWormCount; - if (gfbWormCount > 0) - enrageScale += (gfbMaxWormCount - gfbWormCount) * 0.111f; - - // Split into two worms - if (head) - { - float splitAnimationTime = 180f; - bool oneWormAlive = NPC.CountNPCS(ModContent.NPCType()) < 2; - bool deathModeFinalWormEnrage = death && doubleWormPhase && oneWormAlive && calamityGlobalNPC.newAI[1] >= resistanceTime; - if (deathModeFinalWormEnrage) - { - if (calamityGlobalNPC.newAI[0] != 3f) - { - SoundEngine.PlaySound(AstrumDeusHead.SplitSound, player.Center); - calamityGlobalNPC.newAI[0] = 3f; - npc.defense = 12; - calamityGlobalNPC.DR = 0.075f; - - // Despawns the other deus worm segments - int bodyID = ModContent.NPCType(); - int tailID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC wormseg = Main.npc[i]; - if (!wormseg.active) - continue; - - if ((wormseg.type == bodyID || wormseg.type == tailID) && Main.npc[(int)wormseg.ai[2]].Calamity().newAI[0] != 3f) - { - wormseg.life = 0; - wormseg.active = false; - } - } - } - - calamityGlobalNPC.newAI[2] += 10f; - if (calamityGlobalNPC.newAI[2] > 162f) - calamityGlobalNPC.newAI[2] = 162f; - - npc.Opacity = MathHelper.Clamp(1f - (calamityGlobalNPC.newAI[2] / splitAnimationTime), 0f, 1f); - } - - bool despawnRemainingWorm = doubleWormPhase && oneWormAlive && !death; - if ((halfHealth && calamityGlobalNPC.newAI[0] == 0f) || despawnRemainingWorm) - { - npc.dontTakeDamage = true; - - calamityGlobalNPC.newAI[2] += despawnRemainingWorm ? 10f : 1f; - npc.Opacity = MathHelper.Clamp(1f - (calamityGlobalNPC.newAI[2] / splitAnimationTime), 0f, 1f); - - bool despawning = calamityGlobalNPC.newAI[2] == splitAnimationTime; - - // - // CODE TWEAKED BY: OZZATRON - // September 20th, 2020 - // reason: fixing Astrum Deus death mode NPC cap bug - // - - // Despawn the unsplit Astrum Deus and spawn two half-size Astrum Deus worms. - if (despawning) - { - // If this is already a split worm (newAI[0] != 0f) then don't do anything. At all. - if (doubleWormPhase) - return; - - // Mark all existing body and tail segments as inactive. This instantly frees up their NPC slots for the freshly spawned worms. - int bodyID = ModContent.NPCType(); - int tailID = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC wormseg = Main.npc[i]; - if (!wormseg.active) - continue; - if (wormseg.type == bodyID || wormseg.type == tailID) - { - wormseg.life = 0; - wormseg.active = false; - } - } - - // The unsplit Astrum Deus worm head will die next frame. - npc.life = 0; - - // Do not spawn worms client side. The server handles this. - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int wormamt = Main.zenithWorld ? 5 : 1; - for (int i = 0; i < wormamt; i++) - { - // Now that the original worm doesn't exist, startCount can be zero. - // int startCount = npc.whoAmI + phase1Length + 1; - int startIndexHeadOne = 1; - int headOneID = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, npc.type, startIndexHeadOne); - Main.npc[headOneID].Calamity().newAI[0] = 1f; - Main.npc[headOneID].velocity = Vector2.Normalize(player.Center - Main.npc[headOneID].Center) * 16f; - Main.npc[headOneID].timeLeft *= 20; - Main.npc[headOneID].ForceNetUpdate(); - - // On server, immediately send the correct extra AI of this head to clients. - if (Main.dedServ) - { - SyncCalamityNPCAIArrayPacket.Send(Main.npc[headOneID]); - } - - // Make sure the second split worm is also contiguous. - int startIndexHeadTwo = startIndexHeadOne + phase2Length + 1; - int headTwoID = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, npc.type, startIndexHeadTwo); - Main.npc[headTwoID].Calamity().newAI[0] = 2f; - Main.npc[headTwoID].Calamity().newAI[3] = Main.getGoodWorld ? 300f : 600f; - Main.npc[headTwoID].velocity = Vector2.Normalize(player.Center - Main.npc[headTwoID].Center) * 16f; - Main.npc[headTwoID].timeLeft *= 20; - Main.npc[headTwoID].ForceNetUpdate(); - - // On server, immediately send the correct extra AI of this head to clients. - if (Main.dedServ) - { - SyncCalamityNPCAIArrayPacket.Send(Main.npc[headTwoID]); - } - } - - SoundEngine.PlaySound(AstrumDeusHead.SplitSound, player.Center); - } - return; - } - } - - if (Main.zenithWorld && calamityGlobalNPC.newAI[1] < 10f) // desync the deuses - { - float pushForce = 0.25f; - for (int k = 0; k < Main.maxNPCs; k++) - { - NPC otherDeus = Main.npc[k]; - // Short circuits to make the loop as fast as possible - if (!otherDeus.active || k == npc.whoAmI) - continue; - - // If the other projectile is indeed the same owned by the same player and they're too close, nudge them away. - bool sameProjType = otherDeus.type == npc.type; - float taxicabDist = Vector2.Distance(npc.Center, otherDeus.Center); - float distancegate = 320f; - if (sameProjType && taxicabDist < distancegate) - { - if (npc.position.X < otherDeus.position.X) - npc.velocity.X -= pushForce; - else - npc.velocity.X += pushForce; - - if (npc.position.Y < otherDeus.position.Y) - npc.velocity.Y -= pushForce; - else - npc.velocity.Y += pushForce; - } - } - } - } - - // Copy dontTakeDamage and Opacity from head - else - { - npc.dontTakeDamage = Main.npc[(int)npc.ai[2]].dontTakeDamage; - npc.Opacity = Main.npc[(int)npc.ai[2]].Opacity; - deathModeEnragePhase_BodyAndTail = Main.npc[(int)npc.ai[2]].Calamity().newAI[0] == 3f; - - if (deathModeEnragePhase_BodyAndTail) - { - npc.defense = 25; - calamityGlobalNPC.DR = 0.15f; - } - } - - // Set worm variable - if (npc.ai[2] > 0f) - npc.realLife = (int)npc.ai[2]; - - // Alpha effects - if ((head || Main.npc[(int)npc.ai[1]].alpha < 128) && !npc.dontTakeDamage) - { - // Alpha changes - npc.alpha -= 42; - if (npc.alpha < 0) - npc.alpha = 0; - } - - // Check if other segments are still alive, if not, die - if (!head) - { - bool shouldDespawn = true; - int headType = ModContent.NPCType(); - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].type != headType || !Main.npc[i].active) - continue; - shouldDespawn = false; - break; - } - if (shouldDespawn) - { - if (Main.npc.IndexInRange((int)npc.ai[1]) && Main.npc[(int)npc.ai[1]].active && 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; - npc.ForceNetUpdate(false); - } - } - - // Direction - if (npc.velocity.X < 0f) - npc.spriteDirection = -1; - else if (npc.velocity.X > 0f) - npc.spriteDirection = 1; - - // Head code - if (head) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (npc.ai[0] == 0f) - { - int Previous = npc.whoAmI; - int bodyType = ModContent.NPCType(); - int tailType = ModContent.NPCType(); - for (int segments = 0; segments < maxLength; segments++) - { - int lol; - if (segments >= 0 && segments < maxLength - 1) - lol = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, bodyType, npc.whoAmI); - else - lol = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, tailType, npc.whoAmI); - - if (segments % 2 == 0) - Main.npc[lol].localAI[3] = 1f; - - Main.npc[lol].realLife = npc.whoAmI; - Main.npc[lol].Calamity().newAI[0] = Main.npc[Previous].Calamity().newAI[0]; - Main.npc[lol].Calamity().newAI[3] = Main.npc[Previous].Calamity().newAI[3]; - - if (Main.dedServ) - { - SyncCalamityNPCAIArrayPacket.Send(Main.npc[lol]); - } - - Main.npc[lol].ai[3] = segments + 1; - 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); - Previous = lol; - } - } - } - - if (npc.life > Main.npc[(int)npc.ai[0]].life) - npc.life = Main.npc[(int)npc.ai[0]].life; - } - else - { - if (npc.life > Main.npc[(int)npc.ai[1]].life) - npc.life = Main.npc[(int)npc.ai[1]].life; - } - - bool hasJustSpawned = calamityGlobalNPC.newAI[1] < resistanceTime * 0.4f && !doubleWormPhase; // Speed boost for the first 4 seconds after spawning - float segmentVelocity = hasJustSpawned ? 25f : deathModeEnragePhase_Head ? 19f : death ? 17.5f : 16f; - - float segmentVelocityBoost = 5f * (1f - lifeRatio); - segmentVelocity += segmentVelocityBoost; - segmentVelocity += 4f * enrageScale; - - if (revenge) - { - float revMultiplier = 1.1f; - segmentVelocity *= revMultiplier; - } - - if (head) - { - int headTilePositionX = (int)(npc.position.X / 16f) - 1; - int headTileWidthPosX = (int)((npc.position.X + npc.width) / 16f) + 2; - int headTilePositionY = (int)(npc.position.Y / 16f) - 1; - int headTileWidthPosY = (int)((npc.position.Y + npc.height) / 16f) + 2; - - if (headTilePositionX < 0) - headTilePositionX = 0; - if (headTileWidthPosX > Main.maxTilesX) - headTileWidthPosX = Main.maxTilesX; - if (headTilePositionY < 0) - headTilePositionY = 0; - if (headTileWidthPosY > Main.maxTilesY) - headTileWidthPosY = Main.maxTilesY; - - // Fly or not - bool shouldFly = flyAtTarget; - if (!shouldFly) - { - for (int k = headTilePositionX; k < headTileWidthPosX; k++) - { - for (int l = headTilePositionY; l < headTileWidthPosY; l++) - { - if (Main.tile[k, l] != null && ((Main.tile[k, l].HasUnactuatedTile && (Main.tileSolid[Main.tile[k, l].TileType] || (Main.tileSolidTop[Main.tile[k, l].TileType] && Main.tile[k, l].TileFrameY == 0))) || Main.tile[k, l].LiquidAmount > 64)) - { - Vector2 vector2; - vector2.X = k * 16f; - vector2.Y = l * 16f; - if (npc.position.X + npc.width > vector2.X && npc.position.X < vector2.X + 16f && npc.position.Y + npc.height > vector2.Y && npc.position.Y < vector2.Y + 16f) - { - shouldFly = true; - break; - } - } - } - } - } - - // Start flying if target is not within a certain distance - if (!shouldFly) - { - npc.localAI[1] = 1f; - - Rectangle rectangle = new Rectangle((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height); - int noFlyZone = 200; - int heightReduction = death ? 130 : (int)(130f * (1f - lifeRatio)); - int height = 400 - heightReduction; - bool outsideNoFlyZone = true; - - if (npc.position.Y > player.position.Y) - { - for (int m = 0; m < Main.maxPlayers; m++) - { - if (Main.player[m].active) - { - Rectangle rectangle2 = new Rectangle((int)Main.player[m].position.X - noFlyZone, (int)Main.player[m].position.Y - noFlyZone, noFlyZone * 2, height); - if (rectangle.Intersects(rectangle2)) - { - outsideNoFlyZone = false; - break; - } - } - } - - if (outsideNoFlyZone) - shouldFly = true; - } - } - else - npc.localAI[1] = 0f; - - // Despawn - if (player.dead) - { - shouldFly = false; - float velocity = 2f; - npc.velocity.Y -= velocity; - if ((double)npc.position.Y < Main.topWorld + 16f) - { - segmentVelocity *= 2f; - npc.velocity.Y -= velocity; - } - - int headType = ModContent.NPCType(); - int bodyType = ModContent.NPCType(); - int tailType = ModContent.NPCType(); - if ((double)npc.position.Y < Main.topWorld + 16f) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (Main.npc[i].type == headType || Main.npc[i].type == bodyType || Main.npc[i].type == tailType) - { - Main.npc[i].active = false; - Main.npc[i].ForceNetUpdate(false); - } - } - } - } - - // Speed and movement - float speedBoost = death ? (0.1f * (1f - lifeRatio)) : (0.13f * (1f - lifeRatio)); - float turnSpeedBoost = death ? (0.18f * (1f - lifeRatio)) : (0.2f * (1f - lifeRatio)); - float speed = (hasJustSpawned ? 0.26f : deathModeEnragePhase_Head ? 0.2f : death ? 0.18f : 0.13f) + speedBoost; - float turnSpeed = (hasJustSpawned ? 0.3f : deathModeEnragePhase_Head ? 0.27f : death ? 0.25f : 0.2f) + turnSpeedBoost; - speed += 0.05f * enrageScale; - turnSpeed += 0.08f * enrageScale; - - if (flyAtTarget) - { - float speedMultiplier = deathModeEnragePhase_Head ? 1.25f : doubleWormPhase ? (phase3 ? 1.25f : phase2 ? 1.2f : 1.15f) : 1f; - speed *= speedMultiplier; - } - - if (revenge) - { - float revMultiplier = 1.1f; - speed *= revMultiplier; - turnSpeed *= revMultiplier; - } - - speed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; - turnSpeed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; - - if (Main.getGoodWorld) - { - speed *= 1.15f; - turnSpeed *= 1.15f; - } - - Vector2 deusCenter = npc.Center; - float deusTargetX = player.Center.X; - float deusTargetY = player.Center.Y; - deusTargetX = (int)(deusTargetX / 16f) * 16; - deusTargetY = (int)(deusTargetY / 16f) * 16; - deusCenter.X = (int)(deusCenter.X / 16f) * 16; - deusCenter.Y = (int)(deusCenter.Y / 16f) * 16; - deusTargetX -= deusCenter.X; - deusTargetY -= deusCenter.Y; - - if (!shouldFly) - { - npc.velocity.Y += 0.15f; - if (npc.velocity.Y > segmentVelocity) - npc.velocity.Y = segmentVelocity; - - // This bool exists to stop the strange wiggle behavior when worms are falling down - bool slowXVelocity = Math.Abs(npc.velocity.X) > speed; - if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < segmentVelocity * 0.4) - { - if (npc.velocity.X < 0f) - npc.velocity.X -= speed * 1.1f; - else - npc.velocity.X += speed * 1.1f; - } - else if (npc.velocity.Y == segmentVelocity) - { - if (slowXVelocity) - { - if (npc.velocity.X < deusTargetX) - npc.velocity.X += speed; - else if (npc.velocity.X > deusTargetX) - npc.velocity.X -= speed; - } - else - npc.velocity.X = 0f; - } - else if (npc.velocity.Y > 4f) - { - if (slowXVelocity) - { - if (npc.velocity.X < 0f) - npc.velocity.X += speed * 0.9f; - else - npc.velocity.X -= speed * 0.9f; - } - else - npc.velocity.X = 0f; - } - } - else - { - float deusTargetDist = (float)Math.Sqrt(deusTargetX * deusTargetX + deusTargetY * deusTargetY); - float deusAbsoluteTargetX = Math.Abs(deusTargetX); - float deusAbsoluteTargetY = Math.Abs(deusTargetY); - float deusTimeToReachTarget = segmentVelocity / deusTargetDist; - deusTargetX *= deusTimeToReachTarget; - deusTargetY *= deusTimeToReachTarget; - - bool speedUpWhileFlying = false; - if (flyAtTarget) - { - if (((npc.velocity.X > 0f && deusTargetX < 0f) || (npc.velocity.X < 0f && deusTargetX > 0f) || (npc.velocity.Y > 0f && deusTargetY < 0f) || (npc.velocity.Y < 0f && deusTargetY > 0f)) && Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) > speed / 2f && deusTargetDist < 400f) - { - speedUpWhileFlying = true; - - if (Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y) < segmentVelocity) - npc.velocity *= 1.1f; - } - - if (npc.position.Y > player.position.Y) - { - speedUpWhileFlying = true; - - if (Math.Abs(npc.velocity.X) < segmentVelocity / 2f) - { - if (npc.velocity.X == 0f) - npc.velocity.X -= npc.direction; - - npc.velocity.X *= 1.1f; - } - else if (npc.velocity.Y > -segmentVelocity) - npc.velocity.Y -= speed; - } - } - - if (!speedUpWhileFlying) - { - if (!flyAtTarget) - { - if (((npc.velocity.X > 0f && deusTargetX > 0f) || (npc.velocity.X < 0f && deusTargetX < 0f)) && ((npc.velocity.Y > 0f && deusTargetY > 0f) || (npc.velocity.Y < 0f && deusTargetY < 0f))) - { - if (npc.velocity.X < deusTargetX) - npc.velocity.X += turnSpeed; - else if (npc.velocity.X > deusTargetX) - npc.velocity.X -= turnSpeed; - - if (npc.velocity.Y < deusTargetY) - npc.velocity.Y += turnSpeed; - else if (npc.velocity.Y > deusTargetY) - npc.velocity.Y -= turnSpeed; - } - } - - if ((npc.velocity.X > 0f && deusTargetX > 0f) || (npc.velocity.X < 0f && deusTargetX < 0f) || (npc.velocity.Y > 0f && deusTargetY > 0f) || (npc.velocity.Y < 0f && deusTargetY < 0f)) - { - if (npc.velocity.X < deusTargetX) - npc.velocity.X += speed; - else if (npc.velocity.X > deusTargetX) - npc.velocity.X -= speed; - - if (npc.velocity.Y < deusTargetY) - npc.velocity.Y += speed; - else if (npc.velocity.Y > deusTargetY) - npc.velocity.Y -= speed; - - if (Math.Abs(deusTargetY) < segmentVelocity * 0.2 && ((npc.velocity.X > 0f && deusTargetX < 0f) || (npc.velocity.X < 0f && deusTargetX > 0f))) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y += speed * 2f; - else - npc.velocity.Y -= speed * 2f; - } - - if (Math.Abs(deusTargetX) < segmentVelocity * 0.2 && ((npc.velocity.Y > 0f && deusTargetY < 0f) || (npc.velocity.Y < 0f && deusTargetY > 0f))) - { - if (npc.velocity.X > 0f) - npc.velocity.X += speed * 2f; - else - npc.velocity.X -= speed * 2f; - } - } - else if (deusAbsoluteTargetX > deusAbsoluteTargetY) - { - if (npc.velocity.X < deusTargetX) - npc.velocity.X += speed * 1.1f; - else if (npc.velocity.X > deusTargetX) - npc.velocity.X -= speed * 1.1f; - - if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < segmentVelocity * 0.5) - { - if (npc.velocity.Y > 0f) - npc.velocity.Y += speed; - else - npc.velocity.Y -= speed; - } - } - else - { - if (npc.velocity.Y < deusTargetY) - npc.velocity.Y += speed * 1.1f; - else if (npc.velocity.Y > deusTargetY) - npc.velocity.Y -= speed * 1.1f; - - if ((Math.Abs(npc.velocity.X) + Math.Abs(npc.velocity.Y)) < segmentVelocity * 0.5) - { - if (npc.velocity.X > 0f) - npc.velocity.X += speed; - else - npc.velocity.X -= speed; - } - } - } - } - - if (shouldFly) - { - if (npc.localAI[0] != 1f) - npc.ForceNetUpdate(false); - - npc.localAI[0] = 1f; - } - else - { - if (npc.localAI[0] != 0f) - npc.ForceNetUpdate(false); - - npc.localAI[0] = 0f; - } - - if (((npc.velocity.X > 0f && npc.oldVelocity.X < 0f) || (npc.velocity.X < 0f && npc.oldVelocity.X > 0f) || (npc.velocity.Y > 0f && npc.oldVelocity.Y < 0f) || (npc.velocity.Y < 0f && npc.oldVelocity.Y > 0f)) && !npc.justHit) - npc.ForceNetUpdate(false); - - npc.rotation = (float)Math.Atan2(npc.velocity.Y, npc.velocity.X) + MathHelper.PiOver2; - } - - // Only the main worm body and tail use this code - else - { - // Shoot lasers - if (npc.type == ModContent.NPCType()) - { - npc.localAI[0] += 1f; - - int shootTime = (doubleWormPhase && expertMode) ? 2 : 1; - float shootProjectile = (doubleWormPhase && expertMode) ? 200 : 400; - float timer = npc.ai[0] + 15f; - float divisor = timer + shootProjectile; - bool canFireProjectiles = npc.Opacity >= 1f; - bool shootGodRays = phase2 || deathModeEnragePhase_BodyAndTail; - - if (canFireProjectiles) - { - if (!flyAtTarget || deathModeEnragePhase_BodyAndTail) - { - float laserDivisor = (phase2 && !deathModeEnragePhase_BodyAndTail) ? 4f : 2f; - if (npc.localAI[0] % divisor == 0f && npc.ai[0] % laserDivisor == 0f) - { - npc.TargetClosest(); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - if (deathModeEnragePhase_BodyAndTail) - { - Vector2 velocity = Vector2.Zero; - if (movingMines) - { - Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - randomMineMovement.Normalize(); - randomMineMovement *= Main.rand.Next(90, 121) * 0.01f; - velocity = randomMineMovement; - } - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); - } - } - - if (Vector2.Distance(player.Center, npc.Center) > 80f) - { - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float deusLaserSpeed = (death ? 16f : revenge ? 14f : 13f) + enrageScale * 4f; - - Vector2 deusLaserCenter = npc.Center; - float deusLaserTargetX = player.Center.X - deusLaserCenter.X; - float deusLaserTargetY = player.Center.Y - deusLaserCenter.Y; - float deusLaserTargetDist = (float)Math.Sqrt(deusLaserTargetX * deusLaserTargetX + deusLaserTargetY * deusLaserTargetY); - deusLaserTargetDist = deusLaserSpeed / deusLaserTargetDist; - deusLaserTargetX *= deusLaserTargetDist; - deusLaserTargetY *= deusLaserTargetDist; - deusLaserCenter.X += deusLaserTargetX * 5f; - deusLaserCenter.Y += deusLaserTargetY * 5f; - - Vector2 shootDirection = new Vector2(deusLaserTargetX, deusLaserTargetY).SafeNormalize(Vector2.UnitY); - Vector2 laserVelocity = shootDirection * deusLaserSpeed; - - int type = shootGodRays ? ModContent.ProjectileType() : ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - if (shootGodRays) - { - SoundEngine.PlaySound(AstrumDeusHead.GodRaySound, npc.Center); - // Waving beams need to start offset so they cross each other neatly. - float waveSideOffset = Main.rand.NextFloat(9f, 14f); - Vector2 perp = shootDirection.RotatedBy(-MathHelper.PiOver2) * waveSideOffset; - - for (int i = -1; i <= 1; i += 2) - { - Vector2 laserStartPos = deusLaserCenter + i * perp + Main.rand.NextVector2CircularEdge(6f, 6f); - Projectile godRay = Projectile.NewProjectileDirect(npc.GetSource_FromAI(), laserStartPos, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); - - // Tell this Phased God Ray exactly which way it should be waving. - godRay.localAI[1] = i * 0.5f; - } - } - else - { - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, npc.Center); - Projectile.NewProjectile(npc.GetSource_FromAI(), deusLaserCenter, laserVelocity, type, damage, 0f, Main.myPlayer, player.Center.X, player.Center.Y); - } - } - } - } - } - else - { - if (npc.localAI[0] % divisor == 0f && npc.ai[0] % 2f == 0f) - { - Vector2 velocity = Vector2.Zero; - if (movingMines) - { - Vector2 randomMineMovement = new Vector2(Main.rand.Next(-100, 101), Main.rand.Next(-100, 101)); - randomMineMovement.Normalize(); - randomMineMovement *= Main.rand.Next(30, 121) * 0.01f; - velocity = randomMineMovement; - } - - int type = ModContent.ProjectileType(); - int damage = npc.GetProjectileDamage(type); - float split = (splittingMines && npc.ai[0] % 3f == 0f) ? 1f : 0f; - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center, velocity, type, damage, 0f, Main.myPlayer, split, 0f); - } - } - } - } - - // Follow the head - Vector2 segmentCenter = npc.Center; - float segmentTargetX = player.Center.X; - float segmentTargetY = player.Center.Y; - segmentTargetX = (int)(segmentTargetX / 16f) * 16; - segmentTargetY = (int)(segmentTargetY / 16f) * 16; - segmentCenter.X = (int)(segmentCenter.X / 16f) * 16; - segmentCenter.Y = (int)(segmentCenter.Y / 16f) * 16; - segmentTargetX -= segmentCenter.X; - segmentTargetY -= segmentCenter.Y; - - if (npc.ai[1] > 0f && npc.ai[1] < Main.npc.Length) - { - try - { - segmentCenter = npc.Center; - segmentTargetX = Main.npc[(int)npc.ai[1]].Center.X - segmentCenter.X; - segmentTargetY = Main.npc[(int)npc.ai[1]].Center.Y - segmentCenter.Y; - } - catch - { - } - - npc.rotation = (float)Math.Atan2(segmentTargetY, segmentTargetX) + MathHelper.PiOver2; - float segmentTargetDist = (float)Math.Sqrt(segmentTargetX * segmentTargetX + segmentTargetY * segmentTargetY); - int segmentWidth = npc.width; - segmentTargetDist = (segmentTargetDist - segmentWidth) / segmentTargetDist; - segmentTargetX *= segmentTargetDist; - segmentTargetY *= segmentTargetDist; - npc.velocity = Vector2.Zero; - npc.position.X = npc.position.X + segmentTargetX; - npc.position.Y = npc.position.Y + segmentTargetY; - - if (segmentTargetX < 0f) - npc.spriteDirection = -1; - else if (segmentTargetX > 0f) - npc.spriteDirection = 1; - } - } - - // Play spawn sound on Deus on the first frame because otherwise the sound wouldn't play properly in multiplayer - if (calamityGlobalNPC.newAI[1] == 0f && !doubleWormPhase) - { - SoundEngine.PlaySound(AstrumDeusHead.SpawnSound, npc.Center); - calamityGlobalNPC.newAI[1] = 1f; - } - - // 5 seconds of resistance in phase 2, 10 seconds in phase 1, to prevent spawn killing - if (calamityGlobalNPC.newAI[1] < resistanceTime && ((npc.position - npc.oldPosition).Length() > 2f || calamityGlobalNPC.newAI[1] > 1f)) - calamityGlobalNPC.newAI[1] += 1f; - - // Calculate contact damage based on velocity - if (!doNotDealDamage) - { - float minimalContactDamageVelocity = segmentVelocity * 0.25f; - float minimalDamageVelocity = segmentVelocity * 0.5f; - if (head) - { - if (npc.velocity.Length() <= minimalContactDamageVelocity) - { - npc.damage = (int)Math.Round(npc.defDamage * 0.5); - } - else - { - float velocityDamageScalar = MathHelper.Clamp((npc.velocity.Length() - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - npc.damage = (int)MathHelper.Lerp((float)Math.Round(npc.defDamage * 0.5), npc.defDamage, velocityDamageScalar); - } - } - else - { - float bodyAndTailVelocity = (npc.position - npc.oldPosition).Length(); - if (bodyAndTailVelocity <= minimalContactDamageVelocity) - { - npc.damage = 0; - } - else - { - float velocityDamageScalar = MathHelper.Clamp((bodyAndTailVelocity - minimalContactDamageVelocity) / minimalDamageVelocity, 0f, 1f); - npc.damage = (int)MathHelper.Lerp(0f, npc.defDamage, velocityDamageScalar); - } - } - } - } - } -} diff --git a/NPCs/Crags/DespairStone.cs b/NPCs/Crags/DespairStone.cs index a386dfd7fa..b9db14ce14 100644 --- a/NPCs/Crags/DespairStone.cs +++ b/NPCs/Crags/DespairStone.cs @@ -5,7 +5,7 @@ using CalamityMod.Dusts; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Placeables.Crags; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.Particles; using CalamityMod.World; using Microsoft.Xna.Framework; diff --git a/NPCs/NormalNPCs/Bohldohr.cs b/NPCs/NormalNPCs/Bohldohr.cs index a6a4b88510..00d2b1d8b3 100644 --- a/NPCs/NormalNPCs/Bohldohr.cs +++ b/NPCs/NormalNPCs/Bohldohr.cs @@ -1,7 +1,6 @@ using CalamityMod.Items.Placeables; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.SummonItems; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.NPCs.Other; using CalamityMod.World; using Terraria; diff --git a/NPCs/CalamityAIs/CalamityRegularEnemyAIs/CalamityRegularEnemyAI.cs b/NPCs/NormalNPCs/CalamityRegularEnemyAI.cs similarity index 65% rename from NPCs/CalamityAIs/CalamityRegularEnemyAIs/CalamityRegularEnemyAI.cs rename to NPCs/NormalNPCs/CalamityRegularEnemyAI.cs index f0ec92c278..14ee15c69d 100644 --- a/NPCs/CalamityAIs/CalamityRegularEnemyAIs/CalamityRegularEnemyAI.cs +++ b/NPCs/NormalNPCs/CalamityRegularEnemyAI.cs @@ -1,25 +1,10 @@ using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.CalPlayer; using CalamityMod.Dusts; -using CalamityMod.Events; using CalamityMod.NPCs.Abyss; -using CalamityMod.NPCs.AquaticScourge; -using CalamityMod.NPCs.AstrumAureus; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.NPCs.BrimstoneElemental; -using CalamityMod.NPCs.Bumblebirb; -using CalamityMod.NPCs.CalClone; -using CalamityMod.NPCs.CeaselessVoid; using CalamityMod.NPCs.Crags; -using CalamityMod.NPCs.NormalNPCs; -using CalamityMod.NPCs.OldDuke; using CalamityMod.NPCs.SulphurousSea; using CalamityMod.NPCs.SunkenSea; -using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Enemy; -using CalamityMod.Sounds; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; @@ -27,23 +12,23 @@ using Terraria.Audio; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs +namespace CalamityMod.NPCs.NormalNPCs { public static class CalamityRegularEnemyAI { #region Gem Crawler AI public static void GemCrawlerAI(NPC npc, Mod mod, float speedDetect, float speedAdditive) { - int turnAroundDelay = 30; - bool unusedFlag = false; - bool isRunning = false; - bool shouldTurnAround = false; - if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction > 0) || (npc.velocity.X < 0f && npc.direction < 0))) + var turnAroundDelay = 30; + var unusedFlag = false; + var isRunning = false; + var shouldTurnAround = false; + if (npc.velocity.Y == 0f && (npc.velocity.X > 0f && npc.direction > 0 || npc.velocity.X < 0f && npc.direction < 0)) { isRunning = true; npc.ai[3] += 1f; } - if ((npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)turnAroundDelay) | isRunning) + if ((npc.position.X == npc.oldPosition.X || npc.ai[3] >= turnAroundDelay) | isRunning) { npc.ai[3] += 1f; shouldTurnAround = true; @@ -52,7 +37,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { npc.ai[3] -= 1f; } - if (npc.ai[3] > (float)(turnAroundDelay * 10)) + if (npc.ai[3] > turnAroundDelay * 10) { npc.ai[3] = 0f; } @@ -60,19 +45,19 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { npc.ai[3] = 0f; } - if (npc.ai[3] == (float)turnAroundDelay) + if (npc.ai[3] == turnAroundDelay) { npc.netUpdate = true; } - Vector2 npcPos = new Vector2(npc.Center.X, npc.Center.Y); - float xDist = Main.player[npc.target].Center.X - npcPos.X; - float yDist = Main.player[npc.target].Center.Y - npcPos.Y; - float targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); + var npcPos = new Vector2(npc.Center.X, npc.Center.Y); + var xDist = Main.player[npc.target].Center.X - npcPos.X; + var yDist = Main.player[npc.target].Center.Y - npcPos.Y; + var targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); if (targetDist < 200f && !shouldTurnAround) { npc.ai[3] = 0f; } - if (npc.ai[3] < (float)turnAroundDelay) + if (npc.ai[3] < turnAroundDelay) { npc.TargetClosest(true); } @@ -101,9 +86,9 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs npc.direction = 1; } } - float maxVelocity = speedDetect; //5 - float acceleration = speedAdditive; //0.05 - if (!unusedFlag && (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction > 0) || (npc.velocity.X >= 0f && npc.direction < 0))) + var maxVelocity = speedDetect; //5 + var acceleration = speedAdditive; //0.05 + if (!unusedFlag && (npc.velocity.Y == 0f || npc.wet || npc.velocity.X <= 0f && npc.direction > 0 || npc.velocity.X >= 0f && npc.direction < 0)) { if (npc.velocity.X < -maxVelocity || npc.velocity.X > maxVelocity) { @@ -131,7 +116,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs } if (npc.velocity.Y >= 0f) { - int faceDirection = 0; + var faceDirection = 0; if (npc.velocity.X < 0f) { faceDirection = -1; @@ -140,13 +125,13 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { faceDirection = 1; } - Vector2 position = npc.position; + var position = npc.position; position.X += npc.velocity.X; - int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * faceDirection)) / 16f); - int y = (int)((position.Y + (float)npc.height - 1f) / 16f); - if ((float)(x * 16) < position.X + (float)npc.width && (float)(x * 16 + 16) > position.X && ((Main.tile[x, y].HasUnactuatedTile && !Main.tile[x, y].TopSlope && !Main.tile[x, y - 1].TopSlope && Main.tileSolid[(int)Main.tile[x, y].TileType] && !Main.tileSolidTop[(int)Main.tile[x, y].TileType]) || (Main.tile[x, y - 1].IsHalfBlock && Main.tile[x, y - 1].HasUnactuatedTile)) && (!Main.tile[x, y - 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 1].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 1].TileType] || (Main.tile[x, y - 1].IsHalfBlock && (!Main.tile[x, y - 4].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 4].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 4].TileType]))) && (!Main.tile[x, y - 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 2].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 2].TileType]) && (!Main.tile[x, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x, y - 3].TileType] || Main.tileSolidTop[(int)Main.tile[x, y - 3].TileType]) && (!Main.tile[x - faceDirection, y - 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[x - faceDirection, y - 3].TileType])) + var x = (int)((position.X + npc.width / 2 + (npc.width / 2 + 1) * faceDirection) / 16f); + var y = (int)((position.Y + npc.height - 1f) / 16f); + if (x * 16 < position.X + npc.width && x * 16 + 16 > position.X && (Main.tile[x, y].HasUnactuatedTile && !Main.tile[x, y].TopSlope && !Main.tile[x, y - 1].TopSlope && Main.tileSolid[Main.tile[x, y].TileType] && !Main.tileSolidTop[Main.tile[x, y].TileType] || Main.tile[x, y - 1].IsHalfBlock && Main.tile[x, y - 1].HasUnactuatedTile) && (!Main.tile[x, y - 1].HasUnactuatedTile || !Main.tileSolid[Main.tile[x, y - 1].TileType] || Main.tileSolidTop[Main.tile[x, y - 1].TileType] || Main.tile[x, y - 1].IsHalfBlock && (!Main.tile[x, y - 4].HasUnactuatedTile || !Main.tileSolid[Main.tile[x, y - 4].TileType] || Main.tileSolidTop[Main.tile[x, y - 4].TileType])) && (!Main.tile[x, y - 2].HasUnactuatedTile || !Main.tileSolid[Main.tile[x, y - 2].TileType] || Main.tileSolidTop[Main.tile[x, y - 2].TileType]) && (!Main.tile[x, y - 3].HasUnactuatedTile || !Main.tileSolid[Main.tile[x, y - 3].TileType] || Main.tileSolidTop[Main.tile[x, y - 3].TileType]) && (!Main.tile[x - faceDirection, y - 3].HasUnactuatedTile || !Main.tileSolid[Main.tile[x - faceDirection, y - 3].TileType])) { - float npcBottom = (float)(y * 16); + var npcBottom = (float)(y * 16); if (Main.tile[x, y].IsHalfBlock) { npcBottom += 8f; @@ -155,13 +140,13 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { npcBottom -= 8f; } - if (npcBottom < position.Y + (float)npc.height) + if (npcBottom < position.Y + npc.height) { - float percentageTileRisen = position.Y + (float)npc.height - npcBottom; + var percentageTileRisen = position.Y + npc.height - npcBottom; if (percentageTileRisen <= 16.1f) { - npc.gfxOffY += npc.position.Y + (float)npc.height - npcBottom; - npc.position.Y = npcBottom - (float)npc.height; + npc.gfxOffY += npc.position.Y + npc.height - npcBottom; + npc.position.Y = npcBottom - npc.height; if (percentageTileRisen < 9f) { npc.stepSpeed = 1f; @@ -181,11 +166,11 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs public static void DungeonSpiritAI(NPC npc, Mod mod, float speed, float rotation, bool lantern = false) { npc.TargetClosest(true); - Vector2 npcPos = new Vector2(npc.Center.X, npc.Center.Y); - float xDist = Main.player[npc.target].Center.X - npcPos.X; - float yDist = Main.player[npc.target].Center.Y - npcPos.Y; - float targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); - float homingSpeed = speed; + var npcPos = new Vector2(npc.Center.X, npc.Center.Y); + var xDist = Main.player[npc.target].Center.X - npcPos.X; + var yDist = Main.player[npc.target].Center.Y - npcPos.Y; + var targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); + var homingSpeed = speed; if (lantern) { @@ -212,7 +197,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs if (lantern) { npc.rotation = npc.velocity.X * 0.08f; - npc.spriteDirection = (npc.direction > 0) ? 1 : -1; + npc.spriteDirection = npc.direction > 0 ? 1 : -1; } else npc.rotation = (float)Math.Atan2((double)yDist, (double)xDist) + rotation; @@ -222,23 +207,23 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs #region Unicorn AI public static void UnicornAI(NPC npc, Mod mod, bool spin, float bounciness, float speedDetect, float speedAdditive, float bouncy1 = -8.5f, float bouncy2 = -7.5f, float bouncy3 = -7f, float bouncy4 = -6f, float bouncy5 = -8f) { - bool DogPhase1 = npc.type == ModContent.NPCType() && npc.life > npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5); - bool DogPhase2 = npc.type == ModContent.NPCType() && npc.life <= npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5); - int turnAroundDelay = 30; - bool isRunning = false; - bool shouldTurnAround = false; - if (npc.velocity.Y == 0f && ((npc.velocity.X > 0f && npc.direction < 0) || (npc.velocity.X < 0f && npc.direction > 0))) + var DogPhase1 = npc.type == ModContent.NPCType() && npc.life > npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5); + var DogPhase2 = npc.type == ModContent.NPCType() && npc.life <= npc.lifeMax * (CalamityWorld.death ? 0.9 : CalamityWorld.revenge ? 0.7 : 0.5); + var turnAroundDelay = 30; + var isRunning = false; + var shouldTurnAround = false; + if (npc.velocity.Y == 0f && (npc.velocity.X > 0f && npc.direction < 0 || npc.velocity.X < 0f && npc.direction > 0)) { isRunning = true; npc.ai[3] += 1f; } - int turnAroundDelayMult = DogPhase1 ? 10 : 4; + var turnAroundDelayMult = DogPhase1 ? 10 : 4; if (!DogPhase1) { - bool noYVelocity = npc.velocity.Y == 0f; - for (int i = 0; i < Main.maxNPCs; i++) + var noYVelocity = npc.velocity.Y == 0f; + for (var i = 0; i < Main.maxNPCs; i++) { - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < (float)npc.width) + if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type && Math.Abs(npc.position.X - Main.npc[i].position.X) + Math.Abs(npc.position.Y - Main.npc[i].position.Y) < npc.width) { if (npc.position.X < Main.npc[i].position.X) { @@ -263,7 +248,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs npc.velocity.Y = 0f; } } - if (npc.position.X == npc.oldPosition.X || npc.ai[3] >= (float)turnAroundDelay || isRunning) + if (npc.position.X == npc.oldPosition.X || npc.ai[3] >= turnAroundDelay || isRunning) { npc.ai[3] += 1f; shouldTurnAround = true; @@ -272,7 +257,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { npc.ai[3] -= 1f; } - if (npc.ai[3] > (float)(turnAroundDelay * turnAroundDelayMult)) + if (npc.ai[3] > turnAroundDelay * turnAroundDelayMult) { npc.ai[3] = 0f; } @@ -280,33 +265,33 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { npc.ai[3] = 0f; } - if (npc.ai[3] == (float)turnAroundDelay) + if (npc.ai[3] == turnAroundDelay) { npc.netUpdate = true; } - Vector2 npcPos = new Vector2(npc.Center.X, npc.Center.Y); - float xDist = Main.player[npc.target].Center.X - npcPos.X; - float yDist = Main.player[npc.target].Center.Y - npcPos.Y; - float targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); + var npcPos = new Vector2(npc.Center.X, npc.Center.Y); + var xDist = Main.player[npc.target].Center.X - npcPos.X; + var yDist = Main.player[npc.target].Center.Y - npcPos.Y; + var targetDist = (float)Math.Sqrt((double)(xDist * xDist + yDist * yDist)); if (targetDist < 200f && !shouldTurnAround) { npc.ai[3] = 0f; } if (!DogPhase1) { - if (npc.velocity.Y == 0f && Math.Abs(npc.velocity.X) > 3f && ((npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f) || (npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f))) + if (npc.velocity.Y == 0f && Math.Abs(npc.velocity.X) > 3f && (npc.Center.X < Main.player[npc.target].Center.X && npc.velocity.X > 0f || npc.Center.X > Main.player[npc.target].Center.X && npc.velocity.X < 0f)) { npc.velocity.Y -= bounciness; if (npc.type == ModContent.NPCType()) { SoundEngine.PlaySound(SoundID.Item14, npc.Center); - for (int k = 0; k < 10; k++) + for (var k = 0; k < 10; k++) { Dust.NewDust(npc.position, npc.width, npc.height, (int)CalamityDusts.Brimstone, 0f, -1f, 0, default, 1f); } if (Main.zenithWorld) { - float screenShakePower = 2 * Utils.GetLerpValue(1300f, 0f, npc.Distance(Main.LocalPlayer.Center), true); + var screenShakePower = 2 * Utils.GetLerpValue(1300f, 0f, npc.Distance(Main.LocalPlayer.Center), true); if (Main.LocalPlayer.Calamity().GeneralScreenShakePower < screenShakePower) Main.LocalPlayer.Calamity().GeneralScreenShakePower = screenShakePower; } @@ -317,21 +302,21 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs } if (DogPhase2) { - for (int k = 0; k < 5; k++) + for (var k = 0; k < 5; k++) { Dust.NewDust(npc.position, npc.width, npc.height, DustID.Water, 0f, -1f, 0, default, 1f); } } if (npc.type == ModContent.NPCType()) { - for (int k = 0; k < 5; k++) + for (var k = 0; k < 5; k++) { Dust.NewDust(npc.position, npc.width, npc.height, DustID.Water, 0f, -1f, 0, default, 1f); } } } } - if (npc.ai[3] < (float)turnAroundDelay) + if (npc.ai[3] < turnAroundDelay) { npc.TargetClosest(true); } @@ -361,19 +346,19 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs } } - if (npc.velocity.Y == 0f || npc.wet || (npc.velocity.X <= 0f && npc.direction < 0) || (npc.velocity.X >= 0f && npc.direction > 0)) + if (npc.velocity.Y == 0f || npc.wet || npc.velocity.X <= 0f && npc.direction < 0 || npc.velocity.X >= 0f && npc.direction > 0) { if (Math.Sign(npc.velocity.X) != npc.direction && !DogPhase1) { npc.velocity.X *= 0.92f; } - float sandstormPush = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedCurrent)) * (float)Math.Sign(Main.windSpeedCurrent); + var sandstormPush = MathHelper.Lerp(0.6f, 1f, Math.Abs(Main.windSpeedCurrent)) * Math.Sign(Main.windSpeedCurrent); if (!Main.player[npc.target].ZoneSandstorm) { sandstormPush = 0f; } - float maxVelocity = speedDetect; - float acceleration = speedAdditive; + var maxVelocity = speedDetect; + var acceleration = speedAdditive; if (npc.velocity.X < -maxVelocity || npc.velocity.X > maxVelocity) { if (npc.velocity.Y == 0f) @@ -400,7 +385,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs } if (npc.velocity.Y >= 0f) { - int faceDirection = 0; + var faceDirection = 0; if (npc.velocity.X < 0f) { faceDirection = -1; @@ -409,30 +394,30 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { faceDirection = 1; } - Vector2 position = npc.position; + var position = npc.position; position.X += npc.velocity.X; - int x = (int)((position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 1) * faceDirection)) / 16f); - int y = (int)((position.Y + (float)npc.height - 1f) / 16f); + var x = (int)((position.X + npc.width / 2 + (npc.width / 2 + 1) * faceDirection) / 16f); + var y = (int)((position.Y + npc.height - 1f) / 16f); // 21JAN2023: Ozzatron -- this is probably the single most unmaintainable if statement I've ever seen // I have broken all the individual statements out even though I do not fully understand the code. - Tile t_xy = CalamityUtils.ParanoidTileRetrieval(x, y); - Tile t_xy1 = CalamityUtils.ParanoidTileRetrieval(x, y - 1); - Tile t_xy2 = CalamityUtils.ParanoidTileRetrieval(x, y - 2); - Tile t_xy3 = CalamityUtils.ParanoidTileRetrieval(x, y - 3); - Tile t_xOffY3 = CalamityUtils.ParanoidTileRetrieval(x - faceDirection, y - 3); // 3 down, offset 1 in the direction of the NPC's movement - Tile t_xy4 = CalamityUtils.ParanoidTileRetrieval(x, y - 4); - bool positionCheck = (float)(x * 16) < position.X + (float)npc.width && (float)(x * 16 + 16) > position.X; - bool tileSolidityCheck1 = t_xy.HasUnactuatedTile && !t_xy.TopSlope && !t_xy1.TopSlope && Main.tileSolid[t_xy.TileType] && !Main.tileSolidTop[t_xy.TileType]; - bool oneBelowIsSolidHalf = t_xy1.IsHalfBlock && t_xy1.HasUnactuatedTile; - bool canFallThrough = !t_xy1.HasUnactuatedTile || !Main.tileSolid[t_xy1.TileType] || Main.tileSolidTop[t_xy1.TileType] || (t_xy1.IsHalfBlock && (!t_xy4.HasUnactuatedTile || !Main.tileSolid[t_xy4.TileType] || Main.tileSolidTop[t_xy4.TileType])); - bool twoDownIsNonSolid = !t_xy2.HasUnactuatedTile || !Main.tileSolid[t_xy2.TileType] || Main.tileSolidTop[t_xy2.TileType]; - bool threeDownIsNonSolid = !t_xy3.HasUnactuatedTile || !Main.tileSolid[t_xy3.TileType] || Main.tileSolidTop[t_xy3.TileType]; + var t_xy = CalamityUtils.ParanoidTileRetrieval(x, y); + var t_xy1 = CalamityUtils.ParanoidTileRetrieval(x, y - 1); + var t_xy2 = CalamityUtils.ParanoidTileRetrieval(x, y - 2); + var t_xy3 = CalamityUtils.ParanoidTileRetrieval(x, y - 3); + var t_xOffY3 = CalamityUtils.ParanoidTileRetrieval(x - faceDirection, y - 3); // 3 down, offset 1 in the direction of the NPC's movement + var t_xy4 = CalamityUtils.ParanoidTileRetrieval(x, y - 4); + var positionCheck = x * 16 < position.X + npc.width && x * 16 + 16 > position.X; + var tileSolidityCheck1 = t_xy.HasUnactuatedTile && !t_xy.TopSlope && !t_xy1.TopSlope && Main.tileSolid[t_xy.TileType] && !Main.tileSolidTop[t_xy.TileType]; + var oneBelowIsSolidHalf = t_xy1.IsHalfBlock && t_xy1.HasUnactuatedTile; + var canFallThrough = !t_xy1.HasUnactuatedTile || !Main.tileSolid[t_xy1.TileType] || Main.tileSolidTop[t_xy1.TileType] || t_xy1.IsHalfBlock && (!t_xy4.HasUnactuatedTile || !Main.tileSolid[t_xy4.TileType] || Main.tileSolidTop[t_xy4.TileType]); + var twoDownIsNonSolid = !t_xy2.HasUnactuatedTile || !Main.tileSolid[t_xy2.TileType] || Main.tileSolidTop[t_xy2.TileType]; + var threeDownIsNonSolid = !t_xy3.HasUnactuatedTile || !Main.tileSolid[t_xy3.TileType] || Main.tileSolidTop[t_xy3.TileType]; // Notice it doesn't check for platforms in ther offset position. This is why walking AIs twirl on 1-wide platforms in hellevators. They have to turn around before this check succeeds. - bool threeDownOffsetIsNonSolid = !t_xOffY3.HasUnactuatedTile || !Main.tileSolid[t_xOffY3.TileType]; + var threeDownOffsetIsNonSolid = !t_xOffY3.HasUnactuatedTile || !Main.tileSolid[t_xOffY3.TileType]; if (positionCheck && (tileSolidityCheck1 || oneBelowIsSolidHalf) && canFallThrough && twoDownIsNonSolid && threeDownIsNonSolid && threeDownOffsetIsNonSolid) { - float tilePixelPosition = (float)(y * 16); + var tilePixelPosition = (float)(y * 16); if (Main.tile[x, y].IsHalfBlock) { tilePixelPosition += 8f; @@ -441,13 +426,13 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { tilePixelPosition -= 8f; } - if (tilePixelPosition < position.Y + (float)npc.height) + if (tilePixelPosition < position.Y + npc.height) { - float percentageTileRisen = position.Y + (float)npc.height - tilePixelPosition; + var percentageTileRisen = position.Y + npc.height - tilePixelPosition; if ((double)percentageTileRisen <= 16.1) { - npc.gfxOffY += npc.position.Y + (float)npc.height - tilePixelPosition; - npc.position.Y = tilePixelPosition - (float)npc.height; + npc.gfxOffY += npc.position.Y + npc.height - tilePixelPosition; + npc.position.Y = tilePixelPosition - npc.height; if (percentageTileRisen < 9f) { npc.stepSpeed = 1f; @@ -462,15 +447,15 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs } if (npc.velocity.Y == 0f) { - int npcTileX = (int)((npc.position.X + (float)(npc.width / 2) + (float)((npc.width / 2 + 2) * npc.direction) + npc.velocity.X * 5f) / 16f); - int npcTileY = (int)((npc.position.Y + (float)npc.height - 15f) / 16f); - int spriteDirection = npc.spriteDirection; + var npcTileX = (int)((npc.position.X + npc.width / 2 + (npc.width / 2 + 2) * npc.direction + npc.velocity.X * 5f) / 16f); + var npcTileY = (int)((npc.position.Y + npc.height - 15f) / 16f); + var spriteDirection = npc.spriteDirection; spriteDirection *= -1; - if ((npc.velocity.X < 0f && spriteDirection == -1) || (npc.velocity.X > 0f && spriteDirection == 1)) + if (npc.velocity.X < 0f && spriteDirection == -1 || npc.velocity.X > 0f && spriteDirection == 1) { - if (Main.tile[npcTileX, npcTileY - 2].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 2].TileType]) + if (Main.tile[npcTileX, npcTileY - 2].HasUnactuatedTile && Main.tileSolid[Main.tile[npcTileX, npcTileY - 2].TileType]) { - if (Main.tile[npcTileX, npcTileY - 3].HasUnactuatedTile && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 3].TileType]) + if (Main.tile[npcTileX, npcTileY - 3].HasUnactuatedTile && Main.tileSolid[Main.tile[npcTileX, npcTileY - 3].TileType]) { npc.velocity.Y = bouncy1; npc.netUpdate = true; @@ -481,17 +466,17 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs npc.netUpdate = true; } } - else if (Main.tile[npcTileX, npcTileY - 1].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY - 1].TopSlope && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY - 1].TileType]) + else if (Main.tile[npcTileX, npcTileY - 1].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY - 1].TopSlope && Main.tileSolid[Main.tile[npcTileX, npcTileY - 1].TileType]) { npc.velocity.Y = bouncy3; npc.netUpdate = true; } - else if (npc.position.Y + (float)npc.height - (float)(npcTileY * 16) > 20f && Main.tile[npcTileX, npcTileY].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY].TopSlope && Main.tileSolid[(int)Main.tile[npcTileX, npcTileY].TileType]) + else if (npc.position.Y + npc.height - npcTileY * 16 > 20f && Main.tile[npcTileX, npcTileY].HasUnactuatedTile && !Main.tile[npcTileX, npcTileY].TopSlope && Main.tileSolid[Main.tile[npcTileX, npcTileY].TileType]) { npc.velocity.Y = bouncy4; npc.netUpdate = true; } - else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > 3f) && (!Main.tile[npcTileX, npcTileY + 1].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX, npcTileY + 1].TileType]) && (!Main.tile[npcTileX, npcTileY + 2].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX, npcTileY + 2].TileType]) && (!Main.tile[npcTileX + npc.direction, npcTileY + 3].HasUnactuatedTile || !Main.tileSolid[(int)Main.tile[npcTileX + npc.direction, npcTileY + 3].TileType])) + else if ((npc.directionY < 0 || Math.Abs(npc.velocity.X) > 3f) && (!Main.tile[npcTileX, npcTileY + 1].HasUnactuatedTile || !Main.tileSolid[Main.tile[npcTileX, npcTileY + 1].TileType]) && (!Main.tile[npcTileX, npcTileY + 2].HasUnactuatedTile || !Main.tileSolid[Main.tile[npcTileX, npcTileY + 2].TileType]) && (!Main.tile[npcTileX + npc.direction, npcTileY + 3].HasUnactuatedTile || !Main.tileSolid[Main.tile[npcTileX + npc.direction, npcTileY + 3].TileType])) { npc.velocity.Y = bouncy5; npc.netUpdate = true; @@ -515,21 +500,21 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs public static void PassiveSwimmingAI(NPC npc, Mod mod, int passiveness, float detectRange, float xSpeed, float ySpeed, float speedLimitX, float speedLimitY, float rotation, bool spriteFacesLeft = true) { if (spriteFacesLeft) - npc.spriteDirection = (npc.direction > 0) ? 1 : -1; + npc.spriteDirection = npc.direction > 0 ? 1 : -1; else - npc.spriteDirection = (npc.direction > 0) ? -1 : 1; + npc.spriteDirection = npc.direction > 0 ? -1 : 1; npc.noGravity = true; if (npc.direction == 0) npc.TargetClosest(); - Player target = Main.player[npc.target]; + var target = Main.player[npc.target]; if (npc.justHit && passiveness != 3) npc.chaseable = true; if (npc.wet) { - bool hasWetTarget = npc.chaseable; + var hasWetTarget = npc.chaseable; npc.TargetClosest(false); target = Main.player[npc.target]; @@ -610,18 +595,18 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs // Swim away from the player if (passiveness == 3) { - npc.velocity.X = npc.velocity.X - (float)npc.direction * xSpeed; - npc.velocity.Y = npc.velocity.Y - (float)npc.directionY * ySpeed; + npc.velocity.X = npc.velocity.X - npc.direction * xSpeed; + npc.velocity.Y = npc.velocity.Y - npc.directionY * ySpeed; } // Swim toward the player else { - npc.velocity.X = npc.velocity.X + (float)npc.direction * (CalamityWorld.death ? 2f * xSpeed : CalamityWorld.revenge ? 1.5f * xSpeed : xSpeed); - npc.velocity.Y = npc.velocity.Y + (float)npc.directionY * (CalamityWorld.death ? 2f * ySpeed : CalamityWorld.revenge ? 1.5f * ySpeed : ySpeed); + npc.velocity.X = npc.velocity.X + npc.direction * (CalamityWorld.death ? 2f * xSpeed : CalamityWorld.revenge ? 1.5f * xSpeed : xSpeed); + npc.velocity.Y = npc.velocity.Y + npc.directionY * (CalamityWorld.death ? 2f * ySpeed : CalamityWorld.revenge ? 1.5f * ySpeed : ySpeed); } - float velocityCapX = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitX : CalamityWorld.revenge ? 1.5f * speedLimitX : speedLimitX; - float velocityCapY = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitY : CalamityWorld.revenge ? 1.5f * speedLimitY : speedLimitY; + var velocityCapX = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitX : CalamityWorld.revenge ? 1.5f * speedLimitX : speedLimitX; + var velocityCapY = CalamityWorld.death && passiveness != 3 ? 2f * speedLimitY : CalamityWorld.revenge ? 1.5f * speedLimitY : speedLimitY; npc.velocity.X = MathHelper.Clamp(npc.velocity.X, -velocityCapX, velocityCapX); npc.velocity.Y = MathHelper.Clamp(npc.velocity.Y, -velocityCapY, velocityCapY); @@ -631,22 +616,22 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs // Laserfish shoot the player if (npc.type == ModContent.NPCType()) { - npc.localAI[0] += (CalamityWorld.death ? 2f : CalamityWorld.revenge ? 1.5f : 1f); + npc.localAI[0] += CalamityWorld.death ? 2f : CalamityWorld.revenge ? 1.5f : 1f; if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= 120f) { npc.localAI[0] = 0f; if (Collision.CanHit(npc.position, npc.width, npc.height, target.position, target.width, target.height)) { - float speed = 5f; - Vector2 vector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)(npc.height / 2)); - float velX = target.Center.X - vector.X + Main.rand.NextFloat(-20f, 20f); - float velY = target.Center.Y - vector.Y + Main.rand.NextFloat(-20f, 20f); - float dist = (float)Math.Sqrt((double)(velX * velX + velY * velY)); + var speed = 5f; + var vector = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height / 2); + var velX = target.Center.X - vector.X + Main.rand.NextFloat(-20f, 20f); + var velY = target.Center.Y - vector.Y + Main.rand.NextFloat(-20f, 20f); + var dist = (float)Math.Sqrt((double)(velX * velX + velY * velY)); dist = speed / dist; velX *= dist; velY *= dist; - int damage = Main.masterMode ? 34 : Main.expertMode ? 40 : 50; - int beam = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X + (npc.spriteDirection == 1 ? 25f : -25f), npc.Center.Y + (target.position.Y > npc.Center.Y ? 5f : -5f), velX, velY, ProjectileID.EyeBeam, damage, 0f, Main.myPlayer); + var damage = Main.masterMode ? 34 : Main.expertMode ? 40 : 50; + var beam = Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X + (npc.spriteDirection == 1 ? 25f : -25f), npc.Center.Y + (target.position.Y > npc.Center.Y ? 5f : -5f), velX, velY, ProjectileID.EyeBeam, damage, 0f, Main.myPlayer); Main.projectile[beam].tileCollide = true; } } @@ -657,21 +642,21 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs { if ((target.Center - npc.Center).Length() < 350f) { - npc.localAI[0] += (CalamityWorld.death ? 3f : CalamityWorld.revenge ? 2f : 1f); + npc.localAI[0] += CalamityWorld.death ? 3f : CalamityWorld.revenge ? 2f : 1f; if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] >= 180f) { npc.localAI[0] = 0f; if (Collision.CanHit(npc.position, npc.width, npc.height, target.position, target.width, target.height)) { - float speed = 4f; - Vector2 vector = new Vector2(npc.position.X + (float)npc.width * 0.5f, npc.position.Y + (float)(npc.height / 2)); - float velX = target.Center.X - vector.X + Main.rand.NextFloat(-20f, 20f); - float velY = target.Center.Y - vector.Y + Main.rand.NextFloat(-20f, 20f); - float dist = (float)Math.Sqrt((double)(velX * velX + velY * velY)); + var speed = 4f; + var vector = new Vector2(npc.position.X + npc.width * 0.5f, npc.position.Y + npc.height / 2); + var velX = target.Center.X - vector.X + Main.rand.NextFloat(-20f, 20f); + var velY = target.Center.Y - vector.Y + Main.rand.NextFloat(-20f, 20f); + var dist = (float)Math.Sqrt((double)(velX * velX + velY * velY)); dist = speed / dist; velX *= dist; velY *= dist; - int damage = Main.masterMode ? 21 : Main.expertMode ? 25 : 35; + var damage = Main.masterMode ? 21 : Main.expertMode ? 25 : 35; Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center.X + (npc.spriteDirection == 1 ? 10f : -10f), npc.Center.Y, velX, velY, ModContent.ProjectileType(), damage, 0f, Main.myPlayer); } } @@ -685,7 +670,7 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs else { // No target behavior - npc.velocity.X += (float)npc.direction * 0.1f; + npc.velocity.X += npc.direction * 0.1f; if (npc.velocity.X < -2.5f || npc.velocity.X > 2.5f) npc.velocity.X *= 0.95f; @@ -703,8 +688,8 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs } } - int npcTileX = (int)(npc.position.X + (float)(npc.width / 2)) / 16; - int npcTileY = (int)(npc.position.Y + (float)(npc.height / 2)) / 16; + var npcTileX = (int)(npc.position.X + npc.width / 2) / 16; + var npcTileY = (int)(npc.position.Y + npc.height / 2) / 16; if (Main.tile[npcTileX, npcTileY - 1].LiquidAmount > 128) { if (Main.tile[npcTileX, npcTileY + 1].HasTile) @@ -733,8 +718,8 @@ namespace CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs npc.ai[0] = 1f; } - npc.rotation = npc.velocity.Y * (float)npc.direction * rotation; - float rotationLimit = 2f * rotation; + npc.rotation = npc.velocity.Y * npc.direction * rotation; + var rotationLimit = 2f * rotation; npc.rotation = MathHelper.Clamp(npc.rotation, -rotationLimit, rotationLimit); } #endregion diff --git a/NPCs/NormalNPCs/CrawlerAmber.cs b/NPCs/NormalNPCs/CrawlerAmber.cs index f954995ab2..a72c027c29 100644 --- a/NPCs/NormalNPCs/CrawlerAmber.cs +++ b/NPCs/NormalNPCs/CrawlerAmber.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerAmethyst.cs b/NPCs/NormalNPCs/CrawlerAmethyst.cs index a4e87c0b90..ef1ba06395 100644 --- a/NPCs/NormalNPCs/CrawlerAmethyst.cs +++ b/NPCs/NormalNPCs/CrawlerAmethyst.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerCrystal.cs b/NPCs/NormalNPCs/CrawlerCrystal.cs index e1a0792b18..52bf6243b8 100644 --- a/NPCs/NormalNPCs/CrawlerCrystal.cs +++ b/NPCs/NormalNPCs/CrawlerCrystal.cs @@ -3,7 +3,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Melee; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerDiamond.cs b/NPCs/NormalNPCs/CrawlerDiamond.cs index 09e32974f5..2d5c45ced0 100644 --- a/NPCs/NormalNPCs/CrawlerDiamond.cs +++ b/NPCs/NormalNPCs/CrawlerDiamond.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerEmerald.cs b/NPCs/NormalNPCs/CrawlerEmerald.cs index 83098672ad..57203f5712 100644 --- a/NPCs/NormalNPCs/CrawlerEmerald.cs +++ b/NPCs/NormalNPCs/CrawlerEmerald.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerRuby.cs b/NPCs/NormalNPCs/CrawlerRuby.cs index 85e11808ee..661e93c8b7 100644 --- a/NPCs/NormalNPCs/CrawlerRuby.cs +++ b/NPCs/NormalNPCs/CrawlerRuby.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerSapphire.cs b/NPCs/NormalNPCs/CrawlerSapphire.cs index 82e676db37..acc838a377 100644 --- a/NPCs/NormalNPCs/CrawlerSapphire.cs +++ b/NPCs/NormalNPCs/CrawlerSapphire.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/CrawlerTopaz.cs b/NPCs/NormalNPCs/CrawlerTopaz.cs index 3ce4c15784..ee69820a97 100644 --- a/NPCs/NormalNPCs/CrawlerTopaz.cs +++ b/NPCs/NormalNPCs/CrawlerTopaz.cs @@ -2,7 +2,6 @@ using CalamityMod.Items.Accessories; using CalamityMod.Items.Accessories.Vanity; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/Cryon.cs b/NPCs/NormalNPCs/Cryon.cs index b82920a32c..2ebe973bfc 100644 --- a/NPCs/NormalNPCs/Cryon.cs +++ b/NPCs/NormalNPCs/Cryon.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.World; using Terraria; using Terraria.GameContent.Bestiary; diff --git a/NPCs/NormalNPCs/Frogfish.cs b/NPCs/NormalNPCs/Frogfish.cs index 3c4fe4c6f8..f0d28063b9 100644 --- a/NPCs/NormalNPCs/Frogfish.cs +++ b/NPCs/NormalNPCs/Frogfish.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Potions; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/NormalNPCs/PhantomSpirit.cs b/NPCs/NormalNPCs/PhantomSpirit.cs index 1f94654c10..29e9400b94 100644 --- a/NPCs/NormalNPCs/PhantomSpirit.cs +++ b/NPCs/NormalNPCs/PhantomSpirit.cs @@ -1,7 +1,6 @@ using CalamityMod.Dusts; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; diff --git a/NPCs/NormalNPCs/PhantomSpiritL.cs b/NPCs/NormalNPCs/PhantomSpiritL.cs index 2f7849b747..c666e97af9 100644 --- a/NPCs/NormalNPCs/PhantomSpiritL.cs +++ b/NPCs/NormalNPCs/PhantomSpiritL.cs @@ -3,7 +3,6 @@ using CalamityMod.Dusts; using CalamityMod.Events; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.Projectiles.Boss; using CalamityMod.World; using Microsoft.Xna.Framework; diff --git a/NPCs/NormalNPCs/PhantomSpiritM.cs b/NPCs/NormalNPCs/PhantomSpiritM.cs index 5d35236eba..6beacd3fc0 100644 --- a/NPCs/NormalNPCs/PhantomSpiritM.cs +++ b/NPCs/NormalNPCs/PhantomSpiritM.cs @@ -1,7 +1,6 @@ using CalamityMod.Dusts; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; diff --git a/NPCs/NormalNPCs/PhantomSpiritS.cs b/NPCs/NormalNPCs/PhantomSpiritS.cs index 9608b72321..41b8e24088 100644 --- a/NPCs/NormalNPCs/PhantomSpiritS.cs +++ b/NPCs/NormalNPCs/PhantomSpiritS.cs @@ -1,7 +1,6 @@ using CalamityMod.Dusts; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; diff --git a/NPCs/NormalNPCs/Rimehound.cs b/NPCs/NormalNPCs/Rimehound.cs index 4fb5748983..6c1e55ff38 100644 --- a/NPCs/NormalNPCs/Rimehound.cs +++ b/NPCs/NormalNPCs/Rimehound.cs @@ -1,7 +1,6 @@ using System.IO; using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.World; using Terraria; using Terraria.Audio; diff --git a/NPCs/NormalNPCs/WildBumblebirb.cs b/NPCs/NormalNPCs/WildBumblebirb.cs index 7ffe5fe3a8..360d470790 100644 --- a/NPCs/NormalNPCs/WildBumblebirb.cs +++ b/NPCs/NormalNPCs/WildBumblebirb.cs @@ -1,6 +1,5 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityBossAIs; using CalamityMod.Projectiles.Boss; using CalamityMod.Sounds; using CalamityMod.World; diff --git a/NPCs/Signus/CosmicLantern.cs b/NPCs/Signus/CosmicLantern.cs index dc5150c594..fbb89d335d 100644 --- a/NPCs/Signus/CosmicLantern.cs +++ b/NPCs/Signus/CosmicLantern.cs @@ -1,7 +1,7 @@ using System.IO; using CalamityMod.Buffs.DamageOverTime; using CalamityMod.Events; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.World; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; diff --git a/NPCs/SulphurousSea/Gnasher.cs b/NPCs/SulphurousSea/Gnasher.cs index 3a06c588b5..828b72422d 100644 --- a/NPCs/SulphurousSea/Gnasher.cs +++ b/NPCs/SulphurousSea/Gnasher.cs @@ -3,7 +3,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Weapons.Rogue; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using CalamityMod.World; using Microsoft.Xna.Framework; using Terraria; diff --git a/NPCs/SulphurousSea/Sulflounder.cs b/NPCs/SulphurousSea/Sulflounder.cs index fcf3f4e3d8..52d003d45a 100644 --- a/NPCs/SulphurousSea/Sulflounder.cs +++ b/NPCs/SulphurousSea/Sulflounder.cs @@ -2,7 +2,7 @@ using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Placeables.Banners; using CalamityMod.Items.Potions; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/SulphurousSea/Toxicatfish.cs b/NPCs/SulphurousSea/Toxicatfish.cs index 70e1136ec5..8e3d11ea47 100644 --- a/NPCs/SulphurousSea/Toxicatfish.cs +++ b/NPCs/SulphurousSea/Toxicatfish.cs @@ -2,7 +2,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Buffs.StatDebuffs; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using Terraria; using Terraria.GameContent.Bestiary; using Terraria.ID; diff --git a/NPCs/SunkenSea/AlphaSeaMinnow.cs b/NPCs/SunkenSea/AlphaSeaMinnow.cs index 6bc7d9c2be..58c72af262 100644 --- a/NPCs/SunkenSea/AlphaSeaMinnow.cs +++ b/NPCs/SunkenSea/AlphaSeaMinnow.cs @@ -8,7 +8,6 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Utilities; using Terraria.DataStructures; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.Enums; using System.Collections.Generic; using Steamworks; diff --git a/NPCs/SunkenSea/PodobooKoi.cs b/NPCs/SunkenSea/PodobooKoi.cs index a390f864b8..0b6dcdb2e2 100644 --- a/NPCs/SunkenSea/PodobooKoi.cs +++ b/NPCs/SunkenSea/PodobooKoi.cs @@ -8,7 +8,6 @@ using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.Utilities; using Terraria.DataStructures; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; using CalamityMod.Enums; using System.Collections.Generic; using Steamworks; diff --git a/NPCs/SunkenSea/SeaMinnow.cs b/NPCs/SunkenSea/SeaMinnow.cs index 7c841a74a1..d5e4c0c4ee 100644 --- a/NPCs/SunkenSea/SeaMinnow.cs +++ b/NPCs/SunkenSea/SeaMinnow.cs @@ -5,7 +5,7 @@ using CalamityMod.BiomeManagers; using CalamityMod.Enums; using CalamityMod.Items.Critters; using CalamityMod.Items.Placeables.Banners; -using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs; +using CalamityMod.NPCs.NormalNPCs; using Microsoft.Xna.Framework; using Terraria; using Terraria.DataStructures; From 14f9bf3edfbb888df85872f7b5f22824a64363e5 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Jun 2025 16:39:20 -0400 Subject: [PATCH 38/72] Fixed Ultimus Cleaver firing projectiles with Tainted enchantment Also refactored its code a bit --- Items/Weapons/Melee/UltimusCleaver.cs | 108 +++++++++----------------- 1 file changed, 37 insertions(+), 71 deletions(-) diff --git a/Items/Weapons/Melee/UltimusCleaver.cs b/Items/Weapons/Melee/UltimusCleaver.cs index f9128f195b..d910cee78b 100644 --- a/Items/Weapons/Melee/UltimusCleaver.cs +++ b/Items/Weapons/Melee/UltimusCleaver.cs @@ -36,51 +36,34 @@ namespace CalamityMod.Items.Weapons.Melee public override void OnHitNPC(Player player, NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(BuffID.OnFire3, 360); + SoundEngine.PlaySound(SoundID.Item14, target.Center); int onHitDamage = player.CalcIntDamage(Item.damage); Projectile blast = Projectile.NewProjectileDirect(Item.GetSource_FromThis(), target.Center, Vector2.Zero, ModContent.ProjectileType(), onHitDamage, 0f, player.whoAmI, target.whoAmI); blast.DamageType = Item.DamageType; - float firstDustScale = 1.7f; - float secondDustScale = 0.8f; - float thirdDustScale = 2f; - Vector2 dustRotation = (target.rotation - 1.57079637f).ToRotationVector2(); + + Vector2 dustRotation = (target.rotation - MathHelper.PiOver2).ToRotationVector2(); Vector2 dustVelocity = dustRotation * target.velocity.Length(); - SoundEngine.PlaySound(SoundID.Item14, target.Center); - int increment; - for (int i = 0; i < 40; i = increment + 1) + for (int i = 0; i < 40; i++) { - int swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 200, default, firstDustScale); - Dust dust = Main.dust[swingDust]; - dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; - dust.noGravity = true; - dust.velocity.Y -= 6f; - dust.velocity *= 3f; - dust.velocity += dustVelocity * Main.rand.NextFloat(); - swingDust = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 100, default, secondDustScale); - dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f; - dust.velocity.Y -= 6f; - dust.velocity *= 2f; - dust.noGravity = true; - dust.fadeIn = 1f; - dust.color = Color.Crimson * 0.5f; - dust.velocity += dustVelocity * Main.rand.NextFloat(); - increment = i; + Vector2 mainDustPos = target.Center + Main.rand.NextVector2Circular(target.width / 2, target.width / 2); + Dust swingDust = Dust.NewDustPerfect(mainDustPos, DustID.InfernoFork, dustVelocity * Main.rand.NextFloat() - Vector2.UnitY * 18f, 200, Scale: 1.7f); + swingDust.noGravity = true; + + Dust swingDust2 = Dust.NewDustPerfect(mainDustPos, DustID.InfernoFork, dustVelocity * Main.rand.NextFloat() - Vector2.UnitY * 12f, 100, Color.Crimson * 0.5f, 0.8f); + swingDust2.noGravity = true; + swingDust2.fadeIn = 1f; } - for (int j = 0; j < 20; j = increment + 1) + for (int j = 0; j < 20; j++) { - int swingDust2 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, DustID.InfernoFork, 0f, 0f, 0, default, thirdDustScale); - Dust dust = Main.dust[swingDust2]; - dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f; - dust.noGravity = true; - dust.velocity.Y -= 6f; - dust.velocity *= 0.5f; - dust.velocity += dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()); - increment = j; + Vector2 dustPos = target.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(target.velocity.ToRotation()) * (target.width / 3f); + Dust moreDust = Dust.NewDustPerfect(dustPos, DustID.InfernoFork, dustVelocity * (0.6f + 0.6f * Main.rand.NextFloat()) - Vector2.UnitY * 3f, Scale: 2f); + moreDust.noGravity = true; } } public override void MeleeEffects(Player player, Rectangle hitbox) { - if (player.whoAmI == Main.myPlayer) + if (player.whoAmI == Main.myPlayer && !player.Calamity().bladeArmEnchant) { if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1) || player.itemAnimation == (int)(player.itemAnimationMax * 0.3) || @@ -88,65 +71,48 @@ namespace CalamityMod.Items.Weapons.Melee player.itemAnimation == (int)(player.itemAnimationMax * 0.7) || player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - float sparkYVel = 0f; float sparkXVel = 0f; - float sparkYSpawn = 0f; + float sparkYVel = 0f; float sparkXSpawn = 0f; + float sparkYSpawn = 0f; + if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) { - sparkYVel = -7f; + sparkYVel = -10.5f; + if (player.direction == -1) + sparkXSpawn = -8f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) { - sparkYVel = -6f; - sparkXVel = 2f; + sparkYVel = -9f; + sparkXVel = 3f; + sparkXSpawn = player.direction == -1 ? 20f : 26f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.5)) { - sparkYVel = -4f; - sparkXVel = 4f; - } - if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) - { - sparkYVel = -2f; + sparkYVel = -6f; sparkXVel = 6f; } - if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) - { - sparkXVel = 7f; - } - if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) - { - sparkXSpawn = 26f; - } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.3)) { - sparkXSpawn -= 4f; - sparkYSpawn -= 20f; + sparkXVel = 9f; + sparkYVel = -3f; + sparkXSpawn = -4f; + sparkYSpawn = -20f; } if (player.itemAnimation == (int)(player.itemAnimationMax * 0.1)) { - sparkYSpawn += 6f; + sparkXVel = 10.5f; + sparkYSpawn = 6f; } - if (player.direction == -1) - { - if (player.itemAnimation == (int)(player.itemAnimationMax * 0.9)) - { - sparkXSpawn -= 8f; - } - if (player.itemAnimation == (int)(player.itemAnimationMax * 0.7)) - { - sparkXSpawn -= 6f; - } - } - sparkYVel *= 1.5f; - sparkXVel *= 1.5f; - sparkXSpawn *= (float)player.direction; + + sparkXVel *= player.direction; + sparkYVel *= player.gravDir; + sparkXSpawn *= player.direction; sparkYSpawn *= player.gravDir; var source = player.GetSource_ItemUse(Item); int damage = (int)player.GetTotalDamage().ApplyTo(Item.damage * 0.1f); - Projectile.NewProjectile(source, (float)(hitbox.X + hitbox.Width / 2) + sparkXSpawn, (float)(hitbox.Y + hitbox.Height / 2) + sparkYSpawn, - (float)player.direction * sparkXVel, sparkYVel * player.gravDir, ModContent.ProjectileType(), damage, 0f, player.whoAmI, 0f, 0f); + Projectile.NewProjectile(source, hitbox.X + hitbox.Width / 2 + sparkXSpawn, hitbox.Y + hitbox.Height / 2 + sparkYSpawn, sparkXVel, sparkYVel, ModContent.ProjectileType(), damage, 0f, player.whoAmI); } } } From 64590c8b3976417163ce5c100bb2a7da8dd0ed32 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Jun 2025 22:31:12 -0400 Subject: [PATCH 39/72] There goes CIT making boss tweaks again 1 - Death Mode Retinazer now only fires lasers when entering phase 2, and now fires single lasers around it as it spins instead of laser spreads directly at the player 2 - Foveanator now only fires energy bombs when entering phase 2 3 - Death Mode Detonating Bubbles now have health instead of being invincible, and they no longer have increased speed 4 - Decreased size of Death Mode Sharkrons 5 - Increased free Ravager head to match the health of the attached head --- ILEditing/ILChangesLoading.cs | 1 + ILEditing/VanillaStupidityFixingILChanges.cs | 38 ++++++++- NPCs/CalamityGlobalNPC.cs | 5 +- NPCs/NormalNPCs/Foveanator.cs | 77 ++++++++----------- NPCs/Ravager/RavagerHead2.cs | 4 +- .../Bosses/DukeFishronAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 16 +--- Projectiles/Boss/FoveanatorEnergyBomb.cs | 13 ---- Projectiles/CalamityGlobalProjectile.cs | 2 +- 9 files changed, 82 insertions(+), 76 deletions(-) diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index e8dd980253..f972954fa5 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -192,6 +192,7 @@ namespace CalamityMod.ILEditing // Removal of vanilla stupidity IL_Player.StatusFromNPC += RemoveExpertBrainRandomDebuffs; + IL_NPC.StrikeNPC_HitInfo_bool_bool += LetDetonatingBubblesTakeDamage; IL_Player.ItemCheck_EmitUseVisuals += MakeMagmaStoneFireGauntletDustToggleable; IL_Projectile.EmitEnchantmentVisualsAt += MakeMagmaStoneFireGauntletProjectileDustToggleable; IL_Sandstorm.HasSufficientWind += DecreaseSandstormWindSpeedRequirement; diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index 80c15173f8..d3f3c0cc40 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -9,6 +9,7 @@ using CalamityMod.NPCs.AcidRain; using CalamityMod.NPCs.NormalNPCs; using CalamityMod.NPCs.TownNPCs; using CalamityMod.Walls; +using CalamityMod.World; using Microsoft.Xna.Framework; using Mono.Cecil.Cil; using MonoMod.Cil; @@ -174,12 +175,47 @@ namespace CalamityMod.ILEditing } // Remove the Expert Mode check, and in its place put a check for the Zenith seed (Get fixed boi). - // Note from CIT: I originally removed these entirely; cursor.Emit(OpCodes.Pop); cursor.Emit(OpCodes.Ldsfld, typeof(Main).GetField("zenithWorld")); } #endregion + #region Disable Detonating Bubble StrikeNPC Hardcoded Override + private static void LetDetonatingBubblesTakeDamage(ILContext il) + { + // In vanilla's StrikeNPC function, Detonating Bubbles have a hardcoded type check which sets the damage of the strike to 0. + // This IL edit disables that type check in Death Mode. + var cursor = new ILCursor(il); + + // Go to the point after the check for the Detonating Bubble NPC ID. + if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR8(0.0))) + { + LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move after the NPC type check."); + return; + } + + // Define the label. + var label = il.DefineLabel(); + + // Add a branch if it is Death Mode. + cursor.Emit(OpCodes.Ldsfld, typeof(CalamityWorld).GetField("death")); + cursor.Emit(OpCodes.Brtrue, label); + + // Move to the point after Detonating Bubble changes are implemented to place the branch label. + if (!cursor.TryGotoNext(MoveType.After, i => i.MatchStfld("dontTakeDamage"))) + { + LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move to after the Detonating Bubble logic."); + return; + } + if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdarg0())) + { + LogFailure("Let Detonating Bubbles Take Damage in Death", "Could not move to after the Detonating Bubble logic."); + return; + } + cursor.MarkLabel(label); + } + #endregion + #region Make Meteorite Explodable private static void MakeMeteoriteExplodable(ILContext il) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 05ce02c117..5b2d25d5cf 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -2923,9 +2923,10 @@ namespace CalamityMod.NPCs npc.dontTakeDamage = true; break; - // Make Fishron and Anahita Bubbles immune to damage in Death Mode + // Make Fishron and Anahita Bubbles have actual health in Death Mode case NPCID.DetonatingBubble: - npc.dontTakeDamage = CalamityWorld.death; + if (CalamityWorld.death) + npc.lifeMax = 300; break; default: diff --git a/NPCs/NormalNPCs/Foveanator.cs b/NPCs/NormalNPCs/Foveanator.cs index 30d5b09bca..64f358dc1c 100644 --- a/NPCs/NormalNPCs/Foveanator.cs +++ b/NPCs/NormalNPCs/Foveanator.cs @@ -108,7 +108,6 @@ namespace CalamityMod.NPCs.NormalNPCs CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); bool bossRush = BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || bossRush; // Get a target if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) @@ -241,11 +240,8 @@ namespace CalamityMod.NPCs.NormalNPCs maxVelocity += 4.5f * enrageScale; acceleration += 0.06f * enrageScale; - if (death) - { - maxVelocity += phase1MaxSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - acceleration += phase1MaxAccelerationIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - } + maxVelocity += phase1MaxSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); + acceleration += phase1MaxAccelerationIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); if (Main.getGoodWorld) { @@ -278,7 +274,7 @@ namespace CalamityMod.NPCs.NormalNPCs // Foveanator stays in this phase longer than Retinazer (Foveanator time is 450, Retinazer time is 300) // Foveanator has longer cooldown between firing projectiles than Retinazer (Foveanator cooldown is 60, Retinazer cooldown is 30) - float phaseGateValue = 450f - (death ? phase1MaxLaserPhaseDurationDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f); + float phaseGateValue = 450f - (phase1MaxLaserPhaseDurationDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))); float laserGateValue = 60f; if (NPC.IsMechQueenUp) { @@ -297,7 +293,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.netUpdate = true; } - else if (distanceFromDestination < (death ? 960f : 800f)) + else if (distanceFromDestination < 960f) { if (!Main.player[NPC.target].dead) { @@ -344,8 +340,7 @@ namespace CalamityMod.NPCs.NormalNPCs float chargeSpeed = 4f; chargeSpeed += 1f * enrageScale; - if (death) - chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); + chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); if (Main.getGoodWorld) chargeSpeed += 1f; @@ -359,13 +354,13 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.damage = NPC.defDamage; NPC.ai[2] += 1f; - float decelerateGateValue = 72f + (death ? 12f * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f); + float decelerateGateValue = 72f + (12f * ((1f - lifeRatio) / (1f - phase2LifeRatio))); if (NPC.ai[2] >= decelerateGateValue) { // Avoid cheap bullshit NPC.damage = 0; - float decelerationMultiplier = 0.8f - (death ? 0.2f * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f); + float decelerationMultiplier = 0.8f - (0.2f * ((1f - lifeRatio) / (1f - phase2LifeRatio))); NPC.velocity *= decelerationMultiplier; if (Math.Abs(NPC.velocity.X) < 0.1) @@ -378,8 +373,7 @@ namespace CalamityMod.NPCs.NormalNPCs // Accelerative charge float maxVelocity = 24f; maxVelocity += 6f * enrageScale; - if (death) - maxVelocity += (phase1MaxChargeSpeedIncrease * 6f) * ((1f - lifeRatio) / (1f - phase2LifeRatio)); + maxVelocity += (phase1MaxChargeSpeedIncrease * 6f) * ((1f - lifeRatio) / (1f - phase2LifeRatio)); if (Main.getGoodWorld) maxVelocity += 6f; @@ -396,7 +390,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.rotation = NPC.velocity.ToRotation() - MathHelper.PiOver2; } - float delayBeforeChargingAgain = 96f - (death ? 6f * ((1f - lifeRatio) / (1f - phase2LifeRatio)) : 0f); + float delayBeforeChargingAgain = 96f - (6f * ((1f - lifeRatio) / (1f - phase2LifeRatio))); if (NPC.ai[2] >= delayBeforeChargingAgain) { NPC.ai[3] += 1f; @@ -404,7 +398,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.rotation = hoverRotation; - float totalCharges = death ? 3f : 2f; + float totalCharges = 3f; if (NPC.ai[3] >= totalCharges) { NPC.ai[1] = 0f; @@ -457,14 +451,12 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.ai[1] += 1f; if (NPC.ai[2] >= 0.2f) { - if (NPC.ai[1] % 10f == 0f) + if (NPC.ai[1] % 20f == 0f) { SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { - bool shootLaser = NPC.ai[1] % 20f == 0f; - - int type = shootLaser ? ModContent.ProjectileType() : ModContent.ProjectileType(); + int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes @@ -478,16 +470,14 @@ namespace CalamityMod.NPCs.NormalNPCs damage = (int)(damage * secondMechMultiplier); } - float projectileSpeed = shootLaser ? (6f + 1.5f * enrageScale) : 16f; - float ai0 = shootLaser ? 0f : (death ? 1f : 0f); + float projectileSpeed = 16f; Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * projectileSpeed; - int numProj = shootLaser ? 4 : 2; - int spread = shootLaser ? 15 : 30; + int spread = 30; float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < numProj; i++) + for (int i = 0; i < 2; i++) { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer, ai0); + Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i)); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f); } } } @@ -560,8 +550,8 @@ namespace CalamityMod.NPCs.NormalNPCs // Avoid cheap bullshit NPC.damage = 0; - float maxVelocity = 4f + (death ? 1.2f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); - float acceleration = 0.06f + (death ? 0.02f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float maxVelocity = 4f + (1.2f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); + float acceleration = 0.06f + (0.02f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); maxVelocity += 2f * enrageScale; acceleration += 0.04f * enrageScale; @@ -587,7 +577,7 @@ namespace CalamityMod.NPCs.NormalNPCs // Fire flamethrower for x seconds NPC.ai[2] += (retAlive && spazAlive) ? 1f : 2f; - float phaseGateValue = NPC.IsMechQueenUp ? 1350f : 360f - (death ? 90f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float phaseGateValue = NPC.IsMechQueenUp ? 1350f : 360f - (90f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); if (NPC.ai[2] >= phaseGateValue) { // Go to charge phase or fire large barrage of lasers and energy bombs if in final phase @@ -673,7 +663,7 @@ namespace CalamityMod.NPCs.NormalNPCs // Set rotation and velocity NPC.rotation = hoverRotation; - float chargeSpeed = 4.5f + (death ? 1.25f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float chargeSpeed = 4.5f + (1.25f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); chargeSpeed += 4f * enrageScale; if (Main.getGoodWorld) chargeSpeed *= 1.2f; @@ -691,7 +681,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.ai[2] += 1f; - float chargeTime = 60f - (death ? 20f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float chargeTime = 60f - (20f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); // Slow down if (NPC.ai[2] >= chargeTime) @@ -699,7 +689,7 @@ namespace CalamityMod.NPCs.NormalNPCs // Avoid cheap bullshit NPC.damage = 0; - float deceleration = 0.8f - (death ? 0.15f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float deceleration = 0.8f - (0.15f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); NPC.velocity *= deceleration; if (Math.Abs(NPC.velocity.X) < 0.1) @@ -712,8 +702,7 @@ namespace CalamityMod.NPCs.NormalNPCs // Accelerative charge float maxVelocity = 27f; maxVelocity += 6f * enrageScale; - if (death) - maxVelocity += 7.5f * ((1f - lifeRatio) / (1f - phase2LifeRatio)); + maxVelocity += 7.5f * ((1f - lifeRatio) / (1f - phase2LifeRatio)); if (Main.getGoodWorld) maxVelocity *= 1.2f; @@ -738,7 +727,7 @@ namespace CalamityMod.NPCs.NormalNPCs damage = (int)(damage * secondMechMultiplier); } - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.velocity.SafeNormalize(Vector2.UnitY) * 60f, Vector2.Zero, type, damage, 0f, Main.myPlayer, death ? 2f : 1f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.velocity.SafeNormalize(Vector2.UnitY) * 60f, Vector2.Zero, type, damage, 0f, Main.myPlayer, 1f); } } @@ -777,8 +766,8 @@ namespace CalamityMod.NPCs.NormalNPCs // Laser and energy bomb barrage else if (NPC.ai[1] == 3f) { - float maxVelocity = 12f + (death ? 2.4f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); - float acceleration = 0.16f + (death ? 0.32f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio) : 0f); + float maxVelocity = 12f + (2.4f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); + float acceleration = 0.16f + (0.32f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); maxVelocity += 6f * enrageScale; acceleration += 0.08f * enrageScale; @@ -802,8 +791,8 @@ namespace CalamityMod.NPCs.NormalNPCs { NPC.SimpleFlyMovement(idealVelocity * maxVelocity * 0.5f, acceleration * 0.5f); - // Fire 2 spreads (3 in Death Mode) of energy bombs and lasers - int totalSpreads = death ? 6 : 4; + // Fire 3 spreads of energy bombs and lasers + int totalSpreads = 6; // Fire rates float laserBarrageFireRate = 45f; @@ -838,7 +827,7 @@ namespace CalamityMod.NPCs.NormalNPCs for (int i = 0; i < numProj; i++) { Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer, death ? 1f : 0f); + Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f); } } @@ -940,16 +929,16 @@ namespace CalamityMod.NPCs.NormalNPCs for (int i = 0; i < 10; i++) { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 31, 0f, 0f, 100, default, 1.5f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f); Main.dust[dust].velocity *= 1.4f; } for (int i = 0; i < 5; i++) { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, 0f, 0f, 100, default, 2.5f); + int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2.5f); Main.dust[dust].noGravity = true; Main.dust[dust].velocity *= 5f; - dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, 6, 0f, 0f, 100, default, 1.5f); + dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 1.5f); Main.dust[dust].velocity *= 3f; } diff --git a/NPCs/Ravager/RavagerHead2.cs b/NPCs/Ravager/RavagerHead2.cs index 0fa43d2d62..b2aaf4dd89 100644 --- a/NPCs/Ravager/RavagerHead2.cs +++ b/NPCs/Ravager/RavagerHead2.cs @@ -28,7 +28,7 @@ namespace CalamityMod.NPCs.Ravager NPC.height = 80; NPC.defense = 40; NPC.DR_NERD(0.15f); - NPC.lifeMax = 10000; + NPC.lifeMax = 20000; NPC.knockBackResist = 0f; AIType = -1; NPC.netAlways = true; @@ -39,7 +39,7 @@ namespace CalamityMod.NPCs.Ravager if (DownedBossSystem.downedProvidence && !BossRushEvent.BossRushActive) { NPC.defense *= 2; - NPC.lifeMax *= 4; + NPC.lifeMax *= 3; } if (BossRushEvent.BossRushActive) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs index 05ba82522b..db6cf34ce5 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DukeFishronAI.cs @@ -1147,7 +1147,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses Vector2 velocityVector = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY); float inertia = 30f; - float velocity = 23f; + float velocity = 20f; npc.velocity = (npc.velocity * inertia + velocityVector * velocity) / (inertia + 1f); npc.scale = npc.ai[3]; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index aedd0dc065..d7d83bb2d8 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -347,8 +347,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses SoundEngine.PlaySound(SoundID.Item33, npc.Center); if (Main.netMode != NetmodeID.MultiplayerClient) { - bool shootLaser = npc.ai[1] % 20f == 0f; - int type = shootLaser ? ProjectileID.DeathLaser : ModContent.ProjectileType(); + int type = ProjectileID.DeathLaser; int damage = npc.GetProjectileDamage(type); // Reduce mech boss projectile damage depending on the new ore progression changes @@ -362,16 +361,9 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses damage = (int)(damage * secondMechMultiplier); } - Vector2 projectileVelocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * 7f; - int numProj = shootLaser ? 6 : 2; - int spread = shootLaser ? 20 : 80; - float rotation = MathHelper.ToRadians(spread); - float offset = shootLaser ? 90f : 50f; - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * offset, perturbedSpeed, type, damage, 0f, Main.myPlayer); - } + Vector2 projectileVelocity = npc.rotation.ToRotationVector2() * 7f; + float offset = 90f; + Projectile.NewProjectile(npc.GetSource_FromAI(), npc.Center + Vector2.Normalize(projectileVelocity) * offset, projectileVelocity, type, damage, 0f, Main.myPlayer); } } } diff --git a/Projectiles/Boss/FoveanatorEnergyBomb.cs b/Projectiles/Boss/FoveanatorEnergyBomb.cs index 246e80bfb4..9928e7ce90 100644 --- a/Projectiles/Boss/FoveanatorEnergyBomb.cs +++ b/Projectiles/Boss/FoveanatorEnergyBomb.cs @@ -106,19 +106,6 @@ namespace CalamityMod.Projectiles.Boss int damage = (int)Math.Round(Projectile.damage * 0.85); Vector2 laserVelocity = (Main.player[target].Center - Projectile.Center).SafeNormalize(Vector2.UnitY) * laserSpeed; Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + laserVelocity.SafeNormalize(Vector2.UnitY) * 16f, laserVelocity, type, damage, 0f, Main.myPlayer); - - if (Projectile.ai[0] == 2f) - { - Vector2 projectileVelocity = (Main.player[target].Center - Projectile.Center).SafeNormalize(Vector2.UnitY) * laserSpeed * 0.75f; - int numProj = 2; - int spread = 30; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 16f, perturbedSpeed, type, damage, 0f, Main.myPlayer); - } - } } } diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index da046e41d1..be27bca4f6 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -1212,7 +1212,7 @@ namespace CalamityMod.Projectiles { int sharkron = NPC.NewNPC(projectile.GetSource_FromAI(), (int)center.X, (int)center.Y, NPCID.Sharkron2); Main.npc[sharkron].velocity = projectile.velocity; - Main.npc[sharkron].scale = death ? 2f : 1.5f; + Main.npc[sharkron].scale = 1.5f; Main.npc[sharkron].netUpdate = true; Main.npc[sharkron].ai[2] = projectile.width; Main.npc[sharkron].ai[3] = -1.5f; From f8057a682c4208cf41e27f155a8e6b1ce5c3cd5a Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 6 Jun 2025 23:44:12 -0400 Subject: [PATCH 40/72] Rock Pillars can deal contact damage again --- NPCs/Ravager/RockPillar.cs | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/NPCs/Ravager/RockPillar.cs b/NPCs/Ravager/RockPillar.cs index ff8adfd193..08344e4ead 100644 --- a/NPCs/Ravager/RockPillar.cs +++ b/NPCs/Ravager/RockPillar.cs @@ -57,18 +57,25 @@ namespace CalamityMod.NPCs.Ravager if (NPC.alpha > 0) { + // Avoid cheap bullshit + NPC.damage = 0; + NPC.alpha -= 10; if (NPC.alpha < 0) NPC.alpha = 0; } + else + { + if (DownedBossSystem.downedProvidence && !BossRushEvent.BossRushActive) + NPC.damage = (int)(NPC.defDamage * 1.5); + else + NPC.damage = NPC.defDamage; + } if (NPC.ai[0] == 0f) { if (NPC.velocity.Y == 0f) { - // Avoid cheap bullshit - NPC.damage = 0; - if (NPC.ai[1] == -1f) { SoundEngine.PlaySound(SoundID.Item62, NPC.Center); @@ -92,12 +99,6 @@ namespace CalamityMod.NPCs.Ravager Main.dust[rockDust2].velocity *= 2f; } - // Set damage - if (DownedBossSystem.downedProvidence && !BossRushEvent.BossRushActive) - NPC.damage = (int)Math.Round(NPC.defDamage * 1.5); - else - NPC.damage = NPC.defDamage; - NPC.noTileCollide = true; NPC.velocity.X = (BossRushEvent.BossRushActive ? 15 : 12) * NPC.direction; NPC.velocity.Y = -28.5f; @@ -108,12 +109,6 @@ namespace CalamityMod.NPCs.Ravager } else { - // Set damage - if (DownedBossSystem.downedProvidence && !BossRushEvent.BossRushActive) - NPC.damage = (int)Math.Round(NPC.defDamage * 1.5); - else - NPC.damage = NPC.defDamage; - if (NPC.velocity.Y == 0f || Vector2.Distance(NPC.Center, Main.npc[CalamityGlobalNPC.scavenger].Center) > 2800f) { SoundEngine.PlaySound(SoundID.Item14, NPC.Center); From eab25543090c7c0ae99fef0910da20ba5924031f Mon Sep 17 00:00:00 2001 From: Xyk Date: Fri, 6 Jun 2025 23:25:19 -0700 Subject: [PATCH 41/72] Disgusting Meat new sprite? Funny story, I coded my own version of degusting meat that was about 70% done before deltarune came out, and had it sitting on my computer, only to find that shark did it first when I got back! Anyways I like my sprite edit more :) --- Items/DisgustingMeat.png | Bin 434 -> 3147 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Items/DisgustingMeat.png b/Items/DisgustingMeat.png index 32e4aad4d2f8cb1940efd06e396ca278c4c7c196..6d743191e2a1ae931ecad48a2f4fcebc90db80c3 100644 GIT binary patch delta 3123 zcmV-349xSg1IrkYB!2{FK}|sb0I`n?{9y$E017v0Lqkw=Qb$4{Nkv08F*!CiEix`K z002mdotAf0Q`r`W&%HOjP?8Xel+bHvQUXW~y-1NRDlrKVO2Ci+A~r-+a70m&rU)`9 z;DDn;k+C9*g#l5q>jW7@)NybW8eS9UZc9vd* zf9@GXANa%eSALld0I;TIwb}ZIZD|z%UF!i*yZwjFU@riQvc7c=eQ_STd|pz-;w)z? ztK8gNO97v2DKF^n`kxMeLtlK)Qoh~qM8wF>;&Ay4=AVc7 z9|!(*9)A`Q{3O1JFO)?@%ce{qOqR7<$Ps@_@A2i55xYX*}0a9+V~OBmRJI% zAsRq_9snpR5g-YBWGm3`eGA4%1NqI1(V3W?`_F>@eOI_l{>T<2e~x2EL^8M%QO@j| z{8|DuAOJ-`1L{B<=mQhL1h&8txBw5}0|G%Ph<^leU@_o=6p#T#AQu#XwV)W3f~{aD zs0MYQ5j2A~a2RxfW8gG62QGojU!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh?=qPj=x&RGBx1dpI68aT-2O}^EromdU z5r1q2vtUm+2#$mo!O8G4I3F&8x4@Nf1AGwfgiphl;1O5~KY^zafDjQnqKhyQ7Q#kC zk$5Bt5h1IP5~KoYK-!QVq#wD8NRg+=TNDOGMKMrJlncrq6@}uWmZ4UmHlwOh2T+}; zKGapzC~6Az5lu#GqRr9H=m2yqIvJgdE`LT>pqtPg=(Fe%^f>wz27{qvj4_TFe@q-E z6|(}f8M7PHjyZ)H#*AU6u~@7+)*S1K4aIV>Vr((C3VRTH5_<(Zj(vk8;&gDfIA2^m zPKYbSRp451CvaDA6Sx_?65bH+j1R^0@XPUK_(psWeh5E~pCKp{j0vuUNJ1)MEq|es z&_*~*xJ!6JBog(APQ-AcfVhTON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j(=WcUF^E#aH(^^exTzA`yV<69R@px9EZ9uJ6-M>o;Q5riu;w*SG}*EyB2Wm(#ZUg z;pqt>?FMZqM9Va~FNLH%A*>}Hq z{4y{VJ2n1X^!(GWn_sBE*#FY*W$$#@^!-;EuV!ACyitF1;4SNI|GSuX6EnH*vF|HC zn11N_81(V(r;JaZegpS}^ZUoqJ9q#903c&XQcVB=dL{q>fP?@5`Tzg`fam}KbrCQC z0P0`>06Lfe02gqax=}olJ{Nxg8+1ijbW?9;ba!ELWdK8EY;$>YAX9X8WNB|8RBvx= z!KdMT00043Nkln!|s zSBsL~i+WCAd}Tfc$md4@xNW=xP(Oc36zLrS3tk+}0&w|MYblam0Rfex&7AXGV2Rii ziYKH~KwtsqCKmv>xxZ=&*7)&3!x>MHfZb%)iC*b#ZJq<*vnu-S}%F|J5*D zJ)ZRdo==(pjFu(=$WE0Zf1FLf+K2sc3fL*%-#rDOzO@X_l%Mak09b4+fiv|YynCRZxz1ds z8|7_qis-DZu_c@W)rmK=xXgvW1?=-KD#x2d?dxXys=4s5fSr2XUuZJ7`#&`o$rrHS zZV!hC5b-|GtyI7%@ZD+ehd%{mt~*_%GvfesU)tc@^~0XMNWOr6d{!cEbKy?`VM~a( jrrzRj0ZZKGBJl#Rmj0M3D?%$700000NkvXXu0mjflGL`D From c4ef63b1d35c3aec0ef6c1cf4bb34e19cd07c8fb Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 7 Jun 2025 00:30:39 -0700 Subject: [PATCH 42/72] account for CalamityAI deprecation --- NPCs/AquaticScourge/AquaticScourgeBody.cs | 4 ++-- NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 4 ++-- NPCs/AquaticScourge/AquaticScourgeHead.cs | 4 ++-- NPCs/AquaticScourge/AquaticScourgeTail.cs | 4 ++-- NPCs/AstrumAureus/AstrumAureus.cs | 6 +++--- NPCs/AstrumDeus/AstrumDeusBody.cs | 2 +- NPCs/AstrumDeus/AstrumDeusHead.cs | 6 +++--- NPCs/AstrumDeus/AstrumDeusTail.cs | 2 +- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 12 ++++++------ NPCs/Bumblebirb/DraconicSwarmer.cs | 8 ++++---- NPCs/Bumblebirb/Dragonfolly.cs | 8 ++++---- NPCs/CalClone/CalamitasClone.cs | 4 ++-- NPCs/CalClone/Cataclysm.cs | 4 ++-- NPCs/CalClone/Catastrophe.cs | 4 ++-- NPCs/CeaselessVoid/CeaselessVoid.cs | 12 ++++++------ NPCs/Crabulon/Crabulon.cs | 2 +- NPCs/NormalNPCs/Foveanator.cs | 2 +- NPCs/NormalNPCs/WildBumblebirb.cs | 8 ++++---- NPCs/OldDuke/OldDuke.cs | 18 +++++++++--------- 19 files changed, 57 insertions(+), 57 deletions(-) diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index 39b1151c66..b7f421f08c 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -103,7 +103,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -282,7 +282,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) scourgeMaxSpeed *= 1.15f; } diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index e08fe0ecea..39a070170d 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -102,7 +102,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) scourgeMaxSpeed *= 1.15f; } diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 5d0426a607..37f7762972 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -144,7 +144,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -449,7 +449,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeAcceleration *= accelerationMultiplier; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { scourgeMaxSpeed *= 1.15f; scourgeAcceleration *= 1.15f; diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 96c890b5b0..2b49366863 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -100,7 +100,7 @@ namespace CalamityMod.NPCs.AquaticScourge // Adjust hostility and stats bool nonHostile = calamityGlobalNPC.newAI[0] == 0f; - if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || Main.getGoodWorld) + if (NPC.justHit || NPC.life <= NPC.lifeMax * 0.999 || bossRush || CalamityWorld.LegendaryMode) { if (nonHostile) { @@ -249,7 +249,7 @@ namespace CalamityMod.NPCs.AquaticScourge scourgeMaxSpeed += Vector2.Distance(player.Center, NPC.Center) * 0.001f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) scourgeMaxSpeed *= 1.15f; } diff --git a/NPCs/AstrumAureus/AstrumAureus.cs b/NPCs/AstrumAureus/AstrumAureus.cs index fe3a35f073..1dff906636 100644 --- a/NPCs/AstrumAureus/AstrumAureus.cs +++ b/NPCs/AstrumAureus/AstrumAureus.cs @@ -217,7 +217,7 @@ namespace CalamityMod.NPCs.AstrumAureus walkingVelocity += 1.5f * (1f - lifeRatio); if (revenge) walkingVelocity += Math.Abs(NPC.Center.X - player.Center.X) * 0.0025f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) walkingVelocity *= 1.15f; float walkingProjectileVelocity = walkingVelocity * 0.8f; @@ -653,7 +653,7 @@ namespace CalamityMod.NPCs.AstrumAureus velocity += 6f * enrageScale; if (expertMode) velocity += death ? 6f * (1f - lifeRatio) : 4f * (1f - lifeRatio); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) velocity *= 1.15f; NPC.velocity = (new Vector2(player.Center.X, player.Center.Y - 500f) - NPC.Center).SafeNormalize(Vector2.Zero) * velocity; @@ -1072,7 +1072,7 @@ namespace CalamityMod.NPCs.AstrumAureus if (calamityGlobalNPC.newAI[1] > 0f && !reduceFallSpeed) maxFallSpeed *= calamityGlobalNPC.newAI[1] + 1f; - if (Main.getGoodWorld && !reduceFallSpeed) + if (CalamityWorld.LegendaryMode && !reduceFallSpeed) { gravity *= 1.15f; maxFallSpeed *= 1.15f; diff --git a/NPCs/AstrumDeus/AstrumDeusBody.cs b/NPCs/AstrumDeus/AstrumDeusBody.cs index 1870a9c39c..06ee233b40 100644 --- a/NPCs/AstrumDeus/AstrumDeusBody.cs +++ b/NPCs/AstrumDeus/AstrumDeusBody.cs @@ -174,7 +174,7 @@ namespace CalamityMod.NPCs.AstrumDeus calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) diff --git a/NPCs/AstrumDeus/AstrumDeusHead.cs b/NPCs/AstrumDeus/AstrumDeusHead.cs index 4d78a2c84f..7c6cdb8e61 100644 --- a/NPCs/AstrumDeus/AstrumDeusHead.cs +++ b/NPCs/AstrumDeus/AstrumDeusHead.cs @@ -212,7 +212,7 @@ namespace CalamityMod.NPCs.AstrumDeus calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) @@ -343,7 +343,7 @@ namespace CalamityMod.NPCs.AstrumDeus int startIndexHeadTwo = startIndexHeadOne + phase2Length + 1; int headTwoID = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPC.type, startIndexHeadTwo); Main.npc[headTwoID].Calamity().newAI[0] = 2f; - Main.npc[headTwoID].Calamity().newAI[3] = Main.getGoodWorld ? 300f : 600f; + Main.npc[headTwoID].Calamity().newAI[3] = CalamityWorld.LegendaryMode ? 300f : 600f; Main.npc[headTwoID].velocity = Vector2.Normalize(player.Center - Main.npc[headTwoID].Center) * 16f; Main.npc[headTwoID].timeLeft *= 20; Main.npc[headTwoID].ForceNetUpdate(); @@ -580,7 +580,7 @@ namespace CalamityMod.NPCs.AstrumDeus speed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; turnSpeed *= increaseSpeedMore ? 2f : increaseSpeed ? 1.5f : 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { speed *= 1.15f; turnSpeed *= 1.15f; diff --git a/NPCs/AstrumDeus/AstrumDeusTail.cs b/NPCs/AstrumDeus/AstrumDeusTail.cs index 36acea7e26..bb252b80ae 100644 --- a/NPCs/AstrumDeus/AstrumDeusTail.cs +++ b/NPCs/AstrumDeus/AstrumDeusTail.cs @@ -157,7 +157,7 @@ namespace CalamityMod.NPCs.AstrumDeus calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = calamityGlobalNPC.newAI[1] < resistanceTime; // Flight timer - float aiSwitchTimer = doubleWormPhase ? (Main.getGoodWorld ? 600f : 1200f) : (Main.getGoodWorld ? 900f : 1800f); + float aiSwitchTimer = doubleWormPhase ? (CalamityWorld.LegendaryMode ? 600f : 1200f) : (CalamityWorld.LegendaryMode ? 900f : 1800f); calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] >= aiSwitchTimer) diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 82f36a3842..4034b028a6 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.chaseable = true; NPC.ai[3] += 1f; NPC.alpha = 0; - if (NPC.ai[3] >= 2f || phase2 || Main.getGoodWorld) + if (NPC.ai[3] >= 2f || phase2 || CalamityWorld.LegendaryMode) { NPC.ai[0] = -1f; NPC.ai[1] = 0f; @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental projectileVelocity = (player.Center - NPC.Center).SafeNormalize(Vector2.UnitY) * velocity; int numProj = death ? 8 : 4; int spread = death ? 90 : 45; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { numProj *= 3; spread *= 2; @@ -582,7 +582,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental NPC.chaseable = false; NPC.localAI[0] += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) NPC.localAI[0] += 2f; if (expertMode) NPC.localAI[0] += 1f - lifeRatio; @@ -753,7 +753,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental int damage = NPC.GetProjectileDamage(type); Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity2, type, damage, 0f, Main.myPlayer, 0f, NPC.whoAmI); if (Main.zenithWorld) @@ -794,7 +794,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(NPC.GetSource_FromAI(), source, laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), source, -laserVelocity, ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 0f, NPC.whoAmI); if (Main.zenithWorld) @@ -816,7 +816,7 @@ namespace CalamityMod.NPCs.BrimstoneElemental if (Main.netMode != NetmodeID.MultiplayerClient) { Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, NPC.localAI[0], NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) Projectile.NewProjectile(NPC.GetSource_FromAI(), source.X, source.Y, -NPC.localAI[0], -NPC.localAI[1], ModContent.ProjectileType(), 0, 0f, Main.myPlayer, 1f, NPC.whoAmI); if (Main.zenithWorld) diff --git a/NPCs/Bumblebirb/DraconicSwarmer.cs b/NPCs/Bumblebirb/DraconicSwarmer.cs index 803380b88f..f486b0a453 100644 --- a/NPCs/Bumblebirb/DraconicSwarmer.cs +++ b/NPCs/Bumblebirb/DraconicSwarmer.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.Bumblebirb swarmerIdleTargetDist.Normalize(); swarmerIdleTargetDist *= swarmerIdleSpeed; NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; } else if (NPC.velocity.Length() > 2f) @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Bumblebirb swarmerChargeTargetDist.Normalize(); swarmerChargeTargetDist *= swarmerChargeSpeed; NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; NPC.ForceNetUpdate(); @@ -203,7 +203,7 @@ namespace CalamityMod.NPCs.Bumblebirb swarmerDecelerateTargetDist.Normalize(); swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) @@ -220,7 +220,7 @@ namespace CalamityMod.NPCs.Bumblebirb NPC.damage = NPC.defDamage; NPC.velocity = swarmerDecelerateTargetDist; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs index 268fadb66a..e7953a25ee 100644 --- a/NPCs/Bumblebirb/Dragonfolly.cs +++ b/NPCs/Bumblebirb/Dragonfolly.cs @@ -175,7 +175,7 @@ namespace CalamityMod.NPCs.Bumblebirb if (NPC.localAI[2] > 0f || bossRush) enrageScale += 1f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) enrageScale += 0.5f; if (enrageScale > 3f) @@ -469,7 +469,7 @@ namespace CalamityMod.NPCs.Bumblebirb bool spawnRight = player.velocity.X > 0f; for (int i = 0; i < totalProjectiles; i++) { - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { if (i >= (int)(totalProjectiles * 0.125) && i <= (int)(totalProjectiles * 0.375)) { @@ -536,13 +536,13 @@ namespace CalamityMod.NPCs.Bumblebirb { int totalProjectiles = phase2 ? 40 : 48; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) totalProjectiles *= 2; float radians = MathHelper.TwoPi / totalProjectiles; int distance = phase2 ? 1200 : 1320; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) distance *= 2; bool spawnRight = player.velocity.X > 0f; diff --git a/NPCs/CalClone/CalamitasClone.cs b/NPCs/CalClone/CalamitasClone.cs index e4571acd7a..8804fae061 100644 --- a/NPCs/CalClone/CalamitasClone.cs +++ b/NPCs/CalClone/CalamitasClone.cs @@ -398,7 +398,7 @@ namespace CalamityMod.NPCs.CalClone baseVelocity += 1.5f * (1f - lifeRatio); baseAcceleration += 0.03f * (1f - lifeRatio); } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { baseVelocity *= 1.15f; baseAcceleration *= 1.15f; @@ -466,7 +466,7 @@ namespace CalamityMod.NPCs.CalClone if (Main.zenithWorld) type = ModContent.ProjectileType(); - float gigaBlastFrequency = (Main.getGoodWorld ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; + float gigaBlastFrequency = (CalamityWorld.LegendaryMode ? 120f : expertMode ? 180f : 240f) - enrageScale * 15f; float projSpeed = bossRush ? 6.25f : 5f; if (calamityGlobalNPC.newAI[3] <= 300f) { diff --git a/NPCs/CalClone/Cataclysm.cs b/NPCs/CalClone/Cataclysm.cs index a5cc956364..0645bfce1f 100644 --- a/NPCs/CalClone/Cataclysm.cs +++ b/NPCs/CalClone/Cataclysm.cs @@ -233,7 +233,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroProjAttackMaxSpeed += 2f * enrageScale; calCloneBroProjAttackAccel += 0.06f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { calCloneBroProjAttackMaxSpeed *= 1.15f; calCloneBroProjAttackAccel *= 1.15f; @@ -360,7 +360,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroChargeSpeed += 2f; if (revenge) calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) calCloneBroChargeSpeed *= 1.25f; Vector2 calCloneBroChargeCenter = NPC.Center; diff --git a/NPCs/CalClone/Catastrophe.cs b/NPCs/CalClone/Catastrophe.cs index 73e07ab8e3..09bd00a219 100644 --- a/NPCs/CalClone/Catastrophe.cs +++ b/NPCs/CalClone/Catastrophe.cs @@ -227,7 +227,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroProjAttackMaxSpeed += 2f * enrageScale; calCloneBroProjAttackAccel += 0.1f * enrageScale; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { calCloneBroProjAttackMaxSpeed *= 1.15f; calCloneBroProjAttackAccel *= 1.15f; @@ -351,7 +351,7 @@ namespace CalamityMod.NPCs.CalClone calCloneBroChargeSpeed += 2f; if (revenge) calCloneBroChargeSpeed += 2f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) calCloneBroChargeSpeed *= 1.25f; Vector2 calCloneBroChargeCenter = new Vector2(NPC.position.X + NPC.width * 0.5f, NPC.position.Y + NPC.height * 0.5f); diff --git a/NPCs/CeaselessVoid/CeaselessVoid.cs b/NPCs/CeaselessVoid/CeaselessVoid.cs index cc077b9f94..fafff6489f 100644 --- a/NPCs/CeaselessVoid/CeaselessVoid.cs +++ b/NPCs/CeaselessVoid/CeaselessVoid.cs @@ -154,7 +154,7 @@ namespace CalamityMod.NPCs.CeaselessVoid if (phase4) darkEnergyAmt += 1; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) darkEnergyAmt *= 2; // Spawn a few Dark Energies as soon as the fight starts @@ -222,7 +222,7 @@ namespace CalamityMod.NPCs.CeaselessVoid float projectileFireRateMultiplier = MathHelper.Lerp(0.5f, 1.5f, 1f - ((tileEnrageMult - 1f) / 0.5f)); // Decides whether Ceaseless moves closer to its target or not - float distanceRequiredToMove = (Main.getGoodWorld || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f; + float distanceRequiredToMove = (CalamityWorld.LegendaryMode || !anyDarkEnergies) ? 320f : bossRush ? 600f : 720f; bool move = Vector2.Distance(NPC.Center, player.Center) > distanceRequiredToMove || !Collision.CanHit(NPC.Center, 1, 1, player.Center, 1, 1); // Succ attack @@ -540,7 +540,7 @@ namespace CalamityMod.NPCs.CeaselessVoid acceleration *= 2f; } - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocity *= 1.15f; acceleration *= 1.15f; @@ -550,8 +550,8 @@ namespace CalamityMod.NPCs.CeaselessVoid // Move between 8 different positions around the player, in order float maxDistance = 320f; - Vector2 moveToOffset = succ ? Vector2.Zero : Main.getGoodWorld ? new Vector2(0f, -maxDistance) : Vector2.Zero; - if (!succ && Main.getGoodWorld) + Vector2 moveToOffset = succ ? Vector2.Zero : CalamityWorld.LegendaryMode ? new Vector2(0f, -maxDistance) : Vector2.Zero; + if (!succ && CalamityWorld.LegendaryMode) { // Move to a new location every few seconds calamityGlobalNPC.newAI[2] += 1f; @@ -603,7 +603,7 @@ namespace CalamityMod.NPCs.CeaselessVoid Vector2 distanceFromDestination = destination - NPC.Center; // Movement - if (NPC.Distance(destination) > maxDistance || succ || !Main.getGoodWorld) + if (NPC.Distance(destination) > maxDistance || succ || !CalamityWorld.LegendaryMode) CalamityUtils.SmoothMovement(NPC, 0f, distanceFromDestination, velocity, acceleration, true); } diff --git a/NPCs/Crabulon/Crabulon.cs b/NPCs/Crabulon/Crabulon.cs index d7b8c63f86..4e6a2a0bc7 100644 --- a/NPCs/Crabulon/Crabulon.cs +++ b/NPCs/Crabulon/Crabulon.cs @@ -982,7 +982,7 @@ namespace CalamityMod.NPCs.Crabulon { if (Main.netMode != NetmodeID.MultiplayerClient) { - int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.01 : CalamityWorld.LegendaryMode ? 0.02 : 0.05)); + int crabShroomSpawnFreq = (int)(NPC.lifeMax * (CalamityWorld.LegendaryMode ? 0.02 : 0.05)); if ((NPC.life + crabShroomSpawnFreq) < NPC.localAI[0]) { NPC.localAI[0] = NPC.life; diff --git a/NPCs/NormalNPCs/Foveanator.cs b/NPCs/NormalNPCs/Foveanator.cs index ea49eba333..963e8d7f0f 100644 --- a/NPCs/NormalNPCs/Foveanator.cs +++ b/NPCs/NormalNPCs/Foveanator.cs @@ -342,7 +342,7 @@ namespace CalamityMod.NPCs.NormalNPCs chargeSpeed += 1f * enrageScale; if (CalamityWorld.LegendaryMode) chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) chargeSpeed += 1f; NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; diff --git a/NPCs/NormalNPCs/WildBumblebirb.cs b/NPCs/NormalNPCs/WildBumblebirb.cs index 360d470790..7bd9d5b4b3 100644 --- a/NPCs/NormalNPCs/WildBumblebirb.cs +++ b/NPCs/NormalNPCs/WildBumblebirb.cs @@ -158,7 +158,7 @@ namespace CalamityMod.NPCs.NormalNPCs swarmerIdleTargetDist.Normalize(); swarmerIdleTargetDist *= swarmerIdleSpeed; NPC.velocity = (NPC.velocity * 29f + swarmerIdleTargetDist) / 30f; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; } else if (NPC.velocity.Length() > 2f) @@ -206,7 +206,7 @@ namespace CalamityMod.NPCs.NormalNPCs swarmerChargeTargetDist.Normalize(); swarmerChargeTargetDist *= swarmerChargeSpeed; NPC.velocity = (NPC.velocity * (swarmerChargeVelMult - 1f) + swarmerChargeTargetDist) / swarmerChargeVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; NPC.ForceNetUpdate(); @@ -234,7 +234,7 @@ namespace CalamityMod.NPCs.NormalNPCs swarmerDecelerateTargetDist.Normalize(); swarmerDecelerateTargetDist *= swarmerDecelerateSpeed; NPC.velocity = (NPC.velocity * (swarmerDecelerateVelMult - 1f) + swarmerDecelerateTargetDist) / swarmerDecelerateVelMult; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) @@ -251,7 +251,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.damage = NPC.defDamage; NPC.velocity = swarmerDecelerateTargetDist; - if (Main.getGoodWorld && !Main.zenithWorld) + if (CalamityWorld.LegendaryMode && !Main.zenithWorld) NPC.velocity *= 1.15f; if (NPC.velocity.X < 0f) diff --git a/NPCs/OldDuke/OldDuke.cs b/NPCs/OldDuke/OldDuke.cs index 1d6b35bf42..622e9dd92c 100644 --- a/NPCs/OldDuke/OldDuke.cs +++ b/NPCs/OldDuke/OldDuke.cs @@ -199,7 +199,7 @@ namespace CalamityMod.NPCs.OldDuke bool death = CalamityWorld.death || bossRush; float exhaustionGateValue = 360f; - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) exhaustionGateValue *= 0.5f; float numberOfAttacksBeforeExhaustion = 12f; @@ -931,7 +931,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 900f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 1800f), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); @@ -978,7 +978,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y + 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); @@ -1291,13 +1291,13 @@ namespace CalamityMod.NPCs.OldDuke Vector2 phase2GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; + int totalGore = CalamityWorld.LegendaryMode ? 40 : 20; for (int i = 0; i < totalGore; i++) { float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= Main.rand.NextFloat() + 0.5f; velocityY *= Main.rand.NextFloat() + 0.5f; @@ -1361,7 +1361,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, 1f, sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2]), (int)(NPC.Center.Y - 540f), ModContent.NPCType(), 0, 0f, 0f, -1f, sharkronVelocity, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + 50f + calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, 1f, -sharkronVelocity, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - 50f - calamityGlobalNPC.newAI[2] * 0.5f), (int)(NPC.Center.Y + 270f), ModContent.NPCType(), 0, 0f, 0f, -1f, -sharkronVelocity, 255); @@ -1667,13 +1667,13 @@ namespace CalamityMod.NPCs.OldDuke Vector2 phase3GoreDirection = NPC.rotation.ToRotationVector2() * (Vector2.UnitX * NPC.direction) * (NPC.width + 20) / 2f + NPC.Center; int type = ModContent.ProjectileType(); int damage = NPC.GetProjectileDamage(type); - int totalGore = Main.getGoodWorld ? 40 : 20; + int totalGore = CalamityWorld.LegendaryMode ? 40 : 20; for (int i = 0; i < totalGore; i++) { float velocityX = NPC.direction * goreVelocityX * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); float velocityY = goreVelocityY * (Main.rand.NextFloat(0.2f, 0.8f) + 0.5f); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { velocityX *= Main.rand.NextFloat() + 0.5f; velocityY *= Main.rand.NextFloat() + 0.5f; @@ -1696,7 +1696,7 @@ namespace CalamityMod.NPCs.OldDuke NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2]), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); - if (Main.getGoodWorld) + if (CalamityWorld.LegendaryMode) { NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X + x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); NPC.NewNPC(NPC.GetSource_FromAI(), (int)(NPC.Center.X - x), (int)(NPC.Center.Y - calamityGlobalNPC.newAI[2] * 0.5f), ModContent.NPCType(), 0, 0f, 0f, NPC.whoAmI, 0f, 255); From 20905ba003accda0b22547e7b4c0add769ad91bc Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 7 Jun 2025 00:34:35 -0700 Subject: [PATCH 43/72] PR comment revisions --- NPCs/Other/THELORDE.cs | 2 +- NPCs/SlimeGod/CrimulanPaladin.cs | 2 +- NPCs/SlimeGod/EbonianPaladin.cs | 2 +- NPCs/SlimeGod/SplitCrimulanPaladin.cs | 2 +- NPCs/SlimeGod/SplitEbonianPaladin.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs | 2 +- NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs | 2 +- .../RegularEnemies/RevengeanceAndDeathAI.cs | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/NPCs/Other/THELORDE.cs b/NPCs/Other/THELORDE.cs index 3262a9b565..a01ab4802f 100644 --- a/NPCs/Other/THELORDE.cs +++ b/NPCs/Other/THELORDE.cs @@ -584,7 +584,7 @@ namespace CalamityMod.NPCs.Other public override void ModifyNPCLoot(NPCLoot npcLoot) { double pisquaredover6 = Math.Pow(MathHelper.Pi, 2) / 6; - npcLoot.AddIf(() => CalamityWorld.LegendaryMode, ModContent.ItemType()); // guaranteed in legendarev mode + npcLoot.AddIf(() => CalamityWorld.LegendaryMode, ModContent.ItemType()); // guaranteed in Legendary mode npcLoot.AddIf(() => !CalamityWorld.LegendaryMode, ModContent.ItemType(), 27); // otherwise 1 in 27 npcLoot.Add(ModContent.ItemType(), 1, 22, (int)(pisquaredover6 * 100)); } diff --git a/NPCs/SlimeGod/CrimulanPaladin.cs b/NPCs/SlimeGod/CrimulanPaladin.cs index 6909ef9f42..f461f3d54c 100644 --- a/NPCs/SlimeGod/CrimulanPaladin.cs +++ b/NPCs/SlimeGod/CrimulanPaladin.cs @@ -112,7 +112,7 @@ namespace CalamityMod.NPCs.SlimeGod addedStretch = -landingRecoil; // Used for teleporting - float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f; // How fast the slime slams down float slamVelocity = bossRush ? 20f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; diff --git a/NPCs/SlimeGod/EbonianPaladin.cs b/NPCs/SlimeGod/EbonianPaladin.cs index 6cd7be29a6..a49d3555ce 100644 --- a/NPCs/SlimeGod/EbonianPaladin.cs +++ b/NPCs/SlimeGod/EbonianPaladin.cs @@ -101,7 +101,7 @@ namespace CalamityMod.NPCs.SlimeGod setDamage += 22; } - float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f; NPC.aiAction = 0; // Get a target diff --git a/NPCs/SlimeGod/SplitCrimulanPaladin.cs b/NPCs/SlimeGod/SplitCrimulanPaladin.cs index b588ad49fd..6bf583da4e 100644 --- a/NPCs/SlimeGod/SplitCrimulanPaladin.cs +++ b/NPCs/SlimeGod/SplitCrimulanPaladin.cs @@ -127,7 +127,7 @@ namespace CalamityMod.NPCs.SlimeGod addedStretch = -landingRecoil; // Used for teleporting - float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f; // How fast the slime slams down float slamVelocity = bossRush ? 22.25f : death ? 18.25f : revenge ? 16.5f : expertMode ? 15.5f : 13.5f; diff --git a/NPCs/SlimeGod/SplitEbonianPaladin.cs b/NPCs/SlimeGod/SplitEbonianPaladin.cs index 16c55de137..64344a009e 100644 --- a/NPCs/SlimeGod/SplitEbonianPaladin.cs +++ b/NPCs/SlimeGod/SplitEbonianPaladin.cs @@ -123,7 +123,7 @@ namespace CalamityMod.NPCs.SlimeGod addedStretch = -landingRecoil; - float scale = CalamityWorld.LegendaryMode ? 0.6f : CalamityWorld.LegendaryMode ? 0.8f : 1f; + float scale = CalamityWorld.LegendaryMode ? 0.6f : 1f; // How fast the slime slams down float slamVelocity = bossRush ? 20f : death ? 16f : revenge ? 15f : expertMode ? 14f : 12f; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs index 47a935b86b..fabcacbcb3 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/BrainOfCthulhuAI.cs @@ -1052,7 +1052,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses public static int GetBrainOfCthuluCreepersCountRevDeath() { - return CalamityWorld.LegendaryMode ? 40 : CalamityWorld.LegendaryMode ? 35 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 30 : 20; + return CalamityWorld.LegendaryMode ? 40 : (CalamityWorld.death || BossRushEvent.BossRushActive) ? 30 : 20; } private static float GetCrimsonBossKnockBack(NPC npc, int numPlayers, float lifeScale, float baseKnockBackResist) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs index 8d6bc39693..fde22e50e2 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/KingSlimeAI.cs @@ -554,7 +554,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses return false; // Adjust size based on HP - float maxScale = death ? (CalamityWorld.LegendaryMode ? 6f : 2.5f) : (CalamityWorld.LegendaryMode ? 3f : 1.5f); + float maxScale = CalamityWorld.LegendaryMode ? 3f : death ? 2.5f : 1.5f; float minScale = death ? 0.5f : 0.75f; float maxScaledValue = maxScale - minScale; diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs index 380f498762..74f818940d 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs @@ -48,7 +48,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } if (CalamityWorld.LegendaryMode) - enrageScale += (CalamityWorld.LegendaryMode ? 1f : 0.5f); + enrageScale += 1f; if (bossRush) enrageScale = 2f; diff --git a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs index 97af54642c..16c8b29ac6 100644 --- a/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs +++ b/NPCs/VanillaNPCAIOverrides/RegularEnemies/RevengeanceAndDeathAI.cs @@ -6790,7 +6790,7 @@ PrepareToShoot: int projType = ProjectileID.SandBallFalling; - // If FTW is enabled, can fire 8 to 13 sand balls (random chance for 10x the amount) + // If Legendary is enabled, can fire 8 to 13 sand balls (random chance for 10x the amount) int projAmt = 1; if (CalamityWorld.LegendaryMode) { From 7f76416eb41148281e1dafb58600807f4e16470e Mon Sep 17 00:00:00 2001 From: GinYuH <72181395+GinYuH@users.noreply.github.com> Date: Sat, 7 Jun 2025 00:38:51 -0700 Subject: [PATCH 44/72] this comment was always inaccurate --- CalPlayer/CalamityPlayerHitHurt.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 51a94a1d11..fa96a6410f 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -885,7 +885,7 @@ namespace CalamityMod.CalPlayer contactDamageReduction *= (double)Crumbling.MultiplicativeDamageReductionPlayer; // Contact damage reduction is reduced by DR Damage, which itself is proportional to defense damage - // In GFB, as defense damage is uncapped, DR damage is also uncapped. + // In FTW, as defense damage is uncapped, DR damage is also uncapped. int currentDefense = Player.GetCurrentDefense(false); if (totalDefenseDamage > 0 && currentDefense > 0) { From f56e9a6c921ccedc0e021172b4ae6198bd694a2f Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 7 Jun 2025 15:59:13 -0400 Subject: [PATCH 45/72] Added Dryad name Kanna for donor (reference to Blaster Master Zero Trilogy, apparently) --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index 2e8c0548e0..fbbd2dc3f0 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -110,6 +110,7 @@ namespace CalamityMod.NPCs "Jasmine", // <@!430532867479699456> (phantasmagoria.) "Cybil", // <@!486507232666845185> (Captain Doofus#????) "Ruth", // <@!1001307586068492388> (briny_coffee) + "Kanna", // <@!730203712898859018> (cosmoredeathwish) }; private static readonly string[] DyeTraderNames = null; private static readonly string[] GoblinTinkererNames = From c3b73ff025510aca9d22502418a13ddb06213253 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 7 Jun 2025 16:01:00 -0400 Subject: [PATCH 46/72] Fixed Buzzkill firing multiple projectiles in MP We probably should get a hotfix for stuff like this --- Projectiles/Ranged/BuzzkillHoldout.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Projectiles/Ranged/BuzzkillHoldout.cs b/Projectiles/Ranged/BuzzkillHoldout.cs index 04c8fdb96e..c10454ba39 100644 --- a/Projectiles/Ranged/BuzzkillHoldout.cs +++ b/Projectiles/Ranged/BuzzkillHoldout.cs @@ -82,13 +82,16 @@ namespace CalamityMod.Projectiles.Ranged SoundStyle ShootSound = new("CalamityMod/Sounds/Item/SawShot", 2) { PitchVariance = 0.1f, Volume = 0.4f + SawPower * 0.5f }; SoundEngine.PlaySound(ShootSound, GunTipPosition); - float sawDamageMult = MathHelper.Lerp(1f, 5f, SawPower) / 1.5f; // The damage must be divided by 1.5 to offset the holdout having 1.5x base damage. - int sawPierce = (int)MathHelper.Lerp(2f, 6f, SawPower); int sawLevel = (SawPower >= 1f).ToInt() + (SawPower >= 0.25f).ToInt(); + if (Main.myPlayer == Projectile.owner) + { + float sawDamageMult = MathHelper.Lerp(1f, 5f, SawPower) / 1.5f; // The damage must be divided by 1.5 to offset the holdout having 1.5x base damage. + int sawPierce = (int)MathHelper.Lerp(2f, 6f, SawPower); - Projectile buzzsaw = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * Owner.ActiveItem().shootSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * sawDamageMult), (int)(Projectile.knockBack * (sawDamageMult / 2)), Main.myPlayer, sawLevel); - buzzsaw.penetrate = sawPierce; - buzzsaw.rotation = Main.rand.NextFloat(0f, MathHelper.TwoPi); + Projectile buzzsaw = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), GunTipPosition, Projectile.velocity.SafeNormalize(Vector2.UnitY) * Owner.ActiveItem().shootSpeed, ModContent.ProjectileType(), (int)(Projectile.damage * sawDamageMult), (int)(Projectile.knockBack * (sawDamageMult / 2)), Main.myPlayer, sawLevel); + buzzsaw.penetrate = sawPierce; + buzzsaw.rotation = Main.rand.NextFloat(0f, MathHelper.TwoPi); + } NoSawOnHoldout = true; OffsetLengthFromArm -= 4f + 12f * SawPower; From e01a24cc13232dcf4c7ea07ae59a7373837b5d27 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 7 Jun 2025 18:00:23 -0400 Subject: [PATCH 47/72] Added Orange Tabby Town Cat name Dali for donor --- NPCs/CalamityGlobalTownNPC.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index fbbd2dc3f0..dbf3e92fce 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -343,6 +343,7 @@ namespace CalamityMod.NPCs { "Felix", // <@!183424826407518208> (lilac_vrt_olligoci) "Tardo", // <@!739343546867384391> (midnight295) + "Dali", // <@!460238880436781061> (darthlego) }; private static readonly string[] TownCatRussianBlueNames = null; private static readonly string[] TownCatSilverNames = From 69c324675355b6d5cab0a2ac41622885a0d2d143 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Jun 2025 00:14:36 -0400 Subject: [PATCH 48/72] Why did enamoured do this it accomplishes nothing except making Ravager inflict Weak Petrification in phase 1 when it didn't before --- NPCs/CalamityGlobalNPC.cs | 3 --- NPCs/Ravager/RavagerBody.cs | 12 ++++++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 48d48cb1e0..821951eac5 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -3989,9 +3989,6 @@ namespace CalamityMod.NPCs { if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && Vector2.Distance(Main.LocalPlayer.Center, npc.Center) < BossZenDistance) Main.LocalPlayer.AddBuff(BuffType(), 2); - - if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && npc.type == NPCType() && Vector2.Distance(Main.LocalPlayer.Center, npc.Center) < BossZenDistance) - Main.LocalPlayer.AddBuff(BuffType(), 2); } if (npc.type != NPCType()) diff --git a/NPCs/Ravager/RavagerBody.cs b/NPCs/Ravager/RavagerBody.cs index a71e1c3a6f..9076571ce5 100644 --- a/NPCs/Ravager/RavagerBody.cs +++ b/NPCs/Ravager/RavagerBody.cs @@ -229,20 +229,20 @@ namespace CalamityMod.NPCs.Ravager NPC.dontTakeDamage = true; if (bossRush) { - if (!Main.dedServ) + foreach (Player p in Main.ActivePlayers) { - if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && revenge) - Main.LocalPlayer.AddBuff(ModContent.BuffType(), 2); + if (!p.dead && revenge) + p.AddBuff(ModContent.BuffType(), 2); } } } else { NPC.dontTakeDamage = false; - if (!Main.dedServ) + foreach (Player p in Main.ActivePlayers) { - if (!Main.LocalPlayer.dead && Main.LocalPlayer.active && revenge) - Main.LocalPlayer.AddBuff(ModContent.BuffType(), 2); + if (!p.dead && revenge) + p.AddBuff(ModContent.BuffType(), 2); } } From 9f864439c023c53494de5410af695bbc26c06382 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sun, 8 Jun 2025 23:36:45 -0700 Subject: [PATCH 49/72] Gauss Pistol -> Vulcan --- .../EncryptedSchematicPlanetoid.cs | 2 +- Items/Weapons/DraedonsArsenal/GaussPistol.cs | 58 ---- Items/Weapons/DraedonsArsenal/GaussPistol.png | Bin 600 -> 0 bytes Items/Weapons/DraedonsArsenal/Vulcan.cs | 77 +++++ Items/Weapons/DraedonsArsenal/Vulcan.png | Bin 0 -> 1453 bytes Items/Weapons/DraedonsArsenal/VulcanGlow.png | Bin 0 -> 3037 bytes ...ityMod.Items.Weapons.DraedonsArsenal.hjson | 23 +- .../Mods.CalamityMod.Projectiles.Misc.hjson | 2 + Projectiles/DraedonsArsenal/VulcanFlash.png | Bin 0 -> 2938 bytes Projectiles/DraedonsArsenal/VulcanHoldout.cs | 268 ++++++++++++++++++ Projectiles/DraedonsArsenal/VulcanHoldout.png | Bin 0 -> 3836 bytes .../DraedonsArsenal/VulcanHoldoutGlow.png | Bin 0 -> 3043 bytes .../VulcanHoldoutHeatedTip.png | Bin 0 -> 3822 bytes .../DraedonsArsenal/VulcanHoldoutSpear.png | Bin 0 -> 3876 bytes .../VulcanHoldoutSpearGlow.png | Bin 0 -> 3059 bytes .../DraedonsArsenal/VulcanProjectile.cs | 116 ++++++++ .../DraedonsArsenal/VulcanProjectile.png | Bin 0 -> 2918 bytes Projectiles/DraedonsArsenal/VulcanSpear.cs | 199 +++++++++++++ Projectiles/DraedonsArsenal/VulcanSpear.png | Bin 0 -> 3003 bytes .../DraedonsArsenal/VulcanSpearGlow.png | Bin 0 -> 2906 bytes Sounds/Item/VulcanRampDown.ogg | Bin 0 -> 28746 bytes Sounds/Item/VulcanRampUp.ogg | Bin 0 -> 16692 bytes Sounds/Item/VulcanShot.ogg | Bin 0 -> 17130 bytes Systems/Collections/MagicGunIDList.cs | 2 +- 24 files changed, 677 insertions(+), 70 deletions(-) delete mode 100644 Items/Weapons/DraedonsArsenal/GaussPistol.cs delete mode 100644 Items/Weapons/DraedonsArsenal/GaussPistol.png create mode 100644 Items/Weapons/DraedonsArsenal/Vulcan.cs create mode 100644 Items/Weapons/DraedonsArsenal/Vulcan.png create mode 100644 Items/Weapons/DraedonsArsenal/VulcanGlow.png create mode 100644 Projectiles/DraedonsArsenal/VulcanFlash.png create mode 100644 Projectiles/DraedonsArsenal/VulcanHoldout.cs create mode 100644 Projectiles/DraedonsArsenal/VulcanHoldout.png create mode 100644 Projectiles/DraedonsArsenal/VulcanHoldoutGlow.png create mode 100644 Projectiles/DraedonsArsenal/VulcanHoldoutHeatedTip.png create mode 100644 Projectiles/DraedonsArsenal/VulcanHoldoutSpear.png create mode 100644 Projectiles/DraedonsArsenal/VulcanHoldoutSpearGlow.png create mode 100644 Projectiles/DraedonsArsenal/VulcanProjectile.cs create mode 100644 Projectiles/DraedonsArsenal/VulcanProjectile.png create mode 100644 Projectiles/DraedonsArsenal/VulcanSpear.cs create mode 100644 Projectiles/DraedonsArsenal/VulcanSpear.png create mode 100644 Projectiles/DraedonsArsenal/VulcanSpearGlow.png create mode 100644 Sounds/Item/VulcanRampDown.ogg create mode 100644 Sounds/Item/VulcanRampUp.ogg create mode 100644 Sounds/Item/VulcanShot.ogg diff --git a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs index fb7e5cccf1..6703ab71bd 100644 --- a/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs +++ b/Items/DraedonMisc/EncryptedSchematicPlanetoid.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc rangedDisplay.OverrideColor = new Color(149, 243, 43); list.Insert(insertIndex + 2, rangedDisplay); - int mageItem = ModContent.ItemType(); + int mageItem = ModContent.ItemType(); TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}"); mageDisplay.OverrideColor = new Color(236, 255, 31); list.Insert(insertIndex + 3, mageDisplay); diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.cs b/Items/Weapons/DraedonsArsenal/GaussPistol.cs deleted file mode 100644 index 445df79e74..0000000000 --- a/Items/Weapons/DraedonsArsenal/GaussPistol.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using CalamityMod.CustomRecipes; -using CalamityMod.Items.Materials; -using CalamityMod.Projectiles.DraedonsArsenal; -using CalamityMod.Sounds; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Items.Weapons.DraedonsArsenal -{ - public class GaussPistol : ModItem, ILocalizedModType - { - public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; - public override void SetDefaults() - { - CalamityGlobalItem modItem = Item.Calamity(); - - Item.width = 40; - Item.height = 22; - Item.DamageType = DamageClass.Magic; - Item.mana = 6; - Item.damage = 150; - Item.knockBack = 11f; - Item.useAnimation = Item.useTime = 20; - Item.autoReuse = true; - - Item.useStyle = ItemUseStyleID.Shoot; - Item.UseSound = CommonCalamitySounds.GaussWeaponFire; - Item.noMelee = true; - - Item.value = CalamityGlobalItem.RarityPinkBuyPrice; - Item.rare = ItemRarityID.Pink; - - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 14f; - - modItem.MaxCharge = 85f; - modItem.UsesCharge = true; - modItem.ChargePerUse = 0.05f; - } - - public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2); - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(12). - AddIngredient(8). - AddRecipeGroup("AnyMythrilBar", 10). - AddIngredient(ItemID.SoulofMight, 20). - AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(2, out Func condition), condition). - AddTile(TileID.MythrilAnvil). - Register(); - } - } -} diff --git a/Items/Weapons/DraedonsArsenal/GaussPistol.png b/Items/Weapons/DraedonsArsenal/GaussPistol.png deleted file mode 100644 index d68e73941979722673a676366eddd57f2a255488..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 600 zcmV-e0;m0nP)Px%5=lfsR7i>4mN9SBKp2LfLwINhrz9asQ%DU`TSx~O5fW@{3`ht@Mm7fi00V!3 zfsK&`2~?>=w{E3EWn)Q7S^){7X%d{!ge@7&aQPIUdkGN>b>GRa@4Y+u(Rcn%IgW!( zUiLfy)#lG2{QmmNvI6*2*$XVw#*VKpUQhs~+7Ih~Q4IzI0M1O6{*O|Q<5)?Eoi&}cRSfJ+5W0et&j4FJ-qv;y$kJ`e+fXXWAk-Fp** zbHyvxoOgK<_r;Dr zRptGC01Ekw0Bmh<8(zlUUIT!g=5J&DTQ_bR`!FOI^=ljJKnw^fub^w_;IJOR=nF-6 zmKO}axp!drw_8;J9^Uq*n&~7NsWyoAilV? z1VGDg8SA{?`9OI6aeiSwuOJQtb23oK!}_nAvI1Xp5U<>1gr$2novvD`(?s)6^w|B mPA|cKSz{XgjaXDCp5PyFYSBa$>A?{I0000 "Items.Weapons.DraedonsArsenal"; + public override void SetDefaults() + { + Item.width = 28; + Item.height = 34; + Item.DamageType = DamageClass.Magic; + Item.mana = 11; + Item.damage = 40; + Item.knockBack = 11f; + Item.useAnimation = Item.useTime = 11; + Item.autoReuse = true; + + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.channel = true; + Item.noUseGraphic = true; + + Item.value = CalamityGlobalItem.RarityPinkBuyPrice; + Item.rare = ItemRarityID.Pink; + + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 14f; + } + + public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 2); + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool AltFunctionUse(Player player) => true; + public override void HoldItem(Player player) + { + if (Main.myPlayer == player.whoAmI) + player.Calamity().rightClickListener = true; + player.Calamity().mouseWorldListener = true; + } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/DraedonsArsenal/VulcanGlow").Value); + } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float gunType = 0; + if (player.Calamity().mouseRight && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0) + gunType = 5; + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, gunType); + + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); + return false; + } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(12). + AddIngredient(8). + AddRecipeGroup("AnyMythrilBar", 10). + AddIngredient(ItemID.SoulofMight, 20). + AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(2, out Func condition), condition). + AddTile(TileID.MythrilAnvil). + Register(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/Vulcan.png b/Items/Weapons/DraedonsArsenal/Vulcan.png new file mode 100644 index 0000000000000000000000000000000000000000..975227e30febfb74bcda9c394ac560afe644ec2c GIT binary patch literal 1453 zcmV;e1ycHnP)Px#1ZP1_K>z@;j|==^1pojAJxN4CRA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JyvsE<#^c%!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf z_v}A;-u3*k3(gmgUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R16008MpL_t(&f$iC`5yCJGg<-jY zl7U!&Nf;^{umKev9m`Nc<5X&L5RCky2=V?pcTv8?cfPpPT7~sj2#JZ1pa=pT5?+1W-kLv4jNm5i;7q=-iezA=@G(Au+8EiQ33!iIAY0w?7J& z4bXiXO4Kn+7$QmI*nIZKkK+Ce!tq~HG`S5FcT>9@zosgiy f9moD^gakDLQ+__qL-}}u00000NkvXXu0mjfC!Ds~ literal 0 HcmV?d00001 diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson index 9c176472a5..9b151deb0d 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson @@ -39,16 +39,6 @@ GaussDagger: { ''' } -GaussPistol: { - DisplayName: Gauss Pistol - Tooltip: - ''' - Fires a devastating high-velocity blast with extreme knockback - [c/1FFBFF:'Though this arcane pistol may seem mundane, it is deceivingly powerful.] - [c/1FFBFF:One of the many advantages of magical firearms is that size does not equal power.'] - ''' -} - HolofiberImmolator: { DisplayName: R-PMA: Holofiber Immolator Tooltip: @@ -265,3 +255,16 @@ WavePounder: { Stealth strikes emit absurdly powerful shockwaves ''' } + +Vulcan: { + DisplayName: R-GSS: Vulcan + Tooltip: + ''' + A mana-fueled Gatling cannon that fires in bursts + Press to launch a magnetic harpoon which attracts your shots + Launching a harpoon makes burst fire mode last longer + When a harpoon expires, all magnetized shots launch at nearby enemies with increased damage + [c/1FFBFF:'Originally a ceiling mounted mining beam, the removal of its battery reduced its heft only marginally.] + [c/1FFBFF:It saw little use and many complaints from the battlemage corps.'] + ''' +} diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson index a72179f460..8d9d17c9c7 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson @@ -46,6 +46,8 @@ SystemBaneProjectile.DisplayName: System Bane TeslaCannonShot.DisplayName: Tesla Beam UnstableMatter.DisplayName: Unstable Matter VoltageStream.DisplayName: Voltage Stream +VulcanProjectile.DisplayName: Vulcan Shot +VulcanSpear.DisplayName: Vulcanite Lance WavePounderBoom.DisplayName: Explosion WavePounderProjectile.DisplayName: Wave Pounder // Environmental diff --git a/Projectiles/DraedonsArsenal/VulcanFlash.png b/Projectiles/DraedonsArsenal/VulcanFlash.png new file mode 100644 index 0000000000000000000000000000000000000000..3fc2d1e1d9acfd9f24b2b6bb487912d7f1e7658a GIT binary patch literal 2938 zcmV-=3x)KFP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2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5tK0J)%;m5Hq)$ literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/VulcanHoldout.cs b/Projectiles/DraedonsArsenal/VulcanHoldout.cs new file mode 100644 index 0000000000..c2805e2ff1 --- /dev/null +++ b/Projectiles/DraedonsArsenal/VulcanHoldout.cs @@ -0,0 +1,268 @@ +using System; +using CalamityMod.Cooldowns; +using CalamityMod.Dusts; +using CalamityMod.Items.Weapons.DraedonsArsenal; +using CalamityMod.Particles; +using CalamityMod.Projectiles.BaseProjectiles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Utilities; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + public class VulcanHoldout : BaseGunHoldoutProjectile + { + public new string LocalizationCategory => "Projectiles.Misc"; + public override int AssociatedItemID => ModContent.ItemType(); + + public float offsetBase = 35; + public override float MaxOffsetLengthFromArm => offsetBase; + public override float RecoilResolveSpeed => 0.2f; + public override float OffsetXUpwards => 0f; + public override float BaseOffsetY => 0f; + public override float OffsetYDownwards => 0f; + public override float WeaponTurnSpeed => (shootingTimer < 0 ? 0 : 0.35f); + public bool firingSpear => Projectile.ai[2] == 5; + public ref float shootingTimer => ref Projectile.ai[0]; + public ref float fireRate => ref Projectile.ai[1]; + public int time = 0; + public int maxShots = 25; + public int shotsToFire = 0; + public bool playRampDown = false; + public int shotsFired = 0; + public float heatVis = 0; + public float flashVis1 = 0; + public float flashVis2 = 0; + public float spearVis = 1; + public int cooldownGiven = 180; + public bool failedManaCheck = false; + public int spearFakeCooldown = 0; + + + public override void KillHoldoutLogic() + { + + } + public override void HoldoutAI() + { + if (flashVis1 > 0) flashVis1 -= 0.2f; if (flashVis1 < 0) flashVis1 = 0; + if (flashVis2 > 0) flashVis2 -= 0.2f; if (flashVis2 < 0) flashVis2 = 0; + + if (time == 0) + { + if (Owner.Calamity().arsenalCooldown > 0) + spearVis = 0; + shootingTimer = -20; + fireRate = Owner.HeldItem.useAnimation; + shotsToFire = maxShots; + OffsetLengthFromArm = offsetBase; + } + if (shootingTimer < 0) + { + // Light cooldown after firing + if (shootingTimer == -20 || shootingTimer == -1) + { + if ((!Main.mouseLeft && !firingSpear) || failedManaCheck) + { + Projectile.Kill(); + return; + } + } + if (playRampDown) + { + SoundStyle sound = new("CalamityMod/Sounds/Item/VulcanRampDown"); + for (int i = 0; i < 2; i++) + SoundEngine.PlaySound(sound with { Volume = 0.9f, MaxInstances = -1 }, Projectile.Center); + playRampDown = false; + } + if (shootingTimer == -20) + { + SoundStyle sound2 = new("CalamityMod/Sounds/Item/VulcanRampUp"); + for (int i = 0; i < 2; i++) + SoundEngine.PlaySound(sound2 with { Volume = 0.9f, MaxInstances = -1 }, Projectile.Center); + } + if (shootingTimer == -1) + { + if (!firingSpear) + shootingTimer = fireRate; + else + shootingTimer = 0; + shotsToFire = maxShots; + fireRate = Owner.HeldItem.useAnimation; + shotsFired = 0; + playRampDown = true; + } + Projectile.velocity = Owner.Center.DirectionTo(Owner.Calamity().mouseWorld); + } + if (Owner.Calamity().mouseRight && Owner.Calamity().arsenalCooldown <= 0) + { + Projectile.ai[2] = 5; + } + if (firingSpear && time > 20 && spearFakeCooldown <= 0) + { + Shoot(true); + spearFakeCooldown = 5; + shotsToFire = maxShots; + Projectile.ai[2] = 0; + Owner.Calamity().arsenalCooldown = cooldownGiven; + Owner.AddCooldown(ArsenalPower.ID, cooldownGiven); + } + if (shootingTimer >= 0) + { + if (!Main.mouseLeft && !firingSpear) + shotsToFire = 0; + + if (!firingSpear) + { + if (shotsToFire <= 0) + shootingTimer = -50; + else if (shootingTimer >= fireRate) + { + if (Owner.CheckMana(HeldItem, -1, true, false)) + { + Shoot(false); + + if (shotsFired % 2 == 0) flashVis1 = 1; + else flashVis2 = 1; + + shootingTimer = -1; + if (shotsToFire > maxShots * 0.2f) + { + fireRate -= 1; + if (fireRate < 3) + fireRate = 3; + } + else if (fireRate < Owner.HeldItem.useAnimation) + fireRate += 1; + if (fireRate > Owner.HeldItem.useAnimation) + fireRate = Owner.HeldItem.useAnimation; + + } + else + { + failedManaCheck = true; + shotsToFire = 0; + } + + shotsToFire--; + shotsFired++; + if (shotsToFire <= 0) + { + shootingTimer = -50; + } + } + } + } + if (shotsFired > 0 && shotsToFire > 0) + { + heatVis = MathHelper.Lerp(heatVis, 1, 0.007f); + } + else + heatVis = MathHelper.Lerp(heatVis, 0, 0.085f); + + spearVis = Utils.GetLerpValue(cooldownGiven / 2, 0, Owner.Calamity().arsenalCooldown, true); + spearFakeCooldown--; + + time++; + shootingTimer++; + } + public void Shoot(bool isSpear) + { + if (isSpear) + { + Vector2 spearPos = GunTipPosition + Projectile.velocity.RotatedBy(MathHelper.PiOver2 * Projectile.direction) * 12 - Projectile.velocity * 8; + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0f) * 6f; + Owner.Calamity().GeneralScreenShakePower = 3.5f; + OffsetLengthFromArm -= 16; + SoundStyle sound = new("CalamityMod/Sounds/Item/GunShotHeavy"); + SoundEngine.PlaySound(sound with { Volume = 0.8f, Pitch = 0.8f }, Projectile.Center); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), spearPos, shootVelocity, ModContent.ProjectileType(), Projectile.damage * 5, 0, Projectile.owner); + } + else + { + Owner.Calamity().GeneralScreenShakePower = 1f; + OffsetLengthFromArm -= 7; + SoundStyle sound = new("CalamityMod/Sounds/Item/VulcanShot"); + SoundEngine.PlaySound(sound with { Volume = 0.6f, Pitch = Main.rand.NextFloat(-0.1f, 0), MaxInstances = 1 }, Projectile.Center); + + Vector2 shootVelocity = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0f) * 6f; + Vector2 position = GunTipPosition + Projectile.velocity.RotatedBy(MathHelper.PiOver2 * (shotsFired % 2 == 0 ? -1 : 1)) * 4; + Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, shootVelocity, ModContent.ProjectileType(), Projectile.damage, 0, Projectile.owner); + + for (int i = 0; i < 4; i++) + { + Dust dust = Dust.NewDustPerfect(position, Main.rand.NextBool(3) ? ModContent.DustType() : Effects.ArsenalEffects.ArsenalGaussDust, (shootVelocity * 4).RotatedByRandom(0.05f) * Main.rand.NextFloat(0.1f, 0.8f), 0, default, Main.rand.NextFloat(0.7f, 1.1f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalGaussColor; + } + } + } + public override bool PreDraw(ref Color lightColor) + { + if (time < 2) + return false; + + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanHoldout").Value; + Texture2D glow = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanHoldoutGlow").Value; + Texture2D flash = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanFlash").Value; + Texture2D spear = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanSpear").Value; + Texture2D spearGlow = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanSpearGlow").Value; + Texture2D heat = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanHoldoutHeatedTip").Value; + if (Owner.Calamity().arsenalCooldown <= 0 && false) + { + texture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanHoldoutSpear").Value; + glow = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanHoldoutSpearGlow").Value; + } + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 vel = Projectile.rotation.ToRotationVector2(); + + float randSize = Main.rand.NextFloat(0.9f, 1f); + Color drawColor = Projectile.GetAlpha(lightColor); + float drawRotation = Projectile.rotation + (Projectile.direction == -1 ? MathHelper.Pi : 0f); + Vector2 rotationPoint = texture.Size() * 0.5f; + SpriteEffects flipSprite = Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + int draws = 8; + + Vector2 spearPos = GunTipPosition + vel.RotatedBy(MathHelper.PiOver2 * Projectile.direction) * 12 - vel * 27 - Main.screenPosition; + for (int i = 0; i < draws; i++) + { + float fadeIn = Math.Min(Utils.GetLerpValue(0, 0.8f, spearVis), (float)Math.Pow(Utils.GetLerpValue(1, 0.8f, spearVis), 2)); + Vector2 offset = (MathHelper.TwoPi / draws * i).ToRotationVector2() * 6 * (1 - spearVis); + Main.EntitySpriteDraw(spear, spearPos + offset, null, Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 } * fadeIn * 0.5f, drawRotation, spear.Size() * 0.5f, Projectile.scale, flipSprite); + Main.EntitySpriteDraw(spear, spearPos, null, Color.Lerp(Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 }, drawColor, spearVis) * spearVis, drawRotation, spear.Size() * 0.5f, Projectile.scale, flipSprite); + } + Main.EntitySpriteDraw(spearGlow, spearPos, null, Color.White * spearVis, drawRotation, spearGlow.Size() * 0.5f, Projectile.scale, flipSprite); + + Main.EntitySpriteDraw(texture, drawPosition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); + + Main.EntitySpriteDraw(glow, drawPosition, null, Color.White, drawRotation, rotationPoint, Projectile.scale, flipSprite); + + for (int i = 0; i < draws; i++) + { + Vector2 offset = (MathHelper.TwoPi / draws * i).ToRotationVector2() * 4 * heatVis; + Main.EntitySpriteDraw(heat, drawPosition + offset, null, Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 } * heatVis * 0.35f, drawRotation, heat.Size() * 0.5f, Projectile.scale, flipSprite); + Main.EntitySpriteDraw(heat, drawPosition, null, Color.White with { A = 0 } * heatVis * 0.3f, drawRotation, heat.Size() * 0.5f, Projectile.scale, flipSprite); + } + + float tipSeperation = 4; + // Tip flash 1 + if (flashVis1 > 0) + { + Vector2 position = GunTipPosition + vel * (12 + 30 * (1 - flashVis1)) + vel.RotatedBy(MathHelper.PiOver2) * tipSeperation - Main.screenPosition; + for (int i = 0; i < 3; i++) + Main.EntitySpriteDraw(flash, position, null, Color.White with { A = 0 } * flashVis1, drawRotation, flash.Size() * 0.5f, new Vector2(0.5f + 2f * (1 - flashVis1), 1 - 0.8f * flashVis1) * Projectile.scale, flipSprite); + } + // Tip flash 1 + if (flashVis2 > 0) + { + Vector2 position = GunTipPosition + vel * (12 + 30 * (1 - flashVis2)) + vel.RotatedBy(-MathHelper.PiOver2) * tipSeperation - Main.screenPosition; + for (int i = 0; i < 3; i++) + Main.EntitySpriteDraw(flash, position, null, Color.White with { A = 0 } * flashVis2, drawRotation, flash.Size() * 0.5f, new Vector2(0.5f + 2f * (1 - flashVis2), 1 - 0.8f * flashVis2) * Projectile.scale, flipSprite); + } + return false; + } + } +} diff --git a/Projectiles/DraedonsArsenal/VulcanHoldout.png b/Projectiles/DraedonsArsenal/VulcanHoldout.png new file mode 100644 index 0000000000000000000000000000000000000000..3df7e215abdf6becc41891d82bacee01cb3d4f26 GIT binary patch literal 3836 zcmVLtP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8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N3%vruXs(d!rRD05w&UAh+ zpX%h(_+u*oZ){i#z`HfI0F;$Z2Vlzdr#!z~(LMw&dc?3{A%Hm($9ry^zxF2p8`gDr zey?1c2Dq0(w9kgh_jeI}RrjU|JPQ%sUZ4EmB*!1S> z0KD_|`=0x2)@|&w0b*8J8Q@N`Lkp*Q@@+ojOv;PqJ|D4>|7Bdd(~ezj-vYfw*MIQ| z09DIg1(LYDv!VkM9cg)|Kt-Zknr{H`@oN_VSp8uh03Utu9^k&ZyBoFxFt4&A?DaQ$ z4gjw3Xay&W;*ya7q}|B|+&_jy2eyv3qLVDzMB>fRxT^FAz!fY(8cLSVd#vTS^rTk+B(cI2tRX5^3i5M3*DW321HFe14HbtE9Rhl9GMPhW)XO_7x}Qb+arpBG zLf{52_Zl@!4N5lJR8o8VmUAXCFYm1A0V-NYOy*IN`5D5e2akEunW6Qm>o);-dem^h z4Y7p+Cw;CEFJ?!XA-~_jgy^>u7ArbF;ufu=CSgvFTBa#LQAn%6s4FEEa6{`SdN%AO zT%y$>=YIVqt_DkB^~zTO*s}FAAo$N5tmuG<`*7C$96$#G!dwQK%RqCo@!L!?)5VIp yeX3=f6>Tu+Mf>45sl-d7Lhkh>7cEwFK>Q1Y9qsB#;48QQ0000e@ literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/VulcanHoldoutGlow.png b/Projectiles/DraedonsArsenal/VulcanHoldoutGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..5a1c73ba6cbcf8036e5e920ee1923d62f0dcd568 GIT binary patch literal 3043 zcmV<93mo)`P)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bf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--- /dev/null +++ b/Projectiles/DraedonsArsenal/VulcanProjectile.cs @@ -0,0 +1,116 @@ +using System; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + public class VulcanProjectile : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Misc"; + public ref float time => ref Projectile.ai[0]; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 20; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.timeLeft = 720; + Projectile.extraUpdates = 8; + Projectile.penetrate = 1; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 20 * Projectile.MaxUpdates; + } + public override void AI() + { + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); + if (time > 120 && Projectile.penetrate > 1) + Projectile.penetrate = 1; + + if (time > 60 && Projectile.extraUpdates > 2 && time % 4 == 0) + Projectile.extraUpdates--; + + if (Projectile.velocity.Length() < 5) + Projectile.velocity *= 1.01f; + if (targetDist < 1400) + { + if (true) + { + Particle trail = new CustomSpark(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 6, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 6, 0.15f, Effects.ArsenalEffects.ArsenalGaussColor * 0.9f, new Vector2(1f, 1f), true, true, glowCenterScale: 0.6f, glowOpacity: 0.8f, shrinkSpeed: 0.9f); + GeneralParticleHandler.SpawnParticle(trail); + } + if (time % 17 == 0) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center + Main.rand.NextVector2Circular(4, 4), Effects.ArsenalEffects.ArsenalGaussDust); + dust.velocity = Vector2.One.RotatedByRandom(MathHelper.Pi) * Main.rand.NextFloat(0.1f, 0.2f); + dust.scale = Main.rand.NextFloat(0.7f, 0.85f); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalGaussColor; + dust.noLightEmittence = time % 9 != 0; + dust.fadeIn = 0.3f; + } + } + + time++; + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + impactDust(); + + Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float launchPower = 4; + target.MoveNPC(launchVel, launchPower, true); + } + + public override void OnKill(int timeLeft) + { + impactDust(); + } + public void impactDust() + { + for (int i = 0; i < 3; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType()); + dust.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.1f) * Main.rand.NextFloat(9f, 19f); + dust.scale = Main.rand.NextFloat(0.6f, 0.85f); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalGaussColor; + dust.noLightEmittence = true; + } + } + public override bool PreDraw(ref Color lightColor) + { + Texture2D proj = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanProjectile").Value; + proj = ModContent.Request("CalamityMod/Particles/SquareRotated").Value; + + Texture2D square = ModContent.Request("CalamityMod/Particles/GlowSquareParticleThick").Value; + + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 vel = Projectile.rotation.ToRotationVector2(); + + Color drawColor = Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 }; + float drawRotation = Projectile.velocity.ToRotation(); + Vector2 rotationPoint = proj.Size() * 0.5f; + + int rate = 50; + + float shrink = Utils.GetLerpValue(rate - 1, 0, time % rate); + float fade = Math.Min((float)Math.Pow(Utils.GetLerpValue(0, rate * 0.8f, time % rate, true), 3), (float)Math.Pow(Utils.GetLerpValue(rate - 1, rate * 0.8f, time % 30, true), 3)); + float speed = Utils.GetLerpValue(2, 10, Projectile.extraUpdates); + Vector2 squash = new Vector2(1 + 2 * speed, 1 - 0.3f * speed); + + for (int i = 0; i < 2; i++) + Main.EntitySpriteDraw(square, drawPosition, null, drawColor * fade * (1 - speed), drawRotation + MathHelper.PiOver4, square.Size() * 0.5f, Projectile.scale * (0.05f + 0.2f * shrink), SpriteEffects.None); + + + Main.EntitySpriteDraw(proj, drawPosition, null, drawColor, drawRotation, rotationPoint, squash * Projectile.scale * 0.1f, SpriteEffects.None); + Main.EntitySpriteDraw(proj, drawPosition, null, Color.White with { A = 0 }, drawRotation, rotationPoint, squash * Projectile.scale * 0.06f, SpriteEffects.None); + return false; + } + } +} diff --git a/Projectiles/DraedonsArsenal/VulcanProjectile.png b/Projectiles/DraedonsArsenal/VulcanProjectile.png new file mode 100644 index 0000000000000000000000000000000000000000..f5adc1fd7f620d28960f6cfe03b4aa680839f5b5 GIT binary patch literal 2918 zcmV-s3z_tZP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvD zRIYI4MQ`g1<+DyrL=EogS06Xii({| zv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`0e$>L5F*fu#U8SXZT%h2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe z@An_mJyvsE<#^c%!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf z_v}A;-u3*k3(gmgUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R160044HL_t(Ijbr@(|33pQz>Zn$ zR592i?I$BPamEqjaC8T0nV`x`D5D9$EMgPIYc4D22CU-0zXvcdFfcGYzrLM;fq{WR z&Isa>q3iJNGug1Z9Nj^L97ZjN;sWR%7`hH0vPoscIGk88=!!#P0j(Vl0BLPuS%#iR Q`~Uy|07*qoM6N<$f=1nUIRF3v literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/VulcanSpear.cs b/Projectiles/DraedonsArsenal/VulcanSpear.cs new file mode 100644 index 0000000000..6b3f79e602 --- /dev/null +++ b/Projectiles/DraedonsArsenal/VulcanSpear.cs @@ -0,0 +1,199 @@ +using System; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + public class VulcanSpear : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Misc"; + public ref float time => ref Projectile.ai[0]; + + public NPC targeted; + public bool stuckInGround = false; + public bool canDamage => (targeted == null && !stuckInGround); + public bool canStick = true; + public int stuckTimer = 420; + public Vector2 placementCenter; + Vector2 placementVelocity; + public override void SetDefaults() + { + Projectile.width = Projectile.height = 35; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.timeLeft = 1200; + Projectile.extraUpdates = 30; + Projectile.penetrate = -1; + Projectile.tileCollide = false; + Projectile.ignoreWater = true; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + public override void AI() + { + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); + + Lighting.AddLight(Projectile.Center, Effects.ArsenalEffects.ArsenalGaussColor.ToVector3() * 0.5f); + if (targetDist < 1400 && canDamage) + { + if (time % 2 == 0) + { + Particle trail = new CustomSpark(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 14, Projectile.velocity * 0.2f, "CalamityMod/Particles/BloomCircle", false, 12, 0.065f, Effects.ArsenalEffects.ArsenalGaussColor, new Vector2(1f, 2.5f), true, true, glowCenterScale: 0.7f, shrinkSpeed: 0.4f); + GeneralParticleHandler.SpawnParticle(trail); + } + } + + if (!stuckInGround && targeted == null && Collision.SolidCollision(Projectile.Center + Projectile.velocity.SafeNormalize(Vector2.UnitX) * 15, 6, 6)) + { + Projectile.extraUpdates = 0; + stuckInGround = true; + SoundStyle hitTile = new("CalamityMod/Sounds/NPCHit/ExoHit3"); + SoundEngine.PlaySound(hitTile with { Volume = 0.8f, Pitch = Main.rand.NextFloat(0.1f, 0.2f) }, Projectile.Center); + //Get stuck in the ground and fade + } + if (targeted != null && (!targeted.active || targeted.life <= 0)) + targeted = null; + if (targeted != null) + { + Projectile.Center = targeted.Center - placementCenter; + } + else if (Projectile.numHits > 0) + { + Projectile.timeLeft = 1; + } + if (stuckInGround || targeted != null) + { + foreach (Projectile p in Main.ActiveProjectiles) + { + float dist = Utils.Distance(Projectile.Center, p.Center); + if (p.type == ModContent.ProjectileType() && dist <= 900 && p.ai[0] > 120) + { + if (p.velocity.Length() < 6) + p.velocity += p.Center.DirectionTo(Projectile.Center) * Utils.GetLerpValue(1500, 50, dist) * 0.9f; + else + p.velocity *= 0.9f; + if (p.ai[0] % 2 == 0) + p.timeLeft++; + } + } + } + if (!canDamage && Projectile.timeLeft > 300) + Projectile.timeLeft = 300; + time++; + if (Projectile.timeLeft == 35) + { + SoundStyle sound2 = new("CalamityMod/Sounds/Item/VulcanRampUp"); + for (int i = 0; i < 2; i++) + SoundEngine.PlaySound(sound2 with { Volume = 0.9f, MaxInstances = 5, Pitch = -0.4f }, Projectile.Center); + } + } + public override void OnKill(int timeLeft) + { + SoundStyle die = new("CalamityMod/Sounds/NPCHit/ExoHit2"); + SoundEngine.PlaySound(die with { Volume = 0.8f, Pitch = Main.rand.NextFloat(0.4f, 0.5f), MaxInstances = 5 }, Projectile.Center); + SoundStyle sound2 = new("CalamityMod/Sounds/Item/NidhoggFire"); + for (int i = 0; i < 2; i++) + SoundEngine.PlaySound(sound2 with { Volume = 0.8f, MaxInstances = 5, Pitch = -0.1f }, Projectile.Center); + foreach (Projectile p in Main.ActiveProjectiles) + { + float dist = Utils.Distance(Projectile.Center, p.Center); + if (p.type == ModContent.ProjectileType() && dist <= 500) + { + NPC closeTarget = p.Center.ClosestNPCAt(800); + if (closeTarget != null) + p.velocity = p.Center.DirectionTo(closeTarget.Center) * 7; + else + p.velocity = Projectile.Center.DirectionTo(p.Center) * 7; + p.extraUpdates = 8; + p.ai[0] = 0; + p.penetrate = 5; + if (p.ai[1] < 4) // Pretty much just so gfb can't oneshot everything + { + p.damage = (int)(p.damage * 2f); + p.ai[1]++; + } + p.timeLeft = Main.rand.Next(100, 120 + 1); + } + } + Particle bolt = new CustomPulse(Projectile.Center, Vector2.Zero, Effects.ArsenalEffects.ArsenalGaussColor, "CalamityMod/Particles/GlowSquareParticleThick", Vector2.One, MathHelper.PiOver4, 0.1f, 0.7f, 15); + GeneralParticleHandler.SpawnParticle(bolt); + Particle bolt2 = new CustomPulse(Projectile.Center, Vector2.Zero, Effects.ArsenalEffects.ArsenalGaussColor, "CalamityMod/Particles/GlowSquareParticleBig", Vector2.One, 0, 0.3f, 1.15f, 10); + GeneralParticleHandler.SpawnParticle(bolt2); + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + impactDust(); + + Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float launchPower = 12; + target.MoveNPC(launchVel, launchPower, true); + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + if (target.life <= 0 && target.realLife == -1) + { + // Don't stick into dead enemies + Projectile.numHits--; + } + else if (targeted == null && !stuckInGround) + { + //Stick + Projectile.extraUpdates = 0; + SoundStyle hitTile = new("CalamityMod/Sounds/NPCHit/ExoHit1"); + SoundEngine.PlaySound(hitTile with { Volume = 0.8f, Pitch = Main.rand.NextFloat(0.1f, 0.2f) }, Projectile.Center); + targeted = target; + placementCenter = targeted.Center - Projectile.Center; + } + } + public override bool? CanDamage() => canDamage ? null : false; + public override bool ShouldUpdatePosition() + { + return canDamage; + } + public void impactDust() + { + for (int i = 0; i < 7; i++) + { + Dust dust = Dust.NewDustPerfect(Projectile.Center, ModContent.DustType()); + dust.velocity = Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.15f) * Main.rand.NextFloat(12f, 19f); + dust.scale = Main.rand.NextFloat(0.8f, 1.35f); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalGaussColor; + dust.noLightEmittence = true; + } + } + public override bool PreDraw(ref Color lightColor) + { + Texture2D proj = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanSpear").Value; + Texture2D glow = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/VulcanSpearGlow").Value; + + Vector2 drawPosition = Projectile.Center - Main.screenPosition; + Vector2 vel = Projectile.rotation.ToRotationVector2(); + + Color drawColor = Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 }; + float drawRotation = Projectile.velocity.ToRotation() + (Projectile.direction == -1 ? MathHelper.Pi : 0f); + Vector2 rotationPoint = proj.Size() * 0.5f; + SpriteEffects flipSprite = Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + Main.EntitySpriteDraw(proj, drawPosition, null, lightColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); + Main.EntitySpriteDraw(glow, drawPosition, null, Color.White, drawRotation, rotationPoint, Projectile.scale, flipSprite); + + int draws = 16; + for (int i = 0; i < draws; i++) + { + float fadeIn = (float)Math.Pow(Utils.GetLerpValue(300, 1, Projectile.timeLeft, true), 3); + Vector2 offset = (MathHelper.TwoPi / draws * i).ToRotationVector2() * 3 * fadeIn; + Main.EntitySpriteDraw(proj, Projectile.Center - Main.screenPosition + offset + Main.rand.NextVector2Circular(3, 3) * fadeIn, null, Effects.ArsenalEffects.ArsenalGaussColor with { A = 0 } * fadeIn * 0.5f, drawRotation, proj.Size() * 0.5f, Projectile.scale, flipSprite); + Main.EntitySpriteDraw(proj, Projectile.Center - Main.screenPosition, null, Color.White with { A = 0 } * fadeIn, drawRotation, proj.Size() * 0.5f, Projectile.scale, flipSprite); + } + + return false; + } + } +} diff --git a/Projectiles/DraedonsArsenal/VulcanSpear.png b/Projectiles/DraedonsArsenal/VulcanSpear.png new file mode 100644 index 0000000000000000000000000000000000000000..cfcab36090dac40c8a10c0554ef19f894be6b14b GIT binary patch literal 3003 zcmV;s3q?-a500004XF*Lt006O% z3;baP000U%X+uL$b5ch_AW20-HZeIiHZ3wPF#rHaiJg{rR8!d&htIt?y-<=6ij>f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8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fK?z`!7_1o0ru!!UO_g_|%i zFfcGUxTETO`|d4K<_il6qwq(r#|LXtU)uYNfq?uAYZMP2J8_he xfnn6+gAWi}ovEv7{AXZ5BxRV#2!RpnaR56@okbZ=jhz4h002ovPDHLkV1g10pUMCL literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/VulcanSpearGlow.png b/Projectiles/DraedonsArsenal/VulcanSpearGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..c010c5ec95367fd58b41cc72c9374cfb10b3c54c GIT binary patch literal 2906 zcmV-g3#IglP)?-a500004XF*Lt006O% z3;baP000U%X+uL$b5ch_AW20-HZeIiHZ3wPF#rHaiJg{rR8!d&htIt?y-<=6ij>f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvD zRIYI4MQ`g1<+DyrL=EogS06Xii({| zv`U^zjmmKqDIK93(F5q|^f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2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe z@An_mJyvsE<#^c%!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf z_v}A;-u3*k3(gmgUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R16003r5L_t(YiDUf#|3AY>1dO8| zAEe;dN9+F#3=9lx{6`t7Y3|7N_|Fek{}~t<81}6^!@$76z~GVgld2Yw3t%3Gxyvcs zgn@y9dI2zUJw8~I`i@!b{}~t%9;SB0jCy>eff4I*05qUU?TTDn(f|Me07*qoM6N<$ Eg7SQK`Tzg` literal 0 HcmV?d00001 diff --git a/Sounds/Item/VulcanRampDown.ogg b/Sounds/Item/VulcanRampDown.ogg new file mode 100644 index 0000000000000000000000000000000000000000..34632181673fc880daa00cebd01bbe06d10e86a9 GIT binary patch literal 28746 zcmce;cR1Y7_cy#mf)J7@(Yxq`C?Q((E_x?=CwebQ^iK4es8LpDbrQX<-bcFE-{0?d-_Ld3_w&~?*X)=x@0l|*XI|&bnR&l2s@B#T0Cd2=p@ZO`O!HCy2Q(@) zPiI#%Tetfnbg7DetL!}Zn`uH*y>Izn;l3priqgE>di_ia`M(B+2mf&5MODzX{b<9f z>S|5nU~8uRmp_d>4bLl{SFZ$K@zOA>TUvOS+d5g(NIQAjx;i^KS~|J2-1ma^@E;y* z5|Y|z04!7qw-QZn@OXk20Pqw5_`tw|_ti?Cr6~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n439hCpDxC}H5dVo zMX6b@dCAea_;AQlk@mL?N3edHZ+fI{O!CPuP&xX02dboNHnqsdlrkNSUw+X)9J5zV zZ}2UUP-P@Av@zPxFFsgRu4PdF0v~G}HfIeJoJe03J8zo{2ZjhnKJToDws;o21d89h z6g+ZyqjPfVu>3W_vSw$|N%;1fZ3UHqDf9P+lF$A6-A^Ra#q_Rof{i1O{XiYJX8ps2 zLu?wPD_3m3s?W{bLMiZkthN*4gF)5!!O!j&UCit@tEkuvP<1?_AOjoiBU{DdLT%f* zEs)ILYKFOt0_A-ygnz^y234;o^LU$#?O&l#9CdYB;ZgKW0($lO~E_ z^lfRA9U_|C3z#7HdSl5@(2ocXBMwJxA#UpW>tyev+}C+gk@I&q`V|!si`CXy$XX00 zhBluZx&_kAaht~`c~P@1d1{>4JxsM-DHAx`QGcB)B9^NQR z7VOt7o$NkWo{0)EDHUujlnKpbDj6rUb@CmZ7=qTglVumVMM(nRT7J1`K=n*z@ZV}q z`i{+x4e331!)A?!3%pXLb32cjct0=L<*R-MKSI(#tHpE178LZ-$ZM5iD6;W{KQs!y(X92?8X`4tnRrLPrCHM7Es>f~7T)_VV D1(g_M literal 0 HcmV?d00001 diff --git a/Sounds/Item/VulcanShot.ogg b/Sounds/Item/VulcanShot.ogg new file mode 100644 index 0000000000000000000000000000000000000000..11c7584d26a29868a1b97bf683e07a2cb8142afe GIT binary patch literal 17130 zcmch;cT`i)*EbqOMT($^G-(P5NRuYg6-7D-NN-9n0@6!Jf)wdRdPhKdiS!zxBE5tn zy-5u{v=AYL+@RlId7iu0``*9qtjT2dWM*5K66eqZEbY`mjM4H4AtKXGmVNY z5et!*i<^bL`$f~G=jH!&SttHeX(ZCT82RsXF_MTt{ibI1zWE&gKNAP>UrwTg4hHt` z>;yF3Y}wx0Tj>4a&!)^K{80GeL-B{AY~0$`R-Tsj&bDj{&R+IzF3wKY&K^7$vk+bR z%Y#?`nH~|~8lgoik#1CTevX0JsbY;3kd9UsHA%l(41eigEiSVXy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+2AJhK!UjDyt6_RdPf#_ Ua5UD?Rb-ysI(J$aSXTW10EUvw&Hw-a literal 0 HcmV?d00001 diff --git a/Systems/Collections/MagicGunIDList.cs b/Systems/Collections/MagicGunIDList.cs index 9bce514ec6..12a5a0174e 100644 --- a/Systems/Collections/MagicGunIDList.cs +++ b/Systems/Collections/MagicGunIDList.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Systems.Collections ItemType(), ItemType(), ItemType(), - ItemType(), + ItemType(), ItemType(), ItemType(), ItemType(), From 6bf2d789773d351fa9ece40fc6f2378e570c1111 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 9 Jun 2025 11:40:58 -0400 Subject: [PATCH 50/72] 1 - Removed a bunch of "Terraria" in on edits 2 - Removed the unimplemented region for a Chlorophyte crystal IL edit 3 - Fixed the prevent Desert Fossil shattering IL edit allowing Pixel Boxes to shatter Desert Fossils 4 - Increased grenade resists from 60% to 66% --- ILEditing/BalancingILChanges.cs | 93 ++++---------------- ILEditing/MechanicILChanges.cs | 56 ++++++------ ILEditing/VanillaStupidityFixingILChanges.cs | 26 +++--- ILEditing/WorldgenILChanges.cs | 11 +-- NPCs/CalamityGlobalNPC.cs | 4 +- 5 files changed, 62 insertions(+), 128 deletions(-) diff --git a/ILEditing/BalancingILChanges.cs b/ILEditing/BalancingILChanges.cs index 5018cee4bb..57e23bd6f3 100644 --- a/ILEditing/BalancingILChanges.cs +++ b/ILEditing/BalancingILChanges.cs @@ -241,18 +241,7 @@ namespace CalamityMod.ILEditing } cursor.Next.Operand = BalancingConstants.SoaringInsigniaRunAccelerationMultiplier; - // Second: Magiluminescence. Find the check for whether it's equipped for run speeds. - if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("hasMagiluminescence"))) - { - LogFailure("Run Acceleration Nerfs", "Could not locate the Magiluminescence bool."); - return; - } - - // - // Don't actually do anything. Magiluminescence is not intended to be nerfed by Calamity. - // - - // Third: Shadow Armor. Find the check for whether it's equipped for run speeds. + // Second: Shadow Armor. Find the check for whether it's equipped for run speeds. if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("shadowArmor"))) { LogFailure("Run Acceleration Nerfs", "Could not locate the Shadow Armor bool."); @@ -396,75 +385,27 @@ namespace CalamityMod.ILEditing private static void PrefixChanges(On_Player.orig_GrantPrefixBenefits orig, Player self, Item item) { orig(self, item); + // Defense accessory prefixes have slightly scaling defense boosts through progression + if (item.prefix >= PrefixID.Hard && item.prefix <= PrefixID.Warding) + { + if (DownedBossSystem.downedDoG) + self.statDefense += 3; + else if (NPC.downedMoonlord) + self.statDefense += 2; + else if (Main.hardMode) + self.statDefense += 1; + } // Hard / Guarding / Armored / Warding give 0.25% / 0.5% / 0.75% / 1% DR if (item.prefix == PrefixID.Hard) - { - /* Prehardmode = 1 - * Hardmode = 2 - * Post-Moon Lord = 3 - * Post-DoG = 4 - */ - - if (DownedBossSystem.downedDoG) - self.statDefense += 3; - else if (NPC.downedMoonlord) - self.statDefense += 2; - else if (Main.hardMode) - self.statDefense += 1; - self.endurance += 0.0025f; - } if (item.prefix == PrefixID.Guarding) - { - /* Prehardmode = 2 - * Hardmode = 3 - * Post-Moon Lord = 4 - * Post-DoG = 5 - */ - - if (DownedBossSystem.downedDoG) - self.statDefense += 3; - else if (NPC.downedMoonlord) - self.statDefense += 2; - else if (Main.hardMode) - self.statDefense += 1; - self.endurance += 0.005f; - } if (item.prefix == PrefixID.Armored) - { - /* Prehardmode = 3 - * Hardmode = 4 - * Post-Moon Lord = 5 - * Post-DoG = 6 - */ - - if (DownedBossSystem.downedDoG) - self.statDefense += 3; - else if (NPC.downedMoonlord) - self.statDefense += 2; - else if (Main.hardMode) - self.statDefense += 1; - self.endurance += 0.0075f; - } if (item.prefix == PrefixID.Warding) - { - /* Prehardmode = 4 - * Hardmode = 5 - * Post-Moon Lord = 6 - * Post-DoG = 7 - */ - - if (DownedBossSystem.downedDoG) - self.statDefense += 3; - else if (NPC.downedMoonlord) - self.statDefense += 2; - else if (Main.hardMode) - self.statDefense += 1; self.endurance += 0.01f; - } + // Lucky prefix increases luck if (item.prefix == PrefixID.Lucky) self.Calamity().calamityBonusLuck += 0.05f; } @@ -501,7 +442,7 @@ namespace CalamityMod.ILEditing private static void VanillaBossResistChanges(ILContext il) { // This IL edit accomplishes two things: - // 1. Reduces Expert+ Eater of Worlds' resist to explosives from 80% to 60%. + // 1. Reduces Expert+ Eater of Worlds' resist to explosives from 80% to 66%. // 2. Effectively removes Lunatic Cultist's resistance to homing projectiles. var cursor = new ILCursor(il); @@ -514,17 +455,15 @@ namespace CalamityMod.ILEditing return; } } - if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchDiv())) + if (!cursor.TryGotoNext(MoveType.AfterLabel, i => i.MatchLdcR4(5f))) { LogFailure("Reduce EoW Grenade Resist", "Could not move to the resist factor."); return; } - // Remove the division instruction, then pop the 5 off the stack to destroy it. Replace it with loading a 0.4 and then multiplying by it. - cursor.Remove(); + // Pop the 5 off the stack, and replace it with a 3. cursor.EmitPop(); - cursor.EmitLdcR4(0.4f); - cursor.EmitMul(); + cursor.EmitLdcR4(3f); // Now, move to the Cultist resist which is right below it. if (!cursor.TryGotoNext(MoveType.Before, i => i.MatchLdsfld(typeof(ProjectileID.Sets), "CultistIsResistantTo"))) diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index ac861e5df4..66779e80e8 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -79,7 +79,7 @@ namespace CalamityMod.ILEditing //private static readonly MethodInfo textureGetValueMethod = typeof(Asset).GetMethod("get_Value", BindingFlags.Public | BindingFlags.Instance); #region Punch Card Spawning Command - private static void SpawnPunchCard(Terraria.On_Main.orig_DoUpdate_HandleChat orig) + private static void SpawnPunchCard(On_Main.orig_DoUpdate_HandleChat orig) { // Any of these conditions should result in normal behaviour if (!Main.drawingPlayerChat || Main.CurrentInputTextTakerOverride != null || Main.editSign || PlayerInput.UsingGamepad) @@ -282,7 +282,7 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ldc_I4, 10 - BalancingConstants.ShieldOfCthulhuBonkNoCollideFrames); } - private static void ApplyDashKeybind(Terraria.On_Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction) + private static void ApplyDashKeybind(On_Player.orig_DoCommonDashHandle orig, Player self, out int dir, out bool dashing, Player.DashStartAction dashStartAction) { // we feasting multiplayer bugs if (self.whoAmI != Main.myPlayer) @@ -334,7 +334,7 @@ namespace CalamityMod.ILEditing #endregion #region Allow Empress to Enrage in Boss Rush - private static bool AllowEmpressToEnrageInBossRush(Terraria.On_NPC.orig_ShouldEmpressBeEnraged orig) + private static bool AllowEmpressToEnrageInBossRush(On_NPC.orig_ShouldEmpressBeEnraged orig) { if (BossRushEvent.BossRushActive) return true; @@ -356,11 +356,11 @@ namespace CalamityMod.ILEditing orig(self, closestPlayer); } - #endregion Prevent Vanilla Bosses From Being Marked as Defeated in Boss Rush + #endregion #region Enabling of Triggered NPC Platform Fallthrough // Why this isn't a mechanism provided by TML itself or vanilla itself is beyond me. - private static void AllowTriggeredFallthrough(Terraria.On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight) + private static void AllowTriggeredFallthrough(On_NPC.orig_ApplyTileCollision orig, NPC self, bool fall, Vector2 cPosition, int cWidth, int cHeight) { if (self.active && self.type == ModContent.NPCType()) { @@ -398,7 +398,7 @@ namespace CalamityMod.ILEditing cursor.Emit(OpCodes.Ret); } - private static void AlterTownNPCSpawnRate(Terraria.On_Main.orig_UpdateTime_SpawnTownNPCs orig) + private static void AlterTownNPCSpawnRate(On_Main.orig_UpdateTime_SpawnTownNPCs orig) { double oldWorldRate = Main.desiredWorldTilesUpdateRate; Main.desiredWorldTilesUpdateRate *= CalamityServerConfig.Instance.TownNPCSpawnRateMultiplier; @@ -483,7 +483,7 @@ namespace CalamityMod.ILEditing #endregion #region Custom Gate Door Logic - private static bool OpenDoor_LabDoorOverride(Terraria.On_WorldGen.orig_OpenDoor orig, int i, int j, int direction) + private static bool OpenDoor_LabDoorOverride(On_WorldGen.orig_OpenDoor orig, int i, int j, int direction) { Tile tile = Main.tile[i, j]; @@ -499,7 +499,7 @@ namespace CalamityMod.ILEditing return orig(i, j, direction); } - private static bool CloseDoor_LabDoorOverride(Terraria.On_WorldGen.orig_CloseDoor orig, int i, int j, bool forced) + private static bool CloseDoor_LabDoorOverride(On_WorldGen.orig_CloseDoor orig, int i, int j, bool forced) { Tile tile = Main.tile[i, j]; @@ -517,7 +517,7 @@ namespace CalamityMod.ILEditing #endregion #region Platform Collision Checks for Grounded Bosses - private static bool EnableCalamityBossPlatformCollision(Terraria.On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self) + private static bool EnableCalamityBossPlatformCollision(On_NPC.orig_Collision_DecideFallThroughPlatforms orig, NPC self) { if ((self.type == ModContent.NPCType() || self.type == ModContent.NPCType() || self.type == ModContent.NPCType() || self.type == ModContent.NPCType() || self.type == ModContent.NPCType()) && @@ -529,7 +529,7 @@ namespace CalamityMod.ILEditing #endregion #region Incorporate Enchantments in Item Names - private static string IncorporateEnchantmentInAffix(Terraria.On_Item.orig_AffixName orig, Item self) + private static string IncorporateEnchantmentInAffix(On_Item.orig_AffixName orig, Item self) { string result = orig(self); @@ -545,7 +545,7 @@ namespace CalamityMod.ILEditing #endregion #region Apply Projectile Variables Upon Creation - private static int IncorporateExtraProjectileVariables(Terraria.On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2) + private static int IncorporateExtraProjectileVariables(On_Projectile.orig_NewProjectile_IEntitySource_float_float_float_float_int_int_float_int_float_float_float orig, IEntitySource spawnSource, float x, float y, float xSpeed, float ySpeed, int type, int damage, float knockback, int owner, float ai0, float ai1, float ai2) { // This is unfortunately not something that can be done via SetDefaults since owner is set // after that method is called. Doing it directly when the projectile is spawned appears to be the only reasonable way. @@ -613,7 +613,7 @@ namespace CalamityMod.ILEditing #endregion #region Apply Old Fashioned Damage to Miscellanous Hits - private static void ApplyOldFashionedDamageToMiscHits(Terraria.On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false) + private static void ApplyOldFashionedDamageToMiscHits(On_Player.orig_ApplyDamageToNPC orig, Player self, NPC npc, int damage, float knockback, int direction, bool crit = false, DamageClass? damageType = null, bool damageVariation = false) { if (self.Calamity().oldFashioned) damage = (int)(damage * OldFashioned.DamageBoostMultiplier); @@ -699,7 +699,7 @@ namespace CalamityMod.ILEditing #endregion #region Fire Cursor Effect for the Calamity Accessory - private static void UseCoolFireCursorEffect(Terraria.On_Main.orig_DrawCursor orig, Vector2 bonus, bool smart) + private static void UseCoolFireCursorEffect(On_Main.orig_DrawCursor orig, Vector2 bonus, bool smart) { Player player = Main.LocalPlayer; @@ -911,7 +911,7 @@ namespace CalamityMod.ILEditing #endregion #region General Particle Rendering - private static void DrawFusableParticles(Terraria.On_Main.orig_SortDrawCacheWorms orig, Main self) + private static void DrawFusableParticles(On_Main.orig_SortDrawCacheWorms orig, Main self) { DeathAshParticle.DrawAll(); @@ -921,7 +921,7 @@ namespace CalamityMod.ILEditing orig(self); } - private static void DrawForegroundParticles(Terraria.On_Main.orig_DrawInfernoRings orig, Main self) + private static void DrawForegroundParticles(On_Main.orig_DrawInfernoRings orig, Main self) { GeneralParticleHandler.DrawAllParticles(Main.spriteBatch); orig(self); @@ -1624,7 +1624,7 @@ namespace CalamityMod.ILEditing ///

/// Determines if the custom grapple movement should take place or not. Useful for hooks that only do movement tricks in some cases /// - private static void CustomGrappleMovementCheck(Terraria.On_Player.orig_GrappleMovement orig, Player self) + private static void CustomGrappleMovementCheck(On_Player.orig_GrappleMovement orig, Player self) { WulfrumPackPlayer mp = self.GetModPlayer(); @@ -1637,7 +1637,7 @@ namespace CalamityMod.ILEditing /// /// This is called right before the game decides wether or not to update the players velocity based on "real" physics (aka not tongued or hooked or with a pulley) /// - private static void CustomGrapplePreDefaultMovement(Terraria.On_Player.orig_UpdatePettingAnimal orig, Player self) + private static void CustomGrapplePreDefaultMovement(On_Player.orig_UpdatePettingAnimal orig, Player self) { orig(self); @@ -1661,7 +1661,7 @@ namespace CalamityMod.ILEditing /// Used before the player steps up a half tile. If we don't do that, players that are grappled but don't use hook movement won't be able to go over tiles. /// The hook cache is reset in PreUpdateMovement /// - private static void CustomGrapplePreStepUp(Terraria.On_Player.orig_SlopeDownMovement orig, Player self) + private static void CustomGrapplePreStepUp(On_Player.orig_SlopeDownMovement orig, Player self) { orig(self); @@ -1675,9 +1675,9 @@ namespace CalamityMod.ILEditing } /// - /// This is done to put the hook if it was cacehd during the frame instruction. + /// This is done to put the hook if it was cached during the frame instruction. /// - private static void CustomGrapplePostFrame(Terraria.On_Player.orig_PlayerFrame orig, Player self) + private static void CustomGrapplePostFrame(On_Player.orig_PlayerFrame orig, Player self) { orig(self); WulfrumPackPlayer mp = self.GetModPlayer(); @@ -1694,7 +1694,7 @@ namespace CalamityMod.ILEditing #region Find Calamity Item Dye Shader - internal static void FindCalamityItemDyeShader(Terraria.On_Player.orig_UpdateItemDye orig, Player self, bool isNotInVanitySlot, bool isSetToHidden, Item armorItem, Item dyeItem) + internal static void FindCalamityItemDyeShader(On_Player.orig_UpdateItemDye orig, Player self, bool isNotInVanitySlot, bool isSetToHidden, Item armorItem, Item dyeItem) { orig(self, isNotInVanitySlot, isSetToHidden, armorItem, dyeItem); if (armorItem.type == ModContent.ItemType()) @@ -1727,7 +1727,7 @@ namespace CalamityMod.ILEditing #endregion #region Custom world selection difficulties - internal static void GetDifficultyOverride(Terraria.GameContent.UI.Elements.On_AWorldListItem.orig_GetDifficulty orig, AWorldListItem self, out string expertText, out Color gameModeColor) + internal static void GetDifficultyOverride(On_AWorldListItem.orig_GetDifficulty orig, AWorldListItem self, out string expertText, out Color gameModeColor) { // Run the original code and pull out the original text and text color orig(self, out expertText, out gameModeColor); @@ -1762,7 +1762,7 @@ namespace CalamityMod.ILEditing #endregion #region Shimmer effect edits - public static void ShimmerEffectEdits(Terraria.On_Item.orig_GetShimmered orig, Item self) + public static void ShimmerEffectEdits(On_Item.orig_GetShimmered orig, Item self) { // Make Plagued Containment Bricks turn into Plagued Nanodroids if shimmered before defeating Golem if (self.type == ModContent.ItemType()) @@ -1805,7 +1805,7 @@ namespace CalamityMod.ILEditing #region Block Abyss from Teleportation Potions - public static void TPOverride(Terraria.On_Player.orig_Teleport orig, Player self, Vector2 newPos, int Style = 0, int extraInfo = 0) + public static void TPOverride(On_Player.orig_Teleport orig, Player self, Vector2 newPos, int Style = 0, int extraInfo = 0) { // Grab the tile from where the potion wants to teleport Tile t = CalamityUtils.ParanoidTileRetrieval(newPos.ToTileCoordinates().X, newPos.ToTileCoordinates().Y); @@ -1850,7 +1850,7 @@ namespace CalamityMod.ILEditing #endregion #region Revengeance Master Mode Twins Shenanigans - public static void TripletsSpawnTextOverride(Terraria.On_NPC.orig_SpawnBoss orig, int x, int y, int type, int targetPlayerIndex) + public static void TripletsSpawnTextOverride(On_NPC.orig_SpawnBoss orig, int x, int y, int type, int targetPlayerIndex) { if (CalamityWorld.death && type == NPCID.Retinazer) { @@ -1974,7 +1974,7 @@ namespace CalamityMod.ILEditing #endregion #region Allow Cannons to use jellyfish - public static void AllowCannonJellyfishUse(Terraria.On_Player.orig_PlaceThing_CannonBall orig, Player self) + public static void AllowCannonJellyfishUse(On_Player.orig_PlaceThing_CannonBall orig, Player self) { // Check if the player is holding a jelly if (self.HeldItem.type == ModContent.ItemType()) @@ -2085,7 +2085,7 @@ namespace CalamityMod.ILEditing #endregion #region Add Stohne to the Jungle - public static void AddStohne(Terraria.GameContent.Biomes.On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY) + public static void AddStohne(On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY) { int anchorX = oldX; int anchorY = oldY; @@ -2629,7 +2629,7 @@ namespace CalamityMod.ILEditing #endregion #region Make Celestial Onion give the Master Mode slot - public static bool MasterModeCelestialOnionCheck(Terraria.On_Player.orig_IsItemSlotUnlockedAndUsable orig, Player self, int slot) + public static bool MasterModeCelestialOnionCheck(On_Player.orig_IsItemSlotUnlockedAndUsable orig, Player self, int slot) { if ((slot == 9 || slot == 19) && self.Calamity().extraAccessoryML && !Main.gameMenu) { diff --git a/ILEditing/VanillaStupidityFixingILChanges.cs b/ILEditing/VanillaStupidityFixingILChanges.cs index d3f3c0cc40..d9298d7598 100644 --- a/ILEditing/VanillaStupidityFixingILChanges.cs +++ b/ILEditing/VanillaStupidityFixingILChanges.cs @@ -18,7 +18,7 @@ using Terraria.Audio; using Terraria.DataStructures; using Terraria.GameContent; using Terraria.GameContent.Drawing; -using Terraria.GameContent.Personalities; +using Terraria.GameContent.ItemDropRules; using Terraria.ID; using Terraria.ModLoader; using Terraria.Graphics.Effects; @@ -154,7 +154,7 @@ namespace CalamityMod.ILEditing #endregion #region Prevention of Slime Rain Spawns When Near Bosses - private static void PreventBossSlimeRainSpawns(Terraria.On_NPC.orig_SlimeRainSpawns orig, int plr) + private static void PreventBossSlimeRainSpawns(On_NPC.orig_SlimeRainSpawns orig, int plr) { if (!Main.player[plr].Calamity().isNearbyBoss && CalamityServerConfig.Instance.BossZen) orig(plr); @@ -307,13 +307,15 @@ namespace CalamityMod.ILEditing LogFailure("Prevent Fossil Shattering", "Could not locate the Desert Fossil Tile ID variable."); return; } + + // Remove this value and replace it with a large number that will never be a valid tile ID. cursor.Remove(); - cursor.Emit(OpCodes.Ldc_I4, TileID.PixelBox); // Change to Pixel Box because it cannot be obtained in-game without cheating. + cursor.Emit(OpCodes.Ldc_I4, 40000); } #endregion #region Remove Hellforge Pickaxe Requirement - private static int RemoveHellforgePickaxeRequirement(Terraria.On_Player.orig_GetPickaxeDamage orig, Player self, int x, int y, int pickPower, int hitBufferIndex, Tile tileTarget) + private static int RemoveHellforgePickaxeRequirement(On_Player.orig_GetPickaxeDamage orig, Player self, int x, int y, int pickPower, int hitBufferIndex, Tile tileTarget) { if (tileTarget.TileType == TileID.Hellforge) pickPower = 65; @@ -331,10 +333,6 @@ namespace CalamityMod.ILEditing } #endregion - #region Fix Chlorophyte Crystal Attacking Where it Shouldn't - // TODO -- Finish this - #endregion Fix Chlorophyte Crystal Attacking Where it Shouldn't - #region Prevent UFO Mount from Dismounting in Water private static void PreventUFODismountInWater(ILContext il) { @@ -367,7 +365,7 @@ namespace CalamityMod.ILEditing #endregion Prevent UFO Mount from Dismounting in Water #region Color Blighted Gel - private static void ColorBlightedGel(Terraria.GameContent.ItemDropRules.On_CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex) + private static void ColorBlightedGel(On_CommonCode.orig_ModifyItemDropFromNPC orig, NPC npc, int itemIndex) { orig(npc, itemIndex); @@ -393,7 +391,7 @@ namespace CalamityMod.ILEditing #endregion Color Blighted Gel #region Improve Angler Quest Rewards - private static void ImproveAnglerRewards(Terraria.On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType) + private static void ImproveAnglerRewards(On_Player.orig_GetAnglerReward orig, Player self, NPC angler, int questItemType) { orig(self, angler, questItemType); @@ -1082,7 +1080,7 @@ namespace CalamityMod.ILEditing var cursor = new ILCursor(il); if (!cursor.TryGotoNext(MoveType.After, i => i.MatchLdfld("magmaStone"))) // Flag for if Magma Stone is equipped. Fire Gauntlet also uses this. { - LogFailure("Make Magma Stone & Fire Gauntlet Dust Toggleable", "Could not locate the magma stone variable."); + LogFailure("Make Magma Stone & Fire Gauntlet Dust Toggleable", "Could not locate the Magma Stone variable."); return; } // Load the player itself onto the stack so that it becomes an argument for the following delegate. @@ -1127,7 +1125,7 @@ namespace CalamityMod.ILEditing } // Remove the instruction and replace with 1 (true). This effectively removes the requirement for defeating Plantera. - // The only requirements for summoning Golems with Power Cells are now: 1) Golem is not alive, and 2) The world is in Hardmode. + // The only requirements for summoning Golem with Power Cells are now: 1) Golem is not alive, and 2) The world is in Hardmode. cursor.EmitPop(); cursor.Emit(OpCodes.Ldc_I4_1); } @@ -1180,7 +1178,7 @@ namespace CalamityMod.ILEditing return; } - // branch is used for exit condition. So setting ble.s opcode to nop will remove the condition + // Branch is used for exit condition. So setting ble.s opcode to nop will remove the condition cursor.Prev.OpCode = OpCodes.Nop; // After that we pop NPC.damage and 0 from stack @@ -1224,7 +1222,7 @@ namespace CalamityMod.ILEditing }*/ #endregion - #region Allow disabling gravity swap visual && allow gravity keybind + #region Allow Disabling Gravity Swap Visual and Allow Gravity Keybind private static void DelayGravity(On_Player.orig_UpdateControlHolds orig, Player Player) { var cplay = Player.Calamity(); diff --git a/ILEditing/WorldgenILChanges.cs b/ILEditing/WorldgenILChanges.cs index 419d4c19f9..ea5a4dd8d7 100644 --- a/ILEditing/WorldgenILChanges.cs +++ b/ILEditing/WorldgenILChanges.cs @@ -8,6 +8,7 @@ using MonoMod.Cil; using Terraria; using Terraria.GameContent.UI.States; using Terraria.ID; +using Terraria.IO; using Terraria.WorldBuilding; namespace CalamityMod.ILEditing @@ -66,7 +67,7 @@ namespace CalamityMod.ILEditing #endregion Fixing of Living Tree/Sulphurous Sea Interactions #region Removal of Hardmode Ore Generation from Evil Altars - private static void PreventSmashAltarCode(Terraria.On_WorldGen.orig_SmashAltar orig, int i, int j) + private static void PreventSmashAltarCode(On_WorldGen.orig_SmashAltar orig, int i, int j) { if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework) return; @@ -135,10 +136,8 @@ namespace CalamityMod.ILEditing return; } - // Pop original value off. + // Pop original value off. Push '2' to the stack. c.Emit(OpCodes.Pop); - - // Push '2' to the stack. c.Emit(OpCodes.Ldc_I4_2); // OBJECTIVE 2 @@ -181,13 +180,11 @@ namespace CalamityMod.ILEditing // Emit our new string "Mods.CalamityMod.UI.SmallWorldWarning". c.Emit(OpCodes.Ldstr, "Mods.CalamityMod.UI.SmallWorldWarning"); - - } #endregion #region Clear temporary modded tiles - private static void ClearModdedTempTiles(Terraria.IO.On_WorldFile.orig_ClearTempTiles orig) + private static void ClearModdedTempTiles(On_WorldFile.orig_ClearTempTiles orig) { orig(); diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 821951eac5..72101a9d55 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -6492,13 +6492,13 @@ namespace CalamityMod.NPCs if (GrenadeResistIDList.Includes(projectile.type)) { // Eater of Worlds has a vanilla resist in Expert+, this gives it to him in Normal mode - // Note that Calamity reduces the vanilla resist from 80% to 60% + // Note that Calamity reduces the vanilla resist from 80% to 66% bool hasResist = EaterOfWorldsIDList.Includes(npc.type) && !Main.expertMode; // Add a resist for BoC's creepers and Prehardmode worm bosses if (npc.type == NPCID.Creeper || DesertScourgeIDList.Includes(npc.type) || PerforatorWormIDList.Includes(npc.type)) hasResist = true; if (hasResist) - modifiers.SourceDamage *= 0.4f; + modifiers.SourceDamage *= 0.33f; } if (modPlayer.camper && !player.StandingStill()) From 38660c7bf9daeca3c1b798367b9beccc5f480aa0 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 7 Jun 2025 15:48:33 -0400 Subject: [PATCH 51/72] Some Skeletron nerfs Teleports now always occur when spin attacks finish, and telegraphs appear when spin attacks start Significantly decreased how fast he backs up during <70% HP spin charges, and decreased how far he has to back up Decreased spin charge velocity multiplier in final phase --- NPCs/CalamityGlobalNPC.cs | 10 ++--- .../Bosses/SkeletronAI.cs | 38 +++++-------------- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 72101a9d55..a6550e07a9 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1564,7 +1564,7 @@ namespace CalamityMod.NPCs { NPCID.Creeper, 1800 }, // 0:30 (30 seconds, length of Creepers phase) { NPCID.Deerclops, 5400 }, // 1:30 (90 seconds) { NPCID.QueenBee, 7200 }, // 2:00 (120 seconds) - { NPCID.SkeletronHead, 9000 }, // 2:30 (150 seconds) + { NPCID.SkeletronHead, 7200 }, // 2:00 (120 seconds) { NPCID.WallofFlesh, 7200 }, // 2:00 (120 seconds) { NPCID.WallofFleshEye, 7200 }, { NPCID.QueenSlimeBoss, 7200 }, // 2:00 (120 seconds) @@ -1575,10 +1575,10 @@ namespace CalamityMod.NPCs { NPCID.TheDestroyerTail, 10800 }, { NPCID.SkeletronPrime, 10800 }, // 3:00 (180 seconds) { NPCID.Plantera, 10800 }, // 3:00 (180 seconds) - { NPCID.HallowBoss, 10800 }, // 3:00 (180 seconds) { NPCID.Golem, 9000 }, // 2:30 (150 seconds) { NPCID.GolemHead, 3600 }, // 1:00 (60 seconds) { NPCID.DukeFishron, 9000 }, // 2:30 (150 seconds) + { NPCID.HallowBoss, 10800 }, // 3:00 (180 seconds) { NPCID.CultistBoss, 9000 }, // 2:30 (150 seconds) { NPCID.MoonLordCore, 14400 }, // 4:00 (240 seconds) { NPCID.MoonLordHand, 7200 }, // 2:00 (120 seconds) @@ -1604,7 +1604,7 @@ namespace CalamityMod.NPCs { NPCType(), 9000 }, { NPCType(), 9000 }, { NPCType(), 10800 }, // 3:00 (180 seconds) - { NPCType(), 14400 }, // 4:00 (240 seconds) + { NPCType(), 10800 }, // 3:00 (180 seconds) { NPCType(), 10800 }, // 3:00 (180 seconds) { NPCType(), 10800 }, { NPCType(), 10800 }, // 3:00 (180 seconds) @@ -1613,7 +1613,7 @@ namespace CalamityMod.NPCs { NPCType(), 7200 }, { NPCType(), 10800 }, // 3:00 (180 seconds) { NPCType(), 10800 }, // 3:00 (180 seconds) - { NPCType(), 5400 }, // 1:30 (90 seconds) + { NPCType(), 7200 }, // 2:00 (120 seconds) { NPCType(), 7200 }, // 2:00 (120 seconds) { NPCType(), 14400 }, // 4:00 (240 seconds) { NPCType(), 10800 }, // 3:00 (180 seconds) @@ -1627,7 +1627,7 @@ namespace CalamityMod.NPCs { NPCType(), 14400 }, // 4:00 (240 seconds) { NPCType(), 14400 }, // DoG Phase 1 is 1:30, DoG Phase 2 is 2:30 { NPCType(), 14400 }, - { NPCType(), 14700 }, // 4:05 (245 seconds) -- he spends 5 seconds invincible where you can't do anything + { NPCType(), 14400 }, // 4:00 (240 seconds) { NPCType(), 21600 }, // 6:00 (360 seconds) { NPCType(), 21600 }, { NPCType(), 21600 }, // 6:00 (360 seconds) diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs index ede2fc2457..bb95bf2971 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronAI.cs @@ -276,9 +276,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Dust to show teleport int ai3 = (int)npc.ai[3]; // 0 to 30, and -60 - bool emitDust = false; - if (ai3 >= teleportGateValue && calamityGlobalNPC.newAI[2] == 0f && calamityGlobalNPC.newAI[3] == 0f) + if (npc.localAI[0] == 1f && calamityGlobalNPC.newAI[2] == 0f && calamityGlobalNPC.newAI[3] == 0f) { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -312,6 +311,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } + // Teleport location telegraph if (calamityGlobalNPC.newAI[2] != 0f && calamityGlobalNPC.newAI[3] != 0f) { for (int m = 0; m < 5; m++) @@ -322,24 +322,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses } } - if (ai3 >= teleportGateValue + 90) - { - emitDust = true; - } - else if (ai3 >= teleportGateValue + 30) - { - if (Main.rand.Next(teleportGateValue + 10, ai3 + 1) >= teleportGateValue + 25) - emitDust = true; - } - - if (emitDust) - { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, dustType, 0f, 0f, 100, default, 1.5f); - Main.dust[dust].noGravity = true; - } - // Teleport - if (Main.netMode != NetmodeID.MultiplayerClient && npc.ai[3] >= teleportGateValue + 120 && (!(npc.ai[1] == 1f && phase3) || death)) + if (Main.netMode != NetmodeID.MultiplayerClient && npc.localAI[0] == 0f && npc.ai[1] != 1f && calamityGlobalNPC.newAI[2] != 0f && calamityGlobalNPC.newAI[3] != 0f) { // Teleport dust for (int m = 0; m < 30; m++) @@ -351,10 +335,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // New location npc.Center = new Vector2(calamityGlobalNPC.newAI[2], calamityGlobalNPC.newAI[3]); - - // Do not set velocity to zero during charge attacks - if (npc.ai[1] != 1f) - npc.velocity = Vector2.Zero; + npc.velocity = Vector2.Zero; npc.ai[3] = -60f; calamityGlobalNPC.newAI[2] = calamityGlobalNPC.newAI[3] = 0f; @@ -422,11 +403,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.localAI[1] = chargePhaseGateValue; float forcedMoveAwayTime = death ? 15f : 45f; - float canChargeDistance = phase3 ? 480f : 320f; // 20 tile distance, 30 tile distance in phase 3 + float canChargeDistance = 320f; // 20 tile distance bool hasMovedForcedDistance = npc.localAI[2] >= forcedMoveAwayTime; bool canCharge = Vector2.Distance(Main.player[npc.target].Center, npc.Center) >= canChargeDistance; bool charge = npc.ai[2] >= chargePhaseGateValue && canCharge; - bool forceCharge = npc.ai[2] > chargePhaseGateValue + 120f * chargePhaseChangeRate; + bool forceCharge = npc.ai[2] > chargePhaseGateValue + 120f; if (charge || forceCharge) { npc.localAI[2] += 1f; @@ -434,6 +415,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { npc.ai[2] = 0f; npc.ai[1] = 1f; + npc.localAI[0] = 1f; npc.localAI[1] = chargePhaseGateValue; npc.localAI[2] = 0f; calamityGlobalNPC.newAI[1] = 0f; @@ -462,8 +444,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { if (!canCharge || !hasMovedForcedDistance) { - float phase5Multiplier = 1.33f; - float maxVelocity = (npc.ai[2] - moveAwayGateValue) * (moveAwayVelocity * 0.008f); + float phase5Multiplier = 1.2f; + float maxVelocity = (npc.ai[2] - moveAwayGateValue) * (moveAwayVelocity * 0.002f); if (phase5) maxVelocity *= phase5Multiplier; @@ -474,7 +456,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses maxVelocity = maxVelocityCap; npc.velocity = (Main.player[npc.target].Center - npc.Center).SafeNormalize(Vector2.UnitY) * -maxVelocity; - npc.SyncMotionToServer(); } @@ -497,7 +478,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses // Force net updates every frame during this movement to avoid despawning in multiplayer // I'm doing this because npc.ai[2] changes every frame and that's used to calculate Skeletron's velocity here npc.ForceNetUpdate(); - return false; } From f90b4f463a7a9fecfcbbde1ddf2994d8dfe0b266 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Jun 2025 21:24:50 -0400 Subject: [PATCH 52/72] Some Yharon tweaks 1 - Changed a few phase thresholds to be more even 2 - Slightly increased bullet hell flare dust velocity (This may seem like a straight buff, but it also means that they clear out sooner, resulting in less attack overlap) 3 - Slightly decreased the density of slow bullet hells in SP6 and SP7 --- NPCs/Yharon/Yharon.cs | 18 ++++++++---------- Projectiles/Boss/FlareDust.cs | 4 ++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/NPCs/Yharon/Yharon.cs b/NPCs/Yharon/Yharon.cs index 2d02ef43ab..1df0ab61b2 100644 --- a/NPCs/Yharon/Yharon.cs +++ b/NPCs/Yharon/Yharon.cs @@ -221,9 +221,9 @@ namespace CalamityMod.NPCs.Yharon } // Phase booleans - float phase2GateValue = revenge ? 0.9f : expertMode ? 0.85f : 0.75f; + float phase2GateValue = revenge ? 0.9f : expertMode ? 0.85f : 0.8f; bool phase2Check = death || lifeRatio <= phase2GateValue; - bool phase3Check = lifeRatio <= (death ? 0.8f : revenge ? 0.75f : expertMode ? 0.7f : 0.625f); + bool phase3Check = lifeRatio <= (death ? 0.8f : revenge ? 0.75f : expertMode ? 0.7f : 0.65f); bool phase4Check = lifeRatio <= ai2GateValue; bool phase1Change = NPC.ai[0] > -1f; bool phase2Change = NPC.ai[0] > 5f; @@ -1436,7 +1436,7 @@ namespace CalamityMod.NPCs.Yharon if (Main.netMode != NetmodeID.MultiplayerClient) { - DoFlareDustBulletHell(1, flareDustPhaseTimer, NPC.GetProjectileDamage(ModContent.ProjectileType()), 8, 12f, 3.6f, false); + DoFlareDustBulletHell(1, flareDustPhaseTimer, NPC.GetProjectileDamage(ModContent.ProjectileType()), 8, 13f, 3.6f, false); } } @@ -1623,12 +1623,10 @@ namespace CalamityMod.NPCs.Yharon { CalamityGlobalNPC.yharonP2 = NPC.whoAmI; - float phase2GateValue = revenge ? 0.44f : expertMode ? 0.385f : 0.275f; + float phase2GateValue = revenge ? 0.45f : expertMode ? 0.35f : 0.3f; bool phase2 = death || lifeRatio <= phase2GateValue; - float phase3GateValue = death ? 0.358f : revenge ? 0.275f : expertMode ? 0.22f : 0.138f; - bool phase3 = lifeRatio <= phase3GateValue; - float phase4GateValue = death ? 0.165f : 0.11f; - bool phase4 = lifeRatio <= phase4GateValue && revenge; + bool phase3 = lifeRatio <= (death ? 0.35f : revenge ? 0.3f : expertMode ? 0.2f : 0.15f); + bool phase4 = lifeRatio <= (death ? 0.2f : 0.15f) && revenge; if (NPC.ai[0] != 5f && NPC.ai[0] != 8f) { @@ -1786,7 +1784,7 @@ namespace CalamityMod.NPCs.Yharon int spinPhaseTimer = secondPhasePhase == 4 ? (bossRush ? 80 : death ? 100 : 120) : (bossRush ? 120 : death ? 150 : 180); int flareDustSpawnDivisor = spinPhaseTimer / 10; - int flareDustSpawnDivisor2 = spinPhaseTimer / 20 + (secondPhasePhase == 4 ? spinPhaseTimer / 60 : 0); + int flareDustSpawnDivisor2 = spinPhaseTimer / 15 + (secondPhasePhase == 4 ? spinPhaseTimer / 60 : 0); float increasedIdleTimeAfterBulletHell = (death ? 120f : 180f) + phaseSwitchTimer; bool moveSlowerAfterBulletHell = NPC.ai[1] < 0f; @@ -2358,7 +2356,7 @@ namespace CalamityMod.NPCs.Yharon if (NPC.ai[1] % flareDustSpawnDivisor2 == 0f) { int totalProjectiles = secondPhasePhase == 4 ? 12 : 10; - float projectileVelocity = secondPhasePhase == 4 ? 16f : 12f; + float projectileVelocity = secondPhasePhase == 4 ? 17f : 13f; float radialOffset = secondPhasePhase == 4 ? 2.8f : 3.2f; if (NPC.localAI[3] == 0f) { diff --git a/Projectiles/Boss/FlareDust.cs b/Projectiles/Boss/FlareDust.cs index 24a4917bfb..a2d4f36aef 100644 --- a/Projectiles/Boss/FlareDust.cs +++ b/Projectiles/Boss/FlareDust.cs @@ -82,14 +82,14 @@ namespace CalamityMod.Projectiles.Boss float earlyTimeProjSpeed = Projectile.localAI[0] / 120f; if (earlyTimeProjSpeed > 1f) earlyTimeProjSpeed = 1f; - distance += MathHelper.Lerp(1f, 9f, earlyTimeProjSpeed); + distance += MathHelper.Lerp(1f, 11f, earlyTimeProjSpeed); if (Projectile.timeLeft < 380) { float longTimeProjSpeed = (Projectile.localAI[0] - 300f) / 240f; if (longTimeProjSpeed > 1f) longTimeProjSpeed = 1f; - distance += MathHelper.Lerp(1f, 9f, longTimeProjSpeed); + distance += MathHelper.Lerp(1f, 11f, longTimeProjSpeed); } double rad = MathHelper.ToRadians(Projectile.ai[1]); From 61ba4b56da20973558e34e9f0309d35b262e66a6 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Jun 2025 22:15:24 -0400 Subject: [PATCH 53/72] Ares laser arm in mecha mayhem now only sweeps horizontally and swaps sides each time it fires Mecha mayhem now requires alternating holding A and D keys instead of just holding A key we're making so much progress guys --- NPCs/ExoMechs/Ares/AresBody.cs | 5 +++-- NPCs/ExoMechs/Ares/AresLaserCannon.cs | 17 +++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/NPCs/ExoMechs/Ares/AresBody.cs b/NPCs/ExoMechs/Ares/AresBody.cs index 416eb7870a..d8fcf7c080 100644 --- a/NPCs/ExoMechs/Ares/AresBody.cs +++ b/NPCs/ExoMechs/Ares/AresBody.cs @@ -505,11 +505,12 @@ namespace CalamityMod.NPCs.ExoMechs.Ares } // Prevent mechs from being respawned - if (otherExoMechWasFirst) + // CIT 08JUN2025: This code is pointless and makes me unable to work swapping the laser arm position. Commenting it out. + /*if (otherExoMechWasFirst) { if (NPC.ai[3] < 1f) NPC.ai[3] = 1f; - } + }*/ // Phases bool spawnOtherExoMechs = lifeRatio < 0.7f && NPC.ai[3] == 0f; diff --git a/NPCs/ExoMechs/Ares/AresLaserCannon.cs b/NPCs/ExoMechs/Ares/AresLaserCannon.cs index 81107f0d5a..a81f63a56e 100644 --- a/NPCs/ExoMechs/Ares/AresLaserCannon.cs +++ b/NPCs/ExoMechs/Ares/AresLaserCannon.cs @@ -184,6 +184,8 @@ namespace CalamityMod.NPCs.ExoMechs.Ares bool nerfedAttacks = false; if (exoTwinsAlive) nerfedAttacks = Main.npc[CalamityGlobalNPC.draedonExoMechTwinGreen].Calamity().newAI[1] != (float)Apollo.Apollo.SecondaryPhase.PassiveAndImmune; + // Used to make the beam only sweep horizontally during mecha mayhem phase + bool mechaMayhem = nerfedAttacks && exoWormAlive && Main.npc[CalamityGlobalNPC.draedonExoMechWorm].Calamity().newAI[1] != (float)ThanatosHead.SecondaryPhase.PassiveAndImmune; // Phases bool berserk = lifeRatio < 0.4f || (otherExoMechsAlive == 0 && lifeRatio < 0.7f); @@ -346,7 +348,7 @@ namespace CalamityMod.NPCs.ExoMechs.Ares else if (shouldGetBuffedByBerserkPhase) deathrayPhaseGateValue *= 0.5f; - float deathrayPhaseVelocity = (nerfedAttacks ? 6f : passivePhase ? 9f : 12f) * baseVelocityMult; + float deathrayPhaseVelocity = (nerfedAttacks ? 8f : passivePhase ? 9f : 12f) * baseVelocityMult; if (lastMechAlive) deathrayPhaseVelocity *= 1.2f; else if (shouldGetBuffedByBerserkPhase) @@ -512,10 +514,21 @@ namespace CalamityMod.NPCs.ExoMechs.Ares AIState = (float)Phase.Nothing; calamityGlobalNPC.newAI[2] = 0f; - // Change deathray sweep type for next deathray phase + // Change deathray sweep type for next deathray phase; this does not affect anything during mecha mayhem calamityGlobalNPC.newAI[3] += 1f; if (calamityGlobalNPC.newAI[3] > 1f) calamityGlobalNPC.newAI[3] = 0f; + + // If mecha mayhem, make Ares swap the position of the laser and gauss arms, and ensure the beam always sweeps horizontal + if (mechaMayhem) + { + calamityGlobalNPC.newAI[3] = 0f; + if (Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ai[3] == 0f) + Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ai[3] = 1f; + else + Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ai[3] = 0f; + Main.npc[CalamityGlobalNPC.draedonExoMechPrime].ForceNetUpdate(); + } } break; From a1cce765763ffbf7e7f4484647156c31adefa194 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 8 Jun 2025 22:58:07 -0400 Subject: [PATCH 54/72] Brimmy and Signus can deal contact damage while drifting towards the player again --- NPCs/BrimstoneElemental/BrimstoneElemental.cs | 6 ++---- NPCs/Signus/Signus.cs | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/NPCs/BrimstoneElemental/BrimstoneElemental.cs b/NPCs/BrimstoneElemental/BrimstoneElemental.cs index 4034b028a6..982e79e6e9 100644 --- a/NPCs/BrimstoneElemental/BrimstoneElemental.cs +++ b/NPCs/BrimstoneElemental/BrimstoneElemental.cs @@ -331,15 +331,13 @@ namespace CalamityMod.NPCs.BrimstoneElemental // Pick a location to teleport to else if (NPC.ai[0] == 0f) { - // Avoid cheap bullshit - NPC.damage = 0; + // Set damage + NPC.damage = NPC.defDamage; NPC.chaseable = true; if (Main.netMode != NetmodeID.MultiplayerClient) { NPC.localAI[1] += 1f; - if (NPC.Distance(player.Center) < 160f) - NPC.localAI[1] += death ? 4f : expertMode ? 2f : 1f; if (NPC.localAI[1] >= (bossRush ? 90f : death ? 120f : 180f)) { diff --git a/NPCs/Signus/Signus.cs b/NPCs/Signus/Signus.cs index e087815b33..d9640e402a 100644 --- a/NPCs/Signus/Signus.cs +++ b/NPCs/Signus/Signus.cs @@ -288,8 +288,8 @@ namespace CalamityMod.NPCs.Signus } else if (NPC.ai[0] == 0f) { - // Avoid cheap bullshit - NPC.damage = 0; + // Set damage + NPC.damage = NPC.defDamage; if (Main.netMode != NetmodeID.MultiplayerClient) { From 66948d0ac64860ffacd31bbf53940a37eec6f7ae Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 10 Jun 2025 16:26:20 -0400 Subject: [PATCH 55/72] Removed Foveanator --- DataStructures/NPCStats.cs | 10 - Events/BossRushEvent.cs | 3 +- ILEditing/ILChangesLoading.cs | 3 - ILEditing/MechanicILChanges.cs | 61 -- NPCs/CalamityGlobalNPC.cs | 8 +- NPCs/NormalNPCs/Foveanator.cs | 966 ------------------ NPCs/NormalNPCs/Foveanator.png | Bin 28939 -> 0 bytes NPCs/NormalNPCs/FoveanatorGlow.png | Bin 1524 -> 0 bytes NPCs/NormalNPCs/Foveanator_Head_Boss.png | Bin 637 -> 0 bytes .../Foveanator_Phase2_Head_Boss.png | Bin 618 -> 0 bytes NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs | 36 +- Projectiles/Boss/FoveanatorEnergyBomb.cs | 152 --- Projectiles/Boss/FoveanatorEnergyBomb.png | Bin 15428 -> 0 bytes Projectiles/Boss/FoveanatorFlamethrower.cs | 158 --- Projectiles/Boss/FoveanatorLaser.cs | 101 -- Projectiles/Boss/FoveanatorLaser.png | Bin 605 -> 0 bytes .../Collections/NPCs/BossRushHPChangeDict.cs | 1 - .../Collections/NPCs/EnemyImmunitiesList.cs | 1 - 18 files changed, 16 insertions(+), 1484 deletions(-) delete mode 100644 NPCs/NormalNPCs/Foveanator.cs delete mode 100644 NPCs/NormalNPCs/Foveanator.png delete mode 100644 NPCs/NormalNPCs/FoveanatorGlow.png delete mode 100644 NPCs/NormalNPCs/Foveanator_Head_Boss.png delete mode 100644 NPCs/NormalNPCs/Foveanator_Phase2_Head_Boss.png delete mode 100644 Projectiles/Boss/FoveanatorEnergyBomb.cs delete mode 100644 Projectiles/Boss/FoveanatorEnergyBomb.png delete mode 100644 Projectiles/Boss/FoveanatorFlamethrower.cs delete mode 100644 Projectiles/Boss/FoveanatorLaser.cs delete mode 100644 Projectiles/Boss/FoveanatorLaser.png diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index c346d23677..2cac2472aa 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -200,7 +200,6 @@ namespace CalamityMod { NPCID.Spazmatism, 0.85 }, { NPCID.Retinazer, 0.85 }, - { ModContent.NPCType(), 0.85 }, { ModContent.NPCType(), 1.1 }, { ModContent.NPCType(), 0.8 }, @@ -399,12 +398,6 @@ namespace CalamityMod 102, // 153 in phase 2 119, // 178 in phase 2 153 } }, // 229 in phase 2 - { ModContent.NPCType(), new int[] { - 62, // 93 in phase 2 - 94, // 141 in phase 2 - 110, // 165 in phase 2 - 128, // 192 in phase 2 - 178 } }, // 267 in phase 2 { ModContent.NPCType(), new int[] { 110, 176, 187, 198, 330 } }, { ModContent.NPCType(), new int[] { 75, 112, 136, 160, 240 } }, @@ -649,9 +642,6 @@ namespace CalamityMod { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 120, 148, 176, 264 } }, { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } }, { new Tuple(NPCID.Spazmatism, ModContent.ProjectileType()), new int[] { 60, 100, 128, 156, 234 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 50, 108, 132, 156, 234 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } }, - { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 148, 176, 264 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 60, 100, 120, 140, 210 } }, { new Tuple(ModContent.NPCType(), ModContent.ProjectileType()), new int[] { 70, 120, 136, 152, 228 } }, diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 42f0556052..2b9520ea19 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -213,8 +213,7 @@ namespace CalamityMod.Events { NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Spazmatism); NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, NPCID.Retinazer); - NPC.SpawnOnPlayer(ClosestPlayerToWorldCenter, ModContent.NPCType()); - }, permittedNPCs: new int[] { NPCID.Retinazer, ModContent.NPCType() }), + }, permittedNPCs: new int[] { NPCID.Retinazer }), new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), diff --git a/ILEditing/ILChangesLoading.cs b/ILEditing/ILChangesLoading.cs index f972954fa5..72c78c0ed9 100644 --- a/ILEditing/ILChangesLoading.cs +++ b/ILEditing/ILChangesLoading.cs @@ -91,9 +91,6 @@ namespace CalamityMod.ILEditing On_AWorldListItem.GetDifficulty += GetDifficultyOverride; On_Item.GetShimmered += ShimmerEffectEdits; On_Player.Teleport += TPOverride; - On_NPC.SpawnBoss += TripletsSpawnTextOverride; - On_NPC.DoDeathEvents_BeforeLoot += PreventFoveanatorDefeatMessageIfNotKilledLast; - On_NPC.DoDeathEvents_CelebrateBossDeath += TripletsDefeatTextOverride; On_TileDrawing.DrawSingleTile += GlowMaskTileRender; On_Main.DoUpdate_HandleChat += SpawnPunchCard; On_Player.PlaceThing_CannonBall += AllowCannonJellyfishUse; diff --git a/ILEditing/MechanicILChanges.cs b/ILEditing/MechanicILChanges.cs index 66779e80e8..611592cad6 100644 --- a/ILEditing/MechanicILChanges.cs +++ b/ILEditing/MechanicILChanges.cs @@ -1849,67 +1849,6 @@ namespace CalamityMod.ILEditing } #endregion - #region Revengeance Master Mode Twins Shenanigans - public static void TripletsSpawnTextOverride(On_NPC.orig_SpawnBoss orig, int x, int y, int type, int targetPlayerIndex) - { - if (CalamityWorld.death && type == NPCID.Retinazer) - { - int retinazerIndex = NPC.NewNPC(NPC.GetBossSpawnSource(targetPlayerIndex), x, y, type, 1); - if (retinazerIndex == 200) - { - return; - } - Main.npc[retinazerIndex].target = targetPlayerIndex; - Main.npc[retinazerIndex].timeLeft *= 20; - - if (Main.dedServ && retinazerIndex < 200) - { - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, retinazerIndex); - } - - AchievementsHelper.CheckMechaMayhem(); - - CalamityUtils.DisplayLocalizedText("Mods.CalamityMod.Status.Boss.TripletsBossText", new Color(175, 75, 255)); - return; - } - else - { - orig(x, y, type, targetPlayerIndex); - } - } - - public static void PreventFoveanatorDefeatMessageIfNotKilledLast(On_NPC.orig_DoDeathEvents_BeforeLoot orig, NPC self, Player closestPlayer) - { - if (CalamityWorld.death && self.type == ModContent.NPCType() && (NPC.AnyNPCs(NPCID.Spazmatism) || NPC.AnyNPCs(NPCID.Retinazer))) - { - self.value = 0f; - self.boss = false; - return; - } - else - { - orig(self, closestPlayer); - } - } - - public static void TripletsDefeatTextOverride(On_NPC.orig_DoDeathEvents_CelebrateBossDeath orig, NPC self, string typeName) - { - bool correctNPCType = self.type == NPCID.Retinazer || self.type == NPCID.Spazmatism || self.type == ModContent.NPCType(); - if (CalamityWorld.death && correctNPCType) - { - if (Main.netMode == NetmodeID.SinglePlayer) - Main.NewText(Language.GetTextValue("Announcement.HasBeenDefeated_Plural", CalamityUtils.GetTextValue("Status.Boss.TripletsDefeatName")), 175, 75, 255); - else if (Main.dedServ) - ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasBeenDefeated_Plural", NetworkText.FromKey("Mods.CalamityMod.Status.Boss.TripletsDefeatName")), new Color(175, 75, 255)); - return; - } - else - { - orig(self, typeName); - } - } - #endregion - #region Optimized GlowMask Rendering on Tile private static void GlowMaskTileRender(On_TileDrawing.orig_DrawSingleTile orig, TileDrawing self, TileDrawInfo drawData, bool solidLayer, int waterStyleOverride, Vector2 screenPosition, Vector2 screenOffset, int tileX, int tileY) { diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index a6550e07a9..82bafed550 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1920,7 +1920,7 @@ namespace CalamityMod.NPCs { npc.lifeMax = (int)Math.Round(npc.lifeMax * 0.55); } - else if (npc.type == NPCID.Retinazer || npc.type == NPCID.Spazmatism || npc.type == NPCType()) + else if (npc.type == NPCID.Retinazer || npc.type == NPCID.Spazmatism) { npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.2); npc.npcSlots = 10f; @@ -2938,7 +2938,7 @@ namespace CalamityMod.NPCs { if (!NPC.downedMechBossAny) { - if (DestroyerIDList.Includes(npc.type) || npc.type == NPCID.Probe || SkeletronPrimeIDList.Includes(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType()) + if (DestroyerIDList.Includes(npc.type) || npc.type == NPCID.Probe || SkeletronPrimeIDList.Includes(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer) { double multiplier = Main.expertMode ? EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert : EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Classic; npc.lifeMax = (int)Math.Round(npc.lifeMax * multiplier); @@ -2948,7 +2948,7 @@ namespace CalamityMod.NPCs } else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) { - if (DestroyerIDList.Includes(npc.type) || npc.type == NPCID.Probe || SkeletronPrimeIDList.Includes(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType()) + if (DestroyerIDList.Includes(npc.type) || npc.type == NPCID.Probe || SkeletronPrimeIDList.Includes(npc.type) || npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer) { double multiplier = Main.expertMode ? EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert : EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Classic; npc.lifeMax = (int)Math.Round(npc.lifeMax * multiplier); @@ -3959,7 +3959,7 @@ namespace CalamityMod.NPCs public override bool PreAI(NPC npc) { // Change Spaz and Ret weaknesses and resistances when phase 2 starts. - if (npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer || npc.type == NPCType()) + if (npc.type == NPCID.Spazmatism || npc.type == NPCID.Retinazer) { if (npc.ai[0] >= 2f) { diff --git a/NPCs/NormalNPCs/Foveanator.cs b/NPCs/NormalNPCs/Foveanator.cs deleted file mode 100644 index 963e8d7f0f..0000000000 --- a/NPCs/NormalNPCs/Foveanator.cs +++ /dev/null @@ -1,966 +0,0 @@ -using System; -using System.IO; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.DataStructures; -using CalamityMod.Events; -using CalamityMod.NPCs.AstrumDeus; -using CalamityMod.Projectiles.Boss; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.Audio; -using Terraria.Chat; -using Terraria.GameContent; -using Terraria.GameContent.Achievements; -using Terraria.GameContent.Bestiary; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.NormalNPCs -{ - public class Foveanator : ModNPC - { - public static int phase1IconIndex; - public static int phase2IconIndex; - - public static Asset GlowTexture; - - public override void Load() - { - string phase1IconPath = "CalamityMod/NPCs/NormalNPCs/Foveanator_Head_Boss"; - string phase2IconPath = "CalamityMod/NPCs/NormalNPCs/Foveanator_Phase2_Head_Boss"; - - phase1IconIndex = CalamityMod.Instance.AddBossHeadTexture(phase1IconPath, -1); - phase2IconIndex = CalamityMod.Instance.AddBossHeadTexture(phase2IconPath, -1); - } - - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; - NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); - - if (!Main.dedServ) - GlowTexture = ModContent.Request("CalamityMod/NPCs/NormalNPCs/FoveanatorGlow", AssetRequestMode.AsyncLoad); - } - - public override void SetDefaults() - { - NPC.Calamity().canBreakPlayerDefense = true; - NPC.aiStyle = -1; - AIType = -1; - NPC.GetNPCDamage(); - NPC.DR_NERD(0.2f); - - NPC.width = 100; - NPC.height = 100; - if (Main.tenthAnniversaryWorld) - NPC.scale *= 0.5f; - if (CalamityWorld.LegendaryMode) - NPC.scale *= 0.8f; - - NPC.defense = 10; - NPC.lifeMax = 24000; - NPC.knockBackResist = 0f; - NPC.noGravity = true; - NPC.noTileCollide = true; - NPC.boss = true; - NPC.SpawnWithHigherTime(30); - NPC.HitSound = SoundID.NPCHit1; - NPC.DeathSound = SoundID.NPCDeath14; - NPC.Calamity().VulnerableToCold = true; - NPC.Calamity().VulnerableToHeat = true; - NPC.Calamity().VulnerableToSickness = true; - AnimationType = NPCID.Retinazer; - Music = MusicID.Boss2; - - CalamityGlobalNPC.AdjustMasterModeStatScaling(NPC, true); - } - - public override void SendExtraAI(BinaryWriter writer) - { - 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.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 BossHeadSlot(ref int index) => index = NPC.ai[0] >= 3f ? phase2IconIndex : phase1IconIndex; - - public override void AI() - { - CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); - - bool bossRush = BossRushEvent.BossRushActive; - - // Get a target - if (NPC.target < 0 || NPC.target == Main.maxPlayers || Main.player[NPC.target].dead || !Main.player[NPC.target].active) - CalamityUtils.CalamityTargeting(NPC, default); - - float enrageScale = bossRush ? 0.5f : 0.3f; - if (Main.IsItDay() || bossRush) - { - NPC.Calamity().CurrentlyEnraged = !bossRush; - enrageScale += 1f; - } - - // Percent life remaining - float lifeRatio = NPC.life / (float)NPC.lifeMax; - - // Check for Retinazer - bool retAlive = false; - if (CalamityGlobalNPC.laserEye != -1) - retAlive = Main.npc[CalamityGlobalNPC.laserEye].active; - - // Check for Spazmatism or Retinazer - bool spazAlive = false; - if (CalamityGlobalNPC.fireEye != -1) - spazAlive = Main.npc[CalamityGlobalNPC.fireEye].active; - - // Explode if ret and spaz are dead - if (!retAlive && !spazAlive) - { - NPC.life = 0; - NPC.HitEffect(); - NPC.active = false; - NPC.netUpdate = true; - return; - } - - Vector2 lookDirection = NPC.Center - Main.player[NPC.target].Center; - int direction = (NPC.Center.X < Main.player[NPC.target].position.X + Main.player[NPC.target].width) ? -1 : 1; - - float hoverRotation = lookDirection.ToRotation() + MathHelper.PiOver2; - if (hoverRotation < 0f) - hoverRotation += MathHelper.TwoPi; - else if (hoverRotation > MathHelper.TwoPi) - hoverRotation -= MathHelper.TwoPi; - - // Rotate faster during energy bomb and laser barrage - float rotationRate = NPC.ai[1] == 3f ? 0.25f : 0.15f; - NPC.rotation = NPC.rotation.AngleTowards(hoverRotation, rotationRate); - - if (Main.rand.NextBool(5)) - { - int foveaDust = Dust.NewDust(new Vector2(NPC.position.X, NPC.position.Y + NPC.height * 0.25f), NPC.width, (int)(NPC.height * 0.5f), DustID.Blood, NPC.velocity.X, 2f, 0, default, 1f); - Dust dust = Main.dust[foveaDust]; - dust.velocity.X *= 0.5f; - dust.velocity.Y *= 0.1f; - } - - if (Main.netMode != NetmodeID.MultiplayerClient && !Main.player[NPC.target].dead && NPC.timeLeft < 10) - { - for (int i = 0; i < Main.maxNPCs; i++) - { - if (i != NPC.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism || Main.npc[i].type == NPC.type) && Main.npc[i].timeLeft - 1 > NPC.timeLeft) - NPC.timeLeft = Main.npc[i].timeLeft - 1; - } - } - - // Phase HP ratios - float phase2LifeRatio = 0.85f; - float finalPhaseLifeRatio = 0.4f; - - // Movement variables - float phase1MaxSpeedIncrease = 2f; - float phase1MaxAccelerationIncrease = 0.025f; - float phase1MaxChargeSpeedIncrease = 1f; - - // Phase duration variables - float phase1MaxLaserPhaseDurationDecrease = 120f; - - // Go to phase 2 early if Spaz and Ret health total goes below 50% - // Go to final phase early if Spaz and Ret health total goes below 20% - float retAndSpazHPRatio = 0f; - if (CalamityGlobalNPC.fireEye != -1) - { - if (Main.npc[CalamityGlobalNPC.fireEye].active) - retAndSpazHPRatio += Main.npc[CalamityGlobalNPC.fireEye].life / (float)Main.npc[CalamityGlobalNPC.fireEye].lifeMax; - } - if (CalamityGlobalNPC.laserEye != -1) - { - if (Main.npc[CalamityGlobalNPC.laserEye].active) - retAndSpazHPRatio += Main.npc[CalamityGlobalNPC.laserEye].life / (float)Main.npc[CalamityGlobalNPC.laserEye].lifeMax; - } - - // Phase checks - bool phase2 = lifeRatio < phase2LifeRatio || retAndSpazHPRatio < 0.5f; - bool finalPhase = lifeRatio < finalPhaseLifeRatio || retAndSpazHPRatio < 0.2f; - - Vector2 mechQueenSpacing = Vector2.Zero; - if (NPC.IsMechQueenUp) - { - NPC NPC = Main.npc[NPC.mechQueen]; - Vector2 mechQueenCenter = NPC.GetMechQueenCenter(); - Vector2 eyePosition = new Vector2(0f, -300f); - eyePosition *= 0.75f; - float mechdusaRotation = NPC.velocity.X * 0.025f; - mechQueenSpacing = mechQueenCenter + eyePosition; - mechQueenSpacing = mechQueenSpacing.RotatedBy(mechdusaRotation, mechQueenCenter); - } - - NPC.reflectsProjectiles = false; - - // Despawn - if (Main.player[NPC.target].dead) - { - NPC.velocity.Y -= 0.04f; - if (NPC.timeLeft > 10) - { - NPC.timeLeft = 10; - return; - } - } - - else if (NPC.ai[0] == 0f) - { - if (NPC.ai[1] == 0f) - { - // Avoid cheap bullshit - NPC.damage = 0; - - float maxVelocity = 8.5f; - float acceleration = 0.12f; - maxVelocity += 4.5f * enrageScale; - acceleration += 0.06f * enrageScale; - - maxVelocity += phase1MaxSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - acceleration += phase1MaxAccelerationIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - - if (CalamityWorld.LegendaryMode) - { - maxVelocity *= 1.15f; - acceleration *= 1.15f; - } - - // Foveanator stays further away from the player than Retinazer (Retinazer distance is 300, Foveanator distance is 450) - float distanceFromTarget = 450f; - Vector2 destination = Main.player[NPC.target].Center + Vector2.UnitX * distanceFromTarget * direction - Vector2.UnitY * distanceFromTarget; - float distanceFromDestination = (destination - NPC.Center).Length(); - Vector2 idealVelocity = (destination - NPC.Center).SafeNormalize(Vector2.UnitX * direction); - - if (NPC.IsMechQueenUp) - { - maxVelocity = 14f; - - destination = mechQueenSpacing; - distanceFromDestination = (destination - NPC.Center).Length(); - idealVelocity = (destination - NPC.Center).SafeNormalize(Vector2.UnitY); - - if (distanceFromDestination > maxVelocity) - idealVelocity *= maxVelocity / distanceFromDestination; - - float inertia = 60f; - NPC.velocity = (NPC.velocity * (inertia - 1f) + idealVelocity) / inertia; - } - else - NPC.SimpleFlyMovement(idealVelocity * maxVelocity, acceleration); - - // Foveanator stays in this phase longer than Retinazer (Foveanator time is 450, Retinazer time is 300) - // Foveanator has longer cooldown between firing projectiles than Retinazer (Foveanator cooldown is 60, Retinazer cooldown is 30) - float phaseGateValue = 450f - (phase1MaxLaserPhaseDurationDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))); - float laserGateValue = 60f; - if (NPC.IsMechQueenUp) - { - phaseGateValue = 1350f; - laserGateValue = ((!NPC.npcsFoundForCheckActive[NPCID.TheDestroyerBody]) ? 120f : 180f); - } - - NPC.ai[2] += 1f; - if (NPC.ai[2] >= phaseGateValue) - { - NPC.ai[1] = 1f; - NPC.ai[2] = 0f; - NPC.ai[3] = 0f; - - CalamityUtils.CalamityTargeting(NPC, default); - - NPC.netUpdate = true; - } - else if (distanceFromDestination < 960f) - { - if (!Main.player[NPC.target].dead) - { - NPC.ai[3] += 1f; - if (CalamityWorld.LegendaryMode) - NPC.ai[3] += 0.5f; - } - - if (NPC.ai[3] >= laserGateValue) - { - NPC.ai[3] = 0f; - - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - float laserSpeed = 6f + 1.5f * enrageScale; - int type = ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - Vector2 laserVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * laserSpeed; - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + laserVelocity.SafeNormalize(Vector2.UnitY) * 60f, laserVelocity, type, damage, 0f, Main.myPlayer); - } - } - } - } - else if (NPC.ai[1] == 1f) - { - // Set damage - NPC.damage = NPC.defDamage; - - NPC.rotation = hoverRotation; - - float chargeSpeed = 4f; - chargeSpeed += 1f * enrageScale; - if (CalamityWorld.LegendaryMode) - chargeSpeed += phase1MaxChargeSpeedIncrease * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - if (CalamityWorld.LegendaryMode) - chargeSpeed += 1f; - - NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; - - NPC.ai[1] = 2f; - } - else if (NPC.ai[1] == 2f) - { - // Set damage - NPC.damage = NPC.defDamage; - - NPC.ai[2] += 1f; - float decelerateGateValue = 72f + (12f * ((1f - lifeRatio) / (1f - phase2LifeRatio))); - if (NPC.ai[2] >= decelerateGateValue) - { - // Avoid cheap bullshit - NPC.damage = 0; - - float decelerationMultiplier = 0.8f - (0.2f * ((1f - lifeRatio) / (1f - phase2LifeRatio))); - NPC.velocity *= decelerationMultiplier; - - if (Math.Abs(NPC.velocity.X) < 0.1) - NPC.velocity.X = 0f; - if (Math.Abs(NPC.velocity.Y) < 0.1) - NPC.velocity.Y = 0f; - } - else - { - // Accelerative charge - float maxVelocity = 24f; - maxVelocity += 6f * enrageScale; - - if (CalamityWorld.LegendaryMode) - maxVelocity += (phase1MaxChargeSpeedIncrease * 6f) * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - - if (NPC.velocity.Length() < maxVelocity) - { - NPC.velocity *= 1.04f; - if (NPC.velocity.Length() > maxVelocity) - { - NPC.velocity.Normalize(); - NPC.velocity *= maxVelocity; - } - } - - NPC.rotation = NPC.velocity.ToRotation() - MathHelper.PiOver2; - } - - float delayBeforeChargingAgain = 96f - (6f * ((1f - lifeRatio) / (1f - phase2LifeRatio))); - if (NPC.ai[2] >= delayBeforeChargingAgain) - { - NPC.ai[3] += 1f; - NPC.ai[2] = 0f; - - NPC.rotation = hoverRotation; - - float totalCharges = 3f; - if (NPC.ai[3] >= totalCharges) - { - NPC.ai[1] = 0f; - NPC.ai[3] = 0f; - - CalamityUtils.CalamityTargeting(NPC, default); - } - else - NPC.ai[1] = 1f; - } - } - - // Enter phase 2 - if (phase2) - { - NPC.ai[0] = 1f; - NPC.ai[1] = 0f; - NPC.ai[2] = 0f; - NPC.ai[3] = 0f; - - CalamityUtils.CalamityTargeting(NPC, default); - - NPC.netUpdate = true; - } - } - - else if (NPC.ai[0] == 1f || NPC.ai[0] == 2f) - { - // Avoid cheap bullshit - NPC.damage = 0; - - if (NPC.IsMechQueenUp) - NPC.reflectsProjectiles = true; - - if (NPC.ai[0] == 1f) - { - NPC.ai[2] += 0.005f; - if (NPC.ai[2] > 0.5f) - NPC.ai[2] = 0.5f; - } - else - { - NPC.ai[2] -= 0.005f; - if (NPC.ai[2] < 0f) - NPC.ai[2] = 0f; - } - - NPC.rotation += NPC.ai[2]; - - NPC.ai[1] += 1f; - if (NPC.ai[2] >= 0.2f) - { - if (NPC.ai[1] % 20f == 0f) - { - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - float projectileSpeed = 16f; - Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * projectileSpeed; - int spread = 30; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < 2; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i)); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f); - } - } - } - } - - if (NPC.ai[1] == 100f) - { - NPC.ai[0] += 1f; - NPC.ai[1] = 0f; - if (NPC.ai[0] == 3f) - { - NPC.ai[2] = 0f; - } - else - { - SoundEngine.PlaySound(SoundID.NPCHit1, NPC.Center); - - if (!Main.dedServ) - { - for (int i = 0; i < 2; i++) - { - Gore.NewGore(NPC.GetSource_FromAI(), NPC.position, new Vector2(Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f), Mod.Find("Foveanator1").Type, NPC.scale); - Gore.NewGore(NPC.GetSource_FromAI(), NPC.position, new Vector2(Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f), 7, NPC.scale); - Gore.NewGore(NPC.GetSource_FromAI(), NPC.position, new Vector2(Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f), 6, NPC.scale); - } - } - - for (int j = 0; j < 20; j++) - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); - - SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); - } - } - - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, Main.rand.Next(-30, 31) * 0.2f, Main.rand.Next(-30, 31) * 0.2f, 0, default, 1f); - - NPC.velocity *= 0.98f; - if (Math.Abs(NPC.velocity.X) < 0.1) - NPC.velocity.X = 0f; - if (Math.Abs(NPC.velocity.Y) < 0.1) - NPC.velocity.Y = 0f; - } - else - { - // If in phase 2 but Spaz or Ret aren't - bool spazOrRetInPhase1 = false; - if (CalamityGlobalNPC.fireEye != -1) - { - if (Main.npc[CalamityGlobalNPC.fireEye].active) - spazOrRetInPhase1 = Main.npc[CalamityGlobalNPC.fireEye].ai[0] == 1f || Main.npc[CalamityGlobalNPC.fireEye].ai[0] == 2f || Main.npc[CalamityGlobalNPC.fireEye].ai[0] == 0f; - } - if (CalamityGlobalNPC.laserEye != -1) - { - if (Main.npc[CalamityGlobalNPC.laserEye].active) - spazOrRetInPhase1 = Main.npc[CalamityGlobalNPC.laserEye].ai[0] == 1f || Main.npc[CalamityGlobalNPC.laserEye].ai[0] == 2f || Main.npc[CalamityGlobalNPC.laserEye].ai[0] == 0f; - } - - NPC.chaseable = !spazOrRetInPhase1; - - int setDamage = (int)Math.Round(NPC.defDamage * 1.5); - NPC.defense = NPC.defDefense + 14; - calamityGlobalNPC.DR = spazOrRetInPhase1 ? 0.9999f : 0.2f; - calamityGlobalNPC.unbreakableDR = spazOrRetInPhase1; - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = spazOrRetInPhase1; - - NPC.HitSound = SoundID.NPCHit4; - - if (NPC.ai[1] == 0f) - { - // Avoid cheap bullshit - NPC.damage = 0; - - float maxVelocity = 4f + (1.2f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - float acceleration = 0.06f + (0.02f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - maxVelocity += 2f * enrageScale; - acceleration += 0.04f * enrageScale; - - float distanceFromTarget = 360f; - Vector2 destination = Main.player[NPC.target].Center + Vector2.UnitX * distanceFromTarget * direction; - float distanceFromDestination = (destination - NPC.Center).Length(); - Vector2 idealVelocity = (destination - NPC.Center).SafeNormalize(Vector2.UnitX * direction); - - if (!NPC.IsMechQueenUp) - { - // Boost speed if too far from target - if (distanceFromDestination > distanceFromTarget) - maxVelocity += MathHelper.Lerp(0f, 12f, MathHelper.Clamp((distanceFromDestination - distanceFromTarget) / 1000f, 0f, 1f)); - - if (CalamityWorld.LegendaryMode) - { - maxVelocity *= 1.15f; - acceleration *= 1.15f; - } - - NPC.SimpleFlyMovement(idealVelocity * maxVelocity, acceleration); - } - - // Fire flamethrower for x seconds - NPC.ai[2] += (retAlive && spazAlive) ? 1f : 2f; - float phaseGateValue = NPC.IsMechQueenUp ? 1350f : 360f - (90f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - if (NPC.ai[2] >= phaseGateValue) - { - // Go to charge phase or fire large barrage of lasers and energy bombs if in final phase - NPC.ai[1] = finalPhase ? 3f : 1f; - NPC.ai[2] = 0f; - NPC.ai[3] = 0f; - NPC.netUpdate = true; - } - - // Fire fireballs and flamethrower - else if (Collision.CanHit(NPC.position, NPC.width, NPC.height, Main.player[NPC.target].position, Main.player[NPC.target].width, Main.player[NPC.target].height)) - { - // Play flame sound on timer - NPC.localAI[2] += 1f; - if (NPC.localAI[2] > 22f) - { - NPC.localAI[2] = 0f; - SoundEngine.PlaySound(SoundID.Item34, NPC.Center); - } - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.localAI[1] += 1f; - if (NPC.localAI[1] > 4f) - { - NPC.localAI[1] = 0f; - - float foveanatorFlamethrowerSpeed = 4f + 2f * enrageScale; - float timeForFlamethrowerToReachMaxVelocity = (retAlive && spazAlive) ? 120f : 60f; - float flamethrowerSpeedScalar = MathHelper.Clamp(NPC.ai[2] / timeForFlamethrowerToReachMaxVelocity, 0f, 1f); - foveanatorFlamethrowerSpeed = MathHelper.Lerp(0.1f, foveanatorFlamethrowerSpeed, flamethrowerSpeedScalar); - - int type = ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - Vector2 flamethrowerVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * foveanatorFlamethrowerSpeed + NPC.velocity * 0.5f; - - if (NPC.IsMechQueenUp) - flamethrowerVelocity = (NPC.rotation + MathHelper.PiOver2).ToRotationVector2() * foveanatorFlamethrowerSpeed + NPC.velocity * 0.5f; - - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + flamethrowerVelocity.SafeNormalize(Vector2.UnitY) * 100f, flamethrowerVelocity, type, damage, 0f, Main.myPlayer); - } - } - } - - if (NPC.IsMechQueenUp) - { - maxVelocity = 14f; - - destination = mechQueenSpacing; - distanceFromDestination = (destination - NPC.Center).Length(); - idealVelocity = (destination - NPC.Center).SafeNormalize(Vector2.UnitY); - - if (distanceFromDestination > maxVelocity) - idealVelocity *= maxVelocity / distanceFromDestination; - - float inertia = 60f; - NPC.velocity = (NPC.velocity * (inertia - 1f) + idealVelocity) / inertia; - } - } - - // Charge - else if (NPC.ai[1] == 1f) - { - // Set damage - NPC.damage = setDamage; - - // Play charge sound - // TODO - Make this a jet turbine sound or something - //SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); - - // Set rotation and velocity - NPC.rotation = hoverRotation; - - float chargeSpeed = 4.5f + (1.25f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - chargeSpeed += 4f * enrageScale; - if (CalamityWorld.LegendaryMode) - chargeSpeed *= 1.2f; - - NPC.velocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * chargeSpeed; - - NPC.ai[1] = 2f; - } - - // Maintain charge velocity until deceleration - else if (NPC.ai[1] == 2f) - { - // Set damage - NPC.damage = setDamage; - - NPC.ai[2] += 1f; - - float chargeTime = 60f - (20f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - - // Slow down - if (NPC.ai[2] >= chargeTime) - { - // Avoid cheap bullshit - NPC.damage = 0; - - float deceleration = 0.8f - (0.15f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - NPC.velocity *= deceleration; - - if (Math.Abs(NPC.velocity.X) < 0.1) - NPC.velocity.X = 0f; - if (Math.Abs(NPC.velocity.Y) < 0.1) - NPC.velocity.Y = 0f; - } - else - { - // Accelerative charge - float maxVelocity = 27f; - maxVelocity += 6f * enrageScale; - if (CalamityWorld.LegendaryMode) - maxVelocity += 7.5f * ((1f - lifeRatio) / (1f - phase2LifeRatio)); - - // Spawn Energy Bombs along the way - float energyBombFireRate = 8f; - if (NPC.ai[2] % energyBombFireRate == 0f) - { - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + NPC.velocity.SafeNormalize(Vector2.UnitY) * 60f, Vector2.Zero, type, damage, 0f, Main.myPlayer, 1f); - } - } - - if (NPC.velocity.Length() < maxVelocity) - { - NPC.velocity *= 1.06f; - if (NPC.velocity.Length() > maxVelocity) - { - NPC.velocity.Normalize(); - NPC.velocity *= maxVelocity; - } - } - - NPC.rotation = NPC.velocity.ToRotation() - MathHelper.PiOver2; - } - - // Charge 2 times - if (NPC.ai[2] >= chargeTime * 1.3f) - { - NPC.ai[3] += 1f; - NPC.ai[2] = 0f; - - NPC.rotation = hoverRotation; - - float maxCharges = 2f; - if (NPC.ai[3] >= maxCharges) - { - NPC.ai[1] = 0f; - NPC.ai[3] = 0f; - } - else - NPC.ai[1] = 1f; - } - } - - // Laser and energy bomb barrage - else if (NPC.ai[1] == 3f) - { - float maxVelocity = 12f + (2.4f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - float acceleration = 0.16f + (0.32f * ((phase2LifeRatio - lifeRatio) / phase2LifeRatio)); - maxVelocity += 6f * enrageScale; - acceleration += 0.08f * enrageScale; - - if (CalamityWorld.LegendaryMode) - { - maxVelocity *= 1.15f; - acceleration *= 1.15f; - } - - float distanceFromTarget = 640f; - Vector2 destination = Main.player[NPC.target].Center + Vector2.UnitX * distanceFromTarget * direction; - float distanceFromDestination = (destination - NPC.Center).Length(); - Vector2 idealVelocity = (destination - NPC.Center).SafeNormalize(Vector2.UnitX * direction); - - bool gettingIntoPosition = NPC.ai[2] == 0f; - if (NPC.Distance(Main.player[NPC.target].Center) < distanceFromTarget && gettingIntoPosition) - { - NPC.SimpleFlyMovement(idealVelocity * maxVelocity, acceleration); - } - else - { - NPC.SimpleFlyMovement(idealVelocity * maxVelocity * 0.5f, acceleration * 0.5f); - - // Fire 3 spreads of energy bombs and lasers - int totalSpreads = 6; - - // Fire rates - float laserBarrageFireRate = 45f; - float energyBombFireRate = 90f; - - NPC.ai[2] += 1f; - - // Energy bombs - if (NPC.ai[2] % energyBombFireRate == 0f) - { - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * 16f; - int numProj = 3; - int spread = 30; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer, 1f); - } - } - - NPC.ai[3] += 1f; - } - - else if (NPC.ai[2] % laserBarrageFireRate == 0f) - { - SoundEngine.PlaySound(AstrumDeusHead.LaserSound, NPC.Center); - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int type = ModContent.ProjectileType(); - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - float projectileSpeed = 8f + 2f * enrageScale; - Vector2 projectileVelocity = (Main.player[NPC.target].Center - NPC.Center).SafeNormalize(Vector2.UnitY) * projectileSpeed; - int numProj = 4; - int spread = 40; - float rotation = MathHelper.ToRadians(spread); - for (int i = 0; i < numProj; i++) - { - Vector2 perturbedSpeed = projectileVelocity.RotatedBy(MathHelper.Lerp(-rotation, rotation, i / (float)(numProj - 1))); - Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + perturbedSpeed.SafeNormalize(Vector2.UnitY) * 60f, perturbedSpeed, type, damage, 0f, Main.myPlayer); - } - } - - NPC.ai[3] += 1f; - } - - // Charge - if (NPC.ai[3] >= totalSpreads) - { - NPC.ai[1] = 1f; - NPC.ai[2] = 0f; - NPC.ai[3] = 0f; - NPC.netUpdate = true; - } - } - } - } - } - - public override void BossLoot(ref string name, ref int potionType) => potionType = ItemID.GreaterHealingPotion; - - public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) - { - NPC.lifeMax = (int)(NPC.lifeMax * 0.75f * balance * bossAdjustment); - NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier()); - } - - public override bool PreDraw(SpriteBatch spriteBatch, Vector2 screenPos, Color drawColor) - { - SpriteEffects spriteEffects = SpriteEffects.None; - if (NPC.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - spriteBatch.Draw(TextureAssets.Npc[Type].Value, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, NPC.GetAlpha(drawColor), NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0f); - - Texture2D glowTexture = GlowTexture.Value; - spriteBatch.Draw(glowTexture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, Color.White, NPC.rotation, NPC.frame.Size() / 2, NPC.scale, spriteEffects, 0f); - - return false; - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life > 0) - { - for (int i = 0; (double)i < hit.Damage / (double)NPC.lifeMax * 100D; i++) - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, hit.HitDirection, -1f); - - return; - } - - for (int i = 0; i < 150; i++) - Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Blood, 2 * hit.HitDirection, -2f); - - if (!Main.dedServ) - { - for (int i = 0; i < 2; i++) - { - Gore.NewGore(NPC.GetSource_Death(), NPC.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 2, NPC.scale); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 7, NPC.scale); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), 9, NPC.scale); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, new Vector2((float)Main.rand.Next(-30, 31) * 0.2f, (float)Main.rand.Next(-30, 31) * 0.2f), Mod.Find("Foveanator2").Type, NPC.scale); - } - } - - for (int i = 0; i < 10; i++) - { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default, 1.5f); - Main.dust[dust].velocity *= 1.4f; - } - - for (int i = 0; i < 5; i++) - { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 2.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 5f; - dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default, 1.5f); - Main.dust[dust].velocity *= 3f; - } - - if (!Main.dedServ) - { - int gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default, Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X += 1f; - Main.gore[gore].velocity.Y += 1f; - gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default, Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X -= 1f; - Main.gore[gore].velocity.Y += 1f; - gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default, Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X += 1f; - Main.gore[gore].velocity.Y -= 1f; - gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default, Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X -= 1f; - Main.gore[gore].velocity.Y -= 1f; - } - } - } -} diff --git a/NPCs/NormalNPCs/Foveanator.png b/NPCs/NormalNPCs/Foveanator.png deleted file mode 100644 index 67291fe4aacfa95d854cab6ea8dca98a4153f51e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 28939 zcmeFYcT|(#x95+dpwbjkIw&edq)2FyDvC%45fBJnz|ccLI*5J*=>pP2kzPZGgpNSy zL_lgHAb|vl^xo&e@0~UGPP?;aet-VfVl4;@&U2o#_u1#{*M9F%9W52QD{NONC@APu zpFe#8e0QdxxKMtH3iyfbR$v|Q?Hv4tiV_8KkmEP-;ey>`&BqiJ7117LKs$>P1MWR&s}Q}FQU1Qx5RZ#DP& zJ~6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7k2H$m!ejuoH?-ZeV zCR9<4)IdP%Y*Q){^tQVLLvEca#9)0TP{7KTZXy5Vcws+AN<8>?M8-5UrAb6`2hmxxpAN8MG# z3z!S_Y^`^IrH2=2ktH1nz6)dunkXX=Y!N*dPp^7pgd>|J@r8VQT>z97OP3J$F>)^^ z>@$RVD04P&*YfLoyVZ&E2X*o3!?MqX8$1te*;$KLy?>uhWaWqKqUYjL)z9i)4 zsfgiFm(wU>cd5v|%e$<(Ps?V{ZHatpiIi7T>8Hq^Hu?6%aj>vIP%dcQ!}JJBdLQWy z!SjosylEAZ5I@hMqW2ZQ{aX}@kl%EOg zM1uHE?YrUCTlkRU&7=w#((PJey)SB}-ZwDNh3S!XqpR**y(rO4)-HX>5%KXWr$O-i zD8(YJi(oZ1zejeAme*>!wS>B|*j!-eBIA8s$G-k|^6XrOw#BmYu2^Ncqw&qUDcF*0kptr9D__z?R6V2v1G8R$gk69?L(&ma6Fxq=lhxxrP>{~$%v{O z&t54}kL^2PuOn`ANPI$B>KJx+cJ^#F_i@ns=pDFAy3fYEB-=P(37rZqB;v>5t14<= z6XJE+*+?3iS3a&eNbkm_D;Muia9TMSLTao}pwv=cE{1GT^L~N-Y_jX2AML#ZO?Nvb z$ifj3U?^(kWUxeh1_f;IB{ILD(15d)TvEC+tvCOp0qLI~>)8Uf>mG;Owlck{qAA$6 jklD^y&0bUUz-93GDEOuQ4CtrO{-~*F-7ddn`Q$$U)<#2K diff --git a/NPCs/NormalNPCs/FoveanatorGlow.png b/NPCs/NormalNPCs/FoveanatorGlow.png deleted file mode 100644 index d8b332565871634fe35e4ed6dc01b583cc1eba2e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1524 zcmeAS@N?(olHy`uVBq!ia0vp^c?=9J8#vg2EGdQh?LdmLILO_JVcj{ImkbQ7Q#@T9 zLn`LHy|FPXI8f&J$N5*MX>o+f7GiU>MZPz@xN*>` zLzGKvni=28jlMnI5_(fPxT6cqzl*w)pYEf-7Hb#8Q{O z=KN4@vttnu<(1ery5798^Y&K}F|R_`*w}qT8()C^1rY-igtF-xmq^! zy8K$zmGSc)b!k->UE<1my2pO!OqI$FhV_4DH|IZoJy~h>{52XtZAag}pYK<`Fic1seAQR{{Abe+`QDb_G^LWyU0Qc!WK>IhyPY`JnqMvAFg;^sdLKfy6}Vd z6$P%91+I5rR55jL+E~2(wWiLLM_s$FeP#K#b=%~eqjP!e)jiF=mrZ*WCmKG59fU%D zey@wZ{LXgwd=<;;n(TKwu3nFytTI2Y#wV!$EYKUN|4TP7oxA_<#3x1KmaE?yt+$Wz z4%%;XR5bM4lO>{8PF2>*}sy_K|@=ZQZx;+t2+IbIO7pJ%_3B~Joz0KX!ixg#ga4&A5`BH_hXb#Fj+ioao%(_MA0KpmdeF7& z;#U^2)a2)R*MlQ8j*6D9ea-nNJ6HW?m$hV_-=v&(Z*{Kj)mo>)4?-(Gz5lyy+1=_g zd(Wb8Kd#*=T)lq3ny1~~A2XKxn+5d7seiB2yshhhE1!I-R}^+THLiZkv?XWEr%C> z{2?>(~KK|>cle+^aeffR) z>Dg)DzFa-LbVvG8MtI-`-10x^E2-Hb@xlct#+Mr5nda-upao=eK-F9do(y7ny85}S Ib4q9e0L!B&VgLXD diff --git a/NPCs/NormalNPCs/Foveanator_Head_Boss.png b/NPCs/NormalNPCs/Foveanator_Head_Boss.png deleted file mode 100644 index 7c93efb49eb1d22e1e7ef4072ebd1b6f6a1b82ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 637 zcmV-@0)qXCP)Px%9Z5t%R7i=<);~zpVI0Tt*I7eBc?yapaY2h<4RO*?gCvO*4H;fSje$^$(G(30 z(c0b~frCmmL?9PNfezu-AVN?UXF;ggnY-8UyT|*ZXEz9UpXK4l^L@V0^Zx#Mo?lFj zN+y%}TI@2JOsp2Wrdl`NZyl^QQAya}-w(RGyUWJK#l^A_W$UU%pmB%;>FDSv7#o8L^%#Qt;}(2+x0y+$}G%-uwVVF zdcM6Kv`$Q*Sl!`9nm%_L419b5j-QCuwYHrCFHRl?k3Y3iYh6 zqDXl6%~WhRe?fI4{;zuDE%|Wj{j{$e@jqY)(23rzwyFRC01jnXNoGw=04e|g00;m8 X000000Mb*F00000NkvXXu0mjfAWSAd diff --git a/NPCs/NormalNPCs/Foveanator_Phase2_Head_Boss.png b/NPCs/NormalNPCs/Foveanator_Phase2_Head_Boss.png deleted file mode 100644 index 6a6b7c7532010b73be2336bb3cc92cb0582cb28a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 618 zcmV-w0+s!VP)Px%3Q0skR7i=<);~y;aU93-*HsV%bzUGX(a<7DM4ZsjUtQ6UIML_*+AVzjh43SAlqHh2w>U(b8)j&2a1`z&96Jm2U0{NCR`zu%M7 zri#U4wH?25xtwdq?^wGZK5Ct4^&m}HDwRNQZ*QGlUth1YsC%zf20Dj0NGB#Hz{to5 z*xTC!)6>(aBLqW3Lukx|{S2hZJBK(Fq@f_4o0|iLLIJhR%+JrGk$h=sscHP|iKDjB zy`jm;Nz_O~S9iwi*6HU#ekfjDt+OW%#ZH4X)?qKNoClS)U!bsc7EGB!BYCS@XGh$h z@2bM+xeHAl#>bOdMonKlzX^ivp{cp1V@CQ72eI>CH;+X4Dd2JQM_pmzh-NXcG%>V4{ENb)HF}G90 z-$Bgvo58!_{lEZfCs4XuLy?)dhwm&egL?~aQS0VV_QVG#*tHv|&E1dfWKPo=NGna) zbLKQCUP?}enXjMF0dw54#<8=Pw+54YbUy!b9~jQAg&kkC(3DIF64000hUSV?A0O#mtY000O800000007cclK=n!07*qoM6N<$ Eg3N6pZU6uP diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs index 8afa3a850f..ebe3e2c98f 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/TwinsAI.cs @@ -71,21 +71,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { for (int i = 0; i < Main.maxNPCs; i++) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism || Main.npc[i].type == ModContent.NPCType()) && Main.npc[i].timeLeft - 1 > npc.timeLeft) + if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism) && Main.npc[i].timeLeft - 1 > npc.timeLeft) npc.timeLeft = Main.npc[i].timeLeft - 1; } } - // Foveanator spawn - if (death && calamityGlobalNPC.newAI[0] == 0f && Main.netMode != NetmodeID.MultiplayerClient && !bossRush) - { - NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType()); - calamityGlobalNPC.newAI[0] = 1f; - npc.SyncExtraAI(); - } - - bool foveanatorAlive = NPC.AnyNPCs(ModContent.NPCType()); - // Phase HP ratios float phase2LifeRatio = death ? 0.85f : 0.7f; float finalPhaseLifeRatio = death ? 0.4f : 0.25f; @@ -174,7 +164,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.SimpleFlyMovement(idealVelocity * maxVelocity, acceleration); float phaseGateValue = death ? (300f - phase1MaxLaserPhaseDurationDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))) : 450f; - float laserGateValue = foveanatorAlive ? 45f : 30f; + float laserGateValue = 30f; if (NPC.IsMechQueenUp) { phaseGateValue = 900f; @@ -283,8 +273,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.rotation = hoverRotation; float totalCharges = death ? 6f : 5f; - if (foveanatorAlive) - totalCharges -= 1f; if (npc.ai[3] >= totalCharges) { @@ -483,7 +471,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[1] += 1f + (death ? (phase2LifeRatio - lifeRatio) / phase2LifeRatio : 0f); - if (npc.localAI[1] >= (spazAlive ? (foveanatorAlive ? 64f : 52f) : foveanatorAlive ? 39f : 26f)) + if (npc.localAI[1] >= (spazAlive ? 52f : 26f)) { if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { @@ -540,7 +528,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { npc.localAI[1] += 1f + (death ? (phase2LifeRatio - lifeRatio) / phase2LifeRatio : 0f); - if (npc.localAI[1] > (spazAlive ? (foveanatorAlive ? 25f : 20f) : foveanatorAlive ? 15f : 10f)) + if (npc.localAI[1] > (spazAlive ? 20f : 10f)) { if (Collision.CanHit(npc.position, npc.width, npc.height, Main.player[npc.target].position, Main.player[npc.target].width, Main.player[npc.target].height)) { @@ -637,7 +625,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (npc.ai[3] % 3f == 0f) { - float fireRate = spazAlive ? 13f : foveanatorAlive ? 11f : 9f; + float fireRate = spazAlive ? 13f : 9f; if (npc.ai[2] % fireRate == 0f) { SoundEngine.PlaySound(SoundID.Item33, npc.Center); @@ -805,13 +793,11 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { for (int i = 0; i < Main.maxNPCs; i++) { - if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism || Main.npc[i].type == ModContent.NPCType()) && Main.npc[i].timeLeft - 1 > npc.timeLeft) + if (i != npc.whoAmI && Main.npc[i].active && (Main.npc[i].type == NPCID.Retinazer || Main.npc[i].type == NPCID.Spazmatism) && Main.npc[i].timeLeft - 1 > npc.timeLeft) npc.timeLeft = Main.npc[i].timeLeft - 1; } } - bool foveanatorAlive = NPC.AnyNPCs(ModContent.NPCType()); - // Phase HP ratios float phase2LifeRatio = death ? 0.85f : 0.7f; float finalPhaseLifeRatio = death ? 0.3f : 0.15f; @@ -924,7 +910,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[3] += 0.4f; } - if (npc.ai[3] >= (foveanatorAlive ? 45f : 30f)) + if (npc.ai[3] >= 30f) { npc.ai[3] = 0f; @@ -1007,7 +993,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.rotation = hoverRotation; - float totalCharges = foveanatorAlive ? 6f : 8f; + float totalCharges = 8f; if (death) totalCharges -= (float)Math.Round(phase1MaxChargesDecrease * ((1f - lifeRatio) / (1f - phase2LifeRatio))); @@ -1216,7 +1202,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[3] += 1f; npc.localAI[1] = 0f; - float flamethrowerSpeed = foveanatorAlive ? 5f : 6f; + float flamethrowerSpeed = 6f; flamethrowerSpeed += 3f * enrageScale; float timeForFlamethrowerToReachMaxVelocity = 60f; float flamethrowerSpeedScalar = MathHelper.Clamp(npc.ai[2] / timeForFlamethrowerToReachMaxVelocity, 0f, 1f); @@ -1328,7 +1314,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.rotation = hoverRotation; - float totalCharges = foveanatorAlive ? 4f : 5f; + float totalCharges = 5f; if (npc.ai[3] >= totalCharges) { npc.ai[1] = 0f; @@ -1505,7 +1491,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.ai[2] += 1f; // Fire shadowflames and cursed fireballs - float fireRate = retAlive ? 30f : foveanatorAlive ? 25f : 20f; + float fireRate = retAlive ? 30f : 20f; if (npc.ai[2] % fireRate == 0f) { npc.ai[3] += 1f; diff --git a/Projectiles/Boss/FoveanatorEnergyBomb.cs b/Projectiles/Boss/FoveanatorEnergyBomb.cs deleted file mode 100644 index 9928e7ce90..0000000000 --- a/Projectiles/Boss/FoveanatorEnergyBomb.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Events; -using CalamityMod.NPCs; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.Audio; -using Terraria.GameContent; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class FoveanatorEnergyBomb : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Boss"; - - private const int TotalXFrames = 2; - private const int TotalYFrames = 8; - private const int ExplodeFrames = 6; - private const int ExplodeDamageStartFrame = 3; - private const int FrameTimer = 6; - - public int frameX = 0; - public int frameY = 0; - - public int CurrentFrame - { - get => frameX * TotalYFrames + frameY; - set - { - frameX = value / TotalYFrames; - frameY = value % TotalYFrames; - } - } - - private const int TimeLeft = 300; - private const int SlowDownTime = TimeLeft / 2; - private const int ExplosionDuration = FrameTimer * ExplodeFrames; - - private const float ExplodeDistance = 50f; - - public override void SetDefaults() - { - Projectile.width = 133; - Projectile.height = 142; - Projectile.hostile = true; - Projectile.ignoreWater = true; - Projectile.tileCollide = false; - Projectile.penetrate = -1; - Projectile.timeLeft = TimeLeft; - } - - public override void AI() - { - // If moving, decelerate. - if (Projectile.velocity.Length() > 0f && Projectile.timeLeft <= SlowDownTime) - Projectile.velocity *= 0.95f; - - // Get a target and calculate distance from it. - int target = Player.FindClosest(Projectile.Center, 1, 1); - float distanceFromTarget = Projectile.Distance(Main.player[target].Center); - - // Explode when within a certain distance of the target. - if (distanceFromTarget <= ExplodeDistance && Projectile.timeLeft > ExplosionDuration) - Projectile.timeLeft = ExplosionDuration; - - bool explode = Projectile.timeLeft <= ExplosionDuration; - - // Stop immediately if explosion is triggered. - if (explode && Projectile.velocity.Length() > 0f) - Projectile.velocity = Vector2.Zero; - - // Reset the frame counter and frameY when explosion is triggered. - if (Projectile.timeLeft == ExplosionDuration) - { - Projectile.frameCounter = 0; - frameY = 0; - } - - // Explosion noise when actually exploding. - if (frameY == ExplodeDamageStartFrame && explode && Projectile.localAI[0] == 0f) - { - Projectile.localAI[0] = 1f; - SoundEngine.PlaySound(DeusMine.ExplodeSound, Projectile.Center); - } - - Projectile.frameCounter++; - if (Projectile.frameCounter % FrameTimer == 0) - { - CurrentFrame++; - - // Non-explosion uses the left side of the sheet, explosion uses the right side of the sheet. - frameX = explode ? 1 : 0; - - // Kill the projectile when the explosion animation is done. - if (explode && frameY >= ExplodeFrames) - { - if (Projectile.ai[0] > 0f) - { - if (Projectile.owner == Main.myPlayer) - { - float laserSpeed = 2f; - int type = ModContent.ProjectileType(); - int damage = (int)Math.Round(Projectile.damage * 0.85); - Vector2 laserVelocity = (Main.player[target].Center - Projectile.Center).SafeNormalize(Vector2.UnitY) * laserSpeed; - Projectile.NewProjectile(Projectile.GetSource_FromAI(), Projectile.Center + laserVelocity.SafeNormalize(Vector2.UnitY) * 16f, laserVelocity, type, damage, 0f, Main.myPlayer); - } - } - - Projectile.Kill(); - - return; - } - } - - // Explosion has brighter light. - Color lightColor = Color.Lerp(new Color(25, 25, 128), new Color(100, 25, 128), Main.DiscoR / 255f); - float divisor = explode ? 128f : 255f; - Lighting.AddLight(Projectile.Center, lightColor.R / divisor, lightColor.G / divisor, lightColor.B / divisor); - } - - public override bool PreDraw(ref Color lightColor) => false; - - public override void PostDraw(Color lightColor) - { - if (Projectile.frameCounter < 5) - return; - - lightColor.R = (byte)(255 * Projectile.Opacity); - lightColor.G = (byte)(255 * Projectile.Opacity); - lightColor.B = (byte)(255 * Projectile.Opacity); - - Texture2D texture = TextureAssets.Projectile[Type].Value; - Vector2 position = Projectile.Center - Main.screenPosition; - Vector2 origin = texture.Size() / new Vector2(TotalXFrames, TotalYFrames) * 0.5f; - Rectangle frame = texture.Frame(TotalXFrames, TotalYFrames, frameX, frameY); - Main.EntitySpriteDraw(texture, position, frame, Color.White, Projectile.rotation, origin, Projectile.scale, SpriteEffects.None); - } - - public override bool CanHitPlayer(Player target) => Projectile.timeLeft <= ExplosionDuration && frameY >= ExplodeDamageStartFrame; - - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => CalamityUtils.CircularHitboxCollision(Projectile.Center, ExplodeDistance, targetHitbox); - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - if (Projectile.timeLeft <= ExplosionDuration) - target.AddBuff(BuffID.Frostburn, 180); - } - } -} diff --git a/Projectiles/Boss/FoveanatorEnergyBomb.png b/Projectiles/Boss/FoveanatorEnergyBomb.png deleted file mode 100644 index 4e2a8120cb248826b48bff15f71057b4bc15a7ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15428 zcmdVBXH-*N)HRBVC@Ats^Fa_40)#FiL3%F%f&?kj1!)2S=^ZQ}hAN>GdhZ}5NC`aB zd+5E0^d`~?^`4;bH|`ks$NlqtW88cGkdT~ncJ|(DuDRx#2dS>6NKSU2jEIPc9I7Oz zK}2)~cuoBFCJFE#O6B_rzY2lh(w2=a?+aa zMw`cbDEFmAvTgZ&zi^9&Z5FYV*a}ZdDJ*2y^8CCyzSq)7FFHf~ zKA3u3{{8h2b(}%3K9amCci12~NtdRDfAvu+YL@ALiLo9=J`lw)3p;WIhR7>3n+Jt6 z%SV(uT`ZqRSGOJhp7LO}{N*kA-*CJNd7yyXuc=+MQ?Gc{9bkKQS`;&7;X6Gher~J+fc$|NgdY36mj*WX!Kt7#F-AMxt zeky(2dGkwIc?-jDV^PUM#q*bLdmAx`o$@7NUCBD<&GQI^d|58ft}#jfda<8E(TS)ElxEZWsn4#TxrO&zLH~ z4^Eni7Xd%0P9qXrfiU&E*w>KwHt(5tu|dH|I-MKHPFU``T5Od;m(j9KKiTO_W^e=_E$g zr_^7P_vIJRhb%uoOT*HKhHMZ>=TE0M^CG&|;?=DEAG`C?=HZBb7$7gs&ds;pV)3mk5G-SbmaC zWTHp$l_!Mdq^BN}NSn!!@|lg) zXZCPkVX`tTbVTu2)jUn4CX|}!A7#VzK1>h-p`R%xDa0lyZ8LkvqbSz5E2N!4_cnX( z&1%ml6`?Y1u)Ucnu5bZQPtB1x=v-dKCD>%s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b}cm&GqZ#+%_@o1_)Ny~x5g#ym?_YY38rY0M}St8Cp!M2f>?6IbiK=CSxyjto1 zCmMei97?b+{#f_|x+W^^yfqFo2Ob^N$R}8pPx+Fvg__l7cHd#S2A804vlog~W`Mn(n1%Z(~FpiMdziv%J*!tEK)Y6mw znCHXEK5*`uIv2KHpSt5P$=O<=oN2PQQ_$D0sZmcU#;S2NC1m;fwEqjA| zw|{(ir(Hz-*5&RzF%-3A3>uT;uf-*@9ybP#7}ML_Ev52b0~p`QbG48z5tb)#mA@O= z_0TqEXW^)2%xrt2m#d8Yd~K*J!ptOvHD8G`SN<<S&uQ97;O$b zSAd}YKX$we($G1)xY8x)LM9?Vq6XaOj`>Td1q?>S3B11f_r3!!A_=dc@@jI$GOs@T EU#Q6JH2?qr diff --git a/Projectiles/Boss/FoveanatorFlamethrower.cs b/Projectiles/Boss/FoveanatorFlamethrower.cs deleted file mode 100644 index 6583bef428..0000000000 --- a/Projectiles/Boss/FoveanatorFlamethrower.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Dusts; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class FoveanatorFlamethrower : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Boss"; - public override string Texture => "CalamityMod/Projectiles/FireProj"; - - public static int Lifetime => 180; - public static int Fadetime => 160; - public ref float Time => ref Projectile.ai[0]; - public int MistType = -1; - - public override void SetDefaults() - { - Projectile.width = Projectile.height = 10; - Projectile.hostile = true; - Projectile.ignoreWater = true; - Projectile.penetrate = -1; - Projectile.MaxUpdates = 3; - Projectile.timeLeft = Lifetime; - CooldownSlot = ImmunityCooldownID.Bosses; - } - - public override void AI() - { - Time++; - if (Time < Fadetime && Main.rand.NextBool(6)) - { - Vector2 cinderPos = Projectile.Center + Main.rand.NextVector2Circular(60f, 60f) * Utils.Remap(Time, 0f, Lifetime, 0.5f, 1f); - float cinderSize = Utils.GetLerpValue(6f, 12f, Time, true); - Dust cinder = Dust.NewDustDirect(cinderPos, 4, 4, Main.rand.NextBool() ? (int)CalamityDusts.BlueCosmilite : (int)CalamityDusts.PurpleCosmilite, Projectile.velocity.X * 0.25f, Projectile.velocity.Y * 0.25f); - if (Main.rand.NextBool(3)) - { - cinder.scale *= 2f; - cinder.velocity *= 2f; - } - cinder.noGravity = true; - cinder.scale *= cinderSize * 1.2f; - cinder.velocity += Projectile.velocity * Utils.Remap(Time, 0f, Fadetime * 0.75f, 1f, 0.1f) * Utils.Remap(Time, 0f, Fadetime * 0.1f, 0.1f, 1f); - } - - if (MistType == -1) - MistType = Main.rand.Next(3); - - Color lightColor = Color.Lerp(new Color(50, 50, 255), new Color(200, 50, 255), Main.DiscoR / 255f); - Lighting.AddLight(Projectile.Center, lightColor.R / 255f, lightColor.G / 255f, lightColor.B / 255f); - } - - // Keeping the flames in place when hitting a block - public override bool OnTileCollide(Vector2 oldVelocity) - { - Projectile.velocity = oldVelocity * 0.95f; - Projectile.position -= Projectile.velocity; - Time++; - Projectile.timeLeft--; - return false; - } - - // Cannot hit the player if fading out - public override bool CanHitPlayer(Player target) => Time <= Fadetime; - - // Expanding hitbox - public override void ModifyDamageHitbox(ref Rectangle hitbox) - { - int size = (int)Utils.Remap(Time, 0f, Fadetime, 8f, 32f); - - // Shrinks again after fading - if (Time > Fadetime) - size = (int)Utils.Remap(Time, Fadetime, Lifetime, 32f, 0f); - - hitbox.Inflate(size, size); - } - - // Anti-wall hacking checks - public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) => projHitbox.Intersects(targetHitbox) && Collision.CanHit(Projectile.Center, 0, 0, targetHitbox.Center.ToVector2(), 0, 0) ? null : false; - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - if (info.Damage <= 0) - return; - - target.AddBuff(BuffID.Frostburn, 300); - - // Cook you up (still scales with player size in case it's manipulated) - int smokeCount = 4 + (int)MathHelper.Clamp(target.width * 0.1f, 0f, 20f); - for (int i = 0; i < smokeCount; i++) - { - Vector2 smokePos = target.Center + Main.rand.NextVector2Circular(target.width * 0.5f, target.height * 0.5f); - Vector2 smokeVel = Vector2.UnitY * Main.rand.NextFloat(-2.4f, -0.8f) * MathHelper.Clamp(target.height * 0.1f, 1f, 10f); - Particle smoke = new MediumMistParticle(smokePos, smokeVel, Color.Lerp(new Color(50, 50, 255), new Color(200, 50, 255), Main.DiscoR / 255f), Color.DarkMagenta, Main.rand.NextFloat(1f, 2f), 245 - Main.rand.Next(50), 0.1f); - GeneralParticleHandler.SpawnParticle(smoke); - } - } - - public override bool PreDraw(ref Color lightColor) - { - Texture2D fire = Terraria.GameContent.TextureAssets.Projectile[Type].Value; - Texture2D mist = ModContent.Request("CalamityMod/Particles/MediumMist").Value; - - // The conga line of colors to sift through - Color color1 = new Color(50, 50, 255, 200); - Color color2 = new Color(50, 0, 225, 70); - Color color3 = new Color(200, 50, 255, 100); - Color color4 = new Color(150, 15, 85, 100); - float length = ((Time > Fadetime - 10f) ? 0.1f : 0.15f); - float vOffset = Math.Min(Time, 20f); - float timeRatio = Utils.GetLerpValue(0f, Lifetime, Time); - float fireSize = Utils.Remap(timeRatio, 0.2f, 0.5f, 0.25f, 1f); - - if (timeRatio >= 1f) - return false; - - for (float j = 1f; j >= 0f; j -= length) - { - // Color - Color fireColor = ((timeRatio < 0.1f) ? Color.Lerp(Color.Transparent, color1, Utils.GetLerpValue(0f, 0.1f, timeRatio)) : - ((timeRatio < 0.2f) ? Color.Lerp(color1, color2, Utils.GetLerpValue(0.1f, 0.2f, timeRatio)) : - ((timeRatio < 0.35f) ? color2 : - ((timeRatio < 0.7f) ? Color.Lerp(color2, color3, Utils.GetLerpValue(0.35f, 0.7f, timeRatio)) : - ((timeRatio < 0.85f) ? Color.Lerp(color3, color4, Utils.GetLerpValue(0.7f, 0.85f, timeRatio)) : - Color.Lerp(color4, Color.Transparent, Utils.GetLerpValue(0.85f, 1f, timeRatio))))))); - fireColor *= (1f - j) * Utils.GetLerpValue(0f, 0.2f, timeRatio, true); - Color innerColor = Color.Lerp(fireColor, Color.Black, 0.3f); - - // Positions and rotations - Vector2 firePos = Projectile.Center - Main.screenPosition - Projectile.velocity * vOffset * j; - float mainRot = -j * MathHelper.PiOver2 - Main.GlobalTimeWrappedHourly * (j + 1f) * 2f / length; - float trailRot = MathHelper.PiOver4 - mainRot; - - // Draw one backtrail - Vector2 trailOffset = Projectile.velocity * vOffset * length * 0.5f; - Main.EntitySpriteDraw(fire, firePos - trailOffset, null, innerColor * 0.25f, trailRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); - - // Draw the main fire - Main.EntitySpriteDraw(fire, firePos, null, innerColor, mainRot, fire.Size() * 0.5f, fireSize, SpriteEffects.None); - - // Draw the masking smoke - Main.spriteBatch.SetBlendState(BlendState.Additive); - Rectangle frame = mist.Frame(1, 3, 0, MistType); - Main.EntitySpriteDraw(mist, firePos, frame, Color.Lerp(fireColor, Color.White, 0.3f), mainRot, frame.Size() * 0.5f, fireSize, SpriteEffects.None); - Main.EntitySpriteDraw(mist, firePos, frame, fireColor, mainRot, frame.Size() * 0.5f, fireSize * 3f, SpriteEffects.None); - Main.spriteBatch.SetBlendState(BlendState.AlphaBlend); - } - - return false; - } - } -} diff --git a/Projectiles/Boss/FoveanatorLaser.cs b/Projectiles/Boss/FoveanatorLaser.cs deleted file mode 100644 index fc73073e84..0000000000 --- a/Projectiles/Boss/FoveanatorLaser.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.NPCs.TownNPCs; -using Microsoft.Xna.Framework; -using Terraria; -using Terraria.Audio; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.Boss -{ - public class FoveanatorLaser : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Boss"; - - private const int FadeOutTime = 30; - - private const float Acceleration = 1.05f; - private const float MaxVelocity = 24f; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - ProjectileID.Sets.TrailCacheLength[Type] = 2; - ProjectileID.Sets.TrailingMode[Type] = 0; - } - - public override void SetDefaults() - { - Projectile.width = 16; - Projectile.height = 16; - Projectile.hostile = true; - Projectile.ignoreWater = true; - Projectile.Opacity = 0f; - Projectile.penetrate = -1; - Projectile.timeLeft = 300; - } - - public override void AI() - { - Projectile.frameCounter++; - if (Projectile.frameCounter > 4) - { - Projectile.frame++; - Projectile.frameCounter = 0; - } - if (Projectile.frame > 3) - Projectile.frame = 0; - - if (Projectile.velocity.Length() < MaxVelocity) - { - Projectile.velocity *= Acceleration; - if (Projectile.velocity.Length() > MaxVelocity) - { - Projectile.velocity.Normalize(); - Projectile.velocity *= MaxVelocity; - } - } - - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - - Color lightColor = Color.Lerp(new Color(25, 25, 128), new Color(100, 25, 128), Main.DiscoR / 255f); - Lighting.AddLight(Projectile.Center, lightColor.R / 255f, lightColor.G / 255f, lightColor.B / 255f); - - if (Projectile.timeLeft < FadeOutTime) - { - Projectile.Opacity -= 1f / FadeOutTime; - } - else if (Projectile.Opacity < 1f) - { - Projectile.Opacity += 0.25f; - if (Projectile.Opacity > 1f) - Projectile.Opacity = 1f; - } - } - - public override bool PreDraw(ref Color lightColor) - { - lightColor.R = (byte)(255 * Projectile.Opacity); - lightColor.G = (byte)(255 * Projectile.Opacity); - lightColor.B = (byte)(255 * Projectile.Opacity); - CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Type], lightColor, 1); - return false; - } - - public override bool CanHitPlayer(Player target) => Projectile.timeLeft >= FadeOutTime; - - public override void OnHitPlayer(Player target, Player.HurtInfo info) - { - if (Projectile.timeLeft >= FadeOutTime) - target.AddBuff(BuffID.Frostburn, 90); - } - - public override bool OnTileCollide(Vector2 oldVelocity) - { - Collision.HitTiles(Projectile.Center, Projectile.velocity, Projectile.width, Projectile.height); - SoundEngine.PlaySound(SoundID.Item10, Projectile.position); - return true; - } - } -} diff --git a/Projectiles/Boss/FoveanatorLaser.png b/Projectiles/Boss/FoveanatorLaser.png deleted file mode 100644 index 543c692773b8180cb5b69a04c26c942b1bbe0a5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcmV-j0;2tiP)Px#1ZP1_K>z@;j|==^1poj6?MXyIRA@u(n6XO4KoEv=>RAXPYGtEfqr$zwiDIX4 zVB_y87mqVHfM9C)25`T_y95zfX+MFa~EQFbnWxXe1>nYnDZ><7!ROEQ_v zOtL>4IHwfZnCN$14+L!E5+JcK`C4 zEF#g1;B@VtB3R#@q$nc+RRQEjC;k! zsylU3N!+8KMBZsYTGx-DTl5|9evs-9Qb%C*0Vt44bMHW`g4c-|Vr3TD&;D%PYb38w z4E(>3QyUDxuhYu`aIX)#ML!4Vhs@5EbLfC~8j#lYs{jh5P{bT~eNZ5R;0MwOonF_W rvuXeU01jnXNoGw=04e|g00;m8000000Mb*F00000NkvXXu0mjfe#rrg diff --git a/Systems/Collections/NPCs/BossRushHPChangeDict.cs b/Systems/Collections/NPCs/BossRushHPChangeDict.cs index 97646e5f90..572f312a29 100644 --- a/Systems/Collections/NPCs/BossRushHPChangeDict.cs +++ b/Systems/Collections/NPCs/BossRushHPChangeDict.cs @@ -69,7 +69,6 @@ namespace CalamityMod.Systems.Collections { NPCID.Spazmatism, 150000 }, // 30 seconds { NPCID.Retinazer, 125000 }, - { NPCType(), 137500 }, { NPCID.TheDestroyer, 600000 }, // 30 seconds + immunity timer at start { NPCID.TheDestroyerBody, 600000 }, diff --git a/Systems/Collections/NPCs/EnemyImmunitiesList.cs b/Systems/Collections/NPCs/EnemyImmunitiesList.cs index f6f625b1d2..85c024f380 100644 --- a/Systems/Collections/NPCs/EnemyImmunitiesList.cs +++ b/Systems/Collections/NPCs/EnemyImmunitiesList.cs @@ -59,7 +59,6 @@ namespace CalamityMod.Systems.Collections NPCID.Probe, NPCID.Retinazer, NPCID.Spazmatism, - NPCType(), NPCID.SkeletronPrime, NPCType(), NPCID.PrimeCannon, From 1bb010de0b613ac045d7dd5007978a5ef6a9176d Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Tue, 10 Jun 2025 17:35:56 -0400 Subject: [PATCH 56/72] Removed second Skeletron Prime head Plus some leftover Oblivion code that I missed --- DataStructures/NPCStats.cs | 10 - Events/BossRushEvent.cs | 2 +- ExtraTextures/ChadPrime.png | Bin 6702 -> 0 bytes ExtraTextures/ChadPrimeHeadGlow.png | Bin 588 -> 0 bytes ExtraTextures/ChadPrime_Head_Boss.png | Bin 493 -> 0 bytes ExtraTextures/ExtraTextureRefs.cs | 17 - ExtraTextures/SkeletronPrime2HeadGlow.png | Bin 602 -> 0 bytes .../en-US/Mods.CalamityMod.NPCs.hjson | 2 - NPCs/CalamityGlobalNPC.cs | 148 +-- NPCs/NormalNPCs/SkeletronPrime2.cs | 921 ------------------ NPCs/NormalNPCs/SkeletronPrime2.png | Bin 6696 -> 0 bytes NPCs/NormalNPCs/SkeletronPrime2_Head_Boss.png | Bin 506 -> 0 bytes .../Bosses/DestroyerAI.cs | 9 +- .../Bosses/SkeletronPrimeAI.cs | 144 +-- Projectiles/CalamityGlobalProjectile.cs | 205 +--- .../NPCIDs/SkeletronPrimeIDList.cs | 1 - Systems/Collections/NPCs/BossHPScalingList.cs | 1 - .../Collections/NPCs/BossRushHPChangeDict.cs | 1 - .../Collections/NPCs/EnemyImmunitiesList.cs | 1 - 19 files changed, 73 insertions(+), 1389 deletions(-) delete mode 100644 ExtraTextures/ChadPrime.png delete mode 100644 ExtraTextures/ChadPrimeHeadGlow.png delete mode 100644 ExtraTextures/ChadPrime_Head_Boss.png delete mode 100644 ExtraTextures/SkeletronPrime2HeadGlow.png delete mode 100644 NPCs/NormalNPCs/SkeletronPrime2.cs delete mode 100644 NPCs/NormalNPCs/SkeletronPrime2.png delete mode 100644 NPCs/NormalNPCs/SkeletronPrime2_Head_Boss.png diff --git a/DataStructures/NPCStats.cs b/DataStructures/NPCStats.cs index 2cac2472aa..3a407276d4 100644 --- a/DataStructures/NPCStats.cs +++ b/DataStructures/NPCStats.cs @@ -213,7 +213,6 @@ namespace CalamityMod { ModContent.NPCType(), 0.8 }, { NPCID.SkeletronPrime, 0.85 }, - { ModContent.NPCType(), 0.85 }, { NPCID.PrimeCannon, 0.85 }, { NPCID.PrimeLaser, 0.85 }, { NPCID.PrimeSaw, 0.85 }, @@ -416,12 +415,6 @@ namespace CalamityMod 102, // 204 while spinning 119, // 238 while spinning 153 } }, // 306 while spinning - { ModContent.NPCType(), new int[] { - 50, // 100 while spinning - 85, // 170 while spinning - 102, // 204 while spinning - 119, // 238 while spinning - 153 } }, // 306 while spinning { NPCID.PrimeVice, new int[] { 70, 102, 136, 170, 255 } }, { NPCID.PrimeSaw, new int[] { 70, 102, 136, 170, 255 } }, { NPCID.PrimeCannon, new int[] { 30, 51, 68, 85, 102 } }, @@ -666,9 +659,6 @@ namespace CalamityMod { new Tuple(NPCID.SkeletronPrime, ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } }, { new Tuple(NPCID.SkeletronPrime, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } }, { new Tuple(NPCID.SkeletronPrime, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.Skull), new int[] { 50, 108, 124, 140, 210 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 180, 200, 300 } }, - { new Tuple(ModContent.NPCType(), ProjectileID.FrostBeam), new int[] { 50, 108, 124, 140, 210 } }, { new Tuple(NPCID.PrimeCannon, ProjectileID.RocketSkeleton), new int[] { 60, 120, 148, 176, 264 } }, { new Tuple(NPCID.PrimeCannon, ProjectileID.BombSkeletronPrime), new int[] { 80, 160, 0, 0, 300 } }, { new Tuple(NPCID.PrimeLaser, ProjectileID.DeathLaser), new int[] { 50, 108, 124, 140, 210 } }, diff --git a/Events/BossRushEvent.cs b/Events/BossRushEvent.cs index 2b9520ea19..d39adecaea 100644 --- a/Events/BossRushEvent.cs +++ b/Events/BossRushEvent.cs @@ -221,7 +221,7 @@ namespace CalamityMod.Events new Boss(ModContent.NPCType(), TimeChangeContext.Day, permittedNPCs: ModContent.NPCType()), - new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType(), NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser, NPCID.Probe }), + new Boss(NPCID.SkeletronPrime, TimeChangeContext.Night, permittedNPCs: new int[] { NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeVice, NPCID.PrimeLaser }), new Boss(ModContent.NPCType(), TimeChangeContext.Night, permittedNPCs: new int[] { ModContent.NPCType(), ModContent.NPCType(), ModContent.NPCType() }), diff --git a/ExtraTextures/ChadPrime.png b/ExtraTextures/ChadPrime.png deleted file mode 100644 index 3bbc5902b0e0c058ca668c4ae70daf2b9f1a3967..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6702 zcmd6s2{hFGzsC_0lie^OO9mstPuYn<7-Jt1MKTl8*vS&gG7{N`CZ?F|D*I4Tp)50! z@I*$!*s_!*%6_Nk`Ty_p+~@r7z31L@?m2hP`JM0gd*=I_Gr!;bKCjRF{hlNnE7QZA zM>v_7m=2qp8QU?&6egwvk2nr6W>wBlN*M!lkew-<=}E8H7si6s)6mk8iK!-yYsa09 zu{NH4>ZQFll8u$P`34VpP(RUapG1@?T8PC<8p6w`3jrU!)v59TlNFzV^B_N!jiG z{b7kaRRvf`|Mks4MV5-Lf!FJBCF-E@MVL{IqN7+-QYgk|b4M%iLHZ|Q-vMt2c6_HP z|KmdemtyvG^Thn`SmgmZ9Qe}GhD)$44F7M93-$63ISb&0sUb7OfWSm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Q zWK95f2duR{U-TwV{G(6aOJUR|*d&3(k}az!t0^@t#Y0JK3v zCYxv5&xkr%6ZB9o4L{X1C%TX>nj=^g(OCTQ8Z?fZABUO0a6iqxlA<3u3dXBr`lPNSUgbx| z3JBNA+%`b`61wc-w;d?$bp`e^R9Cd70?YX#2Z-cJ@7!|tCB4$MP(H77?1GcvfiB$| z#e0qNZpT?3Q*XSPv=EDl>R1YV1$H1!IDBVl6u2EF*yUys4@7baR_!cf?X>{ix9@>Jy9KjXvqnLT8#@wGKNoy^s?8HVjXZxzd_ z@%^gz$F!bz53UP|C?8+$TM{DV zUxdz5J)#XS_ywJS7oH-3$YX}$t2byWm*~v(!=!#v&sOz}^6c&rtpHkJ-)C(ZcqD+E z`aXTOaZvLGfvEh#%;kmP)LHG+krIYOGBh`WaY!(Fv|B-7g+2U*Q$jSRZ-qT2gwKiM zgi0GH*Kh>hJc~hfE2mj^f8|Ql-la~}7X0ef*IT1O;!ph`R$iF_BTs}Z2#Q%{sa6d0 zkPK8XDNtR2%y7^A(Fx!tC6uT~oywLR+aq=TEjO@-tcm%4u0vX>LdqzIk~j-3b3cWZ ztL63F9R-6aKcGq(L#1=uIfjX81YTE`bSW|8j=7F=PhwrX?kJ|cQb*sKIhpjz7HUyMCR`TT*Pk-hXA+Q7{a}5p%^cedxzR!G}Aj7il7Qn-)S2EW!yxC zHB_G7*`;!#OfoB1RA;xQ<{;mU|Cd3ZTt_y!=^PlB z5X*BstPiwW4|OOp`to7g;U<~C8@%Wy%PKi%!(-ZXn_dK%Z7~#R`eF=?@vVe(q+0%^wTbRsEtc;()FUI~G`#O1N diff --git a/ExtraTextures/ChadPrimeHeadGlow.png b/ExtraTextures/ChadPrimeHeadGlow.png deleted file mode 100644 index e8b25ba236320b5c71f2c9b12554aec4e055346a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmeAS@N?(olHy`uVBq!ia0vp^Jq!$t*EraKtfh+*rGXS0K>?@Yeao-tz{`I{lJ$s+7OwE#Q*m!0w^PbYXPg1LI z_^U2`pI4S&nPr^F5h&p#(k9TV=#t1G`Dtn0^6mBg_dZ=oIz&we0nIufQ1qH%>y*zL z<*zI6&YrVzyUkXgwaf<7c9u45UpISC4*&0!OTOGa`%c$CR}BPx$jY&j7R7i={mLYG#KorM+Ec*^1$L5M7nZXrVv1A_rQ(XyJGPBGqSwJ?Ec+7A} zP(wCZG7uBP!UvdUg8WnN=q(H4%KqkhckizE>wEY5DmYZH*SD^@-?Un-Dn;XG$82_t z4&E-3D2mu`!!R`LHk%Cq%jFV)$z)=*Hkmh~b3KTp*=z#P?RNjPK@bE+yI!v~wS}C_ zpO0KVv85B+l8rYSl2D&1S~DNL$goqCCdsb< z_WlCEXuMnB>-CHm`6tr1*L@j{zW{fZ7SVJ%1@e2R^?NxF@JY1y-`GMPP10~U1R%>Y zV?0R`AkX%?HzJn3|Lm;?yGGDSMQG DestroyerBodyGlowmask; public static Asset DestroyerTailGlowmask; - // Master Rev+ Skeletron Prime - public static Asset ChadPrime; - public static Asset ChadPrimeEyeGlowmask; - // WoF, These are not "exactly" the ExtraTextures. But public static Asset WallOfFleshEyeGlowmask; public static Asset WallOfFleshDemonSickleTexture; @@ -43,16 +39,6 @@ namespace CalamityMod.ExtraTextures public static Asset CircularSmearFire2; public static Asset CircularSmearFire3; - // Boss Heads - // I know it's not exactly a Texture2D but it belongs to ExtraTextures. - public static int BossHeadIndex_ChadPrime; - - public override void Load() - { - string chadPrimeIconPath = "CalamityMod/ExtraTextures/ChadPrime_Head_Boss"; - BossHeadIndex_ChadPrime = CalamityMod.Instance.AddBossHeadTexture(chadPrimeIconPath, -1); - } - // TODO: - Every other ExtraTextures Reference could be move in here public override void OnModLoad() @@ -61,9 +47,6 @@ namespace CalamityMod.ExtraTextures DestroyerBodyGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerBodyGlow", AssetRequestMode.AsyncLoad); DestroyerTailGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/DestroyerTailGlow", AssetRequestMode.AsyncLoad); - ChadPrime = ModContent.Request("CalamityMod/ExtraTextures/ChadPrime", AssetRequestMode.AsyncLoad); - ChadPrimeEyeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/ChadPrimeHeadGlow", AssetRequestMode.AsyncLoad); - WallOfFleshEyeGlowmask = ModContent.Request("CalamityMod/ExtraTextures/VanillaBossGlowmasks/WallOfFleshEyeTelegraphGlow", AssetRequestMode.AsyncLoad); WallOfFleshDemonSickleTexture = ModContent.Request("CalamityMod/Projectiles/Melee/ForbiddenOathbladeProjectile", AssetRequestMode.AsyncLoad); diff --git a/ExtraTextures/SkeletronPrime2HeadGlow.png b/ExtraTextures/SkeletronPrime2HeadGlow.png deleted file mode 100644 index 7054e2945df80475a8f9b6415450e359d3076614..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 602 zcmeAS@N?(olHy`uVBq!ia0vp^Jq!$t*EraKtfh+*rGXSKXGEI{Qt%z0~<+(xj%2l{pppTc+ht=y{vT1k_Fle46@( zVQtRqee>7a-&alT-}^K(^&H=Uh-q&a%4H}2sffL@JpXU}bP0l+XkK+3BEB diff --git a/Localization/en-US/Mods.CalamityMod.NPCs.hjson b/Localization/en-US/Mods.CalamityMod.NPCs.hjson index 125f690431..ab4b81cc08 100644 --- a/Localization/en-US/Mods.CalamityMod.NPCs.hjson +++ b/Localization/en-US/Mods.CalamityMod.NPCs.hjson @@ -168,7 +168,6 @@ CryoSlime.DisplayName: Cryo Slime EbonianBlightSlime.DisplayName: Ebonian Blight Slime Eidolist.DisplayName: Eidolist FearlessGoldfishWarrior.DisplayName: Fearless Goldfish Warrior -Foveanator.DisplayName: Foveanator Frogfish.DisplayName: Frogfish Horse.DisplayName: Earth Elemental IceClasper.DisplayName: Ice Clasper @@ -189,7 +188,6 @@ Rotdog.DisplayName: Rotdog ScornEater.DisplayName: Scorn Eater ShockstormShuttle.DisplayName: Shockstorm Shuttle Shroomble.DisplayName: Shroomble -SkeletronPrime2.DisplayName: Skeletron Prime Stormlion.DisplayName: Stormlion StormlionSentry.DisplayName: Stormlion Sentry Sunskater.DisplayName: Sunskater diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 82bafed550..b574036879 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1910,10 +1910,9 @@ namespace CalamityMod.NPCs npc.scale *= Main.zenithWorld ? 2f : 1.2f; } - else if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType()) + else if (npc.type == NPCID.SkeletronPrime) { - // HP boosted in Death Mode due to having two heads (piercing can make them die faster than normal here since they share an HP bar) - npc.lifeMax = (int)Math.Round(npc.lifeMax * (CalamityWorld.death ? 1.7 : 1.2)); + npc.lifeMax = (int)Math.Round(npc.lifeMax * 1.2); npc.npcSlots = 12f; } else if (npc.type <= NPCID.PrimeLaser && npc.type >= NPCID.PrimeCannon) @@ -3941,9 +3940,6 @@ namespace CalamityMod.NPCs { if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { - if (npc.type == NPCID.SkeletronPrime && (CalamityWorld.death || BossRushEvent.BossRushActive)) - index = ExtraTextureRefs.BossHeadIndex_ChadPrime; - if (npc.type == NPCID.DukeFishron && (CalamityWorld.death || BossRushEvent.BossRushActive)) { float lifeRatio = npc.life / (float)npc.lifeMax; @@ -6651,26 +6647,6 @@ namespace CalamityMod.NPCs #region Check Dead public override bool CheckDead(NPC npc) { - if (npc.type == NPCID.SkeletronPrime) - { - if (CalamityWorld.death || BossRushEvent.BossRushActive) - { - // Kill the other head if he's still alive when this head dies - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC nPC = Main.npc[i]; - if (nPC.active && nPC.type == NPCType() && nPC.life > 0) - { - nPC.life = 0; - nPC.HitEffect(); - nPC.checkDead(); - nPC.active = false; - nPC.netUpdate = true; - } - } - } - } - if (npc.lifeMax > 1000 && npc.type != NPCID.DungeonSpirit && npc.type != NPCType() && npc.type != NPCType() && @@ -7462,11 +7438,11 @@ namespace CalamityMod.NPCs #region Drawing public override void FindFrame(NPC npc, int frameHeight) { - if (CalamityWorld.revenge || BossRushEvent.BossRushActive) + /*if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { - if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType()) + if (npc.type == NPCID.SkeletronPrime) npc.frameCounter = 0D; - } + }*/ // Increment the bestiary worm timer when hovering over the NPC or having their entry open. Pauses otherwise if (npc.IsABestiaryIconDummy) { @@ -8013,8 +7989,43 @@ namespace CalamityMod.NPCs if (CalamityWorld.revenge || BossRushEvent.BossRushActive) { - if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType() || DestroyerIDList.Includes(npc.type)) + if (DestroyerIDList.Includes(npc.type)) shouldDrawBool = false; + + // Allows correct frames to draw in Rev+ phases + // GFB can rot for all I care + if (npc.type == NPCID.SkeletronPrime && !NPC.IsMechQueenUp) + { + int frameHeight = TextureAssets.Npc[npc.type].Value.Height / Main.npcFrameCount[npc.type]; + if (npc.ai[1] == 0f || npc.ai[1] == 4f) + { + newAI[2] += 1f; + if (newAI[2] >= 12f) + { + newAI[2] = 0f; + newAI[3] += frameHeight; + + if (newAI[3] / frameHeight >= 2f) + newAI[3] = 0f; + } + } + + // Spinning probe spawn or fly over phase + else if (npc.ai[1] == 5f || npc.ai[1] == 6f) + { + newAI[2] = 0f; + newAI[3] = frameHeight; + } + + // Spinning phase + else + { + newAI[2] = 0f; + newAI[3] = frameHeight * 2; + } + + npc.frame.Y = (int)newAI[3]; + } } if (npc.type == NPCID.Corruptor || npc.type == NPCID.BloodSquid || (npc.type == NPCID.HornetHoney && npc.ai[3] == 1f)) @@ -8565,83 +8576,6 @@ namespace CalamityMod.NPCs } } - // His afterimages I can't get to work, so fuck it - else if (npc.type == NPCID.SkeletronPrime || npc.type == NPCType()) - { - Texture2D npcTexture = (death && npc.type == NPCID.SkeletronPrime) ? ExtraTextureRefs.ChadPrime.Value : TextureAssets.Npc[npc.type].Value; - int frameHeight = npcTexture.Height / Main.npcFrameCount[npc.type]; - - npc.frame.Y = (int)newAI[3]; - - // Mechdusa drawing - if (NPC.IsMechQueenUp) - { - if (npc.ai[1] == 0f || npc.ai[1] == 4f) - { - newAI[2] += 1f; - if (newAI[2] >= 12f) - { - newAI[2] = 0f; - newAI[3] += frameHeight; - if (newAI[3] / frameHeight >= 5) - newAI[3] = frameHeight * 3; - } - } - else - { - newAI[2] = 0f; - newAI[3] = frameHeight * 5; - } - } - - // Floating phase - else if (npc.ai[1] == 0f || npc.ai[1] == 4f) - { - newAI[2] += 1f; - if (newAI[2] >= 12f) - { - newAI[2] = 0f; - newAI[3] += frameHeight; - - if (newAI[3] / frameHeight >= 2f) - newAI[3] = 0f; - } - } - - // Spinning probe spawn or fly over phase - else if (npc.ai[1] == 5f || npc.ai[1] == 6f) - { - newAI[2] = 0f; - newAI[3] = frameHeight; - } - - // Spinning phase - else - { - newAI[2] = 0f; - newAI[3] = frameHeight * 2; - } - - npc.frame.Y = (int)newAI[3]; - - SpriteEffects spriteEffects = SpriteEffects.None; - if (npc.spriteDirection == 1) - spriteEffects = SpriteEffects.FlipHorizontally; - - spriteBatch.Draw(npcTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, npc.GetAlpha(drawColor), npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0f); - - Color eyesColor = new Color(200, 200, 200, 0); - if (death) - { - int alpha = 192; - eyesColor = npc.type == NPCType() ? new Color(150, 100, 255, alpha) : new Color(255, 255, 0, alpha); - Texture2D glowTexture = npc.type == NPCID.SkeletronPrime ? ExtraTextureRefs.ChadPrimeEyeGlowmask.Value : SkeletronPrime2.EyeTexture.Value; - spriteBatch.Draw(glowTexture, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, eyesColor, npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0f); - } - else - spriteBatch.Draw(TextureAssets.BoneEyes.Value, npc.Center - screenPos + new Vector2(0, npc.gfxOffY), npc.frame, eyesColor, npc.rotation, npc.frame.Size() / 2, npc.scale, spriteEffects, 0f); - } - else if (npc.type == NPCID.Plantera) { // Percent life remaining diff --git a/NPCs/NormalNPCs/SkeletronPrime2.cs b/NPCs/NormalNPCs/SkeletronPrime2.cs deleted file mode 100644 index cd1fc136af..0000000000 --- a/NPCs/NormalNPCs/SkeletronPrime2.cs +++ /dev/null @@ -1,921 +0,0 @@ -using System; -using System.IO; -using CalamityMod.Buffs.DamageOverTime; -using CalamityMod.Buffs.StatDebuffs; -using CalamityMod.DataStructures; -using CalamityMod.Events; -using CalamityMod.World; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using ReLogic.Content; -using Terraria; -using Terraria.Audio; -using Terraria.Chat; -using Terraria.GameContent.Achievements; -using Terraria.GameContent.Bestiary; -using Terraria.ID; -using Terraria.Localization; -using Terraria.ModLoader; - -namespace CalamityMod.NPCs.NormalNPCs -{ - [AutoloadBossHead] - public class SkeletronPrime2 : ModNPC - { - public override string BossHeadTexture => $"Terraria/Images/NPC_Head_Boss_18"; - - public static Asset EyeTexture; - - public const int BombTimeLeft = 600; - - public override void SetStaticDefaults() - { - Main.npcFrameCount[Type] = 6; - NPCID.Sets.NPCBestiaryDrawModifiers bestiaryData = new NPCID.Sets.NPCBestiaryDrawModifiers() { Hide = true }; - NPCID.Sets.NPCBestiaryDrawOffset.Add(Type, bestiaryData); - if (!Main.dedServ) - { - EyeTexture = ModContent.Request("CalamityMod/ExtraTextures/SkeletronPrime2HeadGlow"); - } - } - - public override void SetDefaults() - { - NPC.Calamity().canBreakPlayerDefense = true; - NPC.aiStyle = NPCAIStyleID.SkeletronPrimeHead; - NPC.GetNPCDamage(); - NPC.DR_NERD(0.2f); - - NPC.width = 80; - NPC.height = 102; - if (Main.tenthAnniversaryWorld) - NPC.scale *= 0.5f; - if (CalamityWorld.LegendaryMode) - NPC.scale *= 1.1f; - - NPC.defense = 24; - NPC.lifeMax = 28000; - NPC.knockBackResist = 0f; - NPC.noGravity = true; - NPC.noTileCollide = true; - NPC.boss = true; - NPC.HitSound = SoundID.NPCHit4; - NPC.DeathSound = SoundID.NPCDeath14; - NPC.Calamity().VulnerableToElectricity = true; - NPC.Calamity().VulnerableToSickness = false; - AnimationType = NPCID.SkeletronPrime; - Music = MusicID.Boss3; - } - - public override void SendExtraAI(BinaryWriter writer) - { - 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.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 BossHeadRotation(ref float rotation) - { - rotation = (NPC.ai[1] == 1f || NPC.ai[1] == 2f) ? NPC.rotation : 0f; - } - - public override void AI() - { - CalamityGlobalNPC calamityGlobalNPC = NPC.Calamity(); - - bool bossRush = BossRushEvent.BossRushActive; - bool death = CalamityWorld.death || bossRush; - - // Percent life remaining - float lifeRatio = NPC.life / (float)NPC.lifeMax; - - // Spawn arms - if (calamityGlobalNPC.newAI[1] == 0f) - { - calamityGlobalNPC.newAI[1] = 1f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - // This head owns the Cannon and the Vice in Master Mode - int arm = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.PrimeCannon, NPC.whoAmI); - Main.npc[arm].ai[0] = -1f; - Main.npc[arm].ai[1] = NPC.whoAmI; - Main.npc[arm].target = NPC.target; - Main.npc[arm].netUpdate = true; - - arm = NPC.NewNPC(NPC.GetSource_FromAI(), (int)NPC.Center.X, (int)NPC.Center.Y, NPCID.PrimeVice, NPC.whoAmI); - Main.npc[arm].ai[0] = -1f; - Main.npc[arm].ai[1] = NPC.whoAmI; - Main.npc[arm].target = NPC.target; - Main.npc[arm].ai[3] = 150f; - Main.npc[arm].netUpdate = true; - } - - NPC.SyncExtraAI(); - } - - if (!Main.npc[(int)NPC.ai[0]].active || Main.npc[(int)NPC.ai[0]].aiStyle != NPCAIStyleID.SkeletronPrimeHead) - { - NPC.life = 0; - NPC.HitEffect(); - NPC.active = false; - NPC.netUpdate = true; - } - else - { - // Set direction to the other head's direction - NPC.direction = Main.npc[(int)NPC.ai[0]].direction; - - // Link the HP of both heads - if (NPC.life > Main.npc[(int)NPC.ai[0]].life) - NPC.life = Main.npc[(int)NPC.ai[0]].life; - - // Push away from the lead head if too close, pull closer if too far, if Mechdusa isn't real - if (!NPC.IsMechQueenUp) - { - float pushVelocity = 0.25f; - if (Vector2.Distance(NPC.Center, Main.npc[(int)NPC.ai[0]].Center) < 80f * NPC.scale) - { - if (NPC.position.X < Main.npc[(int)NPC.ai[0]].position.X) - NPC.velocity.X -= pushVelocity; - else - NPC.velocity.X += pushVelocity; - - if (NPC.position.Y < Main.npc[(int)NPC.ai[0]].position.Y) - NPC.velocity.Y -= pushVelocity; - else - NPC.velocity.Y += pushVelocity; - } - else if (Vector2.Distance(NPC.Center, Main.npc[(int)NPC.ai[0]].Center) > 240f * NPC.scale) - { - if (NPC.position.X < Main.npc[(int)NPC.ai[0]].position.X) - NPC.velocity.X += pushVelocity; - else - NPC.velocity.X -= pushVelocity; - - if (NPC.position.Y < Main.npc[(int)NPC.ai[0]].position.Y) - NPC.velocity.Y += pushVelocity; - else - NPC.velocity.Y -= pushVelocity; - } - } - } - - // Check if arms are alive - bool cannonAlive = false; - bool laserAlive = false; - bool viceAlive = false; - bool sawAlive = false; - if (CalamityGlobalNPC.primeCannon != -1) - { - if (Main.npc[CalamityGlobalNPC.primeCannon].active) - cannonAlive = true; - } - if (CalamityGlobalNPC.primeLaser != -1) - { - if (Main.npc[CalamityGlobalNPC.primeLaser].active) - laserAlive = true; - } - if (CalamityGlobalNPC.primeVice != -1) - { - if (Main.npc[CalamityGlobalNPC.primeVice].active) - viceAlive = true; - } - if (CalamityGlobalNPC.primeSaw != -1) - { - if (Main.npc[CalamityGlobalNPC.primeSaw].active) - sawAlive = true; - } - bool allArmsDead = !cannonAlive && !laserAlive && !viceAlive && !sawAlive; - NPC.chaseable = allArmsDead; - - NPC.defense = NPC.defDefense; - - // Phases - bool phase2 = lifeRatio < 0.66f; - bool phase3 = lifeRatio < 0.33f; - bool spawnSpazmatism = lifeRatio < 0.5f && !bossRush && NPC.localAI[2] == 0f; - - // Spawn Spazmatism in Master Mode (just like Oblivion from Avalon) - if (spawnSpazmatism) - { - Player spazmatismSpawnPlayer = Main.player[Player.FindClosest(NPC.position, NPC.width, NPC.height)]; - SoundEngine.PlaySound(SoundID.Roar, spazmatismSpawnPlayer.Center); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int spazmatism = NPC.NewNPC(NPC.GetBossSpawnSource(spazmatismSpawnPlayer.whoAmI), (int)spazmatismSpawnPlayer.Center.X, (int)spazmatismSpawnPlayer.Center.Y - 810, NPCID.Retinazer, 1); - if (spazmatism != Main.maxNPCs) - { - Main.npc[spazmatism].target = spazmatismSpawnPlayer.whoAmI; - Main.npc[spazmatism].timeLeft *= 20; - Main.npc[spazmatism].localAI[3] = 1f; - Main.npc[spazmatism].SyncVanillaLocalAI(); - string typeName = Main.npc[spazmatism].TypeName; - if (Main.dedServ && spazmatism < Main.maxNPCs) - NetMessage.SendData(MessageID.SyncNPC, -1, -1, null, spazmatism); - - AchievementsHelper.CheckMechaMayhem(); - } - } - - NPC.localAI[2] = 1f; - NPC.SyncVanillaLocalAI(); - } - - // Despawn - if (Main.npc[(int)NPC.ai[0]].ai[1] == 3f) - NPC.ai[1] = 3f; - - // Activate daytime enrage - if (Main.IsItDay() && !bossRush && NPC.ai[1] != 3f && NPC.ai[1] != 2f) - { - // Heal - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int healAmt = NPC.life - 300; - if (healAmt < 0) - { - int absHeal = Math.Abs(healAmt); - NPC.life += absHeal; - NPC.HealEffect(absHeal, true); - NPC.netUpdate = true; - } - } - - NPC.ai[1] = 2f; - SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); - } - - // Adjust slowing debuff immunity - bool immuneToSlowingDebuffs = NPC.ai[1] == 5f; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; - - bool normalLaserRotation = NPC.localAI[1] % 2f == 0f; - - // Prevents cheap hits - bool canUseAttackInMaster = NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - 350f; - - // Float near player - if (NPC.ai[1] == 0f || NPC.ai[1] == 4f) - { - // Avoid unfair bullshit - NPC.damage = 0; - - // Start other phases; if arms are dead, start with spin phase - bool otherHeadChargingOrSpinning = Main.npc[(int)NPC.ai[0]].ai[1] == 5f || Main.npc[(int)NPC.ai[0]].ai[1] == 1f; - - // Start spin phase after 1.875 seconds - NPC.ai[2] += phase3 ? 1.2f : 0.8f; - if (NPC.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f)) && (!otherHeadChargingOrSpinning || phase3) && canUseAttackInMaster) - { - bool shouldSpinAround = NPC.ai[1] == 4f && NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - 320f && - Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) < 600f && Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) > 400f; - - bool shouldCharge = !phase2 && !allArmsDead && !CalamityWorld.LegendaryMode; - if (shouldCharge) - { - NPC.ai[2] = 0f; - NPC.ai[1] = 1f; - NPC.netUpdate = true; - } - else if (shouldSpinAround || NPC.ai[1] != 4f) - { - if (shouldSpinAround) - { - NPC.localAI[3] = 300f; - NPC.SyncVanillaLocalAI(); - } - - NPC.ai[2] = 0f; - NPC.ai[1] = shouldSpinAround ? 5f : 1f; - NPC.netUpdate = true; - } - } - - if (NPC.IsMechQueenUp) - NPC.rotation = NPC.rotation.AngleLerp(NPC.velocity.X / 15f * 0.5f, 0.75f); - else - NPC.rotation = NPC.velocity.X / 15f; - - float acceleration = (bossRush ? 0.16f : 0.12f) + (death ? 0.05f * (1f - lifeRatio) : 0f); - float accelerationMult = 1f; - if (!cannonAlive) - { - acceleration += 0.0125f; - accelerationMult += 0.25f; - } - if (!laserAlive) - { - acceleration += 0.0125f; - accelerationMult += 0.25f; - } - if (!viceAlive) - acceleration += 0.0125f; - if (!sawAlive) - acceleration += 0.0125f; - acceleration *= accelerationMult; - - float topVelocity = acceleration * 100f; - float deceleration = 0.7f; - - float headDecelerationUpDist = 0f; - float headDecelerationDownDist = 0f; - float headDecelerationHorizontalDist = 0f; - int headHorizontalDirection = ((!(Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X < NPC.Center.X)) ? 1 : (-1)); - if (NPC.IsMechQueenUp) - { - headDecelerationHorizontalDist = -150f * (float)headHorizontalDirection; - headDecelerationUpDist = 50f; - headDecelerationDownDist = 50f; - } - - if (NPC.position.Y > Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - (320f + headDecelerationUpDist)) - { - if (NPC.velocity.Y > 0f) - NPC.velocity.Y *= deceleration; - - NPC.velocity.Y -= acceleration; - - if (NPC.velocity.Y > topVelocity) - NPC.velocity.Y = topVelocity; - } - else if (NPC.position.Y < Main.player[Main.npc[(int)NPC.ai[0]].target].position.Y - (360f + headDecelerationDownDist)) - { - if (NPC.velocity.Y < 0f) - NPC.velocity.Y *= deceleration; - - NPC.velocity.Y += acceleration; - - if (NPC.velocity.Y < -topVelocity) - NPC.velocity.Y = -topVelocity; - } - - if (NPC.Center.X > Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X + (400f + headDecelerationHorizontalDist)) - { - if (NPC.velocity.X > 0f) - NPC.velocity.X *= deceleration; - - NPC.velocity.X -= acceleration; - - if (NPC.velocity.X > topVelocity) - NPC.velocity.X = topVelocity; - } - if (NPC.Center.X < Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - (400f + headDecelerationHorizontalDist)) - { - if (NPC.velocity.X < 0f) - NPC.velocity.X *= deceleration; - - NPC.velocity.X += acceleration; - - if (NPC.velocity.X < -topVelocity) - NPC.velocity.X = -topVelocity; - } - } - - else - { - // Spinning - if (NPC.ai[1] == 1f) - { - NPC.defense *= 2; - NPC.damage = NPC.defDamage * 2; - - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = true; - - if (phase2 && Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.localAI[0] += 1f; - if (NPC.localAI[0] >= 60f) - { - NPC.localAI[0] = 0f; - - int totalProjectiles = bossRush ? 20 : death ? 12 : 10; - float radians = MathHelper.TwoPi / totalProjectiles; - int type = ProjectileID.FrostBeam; - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - float velocity = 4.5f; - double angleA = radians * 0.5; - double angleB = MathHelper.ToRadians(90f) - angleA; - float velocityX = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB)); - Vector2 spinningPoint = normalLaserRotation ? new Vector2(0f, -velocity) : new Vector2(-velocityX, -velocity); - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 laserFireDirection = spinningPoint.RotatedBy(radians * k); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + laserFireDirection.SafeNormalize(Vector2.UnitY) * 140f, laserFireDirection, type, damage, 0f, Main.myPlayer, 1f, 0f); - Main.projectile[proj].timeLeft = 600; - } - NPC.localAI[1] += 1f; - } - } - - NPC.ai[2] += 1f; - if (NPC.ai[2] == 2f) - SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); - - // Spin for 3 seconds then return to floating phase - float phaseTimer = 240f; - if (phase2 && !phase3) - phaseTimer += 60f; - - if (NPC.ai[2] >= (phaseTimer - (death ? 60f * (1f - lifeRatio) : 0f))) - { - NPC.ai[2] = 0f; - NPC.ai[1] = 4f; - NPC.localAI[0] = 0f; - } - - if (NPC.IsMechQueenUp) - NPC.rotation = NPC.rotation.AngleLerp(NPC.velocity.X / 15f * 0.5f, 0.75f); - else - NPC.rotation += NPC.direction * 0.3f; - - Vector2 headPosition = NPC.Center; - float headTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headPosition.X; - float headTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headPosition.Y; - float headTargetDistance = (float)Math.Sqrt(headTargetX * headTargetX + headTargetY * headTargetY); - - float speed = bossRush ? 12f : 8f; - if (phase2) - speed += 0.5f; - if (phase3) - speed += 0.5f; - - if (headTargetDistance > 150f) - { - float baseDistanceVelocityMult = 1f + MathHelper.Clamp((headTargetDistance - 150f) * 0.0015f, 0.05f, 1.5f); - speed *= baseDistanceVelocityMult; - } - - if (NPC.IsMechQueenUp) - { - float mechdusaSpeedMult = (NPC.npcsFoundForCheckActive[NPCID.TheDestroyerBody] ? 0.6f : 0.75f); - speed *= mechdusaSpeedMult; - } - - headTargetDistance = speed / headTargetDistance; - NPC.velocity.X = headTargetX * headTargetDistance; - NPC.velocity.Y = headTargetY * headTargetDistance; - - if (NPC.IsMechQueenUp) - { - float mechdusaAccelMult = Vector2.Distance(NPC.Center, Main.player[Main.npc[(int)NPC.ai[0]].target].Center); - if (mechdusaAccelMult < 0.1f) - mechdusaAccelMult = 0f; - - if (mechdusaAccelMult < speed) - NPC.velocity = NPC.velocity.SafeNormalize(Vector2.Zero) * mechdusaAccelMult; - } - } - - // Daytime enrage - if (NPC.ai[1] == 2f) - { - NPC.damage = 1000; - calamityGlobalNPC.DR = 0.9999f; - calamityGlobalNPC.unbreakableDR = true; - - calamityGlobalNPC.CurrentlyEnraged = true; - calamityGlobalNPC.CurrentlyIncreasingDefenseOrDR = true; - - if (NPC.IsMechQueenUp) - NPC.rotation = NPC.rotation.AngleLerp(NPC.velocity.X / 15f * 0.5f, 0.75f); - else - NPC.rotation += NPC.direction * 0.3f; - - Vector2 enragedHeadPosition = NPC.Center; - float enragedHeadTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - enragedHeadPosition.X; - float enragedHeadTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - enragedHeadPosition.Y; - float enragedHeadTargetDist = (float)Math.Sqrt(enragedHeadTargetX * enragedHeadTargetX + enragedHeadTargetY * enragedHeadTargetY); - - float enragedHeadSpeed = 10f; - enragedHeadSpeed += enragedHeadTargetDist / 100f; - if (enragedHeadSpeed < 8f) - enragedHeadSpeed = 8f; - if (enragedHeadSpeed > 32f) - enragedHeadSpeed = 32f; - - enragedHeadTargetDist = enragedHeadSpeed / enragedHeadTargetDist; - NPC.velocity.X = enragedHeadTargetX * enragedHeadTargetDist; - NPC.velocity.Y = enragedHeadTargetY * enragedHeadTargetDist; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - NPC.localAI[0] += 1f; - if (NPC.localAI[0] >= 60f) - { - NPC.localAI[0] = 0f; - Vector2 headCenter = NPC.Center; - if (Collision.CanHit(headCenter, 1, 1, Main.player[Main.npc[(int)NPC.ai[0]].target].position, Main.player[Main.npc[(int)NPC.ai[0]].target].width, Main.player[Main.npc[(int)NPC.ai[0]].target].height)) - { - enragedHeadSpeed = 7f; - float enragedHeadSkullTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headCenter.X + Main.rand.Next(-20, 21); - float enragedHeadSkullTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21); - float enragedHeadSkullTargetDist = (float)Math.Sqrt(enragedHeadSkullTargetX * enragedHeadSkullTargetX + enragedHeadSkullTargetY * enragedHeadSkullTargetY); - enragedHeadSkullTargetDist = enragedHeadSpeed / enragedHeadSkullTargetDist; - enragedHeadSkullTargetX *= enragedHeadSkullTargetDist; - enragedHeadSkullTargetY *= enragedHeadSkullTargetDist; - - Vector2 value = new Vector2(enragedHeadSkullTargetX * 1f + Main.rand.Next(-50, 51) * 0.01f, enragedHeadSkullTargetY * 1f + Main.rand.Next(-50, 51) * 0.01f).SafeNormalize(Vector2.UnitY); - value *= enragedHeadSpeed; - value += NPC.velocity; - enragedHeadSkullTargetX = value.X; - enragedHeadSkullTargetY = value.Y; - - int type = ProjectileID.Skull; - headCenter += value * 5f; - int enragedSkulls = Projectile.NewProjectile(NPC.GetSource_FromAI(), headCenter.X, headCenter.Y, enragedHeadSkullTargetX, enragedHeadSkullTargetY, type, 250, 0f, Main.myPlayer, -1f, 0f); - Main.projectile[enragedSkulls].timeLeft = 300; - } - } - } - } - - // Despawning - if (NPC.ai[1] == 3f) - { - // Avoid unfair bullshit - NPC.damage = 0; - - if (NPC.IsMechQueenUp) - { - int mechdusaBossDespawning = NPC.FindFirstNPC(NPCID.Retinazer); - if (mechdusaBossDespawning >= 0) - Main.npc[mechdusaBossDespawning].EncourageDespawn(5); - - mechdusaBossDespawning = NPC.FindFirstNPC(NPCID.Spazmatism); - if (mechdusaBossDespawning >= 0) - Main.npc[mechdusaBossDespawning].EncourageDespawn(5); - - if (!NPC.AnyNPCs(NPCID.Retinazer) && !NPC.AnyNPCs(NPCID.Spazmatism)) - { - mechdusaBossDespawning = NPC.FindFirstNPC(NPCID.TheDestroyer); - if (mechdusaBossDespawning >= 0) - Main.npc[mechdusaBossDespawning].Transform(NPCID.TheDestroyerTail); - - NPC.EncourageDespawn(5); - } - - NPC.velocity.Y += 0.1f; - if (NPC.velocity.Y < 0f) - NPC.velocity.Y *= 0.95f; - - NPC.velocity.X *= 0.95f; - if (NPC.velocity.Y > 13f) - NPC.velocity.Y = 13f; - } - else - { - NPC.velocity.Y += 0.1f; - if (NPC.velocity.Y < 0f) - NPC.velocity.Y *= 0.9f; - - NPC.velocity.X *= 0.9f; - - if (NPC.timeLeft > 500) - NPC.timeLeft = 500; - } - } - - // Fly around in a circle - if (NPC.ai[1] == 5f) - { - // Avoid unfair bullshit - NPC.damage = 0; - - NPC.ai[2] += 1f; - - NPC.rotation = NPC.velocity.X / 50f; - - float bombSpawnDivisor = bossRush ? 14f : death ? 22f - (float)Math.Round(5f * (1f - lifeRatio)) : 22f; - float totalBombs = 6f; - int bombSpread = bossRush ? 250 : death ? 125 : 100; - - // Spin for about 3 seconds - float spinVelocity = 24f; - if (NPC.ai[2] == 2f) - { - // Play angry noise - SoundEngine.PlaySound(SoundID.ForceRoar, NPC.Center); - - // Set spin direction - if (Main.player[Main.npc[(int)NPC.ai[0]].target].velocity.X > 0f) - calamityGlobalNPC.newAI[0] = 1f; - else if (Main.player[Main.npc[(int)NPC.ai[0]].target].velocity.X < 0f) - calamityGlobalNPC.newAI[0] = -1f; - else - calamityGlobalNPC.newAI[0] = Main.player[Main.npc[(int)NPC.ai[0]].target].direction; - - // Set spin velocity - NPC.velocity.X = MathHelper.Pi * NPC.localAI[3] / spinVelocity; - NPC.velocity *= -calamityGlobalNPC.newAI[0]; - NPC.SyncExtraAI(); - NPC.netUpdate = true; - } - - // Maintain velocity and spit homing bombs - else if (NPC.ai[2] > 2f) - { - NPC.velocity = NPC.velocity.RotatedBy(MathHelper.Pi / spinVelocity * -calamityGlobalNPC.newAI[0]); - if (NPC.ai[2] == 3f) - NPC.velocity *= 0.6f; - - if (NPC.ai[2] % bombSpawnDivisor == 0f) - { - NPC.localAI[0] += 1f; - - if (Vector2.Distance(Main.player[Main.npc[(int)NPC.ai[0]].target].Center, NPC.Center) > 64f) - { - SoundEngine.PlaySound(SoundID.Item61, NPC.Center); - CreateParticles(NPC, new Vector2(NPC.Center.X + Main.rand.Next(NPC.width / 2), NPC.Center.Y + 4f)); - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - Vector2 headCenter = NPC.Center; - float enragedHeadSpeed = 6f + (death ? 2f * (1f - lifeRatio) : 0f); - float enragedHeadBombTargetX = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X - headCenter.X + Main.rand.Next(-20, 21); - float enragedHeadBombTargetY = Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - headCenter.Y + Main.rand.Next(-20, 21); - float enragedHeadBombTargetDist = (float)Math.Sqrt(enragedHeadBombTargetX * enragedHeadBombTargetX + enragedHeadBombTargetY * enragedHeadBombTargetY); - enragedHeadBombTargetDist = enragedHeadSpeed / enragedHeadBombTargetDist; - enragedHeadBombTargetX *= enragedHeadBombTargetDist; - enragedHeadBombTargetY *= enragedHeadBombTargetDist; - - Vector2 value = new Vector2(enragedHeadBombTargetX + Main.rand.Next(-bombSpread, bombSpread + 1) * 0.01f, enragedHeadBombTargetY + Main.rand.Next(-bombSpread, bombSpread + 1) * 0.01f).SafeNormalize(Vector2.UnitY); - value *= enragedHeadSpeed; - enragedHeadBombTargetX = value.X; - enragedHeadBombTargetY = value.Y; - - int type = ProjectileID.BombSkeletronPrime; - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - int enragedBombs = Projectile.NewProjectile(NPC.GetSource_FromAI(), headCenter.X, headCenter.Y + 30f, enragedHeadBombTargetX, enragedHeadBombTargetY, type, damage, 0f, Main.myPlayer, -1f); - Main.projectile[enragedBombs].timeLeft = BombTimeLeft; - Main.projectile[enragedBombs].tileCollide = false; - } - } - - // Go to floating phase, or spinning phase if in phase 2 - if (NPC.localAI[0] >= totalBombs) - { - NPC.velocity = NPC.velocity.SafeNormalize(Vector2.UnitY); - - // Fly overhead and spit spreads of bombs into the air if on low health - NPC.ai[1] = phase3 ? 6f : 1f; - NPC.ai[2] = 0f; - NPC.localAI[3] = 0f; - NPC.localAI[0] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - NPC.SyncVanillaLocalAI(); - NPC.SyncExtraAI(); - NPC.netUpdate = true; - } - } - } - } - - // Fly overhead and spit bombs - if (NPC.ai[1] == 6f) - { - // Avoid unfair bullshit - NPC.damage = 0; - - NPC.rotation = NPC.velocity.X / 15f; - - float flightVelocity = bossRush ? 28f : death ? 25f : 22f; - float flightAcceleration = bossRush ? 1.16f : death ? 0.96f : 0.76f; - - Vector2 destination = new Vector2(Main.player[Main.npc[(int)NPC.ai[0]].target].Center.X, Main.player[Main.npc[(int)NPC.ai[0]].target].Center.Y - 420f); - NPC.SimpleFlyMovement((destination - NPC.Center).SafeNormalize(Vector2.UnitY) * flightVelocity, flightAcceleration); - - // Spit bombs and then go to floating phase - NPC.localAI[3] += 1f; - if (Vector2.Distance(NPC.Center, destination) < 160f || NPC.ai[2] > 0f || NPC.localAI[3] > 120f) - { - float bombSpawnDivisor = death ? 50f : 60f; - float totalBombSpreads = 2f; - NPC.ai[2] += 1f; - if (NPC.ai[2] % bombSpawnDivisor == 0f) - { - NPC.localAI[0] += 1f; - - if (Main.netMode != NetmodeID.MultiplayerClient) - { - int totalProjectiles = bossRush ? 24 : 12; - float radians = MathHelper.TwoPi / totalProjectiles; - int type = ProjectileID.BombSkeletronPrime; - int damage = NPC.GetProjectileDamage(type); - - // Reduce mech boss projectile damage depending on the new ore progression changes - if (CalamityServerConfig.Instance.EarlyHardmodeProgressionRework && !BossRushEvent.BossRushActive) - { - double firstMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkFirstMechStatMultiplier_Expert; - double secondMechMultiplier = CalamityGlobalNPC.EarlyHardmodeProgressionReworkSecondMechStatMultiplier_Expert; - if (!NPC.downedMechBossAny) - damage = (int)(damage * firstMechMultiplier); - else if ((!NPC.downedMechBoss1 && !NPC.downedMechBoss2) || (!NPC.downedMechBoss2 && !NPC.downedMechBoss3) || (!NPC.downedMechBoss3 && !NPC.downedMechBoss1)) - damage = (int)(damage * secondMechMultiplier); - } - - float velocity = 12f; - double angleA = radians * 0.5; - double angleB = MathHelper.ToRadians(90f) - angleA; - float velocityX = (float)(velocity * Math.Sin(angleA) / Math.Sin(angleB)); - Vector2 spinningPoint = normalLaserRotation ? new Vector2(0f, -velocity) : new Vector2(-velocityX, -velocity); - Vector2 upwardVelocity = Vector2.UnitY * velocity; - for (int k = 0; k < totalProjectiles; k++) - { - Vector2 bombVelocity = spinningPoint.RotatedBy(radians * k); - int proj = Projectile.NewProjectile(NPC.GetSource_FromAI(), NPC.Center + Vector2.UnitY * 30f + bombVelocity.SafeNormalize(Vector2.UnitY) * 15f, bombVelocity - upwardVelocity, type, damage, 0f, Main.myPlayer, -2f); - Main.projectile[proj].timeLeft = BombTimeLeft; - Main.projectile[proj].tileCollide = false; - } - NPC.localAI[1] += 1f; - } - - SoundEngine.PlaySound(SoundID.Item62, NPC.Center); - CreateParticles(NPC, new Vector2(NPC.Center.X, NPC.Center.Y + 4f), 5); - - if (NPC.localAI[0] >= totalBombSpreads) - { - NPC.ai[1] = 0f; - NPC.ai[2] = 0f; - NPC.localAI[3] = 0f; - calamityGlobalNPC.newAI[0] = 0f; - NPC.localAI[0] = 0f; - NPC.SyncVanillaLocalAI(); - NPC.SyncExtraAI(); - NPC.netUpdate = true; - } - } - } - } - } - } - - private void CreateParticles(NPC npc, Vector2 position, int amountMultiplier = 1) - { - int firstDustCloudParticleAmount = 30 * amountMultiplier; - int secondDustCloudParticleAmount = 20 * amountMultiplier; - int goreAmount = 2 * amountMultiplier; - - for (int dustIndex = 0; dustIndex < firstDustCloudParticleAmount; dustIndex++) - { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f); - Main.dust[dust].velocity *= 1.4f; - } - - for (int dustIndex = 0; dustIndex < secondDustCloudParticleAmount; dustIndex++) - { - int dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Torch, 0f, 0f, 100, default(Color), 3.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 7f; - dust = Dust.NewDust(npc.position, npc.width, npc.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); - Main.dust[dust].velocity *= 3f; - } - - for (int goreIndex = 0; goreIndex < goreAmount; goreIndex++) - { - float goreVelocityMultiplier = 0.4f; - if (goreIndex >= goreAmount / 2) - goreVelocityMultiplier = 0.8f; - - int gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= goreVelocityMultiplier; - Main.gore[gore].velocity.X += 1f; - Main.gore[gore].velocity.Y += 1f; - gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= goreVelocityMultiplier; - Main.gore[gore].velocity.X -= 1f; - Main.gore[gore].velocity.Y += 1f; - gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= goreVelocityMultiplier; - Main.gore[gore].velocity.X += 1f; - Main.gore[gore].velocity.Y -= 1f; - gore = Gore.NewGore(npc.GetSource_FromAI(), npc.Center, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= goreVelocityMultiplier; - Main.gore[gore].velocity.X -= 1f; - Main.gore[gore].velocity.Y -= 1f; - } - } - - public override void BossLoot(ref string name, ref int potionType) => potionType = ItemID.GreaterHealingPotion; - - public override void ApplyDifficultyAndPlayerScaling(int numPlayers, float balance, float bossAdjustment) - { - NPC.lifeMax = (int)(NPC.lifeMax * 0.75f * balance * bossAdjustment); - NPC.damage = (int)(NPC.damage * NPC.GetExpertDamageMultiplier()); - } - - public override bool CheckActive() => false; - - public override bool CheckDead() - { - // Kill the lead head if he's still alive when this head dies - for (int i = 0; i < Main.maxNPCs; i++) - { - NPC nPC = Main.npc[i]; - if (nPC.active && nPC.type == NPCID.SkeletronPrime && nPC.life > 0) - { - nPC.life = 0; - nPC.HitEffect(); - nPC.checkDead(); - nPC.active = false; - nPC.netUpdate = true; - } - } - - return true; - } - - public override void HitEffect(NPC.HitInfo hit) - { - if (NPC.life <= 0) - { - if (!Main.dedServ) - { - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("SkeletronPrime2_1").Type, NPC.scale); - Gore.NewGore(NPC.GetSource_Death(), NPC.position, NPC.velocity, Mod.Find("SkeletronPrime2_2").Type, NPC.scale); - - int gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X += 1f; - Main.gore[gore].velocity.Y += 1f; - - gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X -= 1f; - Main.gore[gore].velocity.Y += 1f; - - gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X += 1f; - Main.gore[gore].velocity.Y -= 1f; - - gore = Gore.NewGore(NPC.GetSource_Death(), NPC.position, default(Vector2), Main.rand.Next(61, 64)); - Main.gore[gore].velocity *= 0.4f; - Main.gore[gore].velocity.X -= 1f; - Main.gore[gore].velocity.Y -= 1f; - } - - for (int i = 0; i < 10; i++) - { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f); - Main.dust[dust].velocity *= 1.4f; - } - - for (int i = 0; i < 5; i++) - { - int dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default(Color), 2.5f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 5f; - - dust = Dust.NewDust(NPC.position, NPC.width, NPC.height, DustID.Torch, 0f, 0f, 100, default(Color), 1.5f); - Main.dust[dust].velocity *= 3f; - } - } - } - } -} diff --git a/NPCs/NormalNPCs/SkeletronPrime2.png b/NPCs/NormalNPCs/SkeletronPrime2.png deleted file mode 100644 index c019c3130896adbdecba05818d265649428f143b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6696 zcmchcc{G&$-^XVdV=x$lT!Un+W6NY6TUo|3ma!Hgj3qmxB%*9%$d)oil3it~h>$2_ z?20T&s8F^$$`UEcGxfWF=Xvh?S$==~&UxmXIp6C#=X+f<=Q{IwzhCe7T(lvYa&roE zfD9UZr}wxXk>_4V}u0FVMyl>sXpI7tP3Rs$R_2k2{oQ<@U? z)D`uQC^{(uCSriJI^ewdX-^p-Vih%10DEn~R~39t3-GS1Z9t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u7Id(DKpeWLDVdH#O<@nF8G79p=7G(^8iVf?9U@iJ;5sv8 zO^6Ad?}4SL(($*~%J@hswlW;AU_~BI7v)8u?4Yl&f6am{CRq%FjDyWRmr}m0c)yWl zrb16OT_SD<28JGSdi6gv7jRAWJIx%7X?-c!|5_zBpMmMzu49Y`i}NYgGE0ddQo!{b zQ$@Mkip++PS(o%gNOm&O+in&?6^95YhjyLnFT3hh{^J-ejMQNewasT?b@!R~i3AlD zI1VM1ZK$0GnbA<1xL{Xxnbg)RH1`jzh}@3(D^_%kl>Ylzu>za#&)H+o)zk0$Ddzc# Q`40++U`)i{GxSLK4{puH6951J diff --git a/NPCs/NormalNPCs/SkeletronPrime2_Head_Boss.png b/NPCs/NormalNPCs/SkeletronPrime2_Head_Boss.png deleted file mode 100644 index 38362cb253734e9f44574ff19919dedf489ab9c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcmVPx$nn^@KR7i={mZ44qK@f(&5)1}=XRAnBRB|qH_hksQda-Y zCW~#NwZDs`*=z#P>2v@Hf&hTQVBpx->vaI)I0j%e8UgEM{)t3VtJQ$iLrFx^a=FZ0 zP&+W0On{Wk8_}-qXti2EN+8c|Y$U}<_L?su$zP0YmMs=IdmjA}{kS)r3L%L^=Sxys=f$e9>b-U!NxGMGUjB-iVq&Xy z@%NEDm#5R|6o6{A>a-h;M&`JkFBL~5DVr=wUfWh{tL=H$*=)12*|$CKI;(&C_WlBA w8^h|WO}l*n000hUSV?A0O#mtY000O800000007cclK=n!07*qoM6N<$g1OJ!V*mgE diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs index 05f144ed8b..9e6163bd23 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/DestroyerAI.cs @@ -1062,7 +1062,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses { bool bossRush = BossRushEvent.BossRushActive; bool death = CalamityWorld.death || bossRush; - bool oblivionAlive = npc.ai[1] == 1f; // Get a target if (npc.target < 0 || npc.target == Main.maxPlayers || Main.player[npc.target].dead || !Main.player[npc.target].active) @@ -1104,12 +1103,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses for (int i = 0; i < Main.maxNPCs; i++) { - if (death && !bossRush && npc.ai[1] == 0f) - { - if (Main.npc[i].active && (Main.npc[i].type == ModContent.NPCType() || Main.npc[i].type == NPCID.SkeletronPrime)) - npc.ai[1] = 1f; - } - if (i != npc.whoAmI && Main.npc[i].active && Main.npc[i].type == npc.type) { Vector2 otherProbeDist = Main.npc[i].Center - npc.Center; @@ -1202,7 +1195,7 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses damage = (int)(damage * secondMechMultiplier); } - int totalProjectiles = oblivionAlive ? 2 : death ? 3 : 1; + int totalProjectiles = death ? 3 : 1; Vector2 projectileVelocity = (targetData.Center - npc.Center).SafeNormalize(Vector2.UnitY) * velocity; if (NPC.IsMechQueenUp) { diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 5c1d32375d..2a2e1d23b3 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -42,115 +42,37 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses if (Main.netMode != NetmodeID.MultiplayerClient) { - // Spawn second head in Master Mode - // The main head owns the Saw and the Laser in Master Mode - if (death) - { - int head = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, ModContent.NPCType(), npc.whoAmI); - Main.npc[head].ai[0] = npc.whoAmI; - Main.npc[head].target = npc.target; - Main.npc[head].netUpdate = true; - npc.ai[0] = head; + int arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeCannon, npc.whoAmI); + Main.npc[arm].ai[0] = -1f; + Main.npc[arm].ai[1] = npc.whoAmI; + Main.npc[arm].target = npc.target; + Main.npc[arm].netUpdate = true; - int arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeSaw, npc.whoAmI); - Main.npc[arm].ai[0] = 1f; - Main.npc[arm].ai[1] = npc.whoAmI; - Main.npc[arm].target = npc.target; - Main.npc[arm].netUpdate = true; + arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeSaw, npc.whoAmI); + Main.npc[arm].ai[0] = 1f; + Main.npc[arm].ai[1] = npc.whoAmI; + Main.npc[arm].target = npc.target; + Main.npc[arm].netUpdate = true; - arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeLaser, npc.whoAmI); - Main.npc[arm].ai[0] = 1f; - Main.npc[arm].ai[1] = npc.whoAmI; - Main.npc[arm].target = npc.target; - Main.npc[arm].netUpdate = true; - Main.npc[arm].ai[3] = 150f; + arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeVice, npc.whoAmI); + Main.npc[arm].ai[0] = -1f; + Main.npc[arm].ai[1] = npc.whoAmI; + Main.npc[arm].target = npc.target; + Main.npc[arm].ai[3] = 150f; + Main.npc[arm].netUpdate = true; - if (Main.netMode == NetmodeID.SinglePlayer) - Main.NewText(Language.GetTextValue("Announcement.HasAwoken", Main.npc[head].TypeName), 175, 75); - else if (Main.dedServ) - ChatHelper.BroadcastChatMessage(NetworkText.FromKey("Announcement.HasAwoken", Main.npc[head].GetTypeNetName()), new Color(175, 75, 255)); - } - else - { - int arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeCannon, npc.whoAmI); - Main.npc[arm].ai[0] = -1f; - Main.npc[arm].ai[1] = npc.whoAmI; - Main.npc[arm].target = npc.target; - Main.npc[arm].netUpdate = true; - - arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeSaw, npc.whoAmI); - Main.npc[arm].ai[0] = 1f; - Main.npc[arm].ai[1] = npc.whoAmI; - Main.npc[arm].target = npc.target; - Main.npc[arm].netUpdate = true; - - arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeVice, npc.whoAmI); - Main.npc[arm].ai[0] = -1f; - Main.npc[arm].ai[1] = npc.whoAmI; - Main.npc[arm].target = npc.target; - Main.npc[arm].ai[3] = 150f; - Main.npc[arm].netUpdate = true; - - arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeLaser, npc.whoAmI); - Main.npc[arm].ai[0] = 1f; - Main.npc[arm].ai[1] = npc.whoAmI; - Main.npc[arm].target = npc.target; - Main.npc[arm].netUpdate = true; - Main.npc[arm].ai[3] = 150f; - } + arm = NPC.NewNPC(npc.GetSource_FromAI(), (int)npc.Center.X, (int)npc.Center.Y, NPCID.PrimeLaser, npc.whoAmI); + Main.npc[arm].ai[0] = 1f; + Main.npc[arm].ai[1] = npc.whoAmI; + Main.npc[arm].target = npc.target; + Main.npc[arm].netUpdate = true; + Main.npc[arm].ai[3] = 150f; } npc.netUpdate = true; npc.SyncExtraAI(); } - if (death) - { - if (!Main.npc[(int)npc.ai[0]].active || Main.npc[(int)npc.ai[0]].aiStyle != NPCAIStyleID.SkeletronPrimeHead) - { - npc.life = 0; - npc.HitEffect(); - npc.active = false; - npc.netUpdate = true; - } - else - { - // Link the HP of both heads - if (npc.life > Main.npc[(int)npc.ai[0]].life) - npc.life = Main.npc[(int)npc.ai[0]].life; - - // Push away from the lead head if too close, pull closer if too far, if Mechdusa isn't real - if (!NPC.IsMechQueenUp) - { - float pushVelocity = 0.25f; - if (Vector2.Distance(npc.Center, Main.npc[(int)npc.ai[0]].Center) < 80f * npc.scale) - { - if (npc.position.X < Main.npc[(int)npc.ai[0]].position.X) - npc.velocity.X -= pushVelocity; - else - npc.velocity.X += pushVelocity; - - if (npc.position.Y < Main.npc[(int)npc.ai[0]].position.Y) - npc.velocity.Y -= pushVelocity; - else - npc.velocity.Y += pushVelocity; - } - else if (Vector2.Distance(npc.Center, Main.npc[(int)npc.ai[0]].Center) > 240f * npc.scale) - { - if (npc.position.X < Main.npc[(int)npc.ai[0]].position.X) - npc.velocity.X += pushVelocity; - else - npc.velocity.X -= pushVelocity; - - if (npc.position.Y < Main.npc[(int)npc.ai[0]].position.Y) - npc.velocity.Y += pushVelocity; - else - npc.velocity.Y -= pushVelocity; - } - } - } - } - // Check if arms are alive bool cannonAlive = false; bool laserAlive = false; @@ -232,9 +154,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses bool normalLaserRotation = npc.localAI[1] % 2f == 0f; - // Prevents cheap hits - bool canUseAttackInMaster = npc.position.Y < Main.player[npc.target].position.Y - 350f; - // Float near player if (npc.ai[1] == 0f || npc.ai[1] == 4f) { @@ -242,25 +161,16 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.damage = 0; // Start other phases; if arms are dead, start with spin phase - bool otherHeadChargingOrSpinning = Main.npc[(int)npc.ai[0]].ai[1] == 5f || Main.npc[(int)npc.ai[0]].ai[1] == 1f; - if (phase2 || CalamityWorld.LegendaryMode || allArmsDead || death) + if (phase2 || CalamityWorld.LegendaryMode || allArmsDead) { // Start spin phase after 1.5 seconds npc.ai[2] += phase3 ? 1.5f : 1f; - if (npc.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f)) && (!otherHeadChargingOrSpinning || !death || phase3) && (canUseAttackInMaster || !death)) + if (npc.ai[2] >= (90f - (death ? 15f * (1f - lifeRatio) : 0f))) { bool shouldSpinAround = npc.ai[1] == 4f && npc.position.Y < Main.player[npc.target].position.Y - 320f && Vector2.Distance(Main.player[npc.target].Center, npc.Center) < 600f && Vector2.Distance(Main.player[npc.target].Center, npc.Center) > 400f; - bool shouldCharge = death && !phase2 && !allArmsDead && !CalamityWorld.LegendaryMode; - if (shouldCharge) - { - npc.ai[2] = 0f; - npc.ai[1] = 1f; - CalamityUtils.CalamityTargeting(npc, CalamityTargetingParameters.BossDefaults); - npc.netUpdate = true; - } - else if (shouldSpinAround || npc.ai[1] != 4f) + if (shouldSpinAround || npc.ai[1] != 4f) { if (shouldSpinAround) { @@ -698,8 +608,8 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.localAI[3] += 1f; if (Vector2.Distance(npc.Center, destination) < 80f || npc.ai[2] > 0f || npc.localAI[3] > 120f) { - float missileSpawnDivisor = death ? 10f : 12f; - float totalMissiles = death ? 12f : 10f; + float missileSpawnDivisor = 12f; + float totalMissiles = 10f; npc.ai[2] += 1f; if (npc.ai[2] % missileSpawnDivisor == 0f) { diff --git a/Projectiles/CalamityGlobalProjectile.cs b/Projectiles/CalamityGlobalProjectile.cs index 669ba162c3..15a8d01f24 100644 --- a/Projectiles/CalamityGlobalProjectile.cs +++ b/Projectiles/CalamityGlobalProjectile.cs @@ -2317,115 +2317,6 @@ namespace CalamityMod.Projectiles } } - else if (projectile.type == ProjectileID.BombSkeletronPrime && projectile.ai[0] < 0f && death) - { - int num = (int)(projectile.Center.X / 16f); - int num2 = (int)(projectile.Center.Y / 16f); - if (WorldGen.InWorld(num, num2) && projectile.tileCollide) - { - Tile tile = Main.tile[num, num2]; - if (tile != null && tile.HasTile && (TileID.Sets.Platforms[tile.TileType] || tile.TileType == TileID.PlanterBox)) - { - projectile.Kill(); - return false; - } - } - - bool deathModeSkeletronPrimeHomingBomb = projectile.ai[0] == -1f; - bool deathModeSkeletronPrimeFallingBomb = projectile.ai[0] == -2f; - - int target = 0; - target = Player.FindClosest(projectile.Center, 1, 1); - - if (projectile.Hitbox.Intersects(Main.player[target].Hitbox)) - { - projectile.Kill(); - return false; - } - - if (projectile.timeLeft < SkeletronPrime2.BombTimeLeft / 2 && projectile.timeLeft > 3) - projectile.tileCollide = true; - - if (deathModeSkeletronPrimeHomingBomb) - { - projectile.ai[1] += 1f; - float homingStartTime = 20f; - float homingEndTime = death ? 140f : 110f; - - if (Vector2.Distance(projectile.Center, Main.player[target].Center) < 192f && projectile.ai[1] < homingEndTime) - projectile.ai[1] = homingEndTime; - - if (projectile.ai[1] < homingEndTime && projectile.ai[1] > homingStartTime) - { - float num134 = projectile.velocity.Length(); - Vector2 vector24 = Main.player[target].Center - projectile.Center; - vector24.Normalize(); - vector24 *= num134; - float inertia = death ? 25f : 30f; - projectile.velocity = (projectile.velocity * (inertia - 1f) + vector24) / inertia; - projectile.velocity.Normalize(); - projectile.velocity *= num134; - } - - float maxVelocity = death ? 18f : 15f; - float acceleration = 1.02f; - if (projectile.velocity.Length() < maxVelocity) - projectile.velocity *= acceleration; - } - else - { - if (projectile.velocity.Y > 10f) - projectile.velocity.Y = 10f; - } - - if (projectile.localAI[0] == 0f) - { - projectile.localAI[0] = 1f; - SoundEngine.PlaySound(SoundID.Item10, projectile.Center); - } - - projectile.frameCounter++; - if (projectile.frameCounter > 3) - { - projectile.frame++; - projectile.frameCounter = 0; - } - - if (projectile.frame > 1) - projectile.frame = 0; - - if (projectile.owner == Main.myPlayer && projectile.timeLeft <= 3) - { - projectile.tileCollide = false; - projectile.ai[2] = 0f; - projectile.alpha = 255; - } - else if (Main.rand.NextBool()) - { - int num28 = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Smoke, 0f, 0f, 100); - Main.dust[num28].scale = 0.1f + (float)Main.rand.Next(5) * 0.1f; - Main.dust[num28].fadeIn = 1.5f + (float)Main.rand.Next(5) * 0.1f; - Main.dust[num28].noGravity = true; - Main.dust[num28].position = projectile.Center + new Vector2(0f, -projectile.height / 2).RotatedBy(projectile.rotation) * 1.1f; - int num29 = 6; - Dust dust8 = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, num29, 0f, 0f, 100); - dust8.scale = 1f + (float)Main.rand.Next(5) * 0.1f; - dust8.noGravity = true; - dust8.position = projectile.Center + new Vector2(0f, -projectile.height / 2 - 6).RotatedBy(projectile.rotation) * 1.1f; - } - - if (deathModeSkeletronPrimeFallingBomb) - { - projectile.ai[2] += 1f; - if (projectile.ai[2] > 60f) - projectile.velocity.Y += 0.2f; - } - - projectile.rotation += projectile.velocity.X * 0.1f; - - return false; - } - else if (projectile.type == ProjectileID.RocketSkeleton && projectile.ai[1] >= 1f) { bool primeCannonProjectile = projectile.ai[1] == 2f; @@ -3469,7 +3360,7 @@ namespace CalamityMod.Projectiles projectile.ai[0]--; // Acceleration for certain lasers - if ((projectile.type == ProjectileID.EyeLaser || projectile.type == ProjectileID.DeathLaser || projectile.type == ProjectileID.FrostBeam) && projectile.ai[0] == 1f) + if ((projectile.type == ProjectileID.EyeLaser || projectile.type == ProjectileID.DeathLaser) && projectile.ai[0] == 1f) { if (projectile.velocity.Length() < AcceleratingBossLaserVelocityCap) projectile.velocity *= 1.0025f; @@ -4743,7 +4634,6 @@ namespace CalamityMod.Projectiles #region Pre Kill public override bool PreKill(Projectile projectile, int timeLeft) { - bool masterRevSkeletronPrimeBomb = projectile.type == ProjectileID.BombSkeletronPrime && projectile.ai[0] < 0f && (CalamityWorld.death || BossRushEvent.BossRushActive); bool revQueenBeeBeeHive = projectile.type == ProjectileID.BeeHive && (CalamityWorld.revenge || BossRushEvent.BossRushActive) && (projectile.ai[2] == 1f || CalamityWorld.death); bool revGolemInferno = projectile.type == ProjectileID.InfernoHostileBolt && projectile.ai[2] > 0f; @@ -4765,96 +4655,7 @@ namespace CalamityMod.Projectiles if (projectile.owner == Main.myPlayer) { - if (masterRevSkeletronPrimeBomb) - { - SoundEngine.PlaySound(SoundID.Item14, projectile.Center); - projectile.position.X += projectile.width / 2; - projectile.position.Y += projectile.height / 2; - projectile.width = projectile.height = 22; - projectile.position.X -= projectile.width / 2; - projectile.position.Y -= projectile.height / 2; - - for (int num951 = 0; num951 < 20; num951++) - { - int num952 = Dust.NewDust(projectile.position, projectile.width, projectile.height, DustID.Smoke, 0f, 0f, 100, default(Color), 1.5f); - Dust dust2 = Main.dust[num952]; - dust2.velocity *= 1.4f; - } - - int num950 = 6; - for (int num953 = 0; num953 < 10; num953++) - { - int num954 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num950, 0f, 0f, 100, default(Color), 2.5f); - Main.dust[num954].noGravity = true; - Dust dust2 = Main.dust[num954]; - dust2.velocity *= 5f; - num954 = Dust.NewDust(projectile.position, projectile.width, projectile.height, num950, 0f, 0f, 100, default(Color), 1.5f); - dust2 = Main.dust[num954]; - dust2.velocity *= 3f; - } - - int num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64)); - Gore gore2 = Main.gore[num955]; - gore2.velocity *= 0.4f; - Main.gore[num955].velocity.X += 1f; - Main.gore[num955].velocity.Y += 1f; - num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64)); - gore2 = Main.gore[num955]; - gore2.velocity *= 0.4f; - Main.gore[num955].velocity.X -= 1f; - Main.gore[num955].velocity.Y += 1f; - num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64)); - gore2 = Main.gore[num955]; - gore2.velocity *= 0.4f; - Main.gore[num955].velocity.X += 1f; - Main.gore[num955].velocity.Y -= 1f; - num955 = Gore.NewGore(projectile.GetSource_FromAI(), projectile.position, default(Vector2), Main.rand.Next(61, 64)); - gore2 = Main.gore[num955]; - gore2.velocity *= 0.4f; - Main.gore[num955].velocity.X -= 1f; - Main.gore[num955].velocity.Y -= 1f; - - Vector2 vector76 = projectile.position; - projectile.position.X += projectile.width / 2; - projectile.position.Y += projectile.height / 2; - projectile.width = projectile.height = 128; - projectile.position.X -= projectile.width / 2; - projectile.position.Y -= projectile.height / 2; - projectile.Damage(); - projectile.position = vector76; - projectile.width = projectile.height = 22; - - if (CalamityWorld.LegendaryMode && !Main.remixWorld) - { - int num1011 = 4; - Vector2 center3 = projectile.position; - int num1012 = num1011; - int num1013 = num1011; - int num1014 = (int)(center3.X / 16f - (float)num1012); - int num1015 = (int)(center3.X / 16f + (float)num1012); - int num1016 = (int)(center3.Y / 16f - (float)num1013); - int num1017 = (int)(center3.Y / 16f + (float)num1013); - if (num1014 < 0) - num1014 = 0; - - if (num1015 > Main.maxTilesX) - num1015 = Main.maxTilesX; - - if (num1016 < 0) - num1016 = 0; - - if (num1017 > Main.maxTilesY) - num1017 = Main.maxTilesY; - - bool wallSplode2 = projectile.ShouldWallExplode(center3, num1011, num1014, num1015, num1016, num1017); - projectile.ExplodeTiles(center3, num1011, num1014, num1015, num1016, num1017, wallSplode2); - } - - if (Main.netMode != NetmodeID.SinglePlayer) - NetMessage.SendData(MessageID.KillProjectile, -1, -1, null, projectile.identity, projectile.owner); - } - - else if (revQueenBeeBeeHive) + if (revQueenBeeBeeHive) { if (Main.netMode != NetmodeID.MultiplayerClient) { @@ -4920,7 +4721,7 @@ namespace CalamityMod.Projectiles } } - if (masterRevSkeletronPrimeBomb || revQueenBeeBeeHive || revGolemInferno) + if (revQueenBeeBeeHive || revGolemInferno) { projectile.active = false; return false; diff --git a/Systems/Collections/NPCIDs/SkeletronPrimeIDList.cs b/Systems/Collections/NPCIDs/SkeletronPrimeIDList.cs index 21c182ddfa..2cf7a31640 100644 --- a/Systems/Collections/NPCIDs/SkeletronPrimeIDList.cs +++ b/Systems/Collections/NPCIDs/SkeletronPrimeIDList.cs @@ -15,7 +15,6 @@ namespace CalamityMod.Systems.Collections List = [ NPCID.SkeletronPrime, - NPCType(), NPCID.PrimeCannon, NPCID.PrimeLaser, NPCID.PrimeSaw, diff --git a/Systems/Collections/NPCs/BossHPScalingList.cs b/Systems/Collections/NPCs/BossHPScalingList.cs index 8527fc2b5e..9a7076e3ce 100644 --- a/Systems/Collections/NPCs/BossHPScalingList.cs +++ b/Systems/Collections/NPCs/BossHPScalingList.cs @@ -104,7 +104,6 @@ namespace CalamityMod.Systems.Collections NPCType(), NPCType(), NPCType(), - NPCType(), NPCType(), NPCType(), NPCType(), diff --git a/Systems/Collections/NPCs/BossRushHPChangeDict.cs b/Systems/Collections/NPCs/BossRushHPChangeDict.cs index 572f312a29..b12ce62bc1 100644 --- a/Systems/Collections/NPCs/BossRushHPChangeDict.cs +++ b/Systems/Collections/NPCs/BossRushHPChangeDict.cs @@ -76,7 +76,6 @@ namespace CalamityMod.Systems.Collections { NPCID.Probe, 10000 }, { NPCID.SkeletronPrime, 160000 }, // 30 seconds - { NPCType(), 160000 }, { NPCID.PrimeVice, 54000 }, { NPCID.PrimeCannon, 45000 }, { NPCID.PrimeSaw, 45000 }, diff --git a/Systems/Collections/NPCs/EnemyImmunitiesList.cs b/Systems/Collections/NPCs/EnemyImmunitiesList.cs index 85c024f380..1bc99e3eac 100644 --- a/Systems/Collections/NPCs/EnemyImmunitiesList.cs +++ b/Systems/Collections/NPCs/EnemyImmunitiesList.cs @@ -60,7 +60,6 @@ namespace CalamityMod.Systems.Collections NPCID.Retinazer, NPCID.Spazmatism, NPCID.SkeletronPrime, - NPCType(), NPCID.PrimeCannon, NPCID.PrimeSaw, NPCID.PrimeLaser, From 4332fe94a3e9b90fe8d66dddefee31d53e45b13b Mon Sep 17 00:00:00 2001 From: Doze-Zoze Date: Wed, 11 Jun 2025 16:59:12 -0500 Subject: [PATCH 57/72] some debuff infliction time changes --- Items/Accessories/ShieldoftheOcean.cs | 4 +++- Projectiles/Magic/AstralachneaFang.cs | 5 ++++- Projectiles/Magic/PlagueFang.cs | 5 ++++- Projectiles/Ranged/HalleysComet.cs | 5 ++++- Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs | 4 +++- Projectiles/Typeless/FlameLickedBarrage.cs | 4 +++- Projectiles/Typeless/FlameLickedHellblast.cs | 4 +++- 7 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Items/Accessories/ShieldoftheOcean.cs b/Items/Accessories/ShieldoftheOcean.cs index cacb484ead..798f0c4020 100644 --- a/Items/Accessories/ShieldoftheOcean.cs +++ b/Items/Accessories/ShieldoftheOcean.cs @@ -73,8 +73,10 @@ namespace CalamityMod.Items.Accessories continue; // Inflict Riptide on empowered parries. + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds if (empowered) - npc.AddBuff(ModContent.BuffType(), 300); + npc.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); // If the NPC can be moved, violently shove them away. Make them susceptible to fall damage on empowered parries. // Otherwise, simply deal a large amount of damage to them if empowered. diff --git a/Projectiles/Magic/AstralachneaFang.cs b/Projectiles/Magic/AstralachneaFang.cs index cf5ed838f9..5619a355ec 100644 --- a/Projectiles/Magic/AstralachneaFang.cs +++ b/Projectiles/Magic/AstralachneaFang.cs @@ -49,7 +49,10 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 180); + //Doze - I gave this long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + //Poison and Venom staff in vanilla do 30 seconds, so this should too as it's a spiritual successor to them. + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(30)); } public override bool PreDraw(ref Color lightColor) diff --git a/Projectiles/Magic/PlagueFang.cs b/Projectiles/Magic/PlagueFang.cs index 443df05763..adc787da24 100644 --- a/Projectiles/Magic/PlagueFang.cs +++ b/Projectiles/Magic/PlagueFang.cs @@ -78,7 +78,10 @@ namespace CalamityMod.Projectiles.Magic public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 180); + //Doze - I gave this long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + //Poison and Venom staff in vanilla do 30 seconds, so this should too as it's a spiritual successor to them. + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(30)); } } } diff --git a/Projectiles/Ranged/HalleysComet.cs b/Projectiles/Ranged/HalleysComet.cs index be4ba1de28..1bed54d8eb 100644 --- a/Projectiles/Ranged/HalleysComet.cs +++ b/Projectiles/Ranged/HalleysComet.cs @@ -77,7 +77,10 @@ namespace CalamityMod.Projectiles.Ranged public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 450); + //Doze - I gave this long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + //Both Elf Melter and Flamethrower in vanilla do 20 seconds of their debuff. This is done to match. + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(20)); SoundEngine.PlaySound(HalleysInferno.Hit, Projectile.Center); // Dust emission on hit diff --git a/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs b/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs index c4e2de0393..3082837b88 100644 --- a/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs +++ b/Projectiles/Typeless/BlazingStarThatDoesNotHeal.cs @@ -101,6 +101,8 @@ namespace CalamityMod.Projectiles.Typeless } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), 60 * 5); + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); } } diff --git a/Projectiles/Typeless/FlameLickedBarrage.cs b/Projectiles/Typeless/FlameLickedBarrage.cs index f94d416372..0169f45ec6 100644 --- a/Projectiles/Typeless/FlameLickedBarrage.cs +++ b/Projectiles/Typeless/FlameLickedBarrage.cs @@ -57,7 +57,9 @@ namespace CalamityMod.Projectiles.Typeless public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 90); + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); } public override void OnHitPlayer(Player target, Player.HurtInfo info) diff --git a/Projectiles/Typeless/FlameLickedHellblast.cs b/Projectiles/Typeless/FlameLickedHellblast.cs index 944ca206b1..3e2e579ae4 100644 --- a/Projectiles/Typeless/FlameLickedHellblast.cs +++ b/Projectiles/Typeless/FlameLickedHellblast.cs @@ -89,7 +89,9 @@ namespace CalamityMod.Projectiles.Typeless public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { - target.AddBuff(ModContent.BuffType(), 90); + //Doze - I gave all parry accessories long debuff infliction times due to the lack of weapons that inflict debuffs for a decent time, and the scarcity of using the parry + //Most common vanilla debuffs have a way to inflict them for 15, 20, or even 30 seconds + target.AddBuff(ModContent.BuffType(), CalamityUtils.SecondsToFrames(15)); } public override void OnKill(int timeLeft) From f3053bc097328281cd5db946fbc30f4783f34ab0 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Wed, 11 Jun 2025 23:55:51 -0400 Subject: [PATCH 58/72] Replace Arms Dealer name with Clothier name Magorfis Splunt the Greater Finklejim for donor --- NPCs/CalamityGlobalTownNPC.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NPCs/CalamityGlobalTownNPC.cs b/NPCs/CalamityGlobalTownNPC.cs index dbf3e92fce..f780ba9a50 100644 --- a/NPCs/CalamityGlobalTownNPC.cs +++ b/NPCs/CalamityGlobalTownNPC.cs @@ -75,7 +75,6 @@ namespace CalamityMod.NPCs }; private static readonly string[] ArmsDealerNames = { - "Drifter", "Finchi", "Heniek", // <@!363404700445442050> (kazurgundu) "Fire", // <@!354362326947856384> (ultimatefirewaster) @@ -90,6 +89,7 @@ namespace CalamityMod.NPCs { "Joeseph Jostar", "Storm Havik", // <@!1013452363178197072> (fishnotduck) + "Magorfis Splunt the Greater Finklejim", // <@!147490809334333440> (eidolbyssus) }; private static readonly string[] CyborgNames = { From c327ee4e7e6320dbef74b40f55df9d63bb215bf2 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 12 Jun 2025 10:47:35 -0400 Subject: [PATCH 59/72] Proper predictive aim for Conference Call --- Items/Weapons/Ranged/ConferenceCall.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Items/Weapons/Ranged/ConferenceCall.cs b/Items/Weapons/Ranged/ConferenceCall.cs index a673f01eb8..550f6e4e1c 100644 --- a/Items/Weapons/Ranged/ConferenceCall.cs +++ b/Items/Weapons/Ranged/ConferenceCall.cs @@ -44,7 +44,6 @@ namespace CalamityMod.Items.Weapons.Ranged public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) { - int bulletAmt = 4; for (int index = 0; index < bulletAmt; ++index) { @@ -87,10 +86,12 @@ namespace CalamityMod.Items.Weapons.Ranged targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); targetPosition.Y -= 100 * j; - Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[j]].Center - targetPosition) * Item.shootSpeed; + // Create a dummy projectile to grab the number of max updates the bullet has for predictive aim use + Projectile dummy = new Projectile(); + dummy.SetDefaults(type); + Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(targetPosition, Main.npc[targets[j]], Item.shootSpeed, dummy.MaxUpdates); int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); - Main.projectile[proj].extraUpdates += 14; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; } @@ -107,10 +108,12 @@ namespace CalamityMod.Items.Weapons.Ranged targetPosition.X = (targetPosition.X + player.Center.X) / 2f + Main.rand.Next(-200, 201); targetPosition.Y -= 100 * randomTarget; - Vector2 extraBulletVel = Vector2.Normalize(Main.npc[targets[randomTarget]].Center - targetPosition) * Item.shootSpeed; + // Create a dummy projectile to grab the number of max updates the bullet has for predictive aim use + Projectile dummy = new Projectile(); + dummy.SetDefaults(type); + Vector2 extraBulletVel = CalamityUtils.CalculatePredictiveAimToTargetMaxUpdates(targetPosition, Main.npc[targets[randomTarget]], Item.shootSpeed, dummy.MaxUpdates); int proj = Projectile.NewProjectile(source, targetPosition, extraBulletVel, type, extraBulletDamage, knockback, player.whoAmI); - Main.projectile[proj].extraUpdates += 14; Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft /= 2; } From 7dcc43f318e0fa5d77c8d7da7d149ff0dc4dd1f8 Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Jun 2025 07:15:55 +0700 Subject: [PATCH 60/72] removed pointless slow-npc interaction code slow hasn't been able to be inflicted on enemies for a while --- Buffs/CalamityGlobalBuff.cs | 9 ------- NPCs/AquaticScourge/AquaticScourgeBody.cs | 1 - NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs | 1 - NPCs/AquaticScourge/AquaticScourgeHead.cs | 1 - NPCs/AquaticScourge/AquaticScourgeTail.cs | 1 - NPCs/Bumblebirb/Dragonfolly.cs | 1 - NPCs/CalamityGlobalNPC.cs | 24 ------------------- NPCs/Leviathan/Leviathan.cs | 1 - .../PlaguebringerGoliath.cs | 1 - NPCs/PrimordialWyrm/PrimordialWyrmHead.cs | 1 - .../Bosses/QueenBeeAI.cs | 1 - .../Bosses/SkeletronPrimeAI.cs | 1 - 12 files changed, 43 deletions(-) diff --git a/Buffs/CalamityGlobalBuff.cs b/Buffs/CalamityGlobalBuff.cs index f893df6689..adab49002c 100644 --- a/Buffs/CalamityGlobalBuff.cs +++ b/Buffs/CalamityGlobalBuff.cs @@ -151,15 +151,6 @@ namespace CalamityMod.Buffs npc.DelBuff(buffIndex); buffIndex--; } - else if (type == BuffID.Slow) - { - if (npc.Calamity().slowed < npc.buffTime[buffIndex]) - npc.Calamity().slowed = npc.buffTime[buffIndex]; - if ((EnemyImmunitiesList.Includes(npc.type) || npc.boss) && npc.Calamity().debuffResistanceTimer <= 0) - npc.Calamity().debuffResistanceTimer = CalamityGlobalNPC.slowingDebuffResistanceMin + npc.Calamity().slowed; - npc.DelBuff(buffIndex); - buffIndex--; - } if (type == BuffID.Electrified) { if (npc.Calamity().electrified < npc.buffTime[buffIndex]) diff --git a/NPCs/AquaticScourge/AquaticScourgeBody.cs b/NPCs/AquaticScourge/AquaticScourgeBody.cs index b7f421f08c..0e2dd6efac 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBody.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBody.cs @@ -168,7 +168,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Fire teeth diff --git a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs index 39a070170d..fb580c1f23 100644 --- a/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs +++ b/NPCs/AquaticScourge/AquaticScourgeBodyAlt.cs @@ -167,7 +167,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Kill body and tail diff --git a/NPCs/AquaticScourge/AquaticScourgeHead.cs b/NPCs/AquaticScourge/AquaticScourgeHead.cs index 37f7762972..b87098a280 100644 --- a/NPCs/AquaticScourge/AquaticScourgeHead.cs +++ b/NPCs/AquaticScourge/AquaticScourgeHead.cs @@ -306,7 +306,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Spawn segments diff --git a/NPCs/AquaticScourge/AquaticScourgeTail.cs b/NPCs/AquaticScourge/AquaticScourgeTail.cs index 2b49366863..4da7ca173c 100644 --- a/NPCs/AquaticScourge/AquaticScourgeTail.cs +++ b/NPCs/AquaticScourge/AquaticScourgeTail.cs @@ -165,7 +165,6 @@ namespace CalamityMod.NPCs.AquaticScourge NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Kill body and tail diff --git a/NPCs/Bumblebirb/Dragonfolly.cs b/NPCs/Bumblebirb/Dragonfolly.cs index e7953a25ee..bc5889e23d 100644 --- a/NPCs/Bumblebirb/Dragonfolly.cs +++ b/NPCs/Bumblebirb/Dragonfolly.cs @@ -148,7 +148,6 @@ namespace CalamityMod.NPCs.Bumblebirb NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // If target is outside the jungle for more than 5 seconds, enrage diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index b574036879..1fe699b5aa 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -296,7 +296,6 @@ namespace CalamityMod.NPCs public int tSad = 0; public int eutrophication = 0; public int webbed = 0; - public int slowed = 0; public int electrified = 0; public int pearlAura = 0; ///

@@ -593,7 +592,6 @@ namespace CalamityMod.NPCs myClone.tSad = tSad; myClone.eutrophication = eutrophication; myClone.webbed = webbed; - myClone.slowed = slowed; myClone.electrified = electrified; myClone.pearlAura = pearlAura; myClone.pearlAuraCounter = pearlAuraCounter; @@ -5516,8 +5514,6 @@ namespace CalamityMod.NPCs eutrophication--; if (webbed > 0) webbed--; - if (slowed > 0) - slowed--; if (vaporfied > 0) vaporfied--; @@ -5897,9 +5893,6 @@ namespace CalamityMod.NPCs velocitySlownessFactor += baseSlownessFactor; } - if (slowed > 0) - velocitySlownessFactor += 0.05f; - if (tesla > 0) { float baseSlownessFactor = 0.05f; @@ -7647,21 +7640,6 @@ namespace CalamityMod.NPCs Dust.NewDustDirect(npc.position, npc.width, npc.height, DustID.Electric, Main.rand.NextFloat(-2f, 2f), Main.rand.NextFloat(-2f, 2f), 0, default, 0.35f); } } - if (slowed > 0) - { - if (Main.rand.Next(5) < 4) - { - int dust = Dust.NewDust(npc.position - new Vector2(2f, 2f), npc.width + 4, npc.height + 4, DustID.SpookyWood, npc.velocity.X * 0.4f, npc.velocity.Y * 0.4f, 225, default, 3f); - Main.dust[dust].noGravity = true; - Main.dust[dust].velocity *= 1.1f; - Main.dust[dust].velocity.Y += 0.25f; - if (Main.rand.NextBool()) - { - Main.dust[dust].noGravity = false; - Main.dust[dust].scale *= 0.5f; - } - } - } if (webbed > 0) { if (Main.rand.Next(5) < 4) @@ -7894,8 +7872,6 @@ namespace CalamityMod.NPCs currentDebuffs.Add(TextureAssets.Buff[BuffID.Confused].Value); if (npc.ichor) currentDebuffs.Add(TextureAssets.Buff[BuffID.Ichor].Value); - if (slowed > 0) - currentDebuffs.Add(TextureAssets.Buff[BuffID.Slow].Value); if (webbed > 0) currentDebuffs.Add(TextureAssets.Buff[BuffID.Webbed].Value); if (npc.midas) diff --git a/NPCs/Leviathan/Leviathan.cs b/NPCs/Leviathan/Leviathan.cs index 61310b6b58..3aa8163835 100644 --- a/NPCs/Leviathan/Leviathan.cs +++ b/NPCs/Leviathan/Leviathan.cs @@ -228,7 +228,6 @@ namespace CalamityMod.NPCs.Leviathan NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Despawn diff --git a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs index ae0563d785..42ac3efb90 100644 --- a/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs +++ b/NPCs/PlaguebringerGoliath/PlaguebringerGoliath.cs @@ -190,7 +190,6 @@ namespace CalamityMod.NPCs.PlaguebringerGoliath NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Light diff --git a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs index 43b7bc4470..0fa397c0ba 100644 --- a/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs +++ b/NPCs/PrimordialWyrm/PrimordialWyrmHead.cs @@ -344,7 +344,6 @@ namespace CalamityMod.NPCs.PrimordialWyrm NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; NPC.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - NPC.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; NPC.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Adjust opacity diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs index 74f818940d..057044ce51 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/QueenBeeAI.cs @@ -145,7 +145,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; // Always start in enemy spawning phase diff --git a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs index 2a2e1d23b3..e682c73553 100644 --- a/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs +++ b/NPCs/VanillaNPCAIOverrides/Bosses/SkeletronPrimeAI.cs @@ -149,7 +149,6 @@ namespace CalamityMod.NPCs.VanillaNPCAIOverrides.Bosses npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; npc.buffImmune[ModContent.BuffType()] = immuneToSlowingDebuffs; - npc.buffImmune[BuffID.Slow] = immuneToSlowingDebuffs; npc.buffImmune[BuffID.Webbed] = immuneToSlowingDebuffs; bool normalLaserRotation = npc.localAI[1] % 2f == 0f; From 63b36b1f697d39586d2eb31b0f1c00330fec5a3b Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 12 Jun 2025 21:17:35 -0400 Subject: [PATCH 61/72] Disgusting Meat also removes Life Fruit and Mana Crystals --- Items/DisgustingMeat.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Items/DisgustingMeat.cs b/Items/DisgustingMeat.cs index e383ac2bbe..1ebe150236 100644 --- a/Items/DisgustingMeat.cs +++ b/Items/DisgustingMeat.cs @@ -39,9 +39,22 @@ namespace CalamityMod.Items TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType()); TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType()); TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType()); + for (int i = 0; i < player.ConsumedLifeFruit; i++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeFruit); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedLifeFruit = 0; + TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType()); TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType()); TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType()); + for (int j = 0; j < player.ConsumedManaCrystals; j++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.ManaCrystal); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedManaCrystals = 0; } return null; From 2a1b21f38ff0310e565fdf02a0ed412538531d5a Mon Sep 17 00:00:00 2001 From: Altixal <73398287+Altixal@users.noreply.github.com> Date: Fri, 13 Jun 2025 08:33:43 +0700 Subject: [PATCH 62/72] removed tool non-changes this makes it cleaner to see which stats actually get changed --- Items/CalamityGlobalItemTweaks.cs | 161 ++++++++++++++---------------- 1 file changed, 77 insertions(+), 84 deletions(-) diff --git a/Items/CalamityGlobalItemTweaks.cs b/Items/CalamityGlobalItemTweaks.cs index 6352984b55..c70800232f 100644 --- a/Items/CalamityGlobalItemTweaks.cs +++ b/Items/CalamityGlobalItemTweaks.cs @@ -333,106 +333,99 @@ namespace CalamityMod.Items #region CATEGORY 3: Tool Balancing { ItemID.AcornAxe, Do(AxePower(100)) }, // Axe of Regrowth - { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) }, - { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) }, - { ItemID.AdamantitePickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, + { ItemID.AdamantiteChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) }, + { ItemID.AdamantiteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(32)) }, + { ItemID.AdamantitePickaxe, Do(TileBoostExact(+1)) }, { ItemID.AdamantiteWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.BonePickaxe, Do(PickPower(55), UseTimeExact(6)) }, - { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, AxePower(150), UseTimeExact(3), TileBoostExact(+0)) }, + { ItemID.BloodLustCluster, Do(AxePower(100), UseTimeExact(13)) }, + { ItemID.BonePickaxe, Do(UseTimeExact(6)) }, + { ItemID.BorealWoodHammer, Do(HammerPower(25), UseTimeExact(11)) }, + { ItemID.ButchersChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+0)) }, { ItemID.CactusPickaxe, Do(PickPower(34), UseTimeExact(9)) }, - { ItemID.CnadyCanePickaxe, Do(PickPower(55), UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe - { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), TileBoostExact(+0), DamageExact(112)) }, - { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, PickPower(200), UseTimeExact(4), TileBoostExact(+2), DamageExact(43)) }, - { ItemID.ChlorophyteGreataxe, Do(AxePower(165), UseTimeExact(7), TileBoostExact(+2)) }, - { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, HammerPower(90), UseTimeExact(5), TileBoostExact(+0)) }, - { ItemID.ChlorophytePickaxe, Do(PickPower(200), UseTimeExact(7), TileBoostExact(+2)) }, - { ItemID.ChlorophyteWarhammer, Do(HammerPower(90), UseTimeExact(8), TileBoostExact(+2)) }, - { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) }, + { ItemID.CnadyCanePickaxe, Do(UseTimeExact(9), TileBoostExact(+1)) }, // Candy Cane Pickaxe + { ItemID.ChlorophyteChainsaw, Do(TrueMeleeNoSpeed, AxePower(120), UseTimeExact(3), DamageExact(112)) }, + { ItemID.ChlorophyteDrill, Do(TrueMeleeNoSpeed, TileBoostExact(+2), DamageExact(43)) }, + { ItemID.ChlorophyteGreataxe, Do(AxePower(165), TileBoostExact(+2)) }, + { ItemID.ChlorophyteJackhammer, Do(TrueMeleeNoSpeed, UseTimeExact(5)) }, + { ItemID.ChlorophytePickaxe, Do(TileBoostExact(+2)) }, + { ItemID.ChlorophyteWarhammer, Do(UseTimeExact(8), TileBoostExact(+2)) }, + { ItemID.CobaltChainsaw, Do(TrueMeleeNoSpeed, UseTimeExact(4), DamageExact(51)) }, { ItemID.CobaltDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) }, { ItemID.CobaltPickaxe, Do(PickPower(130), UseTimeExact(9)) }, - { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) }, + { ItemID.CobaltWaraxe, Do(AxePower(125), UseTimeExact(12)) }, { ItemID.CopperAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.CopperHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.CopperPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.DeathbringerPickaxe, Do(PickPower(70), UseTimeExact(10)) }, - { ItemID.Drax, Do(TrueMeleeNoSpeed, PickPower(200), AxePower(110), UseTimeExact(4), TileBoostExact(+1), DamageExact(80)) }, - { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, - { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) }, - { ItemID.GoldPickaxe, Do(PickPower(55), UseTimeExact(9)) }, - { ItemID.Hammush, Do(HammerPower(85), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) }, - { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.IronPickaxe, Do(PickPower(40), UseTimeExact(8)) }, + { ItemID.CopperHammer, Do(UseTimeExact(12), TileBoostExact(+0)) }, + { ItemID.CopperPickaxe, Do(UseTimeExact(10), TileBoostExact(+0)) }, + { ItemID.DeathbringerPickaxe, Do(UseTimeExact(10)) }, + { ItemID.Drax, Do(TrueMeleeNoSpeed, TileBoostExact(+1), DamageExact(80)) }, + { ItemID.EbonwoodHammer, Do(HammerPower(25), UseTimeExact(9)) }, + { ItemID.FleshGrinder, Do(HammerPower(70), UseTimeExact(13)) }, + { ItemID.GoldAxe, Do(AxePower(80), UseTimeExact(14)) }, + { ItemID.GoldHammer, Do(HammerPower(60), UseTimeExact(9)) }, + { ItemID.GoldPickaxe, Do(UseTimeExact(9)) }, + { ItemID.Hammush, Do(UseTimeExact(10), TileBoostExact(+1)) }, + { ItemID.IronAxe, Do(AxePower(60), UseTimeExact(15)) }, + { ItemID.IronHammer, Do(HammerPower(45), UseTimeExact(11)) }, + { ItemID.IronPickaxe, Do(UseTimeExact(8)) }, { ItemID.LaserDrill, Do(PickPower(220), AxePower(120), UseTimeExact(4), DamageExact(54)) }, - { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15), TileBoostExact(+0)) }, - { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11), TileBoostExact(+0)) }, + { ItemID.LeadAxe, Do(AxePower(60), UseTimeExact(15)) }, + { ItemID.LeadHammer, Do(HammerPower(45), UseTimeExact(11)) }, { ItemID.LeadPickaxe, Do(PickPower(40), UseTimeExact(8)) }, - { ItemID.LucyTheAxe, Do(AxePower(150), UseExact(13), TileBoostExact(+1)) }, - { ItemID.LunarHamaxeNebula, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.LunarHamaxeSolar, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.LunarHamaxeStardust, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.LunarHamaxeVortex, Do(HammerPower(100), AxePower(175), UseTimeExact(5), TileBoostExact(+4)) }, - { ItemID.MeteorHamaxe, Do(HammerPower(70), AxePower(100), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.MoltenPickaxe, Do(PickPower(100), UseTimeExact(10)) }, - { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) }, + { ItemID.LucyTheAxe, Do(UseExact(13), TileBoostExact(+1)) }, + { ItemID.LunarHamaxeNebula, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.LunarHamaxeSolar, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.LunarHamaxeStardust, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.LunarHamaxeVortex, Do(AxePower(175), UseTimeExact(5)) }, + { ItemID.MeteorHamaxe, Do(HammerPower(70)) }, + { ItemID.MoltenHamaxe, Do(HammerPower(75), AxePower(125)) }, + { ItemID.MoltenPickaxe, Do(UseTimeExact(10)) }, + { ItemID.MythrilChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) }, { ItemID.MythrilDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) }, { ItemID.MythrilPickaxe, Do(PickPower(160), UseTimeExact(8)) }, - { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.NebulaPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, + { ItemID.MythrilWaraxe, Do(AxePower(140), UseTimeExact(11)) }, + { ItemID.NebulaDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, { ItemID.NightmarePickaxe, Do(PickPower(66), UseTimeExact(9)) }, - { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), TileBoostExact(-1), DamageExact(63)) }, + { ItemID.OrichalcumChainsaw, Do(TrueMeleeNoSpeed, AxePower(80), UseTimeExact(4), DamageExact(63)) }, { ItemID.OrichalcumDrill, Do(TrueMeleeNoSpeed, PickPower(160), UseTimeExact(4), DamageExact(26)) }, { ItemID.OrichalcumPickaxe, Do(PickPower(160), UseTimeExact(8)) }, - { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), TileBoostExact(-1), DamageExact(51)) }, - { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, PickPower(130), UseTimeExact(5), DamageExact(21)) }, - { ItemID.PalladiumPickaxe, Do(PickPower(130), UseTimeExact(9)) }, - { ItemID.PalladiumWaraxe, Do(AxePower(125), UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, - { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36), TileBoostExact(+0)) }, - { ItemID.PickaxeAxe, Do(PickPower(200), AxePower(110), UseTimeExact(7), TileBoostExact(+1)) }, - { ItemID.Picksaw, Do(PickPower(210), AxePower(125), UseTimeExact(6), TileBoostExact(+1)) }, - { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9), TileBoostExact(+0)) }, + { ItemID.OrichalcumWaraxe, Do(AxePower(140), UseTimeExact(11)) }, + { ItemID.PalladiumChainsaw, Do(TrueMeleeNoSpeed, AxePower(70), UseTimeExact(4), DamageExact(51)) }, + { ItemID.PalladiumDrill, Do(TrueMeleeNoSpeed, UseTimeExact(5), DamageExact(21)) }, + { ItemID.PalladiumPickaxe, Do(UseTimeExact(9)) }, + { ItemID.PalladiumWaraxe, Do(AxePower(125)) }, + { ItemID.PalmWoodHammer, Do(HammerPower(25), UseTimeExact(11)) }, + { ItemID.PearlwoodHammer, Do(HammerPower(25), UseTimeExact(4), UseAnimationExact(20), DamageExact(36)) }, + { ItemID.PickaxeAxe, Do(TileBoostExact(+1)) }, + { ItemID.PlatinumAxe, Do(AxePower(80), UseTimeExact(14)) }, + { ItemID.PlatinumHammer, Do(HammerPower(60), UseTimeExact(9)) }, { ItemID.PlatinumPickaxe, Do(PickPower(55), UseTimeExact(9)) }, - { ItemID.Pwnhammer, Do(HammerPower(80), UseTimeExact(11), TileBoostExact(+1)) }, + { ItemID.Pwnhammer, Do(UseTimeExact(11), TileBoostExact(+1)) }, { ItemID.ReaverShark, Do(PickPower(65), UseTimeExact(16)) }, - { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45), UseTimeExact(4), TileBoostExact(-1)) }, - { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9), TileBoostExact(+0)) }, - { ItemID.ShroomiteDiggingClaw, Do(PickPower(200), AxePower(125), UseTimeExact(4), TileBoostExact(-1)) }, - { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.SilverPickaxe, Do(PickPower(50), UseTimeExact(11)) }, - { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.SolarFlarePickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, - { ItemID.SpectreHamaxe, Do(HammerPower(90), AxePower(170), TileBoostExact(+4)) }, - { ItemID.SpectrePickaxe, Do(PickPower(200), TileBoostExact(+4)) }, - { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.StardustPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, - { ItemID.TheAxe, Do(HammerPower(100), AxePower(175), UseTimeExact(7), TileBoostExact(+1)) }, - { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16), TileBoostExact(+0)) }, - { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12), TileBoostExact(+0)) }, - { ItemID.TinPickaxe, Do(PickPower(35), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), UseTimeExact(4), TileBoostExact(+0), DamageExact(75)) }, - { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), UseTimeExact(4), TileBoostExact(+1), DamageExact(32)) }, + { ItemID.RichMahoganyHammer, Do(HammerPower(25), UseTimeExact(10)) }, + { ItemID.Rockfish, Do(HammerPower(50), UseTimeExact(10)) }, + { ItemID.SawtoothShark, Do(TrueMeleeNoSpeed, AxePower(45)) }, + { ItemID.ShadewoodHammer, Do(HammerPower(25), UseTimeExact(9)) }, + { ItemID.SilverAxe, Do(AxePower(70), UseTimeExact(14)) }, + { ItemID.SilverHammer, Do(HammerPower(55), UseTimeExact(10)) }, + { ItemID.SilverPickaxe, Do(PickPower(50)) }, + { ItemID.SolarFlareDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, + { ItemID.SpectreHamaxe, Do(AxePower(170), TileBoostExact(+4)) }, + { ItemID.SpectrePickaxe, Do(TileBoostExact(+4)) }, + { ItemID.StardustDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, + { ItemID.TheBreaker, Do(HammerPower(70), UseTimeExact(13)) }, + { ItemID.TinAxe, Do(AxePower(50), UseTimeExact(16)) }, + { ItemID.TinHammer, Do(HammerPower(35), UseTimeExact(12)) }, + { ItemID.TinPickaxe, Do(UseTimeExact(10)) }, + { ItemID.TitaniumChainsaw, Do(TrueMeleeNoSpeed, AxePower(90), TileBoostExact(+0), DamageExact(75)) }, + { ItemID.TitaniumDrill, Do(TrueMeleeNoSpeed, PickPower(180), TileBoostExact(+1), DamageExact(32)) }, { ItemID.TitaniumPickaxe, Do(PickPower(180), UseTimeExact(8), TileBoostExact(+1)) }, { ItemID.TitaniumWaraxe, Do(AxePower(160), UseTimeExact(10), TileBoostExact(+1)) }, - { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14), TileBoostExact(+0)) }, - { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10), TileBoostExact(+0)) }, - { ItemID.TungstenPickaxe, Do(PickPower(50), UseTimeExact(11)) }, - { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, PickPower(225), UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, - { ItemID.VortexPickaxe, Do(PickPower(225), UseTimeExact(6), TileBoostExact(+4)) }, - { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13), TileBoostExact(+0)) }, - { ItemID.WoodenHammer, Do(HammerPower(25), UseTimeExact(11), TileBoostExact(+0)) }, + { ItemID.TungstenAxe, Do(AxePower(70), UseTimeExact(14)) }, + { ItemID.TungstenHammer, Do(HammerPower(55), UseTimeExact(10)) }, + { ItemID.TungstenPickaxe, Do(UseTimeExact(11)) }, + { ItemID.VortexDrill, Do(TrueMeleeNoSpeed, UseTimeExact(3), TileBoostExact(+4), DamageExact(95)) }, + { ItemID.WarAxeoftheNight, Do(AxePower(100), UseTimeExact(13)) }, + { ItemID.WoodenHammer, Do(UseTimeExact(11), TileBoostExact(+0)) }, #endregion #region CATEGORY 4: True Melee support From 36483da132e9b2a69abb9f6b3f890b60f11f40fe Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Thu, 12 Jun 2025 21:46:55 -0400 Subject: [PATCH 63/72] Disgusting Meat works in tiers for Calamity and vanilla upgrades Also removes Life Crystals --- Items/DisgustingMeat.cs | 78 ++++++++++++------- .../en-US/Mods.CalamityMod.Items.Misc.hjson | 2 +- 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/Items/DisgustingMeat.cs b/Items/DisgustingMeat.cs index 1ebe150236..9a635b1bec 100644 --- a/Items/DisgustingMeat.cs +++ b/Items/DisgustingMeat.cs @@ -22,39 +22,61 @@ namespace CalamityMod.Items public override bool AltFunctionUse(Player player) => true; public override bool? UseItem(Player player) { - var calPlayer = player.Calamity(); - if (player.altFunctionUse == 2) + if (player.ItemTimeIsZero) { - TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType()); - } - else - { - TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType()); - for (int i = 0; i < player.ConsumedLifeFruit; i++) + var calPlayer = player.Calamity(); + if (player.altFunctionUse == 2) { - int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeFruit); - Main.item[drop].noGrabDelay = 100; + TryDropBoosterItem(player, ref calPlayer.rageBoostOne, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.rageBoostTwo, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.rageBoostThree, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostOne, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostTwo, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.adrenalineBoostThree, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.nimbleBounderBoost, ModContent.ItemType()); } - player.ConsumedLifeFruit = 0; + else + { + if (calPlayer.sTangerine || calPlayer.mFruit || calPlayer.tCloudberry || calPlayer.sStrawberry) + { + TryDropBoosterItem(player, ref calPlayer.sTangerine, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.mFruit, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.tCloudberry, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.sStrawberry, ModContent.ItemType()); + } + else + { + for (int i = 0; i < player.ConsumedLifeFruit; i++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeFruit); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedLifeFruit = 0; + for (int j = 0; j < player.ConsumedLifeCrystals; j++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.LifeCrystal); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedLifeCrystals = 0; + } - TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType()); - TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType()); - for (int j = 0; j < player.ConsumedManaCrystals; j++) - { - int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.ManaCrystal); - Main.item[drop].noGrabDelay = 100; + if (calPlayer.cShard || calPlayer.eCore || calPlayer.pHeart) + { + TryDropBoosterItem(player, ref calPlayer.cShard, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.eCore, ModContent.ItemType()); + TryDropBoosterItem(player, ref calPlayer.pHeart, ModContent.ItemType()); + } + else + { + for (int k = 0; k < player.ConsumedManaCrystals; k++) + { + int drop = Item.NewItem(player.GetSource_DropAsItem(), player.Hitbox, ItemID.ManaCrystal); + Main.item[drop].noGrabDelay = 100; + } + player.ConsumedManaCrystals = 0; + } } - player.ConsumedManaCrystals = 0; + return true; } return null; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson index 3700ac4fa9..e2b8cb8cd0 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Misc.hjson @@ -420,7 +420,7 @@ DisgustingMeat: { Tooltip: ''' Debug item, spawn and use to remove permanent upgrades - will remove health and mana upgrades + will remove health and mana upgrades, use with no Calamity upgrades to remove vanilla upgrades will remove rage and adrenaline upgrades, plus other miscellaneous boosters Removed boosters will be vomited out of you as items ''' From f2af2bd0058fd961a32cbde5cd6361c5d6e774b9 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Fri, 13 Jun 2025 21:35:27 -0400 Subject: [PATCH 64/72] Scorn Eater is immune to knockback again --- NPCs/NormalNPCs/ScornEater.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/NPCs/NormalNPCs/ScornEater.cs b/NPCs/NormalNPCs/ScornEater.cs index 343fafa2b4..f7ad22012d 100644 --- a/NPCs/NormalNPCs/ScornEater.cs +++ b/NPCs/NormalNPCs/ScornEater.cs @@ -42,7 +42,7 @@ namespace CalamityMod.NPCs.NormalNPCs NPC.defense = 38; NPC.DR_NERD(0.05f); NPC.lifeMax = 9000; - NPC.knockBackResist = 0.1f; + NPC.knockBackResist = 0f; AIType = -1; NPC.lavaImmune = true; NPC.value = Item.buyPrice(0, 0, 75, 0); @@ -79,8 +79,6 @@ namespace CalamityMod.NPCs.NormalNPCs if (NPC.velocity.Y == 0f) { - NPC.knockBackResist = 0f; - // Avoid cheap bullshit NPC.damage = 0; @@ -141,8 +139,6 @@ namespace CalamityMod.NPCs.NormalNPCs } else { - NPC.knockBackResist = 0.1f; - if (NPC.direction == 1 && NPC.velocity.X < 1f) { NPC.velocity.X += 0.1f; From bad8242f0ed12078735efd050ebe4fbe4a016251 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sat, 14 Jun 2025 15:49:41 -0400 Subject: [PATCH 65/72] Phoenix's Pride fire tornado improvements --- .../en-US/Mods.CalamityMod.Attunement.hjson | 2 +- Projectiles/Melee/Galaxia_PhoenixsPride.cs | 3 +- .../Melee/Galaxia_PhoenixsPrideFirewall.cs | 65 +++++++++---------- 3 files changed, 32 insertions(+), 38 deletions(-) diff --git a/Localization/en-US/Mods.CalamityMod.Attunement.hjson b/Localization/en-US/Mods.CalamityMod.Attunement.hjson index a694250087..bb971a8498 100644 --- a/Localization/en-US/Mods.CalamityMod.Attunement.hjson +++ b/Localization/en-US/Mods.CalamityMod.Attunement.hjson @@ -138,7 +138,7 @@ PhoenixAttunement: { Swing the sword around you, accelerating over time The swirling nebula constantly emits homing cosmic bolts Release to hurl the sword toward the cursor alongside 6 gigantic cosmic bolts - The hurled sword erupts into a blazing flame pillar on enemy hits + The hurled sword erupts into a blazing tornado on enemy hits ''' } diff --git a/Projectiles/Melee/Galaxia_PhoenixsPride.cs b/Projectiles/Melee/Galaxia_PhoenixsPride.cs index c473cb8de7..0e9dd39a3d 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPride.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPride.cs @@ -263,8 +263,7 @@ namespace CalamityMod.Projectiles.Melee if (CurrentState == 1f && Main.myPlayer == Projectile.owner && !AnyProjectiles(ProjectileType())) { Projectile proj = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, Vector2.Zero, ProjectileType(), Projectile.damage, 0f, Projectile.owner, target.whoAmI); - if (proj.ModProjectile is PhoenixsPrideFirewall fire) - fire.Scale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); + (proj.ModProjectile as PhoenixsPrideFirewall).Scale = MathHelper.Clamp(target.width / 100f, 0.3f, 1.25f); } } diff --git a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs index 2f4a52d81d..90f305fa35 100644 --- a/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs +++ b/Projectiles/Melee/Galaxia_PhoenixsPrideFirewall.cs @@ -1,8 +1,10 @@ using CalamityMod.CalPlayer; using CalamityMod.Graphics.Primitives; using CalamityMod.Items.Weapons.Melee; +using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using System; using System.IO; using Terraria; using Terraria.Graphics.Shaders; @@ -11,11 +13,11 @@ using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { - public class PhoenixsPrideFirewall : ModProjectile, ILocalizedModType + public class PhoenixsPrideFirewall : ModProjectile, ILocalizedModType, IPixelatedPrimitiveRenderer { public new string LocalizationCategory => "Projectiles.Melee"; public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - public const int TornadoHeight = 480; + public const int MaxTornadoHeight = 270; public float Scale; // Size of the firewall, scales with NPC width public float fadeOut = 0f; // Used to control the firewall fading in and out at the start and end of its lifespan @@ -32,7 +34,7 @@ namespace CalamityMod.Projectiles.Melee Projectile.penetrate = -1; Projectile.alpha = 255; Projectile.scale = Scale; - Projectile.timeLeft = 150; + Projectile.timeLeft = 180; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = FourSeasonsGalaxia.PhoenixAttunement_FlamePillarLocalIFrames; } @@ -40,20 +42,30 @@ namespace CalamityMod.Projectiles.Melee public override void AI() { // Constantly follow its target - // Die if the target is no longer active + // Immediately start fading away if the target is no longer active if (!Target.active) { - Projectile.Kill(); - return; + Projectile.velocity *= 0.975f; + if (Projectile.timeLeft > 15) + Projectile.timeLeft = 15; } else - Projectile.Center = Target.Center + Target.velocity; + Projectile.velocity = (Projectile.velocity * 13f + (Target.Center - Projectile.Center).SafeNormalize(Vector2.Zero) * 24f) / 14f; // Fade in and out at the start and end of its lifespan - if (Projectile.timeLeft > 145) - fadeOut += 0.15f; + if (Projectile.timeLeft > 170) + fadeOut += 0.1f; if (Projectile.timeLeft < 15) fadeOut -= 0.05f; + + // Some smoke on the base + if (Projectile.timeLeft % 3 == 0) + { + MediumMistParticle smoke = new(Projectile.Center, Main.rand.NextVector2Circular(6f, 6f), Color.Orange, Color.DarkOrange, 1.1f, 170f); + GeneralParticleHandler.SpawnParticle(smoke); + SquareParticle spark = new(Projectile.Center, -Vector2.UnitY.RotatedByRandom(MathHelper.PiOver2) * 8f, true, 20, 0.9f, Color.White); + GeneralParticleHandler.SpawnParticle(spark); + } } public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) @@ -62,46 +74,29 @@ namespace CalamityMod.Projectiles.Melee return Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), Projectile.Bottom, - Projectile.Bottom - Vector2.UnitY * TornadoHeight, + Projectile.Bottom - Vector2.UnitY * MaxTornadoHeight, 72, ref _); } - public float WidthFunction(float completionRatio) => 50f * Scale * (completionRatio > 0.4f ? 1f : completionRatio * 2.5f); - - public override bool PreDraw(ref Color lightColor) + public float WidthFunction(float completionRatio) => MathF.Max(50f * Scale * (MathF.Pow(1f - completionRatio, 2) * 2.75f), 0.35f); + public Color ColorFunction(float completionRatio) => Color.Orange * (completionRatio > 0.1f ? 1f : completionRatio * 10f); + public void RenderPixelatedPrimitives(SpriteBatch spritebatch, PixelationPrimitiveLayer layer) { - Main.spriteBatch.EnterShaderRegion(); - GameShaders.Misc["CalamityMod:Bordernado"].UseSaturation(-0.2f); GameShaders.Misc["CalamityMod:Bordernado"].UseOpacity(fadeOut); GameShaders.Misc["CalamityMod:Bordernado"].SetShaderTexture(ModContent.Request("Terraria/Images/Misc/Perlin")); - Vector2[] drawPoints = new Vector2[5]; - Vector2 upwardAscent = Vector2.UnitY * TornadoHeight; + Vector2[] drawPoints = new Vector2[7]; + Vector2 upwardAscent = Vector2.UnitY * MaxTornadoHeight * fadeOut; Vector2 bottom = Projectile.Center; Vector2 top = bottom - upwardAscent; + // Offset is intentionally applied here instead of with an offset function in PrimitiveSettings to make it a bit choppier for (int i = 0; i < drawPoints.Length - 1; i++) - drawPoints[i] = Vector2.Lerp(top, bottom, i / (float)(drawPoints.Length - 1)); + drawPoints[i] = Vector2.Lerp(top + Vector2.UnitX * (MathF.Sin(Main.GameUpdateCount * 0.15f + i) * i * 6f), bottom, i / (float)(drawPoints.Length - 1)); drawPoints[drawPoints.Length - 1] = bottom; - PrimitiveRenderer.RenderTrail(drawPoints, new(WidthFunction, (_) => Color.Orange, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 80); - - Main.spriteBatch.ExitShaderRegion(); - - Texture2D vortexTexture = ModContent.Request("CalamityMod/Projectiles/Boss/OldDukeVortex").Value; - for (int i = 0; i < 90; i++) - { - float angle = MathHelper.TwoPi * i / (25f * Scale) + Main.GlobalTimeWrappedHourly * MathHelper.TwoPi; - Color drawColor = Color.White * 0.04f; - drawColor.A = 0; - Vector2 drawPosition = bottom + angle.ToRotationVector2() * 4f - Main.screenPosition; - - drawPosition += (angle + Main.GlobalTimeWrappedHourly * i / 16f).ToRotationVector2() * 6f; - Main.EntitySpriteDraw(vortexTexture, drawPosition, null, drawColor * fadeOut, angle + MathHelper.PiOver2, vortexTexture.Size() * 0.5f, 0.2f * Scale, SpriteEffects.None, 0); - } - - return false; + PrimitiveRenderer.RenderTrail(drawPoints, new(WidthFunction, ColorFunction, pixelate: true, shader: GameShaders.Misc["CalamityMod:Bordernado"]), 80); } } } From f0107e9f1fa242b615e18a008e4df02aa7424cf6 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Jun 2025 22:54:33 -0700 Subject: [PATCH 66/72] Warbanner/Collider Small Fix --- Items/Accessories/WarbanneroftheRighteous.cs | 2 +- Projectiles/Melee/HolyColliderHoldout.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Accessories/WarbanneroftheRighteous.cs b/Items/Accessories/WarbanneroftheRighteous.cs index cd6a16258e..04e2b9b36d 100644 --- a/Items/Accessories/WarbanneroftheRighteous.cs +++ b/Items/Accessories/WarbanneroftheRighteous.cs @@ -82,7 +82,7 @@ namespace CalamityMod.Items.Accessories float generousHitboxWidth = Math.Max(nPC.Hitbox.Width / 2f, nPC.Hitbox.Height / 2f) + 100; // Adds some room so max bonus isnt when you're ON the hitbox float intensity = Utils.Remap(Utils.Distance(player.Center, nPC.Center), MaxDistance + generousHitboxWidth, generousHitboxWidth, 1, 3, true); // We have to have this seperate from bonus, otherwise all effected enemies take damage based on the closest enemy - if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && nPC.CanBeChasedBy()) + if (Utils.Distance(nPC.Center, player.Center) < MaxDistance + generousHitboxWidth && (nPC.IsAnEnemy(true, true, false) || nPC.type == ModContent.NPCType()) && !nPC.dontTakeDamage) { float minDamageMult = 0.35f; int maxTargets = 25; diff --git a/Projectiles/Melee/HolyColliderHoldout.cs b/Projectiles/Melee/HolyColliderHoldout.cs index 1ae89b259a..0dba23aa5b 100644 --- a/Projectiles/Melee/HolyColliderHoldout.cs +++ b/Projectiles/Melee/HolyColliderHoldout.cs @@ -432,7 +432,7 @@ namespace CalamityMod.Projectiles.Melee } for (int i = 0; i < 4; i++) { - Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, (new Vector2(0, -35).RotatedBy(MathHelper.ToRadians(45f))).RotatedBy(MathHelper.ToRadians(90f) * i), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack, Projectile.owner, 0, target.whoAmI); + Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), target.Center, (new Vector2(0, -35).RotatedBy(MathHelper.ToRadians(45f))).RotatedBy(MathHelper.ToRadians(90f) * i), ModContent.ProjectileType(), (int)(Projectile.damage * 0.1), Projectile.knockBack, Projectile.owner, 0); } } } From 4a131284093677a6df6451c0b5c4f2bfcc04c4d0 Mon Sep 17 00:00:00 2001 From: Xyk Date: Sat, 14 Jun 2025 23:46:55 -0700 Subject: [PATCH 67/72] Shadowbolt Staff adjustment Now burst fires Helps in distinction between other mage staffs Got some rebalance to match --- Items/Weapons/Magic/ShadowboltStaff.cs | 11 ++++++----- Projectiles/Magic/Shadowbolt.cs | 12 +++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Items/Weapons/Magic/ShadowboltStaff.cs b/Items/Weapons/Magic/ShadowboltStaff.cs index c3c932f9a3..7ba0f2ac67 100644 --- a/Items/Weapons/Magic/ShadowboltStaff.cs +++ b/Items/Weapons/Magic/ShadowboltStaff.cs @@ -20,16 +20,17 @@ namespace CalamityMod.Items.Weapons.Magic { Item.width = 58; Item.height = 56; - Item.damage = 205; + Item.damage = 285; Item.DamageType = DamageClass.Magic; - Item.mana = 10; - Item.useTime = 12; - Item.useAnimation = 12; + Item.mana = 15; + Item.useTime = 8; + Item.useAnimation = 24; + Item.reuseDelay = 30; + Item.useLimitPerAnimation = 3; Item.useStyle = ItemUseStyleID.Shoot; Item.noMelee = true; Item.knockBack = 5f; Item.value = CalamityGlobalItem.RarityPureGreenBuyPrice; - Item.UseSound = SoundID.Item72; Item.autoReuse = true; Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5f; diff --git a/Projectiles/Magic/Shadowbolt.cs b/Projectiles/Magic/Shadowbolt.cs index 1207adf6cd..d41828d09c 100644 --- a/Projectiles/Magic/Shadowbolt.cs +++ b/Projectiles/Magic/Shadowbolt.cs @@ -75,10 +75,10 @@ namespace CalamityMod.Projectiles.Magic if (reflectionTimer <= 0) { SoundStyle bounce = new("CalamityMod/Sounds/Item/ShadowboltReflect"); - SoundEngine.PlaySound(bounce with { Volume = 0.6f, Pitch = 0f }, platPosWall); + SoundEngine.PlaySound(bounce with { Volume = 0.6f, Pitch = Main.rand.NextFloat(-0.1f, 0.1f), MaxInstances = -1 }, platPosWall); for (int i = 0; i < Main.maxNPCs; i++) Projectile.localNPCImmunity[i] = 0; - Projectile.velocity = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * 5; + Projectile.velocity = (targetCenter - platPosCenter).SafeNormalize(Vector2.UnitX) * 12; reflecting = false; hasReboundOffPlat = true; time = 10; @@ -121,13 +121,13 @@ namespace CalamityMod.Projectiles.Magic GeneralParticleHandler.SpawnParticle(blastRing); SoundStyle wall = new("CalamityMod/Sounds/Item/ShadowboltWallHit"); - SoundEngine.PlaySound(wall with { Volume = 0.5f, Pitch = 0f }, platPosWall); + SoundEngine.PlaySound(wall with { Volume = 0.5f, Pitch = 0f, MaxInstances = -1 }, platPosWall); reflecting = true; Projectile.extraUpdates = 0; } } - if (!hasReboundOffPlat && Projectile.numHits == 0 && !hasSetPlatSpawn && (Collision.SolidCollision(Projectile.Center, 20, 20) || time > 90)) + if (!hasReboundOffPlat && Projectile.numHits == 0 && !hasSetPlatSpawn && (Collision.SolidCollision(Projectile.Center, 20, 20) || time > 70)) { hasSetPlatSpawn = true; spawnPlat = true; @@ -151,6 +151,8 @@ namespace CalamityMod.Projectiles.Magic { if (time == 14) { + SoundEngine.PlaySound(SoundID.Item72 with { Volume = 0.8f, Pitch = Main.rand.NextFloat(-0.1f, 0.1f), MaxInstances = -1 }, Projectile.Center); + Projectile.velocity = Projectile.velocity.RotatedByRandom(0.15f); for (int i = 0; i < 2; i++) { Particle blastRing = new CustomPulse(Projectile.Center, Vector2.Zero, Color.Indigo, "CalamityMod/Particles/BloomCircle", Vector2.One, Main.rand.NextFloat(-10, 10), 0.3f, 0.75f, 12, true); @@ -176,7 +178,7 @@ namespace CalamityMod.Projectiles.Magic } if (time > 22 && time % 3 == 0) { - Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity * 0.1f, false, 18, 0.05f * (hasReboundOffPlat ? 1.1f : 0.5f), Color.Lerp(Color.Indigo, Color.Orchid, 0.25f), new Vector2(0.7f, 1f), true, false, 0.3f); + Particle spark = new GlowSparkParticle(Projectile.Center - Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, -Projectile.velocity * 0.1f, false, 18, 0.05f * (hasReboundOffPlat ? 1.1f : 0.5f), Color.Lerp(Color.Indigo, Color.Orchid, 0.25f), new Vector2(0.7f, 2f), true, false, 0.3f); GeneralParticleHandler.SpawnParticle(spark); } if (time > 30 && Main.rand.NextBool(12)) From 82d24b4e54844ad7de6dad207d61fbbff2b5d3d9 Mon Sep 17 00:00:00 2001 From: sunny-raindrops Date: Sun, 15 Jun 2025 00:29:21 -0700 Subject: [PATCH 68/72] Dynamo Stem Cells update Mini Swarmers how use their own velocity and fire at the the cursor, rather than the velocity of the projectile that spawned it --- CalPlayer/CalamityPlayerOnHit.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CalPlayer/CalamityPlayerOnHit.cs b/CalPlayer/CalamityPlayerOnHit.cs index 31b9ec0761..cd997fddc6 100644 --- a/CalPlayer/CalamityPlayerOnHit.cs +++ b/CalPlayer/CalamityPlayerOnHit.cs @@ -838,8 +838,9 @@ namespace CalamityMod.CalPlayer if (dynamoStemCells && MiniSwarmerCooldown <= 0 && proj.CountsAsClass()) { MiniSwarmerCooldown = DynamoStemCells.MiniSwarmerCooldown; - - Vector2 velocity = proj.velocity.SafeNormalize(Vector2.UnitY) * 19; + Vector2 directionToMouse = Main.MouseWorld - Player.Center; + directionToMouse.Normalize(); + Vector2 velocity = directionToMouse * 19; int MiniSwamerDamage = (int)Player.GetTotalDamage().ApplyTo(DynamoStemCells.MiniSwamerDamage); Projectile.NewProjectile(source, Player.Center, velocity, ProjectileType(), MiniSwamerDamage, 2f, proj.owner); } From 6616933760c44f30800c88153df5d7800f757f8c Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 15 Jun 2025 09:33:23 -0400 Subject: [PATCH 69/72] Fixed SCal being able to fire stuff in the 1 frame between bros dying and phase 2 transition --- NPCs/SupremeCalamitas/SupremeCalamitas.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/NPCs/SupremeCalamitas/SupremeCalamitas.cs b/NPCs/SupremeCalamitas/SupremeCalamitas.cs index f82c52dc13..4df9d70e29 100644 --- a/NPCs/SupremeCalamitas/SupremeCalamitas.cs +++ b/NPCs/SupremeCalamitas/SupremeCalamitas.cs @@ -2063,6 +2063,7 @@ namespace CalamityMod.NPCs.SupremeCalamitas NPC.dontTakeDamage = true; NPC.chaseable = false; NPC.damage = 0; + attackPause = 5; if (!canDespawn) NPC.velocity *= 0.95f; From ca62cb74365adf24481bc08446f4a38f766658cb Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Sun, 15 Jun 2025 22:03:21 -0400 Subject: [PATCH 70/72] Made Slime God core bestiary portrait just itself Also removed the pog eyes from GFB since they no longer make sense with the resprite --- ExtraTextures/Bestiary/SlimeGod_Bestiary.png | Bin 24491 -> 0 bytes NPCs/SlimeGod/SlimeGodCore.cs | 19 +------------------ NPCs/SlimeGod/SlimeGodEyes.png | Bin 264 -> 0 bytes 3 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 ExtraTextures/Bestiary/SlimeGod_Bestiary.png delete mode 100644 NPCs/SlimeGod/SlimeGodEyes.png diff --git a/ExtraTextures/Bestiary/SlimeGod_Bestiary.png b/ExtraTextures/Bestiary/SlimeGod_Bestiary.png deleted file mode 100644 index dbe7056e82b0ed0d42ab446c2b99db239dc25779..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24491 zcmY&gdpy(M|3|qLC8e257WybfZ7sJ9MWzdtl-$kc5{6j0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PeRcYy{i)FQk0F7C zeH#8-TU%ZuPHo|Q2o9AOgV}&zQ8!Y#cOtQiR<|3gM*1P&{#8;l;4I$CJaS8x#%_={ zidPVuVLA1Jm+${nBje;*w)#E(x|m~9m4^sA?15e_&gsdEmudv3ci0ZlId3u;pxBuH zXaf8E5(uWXVEWuzn+C>3p^gUbf004zGzd$k*#+q5=+LC;@G3Q zX;kFN#Q$1>044~o!8+4<#B^Z|Vgk!@$g-o@gIN777d(#PjvtrU2mY4_f9sz&?zh&z NjyaxiC_93=_J3D4Kz;xK diff --git a/NPCs/SlimeGod/SlimeGodCore.cs b/NPCs/SlimeGod/SlimeGodCore.cs index 42f3e8c2fa..ce90a162f8 100644 --- a/NPCs/SlimeGod/SlimeGodCore.cs +++ b/NPCs/SlimeGod/SlimeGodCore.cs @@ -60,7 +60,6 @@ namespace CalamityMod.NPCs.SlimeGod public static readonly SoundStyle ShotSound = new("CalamityMod/Sounds/Custom/SlimeGodShot", 2); public static readonly SoundStyle BigShotSound = new("CalamityMod/Sounds/Custom/SlimeGodBigShot", 2); - public static Asset ZenithSeedEyeTexture; public static Asset EyeTexture; public static Asset OverlayTexture; @@ -73,22 +72,10 @@ namespace CalamityMod.NPCs.SlimeGod public override void SetStaticDefaults() { NPCID.Sets.BossBestiaryPriority.Add(Type); - NPCID.Sets.NPCBestiaryDrawModifiers value = new NPCID.Sets.NPCBestiaryDrawModifiers() - { - Scale = 0.5f, - PortraitScale = 0.6f, - CustomTexturePath = "CalamityMod/ExtraTextures/Bestiary/SlimeGod_Bestiary", - PortraitPositionXOverride = 40, - PortraitPositionYOverride = 40 - }; - value.Position.X += 65; - value.Position.Y += 35; - NPCID.Sets.NPCBestiaryDrawOffset[Type] = value; NPCID.Sets.MPAllowedEnemies[Type] = true; if (!Main.dedServ) { - ZenithSeedEyeTexture = ModContent.Request("CalamityMod/NPCs/SlimeGod/SlimeGodEyes", AssetRequestMode.AsyncLoad); EyeTexture = ModContent.Request("CalamityMod/NPCs/SlimeGod/ExtraTextures/SlimeGodCoreEye", AssetRequestMode.AsyncLoad); OverlayTexture = ModContent.Request("CalamityMod/NPCs/SlimeGod/ExtraTextures/SlimeGodCoreOverlay", AssetRequestMode.AsyncLoad); } @@ -636,10 +623,9 @@ namespace CalamityMod.NPCs.SlimeGod Texture2D texture = TextureAssets.Npc[Type].Value; Texture2D eyeTexture = EyeTexture.Value; Texture2D overlayTexture = OverlayTexture.Value; - Texture2D pog = ZenithSeedEyeTexture.Value; // Used for animating the eye - if (NPC.localAI[0] % 6f == 0f) + if (NPC.localAI[0] % 6f == 0f && !NPC.IsABestiaryIconDummy) { eyeFrameDrawn++; if (eyeFrameX == 0) @@ -703,9 +689,6 @@ namespace CalamityMod.NPCs.SlimeGod // Draw the overlay spriteBatch.Draw(overlayTexture, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, drawColorAlpha, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); - if (Main.zenithWorld) - spriteBatch.Draw(pog, NPC.Center - screenPos + new Vector2(0f, NPC.gfxOffY), NPC.frame, drawColorAlpha, NPC.rotation, origin, NPC.scale, spriteEffects, 0f); - return false; } diff --git a/NPCs/SlimeGod/SlimeGodEyes.png b/NPCs/SlimeGod/SlimeGodEyes.png deleted file mode 100644 index dda0f23656653cebd8ed3c7756131a4c49e14fb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!;9O4^$B+!?x7QEyHW^4bJiNx3!YJd}esy9B zW6Xl6OL0$vm=Cg7#yd3#SN{Ah-=Vp*fMt2neOu=Yo`r@j#{{I17-qlI>v`7SY+v`+ za@z5ub55*(<&rl&uWG;j@n@Y|d@iT{Z?`#XbuoW->yyP3)}IfYx6V}Dw)kddOc}Bv e2xAjDAM$F>RbFdVu67mZPzFy|KbLh*2~7a=g Date: Mon, 16 Jun 2025 13:56:22 -0400 Subject: [PATCH 71/72] Fixed typo in OLC flavor tooltip --- Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index a7f7715998..b32afde3ba 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -918,7 +918,7 @@ OldLordClaymore: { HoldShiftTooltip: ''' [c/df4420:A gift to outstanding Demons, a replica of the sword used by the greatest of all Demon Lords.] - [c/df4420:The prosperity he brought to their kind is unmatched even now that they alone rule the Undeworld.] + [c/df4420:The prosperity he brought to their kind is unmatched even now that they alone rule the Underworld.] ''' } From 30a5b90391484f1a5c88612c0bcc355f1e14d3c2 Mon Sep 17 00:00:00 2001 From: Xyk Date: Mon, 16 Jun 2025 17:37:36 -0700 Subject: [PATCH 72/72] Countermeasure Mitt Replacing Gatling Laser --- Items/DraedonMisc/EncryptedSchematicJungle.cs | 2 +- .../DraedonsArsenal/CountermeasureMitt.cs | 79 +++ .../DraedonsArsenal/CountermeasureMitt.png | Bin 0 -> 3865 bytes .../CountermeasureMittGlow.png | Bin 0 -> 3082 bytes Items/Weapons/DraedonsArsenal/GatlingLaser.cs | 74 --- ...ityMod.Items.Weapons.DraedonsArsenal.hjson | 21 +- .../Mods.CalamityMod.Projectiles.Misc.hjson | 2 +- .../CountermeasureMittFinger.png | Bin 0 -> 2862 bytes .../CountermeasureMittFinger2.png | Bin 0 -> 2855 bytes .../CountermeasureMittHoldout.cs | 557 ++++++++++++++++++ .../CountermeasureMittHoldout.png | Bin 0 -> 2998 bytes .../CountermeasurePalmBlast.cs | 93 +++ .../DraedonsArsenal/GatlingLaserProj.cs | 165 ------ .../DraedonsArsenal/GatlingLaserProj.png | Bin 1402 -> 0 bytes .../DraedonsArsenal/GatlingLaserShot.cs | 137 ----- Projectiles/Rogue/DoomsdayDeviceProjectile.cs | 20 +- Sounds/Item/MittFail.ogg | Bin 0 -> 13055 bytes Sounds/Item/MittHit.ogg | Bin 0 -> 19861 bytes Sounds/Item/MittReadyPalm.ogg | Bin 0 -> 15096 bytes Sounds/Item/MittThrust.ogg | Bin 0 -> 9282 bytes Sounds/Item/MittWelding/Weld1.ogg | Bin 0 -> 28048 bytes Sounds/Item/MittWelding/Weld2.ogg | Bin 0 -> 28048 bytes Sounds/Item/MittWelding/Weld3.ogg | Bin 0 -> 28048 bytes Sounds/Item/MittWelding/Weld4.ogg | Bin 0 -> 28048 bytes Sounds/Item/MittWelding/Weld5.ogg | Bin 0 -> 28048 bytes Systems/Collections/MagicGunIDList.cs | 1 - .../ProjectileDestroyExceptionsList.cs | 1 + 27 files changed, 755 insertions(+), 397 deletions(-) create mode 100644 Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs create mode 100644 Items/Weapons/DraedonsArsenal/CountermeasureMitt.png create mode 100644 Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png delete mode 100644 Items/Weapons/DraedonsArsenal/GatlingLaser.cs create mode 100644 Projectiles/DraedonsArsenal/CountermeasureMittFinger.png create mode 100644 Projectiles/DraedonsArsenal/CountermeasureMittFinger2.png create mode 100644 Projectiles/DraedonsArsenal/CountermeasureMittHoldout.cs create mode 100644 Projectiles/DraedonsArsenal/CountermeasureMittHoldout.png create mode 100644 Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs delete mode 100644 Projectiles/DraedonsArsenal/GatlingLaserProj.cs delete mode 100644 Projectiles/DraedonsArsenal/GatlingLaserProj.png delete mode 100644 Projectiles/DraedonsArsenal/GatlingLaserShot.cs create mode 100644 Sounds/Item/MittFail.ogg create mode 100644 Sounds/Item/MittHit.ogg create mode 100644 Sounds/Item/MittReadyPalm.ogg create mode 100644 Sounds/Item/MittThrust.ogg create mode 100644 Sounds/Item/MittWelding/Weld1.ogg create mode 100644 Sounds/Item/MittWelding/Weld2.ogg create mode 100644 Sounds/Item/MittWelding/Weld3.ogg create mode 100644 Sounds/Item/MittWelding/Weld4.ogg create mode 100644 Sounds/Item/MittWelding/Weld5.ogg diff --git a/Items/DraedonMisc/EncryptedSchematicJungle.cs b/Items/DraedonMisc/EncryptedSchematicJungle.cs index 21ea505af7..0f3fb5688e 100644 --- a/Items/DraedonMisc/EncryptedSchematicJungle.cs +++ b/Items/DraedonMisc/EncryptedSchematicJungle.cs @@ -64,7 +64,7 @@ namespace CalamityMod.Items.DraedonMisc rangedDisplay.OverrideColor = new Color(236, 255, 31); list.Insert(insertIndex + 2, rangedDisplay); - int mageItem = ModContent.ItemType(); + int mageItem = ModContent.ItemType(); TooltipLine mageDisplay = new TooltipLine(this.Mod, "CalamityMod:MageDisplay", $"[i:{mageItem}] {CalamityUtils.GetItemName(mageItem)}"); mageDisplay.OverrideColor = new Color(255, 64, 31); list.Insert(insertIndex + 3, mageDisplay); diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs new file mode 100644 index 0000000000..f364289272 --- /dev/null +++ b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using CalamityMod.CustomRecipes; +using CalamityMod.Items.Materials; +using CalamityMod.Projectiles.DraedonsArsenal; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Weapons.DraedonsArsenal +{ + [LegacyName("GatlingLaser")] + public class CountermeasureMitt : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Weapons.DraedonsArsenal"; + public override void SetDefaults() + { + CalamityGlobalItem modItem = Item.Calamity(); + + Item.width = 54; + Item.height = 56; + Item.DamageType = DamageClass.Magic; + Item.mana = 3; + Item.damage = 45; + Item.knockBack = 4f; + Item.useAnimation = Item.useTime = 11; + Item.autoReuse = true; + + Item.useStyle = ItemUseStyleID.Shoot; + Item.noMelee = true; + Item.channel = true; + Item.noUseGraphic = true; + + Item.value = CalamityGlobalItem.RarityYellowBuyPrice; + Item.rare = ItemRarityID.Yellow; + + Item.shoot = ModContent.ProjectileType(); + Item.shootSpeed = 24f; + } + public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3); + public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; + public override bool AltFunctionUse(Player player) => true; + public override void HoldItem(Player player) + { + if (Main.myPlayer == player.whoAmI) + player.Calamity().rightClickListener = true; + player.Calamity().mouseWorldListener = true; + } + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow").Value); + } + public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) + { + float gunType = 0; + if (player.Calamity().mouseRight && player.whoAmI == Main.myPlayer && !Main.mapFullscreen && !Main.blockMouse && player.Calamity().arsenalCooldown <= 0) + gunType = 5; + Projectile holdout = Projectile.NewProjectileDirect(source, player.MountedCenter, Vector2.Zero, type, damage, knockback, player.whoAmI, 0, 0, gunType); + + holdout.velocity = (player.Calamity().mouseWorld - player.MountedCenter).SafeNormalize(Vector2.Zero); + return false; + } + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(15). + AddIngredient(15). + AddIngredient(5). + AddIngredient(10). + AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func condition), condition). + AddTile(TileID.MythrilAnvil). + Register(); + } + } +} diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png b/Items/Weapons/DraedonsArsenal/CountermeasureMitt.png new file mode 100644 index 0000000000000000000000000000000000000000..ea23481c15b360b619d86eb4a3b6c2ec5567f4e6 GIT binary patch literal 3865 zcmV+!59aWRP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvD zRIYI4MQ`g1<+DyrL=EogS06Xii({| zv`U^zjmmKqDIK93(F5q|^fLNk`gQs{RV`IdRle#b)i%{Ds;|}NsClUI)k@Ub)kf6b zsWa4l)YH_rsduU0(?DsMX@qO!YV6TCtMPOWZH~(v?wpc2hv(eZgf-1HBQ#fN?$aF5 zoYvCT^3%%Fs?s{6^;Da#?V+8jy+iwi_M{F~$4y6|vqR^k&SQoO!;_KDsATjprgSxR z{dFa}^}2()GkV5)QF?`X?Rxk03HmJkB>f%wz4}uIItC#I1qQ7Kw+-=zEW;GTU55RJ zuZ@h2VvIHzbs0S}Rx=JT&Npr~z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eP}A<2_+V;@OgjWs3wYxdxtz b*oyrPdV{U)5;wF$00000NkvXXu0mjf_FGL7 literal 0 HcmV?d00001 diff --git a/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png b/Items/Weapons/DraedonsArsenal/CountermeasureMittGlow.png new file mode 100644 index 0000000000000000000000000000000000000000..3c119c3088ecdbd9432d1db7b12d56846bc5d5eb GIT binary patch literal 3082 zcmV+l4E6JgP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvD zRIYI4MQ`g1<+DyrL=EogS06Xii({| zv`U^zjmmKqDIK93(F5q|^fLNk`gQs{RV`IdRle#b)i%{Ds;|}NsClUI)k@Ub)kf6b zsWa4l)YH_rsduU0(?DsMX@qO!YV6TCtMPOWZH~(v?wpc2hv(eZgf-1HBQ#fN?$aF5 zoYvCT^3%%Fs?s{6^;Da#?V+8jy+iwi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*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R16009G-*zW#v1tGyk^}St_*+febO$$Q+qF$(AqXX>oc$!)NP!ViY-XJ8HccVZ^ zFz@(JFxLwf%qs=~!147~pkQ9{&?xoqMpUp|t=olgR zkOS9_eEmJqYpzQ?<)>`g(ZPWoNCs?!ui "Items.Weapons.DraedonsArsenal"; - public static readonly SoundStyle FireSound = new("CalamityMod/Sounds/Item/GatlingLaserFireStart"); - public static readonly SoundStyle FireLoopSound = new("CalamityMod/Sounds/Item/GatlingLaserFireLoop"); - public static readonly SoundStyle FireEndSound = new("CalamityMod/Sounds/Item/GatlingLaserFireEnd"); - - - // This is the amount of charge consumed every time the holdout projectile fires a laser. - public const float HoldoutChargeUse = 0.0075f; - - public override void SetDefaults() - { - CalamityGlobalItem modItem = Item.Calamity(); - - Item.width = 43; - Item.height = 24; - Item.DamageType = DamageClass.Magic; - Item.damage = 43; - Item.knockBack = 1f; - Item.useTime = 2; - Item.useAnimation = 2; - Item.noUseGraphic = true; - Item.autoReuse = false; - Item.channel = true; - Item.mana = 4; - - Item.useStyle = ItemUseStyleID.Shoot; - Item.UseSound = FireSound; - Item.noMelee = true; - - Item.value = CalamityGlobalItem.RarityYellowBuyPrice; - Item.rare = ItemRarityID.Yellow; - - Item.shoot = ModContent.ProjectileType(); - Item.shootSpeed = 24f; - - modItem.UsesCharge = true; - modItem.MaxCharge = 135f; - modItem.ChargePerUse = 0f; // This weapon is a holdout. Charge is consumed by the holdout projectile. - } - - public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0; - - public override void ModifyTooltips(List tooltips) => CalamityGlobalItem.InsertKnowledgeTooltip(tooltips, 3); - - public override Vector2? HoldoutOffset() => new Vector2(-20, 0); - - public override void AddRecipes() - { - CreateRecipe(). - AddIngredient(15). - AddIngredient(15). - AddIngredient(5). - AddIngredient(10). - AddCondition(ArsenalTierGatedRecipe.ConstructRecipeCondition(3, out Func condition), condition). - AddTile(TileID.MythrilAnvil). - Register(); - } - } -} diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson index 9b151deb0d..f44506b869 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.DraedonsArsenal.hjson @@ -10,6 +10,18 @@ AerialTracker: { ''' } +CountermeasureMitt: { + DisplayName: B-LSR: Countermeasure Mitt + Tooltip: + ''' + A precision welding glove with laser emitters in each fingertip + to focus all emitters into a short range palm blast that always critically strikes + Palm blasts have a cooldown which is significantly shorter if they miss + [c/1FFBFF:'Most battalions prefer to either spread attacks widely, or focus on a singular target.] + [c/1FFBFF:This glove caters to both, though it will never bridge the gap between their strategies.'] + ''' +} + GalvanizingGlaive: { DisplayName: Galvanizing Glaive Tooltip: @@ -21,15 +33,6 @@ GalvanizingGlaive: { ''' } -GatlingLaser: { - DisplayName: Gatling Laser - Tooltip: - ''' - Fires a rapid barrage of accelerated lasers to annihilate foes - [c/1FFBFF:'Developed to be used primarily by Yharim's fleet and base defense force.'] - ''' -} - GaussDagger: { DisplayName: Gauss Dagger Tooltip: diff --git a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson index 8d9d17c9c7..b69ea992c0 100644 --- a/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson +++ b/Localization/en-US/Mods.CalamityMod.Projectiles.Misc.hjson @@ -8,7 +8,7 @@ AnomalysNanogunHoldout.DisplayName: The Anomaly's Nanogun AnomalysNanogunMPFBBoom.DisplayName: MPFB Explosion AnomalysNanogunMPFBDevastator.DisplayName: MPFB Devastator AnomalysNanogunPlasmaBeam.DisplayName: Plasma Beam -GatlingLaserShot.DisplayName: Gatling Laser +CountermeasurePalmBlast.DisplayName: Palm Blast GaussEnergy.DisplayName: Gauss Energy GaussFlux.DisplayName: Gauss Flux GaussPistolShot.DisplayName: Gauss Shot diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittFinger.png b/Projectiles/DraedonsArsenal/CountermeasureMittFinger.png new file mode 100644 index 0000000000000000000000000000000000000000..4872bab1bc4e680d3a5163aa2173e3b41756c4f6 GIT binary patch literal 2862 zcmV+}3(@q6P)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB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~Ee(8aT1AWbo&CM;EEoH56tE6@EV8X%6-*|u1-NtOIZ>P7H z9s-9XhaP{M`0e$>L5F*fu#U8SXZT%h2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe z@An_mJyvsE<#^c%!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf z_v}A;-u3*k3(gmgUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R160025kL_t&tnPU_d693P@z`!6O zF2jHfu3S6A$iTqBz(`O*MpD*)WC;Z=4F(1V28P9R7cvm1fMPcQ0Ivoa2jSw8Gynhq M07*qoM6N<$f-1aP2><{9 literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittFinger2.png b/Projectiles/DraedonsArsenal/CountermeasureMittFinger2.png new file mode 100644 index 0000000000000000000000000000000000000000..c5619e167a04d9523c308273acc593e3162fc663 GIT binary patch literal 2855 zcmV+?3)u9DP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eEx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z6P^ce2XB(^$}i_nB)KM)Cp}7bP2Qe7nc|*Ok@8f) z7E}wKr~0SXrM^xJP1~RLDLp2=Jp-4Km~m7{5vB?IGPN`FGKaIwvx>8%%bb_(Ts9>N z5;bK**^9Ef#WdN^)PTf9vR*Qp{o-l7 zTcBI8wqSIn=gRt3(5j`YdRObOE?Pal#&6AmwS={4Ykw%TE-Wv6xh`g1Pmxy9nxe7w ze(PI{6^cd0H#WFzsN0CzDA+i-Y3`<~O&?2mB^OJrODjs>Z{}{k_?699m0x|@lC)*8 z%%N=0R?Jr6*6Z8cw;d=~F3&F?+a9vLa|dHb$&Qyhm+ZVyVOLSNi?B>BD~Ee(8aT1AWbo&CM;EEoH56tE6@EV8X%6-*|u1-NtOIZ>P7H z9s-9XhaP{M`0e$>L5F*fu#U8SXZT%h2eqT56Y5;vIn|ZYCGC#u9zGg)w718lr{jCe z@An_mJyvsE<#^c%!il02pHAkVoIaIx>gnm^(__6$dheWxJ#(!uyl?Pq(Ao3ne9xWf z_v}A;-u3*k3(gmgUSwVDy5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R16001*dL_t&tnPU_d693P@z`!6O zF2jHfu3S6A$e59o^&eSKK}&;yfq{Wx@!W+B_$Bcf3joG$5ep`BZSMd8002ovPDHLk FV1lxES "Projectiles.Misc"; + public override int AssociatedItemID => ModContent.ItemType(); + + public float offsetBase = 0; + public override float MaxOffsetLengthFromArm => offsetBase; + public override float RecoilResolveSpeed => 0.4f; + public override float OffsetXUpwards => 0f; + public override float BaseOffsetY => 0f; + public override float OffsetYDownwards => 0f; + public override float WeaponTurnSpeed => 0.5f; + public bool forcePalm => Projectile.ai[2] != 0; // If you're performing a palm blast or not + public ref float shootingTimer => ref Projectile.ai[0]; + public ref float fireRate => ref Projectile.ai[1]; + public int time = 0; + + // Finger lerps and rotations + #region Fingers + public float rotSpeed = 0; + public float f1l => 0.02f * rotSpeed; // Finger Lerp Speed + public float f1r = 0; // Finger Rotation + public float f1x = 0; // Finger Effects Multiplier + public float f1d = -0.95f; // Finger Aim Direction + public SlotId AudSlot1; // Finger Laser Audio Slot + public float f2l => 0.016f * rotSpeed; + public float f2r = 0; + public float f2x = 0; + public float f2d = -0.95f; + public SlotId AudSlot2; + public float f3l => 0.012f * rotSpeed; + public float f3r = 0; + public float f3x = 0; + public float f3d = -0.95f; + public SlotId AudSlot3; + public float f4l => 0.008f * rotSpeed; + public float f4r = 0; + public float f4x = 0; + public float f4d = -0.95f; + public SlotId AudSlot4; + public float f5l => 0.004f * rotSpeed; + public float f5r = 0; + public float f5x = 0; + public float f5d = -0.95f; + public SlotId AudSlot5; + #endregion + + public int palmAnimTime = 20; // Animation length for the palm attack + public int cooldownGiven = 400; // Arsenal Cooldown from the palm attack + public int attackTime = 100; // Attack cycle length + public int attackCycles = 0; + public bool failedManaCheck = false; + public bool canHit = false; + public float alteredRotationRot = 0.7f; // Alteration to the holdout rotation so it's not directly to the mouse, changes with the attack cycle + public float alteredRotation => Projectile.rotation + (f2r * alteredRotationRot * -Projectile.direction); + public Vector2 palmBlastPos => Owner.Center + alteredRotation.ToRotationVector2() * 55 * Projectile.scale; + public int palmManaCost => HeldItem.mana * 30; + public int hitTimer = 0; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.penetrate = -1; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.tileCollide = false; + Projectile.ArmorPenetration = 55; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 5; + } + public override void KillHoldoutLogic() + { + + } + public override bool? CanDamage() => null; + public override bool? CanHitNPC(NPC target) + { + return (canHit ? null : false); + } + public override bool? Colliding(Rectangle projHitbox, Rectangle targetHitbox) + { + if (!canHit) return false; + float realRot = alteredRotation; + Vector2 handPos = Owner.GetBackHandPosition(CompositeArmStretchAmount.None, Owner.compositeBackArm.rotation) + (Owner.compositeBackArm.rotation + MathHelper.PiOver2).ToRotationVector2() * 9; + + // Every laser has collision for the single hitbox, so it works more like a large wide piercing single beam + float beamLength = 1500 * Projectile.scale; + float beamThickness = 20 * Projectile.scale; + float fingerLength = 6 * Projectile.scale; + float _ = float.NaN; + + bool colCheck = false; + + #region 5 Collision Line Checks + for (int t = 0; t < 5; t++) + { + float rot = t switch + { + 1 => f4r * Projectile.direction, + 2 => f3r * Projectile.direction, + 3 => f2r * Projectile.direction, + 4 => f1r * Projectile.direction, + _ => -f5r * 0.3f * Projectile.direction, + }; + float fx = t switch + { + 1 => f4x, 2 => f3x, 3 => f2x, 4 => f1x, _ => f5x, + }; + + Vector2 basePosition = handPos + alteredRotation.ToRotationVector2() * (t == 0 ? 2.5f : 3.3f) * Projectile.scale + (alteredRotation + rot).ToRotationVector2() * fingerLength + (alteredRotation + MathHelper.PiOver2 * -Projectile.direction).ToRotationVector2() * (t == 0 ? -3 : 3) * Projectile.scale; + if (fx > 0.2f) + colCheck = Collision.CheckAABBvLineCollision(targetHitbox.TopLeft(), targetHitbox.Size(), basePosition, basePosition + (realRot + rot).ToRotationVector2() * (fingerLength + beamLength), beamThickness, ref _); + if (colCheck) + t = 5; + } + #endregion + + return (colCheck); + } + public void EndSounds() + { + if (SoundEngine.TryGetActiveSound(AudSlot1, out var s1)) + s1?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot2, out var s2)) + s2?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot3, out var s3)) + s3?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot4, out var s4)) + s4?.Stop(); + if (SoundEngine.TryGetActiveSound(AudSlot5, out var s5)) + s5?.Stop(); + } + public override void HoldoutAI() + { + if (hitTimer > 0) + hitTimer--; + + Owner.SetCompositeArmBack(true, Player.CompositeArmStretchAmount.Full, (alteredRotation + MathHelper.PiOver2 * -Projectile.direction) + (Owner.direction == -1 ? MathHelper.Pi : 0)); + + Vector2 handPos = Owner.GetBackHandPosition(CompositeArmStretchAmount.None, Owner.compositeBackArm.rotation) + (Owner.compositeBackArm.rotation + MathHelper.PiOver2).ToRotationVector2() * 4; + float armRotation = (Utils.DirectionTo(Owner.Center, handPos).ToRotation() - MathHelper.PiOver2) * Owner.gravDir + (Owner.gravDir == -1 ? MathHelper.Pi : 0f); + Owner.SetCompositeArmFront(true, FrontArmStretch, armRotation + ExtraFrontArmRotation * Projectile.direction); + + // Below you see the sacrifice of coding 5 individual fingers + if (time == 0 && forcePalm) + { + rotSpeed = 7f; + alteredRotationRot = 0; + } + if (time == 1) + rotSpeed = 0; + + if (forcePalm) alteredRotationRot = MathHelper.Lerp(alteredRotationRot, 0, 0.1f); + else if (shootingTimer > -10) alteredRotationRot = MathHelper.Lerp(alteredRotationRot, 0.7f, 0.1f); + + #region The Price of 5 Fingers + float fxPower = 5; + if (!forcePalm) + { + if (shootingTimer == 10) f1d *= -1; + if (shootingTimer == 20) f2d *= -1; + if (shootingTimer == 30) f3d *= -1; + if (shootingTimer == 40) f4d *= -1; + if (shootingTimer == 50) f5d *= -1; + if (attackCycles == 0) + { + if (shootingTimer == 10) f1x = fxPower; + if (shootingTimer == 20) f2x = fxPower; + if (shootingTimer == 30) f3x = fxPower; + if (shootingTimer == 40) f4x = fxPower; + if (shootingTimer == 50) f5x = fxPower; + } + } + + f1r = MathHelper.Lerp(f1r, f1d, f1l * rotSpeed); + f2r = MathHelper.Lerp(f2r, f2d * 0.775f, f2l * rotSpeed); + f3r = MathHelper.Lerp(f3r, f3d * 0.55f, f3l * rotSpeed); + f4r = MathHelper.Lerp(f4r, f4d * 0.325f, f4l * rotSpeed); + f5r = MathHelper.Lerp(f5r, f5d * 2.3f - 2, f5l * 4 * rotSpeed); + + float goalValue = (canHit ? 1 : 0); + float lerpPower = (forcePalm ? 0.35f : canHit ? 0.2f : 0.25f); + f1x = MathHelper.Lerp(f1x, (f1x > 0.05f ? goalValue : 0), lerpPower); + f2x = MathHelper.Lerp(f2x, (f2x > 0.05f ? goalValue : 0), lerpPower); + f3x = MathHelper.Lerp(f3x, (f3x > 0.05f ? goalValue : 0), lerpPower); + f4x = MathHelper.Lerp(f4x, (f4x > 0.05f ? goalValue : 0), lerpPower); + f5x = MathHelper.Lerp(f5x, (f5x > 0.05f ? goalValue : 0), lerpPower); + + float sine = (float)Math.Sin(time * 0.2f / MathHelper.Pi) * 0.1f; + float maxVol = 0.4f; + float minPitch = -0.8f; + if (SoundEngine.TryGetActiveSound(AudSlot1, out var f1s) && f1s.IsPlaying) + { + f1s.Position = Projectile.Center; + f1s.Pitch = Utils.Remap(f1x, 0.7f, 1, 0f + minPitch, 0f) + sine; + f1s.Volume = Utils.Remap(f1x, 0, 1, 0f, maxVol) * 100; + } + else if (f1x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld1"); + AudSlot1 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot2, out var f2s) && f2s.IsPlaying) + { + f2s.Position = Projectile.Center; + f2s.Pitch = Utils.Remap(f2x, 0.7f, 1, 0.2f + minPitch, 0.2f) + sine; + f2s.Volume = Utils.Remap(f2x, 0, 1, 0f, maxVol) * 100; + } + else if (f2x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld2"); + AudSlot2 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot3, out var f3s) && f3s.IsPlaying) + { + f3s.Position = Projectile.Center; + f3s.Pitch = Utils.Remap(f3x, 0.7f, 1, 0.4f + minPitch, 0.4f) + sine; + f3s.Volume = Utils.Remap(f3x, 0, 1, 0f, maxVol) * 100; + } + else if (f3x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld3"); + AudSlot3 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot4, out var f4s) && f4s.IsPlaying) + { + f4s.Position = Projectile.Center; + f4s.Pitch = Utils.Remap(f4x, 0.7f, 1, 0.6f + minPitch, 0.6f) + sine; + f4s.Volume = Utils.Remap(f4x, 0, 1, 0f, maxVol) * 100; + } + else if (f4x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld4"); + AudSlot4 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + if (SoundEngine.TryGetActiveSound(AudSlot5, out var f5s) && f5s.IsPlaying) + { + f5s.Position = Projectile.Center; + f5s.Pitch = Utils.Remap(f5x, 0.7f, 1, 0.8f + minPitch, 0.8f) + sine; + f5s.Volume = Utils.Remap(f5x, 0, 1, 0f, maxVol) * 100; + } + else if (f5x > 1) + { + SoundStyle beam = new("CalamityMod/Sounds/Item/MittWelding/Weld5"); + AudSlot5 = SoundEngine.PlaySound(beam with { Volume = 0.01f, Pitch = 0, IsLooped = true }, Projectile.Center); + } + #endregion + + Lighting.AddLight(Projectile.Center, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, 0.3f).ToVector3() * MathHelper.Clamp((f1x + f2x + f3x + f4x + f5x - 4f) * 2f, 0f, 0.7f)); + Projectile.scale = MathHelper.Lerp(Projectile.scale, 1, 0.1f); + + if (time == 0) + { + if (!forcePalm) + shootingTimer = -40; + if (Projectile.ai[2] != 0) + Projectile.ai[2] = palmAnimTime; + fireRate = attackTime; + OffsetLengthFromArm = offsetBase; + } + if (shootingTimer < 0) + { + canHit = false; + // Light cooldown before firing + if (rotSpeed > 0) + rotSpeed -= 0.05f; + + if (shootingTimer == -1 || forcePalm) + { + if ((!Main.mouseLeft && !forcePalm) || failedManaCheck) + { + EndSounds(); + Projectile.Kill(); + return; + } + + attackCycles = 0; + fireRate = attackTime; + } + + } + if (Owner.Calamity().mouseRight && Owner.Calamity().arsenalCooldown <= 0 && !forcePalm && !failedManaCheck) + { + Projectile.ai[2] = 5; + shootingTimer = 0; + } + if (forcePalm) + { + if (!Owner.CheckMana(HeldItem, palmManaCost, false, false)) + { + failedManaCheck = true; + SoundEngine.PlaySound(SoundID.MaxMana with { Pitch = -0.5f }, Projectile.Center); + Projectile.ai[2] = 0; + return; + } + rotSpeed = 5; + + f1d = -Math.Abs(f1d); f2d = -Math.Abs(f2d); f3d = -Math.Abs(f3d); f4d = -Math.Abs(f4d); f5d = -Math.Abs(f5d); + + if (shootingTimer <= palmAnimTime) + { + if (shootingTimer == 1) + { + SoundStyle aud = new("CalamityMod/Sounds/Item/MittReadyPalm"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } + if (shootingTimer == (int)(palmAnimTime * 0.8f)) + { + SoundStyle aud = new("CalamityMod/Sounds/Item/MittThrust"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } + if (shootingTimer == palmAnimTime) + { + Shoot(); + Projectile.ai[2] = 0; + shootingTimer = -30; + rotSpeed = 0; + } + Lighting.AddLight(palmBlastPos, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, 0.3f).ToVector3() * (float)Math.Pow(Utils.GetLerpValue(0, palmAnimTime, shootingTimer), 2)); + } + if (shootingTimer > palmAnimTime * 0.8f) + Projectile.scale *= 1.25f; + canHit = false; + } + else if (shootingTimer >= 0) + { + if (!Main.mouseLeft) + shootingTimer = fireRate; + + if (shootingTimer < fireRate && !failedManaCheck) + { + canHit = true; + if (time % 3 == 0) + { + if (Owner.CheckMana(HeldItem, -1, true, false)) + { + if (rotSpeed < 1.1f) + rotSpeed += 0.1f; + } + else + { + SoundEngine.PlaySound(SoundID.MaxMana with { Pitch = -0.5f }, Projectile.Center); + failedManaCheck = true; + } + } + } + else + { + if (attackCycles < 1 && !failedManaCheck) + { + attackCycles++; + shootingTimer = 0; + } + else + shootingTimer = -30; + } + } + + time++; + shootingTimer++; + } + public void Shoot() + { + bool hitAnything = false; + bool oneFx = true; + float damageMult = 25; + foreach (NPC npc in Main.ActiveNPCs) + { + if (!npc.dontTakeDamage && (Main.zenithWorld || Utils.Distance(npc.Center, palmBlastPos) <= (80 + Math.Max(npc.width / 2, npc.height / 2)))) + { + hitAnything = true; + Vector2 pos = Vector2.Lerp(npc.Center, Projectile.Center, 0.35f); + Vector2 vel = Vector2.Lerp(Projectile.Center.DirectionTo(npc.Center), alteredRotation.ToRotationVector2(), 0.5f); + Projectile.NewProjectile(Projectile.GetSource_FromThis(), pos, vel, ModContent.ProjectileType(), (int)(Projectile.damage * damageMult), 0, Projectile.owner, 0, npc.whoAmI); + if (oneFx) + { + for (int i = 0; i < 25; i++) + { + Dust dust = Dust.NewDustPerfect(pos, Effects.ArsenalEffects.ArsenalLaserDust, vel.SafeNormalize(Vector2.UnitX).RotatedByRandom(0.4f) * Main.rand.NextFloat(10f, 35f), 0, default, Main.rand.NextFloat(1f, 1.8f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + dust.alpha = 100; + dust.fadeIn = 20; + } + for (int i = 0; i < 2; i++) + { + Particle pulse = new CustomSpark(pos, vel.SafeNormalize(Vector2.UnitX) * 1, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 20, 0.08f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(2f, 0.7f), shrinkSpeed: -0.1f); + GeneralParticleHandler.SpawnParticle(pulse); + Particle pulse1 = new CustomSpark(pos, vel.SafeNormalize(Vector2.UnitX) * 15, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 18, 0.06f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(2f, 0.7f), shrinkSpeed: -0.1f); + GeneralParticleHandler.SpawnParticle(pulse1); + Particle pulse2 = new CustomSpark(pos, vel.SafeNormalize(Vector2.UnitX) * 25, "CalamityMod/Particles/HighResHollowCircleHardEdgeAlt", false, 16, 0.04f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(2f, 0.7f), shrinkSpeed: -0.1f); + GeneralParticleHandler.SpawnParticle(pulse2); + } + oneFx = false; + } + damageMult -= 6; + if (damageMult < 1) + damageMult = 1; + } + } + if (hitAnything && Owner.CheckMana(HeldItem, palmManaCost, true, false)) + { + Owner.Calamity().arsenalCooldown = cooldownGiven; + Owner.AddCooldown(ArsenalPower.ID, cooldownGiven); + + SoundStyle aud = new("CalamityMod/Sounds/Item/MittHit"); + for (int i = 0; i < 2; i++) + SoundEngine.PlaySound(aud with { Volume = 0.8f, Pitch = 0, MaxInstances = 2 }, Projectile.Center); + Owner.Calamity().GeneralScreenShakePower = 8f; + } + else + { + Owner.Calamity().arsenalCooldown = (int)(cooldownGiven / 10); + Owner.AddCooldown(ArsenalPower.ID, (int)(cooldownGiven / 10)); + + for (int i = 0; i < 15; i++) + { + Dust dust = Dust.NewDustPerfect(palmBlastPos, ModContent.DustType(), Projectile.velocity.SafeNormalize(Vector2.UnitX).RotatedByRandom(MathHelper.TwoPi) * Main.rand.NextFloat(4f, 7f), 0, default, Main.rand.NextFloat(0.7f, 0.85f)); + dust.noGravity = false; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + } + for (int i = 0; i < 2; i++) + { + Particle bloom = new CustomSpark(palmBlastPos, Vector2.Zero, "CalamityMod/Particles/BloomCircle", false, 15, 0.5f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(1f, 1f), true, true); + GeneralParticleHandler.SpawnParticle(bloom); + } + SoundStyle aud = new("CalamityMod/Sounds/Item/MittFail"); + SoundEngine.PlaySound(aud with { Volume = 1f, Pitch = 0 }, Projectile.Center); + } + } + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + if (hitTimer == 0) + { + for (int i = 0; i < 3; i++) + { + Dust dust = Dust.NewDustPerfect(target.Center, Effects.ArsenalEffects.ArsenalLaserDust, Owner.Center.DirectionTo(target.Center).RotatedByRandom(0.3f) * Main.rand.NextFloat(9f, 13f), 0, default, Main.rand.NextFloat(0.6f, 1.1f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + dust.alpha = 100; + dust.fadeIn = 10; + } + hitTimer = Projectile.localNPCHitCooldown; + } + else + { + Dust dust = Dust.NewDustPerfect(target.Center, Effects.ArsenalEffects.ArsenalLaserDust, Owner.Center.DirectionTo(target.Center).RotatedByRandom(0.2f) * Main.rand.NextFloat(6f, 9f), 0, default, Main.rand.NextFloat(0.3f, 0.7f)); + dust.noGravity = true; + dust.color = Effects.ArsenalEffects.ArsenalLaserColor; + dust.alpha = 100; + dust.fadeIn = 10; + modifiers.SourceDamage *= 0.2f; + } + } + public override bool PreDraw(ref Color lightColor) + { + Vector2 handPos = Owner.GetBackHandPosition(CompositeArmStretchAmount.None, Owner.compositeBackArm.rotation) + (Owner.compositeBackArm.rotation + MathHelper.PiOver2).ToRotationVector2() * 9 * Projectile.scale; + Projectile.Center = handPos; + + if (time < 2) + return false; + + Texture2D texture = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/CountermeasureMittHoldout").Value; + + Texture2D finger = ModContent.Request("CalamityMod/Projectiles/DraedonsArsenal/CountermeasureMittFinger2").Value; + Texture2D laser = ModContent.Request("CalamityMod/Particles/BloomLineFade").Value; + Texture2D laser2 = ModContent.Request("CalamityMod/Particles/BloomLineThick").Value; + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + Texture2D diamond = ModContent.Request("CalamityMod/Particles/SquareRotated").Value; + + Vector2 drawPosition = handPos - Main.screenPosition; + Vector2 vel = alteredRotation.ToRotationVector2(); + + float randSize = Main.rand.NextFloat(0.8f, 1.3f); + float fadeIn = (float)Math.Pow(Utils.GetLerpValue(0, palmAnimTime, shootingTimer), 2); + Color drawColor = Projectile.GetAlpha(lightColor); + float drawRotation = alteredRotation + (Projectile.direction == -1 ? MathHelper.Pi : 0f); + Vector2 rotationPoint = texture.Size() * 0.5f; + float exRot = (Projectile.direction == -1 ? MathHelper.PiOver2 : 0); + SpriteEffects flipSprite = Projectile.direction == -1 ? SpriteEffects.FlipHorizontally : SpriteEffects.None; + + float thrustCuttoff = palmAnimTime * 0.8f; + float pullBack = MathHelper.Lerp(0.2f, 1f, (float)Math.Pow(Utils.GetLerpValue(thrustCuttoff, 0, shootingTimer, true), 4)); + float pushOut = MathHelper.Lerp(0.2f, 1.5f, (float)Math.Pow(Utils.GetLerpValue(thrustCuttoff, palmAnimTime, shootingTimer, true), 5)); + float thrustMult = (float)(forcePalm ? (shootingTimer <= thrustCuttoff ? pullBack : pushOut) : 1); + Vector2 thrustAddition = vel * 10 * thrustMult - vel * 10; + + Main.EntitySpriteDraw(texture, drawPosition + thrustAddition, null, drawColor, drawRotation, rotationPoint, Projectile.scale, flipSprite); + + for (int i = 0; i < 5; i++) + { + float fingerLength = 3f * Projectile.scale; + Vector2 fingerScale = new Vector2(1f, 1f) * Projectile.scale; + Vector2 fingerOrgin = new Vector2(0, finger.Height / 2); + + float rot = i switch + { + 1 => f4r * Projectile.direction, + 2 => f3r * Projectile.direction, + 3 => f2r * Projectile.direction, + 4 => f1r * Projectile.direction, + _ => -f5r * 0.3f * Projectile.direction, + }; + float fx = i switch + { + 1 => f4x, 2 => f3x, 3 => f2x, 4 => f1x, _ => f5x, + }; + Color fingerColor = Color.Lerp(drawColor, Color.Black, (4 - i) * 0.2f); + if (i == 0) + { + fingerScale = new Vector2(0.9f, 1f) * Projectile.scale; + fingerLength = 1f * Projectile.scale; + fingerColor = drawColor; + } + + Vector2 basePosition = handPos + vel * (i == 0 ? 2.5f : 3.3f) * Projectile.scale + thrustAddition + (alteredRotation + rot).ToRotationVector2() * fingerLength + (alteredRotation + MathHelper.PiOver2 * -Projectile.direction).ToRotationVector2() * (i == 0 ? -3 : 3) * Projectile.scale; + Main.EntitySpriteDraw(finger, basePosition - Main.screenPosition, null, fingerColor, alteredRotation + rot, fingerOrgin, fingerScale, SpriteEffects.None); + + Vector2 velocity = (alteredRotation + rot).ToRotationVector2(); + Main.EntitySpriteDraw(laser, basePosition - Main.screenPosition + velocity * 545 * Projectile.scale, null, Effects.ArsenalEffects.ArsenalLaserColor with { A = 0 } * fx, velocity.ToRotation() + MathHelper.PiOver2, laser.Size() / 2, new Vector2(2.5f * randSize * fx, 55f) * Projectile.scale * 0.01f, SpriteEffects.FlipVertically); + Main.EntitySpriteDraw(laser2, basePosition - Main.screenPosition + velocity * 545 * Projectile.scale, null, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, 0.3f) with { A = 0 } * fx, velocity.ToRotation() + MathHelper.PiOver2, laser2.Size() / 2, new Vector2(0.4f * Math.Min(fx, 1), 55f) * Projectile.scale * 0.01f, SpriteEffects.FlipVertically); + + for (int y = 0; y < 2; y++) + Main.EntitySpriteDraw(bloom, basePosition - Main.screenPosition + velocity * 7 * Projectile.scale, null, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, y) with { A = 0 } * (fx - 1), velocity.ToRotation() + MathHelper.PiOver2, bloom.Size() / 2, new Vector2(2 + 0.05f * (fx + 25), 1) * Projectile.scale * MathHelper.Lerp(fx, 1, 0.7f) * (0.03f - 0.01f * y), SpriteEffects.FlipVertically); + } + if (forcePalm) + { + for (int y = 0; y < 8; y++) + Main.EntitySpriteDraw(bloom, palmBlastPos - Main.screenPosition + thrustAddition, null, Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, y * 0.1f) with { A = 0 } * fadeIn * 0.25f, alteredRotation, bloom.Size() / 2, new Vector2(1f, 1f) * Projectile.scale * (0.3f - 0.02f * y) * randSize, SpriteEffects.FlipVertically); + } + return false; + } + public override void DrawBehind(int index, List behindNPCsAndTiles, List behindNPCs, List behindProjectiles, List overPlayers, List overWiresUI) + { + behindNPCsAndTiles.Add(index); + } + } +} diff --git a/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.png b/Projectiles/DraedonsArsenal/CountermeasureMittHoldout.png new file mode 100644 index 0000000000000000000000000000000000000000..389b6646b76811126dd77629dbdaf50a45dab1e1 GIT binary patch literal 2998 zcmV;n3rX~eP)f6 zXi@@54ZTQ_E-Enz5K6$103tR-RB%L5k){YTDBysjLy@r}iiH7DvFijGMAUI`6dRUF zWUU$Bym{}eS9UO(Z2>7`&z9wUXbV-Il#&6`Y8GKGQ04S2&F6MJnWNa;Ck|;8QE#r9r;7G||@X{|> z%+C|c55>;RS}qbKr-&IQTvLXPlM{>K&(BTgi^a?^4mXV>;xX8n8Ce|RasXz}{8imI52H3ZN4bfe_i~WlJ|C&UW9+{8AKoW!}eExnGFE2re(F+`iE_46#!l9 z0Z_aBhs|Iw0E)7{bq;-T9=d#9QpDmcXDh4R++0fmpKB>E=%LdZt9g$j;($`3&Zthxi`{{&gM}5&R^+h%b~yM9Zd3AWW9ETgVfL z1(`yIK=_}U_z%PWq}jQaiQ4!P(3V&Nr6C$XejWfQDiI(Fdt@un?|lo#M+5oIi_w{w zo%_#%{(V=tO#a9gB!7-$M?^BX5>d|Vn*3S!?g~$*UQipUPL&zMmg;!4Do9IA%up=Rh? z=qPj=x&RGBx1dpI68aT-2O}^EromdU5o`ssU{5#*j)WJ%$?!5bA1;Eoz?EiTr=n?cd`V|I)p<|3Oju?MT93~aB0<#&j8`F+Cg&D?-VWzQItUA^l>xvD zRIYI4MQ`g1<+DyrL=EogS06Xii({| zv`U^zjmmKqDIK93(F5q|^fLNk`gQs{RV`IdRle#b)i%{Ds;|}NsClUI)k@Ub)kf6b zsWa4l)YH_rsduU0(?DsMX@qO!YV6TCtMPOWZH~(v?wpc2hv(eZgf-1HBQ#fN?$aF5 zoYvCT^3%%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5w-FbHIL};|Kd6ItCpEJBJ*Hx-UCj?irppeBz4xmD5+f zub#UWaP88_{E^}7QP*$YNVp-r$-DXJR{E{yw{vdK+*xxMeYfPE(!GlNn)e%iH2tw% z>L5Kn>ODH}V8MesW8ASPKV|>)e!S=*`C-L`&P4Mg+egPHeJ3wJUif(YN!F8@r^P=j z|6Kdbc>FRj6+1QlT=e|YubW?}zu5oM?q%0Dy!50Qvv` z0D$NK0Cg|`0P0`>06Lfe02gqax=}m;000SaNLh0L01FZT01FZU(%pXi0000RbVXQn zQ*UN;cVTj607GSLb9r+hQ*?D?X>TA@Z*OeDr{R16006>CL_t(2k+spS3IahChT(V8 z3L?1f!fp^WirB><*u*O^DVV(h@4{pdG^oJ~up3P_#bVhFiou^`6UH!1m_batUm51- zJcq*wDJB2nd!g|l42s76@w68JA~nb^bes$TZr%r=*{B0hu2uk8%@?EtX<#-U05Dx1 zR6(f(KorNuK0U}Q1QMX%Q-Je18>4Qv5dgbd4uI}63qY&WP6@I{)6pXiM{BjZ3Yfg! sMx)C$GQU4D$c_!`+#fgb>pU^&3l7hBA8OWsTmS$707*qoM6N<$f~R|!-T(jq literal 0 HcmV?d00001 diff --git a/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs new file mode 100644 index 0000000000..fd31cc8a9b --- /dev/null +++ b/Projectiles/DraedonsArsenal/CountermeasurePalmBlast.cs @@ -0,0 +1,93 @@ +using System; +using CalamityMod.Dusts; +using CalamityMod.Particles; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Projectiles.DraedonsArsenal +{ + public class CountermeasurePalmBlast : ModProjectile, ILocalizedModType + { + public new string LocalizationCategory => "Projectiles.Misc"; + public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; + public ref float time => ref Projectile.ai[0]; + public float fade => (float)Math.Pow(Utils.GetLerpValue(0, 13, Projectile.timeLeft, true), 4); + public bool onSpawn = true; + private NPC targeted = null; + public override void SetDefaults() + { + Projectile.width = 150; + Projectile.height = 150; + Projectile.friendly = true; + Projectile.DamageType = DamageClass.Magic; + Projectile.penetrate = -1; + Projectile.timeLeft = 15; + Projectile.tileCollide = false; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = -1; + } + + public override void AI() + { + Lighting.AddLight(Projectile.Center, Effects.ArsenalEffects.ArsenalLaserColor.ToVector3() * 0.5f); + Player Owner = Main.player[Projectile.owner]; + float targetDist = Vector2.Distance(Owner.Center, Projectile.Center); + if (Projectile.ai[1] != -5) + targeted = Main.npc[(int)Projectile.ai[1]]; + if (targeted == null || !targeted.active) + { + targeted = Projectile.Center.ClosestNPCAt(150); + Projectile.ai[1] = -5; + } + if (time == 0) + { + Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float launchPower = 25; + targeted.MoveNPC(launchVel, launchPower, true); + + Particle bloom = new CustomSpark(Projectile.Center, Projectile.velocity.SafeNormalize(Vector2.UnitX) * 10, "CalamityMod/Particles/BloomCircle", false, 12, 0.7f, Effects.ArsenalEffects.ArsenalLaserColor, new Vector2(1f, 3f), true, true, shrinkSpeed: -0.5f, extraRotation: MathHelper.PiOver2); + GeneralParticleHandler.SpawnParticle(bloom); + } + time++; + } + + public override bool? CanHitNPC(NPC target) => (target == targeted) ? null : false; + + public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) + { + modifiers.SetCrit(); + Player Owner = Main.player[Projectile.owner]; + float critDamage = Math.Min(Owner.GetTotalCritChance(Projectile.DamageType) * 0.01f, 1f); + float minMult = 0.25f; + int hitsToMinMult = 7; + float damageMult = Utils.Remap(Projectile.numHits, 0, hitsToMinMult, 1, minMult, true); + modifiers.SourceDamage *= damageMult + critDamage; + + Vector2 launchVel = Projectile.velocity.SafeNormalize(Vector2.UnitX); + float launchPower = 40; + target.MoveNPC(launchVel, launchPower, true); + } + public override bool PreDraw(ref Color lightColor) + { + Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; + Texture2D beam = ModContent.Request("CalamityMod/Particles/BloomLineFade").Value; + Texture2D bloom = ModContent.Request("CalamityMod/Particles/BloomCircle").Value; + float completion = Utils.GetLerpValue(15, 0, time); + for (int i = 0; i < 6; i++) + { + Color orbColor = Color.Lerp(Effects.ArsenalEffects.ArsenalLaserColor, Color.White, i * 0.04f) with { A = 0 } * 0.8f; + float scale = Projectile.scale * (0.05f + i * 0.01f) * 3; + + Main.EntitySpriteDraw(beam, Projectile.Center - Main.screenPosition, null, orbColor, Projectile.rotation, new Vector2(beam.Width / 2, beam.Height), new Vector2(0.3f * fade, 2 * completion) * scale, SpriteEffects.None); + Main.EntitySpriteDraw(bloom, Projectile.Center - Main.screenPosition, null, orbColor, Projectile.rotation + MathHelper.PiOver2, bloom.Size() * 0.5f, new Vector2(0.5f, 1 + 2 * completion) * scale * 3 * fade, SpriteEffects.None); + } + + return false; + } + } +} diff --git a/Projectiles/DraedonsArsenal/GatlingLaserProj.cs b/Projectiles/DraedonsArsenal/GatlingLaserProj.cs deleted file mode 100644 index afe5e4399e..0000000000 --- a/Projectiles/DraedonsArsenal/GatlingLaserProj.cs +++ /dev/null @@ -1,165 +0,0 @@ -using System; -using CalamityMod.Items; -using CalamityMod.Items.Weapons.DraedonsArsenal; -using Microsoft.Xna.Framework; -using ReLogic.Utilities; -using Terraria; -using Terraria.Audio; -using Terraria.Localization; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.DraedonsArsenal -{ - public class GatlingLaserProj : ModProjectile - { - public override LocalizedText DisplayName => CalamityUtils.GetItemName(); - private SlotId gatlingLaserLoopID; - private bool fireLasers = false; - - public override void SetStaticDefaults() - { - Main.projFrames[Type] = 4; - } - - public override void SetDefaults() - { - Projectile.width = 24; - Projectile.height = 58; - Projectile.friendly = true; - Projectile.penetrate = -1; - Projectile.tileCollide = false; - Projectile.ignoreWater = true; - Projectile.DamageType = DamageClass.Magic; - } - - public override void AI() - { - Projectile.frameCounter++; - if (Projectile.frameCounter >= 13) - { - Projectile.frameCounter = 10; - Projectile.frame++; - if (Projectile.frame >= Main.projFrames[Type]) - Projectile.frame = 0; - } - - if (SoundEngine.TryGetActiveSound(gatlingLaserLoopID, out var ShootingSound) && ShootingSound.IsPlaying) - ShootingSound.Position = Projectile.Center; - Player player = Main.player[Projectile.owner]; - Vector2 playerRotation = player.RotatedRelativePoint(player.MountedCenter, true); - if (Projectile.type == ModContent.ProjectileType()) - { - if (Projectile.ai[0] < 5f) - Projectile.ai[0] += 1f; - - if (Projectile.ai[0] > 4f) - Projectile.ai[0] = 2f; - - // The Gatling Laser shoots every other frame (effective use time of 2). - int fireRate = 2; - Projectile.ai[1] += 1f; - bool shootThisFrame = false; - if (Projectile.ai[1] >= fireRate) - { - Projectile.ai[1] = 0f; - shootThisFrame = true; - } - - if (Projectile.soundDelay <= 0) - { - Projectile.soundDelay = fireRate * 6; - if (Projectile.ai[0] != 1f) - { - fireLasers = true; - Projectile.soundDelay *= 6; - gatlingLaserLoopID = SoundEngine.PlaySound(GatlingLaser.FireLoopSound, Projectile.Center); - } - } - if (shootThisFrame && Main.myPlayer == Projectile.owner && fireLasers) - { - Item gatling = player.ActiveItem(); - - // This grabs the weapon's current damage, taking current charge level into account. - int currentDamage = player.GetWeaponDamage(gatling); - - bool stillInUse = !player.CantUseHoldout(); - - // This both checks if the player has sufficient mana and consumes it if they do. - // If this is false, the Gatling Laser stops functioning. - bool hasMana = player.CheckMana(gatling, -1, true, false); - - // Checks if the Gatling Laser has sufficient charge to fire. If this is false, it stops functioning. - CalamityGlobalItem modItem = gatling.Calamity(); - bool hasCharge = modItem.Charge >= GatlingLaser.HoldoutChargeUse; - - if (stillInUse && hasMana && hasCharge) - { - float scaleFactor = player.ActiveItem().shootSpeed * Projectile.scale; - Vector2 laserDirection = playerRotation; - Vector2 aimDirection = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY) - laserDirection; - if (player.gravDir == -1f) - { - aimDirection.Y = Main.screenHeight - Main.mouseY + Main.screenPosition.Y - laserDirection.Y; - } - Vector2 projVelocity = Vector2.Normalize(aimDirection); - if (float.IsNaN(projVelocity.X) || float.IsNaN(projVelocity.Y)) - { - projVelocity = -Vector2.UnitY; - } - projVelocity *= scaleFactor; - if (projVelocity.X != Projectile.velocity.X || projVelocity.Y != Projectile.velocity.Y) - { - Projectile.netUpdate = true; - } - Projectile.velocity = projVelocity; - int type = ModContent.ProjectileType(); - float velocity = 3f; - laserDirection = Projectile.Center; - Vector2 spinningpoint = Vector2.Normalize(Projectile.velocity) * velocity; - - double spread = Math.PI / 32D; - spinningpoint = spinningpoint.RotatedBy(Main.rand.NextDouble() * 2D * spread - spread); - - if (float.IsNaN(spinningpoint.X) || float.IsNaN(spinningpoint.Y)) - { - spinningpoint = -Vector2.UnitY; - } - Vector2 projVelocitySpread = new Vector2(spinningpoint.X, spinningpoint.Y); - if (projVelocitySpread.Length() > 5f) - { - projVelocitySpread.Normalize(); - projVelocitySpread *= 5f; - } - float SpeedX = projVelocitySpread.X + Main.rand.Next(-1, 2) * 0.005f; - float SpeedY = projVelocitySpread.Y + Main.rand.Next(-1, 2) * 0.005f; - float ai0 = Projectile.ai[0] - 2f; // 0, 1, or 2 - - // Use charge when firing a laser. - modItem.Charge -= GatlingLaser.HoldoutChargeUse; - Projectile.NewProjectile(Projectile.GetSource_FromThis(), laserDirection.X, laserDirection.Y, SpeedX, SpeedY, type, currentDamage, Projectile.knockBack, Projectile.owner, ai0, 0f); - } - else - { - ActiveSound result; - if (SoundEngine.TryGetActiveSound(gatlingLaserLoopID, out result)) - result.Stop(); - - SoundEngine.PlaySound(GatlingLaser.FireEndSound, Projectile.Center); - Projectile.Kill(); - } - } - } - Projectile.position = player.RotatedRelativePoint(player.MountedCenter, true) - Projectile.Size / 2f; - Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; - Projectile.spriteDirection = Projectile.direction; - Projectile.timeLeft = 2; - player.ChangeDir(Projectile.direction); - player.heldProj = Projectile.whoAmI; - player.itemTime = 2; - player.itemAnimation = 2; - player.itemRotation = (float)Math.Atan2(Projectile.velocity.Y * Projectile.direction, Projectile.velocity.X * Projectile.direction); - } - - public override bool? CanDamage() => false; - } -} diff --git a/Projectiles/DraedonsArsenal/GatlingLaserProj.png b/Projectiles/DraedonsArsenal/GatlingLaserProj.png deleted file mode 100644 index c4b477bdc89c1feb2d720442db3dd5fdd23b673e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1402 zcmV-=1%>*FP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1rJF?K~#8N?VL?$ zTvZgu$3luACPqThls03viV-bRrG8Sd6hvH9qzgAL-H8-jxOU}E#ErOcE8>n*prpFMcc{l(>r?%|U!K6BrA2H^!Pa-tvP!F%p= zQ}#^laZ~cCNTcMQDvSj%M)_3~sYmC*^!0nqb?!ZUw|mr-Uqv=EnVrL6k?UMA@~P;r z`=|Z&vA?_Sxu-e?sOa3(iu>K4F1ar%8k(Y_qN1I%%OW9~K_V4JpU zvtRaq>M=2Xjr-&~T6KZrH}7@3Y4<;FFf}>h#yzImFx8k@`nXXmo#vp<-7;t8L zYwjKQU|ATbDgBP7=)7P)JaJ^!{VS(?s$m^sKIp2NPDPA9)_=Rg_5-t(E3b3Aac0J? zj&x%{)KnGB1)Z^X-Er7G)rOLMM+-AJ`oQh(UwG*?_rQHe_ewq$0c+8v`S08y+Ix9F z`hEH_U|#_C2d#s22a8CT0jQdQ9nNYbBig}~^eT#=!UJ1n%`9WG-i&->Fe=elq|X3G z&7^%9%RsMD+Dp9fTSdTs_Py2T3% zEmaX}A%nW^N_$jP2PgkJ@~h~v@o|6s?&_+0?a_6A>ivnLqHR-DR8+Kcs?IOgf4_pB z9axoN)*clRwf5?O=&2_3qyySzfpi&gHv4&@SFzps$Z_{?&VA^f6FwCk6^C{m^Jk#E zerDc%d&i*fs~N0niaNh_9bZU42Bq_BcZ9oQq#J{X()mrNB1RwUzg9Oj4c%~NR(N271d@yU zqzb)i;9L;BpD%;D&aa*e_#Pp9-?X}bKJ$C>#4$I{1=07%(diP>WdJ<$%Q@M`z%2T{ zz{Y@a*o@{?)c4iQjXJ-omiEnq()lf&-)*yQ#0SxNQ98ekv0*KudMKUW^eTeV`Bl!P7Ept{ii{-Crc10vTM9i5Y@K6HjR zp25%;u*ivi6!NP`yDgyio;_N-F6~hf_y3LedQ~+$8o!U8w`-4zqF!Cy^LFh~(ZT_D zokPo$?okm>bDp{CYWGD&BU4mVRJ3zydlhxiKaHyHbQ!QSDMUo1(Q~JI;z>V~qt36w z%%xYMr%Q{R=#6w4fOdWrdf4>p+TZ!ro`lv%+7TYS|3>o}5P9kRmd@|CSvTT?=)5SM z-^SRm7EvXX&To1ZLFxP|=`sLS6O_(xV}xTcD$!UpoI$7aA8C0aKqkF7#Q*>R07*qo IM6N<$g3Iv2&j0`b diff --git a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs b/Projectiles/DraedonsArsenal/GatlingLaserShot.cs deleted file mode 100644 index f1292b9b35..0000000000 --- a/Projectiles/DraedonsArsenal/GatlingLaserShot.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using CalamityMod.Particles; -using Microsoft.Xna.Framework; -using ReLogic.Utilities; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.Projectiles.DraedonsArsenal -{ - public class GatlingLaserShot : ModProjectile, ILocalizedModType - { - public new string LocalizationCategory => "Projectiles.Misc"; - public override string Texture => "CalamityMod/Projectiles/InvisibleProj"; - - private int dust = 182; - private Player Owner => Main.player[Projectile.owner]; - - private int Time = 0; - - public override void SetDefaults() - { - Projectile.width = 2; - Projectile.height = 2; - Projectile.friendly = true; - Projectile.DamageType = DamageClass.Magic; - Projectile.penetrate = 1; - Projectile.extraUpdates = 100; - Projectile.timeLeft = 600; - } - - public override void AI() - { - Time++; - Lighting.AddLight(Projectile.Center, 0.2f, 0f, 0f); - if (Projectile.timeLeft % 11 == 0 && Time > 15 && Time < 460) - { - SparkParticle spark = new SparkParticle(Projectile.Center, Projectile.velocity * 0.01f, false, 6, 1.7f, Color.Red); - GeneralParticleHandler.SpawnParticle(spark); - } - if (Projectile.timeLeft % 4 == 0 && Time > 15 && Time < 460) - { - SparkParticle spark2 = new SparkParticle(Projectile.Center, Projectile.velocity * 0.01f, false, 6, 0.4f, Color.White); - GeneralParticleHandler.SpawnParticle(spark2); - } - } - - public override void OnKill(int timeLeft) - { - int height = 20; - Projectile.position = Projectile.Center; - Projectile.width = Projectile.height = height; - Projectile.Center = Projectile.position; - Projectile.damage = 0; - - LaserBurst(2.4f, 4.2f); // 60 dusts - - int inc; - for (int i = 0; i < 100; i = inc + 1) - { - int gatlingDust = Dust.NewDust(Projectile.Center, 6, 6, dust, 0f, 0f, 100, default, 1f); - float dustVelX = Main.dust[gatlingDust].velocity.X; - float dustVelY = Main.dust[gatlingDust].velocity.Y; - - if (dustVelX == 0f && dustVelY == 0f) - dustVelX = 1f; - - float dustVelocity = (float)Math.Sqrt(dustVelX * dustVelX + dustVelY * dustVelY); - dustVelocity = 4f / dustVelocity; - dustVelX *= dustVelocity; - dustVelY *= dustVelocity; - - Dust dust2 = Main.dust[gatlingDust]; - dust2.velocity *= 0.5f; - dust2.velocity.X = dust2.velocity.X + dustVelX; - dust2.velocity.Y = dust2.velocity.Y + dustVelY; - dust2.scale = 0.66f; - dust2.noGravity = true; - - inc = i; - } - } - - private void LaserBurst(float speed1, float speed2) - { - float angleRandom = 0.05f; - - int inc; - for (int j = 0; j < 4; j = inc + 1) - { - float dustSpeed = Main.rand.NextFloat(speed1, speed2); - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - int burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 200, default, 0.9f); - Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; - Main.dust[burstDust].noGravity = true; - - Dust dust2 = Main.dust[burstDust]; - dust2.velocity *= 3f; - dust2 = Main.dust[burstDust]; - - burstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 100, default, 0.66f); - Main.dust[burstDust].position = Projectile.Center + Vector2.UnitY.RotatedByRandom(MathHelper.Pi) * (float)Main.rand.NextDouble() * Projectile.width / 2f; - - dust2 = Main.dust[burstDust]; - dust2.velocity *= 2f; - - Main.dust[burstDust].noGravity = true; - Main.dust[burstDust].fadeIn = 1f; - Main.dust[burstDust].color = Color.Crimson * 0.5f; - - dust2 = Main.dust[burstDust]; - - inc = j; - } - for (int k = 0; k < 2; k = inc + 1) - { - float dustSpeed = Main.rand.NextFloat(speed1, speed2); - Vector2 dustVel = new Vector2(dustSpeed, 0.0f).RotatedBy(Projectile.velocity.ToRotation()); - dustVel = dustVel.RotatedBy(-angleRandom); - dustVel = dustVel.RotatedByRandom(2.0f * angleRandom); - - int moreBurstDust = Dust.NewDust(Projectile.position, Projectile.width, Projectile.height, dust, dustVel.X, dustVel.Y, 0, default, 1.2f); - Main.dust[moreBurstDust].position = Projectile.Center + Vector2.UnitX.RotatedByRandom(MathHelper.Pi).RotatedBy(Projectile.velocity.ToRotation()) * Projectile.width / 3f; - Main.dust[moreBurstDust].noGravity = true; - - Dust dust2 = Main.dust[moreBurstDust]; - dust2.velocity *= 0.5f; - dust2 = Main.dust[moreBurstDust]; - - inc = k; - } - } - } -} diff --git a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs index 6788a60063..063e90bd0a 100644 --- a/Projectiles/Rogue/DoomsdayDeviceProjectile.cs +++ b/Projectiles/Rogue/DoomsdayDeviceProjectile.cs @@ -33,6 +33,8 @@ namespace CalamityMod.Projectiles.Rogue public int maxStealthHits = 5; // How many bounces the stealth strike has. This does not include the inital and final hit, so be sure to take those into account if you adjust this. public Color mainColor = Color.White; + public Color c1 = new Color(121, 240, 17); + public Color c2 = new Color(0, 208, 240); public NPC lastHitTarget; public override void SetDefaults() @@ -57,8 +59,8 @@ namespace CalamityMod.Projectiles.Rogue float rate = (Main.GlobalTimeWrappedHourly * 6); List eColors = new List() { - Color.Turquoise, - Color.Orchid + c1, + c2 }; int colorIndex = (int)(rate / 2 % eColors.Count); Color currentColor = eColors[colorIndex]; @@ -189,7 +191,7 @@ namespace CalamityMod.Projectiles.Rogue c.velocity = (MathHelper.TwoPi * i / 12f).ToRotationVector2().RotatedBy(Projectile.rotation) * 5.5f * (i % 2 == 0 ? 0.8f : 1f); c.scale = 0.7f * (i % 2 == 0 ? 2.2f : 1.8f); c.noGravity = true; - c.color = i % 2 == 0 ? Color.Turquoise : Color.Orchid; + c.color = i % 2 == 0 ? c1 : c2; c.noLightEmittence = true; } @@ -304,12 +306,12 @@ namespace CalamityMod.Projectiles.Rogue dust2.scale = Main.rand.NextFloat(1.5f, 1.7f) - Math.Abs(variance); dust2.velocity = (Projectile.velocity.SafeNormalize(Vector2.UnitX) * 5 * charge).RotatedBy(variance) * Main.rand.NextFloat(0.3f, 1f) * (1 - Math.Abs(variance)) * finalHitMult; dust2.noGravity = true; - dust2.color = Main.rand.NextBool() ? Color.Turquoise : Color.Orchid; + dust2.color = Main.rand.NextBool() ? c1 : c2; } - Particle pulse = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.2f, Color.Turquoise * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.2f, c1 * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.175f * finalHitMult, Color.Orchid * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse2 = new CustomSpark(Projectile.Center, -Projectile.velocity.SafeNormalize(Vector2.UnitX) * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.175f * finalHitMult, c2 * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse2); Owner.Calamity().GeneralScreenShakePower = 3; @@ -357,7 +359,7 @@ namespace CalamityMod.Projectiles.Rogue dust2.scale = Main.rand.NextFloat(1.5f, 1.7f) - Math.Abs(variance); dust2.velocity = (launchDir * 5 * charge).RotatedBy(variance) * Main.rand.NextFloat(0.3f, 1f) * (1 - Math.Abs(variance)) * finalHitMult; dust2.noGravity = true; - dust2.color = Main.rand.NextBool() ? Color.Turquoise : Color.Orchid; + dust2.color = Main.rand.NextBool() ? c1 : c2; } if (hasReachedFullCharge) @@ -365,9 +367,9 @@ namespace CalamityMod.Projectiles.Rogue SoundStyle soundExtra = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact"); SoundEngine.PlaySound(soundExtra with { Volume = 1f, Pitch = 0.35f + extraPitch, MaxInstances = 6 }, Projectile.Center); - Particle pulse = new CustomSpark(Projectile.Center, -launchDir * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.4f * finalHitMult, Color.Turquoise * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse = new CustomSpark(Projectile.Center, -launchDir * 3, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.4f * finalHitMult, c1 * 0.85f, new Vector2(3f, 1f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse); - Particle pulse2 = new CustomSpark(Projectile.Center, -launchDir * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.35f * finalHitMult, Color.Orchid * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); + Particle pulse2 = new CustomSpark(Projectile.Center, -launchDir * 2.5f, "CalamityMod/Particles/HollowCircleSoftEdge", false, 14, 0.35f * finalHitMult, c2 * 0.7f, new Vector2(2.5f, 2f), extraRotation: MathHelper.ToRadians(90), shrinkSpeed: 0.9f); GeneralParticleHandler.SpawnParticle(pulse2); } SoundStyle sound = new("CalamityMod/Sounds/Item/DoomsdayDeviceImpact"); diff --git a/Sounds/Item/MittFail.ogg b/Sounds/Item/MittFail.ogg new file mode 100644 index 0000000000000000000000000000000000000000..b7f210727fba8c50d6aae3785d7e7ae28a043ae1 GIT binary patch literal 13055 zcmaia1z1&2xA&&ILqO0&cXvt&a_B>McL|3MX%q=*krJi5TO^c{?vh4AQbhr&Zy)%- z_kHjEp6A~E40C4BTC-+W{ASkPY;`+3EdUw#=lVr@*N{J-e2DY_$=l7t(gBX>LJDcS zqpZ^1F*hTrBS!w$g&2th-sxClE)vP#{P)WYDu{qJ833RHAuL$&d0R@3 zBcgT`%<&$%q7G^zMG%aanyaE%-M^WvTnp<9om@v)88Pt;&;Zav(obk3Nnwb}@&#=a z1z0_&_UNZA%JRTwE6xqW=Ie)qtMKjSC##9=7U#u_eP^j3lf~hzpMa|HPU~7#wxgQ_ z!be26v;L{DZuNkGYmr5#v?i3rM2LUETA1zuin>z^0)&8S0*Z;GN;RZ|HPpl74C+5Q zG)V-<`5$X(tLlK4mx-RY&8)ZAtap$>dZbZvkU?{#(Oj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mUI;IM0kMMsBeGLkC!+FdW;_DgqB8kGX=)?k5Y-@qI*em^qN z>Bxik61aF`LaO?tf#0m%uddR^3aa|j+HY9%A7>qEp1n--4v7=_CjBFp(Mtl69I&`j zD_KbyKRe?(P%8_R#7|uO!I#3cL8Y?&Eswg%h$Bvn;6WTfv9{U^uyqdonZ$HRr zxY25p4nIkpbtPJk4$sITY7W?&b91DT><*q0U|#%SRq^}#g}o&?9k!v1xz0zG!Q$94 z&Xv($zsCz)CbfI|UzMkXe=nNfb*@Ckui0pvXM48hZeg?`II`%>>s9WXkm_`0u7UW= zR^zs6`~tR|QYyhy35#LbD7hY*5O3DH$xxjI|GUVyRpz`FP}vnh3D}b&oba(kTEW=4 z&M=F7Ts!Nv26Od4^e~31pS}}zvqc9qUb?*S?a4+;I+Y4{;}0{fxD0v&{?CO0{qw`< z&Fx^qTr434MQ6h{B7f7v?Lm8c^g2@!IZk9?Nh8ki&XjdO#^CON^Hpq_Zu2y@+THm8 zCW|st13wux^X$Ug^IAWKRdS!-Q=^>& oWY>qM@p#XP=GKX(N^*Erb=dO7QxU=JFSkxHt0mfbqX6*#0E%}n0ssI2 literal 0 HcmV?d00001 diff --git a/Sounds/Item/MittThrust.ogg b/Sounds/Item/MittThrust.ogg new file mode 100644 index 0000000000000000000000000000000000000000..342b6df3a9bcd30033d9934bd9ad0a5f93e85e2a GIT binary patch literal 9282 zcmai32|Uza*Z;CRJ_uPBV_ndpqZ_>85)`Li)znVJZ(O`3d&z*#m z#KXxIYl|mNk@(jgQ9hkJVtz%UOEiCF!wKCc8?kD8&cN=^bj(HV%IL971FVzVn3J6$8 zL5(|@5l!r{54l5_K^MyI+RmMy=1ML2EHi*wv>g_BU34KgPD^ItSx&UfqCiET5{+=h z0O~qo*wCV+{+Q`~d=GLy?XT|mp&l@B7Nuh>mh?(gMDY*dc}cE7)R9^+$RDT)sm3y@ zmoavhv3K|LX#Wz@JuT5MrmUy0X#kqL=?xF7Q4jY~4-Ao@cu{<}ML`8XP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oAZzx}F&?4Fe6@cs3ZZipzj)2vFSuKz(-HefVkyS#chzHS>V1VTWsbVKIi&Zy1J-%PB}n5kK7HV}Gg^IZ z3;A<#i!b)g_M3X#kCdPvq~$R;KL1Tds+8`I_K8!dcn#?r8Bv!yr-Y87KfSvax$%a@ zRVk8oCG177=`g2T#PBbn*Y(ezKNmFYXsqu8g~H*_GUTLQUWYmS=TD3`!>^All^dZ+t5#*7*6027ZwFkFJx?;!HlAElCwKijxwYkk z3nZDF8}}NDgw9*Zh+J46IWc%CtTA0_Vi5B-t@Bv zJ1LcCcHtk)EiSkTWC=Y;j99X{P}f~b&U0DtR3r#p9Hbu&v@ap1L9NC)ora6NBMMX z#qE?va#A7tv;0Hkj4$)WrTC_NpU%ilb3K*YU$i&fZDSeV3;%e4GHO+?EG5A;T)EKr zg!cYrrnNdguWLp(X?!mlUrfBdvZ67~)n?Ths?qa&;<$4ue5odc{9(iolSiEW8&Cb> zzTgpQ^4V+Bb5XLgeb3I#=PNc*e=J(7KI5ldo>y92wie!yQ*Kb=t5u$N4En54x0Ktq zp4;q{O;E*-| literal 0 HcmV?d00001 diff --git a/Sounds/Item/MittWelding/Weld1.ogg b/Sounds/Item/MittWelding/Weld1.ogg new file mode 100644 index 0000000000000000000000000000000000000000..87a68dceacdcf2eae087777453e3774c0d628dcb GIT binary patch literal 28048 zcmafa1ymMaxA)N9h%^sK3rcq*NOz}ncMH;~bV*7#NOuU*DV>tiNOymO{@?q)_kL^L zJ8L}7oY?2=_?^Aao(Fj|Gi3l8_~*K}`upIZC6Wh43gv3&XlUW|R0ZYR{I_L=;&0~$ zDEX(6|8+f$gaY3-7<1FG-aP*IOCRPhB{r~whK0TPD|tsVh_!{G+8_E5NeBxQ3lkG3 z6B~q9$;8;j$imhPB4+Dq;b>=TV`A$}_cRL>++P|mMMTx007S5cSq9SWI~uJD0GI&q zj*<>N&Qy{vFFuRbBPm|u>8YD3EGa&$8{a6Lx#wR6gw6OF0Kfviv`CRTo066z+-CSR zk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ZtcP4d!+Bmk2w8&zCYWHPTG>#JP{M3w!S%&6igtBvb7u9>DzW)05C@gY3L> zk__i_-9em1z?py1d`O=2SsjeXz~xFOQqcS>hk5>|!26@WJkW{=e~c-ZPw7Zw#d9%3Z~O6uR;^nofm zV`eq)v~dJ(Jjav8DN6d7^s)j$266|fLCTJXt14bl(;`fOT>YZ**fe|&yMOi26BBWn zMDL0XF$+svd+Ygr&imlJy^-EL_51HFXgwXAuiXine9ggG<0lg!`!0ZD#bS!xW{EDcoI#+=t{Gt`qmLP{H#m>CET`tCdBHwfw__*>O#Bb_4B!6% literal 0 HcmV?d00001 diff --git a/Sounds/Item/MittWelding/Weld2.ogg b/Sounds/Item/MittWelding/Weld2.ogg new file mode 100644 index 0000000000000000000000000000000000000000..87a68dceacdcf2eae087777453e3774c0d628dcb GIT binary patch literal 28048 zcmafa1ymMaxA)N9h%^sK3rcq*NOz}ncMH;~bV*7#NOuU*DV>tiNOymO{@?q)_kL^L zJ8L}7oY?2=_?^Aao(Fj|Gi3l8_~*K}`upIZC6Wh43gv3&XlUW|R0ZYR{I_L=;&0~$ zDEX(6|8+f$gaY3-7<1FG-aP*IOCRPhB{r~whK0TPD|tsVh_!{G+8_E5NeBxQ3lkG3 z6B~q9$;8;j$imhPB4+Dq;b>=TV`A$}_cRL>++P|mMMTx007S5cSq9SWI~uJD0GI&q zj*<>N&Qy{vFFuRbBPm|u>8YD3EGa&$8{a6Lx#wR6gw6OF0Kfviv`CRTo066z+-CSR zk&c<%7IIt#5QLA4E8Ixm@U^K0_0Y)9y*5YaT@08m0g668U+N>7DhD0whGScDKe z_K_E)IU>^+X8I$u^g#k-Sax#bMvUmz!zi_cpHN&S&2JXNjyA8DSyJCh{Ha{ zDyFO=s|sE&y6UbbGp;T(t{*g$g0vexXf_0C&j#sU1{vT7|8rk`SiXF^|F8~$0y1B4 zC;p<#rXb8-Y7QfD(*#V}Zf`lk!1UD&79 z0GSpk`TyT-s+nl=f8Rppee{43D9c_4;$8t_` z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{EDcoI#+=t{Gt`qmLP{H#m>CET`tCdBHwfw__*>O#Bb_4B!6% literal 0 HcmV?d00001 diff --git a/Sounds/Item/MittWelding/Weld3.ogg b/Sounds/Item/MittWelding/Weld3.ogg new file mode 100644 index 0000000000000000000000000000000000000000..87a68dceacdcf2eae087777453e3774c0d628dcb GIT binary patch literal 28048 zcmafa1ymMaxA)N9h%^sK3rcq*NOz}ncMH;~bV*7#NOuU*DV>tiNOymO{@?q)_kL^L zJ8L}7oY?2=_?^Aao(Fj|Gi3l8_~*K}`upIZC6Wh43gv3&XlUW|R0ZYR{I_L=;&0~$ zDEX(6|8+f$gaY3-7<1FG-aP*IOCRPhB{r~whK0TPD|tsVh_!{G+8_E5NeBxQ3lkG3 z6B~q9$;8;j$imhPB4+Dq;b>=TV`A$}_cRL>++P|mMMTx007S5cSq9SWI~uJD0GI&q zj*<>N&Qy{vFFuRbBPm|u>8YD3EGa&$8{a6Lx#wR6gw6OF0Kfviv`CRTo066z+-CSR zk&c<%7IIt#5QLA4E8Ixm@U^K0_0Y)9y*5YaT@08m0g668U+N>7DhD0whGScDKe z_K_E)IU>^+X8I$u^g#k-Sax#bMvUmz!zi_cpHN&S&2JXNjyA8DSyJCh{Ha{ zDyFO=s|sE&y6UbbGp;T(t{*g$g0vexXf_0C&j#sU1{vT7|8rk`SiXF^|F8~$0y1B4 zC;p<#rXb8-Y7QfD(*#V}Zf`lk!1UD&79 z0GSpk`TyT-s+nl=f8Rppee{43D9c_4;$8t_` zsed$RJwosc)Fs_Oa(8C(Xo}N_Bx*|D-zN|3RD`mkaj=eHD-FGezyR!LF`j}@G^YWM z)f`RPENsLDpTgo(X=)o){?hx$EQ<8fMmo4x!4YBesaB0hy5Q5baoWK!(o^04G#?>Q zZw9mYJ?Z|C50UVOxa9fdaiq>s=y93MeRR2`5s~6jMF9#*1T=Zh{(m@!06-w-A1nS> z@yC?^T5)ddNBRNU>LHdvhNq&mbA)HFq7zdTl^L{R26oVjBWgFlIDO@ou*$2Q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^)sN<0ET3%}a(Iz9NrAJk$bPCDlQe&oIVS@{hlvSI zE0F_3Cr|-+?2;~M=8B}p`#&O5t0_K}&NXz|s|qQ&U>nhr`8Mb3GDq-d6eyGo@5v5l6}wQ`u^4r5?RWo8mw6T z5bzyR%{g%%TI=}LdDvlDc}@eNelLINosfJw6iYDTpTpXX1z%^2g4(n;_cs&^M+Eb5 zLr1uC4&sc51EP4IiiAkN{+5^A%ETr#J&@&ORkZK z$KA+ho^G%@vez9?HAdORHCC5GXkJXbIfMrz_OnVpY2}gDD`gaz>0ARvTOEl@k<&_U zx+0kZS0ly{|NVg!r{z9L2RSu6%eF2c5cKvl(+Dfc*UE)-k)s@6$MaO`7*&QsREpRA z9(Fu4YmbEOxv7W_8R3WP@(b2{^7a_(G4qvFS|a4ws$LSR8UU7w+X1z7A8!aa=(qK9 z^dCA9p2uj$6ulIj{m^&V;*#S%vmp6_BbX0Ic#|~0X^`XfspY~g*5Y@ug3z_5Q;Y|$ zy6@_A&ZtcP4d!+Bmk2w8&zCYWHPTG>#JP{M3w!S%&6igtBvb7u9>DzW)05C@gY3L> zk__i_-9em1z?py1d`O=2SsjeXz~xFOQqcS>hk5>|!26@WJkW{=e~c-ZPw7Zw#d9%3Z~O6uR;^nofm zV`eq)v~dJ(Jjav8DN6d7^s)j$266|fLCTJXt14bl(;`fOT>YZ**fe|&yMOi26BBWn zMDL0XF$+svd+Ygr&imlJy^-EL_51HFXgwXAuiXine9ggG<0lg!`!0ZD#bS!xW{EDcoI#+=t{Gt`qmLP{H#m>CET`tCdBHwfw__*>O#Bb_4B!6% literal 0 HcmV?d00001 diff --git a/Sounds/Item/MittWelding/Weld4.ogg b/Sounds/Item/MittWelding/Weld4.ogg new file mode 100644 index 0000000000000000000000000000000000000000..87a68dceacdcf2eae087777453e3774c0d628dcb GIT binary patch literal 28048 zcmafa1ymMaxA)N9h%^sK3rcq*NOz}ncMH;~bV*7#NOuU*DV>tiNOymO{@?q)_kL^L zJ8L}7oY?2=_?^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5GXkJXbIfMrz_OnVpY2}gDD`gaz>0ARvTOEl@k<&_U zx+0kZS0ly{|NVg!r{z9L2RSu6%eF2c5cKvl(+Dfc*UE)-k)s@6$MaO`7*&QsREpRA z9(Fu4YmbEOxv7W_8R3WP@(b2{^7a_(G4qvFS|a4ws$LSR8UU7w+X1z7A8!aa=(qK9 z^dCA9p2uj$6ulIj{m^&V;*#S%vmp6_BbX0Ic#|~0X^`XfspY~g*5Y@ug3z_5Q;Y|$ zy6@_A&ZtcP4d!+Bmk2w8&zCYWHPTG>#JP{M3w!S%&6igtBvb7u9>DzW)05C@gY3L> zk__i_-9em1z?py1d`O=2SsjeXz~xFOQqcS>hk5>|!26@WJkW{=e~c-ZPw7Zw#d9%3Z~O6uR;^nofm zV`eq)v~dJ(Jjav8DN6d7^s)j$266|fLCTJXt14bl(;`fOT>YZ**fe|&yMOi26BBWn zMDL0XF$+svd+Ygr&imlJy^-EL_51HFXgwXAuiXine9ggG<0lg!`!0ZD#bS!xW{EDcoI#+=t{Gt`qmLP{H#m>CET`tCdBHwfw__*>O#Bb_4B!6% literal 0 HcmV?d00001 diff --git a/Sounds/Item/MittWelding/Weld5.ogg b/Sounds/Item/MittWelding/Weld5.ogg new file mode 100644 index 0000000000000000000000000000000000000000..87a68dceacdcf2eae087777453e3774c0d628dcb GIT binary patch literal 28048 zcmafa1ymMaxA)N9h%^sK3rcq*NOz}ncMH;~bV*7#NOuU*DV>tiNOymO{@?q)_kL^L zJ8L}7oY?2=_?^Aao(Fj|Gi3l8_~*K}`upIZC6Wh43gv3&XlUW|R0ZYR{I_L=;&0~$ zDEX(6|8+f$gaY3-7<1FG-aP*IOCRPhB{r~whK0TPD|tsVh_!{G+8_E5NeBxQ3lkG3 z6B~q9$;8;j$imhPB4+Dq;b>=TV`A$}_cRL>++P|mMMTx007S5cSq9SWI~uJD0GI&q zj*<>N&Qy{vFFuRbBPm|u>8YD3EGa&$8{a6Lx#wR6gw6OF0Kfviv`CRTo066z+-CSR zk&c<%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P4d!+Bmk2w8&zCYWHPTG>#JP{M3w!S%&6igtBvb7u9>DzW)05C@gY3L> zk__i_-9em1z?py1d`O=2SsjeXz~xFOQqcS>hk5>|!26@WJkW{=e~c-ZPw7Zw#d9%3Z~O6uR;^nofm zV`eq)v~dJ(Jjav8DN6d7^s)j$266|fLCTJXt14bl(;`fOT>YZ**fe|&yMOi26BBWn zMDL0XF$+svd+Ygr&imlJy^-EL_51HFXgwXAuiXine9ggG<0lg!`!0ZD#bS!xW{EDcoI#+=t{Gt`qmLP{H#m>CET`tCdBHwfw__*>O#Bb_4B!6% literal 0 HcmV?d00001 diff --git a/Systems/Collections/MagicGunIDList.cs b/Systems/Collections/MagicGunIDList.cs index 12a5a0174e..b13da9e39b 100644 --- a/Systems/Collections/MagicGunIDList.cs +++ b/Systems/Collections/MagicGunIDList.cs @@ -24,7 +24,6 @@ namespace CalamityMod.Systems.Collections ItemType(), ItemType(), ItemType(), - ItemType(), ItemType(), ItemType(), ItemType(), diff --git a/Systems/Collections/ProjectileDestroyExceptionsList.cs b/Systems/Collections/ProjectileDestroyExceptionsList.cs index 5992a004e2..7b2c882b31 100644 --- a/Systems/Collections/ProjectileDestroyExceptionsList.cs +++ b/Systems/Collections/ProjectileDestroyExceptionsList.cs @@ -45,6 +45,7 @@ namespace CalamityMod.Systems.Collections ProjectileType(), ProjectileType(), ProjectileType(), + ProjectileType(), ProjectileType(), ProjectileType(), ProjectileType(),