implement random-middle

This commit is contained in:
Fabian Dill 2021-06-12 21:05:45 +02:00
parent 183fd33f3f
commit 86b612f3b5
2 changed files with 6 additions and 2 deletions

View File

@ -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))

View File

@ -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