55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using CalamityMod.Items.Materials;
|
|
using CalamityMod.Projectiles.Melee.Spears;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Terraria.GameContent.Creative;
|
|
|
|
namespace CalamityMod.Items.Weapons.Melee
|
|
{
|
|
public class SpatialLance : ModItem
|
|
{
|
|
public override void SetStaticDefaults()
|
|
{
|
|
DisplayName.SetDefault("Elemental Lance");
|
|
Tooltip.SetDefault("Rend the cosmos asunder!\n" +
|
|
"Fires a lance beam that splits multiple times as it travels");
|
|
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 88;
|
|
Item.damage = 160;
|
|
Item.DamageType = DamageClass.Melee;
|
|
Item.noMelee = true;
|
|
Item.useTurn = true;
|
|
Item.noUseGraphic = true;
|
|
Item.useAnimation = 30;
|
|
Item.useStyle = ItemUseStyleID.Shoot;
|
|
Item.useTime = 30;
|
|
Item.knockBack = 9.5f;
|
|
Item.UseSound = SoundID.Item1;
|
|
Item.autoReuse = true;
|
|
Item.height = 88;
|
|
Item.value = CalamityGlobalItem.Rarity11BuyPrice;
|
|
Item.rare = ItemRarityID.Purple;
|
|
Item.shoot = ModContent.ProjectileType<SpatialLanceProjectile>();
|
|
Item.shootSpeed = 12f;
|
|
}
|
|
|
|
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0;
|
|
|
|
public override void AddRecipes()
|
|
{
|
|
CreateRecipe().
|
|
AddIngredient<TerraLance>().
|
|
AddIngredient(ItemID.NorthPole).
|
|
AddIngredient<GalacticaSingularity>(5).
|
|
AddIngredient(ItemID.LunarBar, 5).
|
|
AddTile(TileID.LunarCraftingStation).
|
|
Register();
|
|
}
|
|
}
|
|
}
|