diff options
Diffstat (limited to 'Source/Randomizer.cpp')
-rw-r--r-- | Source/Randomizer.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
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() { | |||
139 | 139 | ||
140 | // Individual area modifications | 140 | // Individual area modifications |
141 | RandomizeTutorial(); | 141 | RandomizeTutorial(); |
142 | RandomizeSymmetry(); | ||
143 | RandomizeDesert(); | 142 | RandomizeDesert(); |
144 | RandomizeQuarry(); | 143 | RandomizeQuarry(); |
145 | RandomizeTreehouse(); | 144 | RandomizeTreehouse(); |
146 | RandomizeKeep(); | 145 | RandomizeKeep(); |
147 | RandomizeShadows(); | 146 | RandomizeShadows(); |
148 | RandomizeTown(); | ||
149 | RandomizeMonastery(); | 147 | RandomizeMonastery(); |
150 | RandomizeBunker(); | 148 | RandomizeBunker(); |
151 | RandomizeJungle(); | 149 | RandomizeJungle(); |
152 | RandomizeSwamp(); | 150 | RandomizeSwamp(); |
153 | RandomizeMountain(); | 151 | RandomizeMountain(); |
152 | RandomizeTown(); | ||
153 | RandomizeSymmetry(); | ||
154 | // RandomizeAudioLogs(); | 154 | // RandomizeAudioLogs(); |
155 | } | 155 | } |
156 | 156 | ||
@@ -188,6 +188,10 @@ void Randomizer::RandomizeTutorial() { | |||
188 | } | 188 | } |
189 | 189 | ||
190 | void Randomizer::RandomizeSymmetry() { | 190 | void Randomizer::RandomizeSymmetry() { |
191 | std::vector<int> randomOrder(transparent.size(), 0); | ||
192 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | ||
193 | RandomizeRange(randomOrder, SWAP::NONE, 1, 5); | ||
194 | ReassignTargets(transparent, randomOrder); | ||
191 | } | 195 | } |
192 | 196 | ||
193 | void Randomizer::RandomizeDesert() { | 197 | void Randomizer::RandomizeDesert() { |
@@ -238,6 +242,16 @@ void Randomizer::RandomizeShadows() { | |||
238 | } | 242 | } |
239 | 243 | ||
240 | void Randomizer::RandomizeTown() { | 244 | void Randomizer::RandomizeTown() { |
245 | // @Hack...? To open the gate at the end | ||
246 | std::vector<int> randomOrder(orchard.size() + 1, 0); | ||
247 | std::iota(randomOrder.begin(), randomOrder.end(), 0); | ||
248 | RandomizeRange(randomOrder, SWAP::NONE, 1, 5); | ||
249 | // Ensure that we open the gate before the final puzzle (by swapping) | ||
250 | int panel3Index = find(randomOrder, 3); | ||
251 | int panel4Index = find(randomOrder, 4); | ||
252 | randomOrder[min(panel3Index, panel4Index)] = 3; | ||
253 | randomOrder[max(panel3Index, panel4Index)] = 4; | ||
254 | ReassignTargets(orchard, randomOrder); | ||
241 | } | 255 | } |
242 | 256 | ||
243 | void Randomizer::RandomizeMonastery() { | 257 | void Randomizer::RandomizeMonastery() { |