Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Summon
|
|
{
|
|
public class GhostFire : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Fire");
|
|
ProjectileID.Sets.MinionShot[projectile.type] = true;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 4;
|
|
projectile.height = 4;
|
|
projectile.friendly = true;
|
|
projectile.tileCollide = false;
|
|
projectile.penetrate = -1;
|
|
projectile.extraUpdates = 100;
|
|
projectile.timeLeft = 80;
|
|
projectile.usesLocalNPCImmunity = true;
|
|
projectile.localNPCHitCooldown = 8;
|
|
projectile.minion = true;
|
|
projectile.minionSlots = 0f;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
projectile.localAI[0] += 1f;
|
|
if (projectile.localAI[0] > 6f)
|
|
{
|
|
Vector2 vector33 = projectile.position;
|
|
vector33 -= projectile.velocity * 0.25f;
|
|
projectile.alpha = 255;
|
|
int num448 = Dust.NewDust(vector33, 1, 1, 180, 0f, 0f, 0, default, 0.2f);
|
|
Main.dust[num448].position = vector33;
|
|
Main.dust[num448].noGravity = true;
|
|
Main.dust[num448].scale = (float)Main.rand.Next(70, 110) * 0.013f;
|
|
Main.dust[num448].velocity *= 0.2f;
|
|
}
|
|
}
|
|
}
|
|
}
|