Ejemplo n.º 1
0
 public override void NaturalLifeRegen(Item item, Player player, ref float regenMultiplier)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         regenMultiplier += Type1.GetValue();
     }
 }
Ejemplo n.º 2
0
 public override void ProjModifyHitPvp(Item item, Player player, Projectile projectile, Player target, ref float damageMultiplier, ref bool crit)
 {
     if (crit && AffixItemItem.IsArmorEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
Ejemplo n.º 3
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.IsArmorEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
Ejemplo n.º 4
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.IsArmorEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
Ejemplo n.º 5
0
 public override void PlayerModifyHitPvp(Item affixItem, Player player, Item item, Player target, ref float damageMultiplier, ref bool crit)
 {
     if (AffixItemItem.IsArmorEquipped(affixItem, player))
     {
         damageMultiplier += Type1.GetValue();
     }
 }
 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.º 7
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.IsArmorEquipped(item, player))
     {
         damageMultiplier += Type1.GetValue();
     }
     return(true);
 }
Ejemplo n.º 8
0
 void GainVelocity(Item item, Player player, Vector2 position)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         Vector2 addVelocity = (position - player.Center).SafeNormalize(Vector2.Zero) * Type1.GetValue();
         player.velocity += addVelocity;
     }
 }
Ejemplo n.º 9
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.º 10
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.º 11
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.º 12
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);
     }
 }
Ejemplo n.º 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.IsArmorEquipped(item, player) && (Main.GameUpdateCount - lastProcTime) >= (int)Math.Round(Type2.GetValue() * 60))
            {
                damageMultiplier += Type1.GetValue();
                lastProcTime      = Main.GameUpdateCount;
            }

            return(true);
        }
Ejemplo n.º 14
0
        void SpawnNova(Item item, Player player, int damageTaken)
        {
            if (AffixItemItem.IsArmorEquipped(item, player) && (Main.GameUpdateCount - lastProcTime) >= (int)Math.Round(Type3.GetValue() * 60))
            {
                PlaySound(player);

                Projectile.NewProjectile(player.Center, Vector2.Zero, ModContent.ProjectileType <ReflectNova>(), (int)Math.Round(damageTaken * Type1.GetValue()), 0, player.whoAmI, Type2.GetValue());

                lastProcTime = Main.GameUpdateCount;
            }
        }
Ejemplo n.º 15
0
 void GainBuffs(Item item, Player player)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         int durationTicks = (int)Math.Round(Type1.GetValue() * 60);
         player.AddBuff(BuffID.Dangersense, durationTicks);
         player.AddBuff(BuffID.Featherfall, durationTicks);
         player.AddBuff(BuffID.Gravitation, durationTicks);
         player.AddBuff(BuffID.Hunter, durationTicks);
         player.AddBuff(BuffID.ObsidianSkin, durationTicks);
     }
 }
Ejemplo n.º 16
0
 void GainBuffs(Item item, Player player)
 {
     if (AffixItemItem.IsArmorEquipped(item, player))
     {
         int durationTicks = (int)Math.Round(Type1.GetValue() * 60);
         player.AddBuff(BuffID.Builder, durationTicks);
         player.AddBuff(BuffID.Mining, durationTicks);
         player.AddBuff(BuffID.NightOwl, durationTicks);
         player.AddBuff(BuffID.Shine, durationTicks);
         player.AddBuff(BuffID.Spelunker, durationTicks);
         player.AddBuff(BuffID.Heartreach, durationTicks);
     }
 }
Ejemplo n.º 17
0
 void Heal(Item item, Player player)
 {
     if (AffixItemItem.IsArmorEquipped(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);
         }
     }
 }