示例#1
0
        public override bool Shoot(Player Player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            if (Player.GetModPlayer <MPlayer>().flames_summoned == 8)
            {
                for (int i = 9; i <= 16; i++)
                {
                    Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, Player.whoAmI, i);
                }
                Player.GetModPlayer <MPlayer>().flames_summoned += 8;
            }
            if (Player.GetModPlayer <MPlayer>().flames_summoned == 3)
            {
                for (int i = 4; i <= 8; i++)
                {
                    Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, Player.whoAmI, i);
                }
                Player.GetModPlayer <MPlayer>().flames_summoned += 5;
            }
            if (Player.GetModPlayer <MPlayer>().flames_summoned == 0)
            {
                for (int i = 1; i <= 3; i++)
                {
                    Projectile.NewProjectile(source, position, Vector2.Zero, type, damage, knockback, Player.whoAmI, i);
                }
                Player.GetModPlayer <MPlayer>().flames_summoned += 3;
            }

            return(false);
        }
示例#2
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 pos = new Vector2((int)player.position.X + Main.rand.Next(-800, 800), (int)player.position.Y + Main.rand.Next(-1000, -250));

            if (!Main.dayTime)
            {
                if (!NPC.downedMechBoss1)
                {
                    Main.dayTime = false;
                    Main.time    = 0;

                    if (Main.netMode == NetmodeID.Server) //sync time
                    {
                        NetMessage.SendData(MessageID.WorldData, -1, -1, null, 0, 0f, 0f, 0f, 0, 0, 0);
                    }
                }

                Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), pos, Vector2.Zero, ModContent.ProjectileType <SpawnProj>(), 0, 0, Main.myPlayer, NPCID.TheDestroyer);

                if (Main.netMode == NetmodeID.Server)
                {
                    ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral("The Destroyer has awoken!"), new Color(175, 75, 255));
                }
                else
                {
                    Main.NewText("The Destroyer has awoken!", new Color(175, 75, 255));
                }
            }

            SoundEngine.PlaySound(SoundID.Roar, player.position, 0);

            return(false);
        }
示例#3
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), player.position, Vector2.Zero, ModContent.ProjectileType <SpawnProj>(), 0, 0, Main.myPlayer,
                                     AssociatedNpcId);

            return(false);
        }
示例#4
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 pos = new Vector2((int)player.position.X + Main.rand.Next(-800, 800), (int)player.position.Y + Main.rand.Next(-800, -250));

            if (NPCType == NPCID.Golem)
            {
                pos = player.Center;
                for (int i = 0; i < 30; i++)
                {
                    pos.Y -= 16;

                    if (pos.Y <= 0 || WorldGen.SolidTile((int)pos.X / 16, (int)pos.Y / 16))
                    {
                        pos.Y += 16;
                        break;
                    }
                }
            }

            Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), pos, Vector2.Zero, ModContent.ProjectileType <SpawnProj>(), 0, 0, Main.myPlayer, NPCType);

            if (Main.netMode == NetmodeID.Server)
            {
                ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral($"{NPCName} has awoken!"), new Color(175, 75, 255));
            }
            else if (NPCType != NPCID.KingSlime)
            {
                Main.NewText($"{NPCName} has awoken!", new Color(175, 75, 255));
            }

            SoundEngine.PlaySound(SoundID.Roar, player.position, 0);

            return(false);
        }
示例#5
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            int p = Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ProjectileType <CallandorSlice>(), damage, knockback, player.whoAmI);

            Main.projectile[p].scale = 1f;
            return(false);
        }
示例#6
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 pos = new Vector2((int)player.position.X + Main.rand.Next(-800, 800), (int)player.position.Y + Main.rand.Next(-1000, -250));

            // Vanilla
            Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), pos, Vector2.Zero, ModContent.ProjectileType <SpawnProj>(), 0, 0, Main.myPlayer, 1, 3);

            // Modded
            for (int i = Main.maxNPCTypes; i < NPCLoader.NPCCount; i++)
            {
                NPC npc = new NPC();
                npc.SetDefaults(i);

                if (npc.boss)
                {
                    SpawnBoss(player, i, npc.TypeName);
                }
            }

            if (Main.netMode == NetmodeID.Server)
            {
                ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral("Every boss has awoken!"), new Color(175, 75, 255));
            }
            else
            {
                Main.NewText("Every boss has awoken!", new Color(175, 75, 255));
            }

            SoundEngine.PlaySound(SoundID.Roar, player.position, 0);

            return(false);
        }
