Files
CalamityModPublic/Projectiles/Magic/FlamingPumpkin.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

33 lines
1.1 KiB
C#

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class FlamingPumpkin : ModProjectile, ILocalizedModType
{
public new string LocalizationCategory => "Projectiles.Magic";
public override void SetDefaults()
{
Projectile.width = 14;
Projectile.height = 14;
Projectile.aiStyle = ProjAIStyleID.GroundProjectile;
Projectile.penetrate = 2;
Projectile.timeLeft = 200;
Projectile.DamageType = DamageClass.Magic;
Projectile.friendly = true;
Projectile.usesLocalNPCImmunity = true;
Projectile.localNPCHitCooldown = -1;
}
public override void AI()
{
if (Main.rand.NextBool(3))
{
Dust.NewDust(Projectile.position + Projectile.velocity, Projectile.width, Projectile.height, DustID.YellowTorch, Projectile.velocity.X * 0.5f, Projectile.velocity.Y * 0.5f);
}
}
public override void OnHitNPC(NPC target, NPC.HitInfo hit, int DamageDone) => target.AddBuff(BuffID.OnFire, 60);
}
}