protected override void Initialize(SeedOptions options)
        {
            bool isRandomized = Level.GameSave.GetSettings().BossRando.Value;

            if (!isRandomized)
            {
                return;
            }

            BossAttributes vanillaBoss = BestiaryManager.GetVanillaBoss(Level, (int)EBossID.Maw);

            if (vanillaBoss.Index != (int)EBossID.Prince && vanillaBoss.Index != (int)EBossID.Vol)
            {
                return;
            }

            Dynamic.SilentKill();

            //abort already triggered scripts
            ((List <ScriptAction>)LevelReflected._activeScripts).Clear();
            ((Queue <DialogueBox>)LevelReflected._dialogueQueue).Clear();
            ((Queue <ScriptAction>)LevelReflected._waitingScripts).Clear();
        }
Exemplo n.º 2
0
        protected override void Initialize(SeedOptions options)
        {
            isRandomized = Level.GameSave.GetSettings().BossRando.Value;
            int argument = 0;

            if (TypedObject.EnemyType == EEnemyTileType.EmperorBoss)
            {
                if (Dynamic._isPrinceEmperor)
                {
                    argument = 2;
                }
                else if (Dynamic._isViletianEmperor)
                {
                    argument = 1;
                }
            }

            var bestiaryEntry = Level.GCM.Bestiary.GetEntry(TypedObject.EnemyType, argument);
            int bossId        = bestiaryEntry.Index;

            currentBoss = BestiaryManager.GetBossAttributes(Level, bossId);
            vanillaBoss = isRandomized
                                ? BestiaryManager.GetVanillaBoss(Level, bossId)
                                : currentBoss;

            if (!isRandomized)
            {
                return;
            }

            Level.ToggleExits(false);
            Level.OpenAllBossDoors(-1f);
            Level.LockAllBossDoors(0.5f);

            Level.JukeBox.StopSong();
            Level.JukeBox.PlaySong(vanillaBoss.Song);
        }