Decimation_Mod/Content/Items/Misc/BloodyLunarTablet.cs

37 lines
980 B
C#

using Decimation.Lib.Items;
using Decimation.Lib.Util;
using Terraria;
namespace Decimation.Content.Items.Misc
{
internal class BloodyLunarTablet : DecimationItem
{
protected override string ItemName => "Bloody Lunar Tablet";
protected override string ItemTooltip => "Summon blood moon.";
protected override void Init()
{
item.width = 30;
item.height = 40;
item.rare = Rarity.Green.GetRarityValue();
item.value = Item.buyPrice(gold: 5);
item.useStyle = 1;
item.useTime = 20;
item.useAnimation = 20;
item.consumable = true;
this.item.maxStack = 1;
}
public override bool CanUseItem(Player player)
{
return !Main.dayTime && !Main.bloodMoon;
}
public override bool UseItem(Player player)
{
Main.bloodMoon = true;
return true;
}
}
}