public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { target.AddBuff(BuffType <FlareVortexDebuff>(), 240); DebuffGlobalNPC debuffNPC = target.GetGlobalNPC <DebuffGlobalNPC>(); debuffNPC.flameVortexStack = (short)Math.Min(debuffNPC.flameVortexStack + 1, 5); }
private void attachToTarget() { if (clingTarget == null) { projectile.Kill(); return; } DebuffGlobalNPC globalTarget = clingTarget.GetGlobalNPC <DebuffGlobalNPC>(); if (globalTarget.cellStack < 10) { hasHitTarget = true; clingOffset = new Vector2(Main.rand.NextFloat(clingTarget.width), Main.rand.NextFloat(clingTarget.height)); projectile.friendly = false; globalTarget.cellStack++; } else { projectile.Kill(); } }