public override void OnHitNPC(NPC target, int damage, float knockback, bool crit) { int index = TorchGodSummonMinion.GetBuffIndex((int)projectile.ai[0] % 16); if (index > 0) { target.AddBuff(index, index == ModContent.BuffType <Buffs.MoonLightCurse>() ? 60 * 2 : 60 * 8); } }
public static TorchGodSummonMinion GetProjectileToShootFrom(Player player) { TorchGodSummonMinion sum = null; foreach (Projectile proj in Main.projectile.Where(testby => testby.active && testby.owner == player.whoAmI && testby.modProjectile != null && testby.ai[1] < 0 && testby.type == ModContent.ProjectileType <TorchGodSummonMinion>()).OrderBy(testby => testby.ai[1])) { //Main.NewText("test"); sum = (proj.modProjectile) as TorchGodSummonMinion; break; } return(sum); }