Baguette now works with Red Wine again

This commit is contained in:
doze-zoze authored and Cameron Ewell committed 2026-04-07 19:25:08 -04:00
1 parent 9a2ef4d6f7
commit 6520dfd6eb
4 files changed
+28 -8

No files matched your search

+4 -2
View File
@@ -1,4 +1,5 @@
using Terraria;
using CalamityMod.Items.Potions.Food;
using Terraria;
using Terraria.ModLoader;
namespace CalamityMod.Buffs.Potions
@@ -7,7 +8,7 @@ namespace CalamityMod.Buffs.Potions
{
public override void SetStaticDefaults()
{
Main.debuff[Type] = false;
Main.debuff[Type] = true;
Main.pvpBuff[Type] = true;
Main.buffNoSave[Type] = false;
}
@@ -15,6 +16,7 @@ namespace CalamityMod.Buffs.Potions
public override void Update(Player player, ref int buffIndex)
{
player.Calamity().baguette = true;
player.lifeRegen -= Baguette.RedWineRegenLoss;
}
}
}
+22 -5
View File
@@ -1,4 +1,5 @@
using CalamityMod.Buffs.Potions;
using CalamityMod.Buffs.Alcohol;
using CalamityMod.Buffs.Potions;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.DataStructures;
@@ -12,9 +13,10 @@ namespace CalamityMod.Items.Potions.Food
{
public new string LocalizationCategory => "Items.Potions";
public static int RedWineBuffedHealValue = 250;
public static int RedWineBuffedRegenLoss = 4;
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RedWineBuffedHealValue, RedWineBuffedRegenLoss.ToRegenPerSecond());
public static int RedWineHealValue = 200;
public static int RedWineRegenLoss = 4;
public static int RedWineRegenLossDuration = CalamityUtils.SecondsToFrames(15);
public override LocalizedText Tooltip => base.Tooltip.WithFormatArgs(RedWineRegenLoss.ToRegenPerSecond());
public override void SetStaticDefaults()
{
@@ -28,6 +30,20 @@ namespace CalamityMod.Items.Potions.Food
ItemID.Sets.IsFood[Type] = true;
}
public override void UpdateInventory(Player player)
{
if (player.HasBuff<RedWineBuff>())
{
Item.healLife = RedWineHealValue;
Item.potion = true;
}
else
{
Item.healLife = 0;
Item.potion = false;
}
}
public override void SetDefaults()
{
Item.DefaultToFood(52, 38, BuffID.WellFed, CalamityUtils.MinutesToFrames(5));
@@ -45,7 +61,8 @@ namespace CalamityMod.Items.Potions.Food
{
// 5 minutes for both
player.AddBuff(BuffID.WellFed, Item.buffTime);
player.AddBuff(ModContent.BuffType<BaguetteBuff>(), Item.buffTime);
if (player.HasBuff<RedWineBuff>())
player.AddBuff(ModContent.BuffType<BaguetteBuff>(), RedWineRegenLossDuration);
}
public override void AddRecipes()
@@ -674,7 +674,7 @@ AstralInjectionBuff: {
BaguetteBuff: {
DisplayName: Baguette
Description: Goes well with Red Wine
Description: Life regeneration reduced by 2 HP/s
}
BloodfinBoost: {
@@ -22,6 +22,7 @@ Baguette: {
Tooltip:
'''
{$CommonItemTooltip.MinorStats}
Goes well with [cbuff:CalamityMod/RedWineBuff]
[c/FCE391:'je suis Monte']
'''
}