Files
CalamityModPublic/Projectiles/Typeless/SlimeStream.cs
T
tomat 67bceff6e7 Initial dotnet format pass.
This commit formats the entire codebase according to `dotnet format` and its limited understanding of our provided `.editorconfig`.
2024-02-28 21:49:50 -08:00

32 lines
1.0 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Typeless
{
public class SlimeStream : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Typeless";
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public override void SetDefaults()
{
Projectile.width = Projectile.height = 10;
Projectile.friendly = true;
Projectile.timeLeft = 90;
Projectile.MaxUpdates = 3;
}
public override void AI()
{
Dust.QuickDust(Projectile.Center, Projectile.ai[0] > 0f ? Color.Magenta : Color.RoyalBlue);
if (Projectile.ai[1] > 0f && Projectile.timeLeft < 60)
CalamityUtils.HomeInOnNPC(Projectile, false, 320f, 12f, 20f);
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) => target.AddBuff(BuffID.Slimed, 600);
}
}