using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; using CalamityMod.Buffs.DamageOverTime; namespace CalamityMod.Projectiles.Summon { public class SpikecragSpike : ModProjectile, ILocalizedModType { public new string LocalizationCategory => "Projectiles.Summon"; public override void SetStaticDefaults() { ProjectileID.Sets.SentryShot[Projectile.type] = true; } public override void SetDefaults() { Projectile.width = 6; Projectile.height = 6; Projectile.friendly = true; Projectile.minion = true; Projectile.minionSlots = 0f; Projectile.penetrate = 1; Projectile.timeLeft = 600; Projectile.aiStyle = ProjAIStyleID.Arrow; Projectile.DamageType = DamageClass.Summon; } public override void AI() { Projectile.rotation = Projectile.velocity.ToRotation() + MathHelper.PiOver2; Projectile.velocity.Y += 0.1f; } public override void OnHitNPC(NPC target, NPC.HitInfo hit, int damageDone) { if (Main.zenithWorld) { target.AddBuff(ModContent.BuffType(), 180); } } } }