using CalamityMod.Projectiles.Summon; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace CalamityMod.Items.Weapons.Summon { public class PolypLauncher : ModItem { public override void SetStaticDefaults() { DisplayName.SetDefault("Polyp Launcher"); Tooltip.SetDefault("Summons a polyp bunch that launches coral chunks at nearby enemies"); } public override void SetDefaults() { item.damage = 12; item.mana = 10; item.width = 10; item.height = 32; item.useTime = item.useAnimation = 35; item.useStyle = ItemUseStyleID.SwingThrow; item.noMelee = true; item.knockBack = 0f; item.value = Item.buyPrice(0, 2, 0, 0); item.rare = 2; item.UseSound = SoundID.Item44; item.autoReuse = true; item.shoot = ModContent.ProjectileType(); item.shootSpeed = 10f; item.summon = true; } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { //CalamityUtils.OnlyOneSentry(player, type); Projectile.NewProjectile(Main.MouseWorld, Vector2.Zero, type, damage, knockBack, player.whoAmI, 20f); player.UpdateMaxTurrets(); return false; } } }