Skip to content
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

Expand scarecrow behavior to three options #2346

Open
wants to merge 2 commits into
base: Dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ItemPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ def get_pool_core(world: World) -> tuple[list[str], dict[str, Item]]:
else:
pending_junk_pool.append(rupee)

if world.settings.free_scarecrow:
if world.settings.scarecrow_behavior == 'free':
world.state.collect(ItemFactory('Scarecrow Song', world))

if world.settings.no_epona_race:
Expand Down
7 changes: 4 additions & 3 deletions Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2103,9 +2103,10 @@ def update_scrub_text(message: bytearray, text_replacement: list[str], default_p
# f.write("\t0x%04X: \"%s\",\n" % (m.id, m.get_python_string()))
# f.write('}\n')

if world.settings.free_scarecrow:
# Played song as adult
save_context.write_bits(0x0EE6, 0x10)
if world.settings.scarecrow_behavior != 'vanilla':
if world.settings.scarecrow_behavior == 'free':
# Played song as adult
save_context.write_bits(0x0EE6, 0x10)
# Direct scarecrow behavior
symbol = rom.sym('FREE_SCARECROW_ENABLED')
rom.write_byte(symbol, 0x01)
Expand Down
20 changes: 15 additions & 5 deletions SettingsList.py
Original file line number Diff line number Diff line change
Expand Up @@ -3286,12 +3286,22 @@ class SettingInfos:
shared = True,
)

free_scarecrow = Checkbutton(
gui_text = "Free Scarecrow's Song",
scarecrow_behavior = Combobox(
gui_text = 'Scarecrow Behavior',
default = 'vanilla',
choices = {
'vanilla': 'Vanilla',
'fast': 'Fast',
'free': 'Free',
},
gui_tooltip = '''\
Pulling out the Ocarina near a
spot at which Pierre can spawn will
do so, without needing the song.
"Fast" will require setting the same song
both as child and adult, but pulling out
the Ocarina near a spot at which Pierre can
spawn will do so, without needing the song.

"Free" removes both the need to set the song first
and to play the song to summon Pierre.
''',
shared = True,
)
Expand Down
2 changes: 1 addition & 1 deletion data/Glitched World/Overworld.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"Bonooru": "is_child and Ocarina and has_all_notes_for_song(Scarecrow_Song)"
},
"locations": {
"Pierre": "is_adult and Bonooru and not free_scarecrow",
"Pierre": "is_adult and Bonooru and scarecrow_behavior != 'free'",
"LH Underwater Item": "is_child and can_dive",
"LH Sun": "
is_adult and
Expand Down
2 changes: 1 addition & 1 deletion data/World/Overworld.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@
"Bonooru": "is_child and Ocarina and has_all_notes_for_song(Scarecrow_Song)"
},
"locations": {
"Pierre": "is_adult and Bonooru and not free_scarecrow",
"Pierre": "is_adult and Bonooru and scarecrow_behavior != 'free'",
"LH Sun": "(can_use(Distant_Scarecrow) or 'Water Temple Clear') and can_use(Bow)",
"LH Freestanding PoH": "
is_adult and (can_use(Scarecrow) or here(can_plant_bean))",
Expand Down
22 changes: 11 additions & 11 deletions data/presets_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": true,
"scarecrow_behavior": "free",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -344,7 +344,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -551,7 +551,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -765,7 +765,7 @@
"complete_mask_quest": false,
"useful_cutscenes": true,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": false,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -981,7 +981,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": true,
"scarecrow_behavior": "free",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -1191,7 +1191,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": true,
"scarecrow_behavior": "free",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -1585,7 +1585,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": false,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -1777,7 +1777,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": false,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -2001,7 +2001,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": true,
Expand Down Expand Up @@ -2221,7 +2221,7 @@
"complete_mask_quest": false,
"useful_cutscenes": false,
"fast_chests": true,
"free_scarecrow": true,
"scarecrow_behavior": "free",
"fast_bunny_hood": true,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down Expand Up @@ -2406,7 +2406,7 @@
"complete_mask_quest": true,
"useful_cutscenes": true,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": false,
"auto_equip_masks": false,
"plant_beans": false,
Expand Down
2 changes: 1 addition & 1 deletion data/settings_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
"complete_mask_quest",
"useful_cutscenes",
"fast_chests",
"free_scarecrow",
"scarecrow_behavior",
"fast_bunny_hood",
"auto_equip_masks",
"plant_beans",
Expand Down
2 changes: 1 addition & 1 deletion tests/disables.sav
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"trials_random": false,
"trials": 0,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/entrance.sav
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"trials_random": false,
"trials": 0,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/entrance2.sav
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"trials_random": false,
"trials": 0,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/entrance3.sav
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"trials_random": false,
"trials": 0,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"start_with_consumables": false,
"big_poe_count_random": false,
"big_poe_count": 1,
Expand Down
2 changes: 1 addition & 1 deletion tests/glitched-standard.sav
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"no_epona_race": false,
"useful_cutscenes": true,
"fast_chests": true,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"start_with_rupees": false,
"start_with_consumables": false,
"plant_beans": false,
Expand Down
2 changes: 1 addition & 1 deletion tests/glitched-tokens.sav
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"one_item_per_dungeon": false,
"trials_random": false,
"trials": 0,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/ludicrous.sav
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"trials_random": false,
"trials": 0,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/mq.sav
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"trials_random": false,
"trials": 0,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/multiworld.sav
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"one_item_per_dungeon": false,
"trials_random": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/nightforest.sav
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"trials_random": false,
"trials": 6,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"big_poe_count_random": false,
"big_poe_count": 1,
"shuffle_kokiri_sword": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-exclusions-skulls-bridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-exclusions-skulls-gbk.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-exclusions-var-dungeons.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-exclusions-var-meds.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-exclusions-var-stones.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-priority-bridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-priority-custom.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-priority-gbk.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-priority-mixed-trials.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-priority-mixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-priority-triforce-hunt.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-starting-items-fallback.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
2 changes: 1 addition & 1 deletion tests/plando/plando-goals-starting-items-trials.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"complete_mask_quest": false,
"fast_chests": true,
"logic_no_night_tokens_without_suns_song": false,
"free_scarecrow": false,
"scarecrow_behavior": "vanilla",
"fast_bunny_hood": true,
"start_with_rupees": false,
"start_with_consumables": true,
Expand Down
Loading
Loading