예제 #1
0
 public override void OpenVanillaBag(string context, Player player, int arg)
 {
     if (context != "goodieBag")
     {
         return;
     }
     ItemUtils.DropCandy(player);
     if (Main.rand.Next(3) == 0)
     {
         int[] lootTable =
         {
             ModContent.ItemType <MaskSchmo>(),
             ModContent.ItemType <MaskGraydee>(),
             ModContent.ItemType <MaskLordCake>(),
             ModContent.ItemType <MaskVladimier>(),
             ModContent.ItemType <MaskKachow>(),
             ModContent.ItemType <MaskBlaze>(),
             ModContent.ItemType <MaskSvante>(),
             ModContent.ItemType <MaskIggy>(),
             ModContent.ItemType <MaskYuyutsu>(),
             ModContent.ItemType <MaskLeemyy>()
         };
         int loot = Main.rand.Next(lootTable.Length);
         player.QuickSpawnItem(lootTable[loot]);
     }
 }
예제 #2
0
 public override void OpenVanillaBag(string context, Player player, int arg)
 {
     if (context != "goodieBag")
     {
         return;
     }
     ItemUtils.DropCandy(player);
     if (Main.rand.Next(3) == 0)
     {
         string[] lootTable = { "MaskSchmo", "MaskGraydee", "MaskLordCake", "MaskVladimier", "MaskKachow", "MaskHulk", "MaskBlaze", "MaskSvante", "MaskIggy", "MaskYuyutsu", "MaskLeemyy", };
         int      loot      = Main.rand.Next(lootTable.Length);
         player.QuickSpawnItem(mod.ItemType(lootTable[loot]));
     }
 }
예제 #3
0
        public override void RightClick(int i, int j)
        {
            if (Main.dayTime)
            {
                return;
            }

            Player   player    = Main.player[Main.myPlayer];
            MyPlayer modPlayer = player.GetModPlayer <MyPlayer>();

            if (modPlayer.candyInBowl <= 0)
            {
                return;
            }

            ItemUtils.DropCandy(player);
            modPlayer.candyInBowl--;
        }