示例#7
0
        // This method gets called when firing your weapon/sword.
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 target       = Main.screenPosition + new Vector2(Main.mouseX, Main.mouseY);
            float   ceilingLimit = target.Y;

            if (ceilingLimit > player.Center.Y - 200f)
            {
                ceilingLimit = player.Center.Y - 200f;
            }
            // Loop these functions 3 times.
            for (int i = 0; i < 3; i++)
            {
                position    = player.Center - new Vector2(Main.rand.NextFloat(401) * player.direction, 600f);
                position.Y -= 100 * i;
                Vector2 heading = target - position;

                if (heading.Y < 0f)
                {
                    heading.Y *= -1f;
                }

                if (heading.Y < 20f)
                {
                    heading.Y = 20f;
                }

                heading.Normalize();
                heading   *= velocity.Length();
                heading.Y += Main.rand.Next(-40, 41) * 0.02f;
                Projectile.NewProjectile(source, position, heading, type, damage * 2, knockback, player.whoAmI, 0f, ceilingLimit);
            }

            return(false);
        }
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position,
                                   Vector2 velocity, int type,
                                   int damage, float knockback)
        {
            base.Shoot(player, source, position, velocity, type, damage, knockback);

            switch (player.itemAnimation)
            {
            case < 5:
                velocity.X += Main.rand.Next(-40, 41) * 0.01f;
                velocity.Y += Main.rand.Next(-40, 41) * 0.01f;
                velocity.X *= 1.1f;
                velocity.Y *= 1.1f;
                break;

            case < 10:
                velocity.X += Main.rand.Next(-20, 21) * 0.01f;
                velocity.Y += Main.rand.Next(-20, 21) * 0.01f;
                velocity.X *= 1.05f;
                velocity.Y *= 1.05f;
                break;

            default:
                Projectile.NewProjectile(source, position, velocity, 661, (int)(damage * 2.5f), knockback, player.whoAmI);
                break;
            }

            Projectile.NewProjectile(source, position, velocity, type, damage, knockback, player.whoAmI);

            return(false);
        }
示例#9
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 mouse = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition;

            if (position.Y <= mouse.Y)
            {
                float Xdis   = position.X - mouse.X;               // change myplayer to nearest player in full version
                float Ydis   = position.Y - mouse.Y;               // change myplayer to nearest player in full version
                float Angle  = (float)Math.Atan(Xdis / Ydis);
                float DistXT = (float)(Math.Sin(Angle) * 54);
                float DistYT = (float)(Math.Cos(Angle) * 54);
                DistX = (position.X + DistXT);
                DistY = (position.Y + DistYT);
            }
            if (position.Y > mouse.Y)
            {
                float Xdis   = position.X - mouse.X;               // change myplayer to nearest player in full version
                float Ydis   = position.Y - mouse.Y;               // change myplayer to nearest player in full version
                float Angle  = (float)Math.Atan(Xdis / Ydis);
                float DistXT = (float)(Math.Sin(Angle) * 54);
                float DistYT = (float)(Math.Cos(Angle) * 54);
                DistX = (position.X + (0 - DistXT));
                DistY = (position.Y + (0 - DistYT));
            }
            Projectile.NewProjectile(source, DistX, DistY, Main.rand.Next(-10, 10), Main.rand.Next(-10, 10), ProjectileType <Projectiles.SandParticle>(), damage, knockback, player.whoAmI, 0f, 0f);
            return(false);
        }
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 origVect = velocity;

            if (Main.rand.Next(2) == 0)
            {
                newVect = origVect.RotatedBy(System.Math.PI / (Main.rand.Next(900, 1800) / 10));
            }
            else
            {
                newVect = origVect.RotatedBy(-System.Math.PI / (Main.rand.Next(900, 1800) / 10));
            }

            int projType = 0;

            switch (Main.rand.Next(0, 3))
            {
            case 0:
                projType = ProjectileType <Shatter1>();
                break;

            case 1:
                projType = ProjectileType <Shatter2>();
                break;

            case 2:
                projType = ProjectileType <Shatter3>();
                break;
            }

            Projectile.NewProjectile(source, position.X, position.Y, newVect.X, newVect.Y, projType, damage - 5, knockback, player.whoAmI, 0f, 0f);
            return(false);
        }
