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);
            }
        }
示例#2
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);
        }
示例#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 List <Build> ZergBuilds(Bot bot)
        {
            List <Build> options = new List <Build>();

            if (bot.EnemyRace == Race.Protoss)
            {
                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
            }
            else if (bot.EnemyRace == Race.Terran)
            {
                if (ProxyDetected.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Hellion.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    Banshee.Get().DetectedPreviously)
                {
                    options.Add(new Muukzor());
                    return(options);
                }
                if (BattlecruiserRush.Get().DetectedPreviously)
                {
                    options.Add(new MacroHydra());
                    return(options);
                }

                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
                options.Add(new Muukzor());
            }
            else if (bot.EnemyRace == Race.Zerg)
            {
                options.Add(new RoachRavager());
                options.Add(new MacroHydra());
                options.Add(new RushDefense());
            }
            else
            {
                options.Add(new MassZergling()
                {
                    AllowHydraTransition = true
                });
                options.Add(new MacroHydra());
                options.Add(new RushDefense());
            }

            return(options);
        }
示例#5
0
        public override void PreUpdate()
        {
            if (NPC.CountNPCS(mod.NPCType("Cirno")) < 1)
            {
                SGAWorld.CirnoBlizzard = Math.Max(SGAWorld.CirnoBlizzard - 3, 0);
            }
            if (ModLoader.GetMod("Idglibrary") != null)
            {
                Idglibrary.Idglib.nightmaremode = NightmareHardcore;
            }
            Hellion.HellionManager();

            SharkvernHead.DoStormThings(null, null);

            SnapCooldown = Math.Max(SnapCooldown - 1, 0);

            /*
             * int width = 32; int height = 256;
             * SGAmod.hellionLaserTex = new Texture2D(Main.graphics.GraphicsDevice, width, height);
             * Color[] dataColors = new Color[width * height];
             *
             * Color lerptocolor = Color.Red;
             * //if (projectile.ai[1] < 100)
             * //    lerptocolor = Color.Green;
             * float scroll = (float)SGAWorld.modtimer;
             *
             * if (SGAWorld.updatelasers) {
             *
             *  if (SGAmod.hellionLaserTex != null)
             *  {
             *      for (int y = 0; y < height; y++)
             *      {
             *          for (int x = 0; x < width; x += 1)
             *          {
             *              dataColors[(int)x + y * width] = Color.Lerp(Main.hslToRgb(((float)Math.Sin((x + scroll) * (width / (float)Math.PI)) * (1f)) % 1f, 0.75f, 0.5f), lerptocolor, 0.5f);
             *          }
             *
             *      }
             *  }
             *  SGAWorld.updatelasers = false;
             *
             *  SGAmod.hellionLaserTex.SetData(dataColors);
             *
             * }
             */
            if (Main.netMode != NetmodeID.Server)
            {
                if (Filters.Scene["SGAmod:ShockwaveBanshee"].IsActive() && !NPC.AnyNPCs(ModContent.NPCType <PrismBanshee>()))
                {
                    Filters.Scene.Deactivate("SGAmod:ShockwaveBanshee", new object[0]);
                }
            }
        }
示例#6
0
        public override void PreUpdate()
        {
            if (NPC.CountNPCS(mod.NPCType("Cirno")) < 1)
            {
                SGAWorld.CirnoBlizzard = Math.Max(SGAWorld.CirnoBlizzard - 3, 0);
            }
            if (ModLoader.GetMod("Idglibrary") != null)
            {
                Idglibrary.Idglib.nightmaremode = NightmareHardcore;
            }
            Hellion.HellionManager();

            /*
             * int width = 32; int height = 256;
             * SGAmod.hellionLaserTex = new Texture2D(Main.graphics.GraphicsDevice, width, height);
             * Color[] dataColors = new Color[width * height];
             *
             * Color lerptocolor = Color.Red;
             * //if (projectile.ai[1] < 100)
             * //    lerptocolor = Color.Green;
             * float scroll = (float)SGAWorld.modtimer;
             *
             * if (SGAWorld.updatelasers) {
             *
             *  if (SGAmod.hellionLaserTex != null)
             *  {
             *      for (int y = 0; y < height; y++)
             *      {
             *          for (int x = 0; x < width; x += 1)
             *          {
             *              dataColors[(int)x + y * width] = Color.Lerp(Main.hslToRgb(((float)Math.Sin((x + scroll) * (width / (float)Math.PI)) * (1f)) % 1f, 0.75f, 0.5f), lerptocolor, 0.5f);
             *          }
             *
             *      }
             *  }
             *  SGAWorld.updatelasers = false;
             *
             *  SGAmod.hellionLaserTex.SetData(dataColors);
             *
             * }
             */

            /*if (NPC.CountNPCS(mod.NPCType("Cirno")) < 1)
             * {
             *  Overlays.Scene["SGAmod:CirnoBlizzard"].Deactivate();
             *  Filters.Scene["SGAmod:CirnoBlizzard"].Deactivate();
             * }*/
        }
