Example #1
0
 public override void GetWeaponCrit(Player player, ref int crit)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         int throwingCrit = (int)ModSupport.GetModPlayerConditions("CalamityMod", player, "CalamityPlayer", "throwingCrit", false, false);
         crit = item.crit + throwingCrit;
     }
 }
Example #2
0
 public override void ModifyWeaponDamage(Player player, ref float add, ref float mult, ref float flat)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         float throwingDamage = (float)ModSupport.GetModPlayerConditions("CalamityMod", player, "CalamityPlayer", "throwingDamage", false, false);
         add += throwingDamage - 1f;
     }
 }
Example #3
0
 public override bool ConsumeItem(Player player)
 {
     if (ModSupport.GetMod("CalamityMod") != null)
     {
         bool throwingAmmoCost50 = (bool)ModSupport.GetModPlayerConditions("CalamityMod", player, "CalamityPlayer", "throwingAmmoCost50", false, false);
         bool throwingAmmoCost66 = (bool)ModSupport.GetModPlayerConditions("CalamityMod", player, "CalamityPlayer", "throwingAmmoCost66", false, false);
         return((!throwingAmmoCost50 || Main.rand.Next(1, 101) <= 50) && (!throwingAmmoCost66 || Main.rand.Next(1, 101) <= 66));
     }
     return(base.ConsumeItem(player));
 }
Example #4
0
        public override float UseTimeMultiplier(Player player)
        {
            float num = 1f;

            if (ModSupport.GetMod("CalamityMod") != null)
            {
                bool gloveOfPrecision    = (bool)ModSupport.GetModPlayerConditions("CalamityMod", player, "CalamityPlayer", "gloveOfPrecision", false, false);
                bool gloveOfRecklessness = (bool)ModSupport.GetModPlayerConditions("CalamityMod", player, "CalamityPlayer", "gloveOfRecklessness", false, false);
                if (gloveOfPrecision)
                {
                    num -= 0.2f;
                }
                if (gloveOfRecklessness)
                {
                    num += 0.2f;
                }
            }
            return(num);
        }