Files
CalamityModPublic/Projectiles/Boss/BloodGeyser.cs
T

52 lines
1.6 KiB
C#

using CalamityMod.Buffs.DamageOverTime;
using Microsoft.Xna.Framework;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Boss
{
public class BloodGeyser : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blood Geyser");
}
public override void SetDefaults()
{
Projectile.width = 12;
Projectile.height = 12;
Projectile.hostile = true;
Projectile.tileCollide = false;
Projectile.timeLeft = 420;
Projectile.penetrate = 1;
}
public override void AI()
{
if (Projectile.position.Y > Projectile.ai[1])
Projectile.tileCollide = true;
Projectile.rotation = (float)Math.Atan2(Projectile.velocity.Y, Projectile.velocity.X) + MathHelper.PiOver2;
int num469 = Dust.NewDust(new Vector2(Projectile.position.X, Projectile.position.Y), Projectile.width, Projectile.height, DustID.Blood, 0f, 0f, 100, default, 0.5f);
Main.dust[num469].noGravity = true;
Main.dust[num469].velocity *= 0f;
Projectile.velocity.Y += 0.06f;
Projectile.velocity.X *= 0.995f;
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<BurningBlood>(), 120);
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(250, 50, 50, Projectile.alpha);
}
}
}