示例#7
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);
     }
 }
示例#8
0
        public override void PostUpdate()
        {
            if ((Main.netMode < 1 || Main.myPlayer == 0) && Main.expertMode)
            {
                NightmareHardcore = Main.LocalPlayer.GetModPlayer <SGAPlayer>().nightmareplayer ? 1 : 0;
            }

            WorldIsTin = (WorldGen.CopperTierOre == 7 ? false : true);

            Items.Glowrock.DoFallenSpaceRocks();

            if (Main.dayTime == true)
            {
                harbingercounter = 0;
            }
            if (NPC.CountNPCS(NPCID.Golem) > 0 && SGAConfig.Instance.GolemImprovement)
            {
                golemchecker = 1;
                if (NPC.CountNPCS(mod.NPCType("SGAGolemBoss")) < 1)
                {
                    NPC myowner = Main.npc[NPC.FindFirstNPC(NPCID.Golem)];
                    NPC.NewNPC((int)myowner.position.X, (int)myowner.position.Y, mod.NPCType("SGAGolemBoss"));
                    //Main.NewText("Test: modded golem npc spawned", 25, 25, 80);
                }
            }
            else
            {
                golemchecker = 0;
            }

            harbingercounter += 1;
            if (NPC.downedAncientCultist)
            {
                stolecrafting += 1;
            }

            questvars[11] = Math.Max(questvars[11] - 1, 0);
            if (questvars[10] > 100 && questvars[10] < 1000)
            {
                questvars[10] += 1;
                questvars[11]  = 120;
                Hellion hellinstance = new Hellion();
                if (questvars[10] == 250)
                {
                    hellinstance.HellionTaunt("...");
                }
                if (questvars[10] == 400)
                {
                    hellinstance.HellionTaunt("I see...");
                }
                if (questvars[10] == 600)
                {
                    hellinstance.HellionTaunt("A new challenger rises...");
                }
                if (questvars[10] == 800)
                {
                    hellinstance.HellionTaunt("Curious...");
                }
            }

            if (questvars[10] > 1100 && questvars[10] < 2300)
            {
                questvars[10] += 1;
                questvars[11]  = 120;
                Hellion hellinstance = new Hellion();
                if (questvars[10] == 1200)
                {
                    hellinstance.HellionTaunt("Another emmessary...");
                }
                if (questvars[10] == 1400)
                {
                    hellinstance.HellionTaunt("Fallen. hmp...?");
                }
                if (questvars[10] == 1600)
                {
                    hellinstance.HellionTaunt("The dragon?");
                }
                if (questvars[10] == 1800)
                {
                    hellinstance.HellionTaunt("'Planets.System.FindDraken'");
                }
                if (questvars[10] == 2000)
                {
                    hellinstance.HellionTaunt("Who is this who is slaying my emissaries?");
                }
                if (questvars[10] == 2200)
                {
                    hellinstance.HellionTaunt("No matter... We'll be meeting soon enough...");
                }
            }

            if (questvars[10] > 2400 && questvars[10] < 3750)
            {
                questvars[10] += 1;
                questvars[11]  = 120;
                Hellion hellinstance = new Hellion();
                if (questvars[10] == 2400)
                {
                    hellinstance.HellionTaunt("There is no mistake");
                }
                if (questvars[10] == 2600)
                {
                    hellinstance.HellionTaunt("the failures found the dragon");
                }
                if (questvars[10] == 2800)
                {
                    hellinstance.HellionTaunt("You there, human");
                }
                if (questvars[10] == 3000)
                {
                    hellinstance.HellionTaunt("Hand over the dragon, and I'll spare your world");
                }
                if (questvars[10] == 3200)
                {
                    hellinstance.HellionTaunt("After all, we're old acquaintances");
                }
                if (questvars[10] == 3400)
                {
                    hellinstance.HellionTaunt("And thanks to the incompetence of my minions, my mission will finally be complete");
                }
                if (questvars[10] == 3600)
                {
                    hellinstance.HellionTaunt("I'm sure your dragon will have something to say about this");
                }
                if (questvars[10] == 3700)
                {
                    Main.PlaySound(29, -1, -1, 105, 1f, -0.6f);
                    hellinstance.HellionTaunt("I'll be waiting...");
                }
            }

            if (stolecrafting == -400)
            {
                Idglib.Chat("Bet you were expecting him to drop an Ancient Manipulator huh?", 25, 25, 80);
            }
            if (stolecrafting == -200)
            {
                Idglib.Chat("Welp, we stole that from him, come fight us if you want it", 25, 25, 80);
            }
            if (stolecrafting == -50)
            {
                Idglib.Chat("We want our wraith core fragments back you son of a bitch...", 25, 25, 80);
            }
        }
