46 lines
1.5 KiB
C#
46 lines
1.5 KiB
C#
using Decimation.Lib.Items;
|
|
using Decimation.Lib.Util;
|
|
using Terraria;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
using Terraria.Utilities;
|
|
|
|
namespace Decimation.Content.Items.Accessories.Trinity
|
|
{
|
|
public abstract class TrinityAccessory : DecimationAccessory
|
|
{
|
|
public override bool CanEquipAccessory(Player player, int slot)
|
|
{
|
|
return !player.HasEquippedAccessory(ModContent.ItemType<Body>()) &&
|
|
!player.HasEquippedAccessory(ModContent.ItemType<Soul>()) &&
|
|
!player.HasEquippedAccessory(ModContent.ItemType<Mind>());
|
|
}
|
|
|
|
public override bool? PrefixChance(int pre, UnifiedRandom rand)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
|
|
class TrinityBossBagEffects : GlobalItem
|
|
{
|
|
public override void OpenVanillaBag(string context, Player player, int arg)
|
|
{
|
|
if (context == "bossBag")
|
|
{
|
|
switch (arg)
|
|
{
|
|
case ItemID.TwinsBossBag:
|
|
player.QuickSpawnItem(ModContent.ItemType<Mind>());
|
|
break;
|
|
case ItemID.DestroyerBossBag:
|
|
player.QuickSpawnItem(ModContent.ItemType<Body>());
|
|
break;
|
|
case ItemID.SkeletronPrimeBossBag:
|
|
player.QuickSpawnItem(ModContent.ItemType<Soul>());
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |