Skip to content
Draft
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
5 changes: 5 additions & 0 deletions src/great_fairy_hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ RECOMP_PATCH void EnElfgrp_Init(Actor* thisx, PlayState* play) {

void EnElfgrp_OfferLoop(EnElfgrp* this, PlayState* play) {
s32 type = ENELFGRP_GET_TYPE(&this->actor);
if (rando_get_slotdata_u32("shuffle_great_fairy_rewards") == 0)
{
return;
}

bool hasFairies = type == ENELFGRP_TYPE_MAGIC ? rando_has_item(0x01007F) : rando_has_item(0x010000 | (type - 1)) >= rando_get_slotdata_u32("required_stray_fairies");

if (hasFairies && !rando_location_is_checked(LOCATION_GREAT_FAIRY)) {
Expand Down
12 changes: 9 additions & 3 deletions src/yaml_generation_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ static EnumOptionValue rando_skullsanity_options[] = {
{ "ignore", NULL },
};

static EnumOptionValue rando_shuffle_great_fairy_rewards_options[] ={
{ "disabled", NULL },
{ "vanilla", NULL },
{ "enabled", NULL},
};

static EnumOptionValue rando_shopsanity_options[] = {
{ "vanilla", NULL },
{ "enabled", NULL },
Expand Down Expand Up @@ -485,8 +491,8 @@ void randoCreateYamlConfigMenu() {
yaml_config_menu.num_options = 0;
randoCreateRadioOption(&yaml_config_menu, "accessibility", "Accessibility:", rando_accessibility_options, ARRAY_COUNT(rando_accessibility_options), RANDO_ACCESSABILITY_FULL);
randoCreateRadioOption(&yaml_config_menu, "logic_difficulty", "Logic Difficulty:", rando_logic_difficulty_options, ARRAY_COUNT(rando_logic_difficulty_options), RANDO_LOGIC_DIFFICULTY_NORMAL);
randoCreateIntSliderOption(&yaml_config_menu, "moon_remains_required", "Moon Boss Remains Required:", 1, 4, 1, 4);
randoCreateIntSliderOption(&yaml_config_menu, "majora_remains_required", "Majora Boss Remains Required:", 1, 4, 1, 4);
randoCreateIntSliderOption(&yaml_config_menu, "moon_remains_required", "Moon Boss Remains Required:", 0, 4, 1, 4);
randoCreateIntSliderOption(&yaml_config_menu, "majora_remains_required", "Majora Boss Remains Required:", 0, 4, 1, 4);
randoCreateBoolPropOption(&yaml_config_menu, "camc", "Chests Match Contents:", true);
randoCreateBoolPropOption(&yaml_config_menu, "swordless", "Start Swordless:", false);
randoCreateBoolPropOption(&yaml_config_menu, "shieldless", "Start Shieldless:", false);
Expand All @@ -498,7 +504,7 @@ void randoCreateYamlConfigMenu() {
randoCreateBoolPropOption(&yaml_config_menu, "shuffle_spiderhouse_reward", "Shuffle Spiderhouse Rewards:", false);
randoCreateIntSliderOption(&yaml_config_menu, "required_skull_tokens", "Required Skulltula Tokens:", 0, 30, 1, 30);
randoCreateRadioOption(&yaml_config_menu, "skullsanity", "Skull-Sanity Mode:", rando_skullsanity_options, ARRAY_COUNT(rando_skullsanity_options), RANDO_SKULLSANITY_VANILLA);
randoCreateBoolPropOption(&yaml_config_menu, "shuffle_great_fairy_rewards", "Shuffle Great Fairy Rewards:", false);
randoCreateRadioOption(&yaml_config_menu, "shuffle_great_fairy_rewards", "Shuffle Great Fairy Rewards:", rando_shuffle_great_fairy_rewards_options, ARRAY_COUNT(rando_shuffle_great_fairy_rewards_options), 0);
randoCreateIntSliderOption(&yaml_config_menu, "required_stray_fairies", "Required Stray Fairies:", 0, 15, 1, 15);
randoCreateBoolPropOption(&yaml_config_menu, "fairysanity", "Fairy-Sanity:", false);
randoCreateRadioOption(&yaml_config_menu, "shop_prices", "Shop Prices:", shop_prices_options, ARRAY_COUNT(shop_prices_options), RANDO_SHOP_PRICES_VANILLA);
Expand Down