コード例 #1
0
ファイル: GraphData.cs プロジェクト: CaitSith2/Enemizer
        public GraphData()
        {
            RawEntranceCollection     rawEntranceCollection     = new RawEntranceCollection();
            RawExitCollection         rawExitCollection         = new RawExitCollection();
            RawItemLocationCollection rawItemLocationCollection = new RawItemLocationCollection();
            RawItemEdgeCollection     rawItemEdgeCollection     = new RawItemEdgeCollection();
            RawRoomEdgeCollection     rawRoomEdgeCollection     = new RawRoomEdgeCollection();

            FillNodesAndEdges(rawEntranceCollection, rawExitCollection, rawItemLocationCollection, rawItemEdgeCollection, rawRoomEdgeCollection);
        }
コード例 #2
0
ファイル: GraphData.cs プロジェクト: CaitSith2/Enemizer
        void UpdateMedallions(RawItemEdgeCollection rawItemEdges)
        {
            var mireEdge   = rawItemEdges.RawItemEdges.Where(x => x.DestId == "ow-mire-medallion").FirstOrDefault();
            var turtleEdge = rawItemEdges.RawItemEdges.Where(x => x.DestId == "ow-turtle-rock-medallion").FirstOrDefault();

            var newMire   = RomItemConstants.GetEntranceMedallion(romData[RomChest.MiseryMireMedallionAddress]); // romChests.Chests.Where(x => x.LogicalId == "ow-mire-medallion").Select(x => x.LogicalId).FirstOrDefault();
            var newTurtle = RomItemConstants.GetEntranceMedallion(romData[RomChest.TurtleRockMedallionAddress]); // romChests.Chests.Where(x => x.LogicalId == "ow-turtle-rock-medallion-symbol").Select(x => x.LogicalId).FirstOrDefault();

            //{ new RawItemEdge("47-turtle-rock", "ow-turtle-rock-medallion", "Quake,L1 Sword,Moon Pearl") },
            //{ new RawItemEdge("70-mire", "ow-mire-medallion", "Ether,L1 Sword,Moon Pearl") },

            mireEdge.Requirements   = mireEdge.Requirements.Replace("Ether", newMire);
            turtleEdge.Requirements = turtleEdge.Requirements.Replace("Quake", newTurtle);
        }
コード例 #3
0
ファイル: GraphData.cs プロジェクト: CaitSith2/Enemizer
        public GraphData(RomData romData, OptionFlags optionFlags, RomEntranceCollection romEntrances, RomExitCollection romExits, RomChestCollection romChests)
        {
            this.romData      = romData;
            this.romEntrances = romEntrances;
            this.romExits     = romExits;
            this.romChests    = romChests;

            RawEntranceCollection     rawEntranceCollection     = new RawEntranceCollection();
            RawExitCollection         rawExitCollection         = new RawExitCollection();
            RawItemLocationCollection rawItemLocationCollection = new RawItemLocationCollection();
            RawItemEdgeCollection     rawItemEdgeCollection     = new RawItemEdgeCollection();
            RawRoomEdgeCollection     rawRoomEdgeCollection     = new RawRoomEdgeCollection();

            romChests.LoadChests(rawItemLocationCollection);

            UpdateFromRom(rawEntranceCollection, rawExitCollection, rawItemLocationCollection, rawItemEdgeCollection);
            UpdateFromOptions(optionFlags, rawRoomEdgeCollection);
            FillNodesAndEdges(rawEntranceCollection, rawExitCollection, rawItemLocationCollection, rawItemEdgeCollection, rawRoomEdgeCollection);

            _rawItemLocationCollection = rawItemLocationCollection;
        }
コード例 #4
0
ファイル: GraphData.cs プロジェクト: CaitSith2/Enemizer
 void UpdateFromRom(RawEntranceCollection rawEntranceCollection, RawExitCollection rawExitCollection, RawItemLocationCollection rawItemLocationCollection, RawItemEdgeCollection rawItemEdgeCollection)
 {
     UpdateEntrances(rawEntranceCollection);
     UpdateExits(rawExitCollection);
     UpdateItems(rawItemLocationCollection);
     UpdateMedallions(rawItemEdgeCollection);
 }
コード例 #5
0
ファイル: GraphData.cs プロジェクト: CaitSith2/Enemizer
        void FillNodesAndEdges(RawEntranceCollection rawEntranceCollection, RawExitCollection rawExitCollection, RawItemLocationCollection rawItemLocationCollection, RawItemEdgeCollection rawItemEdges, RawRoomEdgeCollection rawRoomEdges)
        {
            _overworldNodes = new Data.OverworldNodes();
            _roomNodes      = new Data.RoomNodes();
            _bossNodes      = new Data.BossNodes();
            _itemNodes      = new Data.ItemLocations(rawItemLocationCollection);
            FillAllNodes();

            _areaEdges = new Data.AreaEdges(_overworldNodes);
            _roomEdges = new Data.RoomEdges(_roomNodes, _overworldNodes, _bossNodes, rawRoomEdges);
            _itemEdges = new ItemEdges(this, rawItemEdges);

            _entranceEdges = new EntranceEdges(_overworldNodes, _roomNodes, rawEntranceCollection, rawItemLocationCollection);
            _exitEdges     = new ExitEdges(_overworldNodes, _roomNodes, rawExitCollection);

            FillAllEdges();
        }