implement random-middle
This commit is contained in:
		
							parent
							
								
									183fd33f3f
								
							
						
					
					
						commit
						86b612f3b5
					
				| 
						 | 
					@ -161,6 +161,8 @@ class Range(Option, int):
 | 
				
			||||||
                return cls(int(round(random.triangular(cls.range_start, cls.range_end, cls.range_start), 0)))
 | 
					                return cls(int(round(random.triangular(cls.range_start, cls.range_end, cls.range_start), 0)))
 | 
				
			||||||
            elif text == "random-high":
 | 
					            elif text == "random-high":
 | 
				
			||||||
                return cls(int(round(random.triangular(cls.range_start, cls.range_end, cls.range_end), 0)))
 | 
					                return cls(int(round(random.triangular(cls.range_start, cls.range_end, cls.range_end), 0)))
 | 
				
			||||||
 | 
					            elif text == "random-middle":
 | 
				
			||||||
 | 
					                return cls(int(round(random.triangular(cls.range_start, cls.range_end), 0)))
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                return cls(random.randint(cls.range_start, cls.range_end))
 | 
					                return cls(random.randint(cls.range_start, cls.range_end))
 | 
				
			||||||
        return cls(int(text))
 | 
					        return cls(int(text))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -238,7 +238,8 @@ crystals_needed_for_gt: # Crystals required to open GT
 | 
				
			||||||
  7: 0
 | 
					  7: 0
 | 
				
			||||||
  random: 0
 | 
					  random: 0
 | 
				
			||||||
  random-low: 50 # any valid number, weighted towards the lower end
 | 
					  random-low: 50 # any valid number, weighted towards the lower end
 | 
				
			||||||
  random-high: 0
 | 
					  random-middle: 0 # any valid number, weighted towards the central range
 | 
				
			||||||
 | 
					  random-high: 0 # any valid number, weighted towards the higher end
 | 
				
			||||||
crystals_needed_for_ganon: # Crystals required to hurt Ganon
 | 
					crystals_needed_for_ganon: # Crystals required to hurt Ganon
 | 
				
			||||||
  0: 0
 | 
					  0: 0
 | 
				
			||||||
  1: 0
 | 
					  1: 0
 | 
				
			||||||
| 
						 | 
					@ -250,7 +251,8 @@ crystals_needed_for_ganon: # Crystals required to hurt Ganon
 | 
				
			||||||
  7: 0
 | 
					  7: 0
 | 
				
			||||||
  random: 0
 | 
					  random: 0
 | 
				
			||||||
  random-low: 0
 | 
					  random-low: 0
 | 
				
			||||||
  random-high: 50 # any valid number, weighted towards the higher end
 | 
					  random-middle: 0
 | 
				
			||||||
 | 
					  random-high: 50
 | 
				
			||||||
mode:
 | 
					mode:
 | 
				
			||||||
  standard: 50 # Begin the game by rescuing Zelda from her cell and escorting her to the Sanctuary
 | 
					  standard: 50 # Begin the game by rescuing Zelda from her cell and escorting her to the Sanctuary
 | 
				
			||||||
  open: 50 # Begin the game from your choice of Link's House or the Sanctuary
 | 
					  open: 50 # Begin the game from your choice of Link's House or the Sanctuary
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue