Пример #1
0
        public override void Update(GameTime gameTime)
        {
            Filters.Scene["SGAmod:HellionSky"].GetShader().UseColor(0.5f, 0.5f, 0.5f).UseOpacity(SGAmod.HellionSkyalpha);
            float   amax  = 0f;
            Hellion nullg = Hellion.GetHellion();

            if (nullg != null)
            {
                if (nullg.introtimer > 199 && nullg.subphase > 1)
                {
                    amax = 0.05f;
                }

                if (nullg.tyrant > 0)
                {
                    amax = 0.25f;
                }

                if (nullg.npc.ai[1] < 99700 && nullg.npc.ai[1] > 30000)
                {
                    amax = 0.60f;
                }
            }
            else
            {
                amax = 1f;
            }

            int hellcount = NPC.CountNPCS((SGAmod.Instance).NPCType("Hellion")) + NPC.CountNPCS((SGAmod.Instance).NPCType("HellionFinal"));

            acolor = Main.hslToRgb((Main.GlobalTime / 10f) % 1, 0.81f, 0.5f);
            SGAmod.HellionSkyalpha = MathHelper.Clamp(hellcount > 0 ? (SGAmod.HellionSkyalpha + 0.015f / 5f) : SGAmod.HellionSkyalpha - (0.015f / 5f), 0f, amax);
        }
        public override bool CanUseItem(Player player)
        {
            if (Main.netMode > 0)
            {
                if (Main.netMode == NetmodeID.MultiplayerClient)
                {
                    Hellion hell = new Hellion();
                    hell.HellionTaunt("This fight is not possible in Multiplayer, comeback in Single Player");
                }
                return(false);
            }

            if (Hellion.GetHellion() == null && !IdgNPC.bossAlive && SGAWorld.downedSPinky && SGAWorld.downedCratrosityPML && SGAWorld.downedWraiths > 3 && NPC.CountNPCS(mod.NPCType("HellionMonolog")) < 1)
            {
                if (!Main.expertMode)
                {
                    Hellion hell = new Hellion();
                    hell.HellionTaunt("What makes you think I'm going to challenge a NORMAL difficulty player? You shouldn't even have this item, cheater...");
                    return(false);
                }
                return(base.CanUseItem(player));
            }
            else
            {
                return(false);
            }
        }
Пример #3
0
        private static void drawit(Matrix zoomitz, float rotation = 0f, float scale = 1f)
        {
            if (Hellion.GetHellion() != null)
            {
                if (Hellion.GetHellion().GetType() == typeof(HellionFinal))
                {
                    HellionSky.spinornah = true;
                }
                else
                {
                    HellionSky.spinornah = false;
                }
            }

            Main.spriteBatch.End();
            Main.spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, DepthStencilState.Default, RasterizerState.CullNone, null, zoomitz);

            int width = (int)(200f); int height = (int)(200f);

            Texture2D beam       = new Texture2D(Main.graphics.GraphicsDevice, width, height);
            var       dataColors = new Color[width * height];


            ///


            for (int y = 0; y < height; y++)
            {
                for (int x = 0; x < width; x++)
                {
                    float dist = (new Vector2(x, y) - new Vector2(width / 2, height / 2)).Length();
                    float alg  = ((-Main.GlobalTime + ((float)(dist) / 0.5f)) / 1f);
                    dataColors[x + y * width] = (Main.hslToRgb(alg % 1f, 0.75f, 0.5f));
                }
            }

            ///


            beam.SetData(0, null, dataColors, 0, width * height);
            Color color     = Color.White;
            float tempcolor = SGAmod.HellionSkyalpha;

            if (SGAmod.HellionSkyalpha > 0.30)
            {
                color      = Color.Lerp(Color.White, Color.Black, Math.Min(0.9f, (SGAmod.HellionSkyalpha - 0.30f) * 3.50f));
                tempcolor *= 1.5f;
            }
            if (HellionSky.spinornah)
            {
                Main.spriteBatch.Draw(beam, new Vector2(Main.screenWidth / 2f, Main.screenHeight / 2f), null, color * Math.Min(1f, tempcolor) * 0.5f, Main.GlobalTime / 4f, new Vector2(beam.Width / 2, beam.Height / 2), new Vector2(Main.screenWidth, Main.screenHeight) / new Vector2(1920, 1080) * 12f, SpriteEffects.None, 0f);
                Main.spriteBatch.Draw(beam, new Vector2(Main.screenWidth / 2f, Main.screenHeight / 2f), null, color * Math.Min(1f, tempcolor) * 0.5f, -Main.GlobalTime / 4f, new Vector2(beam.Width / 2, beam.Height / 2), new Vector2(Main.screenWidth, Main.screenHeight) / new Vector2(1920, 1080) * 12f, SpriteEffects.None, 0f);
            }
            else
            {
                Main.spriteBatch.Draw(beam, new Vector2(Main.screenWidth / 2f, Main.screenHeight / 2f), null, color * Math.Min(1f, tempcolor), rotation, new Vector2(beam.Width / 2, beam.Height / 2), new Vector2(Main.screenWidth, Main.screenHeight) / new Vector2(1920, 1080) * 10f, SpriteEffects.None, 0f);
            }
            //}
        }
Пример #4
0
 public override bool CanUseItem(Player player)
 {
     if (Hellion.GetHellion() == null && !IdgNPC.bossAlive && SGAWorld.downedSPinky && SGAWorld.downedCratrosityPML && SGAWorld.downedWraiths > 3 && NPC.CountNPCS(mod.NPCType("HellionMonolog")) < 1)
     {
         if (!Main.expertMode)
         {
             Hellion hell = new Hellion();
             hell.HellionTaunt("What makes you think I'm going to challenge a NORMAL difficulty player? You shouldn't even have this item, cheater...");
             return(false);
         }
         return(true);
     }
     else
     {
         return(false);
     }
 }