Added Trinity items drop.
Prevent Prefix on Trinity items.
This commit is contained in:
parent
8ea2e21eb6
commit
e61040d1e5
@ -1,7 +1,9 @@
|
||||
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
|
||||
{
|
||||
@ -10,7 +12,35 @@ namespace Decimation.Content.Items.Accessories.Trinity
|
||||
public override bool CanEquipAccessory(Player player, int slot)
|
||||
{
|
||||
return !player.HasEquippedAccessory(ModContent.ItemType<Body>()) &&
|
||||
!player.HasEquippedAccessory(ModContent.ItemType<Soul>());
|
||||
!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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,7 +61,6 @@ namespace Decimation.Lib.Tiles
|
||||
|
||||
public override void KillMultiTile(int i, int j, int frameX, int frameY)
|
||||
{
|
||||
Main.NewText(1);
|
||||
Item.NewItem(i * 16, j * 16, _width, _height, TileItem);
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ namespace Decimation.Lib.Util
|
||||
{
|
||||
int manaAmount = Main.rand.Next(minMana, maxMana + 1);
|
||||
player.ManaEffect(manaAmount);
|
||||
Main.NewText(manaAmount);
|
||||
|
||||
if (target.GetType() == typeof(Player))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user