Example #1
0
 public Randomizer(int seed, IRomLocations romLocations, RandomizerLog log)
 {
     random            = new SeedRandom(seed);
     this.romLocations = romLocations;
     this.seed         = seed;
     this.log          = log;
 }
Example #2
0
        private int CreateRom(IRomLocations romLocations, RandomizerLog log, RandomizerOptions options, int parsedSeed)
        {
            var randomizer = new Randomizer(parsedSeed, romLocations, log);

            CreateRomThread(randomizer, options);

            return(randomizer.GetComplexity());
        }
        private bool romRegion;         // US False, JP True

        public Randomizer(byte[] rom, bool region, int seed, IRomLocations romLocations, RandomizerLog log)
        {
            random            = new SeedRandom(seed);
            this.romLocations = romLocations;
            this.seed         = seed;
            this.log          = log;
            romRegion         = region;
        }
Example #4
0
        private static void AdjustCandidateItems(List <InventoryItemType> candidateItemList, List <InventoryItemType> haveItems, IRomLocations romLocations)
        {
            // require Boots before Titan's Mitt
            if (candidateItemList.Contains(InventoryItemType.TitansMitt) && !haveItems.Contains(InventoryItemType.PegasusBoots))
            {
                candidateItemList.Remove(InventoryItemType.TitansMitt);
            }

            // stop double-item-needed deadlocks
            if (candidateItemList.Count == 0)
            {
                var trockMedallion = romLocations.GetItemAtLocation <InventoryItem>(romLocations.SpecialLocations, "Required Medallion - Turtle Rock").Type;
                AddUnownedItem(candidateItemList, haveItems, trockMedallion);
                AddUnownedItem(candidateItemList, haveItems, InventoryItemType.FireRod);
            }
        }
Example #5
0
        private void AdjustCandidateItems(List <ItemType> candidateItemList, List <ItemType> haveItems, IRomLocations romLocations)
        {
            // require Boots before Titan's Mitt
            if (candidateItemList.Contains(ItemType.TitansMitt) && !haveItems.Contains(ItemType.PegasusBoots))
            {
                candidateItemList.Remove(ItemType.TitansMitt);
            }

            // stop double-item-needed deadlocks
            if (candidateItemList.Count == 0)
            {
                var trockMedallion = romLocations.SpecialLocations.First(x => x.Name == "Turtle Rock Required Medallion").Item.Type;
                AddUnownedItem(candidateItemList, haveItems, trockMedallion);
                AddUnownedItem(candidateItemList, haveItems, ItemType.FireRod);
            }
        }