public void BlankModHook(Action <SilencerInstance, BlankModificationItem, Vector2, PlayerController> orig, SilencerInstance silencer, BlankModificationItem bmi, Vector2 centerPoint, PlayerController user)
        {
            orig(silencer, bmi, centerPoint, user);

            if (user.HasPickupID(KinAmmoletID))
            {
                RoomHandler currentRoom = user.CurrentRoom;
                if (currentRoom.IsSealed)
                {
                    string enemyToSpawnGUID = "01972dee89fc4404a5c408d50007dad5";
                    bool   shouldJam        = false;
                    if (user.PlayerHasActiveSynergy("Shotgun Club") && UnityEngine.Random.value <= 0.5f)
                    {
                        enemyToSpawnGUID = "128db2f0781141bcb505d8f00f9e4d47";
                    }
                    if (user.PlayerHasActiveSynergy("Friends On The Other Side"))
                    {
                        shouldJam = true;
                    }

                    CompanionisedEnemyUtility.SpawnCompanionisedEnemy(user, enemyToSpawnGUID, centerPoint.ToIntVector2(), false, ExtendedColours.brown, 15, 2, shouldJam, true);
                    if ((user.PlayerHasActiveSynergy("Aim Twice, Shoot Once")))
                    {
                        CompanionisedEnemyUtility.SpawnCompanionisedEnemy(user, enemyToSpawnGUID, centerPoint.ToIntVector2(), false, ExtendedColours.brown, 15, 2, shouldJam, true);
                    }
                }
            }
        }
Пример #2
0
 public override void OnReload(PlayerController player, Gun gun)
 {
     if (player && player.PlayerHasActiveSynergy("Manbat and Robin"))
     {
         CompanionisedEnemyUtility.SpawnCompanionisedEnemy(player, "2feb50a6a40f4f50982e89fd276f6f15", gun.barrelOffset.position.XY().ToIntVector2(), true, Color.black, 10, 2, false, false);
     }
     base.OnReload(player, gun);
 }
        private IEnumerator BatAttack()
        {
            yield return(new WaitForSeconds(1));

            for (int i = 0; i < 10; i++)
            {
                if (self.ProjectilePlayerOwner().IsInCombat)
                {
                    CompanionisedEnemyUtility.SpawnCompanionisedEnemy(self.ProjectilePlayerOwner(), BraveUtility.RandomElement(EasyEnemyTypeLists.SmallBullats), self.specRigidbody.UnitCenter.ToIntVector2(), false, Color.red, 7, 2, false, false);
                }
                yield return(new WaitForSeconds(0.1f));
            }
            Die();
            yield break;
        }
        private IEnumerator HegemonyPlatoon()
        {
            yield return(new WaitForSeconds(1));

            for (int i = 0; i < 3; i++)
            {
                if (self.ProjectilePlayerOwner().IsInCombat)
                {
                    CompanionisedEnemyUtility.SpawnCompanionisedEnemy(self.ProjectilePlayerOwner(), "556e9f2a10f9411cb9dbfd61e0e0f1e1", self.specRigidbody.UnitCenter.ToIntVector2(), false, Color.red, 5, 2, false, true);
                }
                yield return(new WaitForSeconds(0.8f));
            }
            Die();
            yield break;
        }
Пример #5
0
        protected override void DoEffect(PlayerController user)
        {
            AkSoundEngine.PostEvent("Play_OBJ_dead_again_01", base.gameObject);
            for (int i = 0; i < StaticReferenceManager.AllCorpses.Count; i++)
            {
                GameObject gameObject = StaticReferenceManager.AllCorpses[i];
                if (gameObject && gameObject.GetComponent <tk2dBaseSprite>() && gameObject.transform.position.GetAbsoluteRoom() == user.CurrentRoom && gameObject.transform.position.GetAbsoluteRoom().IsSealed)
                {
                    Vector2 worldCenter = gameObject.GetComponent <tk2dBaseSprite>().WorldCenter;

                    string guid = "249db525a9464e5282d02162c88e0357";
                    if (user.PlayerHasActiveSynergy("Roll Dem Bones") && UnityEngine.Random.value <= 0.25f)
                    {
                        guid = "336190e29e8a4f75ab7486595b700d4a";
                    }
                    AIActor Spent = CompanionisedEnemyUtility.SpawnCompanionisedEnemy(user, guid, worldCenter.ToIntVector2(), true, ExtendedColours.purple, 5, 2, false, true);
                    if (Spent.GetComponent <SpawnEnemyOnDeath>())
                    {
                        UnityEngine.Object.Destroy(Spent.GetComponent <SpawnEnemyOnDeath>());
                    }
                    if (Spent.CorpseObject != null)
                    {
                        Spent.CorpseObject = null;
                    }

                    if (guid == "249db525a9464e5282d02162c88e0357")
                    {
                        Spent.OverrideHitEnemies    = true;
                        Spent.CollisionDamage       = 1f;
                        Spent.CollisionDamageTypes |= CoreDamageTypes.Electric;
                    }

                    if (user.PlayerHasActiveSynergy("The Sprinting Dead"))
                    {
                        Spent.MovementSpeed *= 2;
                    }

                    UnityEngine.Object.Destroy(gameObject.gameObject);
                }
            }
        }
