using Decimation.Content.Items.Ammo; using Decimation.Lib.Items; using Decimation.Lib.Util; using Decimation.Lib.Util.Builder; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace Decimation.Content.Items.Weapons { internal class Sling : DecimationWeapon { protected override string ItemName => "Sling"; protected override string ItemTooltip => "Uses pebbles and marbles as ammo"; protected override DamageType DamagesType => DamageType.Throw; protected override int Damages => 9; protected override int AmmoId => ModContent.ItemType(); protected override void InitWeapon() { item.width = 28; item.height = 26; item.useTime = 25; item.useAnimation = 25; item.rare = Rarity.Orange.GetRarityValue(); item.shootSpeed = 7.5f; item.crit = 10; item.shoot = 1; item.useTurn = false; item.value = Item.sellPrice(copper: 12); } protected override ModRecipe GetRecipe() { return new RecipeBuilder(this) .WithIngredient(ItemID.Leather) .WithIngredient(ItemID.Cobweb, 5) .WithStation(TileID.Tables) .WithStation(TileID.Chairs) .Build(); } } }