Skip to content

Commit

Permalink
Logic fixes for Mantis Village and Waterways benches. Give Salubra's …
Browse files Browse the repository at this point in the history
…Blessing at start, so soul logic is correct.
  • Loading branch information
homothetyhk committed Jun 23, 2022
1 parent 809df8f commit 1676e31
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
19 changes: 18 additions & 1 deletion BenchRando/Rando/RequestModifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public static void Setup()
// we will not bother to put benches in vanilla; they have no progression effect there.
RequestBuilder.OnUpdate.Subscribe(0.6f, AddBenches);

RequestBuilder.OnUpdate.Subscribe(5.1f, AddStartBlessing);

// The deranged constraint must be applied separately
RequestBuilder.OnUpdate.Subscribe(102f, DerangeBenches);
}
Expand Down Expand Up @@ -134,7 +136,22 @@ private static void AddBenches(RequestBuilder rb)
rb.AddToVanilla(bench, bench);
}
}

}

private static void AddStartBlessing(RequestBuilder rb)
{
if (!RandoInterop.IsEnabled()) return;
if (RandoInterop.LS.Settings.RandomizedItems == ItemRandoMode.None) return;

// put Salubra's Blessing at start when benches are randomized
// to ensure warping to a new bench does not interfere with soul logic
rb.RemoveItemByName(ItemNames.Salubras_Blessing);
rb.RemoveFromVanilla(LocationNames.Salubra, ItemNames.Salubras_Blessing);
rb.StartItems.Set(ItemNames.Salubras_Blessing, 1);
rb.EditLocationRequest(LocationNames.Salubra, info =>
{
info.onPlacementFetch += (f, r, p) => ((ItemChanger.Placements.ShopPlacement)p).defaultShopItems &= ~DefaultShopItems.SalubraBlessing;
});
}

private static void DerangeBenches(RequestBuilder rb)
Expand Down
14 changes: 13 additions & 1 deletion BenchRando/Resources/benches.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,18 @@
{
"name": "Fungus2_31[left1]",
"logic": "ORIG | Bench-Mantis_Village + Defeated_Mantis_Lords"
},
{
"name": "Mark_of_Pride",
"logic": "ORIG | Bench-Mantis_Village + (LEFTCLAW | WINGS | RIGHTCLAW + (BACKGROUNDPOGOS | TERMINALSHADESKIPS))"
},
{
"name": "Geo_Chest-Mantis_Lords",
"logic": "ORIG | Bench-Mantis_Village + (ANYCLAW | WINGS)"
},
{
"name": "Hallownest_Seal-Mantis_Lords",
"logic": "ORIG | Bench-Mantis_Village + (ANYCLAW | WINGS)"
}
],
"ExtraDeployers": [],
Expand Down Expand Up @@ -558,7 +570,7 @@
},
{
"name": "Waterways_02[bot1]",
"logic": "ORIG | Bench-Waterways"
"logic": "ORIG | Bench-Waterways + QUAKE"
},
{
"name": "Waterways_02[bot2]",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The *Black Egg Temple* and *Godhome Roof* benches are not randomized under any s

Randomized benches will appear **purple** in the Benchwarp menu. This indicates that they cannot be unlocked by the normal method of resting. You can see the name of the bench or the name of its scene by using Benchwarp's setting toggle.

With this setting active, Salubra's Blessing will be given at the start of the randomizer, to ensure the player has soul access after warping to a new bench. This can be logically required in some circumstances.

## Randomize Bench Spots

This setting randomizes the spots which have benches, replacing base game benches and adding new benches. BenchRando currently adds **85** new bench spots to the base **49** bench spots, for a total of **134** spots. The randomization guarantees that each of the Benchwarp area categories has at least **1** bench, and no more than **6** benches. It also guarantees that the total number of benches is between **45** and **55**.
Expand Down

0 comments on commit 1676e31

Please sign in to comment.