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

50 lines
1.5 KiB
C#

using CalamityMod.Buffs.StatDebuffs;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Rogue
{
public class FossilShardThrown : ModProjectile
{
public override string Texture => "CalamityMod/Projectiles/Ranged/FossilShard";
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Shard");
}
public override void SetDefaults()
{
projectile.width = 10;
projectile.height = 10;
projectile.friendly = true;
projectile.penetrate = 1;
projectile.aiStyle = 1;
projectile.timeLeft = 90;
aiType = ProjectileID.WoodenArrowFriendly;
projectile.Calamity().rogue = true;
}
public override void AI()
{
projectile.rotation += projectile.velocity.Y;
projectile.velocity.Y *= 1.05f;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 60);
}
public override void OnHitPvp(Player target, int damage, bool crit)
{
target.AddBuff(ModContent.BuffType<ArmorCrunch>(), 60);
}
public override void Kill(int timeLeft)
{
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 32, projectile.oldVelocity.X * 0.5f, projectile.oldVelocity.Y * 0.5f);
}
}
}