using Microsoft.Xna.Framework; using Terraria; using Terraria.ModLoader; namespace CalamityMod.Projectiles.Rogue { public class DuststormInABottleProj : ModProjectile { public override void SetStaticDefaults() { DisplayName.SetDefault("Duststorm"); } public override void SetDefaults() { projectile.width = 20; projectile.height = 20; projectile.friendly = true; projectile.penetrate = 1; projectile.aiStyle = 2; projectile.timeLeft = 180; aiType = 48; projectile.Calamity().rogue = true; } public override void Kill(int timeLeft) { Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 107); //change for (int k = 0; k < 15; k++) { Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 85, projectile.oldVelocity.X, projectile.oldVelocity.Y); } int num220 = Main.rand.Next(20, 31); if (projectile.owner == Main.myPlayer) { for (int num221 = 0; num221 < num220; num221++) { Vector2 value17 = new Vector2((float)Main.rand.Next(-100, 101), (float)Main.rand.Next(-100, 101)); value17.Normalize(); value17 *= (float)Main.rand.Next(10, 201) * 0.01f; Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, value17.X, value17.Y, ModContent.ProjectileType(), projectile.damage, 1f, projectile.owner, 0f, (float)Main.rand.Next(-45, 1)); } } } } }