Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #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);
            }
        }
Пример #4
0
 public override void AI()
 {
     Rotation         += RotationSpeed;
     projectile.Center = TerminationUtils.PolarPos(Main.player[(int)projectile.ai[0]].Center, Distanse, Rotation);
 }
        public override void AI()
        {
            switch (textureversion)
            {
            case 1:
                projectile.frame = 1;
                break;

            case 2:
                projectile.frame = 2;
                break;

            case 3:
                projectile.frame = 3;
                break;
            }

            Rotation           += RotationSpeed;
            projectile.Center   = TerminationUtils.PolarPos(Main.player[(int)projectile.ai[0]].Center, distance, Rotation);
            projectile.rotation = (float)(-1 * (TerminationUtils.RotateBetween2Points(Main.player[(int)projectile.ai[0]].Center, projectile.Center) - MathHelper.PiOver2));

            if (Main.player[(int)projectile.ai[0]].HasBuff(ModContent.BuffType <HardenedLuminiteSetBonusBuff>()) == true)
            {
                projectile.timeLeft = 6;
            }

            //change type 1: growing quickly
            //change type 2: growing slowly
            //change type 1: shrinking quickly
            //change type 1: shrinking slowly

            switch (changetype)
            {
            case 1:
                distance += changeby;
                break;

            case 2:
                distance += changeby;
                break;

            case 3:
                distance -= changeby;
                break;

            case 4:
                distance -= changeby;
                break;

            case 5:
                distance += changeby;
                break;
            }

            if (distance >= 50 && distance < 200 && changecheck1 == false)
            {
                changetype   = 1;
                changecheck1 = true;
                changecheck4 = false;
            }

            if (distance >= 200 && distance <= 250 && changecheck2 == false)
            {
                changetype   = 2;
                changeby     = Main.rand.Next(1, 2);
                changecheck2 = true;
            }

            if (distance > 250 && changecheck3 == false)
            {
                changetype   = 3;
                changeby     = Main.rand.Next(2, 4);
                changecheck3 = true;
            }

            if (distance < 50 && distance >= 0 && changecheck4 == false)
            {
                changetype    = 4;
                changeby      = Main.rand.Next(1, 2);
                changecheck4  = true;
                RotationSpeed = (float)(Main.rand.Next(2, 10) / 100f);
            }

            if (distance <= 0)
            {
                changecheck1 = false;
                changecheck2 = false;
                changecheck3 = false;
                changeby     = Main.rand.Next(2, 4);
                changetype   = 5;
            }
        }
Пример #6
0
 private void TrackPositionFromHead()
 {
     npc.Center   = Head.BallMetalCenters[BallNumber];
     npc.rotation = TerminationUtils.RotateBetween2Points(Main.player[(int)npc.ai[0]].Center, npc.Center) - MathHelper.ToRadians(90);
 }
Пример #7
0
 public override void AI()
 {
     Rotation           += RotationSpeed;
     projectile.Center   = TerminationUtils.PolarPos(Main.player[(int)projectile.ai[0]].Center, Distanse, Rotation);
     projectile.rotation = TerminationUtils.RotateBetween2Points(Main.player[(int)projectile.ai[0]].Center, projectile.Center) - MathHelper.PiOver2;
 }