Beispiel #1
0
        public override void GetWeaponDamage(Player player, ref int damage)
        {
            MPlayer modPlayer = player.GetModPlayer <MPlayer>(mod);

            // We want to multiply the damage we do by our alchemistDamage modifier.
            damage = (int)(damage * modPlayer.alchemistDamage);
        }
Beispiel #2
0
        public override void GetWeaponDamage(Player player, ref int damage)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            // We want to multiply the damage we do by our alchemicalDamage modifier.
            // todo: ? do we want magic damage to also have effect here?
            damage = (int)(damage * modPlayer.alchemicalDamage + 5E-06f);
        }
Beispiel #3
0
 public override void ModifyHitNPC(Item item, Player player, NPC target, ref int damage, ref float knockBack, ref bool crit)
 {
     // If the item we're using to damage someone/something is an AlchemistItem.
     if (item.modItem != null && item.modItem is AlchemistItem)
     {
         MPlayer mp = player.GetModPlayer <MPlayer>(mod);
         // We want to multiply the damage we do by our alchemistDamage modifier.
         damage = (int)(damage * mp.alchemistDamage);
     }
 }
Beispiel #4
0
 public override bool Shoot(Item item, Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
 {
     // Same for projectiles.
     if (item.modItem != null && item.modItem is AlchemistItem)
     {
         MPlayer mp = player.GetModPlayer <MPlayer>(mod);
         damage = (int)(damage * mp.alchemistDamage);
     }
     return(true);
 }
Beispiel #5
0
        public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            if (modPlayer.glove)
            {
                for (int i = 0; i < 1; ++i)
                {
                    if (player.FindBuffIndex(mod.BuffType("BottledSpirit")) != -1)
                    {
                        Projectile.NewProjectile(position.X, position.Y, speedX + 2, speedY + 2, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                    }
                    if (player.FindBuffIndex(mod.BuffType("BigBottledSpirit")) != -1)
                    {
                        Projectile.NewProjectile(position.X, position.Y, speedX + 3, speedY + 3, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX + 2, speedY + 2, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                        Projectile.NewProjectile(position.X, position.Y, speedX - 2, speedY - 2, 297, damage, knockBack, Main.myPlayer);
                    }
                    Projectile.NewProjectile(position.X, position.Y, speedX + 1, speedY + 1, type, damage, knockBack, Main.myPlayer);
                    int k = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer);
                    Main.projectile[k].friendly = true;
                }
                return(false);
            }
            if (player.FindBuffIndex(mod.BuffType("BottledSpirit")) != -1 && !modPlayer.glove)
            {
                for (int i = 0; i < 1; ++i)
                {
                    Projectile.NewProjectile(position.X, position.Y, speedX + 1, speedY + 1, 297, damage, knockBack, Main.myPlayer);
                    int k = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                    Main.projectile[k].friendly = true;
                }
                return(false);
            }
            if (player.FindBuffIndex(mod.BuffType("BigBottledSpirit")) != -1 && !modPlayer.glove)
            {
                for (int i = 0; i < 1; ++i)
                {
                    Projectile.NewProjectile(position.X, position.Y, speedX + 2, speedY + 2, 297, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX + 1, speedY + 1, 297, damage, knockBack, Main.myPlayer);
                    int k = Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX - 1, speedY - 1, 297, damage, knockBack, Main.myPlayer);
                    Projectile.NewProjectile(position.X, position.Y, speedX - 2, speedY - 2, 297, damage, knockBack, Main.myPlayer);
                    Main.projectile[k].friendly = true;
                }
                return(false);
            }
            return(true);
        }
Beispiel #6
0
        public override void ModifyTooltips(List <TooltipLine> tooltips)
        {
            MPlayer modPlayer = Main.LocalPlayer.GetModPlayer <MPlayer>(mod);

            foreach (TooltipLine tooltip in tooltips)
            {
                if (tooltip.Name == "Damage")
                {
                    tooltip.text = (int)(item.damage * modPlayer.alchemicalDamage) + " alchemical damage";
                }

                if (tooltip.Name == "CritChance")
                {
                    tooltip.text = item.crit + modPlayer.alchemicalCrit + "% critical strike chance";
                }
            }

            TooltipLine tip = new TooltipLine(mod, "Tremor:Tooltip", (item.crit + modPlayer.alchemicalCrit) + "% critical strike chance");

            tooltips.Insert(2, tip);
        }
