示例#1
0
        public static void NewGameInit()
        {
            var memory = Randomizer.Memory;

            if (!memory.IsLoadingGame())
            {
                Randomizer.Log("New Game Init", false);
                SaveController.SetAbility(AbilityType.SpiritEdge);
                foreach (UberState s in DefaultUberStates)
                {
                    memory.WriteUberState(s);
                }
                foreach (UberState s in Kuberstates)
                {
                    memory.WriteUberState(s);
                }
                foreach (UberState s in DialogAndRumors)
                {
                    memory.WriteUberState(s);
                }

                if (SeedController.KSDoorsOpen)
                {
                    foreach (UberState s in KeystoneDoors)
                    {
                        memory.WriteUberState(s);
                    }
                }

                if (!AHK.IniFlag("ShowShortCutscenes"))
                {
                    foreach (UberState s in ShortCutscenes)
                    {
                        memory.WriteUberState(s);
                    }
                }

                if (!AHK.IniFlag("ShowLongCutscenes"))
                {
                    foreach (UberState s in LongCutscenes)
                    {
                        memory.WriteUberState(s);
                    }
                }

                if (PsuedoLocs.GAME_START.Pickup().NonEmpty)
                {
                    Randomizer.InputUnlockCallback = () => {
                        PsuedoLocs.GAME_START.Pickup().Grant();
                        InterOp.magic_function();
                        InterOp.save();
                    };
                }

                InterOp.discover_everything();
                InterOp.bind_sword();
                InterOp.save();
                NeedsNewGameInit = false;
            }
        }