-
Notifications
You must be signed in to change notification settings - Fork 3
/
GrandCactusWormBag.cs
41 lines (37 loc) · 1.05 KB
/
GrandCactusWormBag.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Terraria;
using Terraria.ModLoader;
namespace JoostMod.Items
{
public class GrandCactusWormBag : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Treasure Bag");
Tooltip.SetDefault("Right click to open");
}
public override void SetDefaults()
{
item.maxStack = 999;
item.consumable = true;
item.width = 24;
item.height = 24;
item.expert = true;
item.rare = -12;
}
public override int BossBagNPC => mod.NPCType("GrandCactusWormHead");
public override bool CanRightClick()
{
return true;
}
public override void OpenBossBag(Player player)
{
player.QuickSpawnItem(mod.ItemType("CactusWormHook"));
player.QuickSpawnItem(mod.ItemType("LusciousCactus"), 10+Main.rand.Next(16));
player.QuickSpawnItem(mod.ItemType("DeoremMuaMusicBox"));
if (Main.rand.Next(4) == 0)
{
player.QuickSpawnItem(mod.ItemType("GrandCactusWormMask"));
}
}
}
}