Files
CalamityModPublic/Projectiles/Summon/BrimstoneLaserSummon.cs
T
CongratsIsTrash ec0f9df56c Pre-Plantera mage and summon
Including a preliminary Spectre Mask nerf that I'll need to retest once I reach post-Plantera mage
2025-07-07 20:45:31 -04:00

42 lines
1.6 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Summon
{
public class BrimstoneLaserSummon : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Summon";
public override void SetStaticDefaults()
{
ProjectileID.Sets.MinionShot[Type] = true;
}
public override void SetDefaults()
{
Projectile.width = Projectile.height = 10;
Projectile.aiStyle = ProjAIStyleID.Arrow;
AIType = ProjectileID.CursedBullet;
Projectile.friendly = true;
Projectile.ignoreWater = true;
Projectile.alpha = 120;
Projectile.timeLeft = 300;
Projectile.extraUpdates = 2;
Projectile.DamageType = DamageClass.Summon;
}
public override void AI()
{
Lighting.AddLight(Projectile.Center, Projectile.Opacity * 0.5f, Projectile.Opacity * 0.05f, Projectile.Opacity * 0.05f);
Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2;
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
public override void OnHitPlayer(Player target, Player.HurtInfo info) => target.AddBuff(ModContent.BuffType<BrimstoneFlames>(), 120);
public override Color? GetAlpha(Color lightColor) => new Color(250, 50, 50, Projectile.alpha);
}
}