public override void ModifyTooltips(List <TooltipLine> tooltips)
 {
     foreach (TooltipLine line in tooltips)
     {
         if (line.Name == "Tooltip0")
         {
             string positive = "";
             for (int i = 0; i < ItemsOnPotion.Count; i++)
             {
                 var p = AlchEffects.AlchGetPositiveTooltip(ItemsOnPotion[i], ItemsOnPotion[i].stack);
                 if (p != "")
                 {
                     positive += p + (i == ItemsOnPotion.Count - 1 ? "" : "\n");
                 }
             }
             line.text          = positive;
             line.overrideColor = Color.LightGreen;
         }
         if (line.Name == "Tooltip1")
         {
             string negative = "";
             for (int i = 0; i < ItemsOnPotion.Count; i++)
             {
                 var n = AlchEffects.AlchGetNegativeTooltip(ItemsOnPotion[i], ItemsOnPotion[i].stack);
                 if (n != "")
                 {
                     negative += n + (i == ItemsOnPotion.Count - 1 ? "" : "\n");
                 }
             }
             line.text          = negative;
             line.overrideColor = Color.OrangeRed;
         }
     }
 }
Example #2
0
 public override void OnHitNPC(Item item, NPC target, int damage, float knockback, bool crit)
 {
     if (!player.HasBuff(ModContent.BuffType <AlchBuff>()))
     {
         return;
     }
     for (int i = 0; i < ItemsOnPotion.Count(); i++)
     {
         AlchEffects.AlchOnMeleeHit(player, ItemsOnPotion[i].stack, ItemsOnPotion[i], target, damage, knockback, crit);
     }
 }
Example #3
0
 public override void PostUpdateEquips()
 {
     if (!player.HasBuff(ModContent.BuffType <AlchBuff>()))
     {
         return;
     }
     for (int i = 0; i < ItemsOnPotion.Count(); i++)
     {
         AlchEffects.AlchPostUpdateEquip(player, ItemsOnPotion[i].stack, ItemsOnPotion[i]);
     }
 }
Example #4
0
        public override void ModifyBuffTip(ref string tip, ref int rare)
        {
            var positive = "";
            var negative = "";

            for (int i = 0; i < ItemsOnPotion.Count; i++)
            {
                var p = AlchEffects.AlchGetPositiveTooltip(ItemsOnPotion[i], ItemsOnPotion[i].stack);
                if (p != "")
                {
                    positive += p + (i == ItemsOnPotion.Count - 1 ? "" : "\n");
                }
                var n = AlchEffects.AlchGetNegativeTooltip(ItemsOnPotion[i], ItemsOnPotion[i].stack);
                if (n != "")
                {
                    negative += n + (i == ItemsOnPotion.Count - 1 ? "" : "\n");
                }
            }
            tip = positive + "\n" + negative;
        }