From 0e6b61f87b676028fcfd75bbf576f48a0ef91632 Mon Sep 17 00:00:00 2001 From: jbzdarkid Date: Fri, 8 Nov 2019 09:13:28 -0800 Subject: Add orchard + transparent swapping --- Source/Randomizer.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Source/Randomizer.cpp') diff --git a/Source/Randomizer.cpp b/Source/Randomizer.cpp index 9b877cd..14583f8 100644 --- a/Source/Randomizer.cpp +++ b/Source/Randomizer.cpp @@ -139,18 +139,18 @@ void Randomizer::Randomize() { // Individual area modifications RandomizeTutorial(); - RandomizeSymmetry(); RandomizeDesert(); RandomizeQuarry(); RandomizeTreehouse(); RandomizeKeep(); RandomizeShadows(); - RandomizeTown(); RandomizeMonastery(); RandomizeBunker(); RandomizeJungle(); RandomizeSwamp(); RandomizeMountain(); + RandomizeTown(); + RandomizeSymmetry(); // RandomizeAudioLogs(); } @@ -188,6 +188,10 @@ void Randomizer::RandomizeTutorial() { } void Randomizer::RandomizeSymmetry() { + std::vector randomOrder(transparent.size(), 0); + std::iota(randomOrder.begin(), randomOrder.end(), 0); + RandomizeRange(randomOrder, SWAP::NONE, 1, 5); + ReassignTargets(transparent, randomOrder); } void Randomizer::RandomizeDesert() { @@ -238,6 +242,16 @@ void Randomizer::RandomizeShadows() { } void Randomizer::RandomizeTown() { + // @Hack...? To open the gate at the end + std::vector randomOrder(orchard.size() + 1, 0); + std::iota(randomOrder.begin(), randomOrder.end(), 0); + RandomizeRange(randomOrder, SWAP::NONE, 1, 5); + // Ensure that we open the gate before the final puzzle (by swapping) + int panel3Index = find(randomOrder, 3); + int panel4Index = find(randomOrder, 4); + randomOrder[min(panel3Index, panel4Index)] = 3; + randomOrder[max(panel3Index, panel4Index)] = 4; + ReassignTargets(orchard, randomOrder); } void Randomizer::RandomizeMonastery() { -- cgit 1.4.1