Fix using wrong object type when placing crystals in dungeons behind ganons tower entrance.
This commit is contained in:
		
							parent
							
								
									037c643aab
								
							
						
					
					
						commit
						b6e0956fdb
					
				
							
								
								
									
										15
									
								
								Main.py
								
								
								
								
							
							
						
						
									
										15
									
								
								Main.py
								
								
								
								
							| 
						 | 
				
			
			@ -11,9 +11,9 @@ import time
 | 
			
		|||
import logging
 | 
			
		||||
import json
 | 
			
		||||
 | 
			
		||||
__version__ = '0.4.4-dev'
 | 
			
		||||
__version__ = '0.4.5-dev'
 | 
			
		||||
 | 
			
		||||
logic_hash = [100, 94, 18, 177, 161, 252, 4, 45, 29, 231, 99, 158, 70, 55, 74, 39, 12, 134, 142, 189, 61, 105, 10, 254, 137, 44, 72, 154, 145, 167, 98, 225,
 | 
			
		||||
logic_hash = [100, 18, 94, 177, 161, 252, 4, 45, 29, 231, 99, 158, 70, 55, 74, 39, 12, 134, 142, 189, 61, 105, 10, 254, 137, 44, 72, 154, 145, 167, 98, 225,
 | 
			
		||||
              215, 217, 126, 187, 13, 255, 138, 51, 64, 130, 139, 233, 168, 69, 175, 25, 58, 160, 1, 27, 206, 169, 223, 210, 188, 111, 186, 240, 133, 26, 41, 241,
 | 
			
		||||
              204, 89, 78, 63, 96, 218, 198, 224, 219, 35, 82, 181, 121, 243, 0, 155, 91, 120, 221, 178, 162, 80, 66, 97, 118, 103, 86, 191, 135, 122, 104, 40,
 | 
			
		||||
              183, 9, 230, 110, 14, 87, 143, 249, 90, 75, 232, 157, 238, 196, 23, 248, 2, 101, 159, 108, 201, 73, 34, 15, 179, 92, 226, 60, 222, 32, 109, 119,
 | 
			
		||||
| 
						 | 
				
			
			@ -489,7 +489,7 @@ def generate_itempool(world):
 | 
			
		|||
            if world.get_entrance('Ganons Tower').connected_region.name == region:
 | 
			
		||||
                # can't place a crystal here
 | 
			
		||||
                world.push_item(world.get_location(crystallocation), crystals.pop(), False)
 | 
			
		||||
                crystallocation.event = True
 | 
			
		||||
                world.get_location(crystallocation).event = True
 | 
			
		||||
            else:
 | 
			
		||||
                crystal_locations.append(world.get_location(crystallocation))
 | 
			
		||||
    else:
 | 
			
		||||
| 
						 | 
				
			
			@ -502,9 +502,12 @@ def generate_itempool(world):
 | 
			
		|||
 | 
			
		||||
    # check if dam is behind pyramid fairy, if so, swamp can't hold a crystal
 | 
			
		||||
    if world.get_entrance('Pyramid Fairy').connected_region.name == 'Dam':
 | 
			
		||||
        crystallocation = crystal_locations.pop(crystal_locations.index(world.get_location('Arrghus - Crystal')))
 | 
			
		||||
        world.push_item(world.get_location(crystallocation), crystals.pop(), False)
 | 
			
		||||
        crystallocation.event = True
 | 
			
		||||
        try:
 | 
			
		||||
            crystallocation = crystal_locations.pop(crystal_locations.index(world.get_location('Arrghus - Crystal')))
 | 
			
		||||
            world.push_item(world.get_location(crystallocation), crystals.pop(), False)
 | 
			
		||||
            crystallocation.event = True
 | 
			
		||||
        except ValueError:
 | 
			
		||||
            pass
 | 
			
		||||
 | 
			
		||||
    crystals.extend(ItemFactory(['Crystal 5', 'Crystal 6']))
 | 
			
		||||
    random.shuffle(crystals)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								Rom.py
								
								
								
								
							
							
						
						
									
										2
									
								
								Rom.py
								
								
								
								
							| 
						 | 
				
			
			@ -358,7 +358,7 @@ def patch_rom(world, rom, hashtable, quickswap=False, beep='normal', sprite=None
 | 
			
		|||
 | 
			
		||||
    # set rom name
 | 
			
		||||
    # 21 bytes
 | 
			
		||||
    rom.write_bytes(0x7FC0, bytearray('ER_044_%09d_' % world.seed, 'utf8') + world.option_identifier.to_bytes(4, 'big'))
 | 
			
		||||
    rom.write_bytes(0x7FC0, bytearray('ER_045_%09d_' % world.seed, 'utf8') + world.option_identifier.to_bytes(4, 'big'))
 | 
			
		||||
 | 
			
		||||
    # set heart beep rate
 | 
			
		||||
    rom.write_byte(0x180033, {'off': 0x00, 'half': 0x40, 'quarter': 0x80, 'normal': 0x20}[beep])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue