public override void Kill(int timeLeft) { DrawHelper.CircleDust(projectile.Center - projectile.velocity, projectile.velocity, DustID.Fire, 1, 8); for (int i = 0; i < 4; i++) { Vector2 off = new Vector2(Main.rand.Next(projectile.width + 1), Main.rand.Next(projectile.height + 1)); Projectile.NewProjectile(projectile.position + off, (projectile.velocity * 0.65f).RotatedByRandom(0.5), ModContent.ProjectileType <FireballFart>(), 0, 0, projectile.owner); } }
private void CoolVFXMethodEcksDee(NPC npc) { var pos1 = npc.BottomLeft + new Vector2(npc.width * 0.4f, -(npc.height * 0.4f)); var pos2 = npc.BottomRight - new Vector2(npc.width * 0.4f, npc.height * 0.4f); var pos3 = npc.Top + new Vector2(0, npc.height * 0.4f); int val = (int)((npc.height + npc.width) * 0.33f); int height = (int)MathHelper.Clamp(val, 60, int.MaxValue); int width = (int)(height * 0.33f); DrawHelper.CircleDust(pos1, npc.BottomLeft.DirectTo(npc.Center), DustID.Fire, height, width, .7f, 60); DrawHelper.CircleDust(pos2, npc.BottomRight.DirectTo(npc.Center), DustID.Fire, height, width, .7f, 60); DrawHelper.CircleDust(pos3, npc.Top.DirectTo(npc.Center), DustID.Fire, height, width, .7f, 60); }
public bool TryActivate(Player player, List <ComboInput> inputs) { // if received input count is lower, we won't be able to activate the combo if (inputs.Count < RequiredInputs.Count) { return(false); } if (SteamHelper.AmIBanned) { Main.NewText("Your massive amounts of cringe caused " + TBARPlayer.Get(player).PlayerStand.StandName + " to refuse moving even a muscle for you"); Main.NewText("It states that you: " + SteamHelper.BanReason); return(false); } // find diffrence so we only check the last "answer" // e.g: we press A1-A1-Up-Down; combo is just Up-Down // it will skip over A1-A1 and only check the last 2 inputs int dif = Math.Abs(RequiredInputs.Count - inputs.Count); for (int i = 0 + dif; i < inputs.Count; i++) { if (inputs[i] != RequiredInputs[i - dif]) { return(false); } } DrawHelper.CircleDust(player.Center, Vector2.Zero, 6, 8, 8, 1.85f); OnActivate?.Invoke(player); SendPacket(player, ComboName, player.whoAmI); if (!Main.dedServ) { ComboTimeRunner.AchievedCombo = true; } return(true); }