Files
CalamityModPublic/Projectiles/Boss/BloodGeyser.cs
T
mountaindrew10 189e332228 1 - King and Queen Slime now teleport ahead of their targets and can jump through tiles to reach their targets.
2 - Slime God Core balls inflict damage.
3 - Made several hostile projectiles more visible.
4 - Made several bosses and enemies more visible.
2022-07-22 03:00:47 -05:00

61 lines
2.0 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");
ProjectileID.Sets.TrailCacheLength[Projectile.type] = 2;
ProjectileID.Sets.TrailingMode[Projectile.type] = 0;
}
public override void SetDefaults()
{
Projectile.width = 12;
Projectile.height = 12;
Projectile.hostile = true;
Projectile.tileCollide = false;
Projectile.timeLeft = 600;
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;
if (Projectile.velocity.Y < 12f)
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 bool PreDraw(ref Color lightColor)
{
lightColor.R = (byte)(255 * Projectile.Opacity);
lightColor.G = (byte)(255 * Projectile.Opacity);
lightColor.B = (byte)(255 * Projectile.Opacity);
CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 1);
return false;
}
}
}