33 lines
932 B
C#
33 lines
932 B
C#
using Microsoft.Xna.Framework;
|
|
using System;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
namespace CalamityMod.Projectiles.Magic
|
|
{
|
|
public class GraniteEnergy : ModProjectile
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Granite Energy");
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
projectile.width = 6;
|
|
projectile.height = 6;
|
|
projectile.friendly = true;
|
|
projectile.penetrate = 1;
|
|
projectile.tileCollide = true;
|
|
projectile.magic = true;
|
|
projectile.timeLeft = 90;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width, projectile.height, 229, 0f, 0f, 100, default, 0.6f);
|
|
|
|
CalamityGlobalProjectile.HomeInOnNPC(projectile, false, 500f, 22f, 20f);
|
|
}
|
|
}
|
|
}
|