示例#11
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            ProjectileSource_Item s = new ProjectileSource_Item(player, Item);

            Projectile.NewProjectile(s, position, velocity + new Vector2(0, (player.altFunctionUse == 2) ? -5 : 5), type, damage, knockback, Item.playerIndexTheItemIsReservedFor, (player.altFunctionUse == 2) ? 100 : 0);

            return(base.Shoot(player, source, position, velocity, type, damage, knockback));
        }
示例#12
0
 public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
 {
     //float SdirX = (Main.MouseWorld.X - player.position.X) * 8.5f;
     //float SdirY = (Main.MouseWorld.Y - player.position.Y) * 8.5f;
     //float angle = (float)Math.Atan(12f);
     Projectile.NewProjectile(new ProjectileSource_Item(player, Item), position.X - player.width / 2, position.Y - player.height / 2, velocity.X, velocity.Y, ProjectileType <Projectiles.FireGem>(), damage, knockback, player.whoAmI, 0f, 0f);
     return(false);
 }
示例#13
0
 public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
 {
     for (int i = 0; i < 3; i++)
     {
         Projectile.NewProjectile(source, position.X - 8, position.Y + 8, velocity.X + ((float)Main.rand.Next(-300, 300) / 100), velocity.Y + ((float)Main.rand.Next(-300, 300) / 100), type, damage, knockback, player.whoAmI, 0f, 0f);
     }
     return(false);
 }
示例#14
0
 public override bool Shoot(Item item, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
 {
     if (Hexed)
     {
         return(false);
     }
     return(base.Shoot(item, source, position, velocity, type, damage, knockback));
 }
示例#15
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 mouse = Main.MouseWorld;

            Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), mouse, Vector2.Zero, type, 0, 0, player.whoAmI);

            return(false);
        }
示例#16
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 mouse = new Vector2(Main.mouseX, Main.mouseY) + Main.screenPosition;

            Projectile.NewProjectile(source, (mouse.X - 16) + Main.rand.Next(32), (mouse.Y - 16) + Main.rand.Next(32), Main.rand.Next(-2, 2), Main.rand.Next(-2, 2), ProjectileType <Projectiles.TrueAmethystProjectile>(), damage, knockback, player.whoAmI, 0f, 0f);
            Projectile.NewProjectile(source, (mouse.X - 16) + Main.rand.Next(32), (mouse.Y - 16) + Main.rand.Next(32), Main.rand.Next(-2, 2), Main.rand.Next(-2, 2), ProjectileType <Projectiles.TrueAmethystProjectile>(), damage, knockback, player.whoAmI, 0f, 0f);
            return(false);
        }
示例#17
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            //float SdirX = (Main.MouseWorld.X - player.position.X) * 8.5f;
            //float SdirY = (Main.MouseWorld.Y - player.position.Y) * 8.5f;
            float angle = (float)Math.Atan((float)Main.rand.Next(-12, 12));

            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), position.X, position.Y, velocity.X + angle, velocity.Y + Main.rand.Next(-1, 1), ProjectileType <Projectiles.TrueGemFire>(), damage, knockback, player.whoAmI, 0f, 0f);
            return(false);
        }
示例#18
0
 public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
 {
     if (Main.myPlayer == player.whoAmI)
     {
         Vector2 mouse = Main.MouseWorld;
         Projectile.NewProjectile(source, mouse.X + Main.rand.Next(-80, 80), player.Center.Y - 350 + Main.rand.Next(-50, 50), 0, 20, ProjectileType <Projectiles.SapphireDroplet>(), damage, knockback, player.whoAmI);
         Projectile.NewProjectile(source, mouse.X + Main.rand.Next(-80, 80), player.Center.Y - 350 + Main.rand.Next(-50, 50), 0, 20, ProjectileType <Projectiles.SapphireDroplet>(), damage, knockback, player.whoAmI);
     }
     return(false);
 }
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Tile tile = Framing.GetTileSafely(player.Center);

            if (tile.type == TileID.LihzahrdAltar && tile.wall == WallID.LihzahrdBrickUnsafe && NPC.downedPlantBoss)
            {
                Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), player.Bottom - Vector2.UnitY * 8f, Vector2.Zero, type, 0, 0, player.whoAmI);
            }
            return(false);
        }
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 MousePos  = new Vector2(Main.MouseWorld.X, Main.MouseWorld.Y);
            Vector2 PlayerPos = player.Center;
            Vector2 Diff      = MousePos - PlayerPos;
            Vector2 DiffRand  = Diff.RotatedByRandom(MathHelper.ToRadians(45));
            Vector2 nposition = player.Center + (30 * Vector2.Normalize(DiffRand));

            Projectile.NewProjectile(source, new Vector2(nposition.X, nposition.Y), velocity.RotateRandom(0.1), type, damage, knockback, player.whoAmI);
            return(false);
        }
