public override bool CheckDead()
 {
     if (BlushieBoss.HealthA > 0)
     {
         npc.life = BlushieBoss.HealthA;
     }
     else
     {
         npc.active = false;
         if (Main.netMode != 1)
         {
             if (BlushieBoss.BlushieC)
             {
                 BlushieBoss.ChrisTalk("You are incredibly powerful! It was a pleasure to be able to spar with you.");
                 Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("FirePulsar"));
             }
             else
             {
                 BlushieBoss.AnnaTalk("Wow, you're really strong! It was very fun playing with you~");
                 Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("RadiantRainbowRondure"));
             }
         }
     }
     return(false);
 }
        public override double CalculateDamage(Player player, double damage)
        {
            if (BlushieBoss.ShieldA >= 300 && BlushieBoss.ShieldBuff(npc))
            {
                BlushieBoss.ShieldA = 0;
                return(0);
            }
            float healthMult = player.GetModPlayer <BluemagicPlayer>().origHealth / 720f;
            float regenMult  = player.lifeRegen / 28f;
            float mult       = 0.6f * healthMult + 0.4f * regenMult;

            damage = mult * 100000;
            if (damage > 100000)
            {
                damage = 100000;
            }
            else if (damage < 1)
            {
                damage = 1;
            }
            if (Main.netMode != 2 && npc.localAI[0] == 0f && damage < 50000)
            {
                if (BlushieBoss.BlushieC)
                {
                    Main.NewText("<blushiemagic (C)> I'll give you a hint: maximum health and high life regen are key to damaging me. If you get hit, you won't be penalized for the max health reduction, but the damage over time you take will matter!", 255, 255, 0);
                }
                else
                {
                    Main.NewText("<blushiemagic (A)> I play with my own rules! If you want to damage me, try having lots of health at the start of the fight and high life regen!", 255, 128, 128);
                }
                npc.localAI[0] = 1f;
            }
            return(damage);
        }
Пример #3
0
 public override void Update()
 {
     Time--;
     if (Time == 0)
     {
         for (int k = 0; k < 16; k++)
         {
             float  rot    = MathHelper.TwoPi * k / 16f;
             Bullet bullet = new BulletFire(Position, 8f * rot.ToRotationVector2());
             BlushieBoss.AddBullet(bullet, BombDamageMult);
         }
     }
     if (Time < 0)
     {
         Time2--;
     }
     if (Time2 == 0)
     {
         for (int k = 0; k < 16; k++)
         {
             float  rot    = MathHelper.TwoPi * (k + 0.5f) / 16f;
             Bullet bullet = new BulletFire(Position, 8f * rot.ToRotationVector2());
             BlushieBoss.AddBullet(bullet, BombDamageMult);
         }
     }
     for (int k = 0; k < 1; k++)
     {
         int dust = Dust.NewDust(Position - new Vector2(Size), 64, 64, 6, 0f, 0f, 0, default(Color), 4f);
         Main.dust[dust].noGravity = true;
         Main.dust[dust].velocity *= 2f;
     }
 }
Пример #4
0
        public override double CalculateDamage(Player player, double damage)
        {
            if (BlushieBoss.ShieldK >= 300 && BlushieBoss.ShieldBuff(npc))
            {
                BlushieBoss.ShieldK = 0;
                return(0);
            }
            if (Bluemagic.testing)
            {
                return(250000);
            }
            float defenseMult = player.statDefense / 200f;
            float resistMult  = player.endurance / 0.6f;
            float mult        = 0.6f * defenseMult + 0.4f * resistMult;

            damage = mult * 100000;
            if (damage > 100000)
            {
                damage = 100000;
            }
            if (Main.netMode != 2 && npc.localAI[0] == 0f && damage < 50000)
            {
                Main.NewText("<blushiemagic (K)> Oh yeah, uh, you need lots of defense and damage reduction if you want to damage me. Sorry...", 0, 128, 255);
                npc.localAI[0] = 1f;
            }
            return(damage);
        }
Пример #5
0
 public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
 {
     if (BlushieBoss.ShieldK >= 300 && BlushieBoss.ShieldBuff(npc))
     {
         Texture2D shield = mod.GetTexture("BlushieBoss/ShieldK");
         spriteBatch.Draw(shield, npc.Center - Main.screenPosition - new Vector2(shield.Width / 2, shield.Height / 2), null, Color.White * 0.5f);
     }
 }
Пример #6
0
 public override bool CheckDead()
 {
     if (BlushieBoss.Timer < 3600)
     {
         npc.life = npc.lifeMax;
     }
     else
     {
         npc.active = false;
         BlushieBoss.StartPhase2();
     }
     return(false);
 }
        public override void Update()
        {
            Vector2 oldVel = Velocity;

            base.Update();
            if (NumBounces >= 0 && oldVel != Velocity)
            {
                float rot   = Velocity.ToRotation();
                float speed = Velocity.Length();
                float newRot1;
                float newRot2;
                if (rot < -MathHelper.PiOver2)
                {
                    newRot1 = (rot - MathHelper.Pi) / 2f;
                    newRot2 = (rot - MathHelper.PiOver2) / 2f;
                }
                else if (rot < 0f)
                {
                    newRot1 = (rot - MathHelper.PiOver2) / 2f;
                    newRot2 = rot / 2f;
                }
                else if (rot < MathHelper.PiOver2)
                {
                    newRot1 = rot / 2f;
                    newRot2 = (rot + MathHelper.PiOver2) / 2f;
                }
                else
                {
                    newRot1 = (rot + MathHelper.PiOver2) / 2f;
                    newRot2 = (rot + MathHelper.Pi) / 2f;
                }
                var bullet = new BulletLightning(Position, speed * newRot1.ToRotationVector2());
                bullet.NumBounces = NumBounces;
                bullet.Damage     = Damage;
                BlushieBoss.AddBullet(bullet);
                bullet            = new BulletLightning(Position, speed * newRot2.ToRotationVector2());
                bullet.NumBounces = NumBounces;
                bullet.Damage     = Damage;
                BlushieBoss.AddBullet(bullet);
            }
            if (Main.rand.Next(20) == 0)
            {
                int dust = Dust.NewDust(Position - new Vector2(Size), 32, 32, Bluemagic.Instance.DustType("PurpleLightning"), 0f, 0f, 100, default(Color), 1f);
                Main.dust[dust].velocity *= 0.5f;
                Main.dust[dust].velocity += Velocity;
                Main.dust[dust].position += Velocity;
                Main.dust[dust].noGravity = true;
                Main.dust[dust].noLight   = true;
            }
        }