Пример #6
0
        protected override void DoEffect(PlayerController user)
        {
            AkSoundEngine.PostEvent("Play_OBJ_supplydrop_activate_01", base.gameObject);
            List <string> reinforcements = new List <string>();

            reinforcements.AddRange(BraveUtility.RandomElement(randomEnemyloadouts));

            foreach (string key in synergies.Keys)
            {
                if (user.PlayerHasActiveSynergy(key))
                {
                    reinforcements.Add(synergies[key]);
                }
            }

            foreach (string dude in reinforcements)
            {
                IntVector2?bestRewardLocation = LastOwner.CurrentRoom.GetRandomVisibleClearSpot(2, 2);
                AIActor    spawnedDude        = CompanionisedEnemyUtility.SpawnCompanionisedEnemy(user, dude, (IntVector2)bestRewardLocation, false, Color.red, 5, 2, false, true);
                spawnedDude.HandleReinforcementFallIntoRoom(0f);
            }
        }
Пример #7
0
        public override void Start()
        {
            try
            {
                ETGModConsole.Log("Once More Into The Breach started initialising...");

                //Rooms
                ZipFilePath = this.Metadata.Archive;
                FilePath    = this.Metadata.Directory + "/rooms";
                ModName     = this.Metadata.Name;

                //Tools and Toolboxes
                StaticReferences.Init();
                ExoticPlaceables.Init();
                DungeonHandler.Init();
                Tools.Init();
                ShrineFakePrefabHooks.Init();

                ShrineFactory.Init();
                OldShrineFactory.Init();

                FakePrefabHooks.Init();

                ItemBuilder.Init();
                CharApi.Init("nn");
                CustomClipAmmoTypeToolbox.Init();
                EnemyTools.Init();
                NpcApi.Hooks.Init();
                EnemyAPI.Hooks.Init();
                SaveAPIManager.Setup("nn");
                AudioResourceLoader.InitAudio();
                CurseManager.Init();
                ETGModMainBehaviour.Instance.gameObject.AddComponent <GlobalUpdate>();
                ETGModMainBehaviour.Instance.gameObject.AddComponent <CustomDarknessHandler>();
                GameOfLifeHandler.Init();
                //ETGModMainBehaviour.Instance.gameObject.AddComponent<GameOfLifeHandler>();

                //ETGModConsole.Log(Assembly.GetExecutingAssembly().FullName);

                //Challenges
                Challenges.Init();

                //Hooks n Shit
                PlayerToolsSetup.Init();
                EnemyHooks.InitEnemyHooks();
                CompanionisedEnemyUtility.InitHooks();
                MiscUnlockHooks.InitHooks();
                FloorAndGenerationToolbox.Init();
                PedestalHooks.Init();
                ExplosionHooks.Init();
                ChestToolbox.Inithooks();
                UIHooks.Init();
                ComplexProjModBeamCompatibility.Init();
                ReloadBreachShrineHooks.Init();
                metadata = this.Metadata;
                //VFX Setup
                VFXToolbox.InitVFX();
                EasyVFXDatabase.Init(); //Needs to occur before goop definition
                ShadeFlightHookFix.Init();

                //Status Effect Setup
                StaticStatusEffects.InitCustomEffects();
                PlagueStatusEffectSetup.Init();
                Confusion.Init();

                //Goop Setup
                EasyGoopDefinitions.DefineDefaultGoops();
                DoGoopEffectHook.Init();

                //Commands and Other Console Utilities
                Commands.Init();

                //Hats
                HatUtility.NecessarySetup();
                HatDefinitions.Init();

                //Gamemodes
                AllJammedState.Init();
                JammedChests.Init();

                //Exotic Object Shit

                //VFX
                LockdownStatusEffect.Initialise();

                //Testing / Debug Items
                ActiveTestingItem.Init();
                PassiveTestingItem.Init();
                BulletComponentLister.Init();
                ObjectComponentLister.Init();

                //-----------------------------------------------------ITEMS GET INITIALISED
                #region ItemInitialisation
                //Character Starters
                ShadeHand.Init();
                ShadeHeart.Init();
                //Egg Salad and Prima Bean can go here, because they were the first
                EggSalad.Init();
                PrimaBean.Init();
                //Bullet modifiers
                BashingBullets.Init();
                TitanBullets.Init();
                MistakeBullets.Init();
                FiftyCalRounds.Init();
                UnengravedBullets.Init();
                EngravedBullets.Init();
                HardReloadBullets.Init();
                NitroBullets.Init();
                SupersonicShots.Init();
                GlassRounds.Init();
                Junkllets.Init();
                BloodthirstyBullets.Init();
                CleansingRounds.Init();
                HallowedBullets.Init();
                PromethianBullets.Init();
                EpimethianBullets.Init();
                RandoRounds.Init();
                IngressBullets.Init(); //Unfinished
                HematicRounds.Init();
                FullArmourJacket.Init();
                MirrorBullets.Init();
                CrowdedClip.Init();
                BashfulShot.Init();
                OneShot.Init();
                BulletBullets.Init();
                AntimatterBullets.Init();
                SpectreBullets.Init();
                Tabullets.Init();
                TierBullets.Init(); //Unfinished
                BombardierShells.Init();
                GildedLead.Init();
                DemoterBullets.Init();
                Voodoollets.Init();
                TracerRound.Init();
                EndlessBullets.Init();
                HellfireRounds.Init();
                Birdshot.Init();
                Unpredictabullets.Init();
                WarpBullets.Init();
                BulletsWithGuns.Init();
                LaserBullets.Init();
                BalancedBullets.Init();          //Unfinished
                WoodenBullets.Init();
                ComicallyGiganticBullets.Init(); //Excluded
                KnightlyBullets.Init();
                EmptyRounds.Init();
                LongswordShot.Init();
                DrillBullets.Init();
                FoamDarts.Init();
                BatterBullets.Init();
                ElectrumRounds.Init();
                BreachingRounds.Init();
                MagnetItem.Init();
                EargesplittenLoudenboomerRounds.Init();
                TheShell.Init();
                //Status Effect Bullet Mods
                SnailBullets.Init();
                LockdownBullets.Init();
                PestiferousLead.Init();
                Shrinkshot.Init();
                //Volley Modifying Bullet Mods
                Splattershot.Init();
                BackwardsBullets.Init();
                CrossBullets.Init();
                ShadeShot.Init();
                //Insta-Kill Bullet Modifiers
                MinersBullets.Init();
                AntimagicRounds.Init();
                AlkaliBullets.Init();
                ShutdownShells.Init();
                ERRORShells.Init();
                OsteoporosisBullets.Init();
                //NonBullet Stat Changers
                MicroAIContact.Init();
                LuckyCoin.Init();
                IronSights.Init();
                Lewis.Init();
                MysticOil.Init();
                VenusianBars.Init();
                NumberOneBossMug.Init();
                LibramOfTheChambers.Init();
                OrganDonorCard.Init();
                GlassGod.Init();
                ChaosRuby.Init();
                BlobulonRage.Init();
                OverpricedHeadband.Init();
                GunslingerEmblem.Init();
                MobiusClip.Init();
                ClipOnAmmoPouch.Init();
                JawsOfDefeat.Init();
                //Armour
                ArmourBandage.Init();
                GoldenArmour.Init();
                ExoskeletalArmour.Init();
                PowerArmour.Init();
                ArmouredArmour.Init();
                //Consumable Givers
                LooseChange.Init();
                SpaceMetal.Init();
                //Blank Themed Items
                TrueBlank.Init();
                FalseBlank.Init();
                SpareBlank.Init();
                OpulentBlank.Init();
                GrimBlanks.Init();
                NNBlankPersonality.Init();
                Blombk.Init();
                Blankh.Init();
                //Key Themed Items
                BlankKey.Init();
                SharpKey.Init();
                SpareKey.Init();
                KeyChain.Init();
                KeyBullwark.Init();
                KeyBulletEffigy.Init();
                FrostKey.Init();
                ShadowKey.Init();
                Keygen.Init();
                CursedTumbler.Init();
                //Ammo Box Themed Items
                TheShellactery.Init();
                BloodyAmmo.Init();
                MengerAmmoBox.Init();
                AmmoTrap.Init();
                //Boxes and Stuff
                BloodyBox.Init();
                MaidenShapedBox.Init();
                Toolbox.Init();
                PocketChest.Init();
                DeliveryBox.Init();
                Wonderchest.Init();
                //Heart themed items
                HeartPadlock.Init();
                Mutagen.Init();
                ForsakenHeart.Init();
                HeartOfGold.Init();
                GooeyHeart.Init();
                ExaltedHeart.Init();
                CheeseHeart.Init();
                TinHeart.Init();
                //Chambers
                BarrelChamber.Init();
                GlassChamber.Init();
                FlameChamber.Init();
                Recyclinder.Init();
                Nitroglycylinder.Init();
                SpringloadedChamber.Init();
                WitheringChamber.Init();
                HeavyChamber.Init();
                CyclopeanChamber.Init();
                //Table Techs
                TableTechTable.Init();
                TableTechSpeed.Init();
                TableTechInvulnerability.Init();
                TableTechAmmo.Init();
                TableTechGuon.Init();
                TableTechNology.Init();
                UnsTableTech.Init();
                //Guon Stones
                WoodGuonStone.Init();
                YellowGuonStone.Init();
                GreyGuonStone.Init();
                GoldGuonStone.Init();
                BrownGuonStone.Init();
                CyanGuonStone.Init();
                IndigoGuonStone.Init();
                SilverGuonStone.Init();
                MaroonGuonStone.Init();
                UltraVioletGuonStone.Init();
                InfraredGuonStone.Init();
                RainbowGuonStone.Init();
                KaleidoscopicGuonStone.Init();
                GuonBoulder.Init();
                BloodglassGuonStone.Init();
                //Ammolets
                GlassAmmolet.Init();
                WickerAmmolet.Init();
                FuriousAmmolet.Init();
                SilverAmmolet.Init();
                IvoryAmmolet.Init();
                KinAmmolet.Init();
                Autollet.Init();
                Keymmolet.Init();
                Ammolock.Init();
                HepatizonAmmolet.Init();
                BronzeAmmolet.Init();
                PearlAmmolet.Init();
                NeutroniumAmmolet.Init();
                Shatterblank.Init();
                // Boots
                CycloneCylinder.Init();
                BootLeg.Init();
                BlankBoots.Init();
                BulletBoots.Init();
                //Bracelets and Jewelry
                DiamondBracelet.Init();
                PearlBracelet.Init();
                PanicPendant.Init();
                GunknightAmulet.Init();
                AmuletOfShelltan.Init();
                //Rings
                RingOfOddlySpecificBenefits.Init();
                FowlRing.Init();
                RingOfAmmoRedemption.Init();
                RiskyRing.Init();
                WidowsRing.Init();
                ShadowRing.Init();
                RingOfInvisibility.Init();
                //Holsters
                BlackHolster.Init();
                TheBeholster.Init();
                HiveHolster.Init();
                ShoulderHolster.Init();
                ArtilleryBelt.Init();
                BulletShuffle.Init();
                //Companions
                MolotovBuddy.Init();
                BabyGoodChanceKin.Init();
                Potty.Init();
                Peanut.Init();
                DarkPrince.Init();
                Diode.Init();
                DroneCompanion.Init();
                GregTheEgg.Init();
                FunGuy.Init();
                BabyGoodDet.Init();
                AngrySpirit.Init();
                Gusty.Init();
                ScrollOfExactKnowledge.Init();
                LilMunchy.Init();
                //Potions / Jars
                SpeedPotion.Init();
                LovePotion.Init();
                HoneyPot.Init();
                ChemicalBurn.Init();
                WitchsBrew.Init();
                Nigredo.Init();
                Albedo.Init();
                Citrinitas.Init();
                Rubedo.Init();
                HoleyWater.Init();
                //Remotes
                ReinforcementRadio.Init();
                //Medicine
                BloodThinner.Init();
                BoosterShot.Init();
                ShotInTheArm.Init();
                //Knives and Blades
                DaggerOfTheAimgel.Init();
                CombatKnife.Init();
                Bayonet.Init();
                //Books
                BookOfMimicAnatomy.Init();
                KalibersPrayer.Init();
                GunidaeSolvitHaatelis.Init();
                //Maps
                MapFragment.Init();
                TatteredMap.Init();
                //Clothing
                CloakOfDarkness.Init();
                TimeFuddlersRobe.Init();
                //Eyes
                CartographersEye.Init();
                BloodshotEye.Init();
                ShadesEye.Init();
                KalibersEye.Init();
                //Hands
                Lefthandedness.Init();
                NecromancersRightHand.Init();
                //Bombs
                InfantryGrenade.Init();
                DiceGrenade.Init();
                //True Misc
                Lvl2Molotov.Init();
                GoldenAppleCore.Init();
                AppleCore.Init();
                AppleActive.Init();
                LibationtoIcosahedrax.Init(); //Unfinished
                BagOfHolding.Init();
                ItemCoupon.Init();
                IdentityCrisis.Init();
                LiquidMetalBody.Init();
                GunGrease.Init();
                BomberJacket.Init();
                DragunsScale.Init();
                GTCWTVRP.Init();
                BlightShell.Init();
                BulletKinPlushie.Init();
                Kevin.Init();
                PurpleProse.Init();
                RustyCasing.Init();
                HikingPack.Init();
                GunpowderPheromones.Init();
                GunsmokePerfume.Init();
                Pestilence.Init();
                ElevatorButton.Init();
                Bullut.Init();
                GSwitch.Init();
                FaultyHoverboots.Init(); //Unfinished
                AcidAura.Init();
                HornedHelmet.Init();
                RocketMan.Init();
                Roulette.Init(); //Unfinished
                FinishedBullet.Init();
                ChanceKinEffigy.Init();
                MagickeCauldron.Init();
                Bombinomicon.Init();
                ClaySculpture.Init();
                GracefulGoop.Init();
                MrFahrenheit.Init();
                MagicQuiver.Init();
                FocalLenses.Init();
                MagicMissile.Init();
                AmberDie.Init();
                ObsidianPistol.Init();
                Showdown.Init();
                LootEngineItem.Init();
                Ammolite.Init();
                PortableHole.Init();
                CardinalsMitre.Init();
                GunjurersBelt.Init();
                GoomperorsCrown.Init();
                ChemGrenade.Init();
                EightButton.Init();
                TitaniumClip.Init();
                PaperBadge.Init();
                Permafrost.Init();
                GlassShard.Init();
                EqualityItem.Init();
                BitBucket.Init();
                Eraser.Init();
                TackShooter.Init();
                Moonrock.Init();
                Telekinesis.Init();
                TabletOfOrder.Init();
                LeadSoul.Init();
                LeadOfLife.Init();
                AWholeBulletKin.Init();
                #endregion

                //-----------------------------------------------------GUNS GET INITIALISED
                #region GunInitialisation
                //UNFINISHED / TEST GUNS
                WailingMagnum.Add();
                Defender.Add();
                TestGun.Add();
                Gunycomb.Add();
                GlobbitSMALL.Add();
                GlobbitMED.Add();
                GlobbitMEGA.Add();


                //GUNS

                //CHARACTERSTARTERS
                ElderMagnum.Add();

                //REVOLVERS
                FlayedRevolver.Add();
                G20.Add();
                MamaGun.Add();
                LovePistol.Add();
                DiscGun.Add();
                Repeatovolver.Add();
                Pista.Add();
                NNGundertale.Add();
                DiamondGun.Add();
                NNMinigun.Add();
                ShroomedGun.Add();
                GoldenRevolver.Add();
                Nocturne.Add();
                BackWarder.Add();
                Redhawk.Add();
                ToolGun.Add();
                //GENERAL HANDGUNS
                StickGun.Add();
                Glock42.Add();
                StarterPistol.Add();
                PopGun.Add();
                UnusCentum.Add();
                StunGun.Add();
                CopperSidearm.Add();
                Rekeyter.Add();
                HotGlueGun.Add();
                UpNUp.Add();
                RedRobin.Add();
                VariableGun.Add();
                CrescendoBlaster.Add();
                Glasster.Add();
                HandGun.Add();
                Viper.Add();
                DiamondCutter.Add();
                MarchGun.Add();
                RebarGun.Add();
                MinuteGun.Add();
                Ulfberht.Add();
                HeadOfTheOrder.Add();
                GunOfAThousandSins.Add();
                DoubleGun.Add();
                //SHOTGUNS
                JusticeGun.Add();
                Orgun.Add();
                Octagun.Add();
                ClownShotgun.Add();
                Ranger.Add();
                RustyShotgun.Add();
                TheBride.Add();
                TheGroom.Add();
                IrregularShotgun.Add();
                GrenadeShotgun.Add();
                Jackhammer.Add();
                SaltGun.Add();
                SoapGun.Add();
                //CANNONS
                Felissile.Add();
                HandCannon.Add();
                Lantaka.Add();
                GreekFire.Add();
                EmberCannon.Add();
                ElysiumCannon.Add();
                DisplacerCannon.Add();
                //SCI-FI GUNS
                Blasmaster.Add();
                St4ke.Add();
                RedBlaster.Add();
                BeamBlade.Add();
                Neutrino.Add();
                Rico.Add();
                TheThinLine.Add();
                RocketPistol.Add();
                Repetitron.Add();
                Dimensionaliser.Add();
                Purpler.Add();
                VacuumGun.Add();
                Oxygun.Add();
                TriBeam.Add();
                KineticBlaster.Add();
                LaserWelder.Add();
                QBeam.Add();
                HighVelocityRifle.Add();
                Demolitionist.Add();
                PumpChargeShotgun.Add();
                TheOutbreak.Add();
                Multiplicator.Add();
                PunishmentRay.Add();
                YBeam.Add();
                WallRay.Add();
                BolaGun.Add();
                AlphaBeam.Add();
                Glazerbeam.Add();
                StasisRifle.Add();
                Gravitron.Add();
                Ferrobolt.Add();
                TauCannon.Add();
                GravityGun.Add();
                GalaxyCrusher.Add();
                //ARC Weapons
                ARCPistol.Add();
                ARCShotgun.Add();
                ARCRifle.Add();
                ARCTactical.Add();
                ARCCannon.Add();
                //BOWS AND CROSSBOWS
                IceBow.Add();
                Boltcaster.Add();
                Clicker.Add();
                //ANTIQUES
                WheelLock.Add();
                Welrod.Add();
                Welgun.Add();
                TheLodger.Add();
                Gonne.Add();
                Hwacha.Add();
                FireLance.Add();
                HandMortar.Add();
                GrandfatherGlock.Add();
                GatlingGun.Add();
                Blowgun.Add();
                Gaxe.Add();
                WoodenHorse.Add();
                AgarGun.Add();
                //KNIVES AND BLADES
                Carnwennan.Add();
                MantidAugment.Add();
                //REALISTIC GUNS
                HeatRay.Add();
                BarcodeScanner.Add();
                AntimaterielRifle.Add();
                Primos1.Add();
                DartRifle.Add();
                AM0.Add();
                RiskRifle.Add();
                RiotGun.Add();
                Kalashnirang.Add();
                MaidenRifle.Add();
                Blizzkrieg.Add();
                Copygat.Add();
                Skorpion.Add();
                HeavyAssaultRifle.Add();
                DynamiteLauncher.Add();
                MarbledUzi.Add();
                BurstRifle.Add();
                OlReliable.Add();
                //MISSILE LAUNCHERS
                BottleRocket.Add();
                NNBazooka.Add();
                BoomBeam.Add();
                Pillarocket.Add();
                //ANIMAL / ORGANIC GUNS
                SporeLauncher.Add();
                PoisonDartFrog.Add();
                Corgun.Add();
                FungoCannon.Add();
                PhaserSpiderling.Add();
                Guneonate.Add();
                KillithidTendril.Add();
                Gunger.Add();
                SickWorm.Add();
                MiniMonger.Add();
                CarrionFormeTwo.Add();
                CarrionFormeThree.Add();
                Carrion.Add();
                UterinePolyp.Add();
                Wrinkler.Add();
                //BLADES
                ButchersKnife.Add();
                RapidRiposte.Add();
                //FUN GUNS
                Gumgun.Add();
                Glooper.Add();
                Accelerator.Add();
                PaintballGun.Add();
                Converter.Add();
                Spiral.Add();
                Gunshark.Add();
                FingerGuns.Add();
                OBrienFist.Add();
                GolfRifle.Add();
                Pandephonium.Add();
                Sweeper.Add();
                DeskFan.Add();
                Pencil.Add();
                SquarePeg.Add();
                Ringer.Add();
                Snaker.Add();
                GayK47.Add();
                DecretionCarbine.Add();
                RC360.Add();
                UziSpineMM.Add();
                Autogun.Add();
                Rebondir.Add();
                BigShot.Add();
                W3irdstar.Add();
                Seismograph.Add();
                BioTranstater2100.Add();
                //MAGICAL GUNS
                Icicle.Add();
                GunjurersStaff.Add();
                InitiateWand.Add();
                LightningRod.Add();
                OrbOfTheGun.Add();
                SpearOfJustice.Add();
                Protean.Add();
                BulletBlade.Add();
                Bookllet.Add();
                Lorebook.Add();
                Beastclaw.Add();
                Bullatterer.Add();
                Entropew.Add();
                Missinguno.Add();
                Paraglocks.Add();
                //CONSUMABLE FIRING GUNS
                Creditor.Add();
                Blankannon.Add();
                Viscerifle.Add();
                //ENDPAGE GUNS
                MastersGun.Add();
                Wrench.Add();
                Pumhart.Add();


                //SYNERGY FORME GUNS
                GunsharkMegasharkSynergyForme.Add();
                DiscGunSuperDiscForme.Add();
                OrgunHeadacheSynergyForme.Add();
                Wolfgun.Add();
                MinigunMiniShotgunSynergyForme.Add();
                PenPencilSynergy.Add();
                ReShelletonKeyter.Add();
                AM0SpreadForme.Add();
                BulletBladeGhostForme.Add();
                GlueGunGlueGunnerSynergy.Add();
                KingBullatterer.Add();
                WrenchNullRefException.Add();
                GatlingGunGatterUp.Add();
                GravityGunNegativeMatterForm.Add();
                GonneElder.Add();
                UterinePolypWombular.Add();
                DiamondGaxe.Add();
                RedRebondir.Add();
                DiamondCutterRangerClass.Add();
                StickGunQuickDraw.Add();
                StormRod.Add();
                UnrustyShotgun.Add();
                #endregion


                //-----------------------------------------------------SHRINES GET INITIALISED
                #region ShrineInitialisation
                InvestmentShrine.Add();
                RelodinShrine.Add();
                DagunShrine.Add();
                ArtemissileShrine.Add();
                ExecutionerShrine.Add();
                TurtleShrine.Add();
                KliklokShrine.Add();
                #endregion

                //-----------------------------------------------------NPCS GET INITIALISED
                #region NPCInitialisation
                Rusty.Init();
                Ironside.Init();
                Boomhildr.Init();
                #endregion

                ChromaGun.Add();

                //GOOD MIMIC (NEEDS TO BE INITIALISED LATER)
                GoodMimic.Add();

                //Characters
                var data = Loader.BuildCharacter("NevernamedsItems/Characters/Shade",
                                                 CustomPlayableCharacters.Shade,
                                                 new Vector3(12.3f, 21.3f),
                                                 false,
                                                 new Vector3(13.1f, 19.1f),
                                                 false,
                                                 false,
                                                 true,
                                                 true,  //Sprites used by paradox
                                                 false, //Glows
                                                 null,  //Glow Mat
                                                 null,  //Alt Skin Glow Mat
                                                 0,     //Hegemony Cost
                                                 false, //HasPast
                                                 "");   //Past ID String

                //Other Features
                MasteryReplacementOub.InitDungeonHook();
                CadenceAndOxShopPoolAdditions.Init();
                CustomHuntingQuest.Init();

                //NPCS
                TheJammomaster.Add();
                //Carto.Add();
                ShrineFactory.PlaceBreachShrines();

                //Synergy Setup, Synergy Formes, Dual Wielding, and any changes to Basegame Guns
                InitialiseSynergies.DoInitialisation();
                SynergyFormInitialiser.AddSynergyForms();
                ExistantGunModifiers.Init();

                ChamberGunAPI.Init("OnceMoreIntoTheBreach");

                //Late Hooks
                AmmoPickupHooks.Init();
                HealthPickupHooks.Init();

                ETGModConsole.Commands.AddUnit("nndebugflow", (args) => { DungeonHandler.debugFlow = !DungeonHandler.debugFlow; string status = DungeonHandler.debugFlow ? "enabled" : "disabled"; string color = DungeonHandler.debugFlow ? "00FF00" : "FF0000"; ETGModConsole.Log($"OMITB flow {status}", false); });

                //PoopySchloopy

                /* Dungeon keepDungeon = DungeonDatabase.GetOrLoadByName("base_jungle");
                 * if (keepDungeon == null) ETGModConsole.Log("Jungle null!");
                 * if (keepDungeon && keepDungeon.PatternSettings != null)
                 * {
                 *   if (keepDungeon.PatternSettings.flows != null && keepDungeon.PatternSettings.flows.Count > 0)
                 *   {
                 *       if (keepDungeon.PatternSettings.flows[0].fallbackRoomTable)
                 *       {
                 *           if (keepDungeon.PatternSettings.flows[0].fallbackRoomTable.includedRooms != null)
                 *           {
                 *               if (keepDungeon.PatternSettings.flows[0].fallbackRoomTable.includedRooms.elements != null)
                 *               {
                 *                   foreach (WeightedRoom wRoom in keepDungeon.PatternSettings.flows[0].fallbackRoomTable.includedRooms.elements)
                 *                   {
                 *
                 *                       if (wRoom.room != null && !string.IsNullOrEmpty(wRoom.room.name))
                 *                       {
                 *                           ETGModConsole.Log(wRoom.room.name);
                 *                       }
                 *                   }
                 *               }
                 *               else ETGModConsole.Log("No elements");
                 *           }
                 *           else ETGModConsole.Log("No included rooms");
                 *       }
                 *       else ETGModConsole.Log("No fallback room table");
                 *   }
                 *   else ETGModConsole.Log("Flow was null or empty");
                 * }
                 * else ETGModConsole.Log("Pattern settings null");
                 * keepDungeon = null;*/

                ETGMod.StartGlobalCoroutine(this.delayedstarthandler());
                ETGModConsole.Log("'If you're reading this, I must have done something right' - NN");
            }
            catch (Exception e)
            {
                ETGModConsole.Log(e.Message);
                ETGModConsole.Log(e.StackTrace);
            }
        }
