Decimation_Mod/Content/Items/Misc/Souls/SoulofLife.cs
FyloZ acc592b251 Updated souls.
Added all Concentrated Souls.
2020-07-15 12:01:13 -04:00

39 lines
1.3 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 SoulofLife : DecimationItem
{
protected override string ItemName => "Soul of Life";
protected override string ItemTooltip => "The essence of living cells.";
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;
}
public class SoulGlobalNPC : GlobalNPC
{
public override void NPCLoot(NPC npc)
{
if (npc.type == NPCID.Plantera)
Item.NewItem((int) npc.position.X, (int) npc.position.Y, npc.width, npc.height,
ModContent.ItemType<SoulofLife>(), Main.rand.Next(12, 25));
}
}
}
}