using System;
using System.Linq;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.GameContent.ItemDropRules;
using Continuity.Content.Items;
namespace Continuity.Content
{
public class PlanteraDrops : GlobalNPC
public override void ModifyNPCLoot(NPC npc, NPCLoot npcLoot)
if (npc.type == NPCID.Plantera)
npcLoot.Add(ItemDropRule.Common(ModContent.ItemType<PalishadeTissue>(), 1, 25, 35));
}
public class PlanteraBossBag : GlobalItem
public override void ModifyItemLoot(Item item, ItemLoot itemLoot)
if (item.type == ItemID.PlanteraBossBag)
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);
itemLoot.RemoveWhere(rule => rule is CommonDrop drop
&& drop.itemId == ItemID.TempleKey);
foreach (var rule in itemLoot.Get())
itemLoot.RemoveWhere(rule => rule is OneFromRulesRule);