From c75ca61e8caeacdcc2eaf78b6151e53206d6fdc6 Mon Sep 17 00:00:00 2001 From: wjg Date: Wed, 5 May 2021 14:28:33 +0200 Subject: [PATCH] shop fix + gimmick fix Attempt at fixing shops never having major items. Gimmicks no longer change randomization. --- Randomizer/Logic/Parser.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Randomizer/Logic/Parser.cs b/Randomizer/Logic/Parser.cs index 07ea22aa..c2cfb7ad 100644 --- a/Randomizer/Logic/Parser.cs +++ b/Randomizer/Logic/Parser.cs @@ -75,8 +75,8 @@ public List GetDependencies(string logic) if (!StringUtil.ParseString(values[2], out depValue)) { depValue = 1; - dependencyString = dependencyString.Substring(0, dependencyString.Length - (values[2].Length + 1)); } + dependencyString = dependencyString.Substring(0, dependencyString.Length - (values[2].Length + 1)); } List temp = GetDependencies(dependencyString); @@ -435,8 +435,10 @@ public List ParseLocations(string[] lines, Random rng) // Probably a more efficient way to do it, but eh if (locationString.IndexOf("`") != -1) { - locationString = locationString.Replace("`RAND_INT`", StringUtil.AsStringHex8(rng.Next())); - + if (locationString.Contains("`RAND_INT`")) + { + locationString = locationString.Replace("`RAND_INT`", StringUtil.AsStringHex8(rng.Next())); + } locationString = SubParser.ReplaceDefines(locationString); }