Пример #8
0
            public override void Update()
            {
                if (Owner && !Dungeon.IsGenerating && Owner.IsInCombat && base.transform.position.GetAbsoluteRoom() == Owner.CurrentRoom)
                {
                    if (timer > 0)
                    {
                        timer -= BraveTime.DeltaTime;
                    }
                    if (timer <= 0)
                    {
                        //do stuff
                        bool doAnim = false;
                        if ((GameManager.Instance.Dungeon.tileIndices.tilesetId == GlobalDungeonData.ValidTilesets.HELLGEON) || Owner.PlayerHasActiveSynergy("They Grow Inside"))
                        {
                            float chance = 0.25f;
                            if (Owner.PlayerHasActiveSynergy("They Grow Inside"))
                            {
                                chance = 0.50f;
                            }
                            if (UnityEngine.Random.value <= chance)
                            {
                                doAnim = true;
                                VolleyReplacementSynergyProcessor shotgrubProcessor = (PickupObjectDatabase.GetById(347) as Gun).GetComponent <VolleyReplacementSynergyProcessor>();
                                Projectile bullet      = shotgrubProcessor.SynergyVolley.projectiles[0].projectiles[0].projectile;
                                GameObject spawnedProj = ProjSpawnHelper.SpawnProjectileTowardsPoint(bullet.gameObject, base.sprite.WorldCenter, base.specRigidbody.UnitCenter.GetPositionOfNearestEnemy(false, true), 0, 15);
                                Projectile component   = spawnedProj.GetComponent <Projectile>();
                                if (component != null)
                                {
                                    component.Owner   = Owner;
                                    component.Shooter = Owner.specRigidbody;
                                    //COMPANION SHIT
                                    component.TreatedAsNonProjectileForChallenge = true;
                                    component.baseData.damage           *= Owner.stats.GetStatValue(PlayerStats.StatType.Damage);
                                    component.baseData.speed            *= Owner.stats.GetStatValue(PlayerStats.StatType.ProjectileSpeed);
                                    component.baseData.force            *= Owner.stats.GetStatValue(PlayerStats.StatType.KnockbackMultiplier);
                                    component.AdditionalScaleMultiplier *= Owner.stats.GetStatValue(PlayerStats.StatType.PlayerBulletScale);
                                    component.UpdateSpeed();
                                    base.HandleCompanionPostProcessProjectile(component);
                                }
                            }
                        }
                        if (UnityEngine.Random.value <= 0.02f)
                        {
                            doAnim = true;
                            bool shouldJam = false;
                            if (Owner.PlayerHasActiveSynergy("Cursed Ceramics"))
                            {
                                shouldJam = true;
                            }
                            AIActor fairy = CompanionisedEnemyUtility.SpawnCompanionisedEnemy(Owner, "c182a5cb704d460d9d099a47af49c913", base.specRigidbody.UnitCenter.ToIntVector2(), false, ExtendedColours.brown, 10, 2, shouldJam, true);
                            fairy.specRigidbody.CollideWithOthers = false;
                        }
                        if (UnityEngine.Random.value <= 0.05f && Owner.PlayerHasActiveSynergy("The Potter Boy"))
                        {
                            doAnim = true;
                            AIActor randomActiveEnemy = base.transform.position.GetAbsoluteRoom().GetRandomActiveEnemy(false);
                            if (randomActiveEnemy && randomActiveEnemy.IsNormalEnemy && randomActiveEnemy.healthHaver && !randomActiveEnemy.healthHaver.IsBoss)
                            {
                                randomActiveEnemy.Transmogrify(EnemyDatabase.GetOrLoadByGuid("76bc43539fc24648bff4568c75c686d1"), (GameObject)ResourceCache.Acquire("Global VFX/VFX_Item_Spawn_Poof"));
                            }
                        }
                        if (doAnim && this.aiAnimator)
                        {
                            this.aiAnimator.PlayUntilFinished("spawnobject", false, null, -1f, false);
                        }
                        timer = 2f;
                    }

                    if (RadialTimer > 0)
                    {
                        RadialTimer -= BraveTime.DeltaTime;
                    }
                    if (RadialTimer <= 0)
                    {
                        HandleRadialEffects();
                        RadialTimer = 0.05f;
                    }
                }
                base.Update();
            }
 public static IEnumerator HandleCurseDeathEffects(Vector2 position, string guid, float maxHP, bool isJammed)
 {
     if (CurseManager.CurseIsActive("Curse of Infestation"))
     {
         if (!string.IsNullOrEmpty(guid) && !EasyEnemyTypeLists.SmallBullats.Contains(guid))
         {
             int amt = UnityEngine.Random.Range(-1, 4);
             if (amt > 0)
             {
                 for (int i = 0; i < amt; i++)
                 {
                     if (GameManager.Instance.AnyPlayerHasActiveSynergy("The Last Crusade"))
                     {
                         AIActor targetActor = CompanionisedEnemyUtility.SpawnCompanionisedEnemy(GameManager.Instance.PrimaryPlayer, BraveUtility.RandomElement(EasyEnemyTypeLists.SmallBullats), position.ToIntVector2(), false, Color.red, 5, 2, false, false);
                         PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(targetActor.specRigidbody, null, false);
                     }
                     else
                     {
                         var     enemyToSpawn = EnemyDatabase.GetOrLoadByGuid(BraveUtility.RandomElement(EasyEnemyTypeLists.SmallBullats));
                         AIActor TargetActor  = AIActor.Spawn(enemyToSpawn, position, GameManager.Instance.Dungeon.data.GetAbsoluteRoomFromPosition(position.ToIntVector2()), true, AIActor.AwakenAnimationType.Default, true);
                         PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(TargetActor.specRigidbody, null, false);
                         TargetActor.PreventBlackPhantom = true;
                     }
                 }
             }
         }
     }
     if (CurseManager.CurseIsActive("Curse of Sludge"))
     {
         if (maxHP > 0)
         {
             DeadlyDeadlyGoopManager goop = null;
             if (GameManager.Instance.AnyPlayerHasActiveSynergy("The Last Crusade"))
             {
                 goop = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.PlayerFriendlyPoisonGoop);
             }
             else
             {
                 goop = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.EnemyFriendlyPoisonGoop);
             }
             float hpMod = maxHP;
             if (isJammed)
             {
                 hpMod /= 3.5f;
             }
             hpMod /= AIActor.BaseLevelHealthModifier;
             float radius = Math.Min((hpMod / 7.5f), 10);
             goop.TimedAddGoopCircle(position, radius, 0.75f, true);
         }
     }
     if (CurseManager.CurseIsActive("Curse of The Hive"))
     {
         if (maxHP > 0)
         {
             DeadlyDeadlyGoopManager goop = null;
             if (GameManager.Instance.AnyPlayerHasActiveSynergy("The Last Crusade"))
             {
                 goop = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.PlayerFriendlyHoneyGoop);
             }
             else
             {
                 goop = DeadlyDeadlyGoopManager.GetGoopManagerForGoopType(EasyGoopDefinitions.HoneyGoop);
             }
             float hpMod = maxHP;
             if (isJammed)
             {
                 hpMod /= 3.5f;
             }
             hpMod /= AIActor.BaseLevelHealthModifier;
             float radius = Math.Min((hpMod / 5), 10);
             goop.TimedAddGoopCircle(position, radius, 0.75f, true);
         }
     }
     yield break;
 }