示例#21
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            // TODO: GetSoundSlot
            //SoundEngine.PlaySound(SoundLoader.CustomSoundType, player.position, Mod.GetSoundSlot(SoundType.Custom, "Sounds/Thunder"));
            Vector2 vector82 = -Main.LocalPlayer.Center + Main.MouseWorld;
            float   ai       = Main.rand.Next(100);
            Vector2 vector83 = Vector2.Normalize(vector82) * Item.shootSpeed;

            Projectile.NewProjectile(source, player.Center.X, player.Center.Y, vector83.X, vector83.Y, type, damage, .49f, player.whoAmI, vector82.ToRotation(), ai);
            return(false);
        }
示例#22
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            //Two friendly cursed flame projectiles skewed 10 degrees from the center of the gun

            Projectile.NewProjectile(source, position, velocity.RotatedBy(MathHelper.ToRadians(-10)), ModContent.ProjectileType <FriendlyEyeFire>(), (int)(damage * 1.25f), knockback, player.whoAmI);
            Projectile.NewProjectile(source, position, velocity.RotatedBy(MathHelper.ToRadians(10)), ModContent.ProjectileType <FriendlyEyeFire>(), (int)(damage * 1.25f), knockback, player.whoAmI);

            SoundEngine.PlaySound(SoundID.Item34.WithVolume(0.75f), position);

            return(true);
        }
示例#23
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            float  spread      = 55f * 0.0174f;      //45 degrees converted to radians
            float  baseSpeed   = (float)Math.Sqrt(velocity.X * velocity.X + velocity.Y * velocity.Y) * 3;
            double baseAngle   = Math.Atan2(velocity.X, velocity.Y);
            double randomAngle = baseAngle + (Main.rand.NextFloat() - 0.5f) * spread;

            velocity.X = baseSpeed * (float)Math.Sin(randomAngle);
            velocity.Y = baseSpeed * (float)Math.Cos(randomAngle);
            Projectile.NewProjectile(source, position.X, position.Y, velocity.X - 0.5f, velocity.Y - 0.5f, ProjectileType <Projectiles.Leaf>(), damage, knockback, player.whoAmI);
            return(true);
        }
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            Vector2 pos = new Vector2((int)player.position.X + Main.rand.Next(-800, 800), (int)player.position.Y + Main.rand.Next(-1000, -250));

            Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), pos, Vector2.Zero, ModContent.ProjectileType <SpawnProj>(), 0, 0, Main.myPlayer, NPCID.EyeballFlyingFish);

            pos = new Vector2((int)player.position.X + Main.rand.Next(-800, 800), (int)player.position.Y + Main.rand.Next(-1000, -250));
            Projectile.NewProjectile(player.GetProjectileSource_Item(source.Item), pos, Vector2.Zero, ModContent.ProjectileType <SpawnProj>(), 0, 0, Main.myPlayer, NPCID.ZombieMerman);

            SoundEngine.PlaySound(SoundID.Roar, player.position, 0);

            return(true);
        }
示例#25
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockBack)
        {
            int amount = Main.rand.Next(2, 5);

            for (int i = 0; i < amount; i++)
            {
                var shootPos = position + Main.rand.NextVector2Square(2f, 2f);
                var shootVel = velocity + Main.rand.NextVector2Square(-1.5f, 1.5f);
                int proj     = Projectile.NewProjectile(source, shootPos, shootVel, type, damage, knockBack, player.whoAmI);
                Main.projectile[proj].noDropItem = true;
            }
            return(false);
        }
