Spike Cave v29 adjustment
This makes spike cave correctly understand that potions in v29 will refill full magic independent of difficulty setting.
This commit is contained in:
		
							parent
							
								
									ffe8df3304
								
							
						
					
					
						commit
						b8778385ad
					
				| 
						 | 
				
			
			@ -387,17 +387,17 @@ class CollectionState(object):
 | 
			
		|||
    def can_lift_heavy_rocks(self):
 | 
			
		||||
        return self.has('Titans Mitts')
 | 
			
		||||
 | 
			
		||||
    def can_extend_magic(self, smallmagic=8): #This reflects the total magic Link has, not the total extra he has.
 | 
			
		||||
    def can_extend_magic(self, smallmagic=8, fullrefill=False): #This reflects the total magic Link has, not the total extra he has.
 | 
			
		||||
        basemagic = 8
 | 
			
		||||
        if self.has('Quarter Magic'):
 | 
			
		||||
            basemagic = 32
 | 
			
		||||
        elif self.has('Half Magic'):
 | 
			
		||||
            basemagic = 16
 | 
			
		||||
        if self.world.difficulty == 'hard':
 | 
			
		||||
        if self.world.difficulty == 'hard' and fullrefill == False:
 | 
			
		||||
            basemagic = basemagic + int(basemagic * 0.5 * self.bottle_count())
 | 
			
		||||
        elif self.world.difficulty == 'expert':
 | 
			
		||||
        elif self.world.difficulty == 'expert' and fullrefill == False:
 | 
			
		||||
            basemagic = basemagic + int(basemagic * 0.25 * self.bottle_count())
 | 
			
		||||
        elif self.world.difficulty == 'insane':
 | 
			
		||||
        elif self.world.difficulty == 'insane' and fullrefill == False:
 | 
			
		||||
            basemagic = basemagic
 | 
			
		||||
        else:
 | 
			
		||||
            basemagic = basemagic + basemagic * self.bottle_count()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17
									
								
								Rules.py
								
								
								
								
							
							
						
						
									
										17
									
								
								Rules.py
								
								
								
								
							| 
						 | 
				
			
			@ -185,21 +185,12 @@ def global_rules(world):
 | 
			
		|||
    set_rule(world.get_entrance('Isolated Ledge Mirror Spot'), lambda state: state.has_Mirror())
 | 
			
		||||
    set_rule(world.get_entrance('Superbunny Cave Exit (Bottom)'), lambda state: False)  # Cannot get to bottom exit from top. Just exists for shuffling
 | 
			
		||||
 | 
			
		||||
    # Todo: Update the below to reflect that latest ROM has full strengh potions in all difficulties in spike cave
 | 
			
		||||
    set_rule(world.get_location('Spike Cave'), lambda state:
 | 
			
		||||
             state.has('Hammer') and state.can_lift_rocks() and
 | 
			
		||||
             (
 | 
			
		||||
                 (
 | 
			
		||||
                     state.has('Cape')
 | 
			
		||||
                     and (state.can_extend_magic(16)
 | 
			
		||||
                          or (state.can_extend_magic(12) and (state.world.can_take_damage or state.has_Boots()))
 | 
			
		||||
                          or (state.can_extend_magic(10) and state.world.can_take_damage and state.has_Boots()))
 | 
			
		||||
                 ) or (
 | 
			
		||||
                     state.has('Cane of Byrna')
 | 
			
		||||
                     and (state.can_extend_magic(12)
 | 
			
		||||
                          or (state.can_extend_magic(10) and (state.has_Boots() or state.world.can_take_damage))
 | 
			
		||||
                          or (state.world.can_take_damage and (state.has_Boots() or state.has_hearts(4)))))
 | 
			
		||||
                 )
 | 
			
		||||
             ((state.has('Cape') and state.can_extend_magic(16, True)) or
 | 
			
		||||
                 (state.has('Cane of Byrna') and
 | 
			
		||||
                     (state.can_extend_magic(12, True) or
 | 
			
		||||
                     (state.world.can_take_damage and (state.has_Boots() or state.has_hearts(4))))))
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
    set_rule(world.get_location('Hookshot Cave - Top Right'), lambda state: state.has('Hookshot'))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue