Decimation_Mod/Content/Items/Weapons/DuneWyrm/Timekeeper.cs
FyloZ 317b3759c8 Finished the Sundial.
Added tooltips to the Staff of Shifting Sands and the Timekeeper.
2020-07-01 12:02:21 -04:00

68 lines
2.3 KiB
C#

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 string ItemTooltip => "Their time has come...";
protected override int Damages => 45;
protected override DamageType DamagesType => DamageType.Ranged;
protected override int ProjectileId => ModContent.ProjectileType<Projectiles.DuneWyrm.Timekeeper>();
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<ModRecipe> GetRecipes()
{
return new List<ModRecipe>
{
new RecipeBuilder(this)
.WithIngredient(ItemID.AncientBattleArmorMaterial)
.WithIngredient(ModContent.ItemType<SoulofTime>(), 10)
.WithIngredient(ItemID.Musket)
.WithStation(TileID.MythrilAnvil)
.Build(),
new RecipeBuilder(this)
.WithIngredient(ItemID.AncientBattleArmorMaterial)
.WithIngredient(ModContent.ItemType<SoulofTime>(), 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;
}
}
}