1 - Added pan-searing mechanic

2 - No longer use point-blank
3 - Condensed tooltips
This commit is contained in:
CongratsIsTrash authored and Cameron Ewell committed 2025-06-17 11:34:12 -04:00
1 parent 290e8ed274
commit 7f55af8fe8
5 files changed
+41 -9

No files matched your search

-1
View File
@@ -38,7 +38,6 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.shoot = ModContent.ProjectileType<FirestormCannonHoldout>();
Item.shootSpeed = 5.5f;
Item.useAmmo = AmmoID.Flare;
Item.Calamity().canFirePointBlankShots = true;
}
public override void HoldItem(Player player)
@@ -39,7 +39,6 @@ namespace CalamityMod.Items.Weapons.Ranged
Item.shoot = ModContent.ProjectileType<SpectralstormCannonHoldout>();
Item.shootSpeed = 9f;
Item.useAmmo = AmmoID.Flare;
Item.Calamity().canFirePointBlankShots = true;
}
public override void HoldItem(Player player)
@@ -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 <right> 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 <right> to put away the weapon, which preserves its heat
70% chance to save ammo
@@ -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;
@@ -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);