From b2282c72aea21121d956cd88aae943da1255ea99 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 24 Apr 2026 20:14:20 -0500 Subject: [PATCH 1/4] Fixed Lemon 'nade line not getting Rogue attack speed --- Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs | 7 +++---- Projectiles/Melee/EvilSmasherProjectile.cs | 2 +- Projectiles/Melee/LucreciaHoldout.cs | 2 +- Projectiles/Melee/MawOfInfinityHoldout.cs | 2 +- Projectiles/Melee/MirrorBladeProjectile.cs | 2 +- Projectiles/Melee/Shortswords/GalileoGladiusProj.cs | 2 +- Projectiles/Melee/Spears/GildedProboscisProj.cs | 2 +- Projectiles/Rogue/DuststormInABottleHoldout.cs | 2 +- Projectiles/Rogue/LemonNadeHoldout.cs | 2 +- Projectiles/Rogue/SealedSingularityHoldout.cs | 2 +- Projectiles/Rogue/SupernovaHoldout.cs | 2 +- 11 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs index 344bf53445..2fd37b54b5 100644 --- a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using CalamityMod.Graphics.Primitives; -using CalamityMod.NPCs; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using ReLogic.Content; @@ -117,7 +116,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles /// Whether or not this should get melee speed bonuses /// Defaults to TRUE /// - public virtual bool useMeleeSpeed { get; set; } = true; + public virtual bool useAttackSpeed { get; set; } = true; /// /// Whether or not this should get melee size bonuses (Titan Glove) @@ -333,9 +332,9 @@ namespace CalamityMod.Projectiles.BaseProjectiles StartupTime *= Projectile.MaxUpdates; CooldownTime *= Projectile.MaxUpdates; swingTime *= Projectile.MaxUpdates; - if (useMeleeSpeed) + if (useAttackSpeed) { - var speed = Main.player[Projectile.owner].GetAttackSpeed(); + var speed = Main.player[Projectile.owner].GetTotalAttackSpeed(Projectile.DamageType); if (speed > 3f) speed = 3f; diff --git a/Projectiles/Melee/EvilSmasherProjectile.cs b/Projectiles/Melee/EvilSmasherProjectile.cs index 93f0a4c02a..5af5c7e264 100644 --- a/Projectiles/Melee/EvilSmasherProjectile.cs +++ b/Projectiles/Melee/EvilSmasherProjectile.cs @@ -24,7 +24,7 @@ namespace CalamityMod.Projectiles.Melee public override int OffsetDistance => 50; public override int CooldownTime { get; set; } public override bool AlternateSwings => false; - public override bool useMeleeSpeed => false; + public override bool useAttackSpeed => false; public override SoundStyle? UseSound => SoundID.DD2_MonkStaffSwing with {Volume = 1f}; bool hasSmashedTile = false; diff --git a/Projectiles/Melee/LucreciaHoldout.cs b/Projectiles/Melee/LucreciaHoldout.cs index 222b21699d..c89e800233 100644 --- a/Projectiles/Melee/LucreciaHoldout.cs +++ b/Projectiles/Melee/LucreciaHoldout.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Melee public class LucreciaHoldout : BaseSwordHoldoutProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override bool useMeleeSpeed => true; + public override bool useAttackSpeed => true; public override bool useMeleeSize => false; public override int swingWidth => 310; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; diff --git a/Projectiles/Melee/MawOfInfinityHoldout.cs b/Projectiles/Melee/MawOfInfinityHoldout.cs index cf7bf97d01..48323eefee 100644 --- a/Projectiles/Melee/MawOfInfinityHoldout.cs +++ b/Projectiles/Melee/MawOfInfinityHoldout.cs @@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Melee public class MawOfInfinityHoldout : BaseSwordHoldoutProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override bool useMeleeSpeed => true; + public override bool useAttackSpeed => true; public override bool useMeleeSize => true; public override int swingWidth => 270; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; diff --git a/Projectiles/Melee/MirrorBladeProjectile.cs b/Projectiles/Melee/MirrorBladeProjectile.cs index 56cca4d246..fad5e53fa5 100644 --- a/Projectiles/Melee/MirrorBladeProjectile.cs +++ b/Projectiles/Melee/MirrorBladeProjectile.cs @@ -29,7 +29,7 @@ namespace CalamityMod.Projectiles.Melee public override bool AlternateSwings => false; public bool SpawnShards = true; - public override bool useMeleeSpeed => true; + public override bool useAttackSpeed => true; public override int swingTime { get; set; } = 8; diff --git a/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs b/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs index 4f12c74fe9..21b08711b2 100644 --- a/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs +++ b/Projectiles/Melee/Shortswords/GalileoGladiusProj.cs @@ -30,7 +30,7 @@ namespace CalamityMod.Projectiles.Melee.Shortswords public override bool drawSwordTrail => false; public override bool AlternateSwings => false; - public override bool useMeleeSpeed => true; + public override bool useAttackSpeed => true; public override int swingTime { get; set; } = 8; diff --git a/Projectiles/Melee/Spears/GildedProboscisProj.cs b/Projectiles/Melee/Spears/GildedProboscisProj.cs index 5f67f8f6be..1293a2915c 100644 --- a/Projectiles/Melee/Spears/GildedProboscisProj.cs +++ b/Projectiles/Melee/Spears/GildedProboscisProj.cs @@ -15,7 +15,7 @@ namespace CalamityMod.Projectiles.Melee.Spears public class GildedProboscisProj : BaseSwordHoldoutProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; - public override bool useMeleeSpeed => false; + public override bool useAttackSpeed => false; public override bool useMeleeSize => false; public override int swingWidth => 360; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; diff --git a/Projectiles/Rogue/DuststormInABottleHoldout.cs b/Projectiles/Rogue/DuststormInABottleHoldout.cs index c4a3b37fcc..194a525056 100644 --- a/Projectiles/Rogue/DuststormInABottleHoldout.cs +++ b/Projectiles/Rogue/DuststormInABottleHoldout.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/DuststormInABottle"; - public override bool useMeleeSpeed => false; + public override bool useAttackSpeed => true; public override bool useMeleeSize => false; public override int swingWidth => 180; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; diff --git a/Projectiles/Rogue/LemonNadeHoldout.cs b/Projectiles/Rogue/LemonNadeHoldout.cs index 97d11361fc..29dc08f584 100644 --- a/Projectiles/Rogue/LemonNadeHoldout.cs +++ b/Projectiles/Rogue/LemonNadeHoldout.cs @@ -14,7 +14,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/LemonNade"; - public override bool useMeleeSpeed => false; + public override bool useAttackSpeed => true; public override bool useMeleeSize => false; public override int swingWidth => 180; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; diff --git a/Projectiles/Rogue/SealedSingularityHoldout.cs b/Projectiles/Rogue/SealedSingularityHoldout.cs index 3cd095f28c..69a975c80d 100644 --- a/Projectiles/Rogue/SealedSingularityHoldout.cs +++ b/Projectiles/Rogue/SealedSingularityHoldout.cs @@ -11,7 +11,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/SealedSingularity"; - public override bool useMeleeSpeed => false; + public override bool useAttackSpeed => true; public override bool useMeleeSize => false; public override int swingWidth => 180; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; diff --git a/Projectiles/Rogue/SupernovaHoldout.cs b/Projectiles/Rogue/SupernovaHoldout.cs index 8236645ea8..534df7e545 100644 --- a/Projectiles/Rogue/SupernovaHoldout.cs +++ b/Projectiles/Rogue/SupernovaHoldout.cs @@ -13,7 +13,7 @@ namespace CalamityMod.Projectiles.Rogue { public new string LocalizationCategory => "Projectiles.Rogue"; public override string Texture => "CalamityMod/Items/Weapons/Rogue/Supernova"; - public override bool useMeleeSpeed => false; + public override bool useAttackSpeed => true; public override bool useMeleeSize => false; public override int swingWidth => 180; public override Item BaseItem => ModContent.GetModItem(ModContent.ItemType()).Item; From dfdd83a1dbf944da80a69d3f4dc9d4dd57fe087a Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Fri, 24 Apr 2026 20:16:08 -0500 Subject: [PATCH 2/4] Fixed Profaned Partisan bug when killing a target while impaled --- Projectiles/Rogue/ProfanedPartisanProj.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projectiles/Rogue/ProfanedPartisanProj.cs b/Projectiles/Rogue/ProfanedPartisanProj.cs index c223a5504f..dbdfc2fb40 100644 --- a/Projectiles/Rogue/ProfanedPartisanProj.cs +++ b/Projectiles/Rogue/ProfanedPartisanProj.cs @@ -65,8 +65,8 @@ namespace CalamityMod.Projectiles.Rogue if (!Main.npc[(int)StuckEnemyID - 1].active) { StuckEnemyID = 0; - Projectile.velocity = -Vector2.UnitY.RotatedByRandom(0.25f) * Main.rand.NextFloat(0, 1f); Projectile.tileCollide = true; + Projectile.timeLeft = ExplodeTime; return; } Projectile.Center = Main.npc[(int)StuckEnemyID - 1].Center + Vector2.UnitX.RotatedBy(StuckEnemyRotation) * StuckEnemyDistance; From 4afd970df7268b942b9335923715bdbb0ad7900f Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Sat, 2 May 2026 11:17:16 -0500 Subject: [PATCH 3/4] evolution mirror blade synergy --- CalPlayer/CalamityPlayerHitHurt.cs | 1 + Items/Weapons/Melee/MirrorBlade.cs | 66 ++++++++++--------- ...ods.CalamityMod.Items.Weapons.Summon.hjson | 35 ++-------- Projectiles/Melee/MirrorBlast.cs | 66 ++++++++++++++----- 4 files changed, 92 insertions(+), 76 deletions(-) diff --git a/CalPlayer/CalamityPlayerHitHurt.cs b/CalPlayer/CalamityPlayerHitHurt.cs index 0c6d477f4b..ecd1322d37 100644 --- a/CalPlayer/CalamityPlayerHitHurt.cs +++ b/CalPlayer/CalamityPlayerHitHurt.cs @@ -1529,6 +1529,7 @@ namespace CalamityMod.CalPlayer Player.AddCooldown(GlobalDodge.ID, cooldownDuration); else Player.AddCooldown(GlobalDodge.ID, cooldownDuration, true, IconToUse); + Player.SetImmuneTimeForAllTypes(Player.longInvince ? 120 : 80); } //Dodge activation order is as follows: diff --git a/Items/Weapons/Melee/MirrorBlade.cs b/Items/Weapons/Melee/MirrorBlade.cs index 3152bb7eb5..581bcc23f6 100644 --- a/Items/Weapons/Melee/MirrorBlade.cs +++ b/Items/Weapons/Melee/MirrorBlade.cs @@ -1,5 +1,4 @@ -using CalamityMod.Items.Weapons.Summon; -using CalamityMod.Projectiles.BaseProjectiles; +using CalamityMod.Projectiles.BaseProjectiles; using CalamityMod.Projectiles.Boss; using CalamityMod.Projectiles.Melee; using CalamityMod.Rarities; @@ -92,33 +91,9 @@ namespace CalamityMod.Items.Weapons.Melee { if (proj2.active && proj2.type == ModContent.ProjectileType() && proj2.owner == player.whoAmI && (proj2.ModProjectile as MirrorBlast).isShard) { - proj2.damage = (int)(proj2.damage * (shardCount >= 10 ? 3f : 2f)); - (proj2.ModProjectile as MirrorBlast).shardShield = 0; - (proj2.ModProjectile as MirrorBlast).shardNum = 11; - proj2.netUpdate = true; - } - } - reflectTimer = 0; - return; - } else - if (proj.hostile && proj.damage > 0 && proj.Hitbox.IntersectsConeSlowMoreAccurate(player.Center, coneLength, coneRotation, maximumAngle)) - { - if (shardCount > 0) - { - SoundEngine.PlaySound(SeekingScorcher.LightShatterSound, player.Center); - SoundEngine.PlaySound(SoundID.DD2_WitherBeastDeath, player.Center); - } - if (shardCount >= 10) - { - player.SetImmuneTimeForAllTypes(player.longInvince ? 60 : 30); - } - proj.Calamity().multiplicativeDR += shardCount / 10f; - proj.Calamity().multiplicativeDRTimer = 60; - foreach (var proj2 in Main.projectile) - { - if (proj2.active && proj2.type == ModContent.ProjectileType() && proj2.owner == player.whoAmI && (proj2.ModProjectile as MirrorBlast).isShard) - { - proj2.damage = (int)(proj2.damage * (shardCount >= 10 ? 3f : 2f)); + //Don't amplify Evolution shards + if (proj2.DamageType != DamageClass.Generic) + proj2.damage = (int)(proj2.damage * (shardCount >= 10 ? 3f : 2f)); (proj2.ModProjectile as MirrorBlast).shardShield = 0; (proj2.ModProjectile as MirrorBlast).shardNum = 11; proj2.netUpdate = true; @@ -127,6 +102,35 @@ namespace CalamityMod.Items.Weapons.Melee reflectTimer = 0; return; } + else + if (proj.hostile && proj.damage > 0 && proj.Hitbox.IntersectsConeSlowMoreAccurate(player.Center, coneLength, coneRotation, maximumAngle)) + { + if (shardCount > 0) + { + SoundEngine.PlaySound(SeekingScorcher.LightShatterSound, player.Center); + SoundEngine.PlaySound(SoundID.DD2_WitherBeastDeath, player.Center); + } + if (shardCount >= 10) + { + player.SetImmuneTimeForAllTypes(player.longInvince ? 60 : 30); + } + proj.Calamity().multiplicativeDR += shardCount / 10f; + proj.Calamity().multiplicativeDRTimer = 60; + foreach (var proj2 in Main.projectile) + { + if (proj2.active && proj2.type == ModContent.ProjectileType() && proj2.owner == player.whoAmI && (proj2.ModProjectile as MirrorBlast).isShard) + { + //Don't amplify Evolution shards + if (proj2.DamageType != DamageClass.Generic) + proj2.damage = (int)(proj2.damage * (shardCount >= 10 ? 3f : 2f)); + (proj2.ModProjectile as MirrorBlast).shardShield = 0; + (proj2.ModProjectile as MirrorBlast).shardNum = 11; + proj2.netUpdate = true; + } + } + reflectTimer = 0; + return; + } } } reflectTimer--; @@ -149,9 +153,9 @@ namespace CalamityMod.Items.Weapons.Melee hasShard = true; } } - + if (!alreadyReflecting && hasShard) - SoundEngine.PlaySound(SoundID.DD2_EtherianPortalSpawnEnemy,player.Center); + SoundEngine.PlaySound(SoundID.DD2_EtherianPortalSpawnEnemy, player.Center); return false; } return base.Shoot(player, source, position, velocity, type, damage, knockback); diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson index ff140ef3a8..a3f4cfa7b6 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Summon.hjson @@ -223,10 +223,7 @@ CosmicViperEngine: { Cosmilamp: { DisplayName: Cosmilamp - Tooltip: - ''' - Summons a cosmic lantern above your head to fight for you - ''' + Tooltip: Summons a cosmic lantern above your head to fight for you } CrimslimeStaff: { @@ -352,10 +349,7 @@ EndoHydraStaff: { EntropysVigil: { DisplayName: Entropy's Vigil - Tooltip: - ''' - Summons a mini Calamitas Clone and her brothers to protect you - ''' + Tooltip: Summons a mini Calamitas Clone and her brothers to protect you } EtherealSubjugator: { @@ -394,10 +388,7 @@ FleshOfInfidelity: { FlowersOfMortality: { DisplayName: Flowers of Mortality - Tooltip: - ''' - Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] - ''' + Tooltip: Summons five rainbow flowers over your head that inflict [cbuff:CalamityMod/ElementalMix] } ForgottenApexWand: { @@ -695,10 +686,7 @@ SeashineHilt: { ShellfishStaff: { DisplayName: Shellfish Staff - Tooltip: - ''' - Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] - ''' + Tooltip: Summons a shellfish to latch onto enemies and inflict [cbuff:CalamityMod/ShellfishClaps] } Sirius: { @@ -901,18 +889,12 @@ VoidEaterMarionette: { WarloksMoonFist: { DisplayName: Warloks' Moon Fist - Tooltip: - ''' - Summons a celestial fist to punch enemies for you - ''' + Tooltip: Summons a celestial fist to punch enemies for you } WitherBlossomsStaff: { DisplayName: Wither Blossoms Staff - Tooltip: - ''' - Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head - ''' + Tooltip: Summons four decaying [cbuff:CalamityMod/Plague] flowers over your head } WulfrumController: { @@ -929,8 +911,5 @@ WulfrumController: { YharonsKindleStaff: { DisplayName: Yharon's Kindle Staff - Tooltip: - ''' - Summons a fiery draconid to fight for you - ''' + Tooltip: Summons a fiery draconid to fight for you } diff --git a/Projectiles/Melee/MirrorBlast.cs b/Projectiles/Melee/MirrorBlast.cs index 276bc0972a..4f5895fc64 100644 --- a/Projectiles/Melee/MirrorBlast.cs +++ b/Projectiles/Melee/MirrorBlast.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.IO; +using CalamityMod.Items.Weapons.Melee; using CalamityMod.Particles; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -71,38 +72,69 @@ namespace CalamityMod.Projectiles.Melee } return base.CanHitNPC(target); } - public override void AI() + + void SpawnLogic() { - player.Calamity().mouseWorldListener = true; - if (!hasSpawned) + Projectile.netUpdate = true; + //This is used when spawned by Evolution. + //Set here instead of on spawn so it all syncs in MP + if (Projectile.ai[0] != 0) { - Projectile.netUpdate = true; - if (Projectile.ai[0] != 0) + //Setting AP so high guarantees we get the full dmg of the projectile + //We also want to guarantee the proj doesn't crit ever + Projectile.ArmorPenetration = 1000; + Projectile.DamageType = DamageClass.Generic; + Projectile.CritChance = 0; + + //When not holding Mirror Blade, shards launch instantly + if (Main.player[Projectile.owner].HeldItem.type != ModContent.ItemType()) { - //This is used when spawned by Evolution. - //Setting AP so high guarantees we get the full dmg of the projectile. - Projectile.ArmorPenetration = 1000; + shardShield = 10; hasSpawned = true; shardShield = 0; isShard = false; Projectile.timeLeft = 1200; Projectile.velocity = Projectile.DirectionTo(player.Center) * -20f; - Projectile.DamageType = DamageClass.Generic; - Projectile.CritChance = 0; return; } - shardNum = player.ownedProjectileCounts[Projectile.type]; - hasSpawned = true; - shardNum = 0; - foreach (var proj in Main.projectile) + //When holding Mirror Blade, the shards orbit the player like the blade shards. + //Evoultion shards insert themselves at the *end* of the shard list. This means they will launch themselves before any Mirror Blade shards are launched + //This is done because Evolution shards don't get the 2/3x dmg from shattering the mirror shield, so they're less valuable to be stored. + else { - if (proj.active && proj.type == ModContent.ProjectileType() && proj.owner == Projectile.owner) + + shardNum = player.ownedProjectileCounts[Projectile.type]; + hasSpawned = true; + shardNum = 0; + foreach (var proj in Main.projectile) { - (proj.ModProjectile as MirrorBlast).shardNum++; - proj.netUpdate = true; + if (proj.active && proj.type == ModContent.ProjectileType() && proj.owner == Projectile.owner && proj.ModProjectile().shardNum > -1) + { + shardNum++; + } } + return; } } + + //If not from The Evolution, run normal spawn logic + shardNum = player.ownedProjectileCounts[Projectile.type]; + hasSpawned = true; + shardNum = 0; + foreach (var proj in Main.projectile) + { + if (proj.active && proj.type == ModContent.ProjectileType() && proj.owner == Projectile.owner) + { + (proj.ModProjectile as MirrorBlast).shardNum++; + proj.netUpdate = true; + } + } + } + public override void AI() + { + player.Calamity().mouseWorldListener = true; + if (!hasSpawned) + SpawnLogic(); if (isShield) { if (shardNum > 10 || Projectile.timeLeft < 2) From 128f3d8a517f6b770c1e74dfd8c538c56537eee4 Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Mon, 4 May 2026 18:59:10 -0500 Subject: [PATCH 4/4] Horrible + Dragon Rage + Ale rebalance - Horrible new stats: -33% damage, +100% size - Ale: 15 -> 25% melee size - Dragon Rage is 15% smaller (counterbalance the 15% boost from titan glove) - Dragon Rage 1075 dmg -> 888 damage - Dragon Rage has pierce falloff, every target hit within each 5 frame window takes 25% less damage (additive). Resets every 5 frames. This ignores armored targets and carries over to the explosion, but not the fireballs - Dragon Rage fireballs 1/8 -> 1/2 damage, 60 -> 120 frame coodlown, no longer needs 10 hits to proc, and now homes in on highest HP target. Is unable to hit NPCs it is not targeting. Has tighter turning speed - BaseSwordHoldout-based projectiles properly get all types of melee scale --- Items/CalamityGlobalItem.cs | 4 +- Items/Weapons/Melee/DragonRage.cs | 2 +- .../Mods.CalamityMod.Items.Accessories.hjson | 2 +- ...Mods.CalamityMod.Items.Weapons.Melee.hjson | 2 +- .../en-US/Mods.CalamityMod.Vanilla.hjson | 2 +- Prefixes/HorribleWeaponPrefix.cs | 4 +- .../BaseSwordHoldoutProjectile.cs | 3 +- Projectiles/Melee/DragonRageFireball.cs | 37 ++++++++++++++++++- Projectiles/Melee/DragonRageStaff.cs | 25 ++++++++----- Utilities/PlayerUtils.cs | 4 +- 10 files changed, 62 insertions(+), 23 deletions(-) diff --git a/Items/CalamityGlobalItem.cs b/Items/CalamityGlobalItem.cs index d5dfbd4fd0..d7a05de04f 100644 --- a/Items/CalamityGlobalItem.cs +++ b/Items/CalamityGlobalItem.cs @@ -938,9 +938,9 @@ namespace CalamityMod.Items { // Xyk 3MARCH2026: Doesn't work on any non use style 1 items currently, Doze will fix it if (item.CountsAsClass() && player.HasBuff(BuffID.Tipsy)) - scale += 0.15f; + scale += 0.25f; if (item.CountsAsClass() && (player.GetModPlayer().HasAlcohol(AlcoholType.Ale) || player.GetModPlayer().HasAlcohol(AlcoholType.Sake))) - scale += 0.15f; + scale += 0.25f; } public override void UpdateArmorSet(Player player, string set) { diff --git a/Items/Weapons/Melee/DragonRage.cs b/Items/Weapons/Melee/DragonRage.cs index 3b7300228c..9b8f4af53d 100644 --- a/Items/Weapons/Melee/DragonRage.cs +++ b/Items/Weapons/Melee/DragonRage.cs @@ -12,7 +12,7 @@ namespace CalamityMod.Items.Weapons.Melee { Item.width = 128; Item.height = 140; - Item.damage = 1075; + Item.damage = 888; Item.knockBack = 7.5f; Item.useAnimation = Item.useTime = 25; Item.DamageType = TrueMeleeNoSpeedDamageClass.Instance; diff --git a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson index cee9d11302..5112a6fa6a 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Accessories.hjson @@ -1041,7 +1041,7 @@ IVDripOnTheRocks: { ''' Empty: Place an alcoholic beverage on this item in your inventory to pour its contents in CurrentAlcoholText: Filled with - SakeAndAleText: Increases melee weapon scale by 15%, but decreases melee speed by 10% + SakeAndAleText: Increases melee weapon scale by 25%, but decreases melee speed by 10% } JellyChargedBattery: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson index c126f312f4..8e88ec30ee 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Melee.hjson @@ -405,7 +405,7 @@ DragonRage: { Tooltip: ''' Twirls a baton that causes explosions of [cbuff:CalamityMod/Dragonfire] on enemy hits - Every ten hits will summon a ring of fireballs + Once every two seconds, hits summon a ring of fireballs that target the enemy with the most health ''' } diff --git a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson index b7856e8b22..a33ed0ebe9 100644 --- a/Localization/en-US/Mods.CalamityMod.Vanilla.hjson +++ b/Localization/en-US/Mods.CalamityMod.Vanilla.hjson @@ -209,7 +209,7 @@ EditedTooltip: { ArcheryPotion: 5% increased arrow damage and 20% increased arrow speed AleSake: ''' - Increases melee weapon scale by 15%, but decreases melee speed by 10% + Increases melee weapon scale by 25%, but decreases melee speed by 10% Counts as an alcohol for Alcohol Poisoning {$Common.AlcoholWarning} ''' diff --git a/Prefixes/HorribleWeaponPrefix.cs b/Prefixes/HorribleWeaponPrefix.cs index bb77ea8798..8484b58f4f 100644 --- a/Prefixes/HorribleWeaponPrefix.cs +++ b/Prefixes/HorribleWeaponPrefix.cs @@ -9,8 +9,8 @@ namespace CalamityMod.Prefixes public class Horrible : HorribleWeaponPrefix { - public override float damageMult => 0.50f; - public override float sizeMult => 3f; + public override float damageMult => 0.66f; + public override float sizeMult => 2f; } public abstract class HorribleWeaponPrefix : ModPrefix, ILocalizedModType { diff --git a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs index 2fd37b54b5..81a55e025a 100644 --- a/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs +++ b/Projectiles/BaseProjectiles/BaseSwordHoldoutProjectile.cs @@ -351,8 +351,7 @@ namespace CalamityMod.Projectiles.BaseProjectiles } if (useMeleeSize) { - if (player.meleeScaleGlove) Projectile.scale *= 1.1f; - Projectile.scale *= player.HeldItem.scale; + Projectile.scale *= player.GetMeleeScale(); } baseScale = Projectile.scale; ExistsTime = swingTime + StartupTime + CooldownTime; diff --git a/Projectiles/Melee/DragonRageFireball.cs b/Projectiles/Melee/DragonRageFireball.cs index 90e440f997..d0ed429bd5 100644 --- a/Projectiles/Melee/DragonRageFireball.cs +++ b/Projectiles/Melee/DragonRageFireball.cs @@ -40,10 +40,13 @@ namespace CalamityMod.Projectiles.Melee { if (Projectile.ai[0] == 0f) { - Projectile.ai[0] = Main.rand.NextFloat(40f, 70f); + Projectile.ai[0] = Main.rand.NextFloat(20f, 40f); Projectile.ai[1] = Main.rand.NextFloat(35f, 55f); } - target = Projectile.Center.ClosestNPCAt(1200f); + if (target != null && !target.CanBeChasedBy()) + target = null; + if (target is null) + target = GetTargetInRange(1200f); Projectile.frameCounter++; if (Projectile.frameCounter > 4) { @@ -66,6 +69,29 @@ namespace CalamityMod.Projectiles.Melee } } + + NPC GetTargetInRange(float range) + { + var player = Main.player[Projectile.owner]; + NPC gotTarget = null; + int currentHP = -1; + float distance = range; + foreach (var npc in Main.ActiveNPCs) + { + if (Projectile.localNPCImmunity[npc.whoAmI] > 0) + continue; + var myDistance = npc.Distance(Projectile.Center); + + if (npc.CanBeChasedBy() && ((myDistance < range && currentHP < npc.life) || (myDistance < distance && currentHP <= npc.life))) + { + distance = myDistance; + currentHP = npc.life; + gotTarget = npc; + } + } + return gotTarget; + + } public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, Projectile.alpha); public override bool PreDraw(ref Color lightColor) @@ -149,6 +175,13 @@ namespace CalamityMod.Projectiles.Melee Projectile.Damage(); } + public override bool? CanHitNPC(NPC target) + { + if (this.target != null && target.whoAmI != this.target.whoAmI) + return false; + return base.CanHitNPC(target); + } + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { target.AddBuff(ModContent.BuffType(), 120); diff --git a/Projectiles/Melee/DragonRageStaff.cs b/Projectiles/Melee/DragonRageStaff.cs index b848ac0059..71926dabb9 100644 --- a/Projectiles/Melee/DragonRageStaff.cs +++ b/Projectiles/Melee/DragonRageStaff.cs @@ -29,14 +29,15 @@ namespace CalamityMod.Projectiles.Melee Projectile.alpha = 255; Projectile.hide = true; Projectile.usesLocalNPCImmunity = true; - Projectile.localNPCHitCooldown = 5; + Projectile.localNPCHitCooldown = -1; + Projectile.ContinuouslyUpdateDamageStats = true; } public override void AI() { Player player = Main.player[Projectile.owner]; float spinCycleTime = 50f; - Projectile.scale = player.GetMeleeScale(); + Projectile.scale = 0.85f * player.GetMeleeScale(); // If the player is dead, destroy the projectile if (player.dead || !player.channel) @@ -70,6 +71,12 @@ namespace CalamityMod.Projectiles.Melee Projectile.rotation -= MathHelper.Pi; Projectile.netUpdate = true; } + + if (Projectile.ai[0] % 5 == 0) + { + Projectile.numHits = 0; + Projectile.ResetLocalNPCHitImmunity(); + } SpawnDust(player, direction); PositionAndRotation(player); VisibilityAndLight(); @@ -143,9 +150,10 @@ namespace CalamityMod.Projectiles.Melee Projectile.alpha = 0; } } - public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { + if (target.Calamity().IsArmored()) + Projectile.numHits--; //don't pierce falloff on targets it can't really damage target.AddBuff(ModContent.BuffType(), 180); OnHitEffects(target.Center); } @@ -160,14 +168,12 @@ namespace CalamityMod.Projectiles.Melee if (Projectile.owner == Main.myPlayer) { CalamityPlayer modPlayer = Main.player[Projectile.owner].Calamity(); - modPlayer.dragonRageHits++; - if (modPlayer.dragonRageHits >= 10 && modPlayer.dragonRageCooldown <= 0) + if (modPlayer.dragonRageCooldown <= 0) { SpawnFireballs(); - modPlayer.dragonRageHits = 0; } - int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, Vector2.Zero, ModContent.ProjectileType(), Projectile.damage / 4, Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); + int proj = Projectile.NewProjectile(Projectile.GetSource_FromThis(), position, Vector2.Zero, ModContent.ProjectileType(), (int)(Projectile.damage * (1 - (0.25f * Projectile.numHits))*0.25f) , Projectile.knockBack, Projectile.owner, 0f, 0.85f + Main.rand.NextFloat() * 1.15f); Main.projectile[proj].DamageType = DamageClass.Melee; } } @@ -183,14 +189,15 @@ namespace CalamityMod.Projectiles.Melee Vector2 velocity = new Vector2(0f, speed); velocity = velocity.RotatedBy(angleStep * i * Main.rand.NextFloat(0.9f, 1.1f)); - Projectile fire = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 8, Projectile.knockBack / 3f, Projectile.owner); + Projectile fire = Projectile.NewProjectileDirect(Projectile.GetSource_FromThis(), Projectile.Center, velocity, ModContent.ProjectileType(), Projectile.damage / 2, Projectile.knockBack / 3f, Projectile.owner); fire.scale = Projectile.scale; } - Main.player[Projectile.owner].Calamity().dragonRageCooldown = 60; + Main.player[Projectile.owner].Calamity().dragonRageCooldown = 120; } public override void ModifyHitNPC(NPC target, ref NPC.HitModifiers modifiers) { + modifiers.SourceDamage *= 1 - (0.25f * Projectile.numHits); Player player = Main.player[Projectile.owner]; Rectangle myRect = Projectile.Hitbox; if (Projectile.owner == Main.myPlayer) diff --git a/Utilities/PlayerUtils.cs b/Utilities/PlayerUtils.cs index 2ab3093f87..8d3a4e0e50 100644 --- a/Utilities/PlayerUtils.cs +++ b/Utilities/PlayerUtils.cs @@ -148,9 +148,9 @@ namespace CalamityMod if (addHeldItemScale) baseScale += (player.HeldItem.scale - 1); if (player.HasBuff(BuffID.Tipsy)) - baseScale += 0.15f; + baseScale += 0.25f; if (player.GetModPlayer().HasAlcohol(AlcoholType.Ale) || player.GetModPlayer().HasAlcohol(AlcoholType.Sake)) - baseScale += 0.15f; + baseScale += 0.25f; return baseScale; }