hotfix: bugged 'extra' drops for Plantera

This commit is contained in:
Muhammad Nauman Raza 2024-11-11 19:14:36 +00:00
parent fd5aa3cf52
commit fa6e6edc61
Signed by: devraza
GPG key ID: 91EAD6081011574B
2 changed files with 24 additions and 13 deletions

View file

@ -26,6 +26,18 @@ namespace Continuity.Content
{
public override void ModifyItemLoot(Item item, ItemLoot itemLoot)
{
short[] toRemove = {
ItemID.TheAxe,
ItemID.PygmyStaff,
ItemID.Seedling,
ItemID.ThornHook,
};
foreach (var i in toRemove)
{
itemLoot.RemoveWhere(rule => rule is CommonDropNotScalingWithLuck drop
&& drop.itemId == i);
}
if (item.type == ItemID.PlanteraBossBag)
{
itemLoot.Add(ItemDropRule.Common(ModContent.ItemType<PalishadeTissue>(), 1, 25, 35));
@ -45,20 +57,8 @@ namespace Continuity.Content
itemLoot.RemoveWhere(rule => rule is CommonDrop drop
&& drop.itemId == BlossomFlux.Type);
}
} else {
short[] toRemove = {
ItemID.TheAxe,
ItemID.PygmyStaff,
ItemID.Seedling,
ItemID.ThornHook,
};
foreach (var i in toRemove)
{
itemLoot.RemoveWhere(rule => rule is CommonDropNotScalingWithLuck drop
&& drop.itemId == i);
}
}
}
}
}
}
}

View file

@ -15,6 +15,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.Stinger, 3);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 9);
recipe.AddIngredient(ItemID.JungleSpores, 6);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// The Axe
@ -23,12 +24,14 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.Stinger, 2);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 10);
recipe.AddIngredient(ItemID.JungleSpores, 3);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Temple Key
recipe = Recipe.Create(ItemID.TempleKey);
recipe.AddIngredient(ItemID.ChlorophyteBar, 2);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 3);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Nettle Burst
@ -37,6 +40,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.Stinger, 4);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 6);
recipe.AddIngredient(ItemID.Vine, 3);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Pygmy Staff
@ -45,6 +49,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.Stinger, 4);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 9);
recipe.AddIngredient(ItemID.Vine, 2);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Flower Pow
@ -54,6 +59,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.JungleRose, 1);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 10);
recipe.AddIngredient(ItemID.Vine, 3);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Leaf Blower
@ -62,6 +68,7 @@ namespace Continuity.Content
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 8);
recipe.AddIngredient(ItemID.Vine, 1);
recipe.AddIngredient(ItemID.JungleSpores, 8);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Venus Magnum
@ -70,6 +77,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.Handgun, 1);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 6);
recipe.AddIngredient(ItemID.Vine, 2);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Grenade Launcher
@ -77,6 +85,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.ChlorophyteBar, 10);
recipe.AddRecipeGroup(RecipeGroupID.IronBar, 8);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 10);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Thorn Hook
@ -84,6 +93,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.Stinger, 3);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 2);
recipe.AddIngredient(ItemID.Vine, 5);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
// Blossom Flux (Calamity)
@ -92,6 +102,7 @@ namespace Continuity.Content
recipe.AddIngredient(ItemID.ChlorophyteShotbow, 1);
recipe.AddIngredient(ModContent.ItemType<PalishadeTissue>(), 8);
recipe.AddIngredient(ItemID.Vine, 4);
recipe.AddTile(ItemID.MythrilAnvil);
recipe.Register();
}
}