示例#1
0
        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);
        }
示例#2
0
        public RomChest(RomData romData, int address)
        {
            this.romData = romData;

            Address = address;
            ItemId  = romData[Address];

            if (CrystalAddresses.Contains(Address))
            {
                // crystal/pendant boss drop
                var crystalName = GetCrystalString(Address);
                ItemId = Data.GameItems.Items.Values.Where(x => x.LogicalId == crystalName).Select(x => x.Id).FirstOrDefault();
            }

            if (Address == MiseryMireMedallionAddress || Address == TurtleRockMedallionAddress)
            {
                var medallionName = RomItemConstants.GetEntranceMedallion(ItemId);
                ItemId = Data.GameItems.Items.Values.Where(x => x.LogicalId == medallionName).Select(x => x.Id).FirstOrDefault();
            }

            byte low  = romData[Address - 2];
            byte high = romData[Address - 1];

            if (Address >= 0xE96E && Address <= 0xEB65)
            {
                if (high == 0x80)
                {
                    RoomId = low;
                }
                else
                {
                    RoomId = (high << 8) + low;
                }
            }
            else
            {
                RoomId = GetRoomIdFromAddress(Address);
            }
        }