45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
using CalamityMod.Buffs.Alcohol;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Items.Potions.Alcohol
|
|
{
|
|
public class RedWine : ModItem, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Items.Potions";
|
|
public override void SetStaticDefaults()
|
|
{
|
|
Item.ResearchUnlockCount = 5;
|
|
}
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Item.width = 28;
|
|
Item.height = 18;
|
|
Item.useTurn = true;
|
|
Item.maxStack = 9999;
|
|
Item.rare = ItemRarityID.LightRed;
|
|
Item.useAnimation = 17;
|
|
Item.useTime = 17;
|
|
Item.useStyle = ItemUseStyleID.DrinkLiquid;
|
|
Item.UseSound = SoundID.Item3;
|
|
Item.healLife = 200;
|
|
Item.consumable = true;
|
|
Item.potion = true;
|
|
Item.value = Item.buyPrice(0, 0, 65, 0);
|
|
}
|
|
|
|
public override bool? UseItem(Player player)
|
|
{
|
|
Item.healLife = player.Calamity().baguette ? 250 : 200;
|
|
return null;
|
|
}
|
|
|
|
public override void OnConsumeItem(Player player)
|
|
{
|
|
player.AddBuff(ModContent.BuffType<RedWineBuff>(), 900);
|
|
}
|
|
}
|
|
}
|