Exemplo n.º 1
0
 public override bool UseItem(Player player)
 {
     if (Mharadium.IsInHell(player.position))
     {
         NPC.SpawnOnPlayer(Main.myPlayer, mod.NPCType("SatansServant"));
         Main.PlaySound(15, (int)player.position.X, (int)player.position.Y, 0);
     }
     else
     {
         Main.NewText("This action can only be performed in hell!", 255, 255, 0, true);
         item.stack++;
     }
     return(true);
 }
Exemplo n.º 2
0
        public override void RightClick(int i, int j)
        {
            Player player = Main.player[Main.myPlayer];

            for (int index = 0; index < player.inventory.Length; ++index)
            {
                if (player.inventory[index].type == mod.ItemType("DemonFetus"))
                {
                    if (Mharadium.IsInHell(player.position))
                    {
                        Main.NewText("You inserted the Demon Fetus!", 255, 255, 0, true);
                        player.inventory[index].stack--;
                        // Summon boss here.
                    }
                    else
                    {
                        Main.NewText("This action can only be performed in hell!", 255, 255, 0, true);
                    }
                    return;
                }
            }
            Main.NewText("You do not have the required item(s).", 255, 255, 0, true);
        }