Пример #1
0
 public override void OnHitNPC(Item item, Player player, NPC target, int damage, float knockBack, bool crit)
 {
     if (item == player.HeldItem && Main.rand.NextFloat(0, 1) < Type1.GetValue())
     {
         SpawnLifeOrbs(player, target, damage);
     }
 }
Пример #2
0
        public override string GetTolltipText(Item item)
        {
            int  value     = Type1.GetValueFormat();
            char plusMinus = Type1.GetValue() < 0 ? '-' : '+';

            return($"{ plusMinus }{ value } fishing power");
        }
Пример #3
0
        public override bool ConsumeAmmo(Item item, Player player, ref float chanceToNotConsume)
        {
            float value = Type1.GetValue();

            chanceToNotConsume += value;
            return(true);
        }
Пример #4
0
 public override void ProjOnHitPvp(Item item, Player player, Projectile projectile, Player target, int damage, bool crit)
 {
     if (item == player.HeldItem && Main.rand.NextFloat(0, 1) < Type1.GetValue())
     {
         SpawnLifeOrbs(player, target, damage);
     }
 }
        public override string GetTolltipText(Item item)
        {
            float value       = Type1.GetValue();
            float valueFormat = Type1.GetValueFormat();

            return($"Up to { (value < 0 ? '-' : '+') }{ valueFormat }% attack speed above 50% life and up to { (value < 0 ? '+' : '-') }{ valueFormat }% below");
        }
Пример #6
0
 void OnHit(Item item, Player player, Player target, int hitDamage)
 {
     if (item == player.HeldItem && Main.rand.NextFloat() < Type1.GetValue())
     {
         Bleed(target, hitDamage);
     }
 }
Пример #7
0
 public override void ProjOnHitNPC(Item item, Player player, Projectile projectile, NPC target, int damage, float knockback, bool crit)
 {
     if (item == player.HeldItem && Main.rand.NextFloat(0, 1) < Type1.GetValue())
     {
         SpawnIcycles(player, target, damage);
     }
 }
Пример #8
0
 public override void OnHitPvp(Item item, Player player, Player target, int damage, bool crit)
 {
     if (item == player.HeldItem && Main.rand.NextFloat(0, 1) < Type1.GetValue())
     {
         SpawnIcycles(player, target, damage);
     }
 }
 public override void PlayerGetWeaponCrit(Item item, Item heldItem, Player player, ref float multiplier)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         multiplier += Type1.GetValue();
     }
 }
Пример #10
0
 void Hit(Item item, Player player, Player target, int hitDamage)
 {
     if (item == player.HeldItem && Main.rand.NextFloat() < Type1.GetValue())
     {
         SpawnMeteor(player, target, hitDamage);
     }
 }
 public override void PostHurt(Item item, Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit)
 {
     if (AffixItemItem.IsArmorEquipped(item, player) && PoMUtil.IsLowHP(player))
     {
         player.AddBuff(ModContent.BuffType <Adrenaline>(), (int)Math.Round(Type1.GetValue() * 60));
     }
 }
Пример #12
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();
     }
 }
Пример #13
0
 public override void ProjModifyHitPvp(Item item, Player player, Projectile projectile, Player target, ref float damageMultiplier, ref bool crit)
 {
     if (item == player.HeldItem && PoMUtil.IsLowHP(target))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
Пример #14
0
 void Hit(Item item, Player player, Player target, int hitDamage)
 {
     if (item == player.HeldItem && Main.rand.NextFloat() < Type1.GetValue())
     {
         SpawnChainLightning(player, target, hitDamage, false);
     }
 }
Пример #15
0
 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();
     }
 }
Пример #16
0
 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();
     }
 }
Пример #17
0
 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();
     }
 }
Пример #18
0
        void GainMoveSpeed(Player player)
        {
            int duration = (int)MathHelper.Clamp(Type2.GetValue() * 60, 1, 9999999);

            player.GetModPlayer <BuffPlayer>().AddWeaponMoveSpeedBuff(player, Type1.GetValue(), duration);
            lastProcTime = Main.GameUpdateCount;
        }
Пример #19
0
 public override void NaturalLifeRegen(Item item, Player player, ref float regenMultiplier)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         regenMultiplier += Type1.GetValue();
     }
 }
Пример #20
0
 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 (player.HeldItem == item)
     {
         float value = Type1.GetValue();
         damageMultiplier += value * PoMUtil.CountBuffs(target.buffType);
     }
 }
Пример #21
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);
 }
Пример #22
0
 public override void ProjModifyHitPvp(Item item, Player player, Projectile projectile, Player target, ref float damageMultiplier, ref bool crit)
 {
     if (player.HeldItem == item)
     {
         float value = Type1.GetValue();
         damageMultiplier += value * PoMUtil.CountBuffs(target.buffType);
     }
 }
Пример #23
0
        public override string GetTolltipText(Item item)
        {
            float value       = Type1.GetValue();
            float valueFormat = Type1.GetValueFormat();
            char  plusMinus   = value < 0 ? '-' : '+';

            return($"{ plusMinus }{ valueFormat }% life regen");
        }
Пример #24
0
 void Hit(Item item, Player player, Player target)
 {
     if (item == player.HeldItem && Main.rand.NextFloat(1) < Type1.GetValue())
     {
         int durationTicks = (int)Math.Round(Type2.GetValue() * 60);
         target.AddBuff(BuffID.Confused, durationTicks, false);
     }
 }
Пример #25
0
 void GainDodgeChance(Item item, Player player)
 {
     if (AffixItemItem.IsArmorEquipped(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;
     }
 }
Пример #26
0
        public override void PostHurt(Item item, Player player, bool pvp, bool quiet, double damage, int hitDirection, bool crit)
        {
            if (AffixItemItem.IsArmorEquipped(item, player) && (Main.GameUpdateCount - lastProcTime) >= (int)Math.Round(Type3.GetValue() * 60))
            {
                player.GetModPlayer <BuffPlayer>().AddGreavesMoveSpeedBuff(player, Type1.GetValue(), (int)Math.Round(Type2.GetValue() * 60), false);

                lastProcTime = Main.GameUpdateCount;
            }
        }
Пример #27
0
        public override string GetTolltipText(Item item)
        {
            float value       = Type1.GetValue();
            float valueFormat = Type1.GetValueFormat();

            char plusMinus = value < 0 ? '-' : '+';

            return($"{ plusMinus }{ valueFormat }% damage per enemy buff/debuff");
        }
Пример #28
0
        public override void ProjModifyHitNPC(Item item, Player player, Projectile projectile, NPC target, ref float damageMultiplier, ref float knockbackMultiplier, ref bool crit, ref int hitDirection)
        {
            NPC realTarget = target.realLife >= 0 ? Main.npc[target.realLife] : target;

            if (item == player.HeldItem && (realTarget.life / (float)realTarget.lifeMax) <= PathOfModifiers.lowHPThreshold)
            {
                damageMultiplier += Type1.GetValue();
            }
        }
Пример #29
0
 public override bool PlayerConsumeAmmo(Player player, Item item, Item ammo, ref float chanceToNotConsume)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         float value = Type1.GetValue();
         chanceToNotConsume += value;
     }
     return(true);
 }
Пример #30
0
 void GainBuffs(Item item, Player player)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         int durationTicks = (int)Math.Round(Type1.GetValue() * 60);
         player.AddBuff(BuffID.Flipper, durationTicks);
         player.AddBuff(BuffID.Gills, durationTicks);
         player.AddBuff(BuffID.WaterWalking, durationTicks);
     }
 }