Facebook
From options, 2 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 47
  1. using Terraria;
  2. using Terraria.ID;
  3. using Terraria.ModLoader;
  4.  
  5. namespace DuckingAround
  6. {
  7.     public class yourmodItem : GlobalItem
  8.     {
  9.         public override bool CanUseItem(Item item, Player player)
  10.         {
  11.             if (player.HasBuff(ModContent.BuffType<Buffs.DeathProtDebuff>()) && item.type == ItemID.LesserManaPotion || item.type == ItemID.ManaPotion || item.type == ItemID.GreaterManaPotion || item.type == ItemID.SuperManaPotion)
  12.             {
  13.                 return false;
  14.             }
  15.             else
  16.             {
  17.                 return true;
  18.             }
  19.         }
  20.     }
  21. }