-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to randomize the Frogs 2 melody #2064
base: Dev
Are you sure you want to change the base?
Conversation
ebb0cda
to
4666a5c
Compare
@@ -386,34 +387,40 @@ def get_random_song() -> Song: | |||
|
|||
|
|||
# create a list of 12 songs, none of which are sub-strings of any other song | |||
def generate_song_list(world: World, frog: bool, warp: bool) -> dict[str, Song]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a technical reason that frogs2 is using this same function? Like will the mini-game break if the frog-song has another song as a sub-string?
If not, I think it would be cleaner to have it have its own function for generating randomly and probably its own dictionary entry for plando. If more enough code is similar perhaps it could be refactored into a few more functions shared between them.
If so, perhaps this could also fix that issue so that the code can be separated.
This PR turns the “Randomize Ocarina Melodies” setting into a multiselect and adds a 3rd option “Frogs Ocarina Game” which randomizes the song that needs to be played for the “ZR Frogs Ocarina Game” check. The notes appear in the spoiler log and can be plando'd like the other melodies, but the melody is locked to a length of exactly 14 notes. Rather than using the existing algorithm for generating random songs, a fully random sequence of notes with even weights is generated.
Special thanks to @rrealmuto whose
random_frog_song
branch served as the basis for this PR.I've also included a drive-by fix where the misc. location hint for frogs 2 was incorrectly assumed to be reachable as adult.