40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using Decimation.Lib.Items;
|
|
using Decimation.Lib.Util;
|
|
using Terraria;
|
|
using Terraria.DataStructures;
|
|
using Terraria.ID;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace Decimation.Content.Items.Misc.Souls
|
|
{
|
|
internal class SoulofSpite : DecimationItem
|
|
{
|
|
protected override string ItemName => "Soul of Spite";
|
|
protected override string ItemTooltip => "The essence of malice.";
|
|
protected override DrawAnimation Animation => new DrawAnimationVertical(5, 4);
|
|
|
|
protected override void Init()
|
|
{
|
|
item.width = 22;
|
|
item.height = 22;
|
|
item.maxStack = 999;
|
|
item.value = Item.sellPrice(silver: 3);
|
|
item.rare = Rarity.Pink.GetRarityValue();
|
|
|
|
ItemID.Sets.AnimatesAsSoul[item.type] = true;
|
|
ItemID.Sets.ItemIconPulse[item.type] = true;
|
|
ItemID.Sets.ItemNoGravity[item.type] = true;
|
|
}
|
|
}
|
|
|
|
internal class SoulofSpiteNpcEffect : GlobalNPC
|
|
{
|
|
public override void NPCLoot(NPC npc)
|
|
{
|
|
if (NPC.downedPlantBoss && Main.LocalPlayer.ZoneUnderworldHeight &&
|
|
(!Main.expertMode && Main.rand.NextBool(5) || Main.expertMode && Main.rand.NextBool(9, 26)))
|
|
Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height,
|
|
ModContent.ItemType<SoulofSpite>());
|
|
}
|
|
}
|
|
} |