示例#26
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            //create velocity vectors for the two angled projectiles (outwards at PI/6 radians, or 15 degrees)
            Vector2 origVect = velocity;
            Vector2 newVect  = origVect.RotatedBy(System.Math.PI / 20);
            Vector2 newVect2 = origVect.RotatedBy(-System.Math.PI / 20);

            //create three Crystishae projectiles
            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), player.Center.X, player.Center.Y - 20, velocity.X, velocity.Y, ProjectileType <QuartzTrident>(), damage, knockback, Item.playerIndexTheItemIsReservedFor, 0, 0);
            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), player.Center.X, player.Center.Y - 20, newVect.X, newVect.Y, ProjectileType <QuartzTrident>(), damage, knockback, Item.playerIndexTheItemIsReservedFor, 0, 0);
            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), player.Center.X, player.Center.Y - 20, newVect2.X, newVect2.Y, ProjectileType <QuartzTrident>(), damage, knockback, Item.playerIndexTheItemIsReservedFor, 0, 0);
            return(false);
        }
示例#27
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            //float SdirX = (Main.MouseWorld.X - player.position.X) * 8.5f;
            //float SdirY = (Main.MouseWorld.Y - player.position.Y) * 8.5f;
            float angle = (float)Math.Atan(12f);

            Projectile.NewProjectile(source, position.X, position.Y, velocity.X, velocity.Y, ProjectileType <AmberDagger>(), damage, knockback, player.whoAmI, 0f, 0f);
            Projectile.NewProjectile(source, position.X, position.Y, velocity.X - 1, velocity.Y - angle, ProjectileType <AmberDagger>(), damage, knockback, player.whoAmI, 0f, 0f);
            Projectile.NewProjectile(source, position.X, position.Y, velocity.X + 1, velocity.Y + angle, ProjectileType <AmberDagger>(), damage, knockback, player.whoAmI, 0f, 0f);
            Projectile.NewProjectile(source, position.X, position.Y, velocity.X - 2, velocity.Y - (2 * angle), ProjectileType <AmberDagger>(), damage, knockback, player.whoAmI, 0f, 0f);
            Projectile.NewProjectile(source, position.X, position.Y, velocity.X + 2, velocity.Y + (2 * angle), ProjectileType <AmberDagger>(), damage, knockback, player.whoAmI, 0f, 0f);
            return(false);
        }
示例#28
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            //create velocity vectors for the two angled projectiles (outwards at PI/15 radians)
            Vector2 origVect = velocity;
            Vector2 newVect  = origVect.RotatedBy(System.Math.PI / 15);
            Vector2 newVect2 = origVect.RotatedBy(-System.Math.PI / 15);

            //create three Crystishae projectiles
            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), position.X, position.Y, velocity.X, velocity.Y, type, damage, knockback, player.whoAmI, 0, 0);
            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), position.X, position.Y, newVect.X, newVect.Y, type, damage, knockback, player.whoAmI, 0, 0);
            Projectile.NewProjectile(new ProjectileSource_Item(player, Item), position.X, position.Y, newVect2.X, newVect2.Y, type, damage, knockback, player.whoAmI, 0, 0);
            return(false);
        }
示例#29
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 pos, Vector2 velocity, int type, int damage, float knockBack)
        {
            int fire = ModContent.ProjectileType <Firegun_damage_zone>();


            for (int i = 0; i <= 4; i++)
            {
                Vector2 speed2 = velocity.RotatedByRandom(MathHelper.ToRadians(15)) * 3f;
                Projectile.NewProjectile(source, pos, speed2, fire, damage, knockBack, Main.myPlayer);
            }

            return(false);
        }
示例#30
0
        public override bool Shoot(Player player, ProjectileSource_Item_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {
            //create velocity vectors for the two angled projectiles (outwards at PI/15 radians)
            Vector2 origVect = velocity;
            Vector2 newVect  = origVect.RotatedBy(System.Math.PI / 15);
            Vector2 newVect2 = origVect.RotatedBy(-System.Math.PI / 15);

            //create three Crystishae projectiles
            //Projectile.NewProjectile(position.X, position.Y, speedX, speedY, type, damage, knockBack, player.whoAmI);
            Projectile.NewProjectile(source, position.X, position.Y, newVect.X, newVect.Y, type, damage, knockback, player.whoAmI);
            Projectile.NewProjectile(source, position.X, position.Y, newVect2.X, newVect2.Y, type, damage, knockback, player.whoAmI);
            return(true);            //will shoot original projectile
        }