51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using Decimation.Content.Items.Ores;
|
|
using Decimation.Content.Projectiles;
|
|
using Decimation.Content.Tiles;
|
|
using Decimation.Lib.Items;
|
|
using Decimation.Lib.Util;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace Decimation.Content.Items.Weapons
|
|
{
|
|
internal class TitanicPike : DecimationWeapon
|
|
{
|
|
protected override string ItemName => "Titanic Pike";
|
|
protected override int Damages => 120;
|
|
protected override int ProjectileId => ModContent.ProjectileType<TitanicPikeProjectile>();
|
|
|
|
protected override void InitWeapon()
|
|
{
|
|
item.crit = 14;
|
|
item.knockBack = 12;
|
|
item.useStyle = 5;
|
|
item.value = Item.buyPrice(gold: 45);
|
|
item.rare = Rarity.LightPurple.GetRarityValue();
|
|
item.noUseGraphic = true;
|
|
item.useTurn = true;
|
|
item.autoReuse = true;
|
|
item.width = 88;
|
|
item.height = 88;
|
|
item.useAnimation = 18;
|
|
item.useTime = 24;
|
|
item.shootSpeed = 3.7f;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player)
|
|
{
|
|
// Ensures no more than one spear can be thrown out, use this when using autoReuse
|
|
return player.ownedProjectileCounts[item.shoot] < 1;
|
|
}
|
|
|
|
protected override ModRecipe GetRecipe()
|
|
{
|
|
ModRecipe recipe = GetNewModRecipe(this, 1, ModContent.TileType<TitanForge>());
|
|
|
|
recipe.AddIngredient(ModContent.ItemType<TitaniteBar>(), 12);
|
|
recipe.AddIngredient(ItemID.SoulofMight, 15);
|
|
|
|
return recipe;
|
|
}
|
|
}
|
|
} |