public override void AI() { Lighting.AddLight(projectile.Center, Main.DiscoColor.ToVector3() * 0.5f); for (int i = 0; i < 5; i++) { DustHelper.CreateDust(projectile.Center, dust, Main.DiscoColor, noGrav: true); } Vector2 a = projectile.velocity.ToRotation().ToRotationVector2(); Vector2 b = new Vector2(a.Y, -a.X); projectile.timeLeft++; if (Main.player[projectile.owner].whoAmI == Main.myPlayer) { if (taken && Vector2.Distance(projectile.Center, Main.MouseWorld) > 70f) { projectile.velocity = VectorHelper.FromTo(projectile.Center, Main.MouseWorld, 50f) / 4; } if (!Main.player[projectile.owner].controlUseItem) { taken = false; } } projectile.VelocityToRotation(); }
public override void AI() { for (int i = 0; i < 8; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.NextFloat(-2, 3), projectile.Center.Y + Main.rand.NextFloat(-2, 3)), 59, Color.AliceBlue, Vector2.Zero, noGrav: true, scale: 0.7f); } }
public override void AI() { projectile.VelocityToRotation(); for (int i = 0; i < 5; i++) { DustHelper.CreateDust(projectile.Center, 75, Color.White, -projectile.velocity.ToRotation().ToRotationVector2() * Main.rand.NextFloat(2, 8), noGrav: true, shader: GameShaders.Armor.GetSecondaryShader(102, Main.LocalPlayer)); } if (--t == 0 && !a) { projectile.velocity *= 1.3f; a = true; } if (projectile.alpha > 0) { projectile.alpha -= 255 / 25; } if (++projectile.frameCounter >= 5) { projectile.frameCounter = 0; if (++projectile.frame >= 4) { projectile.frame = 0; } } }
public override void AI() { if (projectile.velocity.X != 0 || projectile.velocity.Y != 0) { DustHelper.CreateDust(projectile.Center, 64, Color.White, Vector2.Zero, scale: 1.3f, noGrav: true); } if (projectile.owner == Main.myPlayer) { if (_timer > 0) { _timer--; } else { _timer = 180; float speed = Main.rand.NextFloat(4, 8); float dir = Main.rand.NextFloat(MathHelper.TwoPi); projectile.velocity += dir.ToRotationVector2() * speed; _timerr = 30; projectile.netUpdate = true; } if (_timerr > 0) { _timerr--; } else { projectile.velocity = new Vector2(0, 0); projectile.netUpdate = true; } } }
private void dust(int rnd) { Vector2 position = new Vector2(projectile.Center.X + Main.rand.NextFloat(-rnd, rnd), projectile.Center.Y + Main.rand.NextFloat(-rnd, rnd)); DustHelper.CreateDust(position, 156, Color.White, Vector2.Zero, 0.8f, noGrav: true); }
public override void Kill(int timeLeft) { for (int i = 0; i < Main.rand.Next(6, 12); i++) { int t = DustID.CrystalPulse2; DustHelper.CreateDust(projectile.Center, t, velocity: Main.rand.NextFloat(MathHelper.TwoPi).ToRotationVector2() * Main.rand.NextFloat(4, 8), scale: 0.8f, noGrav: true, alpha: 50); } }
public override void AI() { projectile.VelocityToRotation(); for (int i = 0; i < 5; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.Next(-3, 3), projectile.Center.Y + Main.rand.Next(-3, 3)), 156, Color.White, Vector2.Zero, 1f, 0, 0.7f, true); } }
public override void AI() { for (int i = 0; i < 6; i++) { DustHelper.CreateDust( projectile.Center + new Vector2(Main.rand.Next(-8, 8), Main.rand.Next(-8, 8)) + (projectile.rotation + MathHelper.PiOver2).ToRotationVector2() * 10, 180, new Color(61 + Main.rand.Next(15), 142 - Main.rand.Next(20), 228), Vector2.Zero, scale: .7f, noGrav: true, fadeIn: .5f); } }
public override bool PreKill(int timeLeft) { for (int i = 0; i < 10; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.NextFloat(-4, 4), projectile.Center.Y + Main.rand.NextFloat(-4, 4)), 156, Color.White, projectile.oldVelocity.ToRotation().ToRotationVector2() * Main.rand.NextFloat(2, 6), 1, 0, .8f, true); } return(base.PreKill(timeLeft)); }
public override bool PreKill(int timeLeft) { for (int i = 0; i < 10; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.NextFloat(-4, 4), projectile.Center.Y + Main.rand.NextFloat(-4, 4)), 75, Color.White, projectile.oldVelocity.ToRotation().ToRotationVector2() * Main.rand.NextFloat(2, 6), 1, 0, 1.4f, true, shader: GameShaders.Armor.GetSecondaryShader(102, Main.LocalPlayer)); } return(base.PreKill(timeLeft)); }
public override void Kill(int timeLeft) { float len = projectile.oldVelocity.Length(); float len2 = len * 0.3f; for (int i = 0; i < 20; i++) { DustHelper.CreateDust(projectile.Center, dust, Main.DiscoColor, velocity: Main.rand.NextFloat(MathHelper.TwoPi).ToRotationVector2() * Main.rand.NextFloat(len2, len), noGrav: true); } }
public override void Kill(int timeLeft) { Explode(6); for (int i = 0; i < 30; i++) { Vector2 pos = new Vector2(projectile.Center.X + Main.rand.NextFloat(-10, 10), projectile.Center.Y + Main.rand.NextFloat(-10, 10)); DustHelper.CreateDust(pos, 156, Color.White, Vector2.Zero, noGrav: true); } }
public override void AI() { projectile.VelocityToRotation(); for (int i = 0; i < 5; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.Next(-3, 3), projectile.Center.Y + Main.rand.Next(-3, 3)), DustID.Fire, Color.White, -projectile.oldVelocity.ToRotation().ToRotationVector2() * Main.rand.Next(2, 8), 1f, 0, 1, true); } }
public override void Kill(int timeLeft) { Explode(6); for (int i = 0; i < 30; i++) { int rnd = 20; Vector2 pos = new Vector2(projectile.Center.X + Main.rand.NextFloat(-rnd, rnd), projectile.Center.Y + Main.rand.NextFloat(-rnd, rnd)); DustHelper.CreateDust(pos, 75, Color.White, Vector2.Zero, scale: 1.4f, noGrav: true); } }
public override void AI() { for (int i = 0; i < 6; i++) { DustHelper.CreateDust(projectile.Center, 254, Color.White, -projectile.velocity.ToRotation().ToRotationVector2() * Main.rand.NextFloat(5), noGrav: true, fadeIn: 1.2f, rotation: Main.rand.NextFloat(MathHelper.TwoPi)); } if (Main.netMode != 1) { projectile.tileCollide = projectile.Center.Y > projectile.OwnerPlayer().Top.Y; projectile.netUpdate = true; } }
public override void Kill(int timeLeft) { for (int i = 0; i < 40; i++) { DustHelper.CreateDust(projectile.Center, 16, Color.White, Vector2.Zero, 1f, 0, 1, true); } int c = 6; for (int i = 0; i < c; i++) { Vector2 pos = projectile.Center + (MathHelper.TwoPi / c * i).ToRotationVector2() * 20; Projectile p = Projectile.NewProjectileDirect(pos, Vector2.Zero, ProjectileID.TruffleSpore, projectile.damage, 0f, projectile.owner); p.timeLeft = 60; } }
public override void Kill(int timeLeft) { for (int i = 0; i < Main.rand.Next(12, 20); i++) { DustHelper.CreateDust(projectile.Center, 6, Color.White, new Vector2(Main.rand.NextFloat(-1f, 1f), Main.rand.NextFloat(-18f, -10f)), noGrav: true, fadeIn: .9f); } if (projectile.owner == Main.myPlayer) { for (int i = 0; i < 5; i++) { Shoot(); } } }
public override void Kill(int timeLeft) { int count = 6; List <Vector2> vel = VectorHelper.Circle(count, 5f); if (projectile.owner == Main.myPlayer) { for (int i = 0; i < count; i++) { Projectile.NewProjectileDirect(projectile.position, vel[i], ProjectileID.Leaf, projectile.damage, 0, projectile.owner); } } for (int i = 0; i < 5; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.Next(-14, 14), projectile.Center.Y + Main.rand.Next(-14, 14)), DustID.GrassBlades, Color.White, Vector2.Zero, 1f, 0, 1, true); } }
public override void AI() { for (int i = 0; i < 2; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.NextFloat(-6, 6), projectile.Center.Y + Main.rand.NextFloat(-6, 6)), 255, Color.White, Vector2.Zero, noGrav: true, scale: Main.rand.NextFloat(1f, 1.8f)); } if (projectile.owner == Main.myPlayer && Helper.TryChance(.15f)) { for (int i = 0; i < Main.rand.Next(2, 3); i++) { Vector2 position = projectile.Center; Vector2 vel = new Vector2(Main.rand.Next(-1, 1), Main.rand.Next(-1, 1)); int type = ProjectileID.CrystalStorm; int proj = Projectile.NewProjectile(position.X, position.Y, vel.X, vel.Y, type, (projectile.damage / 3) * 2, 0, Main.myPlayer); Main.projectile[proj].tileCollide = false; Main.projectile[proj].timeLeft = Main.rand.Next(30, 90); } } }
public override void AI() { projectile.VelocityToRotation(); for (int i = 0; i < 5; i++) { DustHelper.CreateDust(new Vector2(projectile.Center.X + Main.rand.NextFloat(-3, 3), projectile.Center.Y + Main.rand.NextFloat(-3, 3)), 156, Color.White, -projectile.oldVelocity.ToRotation().ToRotationVector2() * Main.rand.NextFloat(2, 8), 1f, 0, 1, true); } if (--_t == 0 && !_a) { projectile.velocity *= 1.3f; _a = true; } if (projectile.alpha > 0) { projectile.alpha -= 255 / 25; } }