-
Notifications
You must be signed in to change notification settings - Fork 13
Encounter Randomization Flags By World #138
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,20 +12,29 @@ def parse(parser): | |||||||||
| help = "Random encounters are randomized") | ||||||||||
| random.add_argument("-rechu", "--random-encounters-chupon", action = "store_true", | ||||||||||
| help = "All Random Encounters are replaced with Chupon (Coliseum)") | ||||||||||
| random.add_argument("-rews", "--random-encounters-world-shuffle", action = "store_true", | ||||||||||
| help = "Random encounters are shuffled by world") | ||||||||||
| random.add_argument("-rewr", "--random-encounters-world-random", | ||||||||||
| default = None, type = int, metavar = "PERCENT", choices = range(101), | ||||||||||
| help = "Random encounters are randomized with encounters from the same world") | ||||||||||
|
|
||||||||||
| fixed = encounters.add_mutually_exclusive_group() | ||||||||||
| fixed.add_argument("-fer", "--fixed-encounters-random", | ||||||||||
| default = None, type = int, metavar = "PERCENT", choices = range(101), | ||||||||||
| help = "Fixed encounters are randomized. Lete River, Serpent Trench, Mine Cart, Imperial Camp, ...") | ||||||||||
| fixed.add_argument("-fewr", "--fixed-encounters-world-random", | ||||||||||
| default = None, type = int, metavar = "PERCENT", choices = range(101), | ||||||||||
| help = "Fixed encounters are randomized with encounters from the same world. Lete River, Serpent Trench, Mine Cart, Imperial Camp, ...") | ||||||||||
|
|
||||||||||
| escapable = encounters.add_mutually_exclusive_group() | ||||||||||
| escapable.add_argument("-escr", "--encounters-escapable-random", | ||||||||||
| default = None, type = int, metavar = "PERCENT", choices = range(101), | ||||||||||
| help = "Percent of random encounters escapable including with warp or smoke bombs") | ||||||||||
|
|
||||||||||
| def process(args): | ||||||||||
| args.random_encounters_original = not args.random_encounters_shuffle and args.random_encounters_random is None | ||||||||||
| args.fixed_encounters_original = args.fixed_encounters_random is None | ||||||||||
| args.random_encounters_original = not args.random_encounters_shuffle and args.random_encounters_random is None \ | ||||||||||
| and not args.random_encounters_world_shuffle and args.random_encounters_world_random is None | ||||||||||
| args.fixed_encounters_original = args.fixed_encounters_random is None and args.fixed_encounters_world_random is None | ||||||||||
| args.encounters_escapable_original = args.encounters_escapable_random is None | ||||||||||
|
|
||||||||||
| def flags(args): | ||||||||||
|
|
@@ -37,9 +46,16 @@ def flags(args): | |||||||||
| flags += f" -rer {args.random_encounters_random}" | ||||||||||
| elif args.random_encounters_chupon: | ||||||||||
| flags += " -rechu" | ||||||||||
| elif args.random_encounters_world_shuffle: | ||||||||||
| flags += " -rews" | ||||||||||
| elif args.fixed_encounters_world_random is not None: | ||||||||||
| flags += f" -rewr {args.fixed_encounters_world_random}" | ||||||||||
|
|
||||||||||
| if args.fixed_encounters_random is not None: | ||||||||||
| flags += f" -fer {args.fixed_encounters_random}" | ||||||||||
| elif args.fixed_encounters_world_random is not None: | ||||||||||
| flags += f" -fewr {args.fixed_encounters_world_random}" | ||||||||||
|
|
||||||||||
|
|
||||||||||
| if args.encounters_escapable_random is not None: | ||||||||||
| flags += f" -escr {args.encounters_escapable_random}" | ||||||||||
|
|
@@ -56,14 +72,22 @@ def options(args): | |||||||||
| random_encounters = "Random" | ||||||||||
| elif args.random_encounters_chupon: | ||||||||||
| random_encounters = "Chupon" | ||||||||||
| elif args.random_encounters_world_shuffle: | ||||||||||
| random_encounters = "WShuffle" | ||||||||||
| elif args.fixed_encounters_world_random is not None: | ||||||||||
| random_encounters = "WRandom" | ||||||||||
|
Comment on lines
+77
to
+78
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code is checking
Suggested change
|
||||||||||
|
|
||||||||||
| result.append(("Random Encounters", random_encounters, "random_encounters")) | ||||||||||
| if args.random_encounters_random is not None: | ||||||||||
| result.append(("Boss Percent", f"{args.random_encounters_random}%", "random_encounters_random")) | ||||||||||
| elif args.fixed_encounters_world_random is not None: | ||||||||||
| result.append(("Boss Percent", f"{args.fixed_encounters_world_random}%", "fixed_encounters_world_random")) | ||||||||||
|
Comment on lines
+83
to
+84
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code is checking Additionally, the boss percent for
Suggested change
|
||||||||||
|
|
||||||||||
| fixed_encounters = "Original" | ||||||||||
| if args.fixed_encounters_random is not None: | ||||||||||
| fixed_encounters = "Random" | ||||||||||
| elif args.fixed_encounters_world_random is not None: | ||||||||||
| fixed_encounters = "WRandom" | ||||||||||
|
|
||||||||||
| result.append(("Fixed Encounters", fixed_encounters, "fixed_encounters")) | ||||||||||
| if args.fixed_encounters_random is not None: | ||||||||||
|
|
||||||||||
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.
There is a copy-paste error here. The code is checking
args.fixed_encounters_world_randomand appending its value to the-rewrflag (which is for random encounters by world). It should instead check and appendargs.random_encounters_world_random.