Пример #10
0
        private void OnTableFlipped(FlippableCover obj)
        {
            if (Owner && obj)
            {
                int selectedEffect = UnityEngine.Random.Range(1, (27 + 1));
                ETGModConsole.Log("Selected Effect: " + selectedEffect);
                switch (selectedEffect)
                {
                case 1:
                    SpawnFoldingTable();
                    break;

                case 2:
                    DoSafeExplosion(obj.specRigidbody.UnitCenter);
                    break;

                case 3:
                    DoGoop(obj.specRigidbody.UnitCenter, EasyGoopDefinitions.FireDef);
                    break;

                case 4:
                    DoGoop(obj.specRigidbody.UnitCenter, EasyGoopDefinitions.PoisonDef);
                    break;

                case 5:
                    DoGoop(obj.specRigidbody.UnitCenter, EasyGoopDefinitions.CharmGoopDef);
                    break;

                case 6:
                    DoGoop(obj.specRigidbody.UnitCenter, EasyGoopDefinitions.CheeseDef);
                    break;

                case 7:
                    LootEngine.SpawnCurrency(obj.specRigidbody.UnitCenter, UnityEngine.Random.Range(5, 10), false);
                    break;

                case 8:
                    Owner.DoEasyBlank(obj.specRigidbody.UnitCenter, EasyBlankType.FULL);
                    break;

                case 9:
                    Owner.DoEasyBlank(obj.specRigidbody.UnitCenter, EasyBlankType.MINI);
                    break;

                case 10:
                    FullRoomStatusEffect(StaticStatusEffects.charmingRoundsEffect);
                    break;

                case 11:
                    FullRoomStatusEffect(PickupObjectDatabase.GetById(569).GetComponent <ChaosBulletsItem>().FreezeModifierEffect);
                    break;

                case 12:
                    FullRoomStatusEffect(StaticStatusEffects.tripleCrossbowSlowEffect);
                    break;

                case 13:
                    Exploder.DoRadialKnockback(obj.specRigidbody.UnitCenter, 200, 100);
                    break;

                case 14:
                    SpawnBlackHole(obj.specRigidbody.UnitCenter);
                    break;

                case 15:
                    if (Owner.CurrentGun != null)
                    {
                        Owner.CurrentGun.GainAmmo(UnityEngine.Random.Range(5, 26));
                    }
                    break;

                case 16:
                    FreezeTime();
                    break;

                case 17:
                    TurnTableIntoRocket(obj);
                    break;

                case 18:
                    StunEnemies();
                    break;

                case 19:
                    LootEngine.SpawnCurrency(obj.specRigidbody.UnitCenter, UnityEngine.Random.Range(2, 6), true);
                    break;

                case 20:
                    CompanionisedEnemyUtility.SpawnCompanionisedEnemy(Owner, "01972dee89fc4404a5c408d50007dad5", Owner.sprite.WorldCenter.ToIntVector2(), false, Color.red, 7, 2, false, true);
                    break;

                case 21:
                    int numBullat = UnityEngine.Random.Range(2, 6);
                    for (int i = 0; i < numBullat; i++)
                    {
                        CompanionisedEnemyUtility.SpawnCompanionisedEnemy(Owner, "2feb50a6a40f4f50982e89fd276f6f15", Owner.sprite.WorldCenter.ToIntVector2(), false, Color.red, 15, 2, false, false);
                    }
                    break;

                case 22:
                    FullRoomStatusEffect(StaticStatusEffects.hotLeadEffect);
                    break;

                case 23:
                    float degrees = 0;
                    for (int i = 0; i < 15; i++)
                    {
                        SpawnBullets((PickupObjectDatabase.GetById(50) as Gun).DefaultModule.projectiles[0], obj.specRigidbody.UnitCenter, degrees);
                        degrees += 24;
                    }
                    break;

                case 24:
                    SpawnBullets((PickupObjectDatabase.GetById(372) as Gun).DefaultModule.projectiles[0], Owner.sprite.WorldCenter, Owner.sprite.WorldCenter.GetVectorToNearestEnemy().ToAngle());
                    break;

                case 25:
                    StartCoroutine(HandleShield(Owner, 7));
                    break;

                case 26:
                    Owner.StartCoroutine(this.HandleSlowBullets());
                    break;

                case 27:
                    Owner.Enrage(4f);
                    break;
                }
            }
        }