示例#9
0
        public List <Build> ProtossBuilds(Bot bot)
        {
            List <Build> options = new List <Build>();

            if (Bot.Debug)
            {
                foreach (Strategy strategy in bot.EnemyStrategyAnalyzer.Strategies)
                {
                    if (strategy.DetectedPreviously)
                    {
                        System.Console.WriteLine("Detected previous strategy: " + strategy.Name());
                    }
                }
            }

            if (bot.EnemyRace == Race.Terran)
            {
                if (Marine.Get().DetectedPreviously &&
                    !Reaper.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    !SiegeTank.Get().DetectedPreviously &&
                    !Medivac.Get().DetectedPreviously &&
                    !Viking.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    !Battlecruiser.Get().DetectedPreviously &&
                    !WidowMine.Get().DetectedPreviously &&
                    !Hellion.Get().DetectedPreviously &&
                    !Thor.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously)
                {
                    // ValinMarineBot
                    options.Add(new NinjaTurtles());
                    return(options);
                }
                if (BattlecruiserRush.Get().DetectedPreviously &&
                    Thor.Get().DetectedPreviously &&
                    WidowMine.Get().DetectedPreviously)
                {
                    // BenBotBC
                    options.Add(new OneBaseStalkerImmortal());
                    return(options);
                }
                if (Battlecruiser.Get().DetectedPreviously &&
                    !BattlecruiserRush.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    !Reaper.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Medivac.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously)
                {
                    options.Add(new MassVoidray()
                    {
                        SkipDefenses = true
                    });
                    return(options);
                }

                /*
                 * if (ProxyDetected.Get().DetectedPreviously
                 *  && !Marauder.Get().DetectedPreviously
                 *  && Banshee.Get().DetectedPreviously)
                 * {
                 *  options.Add(new AntiMicro());
                 *  return options;
                 * }
                 */
                if (ProxyDetected.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    Banshee.Get().DetectedPreviously)
                {
                    // MicroMachine
                    options.Add(new AntiMicro()
                    {
                        HuntProxies = true, CounterProxyMarauder = false
                    });
                    //options.Add(new NinjaTurtles() { Expand = true });
                    //options.Add(new OneBaseTempest() { DefendingStalker = true });
                    return(options);
                }
                if (ProxyDetected.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Strelok
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, SendScout = true, MassTanksDetected = MassTank.Get().DetectedPreviously });
                    options.Add(new OneBaseStalkerImmortal()
                    {
                        UseSentry = true
                    });
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Raven.Get().DetectedPreviously &&
                    !Cyclone.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    options.Add(new OneBaseStalkerImmortal());
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = false, ProxyPylon = false, DelayObserver = true, SendScout = false, MassTanksDetected = true });
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Jensiiibot
                    //options.Add(new PvTStalkerTempest());
                    //options.Add(new Builds.Protoss.WorkerRush() { CounterJensiii = true, BuildStalkers = true });
                    //options.Add(new PvTStalkerImmortal() { BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, MassTanksDetected = MassTank.Get().DetectedPreviously, UseColosus = false });
                    options.Add(new PvTZealotImmortal());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    !Marauder.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously)
                {
                    // Rusty
                    options.Add(new OneBaseStalkerImmortal());
                    return(options);
                }
                if (Marine.Get().DetectedPreviously &&
                    Medivac.Get().DetectedPreviously &&
                    Viking.Get().DetectedPreviously &&
                    Reaper.Get().DetectedPreviously &&
                    !Raven.Get().DetectedPreviously &&
                    Cyclone.Get().DetectedPreviously &&
                    Marauder.Get().DetectedPreviously &&
                    !Liberator.Get().DetectedPreviously &&
                    !Banshee.Get().DetectedPreviously &&
                    Thor.Get().DetectedPreviously &&
                    SiegeTank.Get().DetectedPreviously &&
                    MassTank.Get().DetectedPreviously &&
                    Hellbat.Get().DetectedPreviously)
                {
                    // MechSweep
                    options.Add(new OneBaseTempest()
                    {
                        RequiredSize = 3
                    });
                    return(options);
                }

                options.Add(new PvTStalkerImmortal()
                {
                    BuildReaperWall = true, ProxyPylon = false, DelayObserver = true, MassTanksDetected = MassTank.Get().DetectedPreviously, UseColosus = false
                });
            }
            else if (bot.EnemyRace == Race.Zerg)
            {
                if (Bot.Main.OpponentID == "eed44128-f488-4e31-b457-8e55f8a95628")
                {
                    options.Add(new PvZHjax()
                    {
                        CounterRoaches = false, DefendNydus = false
                    });
                    return(options);
                }
                options.Add(new PvZHjax());
                return(options);

                /*
                 * if (Lurker.Get().DetectedPreviously)
                 * {
                 *  //Kagamine
                 *  //options.Add(new PvZAdeptIntoVoidray());
                 *  //options.Add(new WorkerRush());
                 *  options.Add(new PvZHjax());
                 *  return options;
                 * }
                 * if (Mutalisk.Get().DetectedPreviously
                 *  && !Lurker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseStalkerImmortal() { StartZealots = true });
                 *  return options;
                 * }
                 * if (Hydralisk.Get().DetectedPreviously && StrategyAnalysis.ZerglingRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  return options;
                 * }
                 * if (RoachRush.Get().DetectedPreviously || StrategyAnalysis.ZerglingRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new PvZRushDefense());
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Roach.Get().DetectedPreviously
                 *  && Zergling.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new PvZRushDefense());
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Queen.Get().DetectedPreviously
                 *  && Zergling.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && !Roach.Get().DetectedPreviously)
                 * {
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (bot.PreviousEnemyStrategies.MassHydra
                 *  && MassRoach.Get().DetectedPreviously
                 *  && !Lurker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Zergling.Get().DetectedPreviously
                 *  && !Roach.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && !Queen.Get().DetectedPreviously
                 *  && !Mutalisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Zergling.Get().DetectedPreviously
                 *  && Roach.Get().DetectedPreviously
                 *  && !Hydralisk.Get().DetectedPreviously
                 *  && Queen.Get().DetectedPreviously
                 *  && !Mutalisk.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * options.Add(new OneBaseStalkerImmortal() { StartZealots = true });
                 */
            }
            else if (bot.EnemyRace == Race.Protoss)
            {
                if (Zealot.Get().DetectedPreviously &&
                    VoidRay.Get().DetectedPreviously &&
                    !Carrier.Get().DetectedPreviously &&
                    !Tempest.Get().DetectedPreviously &&
                    !Stalker.Get().DetectedPreviously &&
                    !Adept.Get().DetectedPreviously &&
                    !Immortal.Get().DetectedPreviously &&
                    !StrategyAnalysis.CannonRush.Get().DetectedPreviously)
                {
                    // MavBot3
                    options.Add(new ZealotRush());
                    return(options);
                }
                if (SkippedNatural.Get().DetectedPreviously &&
                    !AdeptHarass.Get().DetectedPreviously &&
                    VoidRay.Get().DetectedPreviously &&
                    Immortal.Get().DetectedPreviously)
                {
                    // AdditionalPylons
                    options.Add(new DoubleRoboProxy());
                    return(options);
                }
                if (Oracle.Get().DetectedPreviously &&
                    ThreeGate.Get().DetectedPreviously &&
                    Zealot.Get().DetectedPreviously &&
                    !Stalker.Get().DetectedPreviously &&
                    !VoidRay.Get().DetectedPreviously &&
                    !Immortal.Get().DetectedPreviously)
                {
                    // LuckyBot
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                if (Carrier.Get().DetectedPreviously &&
                    Collosus.Get().DetectedPreviously &&
                    SkyToss.Get().DetectedPreviously &&
                    Tempest.Get().DetectedPreviously &&
                    !Archon.Get().DetectedPreviously &&
                    !HighTemplar.Get().DetectedPreviously)
                {
                    // TheGoldenArmada
                    options.Add(new OneBaseTempest());
                    return(options);
                }
                options.Add(new OneBaseStalkerImmortal()
                {
                    DoubleRobo = true, EarlySentry = true, AggressiveMicro = true
                });
                return(options);

                /*
                 * if (AdeptHarass.Get().DetectedPreviously
                 *  && SkyToss.Get().DetectedPreviously
                 *  && Carrier.Get().DetectedPreviously
                 *  && HighTemplar.Get().DetectedPreviously
                 *  && VoidRay.Get().DetectedPreviously
                 *  && !StrategyAnalysis.CannonRush.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  options.Add(new OneBaseStalkerImmortal());
                 *  return options;
                 * }
                 * if (AdeptHarass.Get().DetectedPreviously)
                 * {
                 *  // SharpenedEdge
                 *  options.Add(new OneBaseTempest());
                 *  options.Add(new Dishwasher());
                 *  return options;
                 * }
                 * if (StrategyAnalysis.CannonRush.Get().DetectedPreviously
                 *  && Tempest.Get().DetectedPreviously)
                 * {
                 *  // ThreeWayLover
                 *  //options.Add(new MassVoidray() { SkipDefenses = true });
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (Sentry.Get().DetectedPreviously
                 *  && Archon.Get().DetectedPreviously
                 *  && !Stalker.Get().DetectedPreviously
                 *  && !Zealot.Get().DetectedPreviously)
                 * {
                 *  options.Add(new TempestProxy());
                 *  return options;
                 * }
                 * if (Zealot.Get().DetectedPreviously
                 *  && StrategyAnalysis.CannonRush.Get().DetectedPreviously
                 *  && Oracle.Get().DetectedPreviously
                 *  && Phoenix.Get().DetectedPreviously
                 *  && Stalker.Get().DetectedPreviously
                 *  && !Immortal.Get().DetectedPreviously)
                 * {
                 *  //Gumby
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 * if (Oracle.Get().DetectedPreviously)
                 * {
                 *  options.Add(new OneBaseTempest());
                 *  return options;
                 * }
                 * if (!Stalker.Get().DetectedPreviously
                 *  && !Zealot.Get().DetectedPreviously
                 *  && !Sentry.Get().DetectedPreviously)
                 * {
                 *  options.Add(new ZealotRush());
                 *  return options;
                 * }
                 * if (Zealot.Get().DetectedPreviously
                 *  && !Stalker.Get().DetectedPreviously)
                 * {
                 *  options.Add(new NinjaTurtles());
                 *  return options;
                 * }
                 *
                 * options.Add(new NinjaTurtles());
                 * options.Add(new PvPMothershipSiege());
                 */
            }

            return(options);
        }
