-
Notifications
You must be signed in to change notification settings - Fork 3
/
JumboCactuarBag.cs
44 lines (39 loc) · 1.26 KB
/
JumboCactuarBag.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
42
43
44
using Terraria;
using Terraria.ModLoader;
namespace JoostMod.Items
{
public class JumboCactuarBag : 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("JumboCactuar");
public override bool CanRightClick()
{
return true;
}
public override void OpenBossBag(Player player)
{
player.TryGettingDevArmor();
player.TryGettingDevArmor();
player.QuickSpawnItem(mod.ItemType("CactuarShield"));
player.QuickSpawnItem(mod.ItemType("Cactustoken"), 1 + Main.rand.Next(2));
player.QuickSpawnItem(mod.ItemType("DecisiveBattleMusicBox"));
if (Main.rand.Next(4) == 0)
{
player.QuickSpawnItem(mod.ItemType("JumboCactuarMask"));
}
}
}
}