From 84a089b1e8cb54ef20c1d2f0e75404688e215810 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:07:21 -0500 Subject: [PATCH 01/18] Fixed Phaseslayer rotational problems --- .../DraedonsArsenal/PhaseslayerProjectile.cs | 32 +++++++++---------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs index cca960c8ab..ad16e2d76b 100644 --- a/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs +++ b/Projectiles/DraedonsArsenal/PhaseslayerProjectile.cs @@ -91,7 +91,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal // Angles are wrapped to be 0 to 2pi instead of -pi to pi for convenience with absolute values. float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; - float deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + float deltaAngle = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - oldRotationAdjusted)); // Frame 1 effect: Prevent the sword from instantly firing a sword beam. if (projectile.localAI[1] == 0f) @@ -285,7 +285,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal float rotationAdjusted = MathHelper.WrapAngle(projectile.rotation) + MathHelper.Pi; float oldRotationAdjusted = MathHelper.WrapAngle(projectile.oldRot[1]) + MathHelper.Pi; - deltaAngle = Math.Abs(rotationAdjusted - oldRotationAdjusted); + deltaAngle = Math.Abs(MathHelper.WrapAngle(rotationAdjusted - oldRotationAdjusted)); if (deltaAngle < 0.04f) opacity = 0f; @@ -293,7 +293,7 @@ namespace CalamityMod.Projectiles.DraedonsArsenal return Color.Lerp(Color.Red, Color.PaleVioletRed * completionRatio, MathHelper.Clamp(completionRatio * 0.8f, 0f, 1f)) * opacity; } - internal float WidthFunction(float completionRatio) => (IsSmall ? 101f : 127f) * (1f - completionRatio); + internal float WidthFunction(float completionRatio) => (IsSmall ? 101f : 127f) * (1f - completionRatio) * 0.8f; public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { @@ -301,7 +301,9 @@ namespace CalamityMod.Projectiles.DraedonsArsenal Texture2D hiltTexture = ModContent.GetTexture(Texture); if (IsSmall) bladeTexture = ModContent.GetTexture("CalamityMod/Projectiles/DraedonsArsenal/PhaseslayerBladeSmall"); - Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; + + float bladeLength = (IsSmall ? 90f : 132f) * projectile.scale; + Vector2 bladeOffset = projectile.rotation.ToRotationVector2() * bladeLength; Vector2 origin = bladeTexture.Size() * 0.5f; origin /= IsSmall ? new Vector2(1f, 3f) : new Vector2(3f, 7f); @@ -313,26 +315,22 @@ namespace CalamityMod.Projectiles.DraedonsArsenal GameShaders.Misc["CalamityMod:PhaseslayerRipEffect"].SetShaderTexture(ModContent.GetTexture("CalamityMod/ExtraTextures/SwordSlashTexture")); Player player = Main.player[projectile.owner]; - List positions = new List(); + float swingAngularDirection = Math.Sign(MathHelper.WrapAngle(projectile.rotation - projectile.oldRot[1])); - float swingAngularDirection = Math.Sign(projectile.rotation - projectile.oldRot[1]); - projectile.oldRot[0] += swingAngularDirection * 0.1f; - for (int i = 0; i < projectile.oldPos.Length; i++) + Vector2[] drawPoints = new Vector2[projectile.oldPos.Length]; + Vector2 perpendicularDirection = bladeOffset.SafeNormalize(Vector2.UnitY).RotatedBy(MathHelper.PiOver2); + for (int i = 0; i < drawPoints.Length; i++) { if (projectile.oldPos[i] == Vector2.Zero) continue; - // Skip over any very points going in the wrong direction, to prevent "nets" from the primitive. - if (i > 1 && Math.Sign(projectile.oldRot[i - 1] - projectile.oldRot[i]) != swingAngularDirection) - continue; - - Vector2 position = projectile.position + projectile.oldRot[i].ToRotationVector2() * (IsSmall ? 90f : 132f) * projectile.scale; - - positions.Add(position); + float swingFactor = MathHelper.Min(1f, AngularDamageFactor); + float offsetFactor = i * -swingAngularDirection * MathHelper.Min(0.8f, swingFactor) * 100f; + float angularTurn = i * swingAngularDirection * -0.09f; + drawPoints[i] = projectile.position + perpendicularDirection.RotatedBy(angularTurn) * offsetFactor; } - projectile.oldRot[0] -= swingAngularDirection * 0.1f; - TrailDrawer.Draw(positions, projectile.Size * 0.5f - Main.screenPosition, 50); + TrailDrawer.Draw(drawPoints, projectile.Size * 0.5f + bladeOffset - Main.screenPosition, 50); spriteBatch.Draw(bladeTexture, projectile.Center + bladeOffset - Main.screenPosition, frame, Color.White, projectile.rotation + MathHelper.PiOver2, origin, projectile.scale, SpriteEffects.None, 0f); spriteBatch.Draw(hiltTexture, projectile.Center - Main.screenPosition, null, lightColor, projectile.rotation + MathHelper.PiOver2, hiltTexture.Size() * 0.5f, projectile.scale, SpriteEffects.None, 0f); From bd253c415f48a508b48210b9d1b3bdf10f9ebb8c Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 17:18:21 -0500 Subject: [PATCH 02/18] Lowered Saros' Possession's light --- Projectiles/Summon/RadiantResolutionAura.cs | 154 +++++++++++--------- 1 file changed, 88 insertions(+), 66 deletions(-) diff --git a/Projectiles/Summon/RadiantResolutionAura.cs b/Projectiles/Summon/RadiantResolutionAura.cs index 6bcaedbc13..807f847c0d 100644 --- a/Projectiles/Summon/RadiantResolutionAura.cs +++ b/Projectiles/Summon/RadiantResolutionAura.cs @@ -6,119 +6,141 @@ using System; using Terraria; using Terraria.ID; using Terraria.ModLoader; + namespace CalamityMod.Projectiles.Summon { public class RadiantResolutionAura : ModProjectile { - public const float DistanceToCheck = 1600f; + public Player Owner => Main.player[projectile.owner]; + public ref float AllocatedSlots => ref projectile.ai[0]; + public ref float GeneralTimer => ref projectile.ai[1]; + + public const float TargetCheckDistance = 1600f; + public const int RadiantOrbAppearRateLowerBound = 7; + public const int RadiantOrbDamageUpperBound = 10000; public override void SetStaticDefaults() { - DisplayName.SetDefault("Saros Possession"); + DisplayName.SetDefault("Radiant Aura"); ProjectileID.Sets.MinionSacrificable[projectile.type] = true; ProjectileID.Sets.MinionTargettingFeature[projectile.type] = true; } public override void SetDefaults() { - projectile.width = 66; - projectile.height = 66; + projectile.width = projectile.height = 66; projectile.netImportant = true; projectile.friendly = true; projectile.ignoreWater = true; projectile.minionSlots = 1f; - projectile.timeLeft = 18000; + projectile.timeLeft = 90000; projectile.penetrate = -1; projectile.tileCollide = false; - projectile.timeLeft *= 5; projectile.minion = true; } public override void AI() { - Lighting.AddLight(projectile.Center, 2f, 2f, 2f); - Player player = Main.player[projectile.owner]; - CalamityPlayer modPlayer = player.Calamity(); - player.AddBuff(ModContent.BuffType(), 3600); + // Emit some light. + Lighting.AddLight(projectile.Center, Vector3.One * 1.2f); + + // Ensure that the projectile using this AI is the correct projectile and that the owner has the appropriate buffs. + VerifyIdentityOfCaller(); + + // Handle dynamic minion damage. + HandleDynamicMinionDamage(); + + // Store the allocated slots in the minionSlots field so that the amount of slots the projectile is holding + // is always correct. + projectile.minionSlots = projectile.ai[0]; + + // Stay near the target and spin around. + projectile.Center = Owner.Center - Vector2.UnitY * 16f; + projectile.rotation += MathHelper.ToRadians(AllocatedSlots * 0.85f + 3f); + + float damageMultiplier = (float)Math.Log(AllocatedSlots, 3D) + 1f; + + // Softcap the multiplier after it has exceeded 3x the base value. + float softcappedDamageMultiplier = damageMultiplier; + if (softcappedDamageMultiplier > 3f) + softcappedDamageMultiplier = ((damageMultiplier - 3f) * 0.1f) + 3f; + + int radiantOrbDamage = (int)(projectile.damage * softcappedDamageMultiplier); + int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, AllocatedSlots)); + + // Hard-cap the orb appear rate and damage. + // The latter is basically impossible to reach now due to rebalancing, but it shall remain for the time being. + if (radiantOrbAppearRate < RadiantOrbAppearRateLowerBound) + radiantOrbAppearRate = RadiantOrbAppearRateLowerBound; + + if (radiantOrbDamage > RadiantOrbDamageUpperBound) + radiantOrbDamage = RadiantOrbDamageUpperBound; + + // Attack nearby targets. + GeneralTimer++; + NPC potentialTarget = projectile.Center.MinionHoming(TargetCheckDistance, Owner); + if (potentialTarget != null && Main.myPlayer == projectile.owner) + AttackTarget(potentialTarget, radiantOrbAppearRate, radiantOrbDamage); + } + + public void VerifyIdentityOfCaller() + { + Owner.AddBuff(ModContent.BuffType(), 3600); bool isCorrectProjectile = projectile.type == ModContent.ProjectileType(); if (isCorrectProjectile) { - if (player.dead) - { - modPlayer.radiantResolution = false; - } - if (modPlayer.radiantResolution) - { - projectile.timeLeft = 2; - } - } + if (Owner.dead) + Owner.Calamity().radiantResolution = false; + if (Owner.Calamity().radiantResolution) + projectile.timeLeft = 2; + } + } + + public void HandleDynamicMinionDamage() + { if (projectile.localAI[0] == 0f) { - projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage(); + projectile.Calamity().spawnedPlayerMinionDamageValue = Owner.MinionDamage(); projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage; projectile.localAI[0] += 1f; } - if (player.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) + if (Owner.MinionDamage() != projectile.Calamity().spawnedPlayerMinionDamageValue) { int trueDamage = (int)(projectile.Calamity().spawnedPlayerMinionProjectileDamageValue / projectile.Calamity().spawnedPlayerMinionDamageValue * - player.MinionDamage()); + Owner.MinionDamage()); projectile.damage = trueDamage; } - projectile.minionSlots = projectile.ai[0]; + } - projectile.Center = player.Center - Vector2.UnitY * 16f; - - float allocatedSlots = projectile.ai[0]; - projectile.rotation += MathHelper.ToRadians(3f) + MathHelper.ToRadians(allocatedSlots * 0.85f); - - float damageMult = (float)Math.Log(allocatedSlots, 3) + 1f; - - //Softcap the mult after 9 slots - float newMult = damageMult; - if (newMult > 3f) - { - newMult = ((damageMult - 3f) * 0.1f) + 3f; - } - - int radiantOrbDamage = (int)(projectile.damage * newMult); - int radiantOrbAppearRate = (int)(130 * Math.Pow(0.9, allocatedSlots)); - - if (radiantOrbAppearRate < 7) - radiantOrbAppearRate = 7; - - if (radiantOrbDamage > 10000) - radiantOrbDamage = 10000; - - projectile.ai[1]++; - NPC potentialTarget = projectile.Center.MinionHoming(DistanceToCheck, player); - if (potentialTarget != null && Main.myPlayer == projectile.owner) + public void AttackTarget(NPC target, int radiantOrbAppearRate, int radiantOrbDamage) + { + if (GeneralTimer % 35f == 34f) { - if (projectile.ai[1] % 35 == 34) + for (int i = 0; i < 2; i++) { - for (int i = 0; i < 2; i++) - { - float angle = MathHelper.Lerp(-MathHelper.ToRadians(20f), MathHelper.ToRadians(20f), i / 2f); - Vector2 fireVelocity = projectile.SafeDirectionTo(potentialTarget.Center).RotatedBy(angle) * 15f; - Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner); - } + float angle = MathHelper.Lerp(-MathHelper.ToRadians(20f), MathHelper.ToRadians(20f), i / 2f); + Vector2 fireVelocity = projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 15f; + Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner); } - if (projectile.ai[1] % radiantOrbAppearRate == radiantOrbAppearRate - 1) + } + + if (GeneralTimer % radiantOrbAppearRate == radiantOrbAppearRate - 1) + { + Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(100f, 360f); + Vector2 bootlegRadianceOrbVelocity = projectile.SafeDirectionTo(target.Center) * 2f; + Projectile.NewProjectile(spawnPosition, bootlegRadianceOrbVelocity, ModContent.ProjectileType(), radiantOrbDamage, projectile.knockBack * 4f, projectile.owner); + for (int i = 0; i < 3; i++) { - Vector2 spawnPosition = projectile.Center + Main.rand.NextVector2Unit() * Main.rand.NextFloat(100f, 360f); - Vector2 bootlegRadianceOrbVelocity = projectile.SafeDirectionTo(potentialTarget.Center) * 2f; - Projectile.NewProjectile(spawnPosition, bootlegRadianceOrbVelocity, ModContent.ProjectileType(), radiantOrbDamage, projectile.knockBack * 4f, projectile.owner); - for (int i = 0; i < 3; i++) - { - float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f); - Vector2 fireVelocity = projectile.SafeDirectionTo(potentialTarget.Center).RotatedBy(angle) * 19f; - Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner); - } + float angle = MathHelper.Lerp(-MathHelper.ToRadians(30f), MathHelper.ToRadians(30f), i / 3f); + Vector2 fireVelocity = projectile.SafeDirectionTo(target.Center).RotatedBy(angle) * 19f; + Projectile.NewProjectile(projectile.Center, fireVelocity, ModContent.ProjectileType(), radiantOrbDamage / 2, projectile.knockBack, projectile.owner); } } } public override bool CanDamage() => false; + public override void PostDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D currentTexture = ModContent.GetTexture(Texture); From b4121e77456986762c1c19373257f56aca04f04b Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Wed, 13 Oct 2021 11:40:33 -0400 Subject: [PATCH 03/18] ancient lanturn fix --- Tiles/FurnitureAncient/AncientLantern.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Tiles/FurnitureAncient/AncientLantern.cs b/Tiles/FurnitureAncient/AncientLantern.cs index 40295c533a..f6c04585bc 100644 --- a/Tiles/FurnitureAncient/AncientLantern.cs +++ b/Tiles/FurnitureAncient/AncientLantern.cs @@ -36,15 +36,30 @@ namespace CalamityMod.Tiles.FurnitureAncient Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType()); } + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].frameX < 18) + { + r = 1f; + g = 0.5f; + b = 0.5f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) { CalamityUtils.DrawFlameEffect(ModContent.GetTexture("CalamityMod/Tiles/FurnitureAncient/AncientLanternFlame"), i, j); } - public override void HitWire(int i, int j) { - CalamityUtils.LightHitWire(Type, i, j, 3, 3); + CalamityUtils.LightHitWire(Type, i, j, 1, 2); } public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) From 920d19d52776b90bbd8cb4f3c4323e97b12c60ff Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Wed, 13 Oct 2021 11:51:45 -0400 Subject: [PATCH 04/18] fixed a few weapons hitting town npcs --- Projectiles/Melee/BonebreakerProjectile.cs | 9 ++++++++- Projectiles/Rogue/EclipsesStealth.cs | 9 ++++++++- Projectiles/Typeless/CursorProjSplit.cs | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/Projectiles/Melee/BonebreakerProjectile.cs b/Projectiles/Melee/BonebreakerProjectile.cs index 6020ec3daa..d23ae63938 100644 --- a/Projectiles/Melee/BonebreakerProjectile.cs +++ b/Projectiles/Melee/BonebreakerProjectile.cs @@ -110,7 +110,14 @@ namespace CalamityMod.Projectiles.Melee target.AddBuff(ModContent.BuffType(), 240); } - public override bool? CanHitNPC(NPC target) => projectile.ai[0] != 1f; + public override bool? CanHitNPC(NPC target) + { + if (projectile.ai[0] == 1f) + { + return false; + } + return null; + } public override bool CanHitPvp(Player target) => projectile.ai[0] != 1f; } diff --git a/Projectiles/Rogue/EclipsesStealth.cs b/Projectiles/Rogue/EclipsesStealth.cs index 257317e083..7aa3f2efd9 100644 --- a/Projectiles/Rogue/EclipsesStealth.cs +++ b/Projectiles/Rogue/EclipsesStealth.cs @@ -106,7 +106,14 @@ namespace CalamityMod.Projectiles.Rogue return false; } - public override bool? CanHitNPC(NPC target) => projectile.ai[0] != 1f; + public override bool? CanHitNPC(NPC target) + { + if (projectile.ai[0] == 1f) + { + return false; + } + return null; + } public override bool CanHitPvp(Player target) => projectile.ai[0] != 1f; } diff --git a/Projectiles/Typeless/CursorProjSplit.cs b/Projectiles/Typeless/CursorProjSplit.cs index a992d5d345..28d1320458 100644 --- a/Projectiles/Typeless/CursorProjSplit.cs +++ b/Projectiles/Typeless/CursorProjSplit.cs @@ -201,7 +201,14 @@ namespace CalamityMod.Projectiles.Typeless target.AddBuff(ModContent.BuffType(), 60); } - public override bool? CanHitNPC(NPC target) => projectile.alpha < 128; + public override bool? CanHitNPC(NPC target) + { + if (projectile.alpha >= 128) + { + return false; + } + return null; + } public override bool CanHitPvp(Player target) => projectile.alpha < 128; From 05508e01ae4cdbcf224ea93333986e6567d6bd71 Mon Sep 17 00:00:00 2001 From: ben-tk <45545085+ben-tk@users.noreply.github.com> Date: Wed, 13 Oct 2021 12:21:13 -0400 Subject: [PATCH 05/18] fixed various furniture producing light when turned off --- Tiles/Furniture/ChaosCandle.cs | 3 ++- Tiles/Furniture/TranquilityCandle.cs | 3 ++- Tiles/FurnitureAbyss/AbyssTorch.cs | 3 ++- Tiles/FurnitureAncient/AncientBasin.cs | 2 +- Tiles/FurnitureAncient/AncientChandelier.cs | 2 +- Tiles/FurnitureAncient/AncientLamp.cs | 2 +- Tiles/FurnitureAncient/AncientLantern.cs | 2 +- Tiles/FurnitureAshen/AshenBasin.cs | 2 +- Tiles/FurnitureAshen/AshenCandelabra.cs | 3 ++- Tiles/FurnitureAshen/AshenCandle.cs | 3 ++- Tiles/FurnitureAshen/AshenChandelier.cs | 2 +- Tiles/FurnitureAshen/AshenLamp.cs | 2 +- Tiles/FurnitureAshen/AshenLantern.cs | 2 +- Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs | 2 +- Tiles/FurnitureProfaned/ProfanedCandelabra.cs | 3 ++- Tiles/FurnitureProfaned/ProfanedCandle.cs | 3 ++- Tiles/FurnitureProfaned/ProfanedLamp.cs | 2 +- Tiles/FurnitureProfaned/ProfanedLantern.cs | 3 ++- 18 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Tiles/Furniture/ChaosCandle.cs b/Tiles/Furniture/ChaosCandle.cs index 2a6c8aaae9..e8d55436b1 100644 --- a/Tiles/Furniture/ChaosCandle.cs +++ b/Tiles/Furniture/ChaosCandle.cs @@ -59,7 +59,8 @@ namespace CalamityMod.Tiles.Furniture public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(235, 5, i, j); + if (Main.tile[i, j].frameX < 18) + CalamityUtils.DrawFlameSparks(235, 5, i, j); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/Furniture/TranquilityCandle.cs b/Tiles/Furniture/TranquilityCandle.cs index f1c55286d4..af6f18d820 100644 --- a/Tiles/Furniture/TranquilityCandle.cs +++ b/Tiles/Furniture/TranquilityCandle.cs @@ -59,7 +59,8 @@ namespace CalamityMod.Tiles.Furniture public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(62, 5, i, j); + if (Main.tile[i, j].frameX < 18) + CalamityUtils.DrawFlameSparks(62, 5, i, j); } public override void PostDraw(int i, int j, SpriteBatch spriteBatch) diff --git a/Tiles/FurnitureAbyss/AbyssTorch.cs b/Tiles/FurnitureAbyss/AbyssTorch.cs index ec76fb1868..c28ff30a23 100644 --- a/Tiles/FurnitureAbyss/AbyssTorch.cs +++ b/Tiles/FurnitureAbyss/AbyssTorch.cs @@ -70,7 +70,8 @@ namespace CalamityMod.Tiles.FurnitureAbyss } public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(187, 5, i, j); + if (Main.tile[i, j].frameX < 66) + CalamityUtils.DrawFlameSparks(187, 5, i, j); } public override bool NewRightClick(int i, int j) diff --git a/Tiles/FurnitureAncient/AncientBasin.cs b/Tiles/FurnitureAncient/AncientBasin.cs index 748c8c4a80..4e4f9ac1ab 100644 --- a/Tiles/FurnitureAncient/AncientBasin.cs +++ b/Tiles/FurnitureAncient/AncientBasin.cs @@ -79,7 +79,7 @@ namespace CalamityMod.Tiles.FurnitureAncient public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 54) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAncient/AncientChandelier.cs b/Tiles/FurnitureAncient/AncientChandelier.cs index 8234044626..69ff43f743 100644 --- a/Tiles/FurnitureAncient/AncientChandelier.cs +++ b/Tiles/FurnitureAncient/AncientChandelier.cs @@ -44,7 +44,7 @@ namespace CalamityMod.Tiles.FurnitureAncient public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameX == 18 && tile.frameY == 36) + if (tile.frameX < 54 && tile.frameY == 36) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAncient/AncientLamp.cs b/Tiles/FurnitureAncient/AncientLamp.cs index 15c3513f02..c63de59066 100644 --- a/Tiles/FurnitureAncient/AncientLamp.cs +++ b/Tiles/FurnitureAncient/AncientLamp.cs @@ -56,7 +56,7 @@ namespace CalamityMod.Tiles.FurnitureAncient public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 18) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAncient/AncientLantern.cs b/Tiles/FurnitureAncient/AncientLantern.cs index f6c04585bc..22f7093077 100644 --- a/Tiles/FurnitureAncient/AncientLantern.cs +++ b/Tiles/FurnitureAncient/AncientLantern.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureAncient public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 18) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAshen/AshenBasin.cs b/Tiles/FurnitureAshen/AshenBasin.cs index 54b0988925..885db098c8 100644 --- a/Tiles/FurnitureAshen/AshenBasin.cs +++ b/Tiles/FurnitureAshen/AshenBasin.cs @@ -80,7 +80,7 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 54) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAshen/AshenCandelabra.cs b/Tiles/FurnitureAshen/AshenCandelabra.cs index 9225e4dc4b..b0fd790b25 100644 --- a/Tiles/FurnitureAshen/AshenCandelabra.cs +++ b/Tiles/FurnitureAshen/AshenCandelabra.cs @@ -77,7 +77,8 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(60, 5, i, j); + if (Main.tile[i, j].frameX < 35) + CalamityUtils.DrawFlameSparks(60, 5, i, j); } } } diff --git a/Tiles/FurnitureAshen/AshenCandle.cs b/Tiles/FurnitureAshen/AshenCandle.cs index 47b8bd56cb..b2a051ca0b 100644 --- a/Tiles/FurnitureAshen/AshenCandle.cs +++ b/Tiles/FurnitureAshen/AshenCandle.cs @@ -73,7 +73,8 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(60, 5, i, j); + if (Main.tile[i, j].frameX < 18) + CalamityUtils.DrawFlameSparks(60, 5, i, j); } } } diff --git a/Tiles/FurnitureAshen/AshenChandelier.cs b/Tiles/FurnitureAshen/AshenChandelier.cs index 56fb3c82ae..60036b2535 100644 --- a/Tiles/FurnitureAshen/AshenChandelier.cs +++ b/Tiles/FurnitureAshen/AshenChandelier.cs @@ -77,7 +77,7 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 54) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAshen/AshenLamp.cs b/Tiles/FurnitureAshen/AshenLamp.cs index e6179be5bb..402c59dffe 100644 --- a/Tiles/FurnitureAshen/AshenLamp.cs +++ b/Tiles/FurnitureAshen/AshenLamp.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 0) + if (tile.frameY == 0 && tile.frameX < 18) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureAshen/AshenLantern.cs b/Tiles/FurnitureAshen/AshenLantern.cs index 7ef4799944..97d243117f 100644 --- a/Tiles/FurnitureAshen/AshenLantern.cs +++ b/Tiles/FurnitureAshen/AshenLantern.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureAshen public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 18) { CalamityUtils.DrawFlameSparks(60, 5, i, j); } diff --git a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs index 2912fab2db..2912b63572 100644 --- a/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs +++ b/Tiles/FurnitureCosmilite/CosmiliteBasinTile.cs @@ -83,7 +83,7 @@ namespace CalamityMod.Tiles.FurnitureCosmilite public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { Tile tile = Main.tile[i, j]; - if (tile.frameY == 18) + if (tile.frameY == 18 && tile.frameX < 54) { CalamityUtils.DrawFlameSparks((int)CalamityDusts.PurpleCosmilite, 5, i, j); } diff --git a/Tiles/FurnitureProfaned/ProfanedCandelabra.cs b/Tiles/FurnitureProfaned/ProfanedCandelabra.cs index 00de7fe7b3..8ba459625d 100644 --- a/Tiles/FurnitureProfaned/ProfanedCandelabra.cs +++ b/Tiles/FurnitureProfaned/ProfanedCandelabra.cs @@ -64,7 +64,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(246, 5, i, j); + if (Main.tile[i, j].frameX < 35) + CalamityUtils.DrawFlameSparks(246, 5, i, j); } } } diff --git a/Tiles/FurnitureProfaned/ProfanedCandle.cs b/Tiles/FurnitureProfaned/ProfanedCandle.cs index 4946095dbd..3087e8d025 100644 --- a/Tiles/FurnitureProfaned/ProfanedCandle.cs +++ b/Tiles/FurnitureProfaned/ProfanedCandle.cs @@ -74,7 +74,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(246, 5, i, j); + if (Main.tile[i, j].frameX < 18) + CalamityUtils.DrawFlameSparks(246, 5, i, j); } } } diff --git a/Tiles/FurnitureProfaned/ProfanedLamp.cs b/Tiles/FurnitureProfaned/ProfanedLamp.cs index bce7c22619..347fdb75d9 100644 --- a/Tiles/FurnitureProfaned/ProfanedLamp.cs +++ b/Tiles/FurnitureProfaned/ProfanedLamp.cs @@ -65,7 +65,7 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - if (Main.tile[i, j].frameY == 0) + if (Main.tile[i, j].frameY == 0 && Main.tile[i, j].frameX < 18) { CalamityUtils.DrawFlameSparks(246, 5, i, j); } diff --git a/Tiles/FurnitureProfaned/ProfanedLantern.cs b/Tiles/FurnitureProfaned/ProfanedLantern.cs index a4f836b7cf..5f9f70084d 100644 --- a/Tiles/FurnitureProfaned/ProfanedLantern.cs +++ b/Tiles/FurnitureProfaned/ProfanedLantern.cs @@ -65,7 +65,8 @@ namespace CalamityMod.Tiles.FurnitureProfaned public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex) { - CalamityUtils.DrawFlameSparks(246, 5, i, j); + if (Main.tile[i, j].frameX < 18) + CalamityUtils.DrawFlameSparks(246, 5, i, j); } } } From 608bc79f13d8009816be0665283e32f4b7171271 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 23:11:00 -0500 Subject: [PATCH 06/18] Sped up T1000 projectiles --- Projectiles/Magic/T1000Proj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/T1000Proj.cs b/Projectiles/Magic/T1000Proj.cs index caebb2cf30..ba4cb99c21 100644 --- a/Projectiles/Magic/T1000Proj.cs +++ b/Projectiles/Magic/T1000Proj.cs @@ -92,7 +92,7 @@ namespace CalamityMod.Projectiles.Magic projectile.velocity = velocity; int projType = ModContent.ProjectileType(); - float velocityMult = 14f; + float velocityMult = 21f; float randNum = 4f; for (int j = 0; j < 4; j++) { From 25a4ebe4ea099856efcef7d57e573a8f3089156f Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 23:15:33 -0500 Subject: [PATCH 07/18] Oracle doesn't proc off 0 damage hits --- Projectiles/Melee/Yoyos/OracleYoyo.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Projectiles/Melee/Yoyos/OracleYoyo.cs b/Projectiles/Melee/Yoyos/OracleYoyo.cs index 64e6a384b9..553ec8552f 100644 --- a/Projectiles/Melee/Yoyos/OracleYoyo.cs +++ b/Projectiles/Melee/Yoyos/OracleYoyo.cs @@ -142,7 +142,11 @@ namespace CalamityMod.Projectiles.Melee.Yoyos public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { - // Charge up the red lightning aura with every hit + // On hit effects do not apply if no damage was done. + if (damage <= 0) + return; + + // Charge up the red lightning aura with every hit. AuraCharge += ChargePerHit; // Fire Auric orbs every few hits while supercharged. From 52d97a20f87594c1993722bd851c40e387db4cf0 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 23:17:16 -0500 Subject: [PATCH 08/18] Fixed the hitbox of Galileo Gladius planets --- Projectiles/Melee/GalileosPlanet.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Projectiles/Melee/GalileosPlanet.cs b/Projectiles/Melee/GalileosPlanet.cs index a1d4069b10..306f79c7c6 100644 --- a/Projectiles/Melee/GalileosPlanet.cs +++ b/Projectiles/Melee/GalileosPlanet.cs @@ -22,8 +22,7 @@ namespace CalamityMod.Projectiles.Melee public override void SetDefaults() { - projectile.width = 42; - projectile.height = 42; + projectile.width = projectile.height = 88; projectile.friendly = true; projectile.ignoreWater = true; projectile.extraUpdates = 1; From ece908e68e4ef392ee7472e1b0fdcf5538bb766d Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 23:19:02 -0500 Subject: [PATCH 09/18] Slightly lowered Photon Ripper's base damage --- Items/Weapons/Melee/PhotonRipper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Melee/PhotonRipper.cs b/Items/Weapons/Melee/PhotonRipper.cs index 5b6bee5630..0d04bfb318 100644 --- a/Items/Weapons/Melee/PhotonRipper.cs +++ b/Items/Weapons/Melee/PhotonRipper.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee { item.height = 134; item.width = 54; - item.damage = 4050; + item.damage = 3725; // Displayed axe% is 1/5th of axePower here because trees have 500% hardness. This corrects for that. item.axe = 6000 / 5; From 414c491258bdb4bbd4c4027b8a3de5790cba3887 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 23:21:31 -0500 Subject: [PATCH 10/18] Made Event Horizon's homing a bit stronger --- Projectiles/Magic/EventHorizonStar.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Magic/EventHorizonStar.cs b/Projectiles/Magic/EventHorizonStar.cs index 5b030cb318..91dcd7fa77 100644 --- a/Projectiles/Magic/EventHorizonStar.cs +++ b/Projectiles/Magic/EventHorizonStar.cs @@ -87,7 +87,7 @@ namespace CalamityMod.Projectiles.Magic if (projectile.localAI[0] >= 100) { Vector2 center = projectile.Center; - float homingRange = 250f; + float homingRange = 325f; bool homeIn = false; float inertia = 25f; float homingSpeed = 23f; From 2b408bbae43e93700a00add83e98d99d4560f330 Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Tue, 12 Oct 2021 23:23:36 -0500 Subject: [PATCH 11/18] Endo Hydra beams ignore tiles --- Projectiles/Summon/EndoHydraHead.cs | 2 +- Projectiles/Summon/EndoRay.cs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Projectiles/Summon/EndoHydraHead.cs b/Projectiles/Summon/EndoHydraHead.cs index 6352c75f0e..84a73682f6 100644 --- a/Projectiles/Summon/EndoHydraHead.cs +++ b/Projectiles/Summon/EndoHydraHead.cs @@ -115,7 +115,7 @@ namespace CalamityMod.Projectiles.Summon if (body.ai[0] >= 0 && body.ai[0] < Main.npc.Length) { NPC target = Main.npc[(int)body.ai[0]]; - bool targetAliveAndInLineOfSight = target.active && projectile.Distance(target.Center) < EndoHydraBody.DistanceToCheck && Collision.CanHit(projectile.Center, 1, 1, target.Center, 1, 1); + bool targetAliveAndInLineOfSight = target.active && projectile.Distance(target.Center) < EndoHydraBody.DistanceToCheck; if (targetAliveAndInLineOfSight && target.CanBeChasedBy() && Main.myPlayer == projectile.owner) { if (Time % 40f == 24f) diff --git a/Projectiles/Summon/EndoRay.cs b/Projectiles/Summon/EndoRay.cs index 1ad285a510..b21267c6e3 100644 --- a/Projectiles/Summon/EndoRay.cs +++ b/Projectiles/Summon/EndoRay.cs @@ -24,6 +24,7 @@ namespace CalamityMod.Projectiles.Summon projectile.extraUpdates = 100; projectile.timeLeft = 265; projectile.coldDamage = true; + projectile.tileCollide = false; projectile.usesLocalNPCImmunity = true; projectile.localNPCHitCooldown = 100; } From c42678f9eb2eecbfd108cea70c06c761684478fe Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 13 Oct 2021 12:19:47 -0500 Subject: [PATCH 12/18] Buffed Heresy damage to 888 --- Items/Weapons/Magic/Heresy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/Heresy.cs b/Items/Weapons/Magic/Heresy.cs index 6d04804a89..cba4b87e94 100644 --- a/Items/Weapons/Magic/Heresy.cs +++ b/Items/Weapons/Magic/Heresy.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 444; + item.damage = 888; item.magic = true; item.mana = 10; item.width = 38; From 79ae7f259bb1a5061b02dab8545c6a93f8f4e32d Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 13 Oct 2021 14:00:20 -0500 Subject: [PATCH 13/18] Significantly buffed Yharon Kindle Staff damage and speed --- Items/Weapons/Summon/AngryChickenStaff.cs | 2 +- Projectiles/Summon/SonOfYharon.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Weapons/Summon/AngryChickenStaff.cs b/Items/Weapons/Summon/AngryChickenStaff.cs index 7502e45db7..4d798301e0 100644 --- a/Items/Weapons/Summon/AngryChickenStaff.cs +++ b/Items/Weapons/Summon/AngryChickenStaff.cs @@ -8,7 +8,7 @@ namespace CalamityMod.Items.Weapons.Summon { public class AngryChickenStaff : ModItem { - public const int Damage = 107; + public const int Damage = 300; public override void SetStaticDefaults() { DisplayName.SetDefault("Yharon's Kindle Staff"); diff --git a/Projectiles/Summon/SonOfYharon.cs b/Projectiles/Summon/SonOfYharon.cs index f24f76fb13..10d9634729 100644 --- a/Projectiles/Summon/SonOfYharon.cs +++ b/Projectiles/Summon/SonOfYharon.cs @@ -107,7 +107,7 @@ namespace CalamityMod.Projectiles.Summon } } - projectile.ChargingMinionAI(1000f, 2000f, 3000f, 500f, 1, 30f, 8f, 4f, new Vector2(0f, -60f), 40f, 8f, true, true); + projectile.ChargingMinionAI(1000f, 2000f, 3000f, 500f, 1, 30f, 8f, 4f, new Vector2(0f, -60f), 40f, 15.5f, true, true); } public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) From 2209b1be32a772deedf14dd3e68e9f5f00d6830d Mon Sep 17 00:00:00 2001 From: DominicKarma <51094361+DominicKarma@users.noreply.github.com> Date: Wed, 13 Oct 2021 17:54:37 -0500 Subject: [PATCH 14/18] Buffed Hadopelagic Echo damage to 500 --- Items/Weapons/Magic/HadopelagicEcho.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Items/Weapons/Magic/HadopelagicEcho.cs b/Items/Weapons/Magic/HadopelagicEcho.cs index 4598e96fa7..1725f7fa7b 100644 --- a/Items/Weapons/Magic/HadopelagicEcho.cs +++ b/Items/Weapons/Magic/HadopelagicEcho.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Magic public override void SetDefaults() { - item.damage = 230; + item.damage = 500; item.magic = true; item.mana = 15; item.width = 60; From ecab5debc77dfff6730a1eace558d44ce8ef9005 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Thu, 14 Oct 2021 21:14:01 -0400 Subject: [PATCH 15/18] god slayer slugs 42 -> 28, ratio 30% -> 28% --- Items/Ammo/GodSlayerSlug.cs | 2 +- Projectiles/Ranged/GodSlayerSlugProj.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Items/Ammo/GodSlayerSlug.cs b/Items/Ammo/GodSlayerSlug.cs index 8e8f2f9eaf..13e30ffe2b 100644 --- a/Items/Ammo/GodSlayerSlug.cs +++ b/Items/Ammo/GodSlayerSlug.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Items.Ammo public override void SetDefaults() { - item.damage = 42; + item.damage = 28; item.ranged = true; item.width = 22; item.height = 22; diff --git a/Projectiles/Ranged/GodSlayerSlugProj.cs b/Projectiles/Ranged/GodSlayerSlugProj.cs index dbbafe9be0..bdec562777 100644 --- a/Projectiles/Ranged/GodSlayerSlugProj.cs +++ b/Projectiles/Ranged/GodSlayerSlugProj.cs @@ -97,7 +97,7 @@ namespace CalamityMod.Projectiles.Ranged projectile.tileCollide = false; // Reduce damage, but remove piercing. Reset local iframes so the bullet, turned blue, may always strike again. - projectile.damage = (int)(0.3f * projectile.damage); + projectile.damage = (int)(0.28f * projectile.damage); projectile.penetrate = 1; for (int i = 0; i < Main.maxNPCs; i++) projectile.localNPCImmunity[i] = 0; From 3bcb2c49bdcd0426a327cf5a3a469b059c2d9164 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Thu, 14 Oct 2021 22:47:48 -0500 Subject: [PATCH 16/18] 1 - variable rename --- NPCs/CalamityGlobalNPC.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NPCs/CalamityGlobalNPC.cs b/NPCs/CalamityGlobalNPC.cs index 84903d1cba..5a64d1546e 100644 --- a/NPCs/CalamityGlobalNPC.cs +++ b/NPCs/CalamityGlobalNPC.cs @@ -1925,8 +1925,8 @@ namespace CalamityMod.NPCs bool thanatos = ThanatosIDs.Contains(npc.type); // Calculate extra DR based on kill time, similar to the Hush boss from The Binding of Isaac - bool increasedTimedDR = !GetDownedBossVariable(npc.type) || malice || nightProvi || prePlant_Destroyer || prePlant_AS || preML_Deus || preDoG_SW || malice_DS_Perfs || thanatos; - if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && increasedTimedDR) + bool useTimedDR = !GetDownedBossVariable(npc.type) || malice || nightProvi || prePlant_Destroyer || prePlant_AS || preML_Deus || preDoG_SW || malice_DS_Perfs || thanatos; + if (KillTime > 0 && AITimer < KillTime && !BossRushEvent.BossRushActive && useTimedDR) { bool tenTimes_TimedDR = nightProvi; bool fiveTimes_TimedDR = prePlant_Destroyer || prePlant_AS || preML_Deus || preDoG_SW || malice_DS_Perfs; From fac4a791cc8ff2ad094d626eded7208fafb7d4e5 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 15 Oct 2021 12:02:42 -0500 Subject: [PATCH 17/18] 1 - Thanatos reticle sprites. --- ExtraTextures/ThanatosReticleHead.png | Bin 0 -> 1089 bytes ExtraTextures/ThanatosReticleLeft.png | Bin 0 -> 790 bytes ExtraTextures/ThanatosReticleProngLeft.png | Bin 0 -> 635 bytes ExtraTextures/ThanatosReticleProngRight.png | Bin 0 -> 574 bytes ExtraTextures/ThanatosReticleRight.png | Bin 0 -> 803 bytes ExtraTextures/ThanatosReticleTop.png | Bin 0 -> 809 bytes 6 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 ExtraTextures/ThanatosReticleHead.png create mode 100644 ExtraTextures/ThanatosReticleLeft.png create mode 100644 ExtraTextures/ThanatosReticleProngLeft.png create mode 100644 ExtraTextures/ThanatosReticleProngRight.png create mode 100644 ExtraTextures/ThanatosReticleRight.png create mode 100644 ExtraTextures/ThanatosReticleTop.png diff --git a/ExtraTextures/ThanatosReticleHead.png b/ExtraTextures/ThanatosReticleHead.png new file mode 100644 index 0000000000000000000000000000000000000000..e99eb727fe26fd47873b83ecf4a117a191d4b35b GIT binary patch literal 1089 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>VE*mt;uumf z=k1-dUauV_j(t>Lt|a23tF`XV3(=172Zwrh6hBtoRj7V<#|zOZagBK_jv-f+emHuc zJG5`h%*!Q{=E)gbe*T}kC3lkF!uOMBo-`2xT0kCXcsXg6^n~XxUaYwCEj&DY=JDmr zmrq&}wp!J*s;kR zO`DWFtE#KLRbM`Mu;9w?^4+o4enwV)&%SQmYU+9E?c25bkwTp;4hyEO%5w-zPfrh? zpTGTfu=WM5Z8=Y+Z?C`o*3WjIs$bmhbLY=Luev|qjmbrC2g`=y`o$L~sPMKsdtUnc zw|3#*@87x&Fu_-dAR*PJLjSHExq3|d*k#^>|=nK8@I3P%<7ut^Uq_SMqkiemT2xjTBJ3fUv^EB}I z(vCwqoNJgqPdYGn^7g`gw{Op1@y7|MXR5sf&$7C{3lkV7a%Y8Q&6+$}*fVHSjd^Kh zrKPcRc*)W8i`KL4I&K;tAK$66^kuoRzP>)U>~bv?hbK;Nm{V%%>Tc~{sZv{0;~{l^ zqqyn&TMqKySIs}RdPcK-(}rf zw79`_y&j(^r-0=?hKY~4ff8RBw{6=dzm94jPJum(KU7a@PUXI!2 zlW)8J37z~UVaA{Ewx*&&V@v&2P|(h2co${+d+)xrn{;QftV`ScGyH9l_WfI_Q{`{v zGkgYmZ}riduPWcqDehw_c+R*cX#Tu;Mz?cway+E|>m4-bf1uXDv|rdmPDr8X;CIHF zQ}cemfA{Xv#k!MQp4VzOKC8VSFcD}(Ez^&PrMq4;=GYxJH1q^Pm56oqzjo*Y=Cf_x^IcYGdh$c`KxlzbrSY&0yj`pO!t=RkPl{ zeS0Q(_vPi$AHQwSGp?%y`r_)lD2Kpl9J_b#p0won@#8-C55!8pILDBem!~$Vq_|l5 f<^Poxpfq=%Wq0PGwkWfSp#19T>gTe~DWM4fc8vbE literal 0 HcmV?d00001 diff --git a/ExtraTextures/ThanatosReticleLeft.png b/ExtraTextures/ThanatosReticleLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..352f2814296df5dc136c47bbee32ea4a16c9393a GIT binary patch literal 790 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>V7lPx;uumf z=j|Oszt;f*ZVw-eyDNw=CUNUDnqIiD$uCNZYuW*>2nJS;MIH){DP7B@H*`+D;pcN^ z&Uz-*V|mZ!f81-P;5kW!5c)N(^e^-D>C;~xPrCVBU0q%Bz~#%AFFjtrZr!f9CaWLc zZ;LOuKXtpULFm5}BgO=?*^C8+g@M2Bef|3NQc42z%f;_}8XiQcI~dJA%hj-XvoV95 zoSfHueb1J4%dfD_WH@N**Rbne{PI~Gw{+DU3f87KWWA4n`t#?`w=1`}0tK?w9WLLC zFRicVKk)Bg9ovU*->$u=$Zh8oxO0ld!rq?!!Qa2KFYf&ge!81|gEY{lEMbMvx_STq zpL+c|o6$h7UwZC=d;4z#CF)chR{eSM`0-)}3mY4jH-GDUfo3Q%uA1t9R@mTP|GKRA^_7*351u_+_W5Y$Z=f?i zUCdxPP-Dk_?fu`E|NejbCf0B=Ws>9Pbk?uCL9#zw-#k83O! zv<3PnI^_1Uw8m{gMLowK^E~+YQSgIa5;*L7Uc{z1Zrit3U4)^!y80ZGtpQN6io>g| zSIb#%zZ2XtHLYLAnBi9f6HEARpY7V48P;*gTe~DWM4fyWMU@ literal 0 HcmV?d00001 diff --git a/ExtraTextures/ThanatosReticleProngLeft.png b/ExtraTextures/ThanatosReticleProngLeft.png new file mode 100644 index 0000000000000000000000000000000000000000..cc17cca2bd018434fd8d81feec6ee61c3334e08d GIT binary patch literal 635 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>U^4Y|aSW-L z^Y+$3-^T$GtruS(?C@o|8Nev2pq1dr`Ne}jatYHEt`!W5t{UC}X@)jJ_8gqXZ9JbW zwKbq2#57j-9xbt2`~TidUM|-c(}C`pt={;xn!&YF z{=u6!Z@l@QY<3N3ssq|y`^C;-(vt@d6g)ru`Lk!ucHgkgPPJ^;ufIEgE3D;Y%BN>H ze%i1~>{y!~7~8U_E`LE;W#!Lz|KCQn?P74%Y-IZ4%*dAadh!9^%ip3Ttpv_DvguwpbNO7!Q?V|QylbwO3qH+#ym;|qJHE-{Tm}WzyQkm#Qj>T&>d4EN tnUht%fB){ehV_dpa#X^i6qDZei}%XR)n}hAU3(EE>FMg{vd$@?2>{*y7Lfn| literal 0 HcmV?d00001 diff --git a/ExtraTextures/ThanatosReticleProngRight.png b/ExtraTextures/ThanatosReticleProngRight.png new file mode 100644 index 0000000000000000000000000000000000000000..21f2487e1497ad3c74e0212071fe94bf4de171e1 GIT binary patch literal 574 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-D%ze|Wk$hE&XX zd)qPVRe%WFgZs-5D>ap{u3NB!i9L2JbGX8~1F9TKeq6fy4pvV$J9uSF?^f0O=Ej}Z z8|M6%Ib+HQG!F*qRv%oO-%uteFR#7+{kwOQRE|IX_~qM=3LC#kGJNeSCsT|hRZiCJ z_n)LQ{q!lT`gMhy|Hv(lzR&Ppd#b(E-`}g|&7be@S!5$OS%sgU|NXxD%{QmCSj_$= zwBY#}2KzHh2JicMg!O=tU|xbN2M*;Broo@D~6RXNaG za`*LZt@*(o4f7^5++P#&FU81n(wpzU{i^<|`fhGud11*}koq+)e*K^9(3)tF7Kh_{ zp*59S+aq+eu1|e@J*ZAl$Df^>^Fp!E0%hOJf6K%FlLQUH)U!x!H3ar@pq2 ze(4LgtZz!(pD$lZzSZ2;tlNHD_2s@xv%!9o)tp*iUvKX*>1tN!&-3@TF8i^55-c+C b)8c4N~ao>gTe~DWM4fh=Tie literal 0 HcmV?d00001 diff --git a/ExtraTextures/ThanatosReticleRight.png b/ExtraTextures/ThanatosReticleRight.png new file mode 100644 index 0000000000000000000000000000000000000000..0cf153056b1fee4471f7ba57aec67b465f4ded42 GIT binary patch literal 803 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>V7lw+;uumf z=j|O|zgGb=Z6BA5_s9w)-(k`=Sa*O?c=@`^D}}E+L^z5+a9G@Of`OOs-Cykq(@rga zYkNMQElM%-eD%F~*P2v3ClNwc+um&7@9-)wKi~WQ{vA6Q9{l`S8MiT$t)RSo`{n2V zZ)Rq1oyYm%w3yI>k|p==+|k*)Z~uPw1=nAvGE6?na>I_(r{PFx{crA!o3A?RYieSu zYD-I54-{DR9J!%+)VJZtOa|V~R*znPsj_{r+dJnLD^NL5=<}yfOb34c{CVsC?Qn4e zMxk^j6PJ0GiUevAQtHDCd3l@H| zIS)i#ixy~f#s0f8r?r}wt@&WMJ_CQllbeiEuNYz#blw&VD-^C{Hi@~r%OS=#MzqsV zsyD2DOUc&@EFN=Y7d(8m%ORAh#iCi`B~t_E1RMT_X(#?k_PV8hu3B2R|Nm5}R2v46 zt2$e+?zTMe^yyQ#+tW)J&oiYkZE;g^xbxe5rq45m>({S4{JrVW@$bUR5+8=0LN}xe zW$QnB-7`CP?i_`ShaxoIJ_Nu=ys>jXIV5Rax))v$@qA9{DsdTie>QK6v>ubNSZa zxuIwO9t3)xvml{z9`k+A0-e(0dT^A<+<5&uTlx7vP=K@iIRB^Q9Y0vN^35mze|}S( mCoB;zym|%$W(w5(${Ef5b>mXziZo!VXYh3Ob6Mw<&;$UZ2xWNy literal 0 HcmV?d00001 diff --git a/ExtraTextures/ThanatosReticleTop.png b/ExtraTextures/ThanatosReticleTop.png new file mode 100644 index 0000000000000000000000000000000000000000..8bb8ff0fc518985e3722d2007fbde0772c8efde0 GIT binary patch literal 809 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSjKx9jP7LeL$-HD>V0!H7;uumf z=j|QazDEuMZ4b|{=5=u5nCNhh^TM2lhL$PClO_oiFdgBX>Z!NhtUp(F-}+B%`T9e*LsO9U{=w)#q;6Sx$Se)`;I@3E-l%8 zclY|&*FI}THtjg4;ZU&R2=*1$zjN7l-st;m`@47U@u{ryu4X5l1o@ctJj1%1?>F7d zQSod(s4#iS-@5m!w?wVsoBj6uHNj|*?sXseK4i}S9s6ca>HoZgsu1fV*eXiDm0Qhy z^Q$I)>E0u+er*A}Jz4fZTFn0Y(^W)WKVEu$;~al2|J?}L_i2pP@w3i>tTUa**tKYf z$E6&z-PL=3Rn{3ucubmhdg+pi^!iX!?i*IIuQ$KfpMF{a9HbA*nR?%HOuvy^+oU<|VRU`T4=ar8m#< j-@W+)m|7_W3X%UA^iF9oZep&!0W!+d)z4*}Q$iB}<*;wy literal 0 HcmV?d00001 From e09a589c2741d653c192f0dd07114d3a37c0eac5 Mon Sep 17 00:00:00 2001 From: Andrew Marheine Date: Fri, 15 Oct 2021 12:49:09 -0500 Subject: [PATCH 18/18] 1 - Adult Eidolon Wyrm spin speed adjustment. --- NPCs/Abyss/EidolonWyrmHead.cs | 32 ++++++++++++++++++++++++++++++- NPCs/Abyss/EidolonWyrmHeadHuge.cs | 4 ++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/NPCs/Abyss/EidolonWyrmHead.cs b/NPCs/Abyss/EidolonWyrmHead.cs index 8cce28d27a..496aaa8ed9 100644 --- a/NPCs/Abyss/EidolonWyrmHead.cs +++ b/NPCs/Abyss/EidolonWyrmHead.cs @@ -411,7 +411,37 @@ namespace CalamityMod.NPCs.Abyss npc.rotation = (float)System.Math.Atan2((double)npc.velocity.Y, (double)npc.velocity.X) + 1.57f; } - public override bool? CanBeHitByProjectile(Projectile projectile) + public override bool CanHitPlayer(Player target, ref int cooldownSlot) + { + bool adultWyrmAlive = false; + if (CalamityGlobalNPC.adultEidolonWyrmHead != -1) + { + if (Main.npc[CalamityGlobalNPC.adultEidolonWyrmHead].active) + adultWyrmAlive = true; + } + + if (adultWyrmAlive) + cooldownSlot = 1; + + Rectangle targetHitbox = target.Hitbox; + + float dist1 = Vector2.Distance(npc.Center, targetHitbox.TopLeft()); + float dist2 = Vector2.Distance(npc.Center, targetHitbox.TopRight()); + float dist3 = Vector2.Distance(npc.Center, targetHitbox.BottomLeft()); + float dist4 = Vector2.Distance(npc.Center, targetHitbox.BottomRight()); + + float minDist = dist1; + if (dist2 < minDist) + minDist = dist2; + if (dist3 < minDist) + minDist = dist3; + if (dist4 < minDist) + minDist = dist4; + + return minDist <= 40f; + } + + public override bool? CanBeHitByProjectile(Projectile projectile) { if (projectile.minion && !projectile.Calamity().overridesMinionDamagePrevention) { diff --git a/NPCs/Abyss/EidolonWyrmHeadHuge.cs b/NPCs/Abyss/EidolonWyrmHeadHuge.cs index 8d64f1014f..291e425641 100644 --- a/NPCs/Abyss/EidolonWyrmHeadHuge.cs +++ b/NPCs/Abyss/EidolonWyrmHeadHuge.cs @@ -894,7 +894,7 @@ namespace CalamityMod.NPCs.Abyss { calamityGlobalNPC.newAI[2] += 1f; - float spinVelocityDivisor = targetDownDeep ? 180f : 120f; + float spinVelocityDivisor = targetDownDeep ? 120f : 90f; if (rotationDirection == 0) { // Set spin direction @@ -1172,7 +1172,7 @@ namespace CalamityMod.NPCs.Abyss if ((destination - npc.Center).Length() < spinLocationDistance || calamityGlobalNPC.newAI[1] > 0f) { calamityGlobalNPC.newAI[1] += 1f; - float spinVelocityDivisor = targetDownDeep ? 180f : 120f; + float spinVelocityDivisor = targetDownDeep ? 90f : 60f; if (rotationDirection == 0) { // Set spin direction