41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Environment
|
|
{
|
|
public class HotSteam : ModProjectile
|
|
{
|
|
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|