示例#10
0
        public override void PostUpdate()
        {
            if ((Main.netMode < 1 || Main.myPlayer == 0) && Main.expertMode)
            {
                NightmareHardcore = Main.LocalPlayer.GetModPlayer <SGAPlayer>().nightmareplayer ? 1 : 0;
            }

            WorldIsTin         = (WorldGen.CopperTierOre == 7 ? false : true);
            SGAWorld.modtimer += 1;
            if (Main.dayTime == true)
            {
                harbingercounter = 0;
            }
            if (NPC.CountNPCS(NPCID.Golem) > 0 && SGAConfig.Instance.GolemImprovement)
            {
                golemchecker = 1;
                if (NPC.CountNPCS(mod.NPCType("SGAGolemBoss")) < 1)
                {
                    NPC myowner = Main.npc[NPC.FindFirstNPC(NPCID.Golem)];
                    NPC.NewNPC((int)myowner.position.X, (int)myowner.position.Y, mod.NPCType("SGAGolemBoss"));
                    //Main.NewText("Test: modded golem npc spawned", 25, 25, 80);
                }
            }
            else
            {
                golemchecker = 0;
            }

            harbingercounter += 1;
            if (NPC.downedAncientCultist)
            {
                stolecrafting += 1;
            }
            if (Main.netMode < 1)
            {
                if (harbingercounter == 5)
                {
                    if (Main.rand.Next(0, 10) < 5 && bossprgressor == 1 && downedHarbinger == false && DD2Event.DownedInvasionT3 && NPC.downedMartians)
                    {
                        harbingercounter = -600;
                        Idglib.Chat("You feel a darker presence watching over you...", 0, 0, 75);
                    }
                }
                if (harbingercounter == -5)
                {
                    harbingercounter = 6;
                    SGAmod.CalamityNoRevengenceNoDeathNoU();
                    NPC.SpawnOnPlayer(Main.rand.Next(0, Main.PlayerList.Count), mod.NPCType("Harbinger"));
                }
            }

            questvars[11] = Math.Max(questvars[11] - 1, 0);
            if (questvars[10] > 100 && questvars[10] < 1000)
            {
                questvars[10] += 1;
                questvars[11]  = 120;
                Hellion hellinstance = new Hellion();
                if (questvars[10] == 250)
                {
                    hellinstance.HellionTaunt("...");
                }
                if (questvars[10] == 400)
                {
                    hellinstance.HellionTaunt("I see...");
                }
                if (questvars[10] == 600)
                {
                    hellinstance.HellionTaunt("A new challenger rises...");
                }
                if (questvars[10] == 800)
                {
                    hellinstance.HellionTaunt("Curious...");
                }
            }

            if (questvars[10] > 1100 && questvars[10] < 2300)
            {
                questvars[10] += 1;
                questvars[11]  = 120;
                Hellion hellinstance = new Hellion();
                if (questvars[10] == 1200)
                {
                    hellinstance.HellionTaunt("Another emmessary...");
                }
                if (questvars[10] == 1400)
                {
                    hellinstance.HellionTaunt("Fallen. hmp...?");
                }
                if (questvars[10] == 1600)
                {
                    hellinstance.HellionTaunt("The dragon?");
                }
                if (questvars[10] == 1800)
                {
                    hellinstance.HellionTaunt("'Planets.System.FindDraken'");
                }
                if (questvars[10] == 2000)
                {
                    hellinstance.HellionTaunt("Who is this who is slaying my emissaries?");
                }
                if (questvars[10] == 2200)
                {
                    hellinstance.HellionTaunt("No matter... We'll be meeting soon enough...");
                }
            }

            if (questvars[10] > 2400 && questvars[10] < 3750)
            {
                questvars[10] += 1;
                questvars[11]  = 120;
                Hellion hellinstance = new Hellion();
                if (questvars[10] == 2400)
                {
                    hellinstance.HellionTaunt("There is no mistake");
                }
                if (questvars[10] == 2600)
                {
                    hellinstance.HellionTaunt("the failures found the dragon");
                }
                if (questvars[10] == 2800)
                {
                    hellinstance.HellionTaunt("You there, human");
                }
                if (questvars[10] == 3000)
                {
                    hellinstance.HellionTaunt("Hand over the dragon, and I'll spare your world");
                }
                if (questvars[10] == 3200)
                {
                    hellinstance.HellionTaunt("After all, we're old acquaintances");
                }
                if (questvars[10] == 3400)
                {
                    hellinstance.HellionTaunt("And thanks to the incompetence of my minions, my mission will finally be complete");
                }
                if (questvars[10] == 3600)
                {
                    hellinstance.HellionTaunt("I'm sure your dragon will have something to say about this");
                }
                if (questvars[10] == 3700)
                {
                    Main.PlaySound(29, -1, -1, 105, 1f, -0.6f);
                    hellinstance.HellionTaunt("I'll be waiting...");
                }
            }

            if (stolecrafting == -400)
            {
                Idglib.Chat("Bet you were expecting him to drop an Ancient Manipulator huh?", 25, 25, 80);
            }
            if (stolecrafting == -200)
            {
                Idglib.Chat("Welp, we stole that from him, come fight us if you want it", 25, 25, 80);
            }
            if (stolecrafting == -50)
            {
                Idglib.Chat("We want our wraith core fragments back you son of a bitch...", 25, 25, 80);
            }

            if (tf2quest == 1)
            {
                tf2questcounter = tf2questcounter + 1;
                if (tf2questcounter == 60)
                {
                    SgaLib.Chat("<Administrator> Greeting mercenary", 150, 150, 150);
                }
                if (tf2questcounter == 150)
                {
                    SgaLib.Chat("<Administrator> You have just agreed to our contract terms", 150, 150, 150);
                }
                if (tf2questcounter == 280)
                {
                    SgaLib.Chat("<Administrator> To fight for our new division, Terraria Co", 150, 150, 150);
                }
                if (tf2questcounter == 510)
                {
                    SgaLib.Chat("<Administrator> I'll spare you the details, other than your first job", 150, 150, 150);
                }
                if (tf2questcounter == 640)
                {
                    SgaLib.Chat("<Administrator> Kill a total of 1000 enemies; prove your even worth looking at", 150, 150, 150);
                }
                if (tf2questcounter == 770)
                {
                    SgaLib.Chat("<Administrator> When your done, check your contracter. DO NOT Disapointment me...", 150, 150, 150);
                }
                if (tf2questcounter == 850)
                {
                    tf2quest = 2; tf2questcounter = 0;
                }
            }
            if (tf2quest == 3)
            {
                tf2questcounter = tf2questcounter + 1;
                if (tf2questcounter == 60)
                {
                    SgaLib.Chat("<Administrator> Very good", 150, 150, 150);
                }
                if (tf2questcounter == 150)
                {
                    SgaLib.Chat("<Administrator> You've proven your, somewhat confident in your work", 150, 150, 150);
                }
                if (tf2questcounter == 280)
                {
                    SgaLib.Chat("<Administrator> Now then, if I am to take back Mann Co I need resources", 150, 150, 150);
                }
                if (tf2questcounter == 510)
                {
                    SgaLib.Chat("<Administrator> Most effectively... Australium...", 150, 150, 150);
                }
                if (tf2questcounter == 640)
                {
                    SgaLib.Chat("<Administrator> I have added functions to your contracker, it will reveal veins of Australium in this world when used", 150, 150, 150);
                }
                if (tf2questcounter == 770)
                {
                    SgaLib.Chat("<Administrator> You need to have 100 Gold Ingots in your inventory for it to work; it will not take Platinum!", 150, 150, 150);
                }
                if (tf2questcounter == 900)
                {
                    SgaLib.Chat("<Administrator> However accessing this function may attract unwanted attention too early, I'm sure it's nothing you can't handle", 150, 150, 150);
                }
                if (tf2questcounter == 1030)
                {
                    SgaLib.Chat("<Administrator> When your done, check your contracter. Try not to be a Disapointment.", 150, 150, 150);
                }
                if (tf2questcounter == 1050)
                {
                    tf2quest = 4; tf2questcounter = 0;
                }
            }
            if (tf2quest == 5)
            {
                tf2questcounter = tf2questcounter + 1;
                if (tf2questcounter == 60)
                {
                    SgaLib.Chat("<Administrator> Australium... A bountiful ammount of 100 veins", 150, 150, 150);
                }
                if (tf2questcounter == 150)
                {
                    SgaLib.Chat("<Administrator> My plan is going accordingly", 150, 150, 150);
                }
                if (tf2questcounter == 280)
                {
                    SgaLib.Chat("<Administrator> I think your due a promotion, to Commando", 150, 150, 150);
                }
                if (tf2questcounter == 510)
                {
                    SgaLib.Chat("<Administrator> You have been granted knowledge of how to make higher tier items, including more TF2 emblems", 150, 150, 150);
                }
                if (tf2questcounter == 640)
                {
                    SgaLib.Chat("<Administrator> Now for the next phase. I need 50 Australium bars", 150, 150, 150);
                }
                if (tf2questcounter == 770)
                {
                    SgaLib.Chat("<Administrator> Minedown and smelt the ores you find, then report back right away", 150, 150, 150);
                }
                if (tf2questcounter == 900)
                {
                    SgaLib.Chat("<Administrator> However accessing this function may attract unwanted attention too early, I'm sure it's nothing you can't handle", 150, 150, 150);
                }
                if (tf2questcounter == 1030)
                {
                    SgaLib.Chat("<Administrator> When your done, check your contracter. Try not to be a Disapointment.", 150, 150, 150);
                }
                if (tf2questcounter == 1050)
                {
                    tf2quest = 6; tf2questcounter = 0;
                }
            }
        }