Пример #8
0
 public override bool CheckDead()
 {
     if (BlushieBoss.HealthK > 0)
     {
         npc.life = BlushieBoss.HealthK;
     }
     else
     {
         npc.active = false;
         if (Main.netMode != 1)
         {
             BlushieBoss.KylieTalk("I knew it. I'm so useless...");
             Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("FrostFairyWings"));
         }
     }
     return(false);
 }
 public override bool CheckDead()
 {
     if (BlushieBoss.HealthL > 0)
     {
         npc.life = BlushieBoss.HealthL;
     }
     else
     {
         if (Main.netMode != 1)
         {
             BlushieBoss.LunaTalk("Hmph. I will admit I underestimated you. I shall concede defeat...");
             Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("DarkLightningPack"));
         }
         npc.active = false;
     }
     return(false);
 }
Пример #10
0
 public override double CalculateDamage(Player player, double damage)
 {
     if (BlushieBoss.ShieldL >= 300 && BlushieBoss.ShieldBuff(npc))
     {
         BlushieBoss.ShieldL = 0;
         return(0);
     }
     damage *= 50;
     if (damage > 100000)
     {
         damage = 100000;
     }
     if (Main.netMode != 2 && npc.localAI[0] == 0f && damage < 50000)
     {
         Main.NewText("<blushiemagic (L)> I hope you realize that you need high damage in order to deal high damage to me. Common sense, really...", 128, 0, 128);
         npc.localAI[0] = 1f;
     }
     return(damage);
 }
Пример #11
0
        public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
        {
            Texture2D shield = mod.GetTexture("BlushieBoss/Shield");
            float     alpha;

            if (BlushieBoss.Timer < 60)
            {
                alpha = 0f;
            }
            else if (BlushieBoss.Timer < 120)
            {
                int temp = (BlushieBoss.Timer - 60) % 40;
                if (temp > 20)
                {
                    temp = 40 - temp;
                }
                alpha = temp / 20f;
            }
            else if (BlushieBoss.Timer < 3600)
            {
                alpha = 1f;
            }
            else if (BlushieBoss.Timer < 3660)
            {
                int temp = (BlushieBoss.Timer - 3600) % 40;
                if (temp > 20)
                {
                    temp = 40 - temp;
                }
                alpha = 1f - temp / 20f;
            }
            else
            {
                alpha = 0f;
            }
            alpha *= 0.5f;
            if (alpha > 0f)
            {
                spriteBatch.Draw(shield, npc.Center - Main.screenPosition - new Vector2(shield.Width / 2, shield.Height / 2), null, Color.White * alpha);
            }
            BlushieBoss.DrawBullets(spriteBatch);
        }
Пример #12
0
 public override void Update()
 {
     if (this.Position.Y >= this.Threshold)
     {
         this.Timer--;
         if (this.ShouldRemove())
         {
             for (int k = 0; k < 4; k++)
             {
                 float  rot    = MathHelper.TwoPi * (k + 0.5f) / 4f;
                 Bullet bullet = BulletSimple.NewDragon(this.Position, this.Speed * rot.ToRotationVector2());
                 BlushieBoss.AddBullet(bullet, this.Damage);
             }
         }
     }
     else
     {
         this.Position.Y += this.Speed;
     }
 }
Пример #13
0
 public override void PostDraw(SpriteBatch spriteBatch, Color lightColor)
 {
     if (BlushieBoss.Phase == 2 && BlushieBoss.Timer < 480)
     {
         Texture2D texture  = mod.GetTexture("ChaosSpirit/DissonanceOrb");
         Vector2   drawPos  = npc.Center - Main.screenPosition;
         Vector2   origin   = new Vector2(texture.Width / 2, texture.Height / 2);
         float     rotation = 0.05f * BlushieBoss.Timer;
         spriteBatch.Draw(texture, drawPos, null, Color.White, rotation, origin, 0.5f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, -rotation, origin, 0.5f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, -rotation, origin, 0.25f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, rotation, origin, 0.25f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, -rotation, origin, 1f, SpriteEffects.None, 0f);
         spriteBatch.Draw(texture, drawPos, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
     }
     else if (BlushieBoss.Phase != 3 || BlushieBoss.Phase3Attack == 0)
     {
         Texture2D shield = mod.GetTexture("Mounts/PurityShield");
         spriteBatch.Draw(shield, npc.Center - Main.screenPosition - new Vector2(shield.Width / 2, shield.Height / 2), null, Color.White * 0.5f);
     }
     BlushieBoss.DrawBullets(spriteBatch);
 }