Files
CalamityModPublic/Projectiles/Magic/BloodRay.cs
T
termigator1359 1b22071cf4 squash merge: Removed all unused textures
Removed nearly all unused textures in the entire mod, especially focusing on projectiles.
Apotheosis & the Death Valley Duster weapon line were ignored to prevent merge conflicts.
2020-11-15 14:25:46 -05:00

52 lines
1.8 KiB
C#

using CalamityMod.Dusts;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class BloodRay : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Blood Ray");
}
public override void SetDefaults()
{
projectile.width = 4;
projectile.height = 4;
projectile.friendly = true;
projectile.magic = true;
projectile.penetrate = 10;
projectile.extraUpdates = 100;
projectile.timeLeft = 150;
}
public override void AI()
{
projectile.localAI[1] += 1f;
if (projectile.localAI[1] >= 29f && projectile.owner == Main.myPlayer)
{
projectile.localAI[1] = 0f;
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, ModContent.ProjectileType<BloodOrb>(), (int)(projectile.damage * 0.6), projectile.knockBack, projectile.owner, 0f, 0f);
}
projectile.localAI[0] += 1f;
if (projectile.localAI[0] > 9f)
{
for (int num447 = 0; num447 < 2; num447++)
{
Vector2 vector33 = projectile.position;
vector33 -= projectile.velocity * ((float)num447 * 0.25f);
int num448 = Dust.NewDust(vector33, 1, 1, (int)CalamityDusts.Brimstone, 0f, 0f, 0, default, 1.5f);
Main.dust[num448].position = vector33;
Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f;
Main.dust[num448].velocity *= 0.1f;
}
}
}
}
}