public override void UseItemHitbox(Player player, ref Rectangle hitbox, ref bool noHitbox) { if (ArchaeaItem.Elapsed(10)) { Projectile.NewProjectileDirect(hitbox.Center(), new Vector2(4f * player.direction, -3f), mod.ProjectileType <Pixel>(), item.damage, item.knockBack, player.whoAmI, Pixel.Mercury, Pixel.Sword); } }
protected Projectile Throw(Player player, int ai) { float angle = NPCs.ArchaeaNPC.AngleTo(player.Center, Main.MouseWorld); Vector2 velocity = NPCs.ArchaeaNPC.AngleToSpeed(angle, item.shootSpeed); return(Projectile.NewProjectileDirect(new Vector2(ArchaeaItem.StartThrowX(player), player.Center.Y - 24f), velocity, mod.ProjectileType <Flail>(), item.damage, item.knockBack, player.whoAmI, ai)); }
public override void HoldItem(Player player) { if (ground == null) { return; } if (index < ground.Length) { if (ArchaeaItem.Elapsed(5)) { Projectile.NewProjectileDirect(ground[index++], Vector2.Zero, mod.ProjectileType <Mercury>(), item.damage, item.knockBack, player.whoAmI, Mercury.Ground); } } }
public override void HoldItem(Player player) { if (index != -1) { if (index == 6) { index = -1; return; } if (ArchaeaItem.Elapsed(10)) { Vector2 start = NPCs.ArchaeaNPC.AngleBased(player.Center, angle, 45f); projs[index++] = Projectile.NewProjectileDirect(start, Vector2.Zero, mod.ProjectileType <Orbital>(), item.damage, item.knockBack, player.whoAmI, angle); angle += (float)Math.PI / 3f; } } }
public override void HoldItem(Item item, Player player) { if (player.releaseUseItem && player.controlUseItem && item.thrown) { float range = 500f; Target[] targets = Target.GetTargets(player, range).Where(t => t != null).ToArray(); if (targets == null) { return; } if (ArchaeaItem.ArmorSet(player, "Shock Mask", "Shock Plate", "Shock Greaves")) { foreach (Target target in targets) { if (Target.HitByThrown(player, target)) { Vector2 start = target.npc.Center - new Vector2(0f, 500f); ArchaeaItem.Bolt(player, target.npc, ref start); } break; } } } }