Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
        public override string GetTolltipText(Item item)
        {
            int  value     = Type1.GetValueFormat();
            char plusMinus = Type1.GetValue() < 0 ? '-' : '+';

            return($"{ plusMinus }{ value } fishing power");
        }
Ejemplo n.º 3
0
        public override bool ConsumeAmmo(Item item, Player player, ref float chanceToNotConsume)
        {
            float value = Type1.GetValue();

            chanceToNotConsume += value;
            return(true);
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 6
0
 void OnHit(Item item, Player player, Player target, int hitDamage)
 {
     if (item == player.HeldItem && Main.rand.NextFloat() < Type1.GetValue())
     {
         Bleed(target, hitDamage);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 9
0
 public override void PlayerGetWeaponCrit(Item item, Item heldItem, Player player, ref float multiplier)
 {
     if (AffixItemItem.IsAccessoryEquipped(item, player))
     {
         multiplier += Type1.GetValue();
     }
 }
Ejemplo n.º 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));
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 19
0
 public override void NaturalLifeRegen(Item item, Player player, ref float regenMultiplier)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         regenMultiplier += Type1.GetValue();
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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");
        }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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");
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
     }
 }