示例#11
0
        public void ReadInput()
        {
            if (Console.KeyAvailable)
            {
                ConsoleKeyInfo userInput = Console.ReadKey(true);

                if (userInput.Key == ConsoleKey.A || userInput.Key == ConsoleKey.D ||
                    userInput.Key == ConsoleKey.W || userInput.Key == ConsoleKey.S)
                {
                    MovePlayer(userInput);
                }

                else if (userInput.Key == ConsoleKey.P || userInput.Key == ConsoleKey.O ||
                         userInput.Key == ConsoleKey.I || userInput.Key == ConsoleKey.U)
                {
                    char       turretSymbol  = ' ';
                    TurretType newTurretType = TurretType.Cannon;

                    // I want to build the turret in front of the player so I need to oversee his cursor
                    int newTurretX = internal_Variables.PlayerCol;
                    int newTurretY = internal_Variables.PlayerRow;

                    if (internal_Variables.PlayerView == 'v')
                    {
                        newTurretY++;
                    }
                    else if (internal_Variables.PlayerView == '^')
                    {
                        newTurretY--;
                    }
                    else if (internal_Variables.PlayerView == '<')
                    {
                        newTurretX--;
                    }
                    else if (internal_Variables.PlayerView == '>')
                    {
                        newTurretX++;
                    }

                    if (newTurretX < 0 || newTurretX >= Console.WindowWidth ||
                        newTurretY < 0 || newTurretY >= Console.WindowHeight)
                    {
                        return;
                    }

                    TurretPlacement placeOn = DeterminePlayerPosition();

                    if (internal_Variables.PocketMoney >= 50 && userInput.Key == ConsoleKey.P)
                    {
                        turretSymbol = '*';
                        // the turret type is the already defined one
                        internal_Variables.PocketMoney -= 50;
                    }

                    else if (internal_Variables.PocketMoney >= 340 && userInput.Key == ConsoleKey.O)
                    {
                        turretSymbol  = '&';
                        newTurretType = TurretType.FireBunker_Hellion;
                        internal_Variables.PocketMoney -= 340;
                    }

                    else if (internal_Variables.PocketMoney >= 165 && userInput.Key == ConsoleKey.I)
                    {
                        turretSymbol  = '%';
                        newTurretType = TurretType.Tardus;
                        internal_Variables.PocketMoney -= 165;
                    }

                    else if (internal_Variables.PocketMoney >= 500 && userInput.Key == ConsoleKey.U)
                    {
                        turretSymbol  = '#';
                        newTurretType = TurretType.LaserAnnihilator;
                        internal_Variables.PocketMoney -= 500;
                    }

                    foreach (var obstaclePosition in internal_Variables.ObstaclePositions)
                    {
                        if (obstaclePosition.X == newTurretX && obstaclePosition.Y == newTurretY)
                        {
                            return;
                        }
                    }

                    Console.SetCursorPosition(newTurretX, newTurretY);
                    Console.Write(turretSymbol);

                    if (userInput.Key == ConsoleKey.P || userInput.Key == ConsoleKey.U)
                    {
                        internal_Variables.TurretsPosition.Add(new Cannon(newTurretX, newTurretY, newTurretType, placeOn, ref internal_Variables));
                    }
                    else if (userInput.Key == ConsoleKey.I)
                    {
                        internal_Variables.TurretsPosition.Add(new Tardus(newTurretX, newTurretY, newTurretType, placeOn, ref internal_Variables));
                    }
                    else if (userInput.Key == ConsoleKey.O)
                    {
                        var turret = new Hellion(newTurretX, newTurretY, newTurretType, placeOn, ref internal_Variables);

                        /* // else no sense to care for the newly created gadget
                         * for (int j = 0; j < internal_Variables.Battleground.Count; j++)
                         * {
                         *   var curPosition = internal_Variables.Battleground[j];
                         *   if (curPosition.Uniq_X == newTurretX && curPosition.Uniq_Y == newTurretY)
                         *   {
                         *       internal_Variables.FireTrappers.Add(trap);
                         *       break;
                         *   }
                         * }
                         */
                        internal_Variables.Hellions.Add(turret);
                        internal_Variables.TurretsPosition.Add(turret);
                    }
                }
            }
        }