Added Wasp Nest.
This commit is contained in:
parent
1a01dde0cd
commit
66ec20095d
48
Content/Items/Accessories/WaspNest.cs
Normal file
48
Content/Items/Accessories/WaspNest.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using Decimation.Lib.Items;
|
||||||
|
using Decimation.Lib.Util;
|
||||||
|
using Decimation.Lib.Util.Builder;
|
||||||
|
using Terraria;
|
||||||
|
using Terraria.ID;
|
||||||
|
using Terraria.ModLoader;
|
||||||
|
|
||||||
|
namespace Decimation.Content.Items.Accessories
|
||||||
|
{
|
||||||
|
public class WaspNest : DecimationAccessory
|
||||||
|
{
|
||||||
|
protected override string ItemName => "Wasp Nest";
|
||||||
|
|
||||||
|
protected override void InitAccessory()
|
||||||
|
{
|
||||||
|
item.width = 32;
|
||||||
|
item.height = 30;
|
||||||
|
item.value = Item.buyPrice(silver: 10);
|
||||||
|
item.rare = Rarity.Blue.GetRarityValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.AddBuff(BuffID.Thorns, 600);
|
||||||
|
|
||||||
|
base.UpdateAccessory(player, hideVisual);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override ModRecipe GetRecipe()
|
||||||
|
{
|
||||||
|
return new RecipeBuilder(this)
|
||||||
|
.WithIngredient(ItemID.BeeWax, 10)
|
||||||
|
.WithIngredient(ItemID.Stinger, 15)
|
||||||
|
.WithIngredient(ItemID.BottledHoney)
|
||||||
|
.WithStation(TileID.WorkBenches)
|
||||||
|
.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal class WaspNestPoisonEffect : GlobalNPC
|
||||||
|
{
|
||||||
|
public override void OnHitPlayer(NPC npc, Player target, int damage, bool crit)
|
||||||
|
{
|
||||||
|
if (target.HasEquippedAccessory(ModContent.ItemType<WaspNest>()) && Main.rand.NextBool(2))
|
||||||
|
npc.AddBuff(BuffID.Poisoned, 600);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Content/Items/Accessories/WaspNest.png
Normal file
BIN
Content/Items/Accessories/WaspNest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 594 B |
@ -1,4 +1,7 @@
|
|||||||
namespace Decimation.Lib.Items
|
using Decimation.Lib.Util;
|
||||||
|
using Terraria;
|
||||||
|
|
||||||
|
namespace Decimation.Lib.Items
|
||||||
{
|
{
|
||||||
public abstract class DecimationAccessory : DecimationItem
|
public abstract class DecimationAccessory : DecimationItem
|
||||||
{
|
{
|
||||||
@ -11,5 +14,10 @@
|
|||||||
|
|
||||||
InitAccessory();
|
InitAccessory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void UpdateAccessory(Player player, bool hideVisual)
|
||||||
|
{
|
||||||
|
player.EquipAccessory(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user