using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Melee { public class LifeScythe : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Melee"; public override void SetStaticDefaults() { ProjectileID.Sets.TrailCacheLength[Projectile.type] = 10; ProjectileID.Sets.TrailingMode[Projectile.type] = 1; } public override void SetDefaults() { Projectile.width = 62; Projectile.height = 72; Projectile.aiStyle = ProjAIStyleID.Sickle; Projectile.alpha = 55; Projectile.friendly = true; Projectile.DamageType = DamageClass.Melee; Projectile.penetrate = 5; Projectile.timeLeft = 240; Projectile.ignoreWater = true; Projectile.tileCollide = false; AIType = ProjectileID.DeathSickle; Projectile.usesLocalNPCImmunity = true; Projectile.localNPCHitCooldown = 4; } public override void AI() { float num395 = Main.mouseTextColor / 200f - 0.35f; num395 *= 0.2f; Projectile.scale = num395 + 0.95f; Lighting.AddLight(Projectile.Center, 0.1f, 0.5f, 0.15f); } public override bool PreDraw(ref Color lightColor) { CalamityUtils.DrawAfterimagesCentered(Projectile, ProjectileID.Sets.TrailingMode[Projectile.type], lightColor, 2); return false; } } }