Bloodworm now spoofs its bait power

To fix bugs with it hooking immediately and staying hooked for much longer than it should
This commit is contained in:
CongratsIsTrash committed 2026-02-18 22:49:51 -05:00
1 parent d05b690ac3
commit 867262d399
2 files changed
+17 -2

No files matched your search

+16 -2
View File
@@ -1,7 +1,10 @@
using CalamityMod.NPCs.AcidRain;
using System.Collections.Generic;
using System.Linq;
using CalamityMod.NPCs.AcidRain;
using CalamityMod.Rarities;
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;
namespace CalamityMod.Items.SummonItems
@@ -9,6 +12,8 @@ namespace CalamityMod.Items.SummonItems
public class BloodwormItem : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.SummonItems";
private const int SpoofBaitNumber = 4444;
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 3;
@@ -20,7 +25,10 @@ namespace CalamityMod.Items.SummonItems
Item.width = 28;
Item.height = 28;
Item.maxStack = Item.CommonMaxStack;
Item.bait = 4444;
// Why spoof this in the tooltip?
// To fix bugs related to how bait power affects hooking fish.
// Vanilla gets around this for Truffle Worm with a hundred hardcoded checks but we don't have the full luxury to do that.
Item.bait = 50;
Item.useStyle = ItemUseStyleID.Swing;
Item.autoReuse = true;
Item.useTurn = true;
@@ -38,5 +46,11 @@ namespace CalamityMod.Items.SummonItems
{
itemGroup = ContentSamples.CreativeHelper.ItemGroup.BossItem;
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
TooltipLine bait = tooltips.FirstOrDefault(x => x.Mod == "Terraria" && x.Name == "BaitPower");
bait?.Text = Language.GetTextValue("GameUI.BaitPower", SpoofBaitNumber);
}
}
}
+1
View File
@@ -3333,6 +3333,7 @@ namespace CalamityMod.Projectiles
{
projectile.ai[0] = 1;
projectile.localAI[1] = NPCType<OldDuke>() * -1;
baitPower = 4444; // Manually set the power to the displayed value
ReelTheBobberChecks();
}
else if (baitPower > 75)