Skip to content

Commit

Permalink
shop fix + gimmick fix
Browse files Browse the repository at this point in the history
Attempt at fixing shops never having major items.
Gimmicks no longer change randomization.
  • Loading branch information
wjg999 committed May 5, 2021
1 parent 3be30b1 commit c75ca61
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Randomizer/Logic/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public List<Dependency> 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<Dependency> temp = GetDependencies(dependencyString);
Expand Down Expand Up @@ -435,8 +435,10 @@ public List<Location> 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);
}

Expand Down

0 comments on commit c75ca61

Please sign in to comment.