Files
CalamityModPublic/Items/RelicOfConvergence.cs
T

44 lines
1.7 KiB
C#

using CalamityMod.Projectiles.Typeless;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items
{
public class RelicOfConvergence : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Relic of Convergence");
Tooltip.SetDefault("Creates a profaned crystal that charges power\n" +
"Holding out the crystal slows the player down\n" +
"At the end of its life, the crystal heals the player for 70 HP");
SacrificeTotal = 1;
ItemID.Sets.CanBePlacedOnWeaponRacks[Item.type] = true;
}
public override void SetDefaults()
{
Item.width = 32;
Item.height = 46;
Item.useTime = Item.useAnimation = 25;
Item.reuseDelay = 15;
Item.useStyle = ItemUseStyleID.Shoot;
Item.UseSound = SoundID.DD2_DarkMageCastHeal;
Item.noMelee = true;
Item.noUseGraphic = true;
Item.channel = true;
Item.value = CalamityGlobalItem.Rarity11BuyPrice;
Item.rare = ItemRarityID.Purple;
Item.shoot = ModContent.ProjectileType<RelicOfConvergenceCrystal>();
}
public override void ModifyResearchSorting(ref ContentSamples.CreativeHelper.ItemGroup itemGroup)
{
itemGroup = (ContentSamples.CreativeHelper.ItemGroup)CalamityResearchSorting.ToolsOther;
}
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[Item.shoot] <= 0 && player.ownedProjectileCounts[ModContent.ProjectileType<RelicOfDeliveranceSpear>()] <= 0;
}
}