Пример #1
0
        public void Awake()
        {
            //acquire my assetbundle and give it to the resource api.
            using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Diluvian.Resources.diluvian"))
            {
                var bundle   = AssetBundle.LoadFromStream(stream);
                var provider = new R2API.AssetBundleResourcesProvider(assetPrefix, bundle);
                ResourcesAPI.AddProvider(provider);
            }
            //Check ESO existence.
            if (BepInEx.Bootstrap.Chainloader.PluginInfos.ContainsKey("com.jarlyk.eso"))
            {
                ESOenabled = true;
                Logger.LogWarning("Using ESO's elite cards!");
            }

            diluvianArtist = Config.Bind(new ConfigDefinition("Art", "Diluvian"), "avizvul", new ConfigDescription("The artist for the diluvian icon. Options: \"harb\",\"avizvul\",\"horus\"", new AcceptableValueList <string>(new string[] { "avizvul", "harb", "horus" })));
            syzygyArtist   = Config.Bind(new ConfigDefinition("Art", "OTHER"), "avizvul", new ConfigDescription("The artist for the other icon.Options: \"harb\",\"avizvul\"", new AcceptableValueList <string>(new string[] { "avizvul", "harb" })));

            UnlockablesAPI.AddUnlockable <DiluvianCompletedAchievement>(true);
            UnlockablesAPI.AddUnlockable <SZGAchievement>(true);
            LanguageAPI.Add("COMPLETE_MAINENDING_DILUVIAN_NAME", "Unobscured. Unblinking. Unrelenting.");
            LanguageAPI.Add("COMPLETE_MAINENDING_DILUVIAN_DESC", "Completed the game on Diluvian.");
            LanguageAPI.Add("COMPLETE_AAO_SYZYGY_NAME", "Crescendo");
            LanguageAPI.Add("COMPLETE_AAO_SYZYGY_DESC", "Obliterate on Syzygy difficulty with all artifacts enabled.");

            DiluvianDifficulty.def = new DiluvianDifficulty();
            Dindex = DifficultyAPI.AddDifficulty(DiluvianDifficulty.def.DifficultyDef);
            myDefs.Add(Dindex, DiluvianDifficulty.def);
            Syzygy.def = new Syzygy();
            EDindex    = DifficultyAPI.AddDifficulty(Syzygy.def.DifficultyDef, true);
            myDefs.Add(EDindex, Syzygy.def);

            On.RoR2.RuleDef.FromDifficulty            += RuleDef_FromDifficulty;
            On.RoR2.UI.RuleCategoryController.SetData += RuleCategoryController_SetData;


            //This is where my hooks live. They themselves are events, not ONhooks
            Run.onRunStartGlobal   += Run_onRunStartGlobal;
            Run.onRunDestroyGlobal += Run_onRunDestroyGlobal;
        }
Пример #2
0
        private void Awake()
        {
            var archWispSpawnCard = Resources.Load <CharacterSpawnCard>("SpawnCards/CharacterSpawnCards/cscArchWisp");

            archWispSpawnCard.directorCreditCost = 300;

            var archWispDirCard = new DirectorCard();

            archWispDirCard.allowAmbushSpawn        = true;
            archWispDirCard.forbiddenUnlockable     = "";
            archWispDirCard.minimumStageCompletions = 4;
            archWispDirCard.preventOverhead         = false;
            archWispDirCard.requiredUnlockable      = "";
            archWispDirCard.selectionWeight         = 1;
            archWispDirCard.spawnCard     = archWispSpawnCard;
            archWispDirCard.spawnDistance = DirectorCore.MonsterSpawnDistance.Standard;

            archWispCard = new DirectorAPI.DirectorCardHolder();
            archWispCard.SetCard(archWispDirCard);
            archWispCard.SetInteractableCategory(DirectorAPI.InteractableCategory.None);
            archWispCard.SetMonsterCategory(DirectorAPI.MonsterCategory.Minibosses);

            var diff  = new RoR2.DifficultyDef(3f, "REIN_DIFFICULTY_DEUTERIUM_NAME", "Textures/ItemIcons/texMaskIcon", "REIN_DIFFICULTY_DEUTERIUM_DESC", new Color(0f, 0f, 0f, 1f));
            var diff2 = new RoR2.DifficultyDef(4f, "REIN_DIFFICULTY_TRITIUM_NAME", "Textures/ItemIcons/texMaskIcon", "REIN_DIFFICULTY_TRITIUM_DESC", new Color(0f, 0f, 0f, 1f));

            diffInd1 = DifficultyAPI.AddDifficulty(diff);
            diffInd2 = DifficultyAPI.AddDifficulty(diff2);


            /*
             * //Disabled cards
             * cardAdjustments["BeetleMaster"] = new SpawnParams( 0.0f, 1.0f, true );
             * cardAdjustments["JellyfishMaster"] = new SpawnParams( 0.0f, 1.0f, true );
             *
             * //Reduced cards
             * cardAdjustments["BeetleQueenMaster"] = new SpawnParams( 0.25f, 1.0f, true );
             *
             * //Neutral cards
             * cardAdjustments["TitanMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["VagrantMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["GolemMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["LemurianMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["ClayBossMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["BeetleGuardMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["HermitCrabMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["BellMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["GravekeeperMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["ImpBossMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["ImpMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["MagmaWormMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["RoboBallbossMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["VultureMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             * cardAdjustments["BisonMaster"] = new SpawnParams( 1.0f, 1.0f, true );
             *
             * //Buffed cards
             * cardAdjustments["WispMaster"] = new SpawnParams( 3.0f, 1.0f, true );
             * cardAdjustments["ClayBruiserMaster"] = new SpawnParams( 2.0f, 1.0f, true );
             * cardAdjustments["GreaterWispMaster"] = new SpawnParams( 2.0f, 0.5f, true );
             * cardAdjustments["ElectricWormMaster"] = new SpawnParams( 2.0f, 0.5f, true );
             * cardAdjustments["LemurianBruiserMaster"] = new SpawnParams( 2.0f, 1.0f, true );
             */
        }