public override void ProjModifyHitNPC(Item item, Player player, Projectile projectile, NPC target, ref float damageMultiplier, ref float knockbackMultiplier, ref bool crit, ref int hitDirection)
 {
     if (crit && AffixItemItem.IsAccessoryEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
 public override void ProjModifyHitPvp(Item item, Player player, Projectile projectile, Player target, ref float damageMultiplier, ref bool crit)
 {
     if (crit && AffixItemItem.IsAccessoryEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
Пример #3
0
 public override void PlayerModifyHitPvp(Item affixItem, Player player, Item item, Player target, ref float damageMultiplier, ref bool crit)
 {
     if (AffixItemItem.IsAccessoryEquipped(affixItem, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
 public override void PlayerModifyHitNPC(Item affixItem, Player player, Item item, NPC target, ref float damageMultiplier, ref float knockbackMultiplier, ref bool crit)
 {
     if (crit && AffixItemItem.IsAccessoryEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
 void Shock(Item item, Player player, NPC target)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player) && Main.rand.NextFloat(1f) < Type1.GetValue())
     {
         target.GetGlobalNPC <BuffNPC>().AddShockedBuff(target, Type2.GetValue(), PathOfModifiers.ailmentDuration);
     }
 }
Пример #6
0
 public override void NaturalLifeRegen(Item item, Player player, ref float regenMultiplier)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         regenMultiplier += Type1.GetValue();
     }
 }
 public override void PlayerGetWeaponCrit(Item item, Item heldItem, Player player, ref float multiplier)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         multiplier += Type1.GetValue();
     }
 }
Пример #8
0
 void Chill(Item item, Player player, Player target)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player) && Main.rand.NextFloat(1f) < Type1.GetValue())
     {
         target.GetModPlayer <BuffPlayer>().AddChilledBuff(target, Type2.GetValue(), PathOfModifiers.ailmentDuration);
     }
 }
Пример #9
0
 public override bool PreHurt(Item item, Player player, bool pvp, bool quiet, ref float damageMultiplier, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
     return(true);
 }
Пример #10
0
 void GainVelocity(Item item, Player player, Vector2 position)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         Vector2 addVelocity = (position - player.Center).SafeNormalize(Vector2.Zero) * Type1.GetValue();
         player.velocity += addVelocity;
     }
 }
 void GainDodgeChance(Item item, Player player)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player) && (Main.GameUpdateCount - lastProcTime) >= (int)Math.Round(Type3.GetValue() * 60))
     {
         int durationTicks = (int)Math.Round((Type2.GetValue() * 60));
         player.GetModPlayer <BuffPlayer>().AddDodgeChanceBuff(player, Type1.GetValue(), durationTicks, false);
         lastProcTime = Main.GameUpdateCount;
     }
 }
Пример #12
0
 public override bool PlayerConsumeAmmo(Player player, Item item, Item ammo, ref float chanceToNotConsume)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         float value = Type1.GetValue();
         chanceToNotConsume += value;
     }
     return(true);
 }
Пример #13
0
        public override bool PreHurt(Item item, Player player, bool pvp, bool quiet, ref float damageMultiplier, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
        {
            if (AffixItemItem.IsAccessoryEquipped(item, player) && (Main.GameUpdateCount - lastProcTime) >= (int)Math.Round(Type2.GetValue() * 60))
            {
                damageMultiplier += Type1.GetValue();
                lastProcTime      = Main.GameUpdateCount;
            }

            return(true);
        }
Пример #14
0
 void Heal(Item item, Player player)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         int amount = (int)MathHelper.Clamp(player.statManaMax2 * Type1.GetValue(), 1, 9999999);
         if (amount > 0)
         {
             player.statMana += amount;
             PoMEffectHelper.HealMana(player, amount);
         }
     }
 }
Пример #15
0
        public override bool PreHurt(Item item, Player player, bool pvp, bool quiet, ref float damageMultiplier, ref int hitDirection, ref bool crit, ref bool customDamage, ref bool playSound, ref bool genGore, ref PlayerDeathReason damageSource)
        {
            if (AffixItemItem.IsAccessoryEquipped(item, player))
            {
                int manaAmount = (int)Math.Round(player.statManaMax2 * Type1.GetValue());
                player.statMana += manaAmount;
                PoMEffectHelper.HealMana(player, manaAmount);
                damageMultiplier += Type2.GetValue();
            }

            return(true);
        }
Пример #16
0
 void Heal(Item item, Player player)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player) && (Main.GameUpdateCount - lastProcTime) >= (int)Math.Round(Type2.GetValue() * 60))
     {
         lastProcTime = Main.GameUpdateCount;
         int amount = Type1.GetValue();
         if (amount > 0)
         {
             player.statLife += amount;
             PoMEffectHelper.Heal(player, amount);
         }
         else
         {
             player.immune = false;
             player.Hurt(PlayerDeathReason.ByPlayer(player.whoAmI), -amount, 0, false);
         }
     }
 }