Files
CalamityModPublic/Projectiles/Environment/HotSteam.cs
T
DominicKarma42 55e89c9b98 Replaced (hopefully) every magic number with a constant
Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
2020-05-30 17:56:36 -04:00

39 lines
1.1 KiB
C#

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Environment
{
public class HotSteam : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Steam");
}
public override void SetDefaults()
{
projectile.width = 40;
projectile.height = 40;
projectile.hostile = true;
projectile.tileCollide = true;
projectile.ignoreWater = false;
projectile.timeLeft = 30;
}
public override void AI()
{
for (int i = 0; i < 6; i++)
{
Dust dust = Dust.NewDustDirect(projectile.position, projectile.width, projectile.height, 4);
dust.velocity = Vector2.One.RotatedByRandom(MathHelper.TwoPi);
dust.alpha = 127;
}
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
target.AddBuff(BuffID.Poisoned, 180);
}
}
}