Beispiel #7
0
        public override void ModifyTooltips(System.Collections.Generic.List <TooltipLine> tooltips)
        {
            for (int i = 0; i < tooltips.Count; ++i)
            {
                if (tooltips[i].Name == "Damage")
                {
                    MPlayer mp = Main.LocalPlayer.GetModPlayer <MPlayer>(mod);
                    tooltips[i].text = ((int)(item.damage * mp.alchemistDamage)).ToString() + " alchemic damage";
                }

                if (tooltips[i].Name == "CritChance")
                {
                    MPlayer mp = Main.LocalPlayer.GetModPlayer <MPlayer>(mod);
                    tooltips[i].text = ((int)(item.crit + mp.alchemistCrit)).ToString() + "% critical strike chance";
                }
            }
            MPlayer     mp2 = Main.LocalPlayer.GetModPlayer <MPlayer>(mod);
            TooltipLine tip = new TooltipLine(mod, "Tremor:Tooltip", ((int)(item.crit + mp2.alchemistCrit)).ToString() + "% critical strike chance");

            tooltips.Insert(2, tip);
        }
Beispiel #8
0
        // todo: borked, tml requires update, manual work still needed
        public override void GetWeaponCrit(Player player, ref int crit)
        {
            MPlayer modPlayer = MPlayer.GetModPlayer(player);

            crit += modPlayer.alchemicalCrit;
        }
Beispiel #9
0
        public override bool ConsumeItem(Item item, Player player)
        {
            MPlayer modPlayer = player.GetModPlayer <MPlayer>(mod);

            if (modPlayer.novaChestplate)
            {
                if (player.FindBuffIndex(mod.BuffType("SuperFlask")) != -1)
                {
                    if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                         item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                         item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                         item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                         item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                         item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                         item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                         item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.65f)
                    {
                        return(false);
                    }
                }
                if (player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) != -1)
                {
                    if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                         item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                         item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                         item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                         item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                         item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                         item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                         item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.85f)
                    {
                        return(false);
                    }
                }
                if (player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) < 1 && player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) < 1)
                {
                    if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                         item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                         item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                         item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                         item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                         item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                         item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                         item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.4f)
                    {
                        return(false);
                    }
                }
            }
            if (player.FindBuffIndex(mod.BuffType("SuperFlask")) != -1)
            {
                if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                     item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                     item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                     item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                     item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                     item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                     item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                     item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.25f)
                {
                    return(false);
                }
            }
            if (player.FindBuffIndex(mod.BuffType("SuperFlaskBig")) != -1 && modPlayer.novaAura)
            {
                if ((item.type == mod.ItemType("LesserManaFlask") || item.type == mod.ItemType("BurningFlask") || item.type == mod.ItemType("BoomFlask") || item.type == mod.ItemType("BigVenomFlask") || item.type == mod.ItemType("BigPoisonFlask") || item.type == mod.ItemType("BigManaFlask") ||
                     item.type == mod.ItemType("BigHealingFlack") || item.type == mod.ItemType("BasicFlask") || item.type == mod.ItemType("FreezeFlask") ||
                     item.type == mod.ItemType("DepressionFlask") || item.type == mod.ItemType("CrystalFlask") || item.type == mod.ItemType("ClusterFlask") ||
                     item.type == mod.ItemType("GoldFlask") || item.type == mod.ItemType("ExtendedFreezeFlask") || item.type == mod.ItemType("ExtendedBurningFlask") ||
                     item.type == mod.ItemType("ExtendedBoomFlask") || item.type == mod.ItemType("HealthSupportFlask") || item.type == mod.ItemType("ManaSupportFlask") ||
                     item.type == mod.ItemType("LesserVenomFlask") || item.type == mod.ItemType("LesserPoisonFlask") || item.type == mod.ItemType("LesserHealingFlack") ||
                     item.type == mod.ItemType("PlagueFlask") || item.type == mod.ItemType("PhantomFlask") || item.type == mod.ItemType("MoonDustFlask") ||
                     item.type == mod.ItemType("SparkingFlask") || item.type == mod.ItemType("SuperManaFlask") || item.type == mod.ItemType("SuperHealingFlask") || item.type == mod.ItemType("NovaFlask")) && Main.rand.NextFloat() < 0.45f)
                {
                    return(false);
                }
            }
            return(base.ConsumeItem(item, player));
        }