Fixes to blind restore code
New enemizer version is required to fully restore the blind escort mission.
This commit is contained in:
		
							parent
							
								
									3b159632b5
								
							
						
					
					
						commit
						7b9103c6a6
					
				
							
								
								
									
										9
									
								
								Rom.py
								
								
								
								
							
							
						
						
									
										9
									
								
								Rom.py
								
								
								
								
							| 
						 | 
				
			
			@ -287,9 +287,6 @@ def patch_enemizer(world, player: int, rom: LocalRom, enemizercli, random_sprite
 | 
			
		|||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    blindmaiden = rom.read_byte(0x04DE81)
 | 
			
		||||
    blindspawncode = rom.read_bytes(0xEA081, 15)
 | 
			
		||||
 | 
			
		||||
    rom.write_to_file(randopatch_path)
 | 
			
		||||
 | 
			
		||||
    with open(options_path, 'w') as f:
 | 
			
		||||
| 
						 | 
				
			
			@ -331,9 +328,9 @@ def patch_enemizer(world, player: int, rom: LocalRom, enemizercli, random_sprite
 | 
			
		|||
    rom.read_from_file(enemizer_output_path)
 | 
			
		||||
    os.remove(enemizer_output_path)
 | 
			
		||||
 | 
			
		||||
    if world.get_dungeon("Thieves Town", player).boss.enemizer_name == "Blind":
 | 
			
		||||
        rom.write_byte(0x04DE81, blindmaiden)
 | 
			
		||||
        rom.write_bytes(0xEA081, blindspawncode)
 | 
			
		||||
    if world.get_dungeon("Thieves Town", player).boss.enemizer_name == "Blind" \
 | 
			
		||||
            and rom.read_byte(0xEA081) != 0xEA:  # new enemizer required for blind escort mission
 | 
			
		||||
        rom.write_byte(0x04DE81, 6)
 | 
			
		||||
        rom.write_byte(0x200101, 0)  # Do not close boss room door on entry.
 | 
			
		||||
 | 
			
		||||
    if random_sprite_on_hit:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue