From 6520dfd6eb9b842f6bdd372f1901f33df9cd0fdf Mon Sep 17 00:00:00 2001 From: doze-zoze Date: Wed, 4 Mar 2026 20:47:03 -0600 Subject: [PATCH] Baguette now works with Red Wine again --- Buffs/Potions/BaguetteBuff.cs | 6 +++-- Items/Potions/Food/Baguette.cs | 27 +++++++++++++++---- .../en-US/Mods.CalamityMod.Buffs.hjson | 2 +- .../Mods.CalamityMod.Items.Potions.hjson | 1 + 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/Buffs/Potions/BaguetteBuff.cs b/Buffs/Potions/BaguetteBuff.cs index 878bca7213..8e6e11aac2 100644 --- a/Buffs/Potions/BaguetteBuff.cs +++ b/Buffs/Potions/BaguetteBuff.cs @@ -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; } } } diff --git a/Items/Potions/Food/Baguette.cs b/Items/Potions/Food/Baguette.cs index 862d4a1da9..d245dca640 100644 --- a/Items/Potions/Food/Baguette.cs +++ b/Items/Potions/Food/Baguette.cs @@ -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()) + { + 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(), Item.buffTime); + if (player.HasBuff()) + player.AddBuff(ModContent.BuffType(), RedWineRegenLossDuration); } public override void AddRecipes() diff --git a/Localization/en-US/Mods.CalamityMod.Buffs.hjson b/Localization/en-US/Mods.CalamityMod.Buffs.hjson index 478d7c4177..8f386dd8d3 100644 --- a/Localization/en-US/Mods.CalamityMod.Buffs.hjson +++ b/Localization/en-US/Mods.CalamityMod.Buffs.hjson @@ -674,7 +674,7 @@ AstralInjectionBuff: { BaguetteBuff: { DisplayName: Baguette - Description: Goes well with Red Wine + Description: Life regeneration reduced by 2 HP/s } BloodfinBoost: { diff --git a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson index 8b67806f2e..f87aed0533 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Potions.hjson @@ -22,6 +22,7 @@ Baguette: { Tooltip: ''' {$CommonItemTooltip.MinorStats} + Goes well with [cbuff:CalamityMod/RedWineBuff] [c/FCE391:'je suis Monte'] ''' }