Files
CalamityModPublic/Projectiles/Rogue/CraniumSMASH.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

51 lines
1.3 KiB
C#

using Terraria;
using Terraria.ModLoader;
using Microsoft.Xna.Framework;
namespace CalamityMod.Projectiles.Rogue
{
public class CraniumSMASH : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/InvisibleProj";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Cranium SMASH");
}
public override void SetDefaults()
{
projectile.width = 192;
projectile.height = 192;
projectile.friendly = true;
projectile.ignoreWater = true;
projectile.tileCollide = false;
projectile.penetrate = -1;
projectile.timeLeft = 10;
projectile.Calamity().rogue = true;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = -2;
}
public override void AI()
{
if (projectile.ai[0] == 0f)
SpawnExplosionDust();
if (projectile.ai[0] <= 1f)
projectile.ai[0]++;
}
void SpawnExplosionDust()
{
Main.PlaySound(2, (int)projectile.Center.X, (int)projectile.Center.Y, 14);
CalamityUtils.ExplosionGores(projectile.Center, 3);
for (int num194 = 0; num194 < 25; num194++)
{
int num195 = Dust.NewDust(projectile.position, projectile.width, projectile.height, 135, 0f, 0f, 100, default, 2f);
Main.dust[num195].noGravity = true;
Main.dust[num195].velocity *= 0f;
}
}
}
}