using System.Collections.Generic; using Decimation.Content.Items.Misc.Souls; using Decimation.Lib.Items; using Decimation.Lib.Util; using Decimation.Lib.Util.Builder; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace Decimation.Content.Items.Weapons.DuneWyrm { public class Timekeeper : DecimationWeapon { protected override string ItemName => "The Timekeeper"; protected override int Damages => 45; protected override DamageType DamagesType => DamageType.Ranged; protected override int ProjectileId => ModContent.ProjectileType(); protected override int AmmoId => AmmoID.Bullet; protected override void InitWeapon() { item.width = 58; item.height = 22; item.useStyle = ItemUseStyleID.HoldingOut; item.useTime = 10; item.useAnimation = 10; item.crit = 6; item.shootSpeed = 10f; item.rare = Rarity.LightRed.GetRarityValue(); item.value = Item.buyPrice(gold: 2, silver: 10); } protected override List GetRecipes() { return new List { new RecipeBuilder(this) .WithIngredient(ItemID.AncientBattleArmorMaterial) .WithIngredient(ModContent.ItemType(), 10) .WithIngredient(ItemID.Musket) .WithStation(TileID.MythrilAnvil) .Build(), new RecipeBuilder(this) .WithIngredient(ItemID.AncientBattleArmorMaterial) .WithIngredient(ModContent.ItemType(), 10) .WithIngredient(ItemID.TheUndertaker) .WithStation(TileID.MythrilAnvil) .Build() }; } public override bool ConsumeAmmo(Player player) { return !Main.rand.NextBool(10); } public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { type = ProjectileId; return true; } } }