Esempio n. 1
0
        private void CrossLaunch()
        {
            maxSpeed = 10f;
            if (AttackTimer == 0)
            {
                npc.velocity = Vector2.Zero;
                angle        = Main.rand.Next(0, 360);
                if (Main.rand.NextBool())
                {
                    randomTimer = 1;
                }
                else
                {
                    randomTimer = -1;
                }
            }

            if (AttackTimer >= 0 && AttackTimer <= 180)
            {
                angle += randomTimer;
                Vector2 vector = TerminationUtils.RegularToComponantVector(Main.player[npc.target].Center, angle, 500, -npc.frame.Size() / 2);
                Lazer("ElectronicEyeThornBallFollow", Main.player[npc.target].Center, 10f, 0, 0f, vector);
            }
            else if (AttackTimer >= 200)
            {
                ChooseAttackRandom(2, 5);
            }
        }
Esempio n. 2
0
        private void RandomMovement()
        {
            maxSpeed = 10f;
            if (AttackTimer == 0)
            {
                angle       = Main.rand.Next(0, 360);
                randomTimer = Main.rand.Next(20, 60);
            }

            if (AttackTimer >= 0 && AttackTimer <= 20)
            {
                TeleportDust(npc.position);
                angle += 2f;
                TeleportDust(TerminationUtils.RegularToComponantVector(Main.player[npc.target].Center, angle, 300, -npc.frame.Size() / 2));
            }
            else if (AttackTimer >= 20 && AttackTimer <= 60 + randomTimer)
            {
                npc.velocity = Vector2.Zero;
                TeleportGroup(TerminationUtils.RegularToComponantVector(Main.player[npc.target].Center, angle, 300, -npc.frame.Size() / 2));
                Lazer("ElectronicEyeThornBallAngry", Main.player[npc.target].Center, 10f, 0, 0f);
                angle += 2f;
            }
            else if (AttackTimer >= 60 + randomTimer && AttackTimer <= 100 + randomTimer)
            {
                npc.velocity = new Vector2((float)Math.Cos(MathHelper.ToRadians(angle + 90)), (float)Math.Sin(MathHelper.ToRadians(angle + 90)));
                npc.velocity.Normalize();
                npc.velocity *= maxSpeed;
                npc.velocity += Main.player[npc.target].velocity;
            }
            else if (AttackTimer >= 80 + randomTimer)
            {
                ChooseAttackRandom(2, 5);
            }
        }
Esempio n. 3
0
        private void SpiralYeet()
        {
            maxSpeed = 10f;

            if (AttackTimer == 0)
            {
                npc.velocity = Vector2.Zero;
                angle        = Main.rand.Next(0, 360);
            }

            if (AttackTimer >= 0 && AttackTimer <= 360)
            {
                angle += 1f;
                Vector2 vector = TerminationUtils.RegularToComponantVector(npc.Center, angle, 500, -npc.frame.Size() / 2);
                Lazer("ElectronicEyeThornBallFollow", vector, 10f, 0, 28f);
            }
            else if (AttackTimer >= 380)
            {
                ChooseAttackRandom(2, 5);
            }
        }