diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index fe3f2d0f81..deb3436c94 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -22,11 +22,11 @@ namespace CalamityMod.Items.Weapons.Melee public float Charge = 0f; public override bool CloneNewInstances => true; - public static float NeedleDamageMultiplier = 0.5f; //Damage on the non-homing needle projectile + public static float NeedleDamageMultiplier = 0.7f; //Damage on the non-homing needle projectile public static float MaxThrowReach = 620; public static float snapDamageMultiplier = 1.3f; //Extra damage from making the scissors snap - public static float chargeDamageMultiplier = 1.6f; //Extra damage from charge + public static float chargeDamageMultiplier = 1.3f; //Extra damage from charge public static float chainDamageMultiplier = 0.1f; public static int DashIframes = 10; @@ -38,7 +38,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder public static float SwirlBoltAmount = 7f; //The amount of cosmic bolts produced during hte swirl attack - public static float SwirlBoltDamageMultiplier = 0.8f; //This is the damage multiplier for ALL THE BOLTS: Aka, said damage multiplier is divided by the amount of bolts in a swirl and the full damage multiplier is gotten if you hit all the bolts + public static float SwirlBoltDamageMultiplier = 1.5f; //This is the damage multiplier for ALL THE BOLTS: Aka, said damage multiplier is divided by the amount of bolts in a swirl and the full damage multiplier is gotten if you hit all the bolts const string ComboTooltip = "Performs a combo of swings, alternating between narrow and wide swings and throwing the blade out every 5 swings\n" + "The thrown blade is held in place by constellations and will follow your cursor\n" + @@ -80,7 +80,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = item.height = 136; - item.damage = 2022; + item.damage = 2222; item.melee = true; item.noMelee = true; item.noUseGraphic = true; diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index d81de985db..8219470afc 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -23,7 +23,7 @@ namespace CalamityMod.Items.Weapons.Melee public const float ComboLenght = 4f; //How many regular swings before the long throw happens public static float snapDamageMultiplier = 1.3f; //Extra damage from making the scissors snap - public static float chargeDamageMultiplier = 1.6f; //Extra damage from charge + public static float chargeDamageMultiplier = 1.3f; //Extra damage from charge public static float needleDamageMultiplier = 0.8f; //Damage multiplier for non-homing needle projectile public static float glassStarDamageMultiplier = 0.2f; //Damage multiplier for the homing glass stars (4 glass stars per shot) diff --git a/Items/Weapons/Melee/BiomeBlade.cs b/Items/Weapons/Melee/BiomeBlade.cs index 869047e6e4..2e689917f1 100644 --- a/Items/Weapons/Melee/BiomeBlade.cs +++ b/Items/Weapons/Melee/BiomeBlade.cs @@ -25,25 +25,28 @@ namespace CalamityMod.Items.Weapons.Melee public int CanLunge = 1; #region stats - public static int BaseDamage = 50; + public static int BaseDamage = 47; - public static int DefaultAttunement_BaseDamage = 55; + public static int DefaultAttunement_BaseDamage = 47; - public static int EvilAttunement_BaseDamage = 102; - public static int EvilAttunement_Lifesteal = 3; + public static int EvilAttunement_BaseDamage = 63; + public static int EvilAttunement_Lifesteal = 2; public static int EvilAttunement_BounceIFrames = 10; public static int ColdAttunement_BaseDamage = 58; - public static float ColdAttunement_SecondSwingBoost = 1.2f; - public static float ColdAttunement_ThirdSwingBoost = 1.6f; + public static float ColdAttunement_SecondSwingBoost = 1.14f; + public static float ColdAttunement_ThirdSwingBoost = 1.4f; public static int HotAttunement_BaseDamage = 70; + public static int HotAttunement_FullChargeDamage = 105; public static int HotAttunement_ShredIFrames = 8; public static int HotAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int HotAttunement_LocalIFramesCharged = 16; + public static float HotAttunement_ShredDecayRate = 0.7f; //How much charge is lost per frame. - public static int TropicalAttunement_BaseDamage = 55; - public static float TropicalAttunement_ChainDamageReduction = 0.5f; + public static int TropicalAttunement_BaseDamage = 65; + public static float TropicalAttunement_ChainDamageReduction = 0.6f; + public static float TropicalAttunement_SweetSpotDamageMultiplier = 1.2f; //It also crits, so be mindful of that public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 #endregion diff --git a/Items/Weapons/Melee/FourSeasonsGalaxia.cs b/Items/Weapons/Melee/FourSeasonsGalaxia.cs index d226a86501..dac757ddb6 100644 --- a/Items/Weapons/Melee/FourSeasonsGalaxia.cs +++ b/Items/Weapons/Melee/FourSeasonsGalaxia.cs @@ -43,6 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee public static float PhoenixAttunement_ThrowDamageBoost = 3.6f; public static int PolarisAttunement_BaseDamage = 1200; + public static int PolarisAttunement_FullChargeDamage = 1900; public static int PolarisAttunement_ShredIFrames = 10; public static int PolarisAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int PolarisAttunement_LocalIFramesCharged = 16; @@ -50,6 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int PolarisAttunement_SlashBoltsDamage = 1300; public static int PolarisAttunement_SlashIFrames = 60; public static float PolarisAttunement_ShotDamageBoost = 2f; //The shots fired if the dash connects + public static float PolarisAttunement_ShredChargeupGain = 1f; //How much charge is gainted per second. public static int AndromedaAttunement_BaseDamage = 3500; public static int AndromedaAttunement_DashHitIFrames = 60; diff --git a/Items/Weapons/Melee/OmegaBiomeBlade.cs b/Items/Weapons/Melee/OmegaBiomeBlade.cs index 1731e792af..268816e208 100644 --- a/Items/Weapons/Melee/OmegaBiomeBlade.cs +++ b/Items/Weapons/Melee/OmegaBiomeBlade.cs @@ -43,6 +43,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunement_BaseDamage = 500; + public static int SuperPogoAttunement_FullChargeDamage = 750; public static int SuperPogoAttunement_ShredIFrames = 10; public static int SuperPogoAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int SuperPogoAttunement_LocalIFramesCharged = 16; @@ -50,6 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee public static int SuperPogoAttunementSlashLifesteal = 6; public static int SuperPogoAttunement_SlashIFrames = 60; public static float SuperPogoAttunement_ShotDamageBoost = 2f; + public static float SuperPogoAttunement_ShredDecayRate = 0.7f;//How much charge is lost per frame. public static int SuperPogoAttunement_PassiveLifeSteal = 10; diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index 7e758f60cb..9bb0427cb4 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee { public float Combo = 1f; public float Charge = 0f; - public static float chargeDamageMultiplier = 1.75f; //Extra damage from charge + public static float chargeDamageMultiplier = 1.45f; //Extra damage from charge public static float beamDamageMultiplier = 0.8f; //Damage multiplier for the charged shots (remember it applies ontop of the charge damage multiplied public static float glassStarDamageMultiplier = 0.2f; //Damage multiplier for the glass stars it shoots (Shoots 3x glass stars when not charged, shoots 2x glass stars + one beam when charged) @@ -51,7 +51,7 @@ namespace CalamityMod.Items.Weapons.Melee public override void SetDefaults() { item.width = item.height = 72; - item.damage = 148; + item.damage = 188; item.melee = true; item.noUseGraphic = true; item.noMelee = true; diff --git a/Items/Weapons/Melee/TrueBiomeBlade.cs b/Items/Weapons/Melee/TrueBiomeBlade.cs index 23faaf704c..dbdcd862ed 100644 --- a/Items/Weapons/Melee/TrueBiomeBlade.cs +++ b/Items/Weapons/Melee/TrueBiomeBlade.cs @@ -33,26 +33,29 @@ namespace CalamityMod.Items.Weapons.Melee public static int DefaultAttunement_BeamTime = 60; public static float DefaultAttunement_HomingAngle = MathHelper.PiOver4; - public static int EvilAttunement_BaseDamage = 320; - public static int EvilAttunement_Lifesteal = 4; + public static int EvilAttunement_BaseDamage = 195; + public static int EvilAttunement_Lifesteal = 2; public static int EvilAttunement_BounceIFrames = 10; public static float EvilAttunement_SlashDamageBoost = 3f; public static int EvilAttunement_SlashIFrames = 60; public static int ColdAttunement_BaseDamage = 200; - public static float ColdAttunement_SecondSwingBoost = 1.2f; - public static float ColdAttunement_ThirdSwingBoost = 1.6f; + public static float ColdAttunement_SecondSwingBoost = 1.15f; + public static float ColdAttunement_ThirdSwingBoost = 1.45f; public static float ColdAttunement_MistDamageReduction = 0.04f; public static int HotAttunement_BaseDamage = 320; + public static int HotAttunement_FullChargeDamage = 480; public static int HotAttunement_ShredIFrames = 8; public static float HotAttunement_ShotDamageBoost = 3.5f; public static int HotAttunement_LocalIFrames = 30; //Be warned its got one extra update so all the iframes should be divided in 2 public static int HotAttunement_LocalIFramesCharged = 16; + public static float HotAttunement_ShredDecayRate = 0.7f; //How much charge is lost per frame. - public static int TropicalAttunement_BaseDamage = 160; - public static float TropicalAttunement_ChainDamageReduction = 0.5f; + public static int TropicalAttunement_BaseDamage = 190; + public static float TropicalAttunement_ChainDamageReduction = 0.6f; public static float TropicalAttunement_VineDamageReduction = 0.5f; + public static float TropicalAttunement_SweetSpotDamageMultiplier = 1.2f; //It also crits, so be mindful of that public static int TropicalAttunement_LocalIFrames = 60; //Be warned its got 2 extra updates so all the iframes should be divided in 3 public static int HolyAttunement_BaseDamage = 160; diff --git a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs index 203b2aaf60..e5675eba2e 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_AridGrandeur.cs @@ -151,12 +151,35 @@ namespace CalamityMod.Projectiles.Melee Owner.itemTime = 2; Owner.itemAnimation = 2; - Shred -= 0.5f; + Shred -= BiomeBlade.HotAttunement_ShredDecayRate; PogoCooldown--; if (projectile.timeLeft <= 2) projectile.timeLeft = 2; } + //Since the iframes vary, adjust the damage to be consistent no matter the iframes. The true scaling happens between the BaseDamage and the FulLChargeDamage + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + float deviationFromBaseDamage = damage / (float)BiomeBlade.HotAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(BiomeBlade.HotAttunement_BaseDamage * deviationFromBaseDamage, BiomeBlade.HotAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)BiomeBlade.HotAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + float deviationFromBaseDamage = damage / (float)BiomeBlade.HotAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(BiomeBlade.HotAttunement_BaseDamage * deviationFromBaseDamage, BiomeBlade.HotAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)BiomeBlade.HotAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(target); public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(target); diff --git a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs index db33bf30e4..97bb62a479 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_DecaysRetort.cs @@ -103,13 +103,17 @@ namespace CalamityMod.Projectiles.Melee projectile.netUpdate = true; projectile.netSpam = 0; + + if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) + return; + + if (!cannotLifesteal) //trolled { Owner.statLife += BiomeBlade.EvilAttunement_Lifesteal; Owner.HealEffect(BiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck } - if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) - return; + // Bounce off float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground diff --git a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs index 34e83fd530..ac2ac9f009 100644 --- a/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs +++ b/Projectiles/Melee/BrokenBiomeBlade_GrovetendersTouch.cs @@ -81,11 +81,12 @@ namespace CalamityMod.Projectiles.Melee base.ModifyHitNPC(target, ref damage, ref knockback, ref crit, ref hitDirection); Vector2 projectileHalfLenght = (projectile.Size / 2f) * projectile.rotation.ToRotationVector2(); float collisionPoint = 0; - //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit + //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit & get some bonus damage if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) { if (SnapCoyoteTime > 0f) { + damage = (int)(damage * BiomeBlade.TropicalAttunement_SweetSpotDamageMultiplier); crit = true; for (int i = 0; i < 3; i++) { diff --git a/Projectiles/Melee/Galaxia_PolarisGaze.cs b/Projectiles/Melee/Galaxia_PolarisGaze.cs index 069ec35eaf..1c96eeddc2 100644 --- a/Projectiles/Melee/Galaxia_PolarisGaze.cs +++ b/Projectiles/Melee/Galaxia_PolarisGaze.cs @@ -233,11 +233,36 @@ namespace CalamityMod.Projectiles.Melee } - Shred += 1; + Shred += FourSeasonsGalaxia.PolarisAttunement_ShredChargeupGain; HitChargeCooldown--; projectile.timeLeft = 2; } + //Since the iframes vary, adjust the damage to be consistent no matter the iframes. The true scaling happens between the BaseDamage and the FulLChargeDamage + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + float deviationFromBaseDamage = damage / (float)FourSeasonsGalaxia.PolarisAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(FourSeasonsGalaxia.PolarisAttunement_BaseDamage * deviationFromBaseDamage, FourSeasonsGalaxia.PolarisAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)FourSeasonsGalaxia.PolarisAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + float deviationFromBaseDamage = damage / (float)FourSeasonsGalaxia.PolarisAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(FourSeasonsGalaxia.PolarisAttunement_BaseDamage * deviationFromBaseDamage, FourSeasonsGalaxia.PolarisAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)FourSeasonsGalaxia.PolarisAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(); public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs index c2d5efb1a0..75708098d1 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueAridGrandeur.cs @@ -167,13 +167,36 @@ namespace CalamityMod.Projectiles.Melee ChargeSoundCooldown--; } - Shred -= 0.5f; + Shred -= TrueBiomeBlade.HotAttunement_ShredDecayRate; PogoCooldown--; BounceTime--; if (projectile.timeLeft <= 2) projectile.timeLeft = 2; } + //Since the iframes vary, adjust the damage to be consistent no matter the iframes. The true scaling happens between the BaseDamage and the FulLChargeDamage + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + float deviationFromBaseDamage = damage / (float)TrueBiomeBlade.HotAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(TrueBiomeBlade.HotAttunement_BaseDamage * deviationFromBaseDamage, TrueBiomeBlade.HotAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)TrueBiomeBlade.HotAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + float deviationFromBaseDamage = damage / (float)TrueBiomeBlade.HotAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(TrueBiomeBlade.HotAttunement_BaseDamage * deviationFromBaseDamage, TrueBiomeBlade.HotAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)TrueBiomeBlade.HotAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(); public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs index 46e010cd88..1a39682066 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueDecaysRetort.cs @@ -152,13 +152,15 @@ namespace CalamityMod.Projectiles.Melee projectile.netUpdate = true; projectile.netSpam = 0; + if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) + return; + if (!cannotLifesteal) //trolled { Owner.statLife += TrueBiomeBlade.EvilAttunement_Lifesteal; Owner.HealEffect(TrueBiomeBlade.EvilAttunement_Lifesteal); //Idk if its too much or what but at the same time its close range as fuck } - if (Main.myPlayer != Owner.whoAmI || CanBounce == 0f) - return; + // Bounce off float bounceStrength = Math.Max((LungeSpeed / 2f), Owner.velocity.Length()); bounceStrength *= Owner.velocity.Y == 0 ? 0.2f : 1f; //Reduce the bounce if the player is on the ground diff --git a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs index ff1c46dbec..ae3f9b4088 100644 --- a/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs +++ b/Projectiles/Melee/MendedBiomeBlade_TrueGrovetendersTouch.cs @@ -91,11 +91,12 @@ namespace CalamityMod.Projectiles.Melee { Vector2 projectileHalfLenght = 85f * projectile.rotation.ToRotationVector2(); float collisionPoint = 0; - //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit + //If you hit the enemy during the coyote time with the blade of the whip, guarantee a crit & get some bonus damage if (Collision.CheckAABBvLineCollision(target.Hitbox.TopLeft(), target.Hitbox.Size(), projectile.Center - projectileHalfLenght, projectile.Center + projectileHalfLenght, 32, ref collisionPoint)) { if (SnapCoyoteTime > 0f) { + damage = (int)(damage * TrueBiomeBlade.TropicalAttunement_SweetSpotDamageMultiplier); crit = true; for (int i = 0; i < 4; i++) { diff --git a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs index 9d310bf8a2..1d038f058b 100644 --- a/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs +++ b/Projectiles/Melee/TrueBiomeBlade_SanguineFury.cs @@ -217,13 +217,40 @@ namespace CalamityMod.Projectiles.Melee ChargeSoundCooldown--; } - Shred -= 0.5f; + Shred -= OmegaBiomeBlade.SuperPogoAttunement_ShredDecayRate; PogoCooldown--; BounceTime--; if (projectile.timeLeft <= 2) projectile.timeLeft = 2; } + //Since the iframes vary, adjust the damage to be consistent no matter the iframes. The true scaling happens between the BaseDamage and the FulLChargeDamage + public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) + { + if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) + sword.OnHitProc = true; + + float deviationFromBaseDamage = damage / (float)OmegaBiomeBlade.SuperPogoAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(OmegaBiomeBlade.SuperPogoAttunement_BaseDamage * deviationFromBaseDamage, OmegaBiomeBlade.SuperPogoAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + + public override void ModifyHitPlayer(Player target, ref int damage, ref bool crit) + { + float deviationFromBaseDamage = damage / (float)OmegaBiomeBlade.SuperPogoAttunement_BaseDamage; + float currentDamage = (int)(MathHelper.Lerp(OmegaBiomeBlade.SuperPogoAttunement_BaseDamage * deviationFromBaseDamage, OmegaBiomeBlade.SuperPogoAttunement_FullChargeDamage * deviationFromBaseDamage, ShredRatio)); + + //Adjust the damage to make it constant based on the local iframes + float damageReduction = projectile.localNPCHitCooldown / (float)OmegaBiomeBlade.SuperPogoAttunement_LocalIFrames; + + damage = (int)(currentDamage * damageReduction); + } + + public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) => ShredTarget(); public override void OnHitPvp(Player target, int damage, bool crit) => ShredTarget(); @@ -259,12 +286,6 @@ namespace CalamityMod.Projectiles.Melee Owner.Calamity().LungingDown = false; } - public override void ModifyHitNPC(NPC target, ref int damage, ref float knockback, ref bool crit, ref int hitDirection) - { - if (Owner.HeldItem.modItem is OmegaBiomeBlade sword && Main.rand.NextFloat() <= OmegaBiomeBlade.SuperPogoAttunement_ShredderProc) - sword.OnHitProc = true; - } - public override bool PreDraw(SpriteBatch spriteBatch, Color lightColor) { Texture2D handle = GetTexture("CalamityMod/Items/Weapons/Melee/OmegaBiomeBlade");