From 7f55af8fe8522dbc2ada82c82569cdee26fd92c4 Mon Sep 17 00:00:00 2001 From: CongratsIsTrash <1q2w3e4dasd@gmail.com> Date: Mon, 9 Jun 2025 12:30:34 -0400 Subject: [PATCH] 1 - Added pan-searing mechanic 2 - No longer use point-blank 3 - Condensed tooltips --- Items/Weapons/Ranged/FirestormCannon.cs | 1 - Items/Weapons/Ranged/SpectralstormCannon.cs | 1 - ...ods.CalamityMod.Items.Weapons.Ranged.hjson | 10 ++++------ Projectiles/Ranged/FirestormCannonHoldout.cs | 18 +++++++++++++++++ .../Ranged/SpectralstormCannonHoldout.cs | 20 ++++++++++++++++++- 5 files changed, 41 insertions(+), 9 deletions(-) diff --git a/Items/Weapons/Ranged/FirestormCannon.cs b/Items/Weapons/Ranged/FirestormCannon.cs index 2e63816fa8..780f739283 100644 --- a/Items/Weapons/Ranged/FirestormCannon.cs +++ b/Items/Weapons/Ranged/FirestormCannon.cs @@ -38,7 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 5.5f; Item.useAmmo = AmmoID.Flare; - Item.Calamity().canFirePointBlankShots = true; } public override void HoldItem(Player player) diff --git a/Items/Weapons/Ranged/SpectralstormCannon.cs b/Items/Weapons/Ranged/SpectralstormCannon.cs index ac9375b535..df15029cd1 100644 --- a/Items/Weapons/Ranged/SpectralstormCannon.cs +++ b/Items/Weapons/Ranged/SpectralstormCannon.cs @@ -39,7 +39,6 @@ namespace CalamityMod.Items.Weapons.Ranged Item.shoot = ModContent.ProjectileType(); Item.shootSpeed = 9f; Item.useAmmo = AmmoID.Flare; - Item.Calamity().canFirePointBlankShots = true; } public override void HoldItem(Player player) diff --git a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson index 8627363db7..e1616d6e28 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Weapons.Ranged.hjson @@ -453,9 +453,8 @@ FirestormCannon: { DisplayName: Firestorm Cannon Tooltip: ''' - Fires a barrage of flares that gets faster and more inaccurate over time - The weapon builds up heat as it fires, and cools down while not firing - Firing for too long overheats the weapon, burning you and leaving it unusable for a short period + Fires a rapid barrage of flares that builds up a searing heat in the weapon + Firing for too long overheats the weapon, leaving it unusable for a short period Press to put away the weapon, which preserves its heat 70% chance to save ammo 'What could go wrong?' @@ -1157,10 +1156,9 @@ SpectralstormCannon: { DisplayName: Spectralstorm Cannon Tooltip: ''' - Fires a barrage of spectral flares that gets faster over time - The weapon builds up heat as it fires, and cools down while not firing + Fires a barrage of spectral flares that builds up a searing heat in the weapon While cooling down, heat-seeking phantoms are continuously released - Firing for too long overheats the weapon, burning you and leaving it unusable for a short period + Firing for too long overheats the weapon, leaving it unusable for a short period However, triggering overheat releases a powerful burst of souls and resets heat Press to put away the weapon, which preserves its heat 70% chance to save ammo diff --git a/Projectiles/Ranged/FirestormCannonHoldout.cs b/Projectiles/Ranged/FirestormCannonHoldout.cs index a328c39dc5..3363fdcf8e 100644 --- a/Projectiles/Ranged/FirestormCannonHoldout.cs +++ b/Projectiles/Ranged/FirestormCannonHoldout.cs @@ -28,6 +28,15 @@ namespace CalamityMod.Projectiles.Ranged private bool displayOverheat = false; private const int WarningTime = FirestormCannon.OverheatLevel - 100; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 15; + } public override void KillHoldoutLogic() { // What kills the holdout: @@ -109,6 +118,15 @@ namespace CalamityMod.Projectiles.Ranged } } + // Pan-searing mechanic + public override bool? CanDamage() => BuiltHeat >= 120; + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.OnFire, 300); + // Reduce the heat slightly + (Owner.HeldItem.ModItem as FirestormCannon).BuiltUpHeat -= 6; + } + public override bool PreDraw(ref Color lightColor) { Texture2D texture = TextureAssets.Projectile[Type].Value; diff --git a/Projectiles/Ranged/SpectralstormCannonHoldout.cs b/Projectiles/Ranged/SpectralstormCannonHoldout.cs index 0c41c4b39a..155a58f970 100644 --- a/Projectiles/Ranged/SpectralstormCannonHoldout.cs +++ b/Projectiles/Ranged/SpectralstormCannonHoldout.cs @@ -31,6 +31,15 @@ namespace CalamityMod.Projectiles.Ranged private bool displayOverheat = false; private const int WarningTime = SpectralstormCannon.OverheatLevel - 100; + public override void SetDefaults() + { + base.SetDefaults(); + Projectile.friendly = true; + Projectile.penetrate = -1; + Projectile.DamageType = DamageClass.Ranged; + Projectile.usesLocalNPCImmunity = true; + Projectile.localNPCHitCooldown = 15; + } public override void KillHoldoutLogic() { // What kills the holdout: @@ -148,6 +157,15 @@ namespace CalamityMod.Projectiles.Ranged } } + // Pan-searing mechanic + public override bool? CanDamage() => BuiltHeat >= 120; + public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) + { + target.AddBuff(BuffID.OnFire3, 300); + // Reduce the heat slightly + (Owner.HeldItem.ModItem as SpectralstormCannon).BuiltUpHeat -= 6; + } + public override bool PreDraw(ref Color lightColor) { Texture2D texture = TextureAssets.Projectile[Type].Value; @@ -156,7 +174,7 @@ namespace CalamityMod.Projectiles.Ranged Vector2 rotationPoint = texture.Size() * 0.5f; SpriteEffects flipSprite = (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipHorizontally : SpriteEffects.None; Color tintColor = displayOverheat ? Color.Black : - BuiltHeat >= WarningTime ? Color.Lerp(Color.LightPink, Color.White, MathF.Abs(MathF.Sin(Owner.miscCounter * MathHelper.Pi / 30f))) : Color.LightPink; + BuiltHeat >= WarningTime ? Color.Lerp(Color.LightSalmon, Color.White, MathF.Abs(MathF.Sin(Owner.miscCounter * MathHelper.Pi / 30f))) : Color.LightSalmon; float opacity = Utils.GetLerpValue(0, WarningTime, BuiltHeat, true); Projectile.DrawBackglow(Color.HotPink * opacity, 4f, null, null, (Projectile.spriteDirection * Owner.gravDir == -1) ? SpriteEffects.FlipVertically : SpriteEffects.None);