1- using DynamicData ;
2- using FtRandoLib . Importer ;
3- using js65 ;
4- using NLog ;
5- using System ;
1+ using System ;
62using System . Buffers ;
73using System . Collections . Generic ;
84using System . Diagnostics ;
95using System . IO ;
106using System . Linq ;
11- using System . Reflection ;
127using System . Text ;
138using System . Text . Json ;
149using System . Threading ;
1510using System . Threading . Tasks ;
11+ using NLog ;
12+ using js65 ;
13+ using FtRandoLib . Importer ;
1614using Z2Randomizer . RandomizerCore . Enemy ;
1715using Z2Randomizer . RandomizerCore . Overworld ;
1816using Z2Randomizer . RandomizerCore . Sidescroll ;
@@ -174,7 +172,7 @@ public class Hyrule
174172 */
175173
176174 public ROM ROMData { get ; set ; }
177- public Random r { get ; set ; }
175+ public RandomizerCore . Random r { get ; set ; }
178176 public string Flags { get ; private set ; }
179177 public int SeedHash { get ; private set ; }
180178 public RandomizerProperties Props
@@ -459,7 +457,7 @@ public async Task<RandomizerResult> Randomize(byte[] vanillaRomData, RandomizerC
459457 }
460458 }
461459
462- Random musicRng = new ( SeedHash ) ;
460+ RandomizerCore . Random musicRng = new ( SeedHash ) ;
463461 bool success = false ;
464462 int triesLeft = 8 ;
465463 while ( ! success )
@@ -1273,7 +1271,7 @@ private async Task<bool> FillPalaceRooms(AsmModule sideviewModule)
12731271 try
12741272 {
12751273 ROM testRom = new ( ROMData ) ;
1276- Random testRng = new Random ( ) ;
1274+ RandomizerCore . Random testRng = new ( SeedHash ) ;
12771275 //This continues to get worse, the text is based on the palaces and asm patched, so it needs to
12781276 //be tested here, but we don't actually know what they will be until later, for now i'm just
12791277 //testing with the vanilla text, but this could be an issue down the line.
@@ -2262,7 +2260,7 @@ private void SwapUpAndDownstab()
22622260 }
22632261
22642262 //Updated to use fisher-yates. Eventually i'll catch all of these. N is small enough here it REALLY makes a difference
2265- private static void ShuffleEncounters ( ROM rom , Random r , List < int > addr )
2263+ private static void ShuffleEncounters ( ROM rom , RandomizerCore . Random r , List < int > addr )
22662264 {
22672265 for ( int i = addr . Count - 1 ; i > 0 ; -- i )
22682266 {
@@ -2274,7 +2272,7 @@ private static void ShuffleEncounters(ROM rom, Random r, List<int> addr)
22742272 }
22752273 }
22762274
2277- private void RandomizeStartingValues ( RandomizerProperties props , Assembler a , Random r , ROM rom )
2275+ private void RandomizeStartingValues ( RandomizerProperties props , Assembler a , RandomizerCore . Random r , ROM rom )
22782276 {
22792277
22802278 rom . Put ( 0x17AF3 , ( byte ) props . StartAtk ) ;
@@ -3591,7 +3589,7 @@ private void ChangeMapperToMMC5(Assembler asm, bool preventFlash, bool enableZ2F
35913589 a . Code ( Util . ReadResource ( "Z2Randomizer.RandomizerCore.Asm.MMC5.s" ) , "mmc5_conversion.s" ) ;
35923590 }
35933591
3594- private void ApplyAsmPatches ( RandomizerProperties props , Assembler engine , Random r , List < Text > texts , ROM rom , StatRandomizer randomizedStats )
3592+ private void ApplyAsmPatches ( RandomizerProperties props , Assembler engine , RandomizerCore . Random r , List < Text > texts , ROM rom , StatRandomizer randomizedStats )
35953593 {
35963594 bool randomizeMusic = ! props . DisableMusic && props . RandomizeMusic ;
35973595
0 commit comments