diff options
| -rw-r--r-- | Manifold Garden.asl | 37 |
1 files changed, 20 insertions, 17 deletions
| diff --git a/Manifold Garden.asl b/Manifold Garden.asl index a7d7778..a632f98 100644 --- a/Manifold Garden.asl +++ b/Manifold Garden.asl | |||
| @@ -34,15 +34,18 @@ state("ManifoldGarden") { | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | startup { | 36 | startup { |
| 37 | settings.Add("every",true,"Split on every level change"); | ||
| 38 | settings.Add("fall",false,"Including all ending falling scenes","every"); | ||
| 37 | settings.Add("allGodCubes", false, "All God Cubes waypoints"); | 39 | settings.Add("allGodCubes", false, "All God Cubes waypoints"); |
| 38 | settings.Add("zero", false, "Zero% waypoints"); | 40 | settings.Add("zero", false, "Zero% waypoints"); |
| 41 | settings.Add("raymarchitecture", true, "Split on Raymarchitecture (ending cutsence)"); | ||
| 39 | settings.Add("norepeats",false,"Split only on the first encounter of each level"); | 42 | settings.Add("norepeats",false,"Split only on the first encounter of each level"); |
| 40 | vars.waypoints = null; | 43 | vars.waypoints = null; |
| 41 | vars.prevLevel = 0; | 44 | vars.prevLevel = 0; |
| 42 | vars.seqIndex = 0; | ||
| 43 | vars.stopwatch = null; // Used for the final split | 45 | vars.stopwatch = null; // Used for the final split |
| 44 | vars.prev = new List<int>(); | 46 | vars.prev = new List<int>(); |
| 45 | vars.firstRoom = false; | 47 | vars.firstRoom = false; |
| 48 | vars.fall = new List<int>{97, 98, 99, 101, 102, 103, 104}; | ||
| 46 | } | 49 | } |
| 47 | 50 | ||
| 48 | init { | 51 | init { |
| @@ -68,11 +71,12 @@ start { | |||
| 68 | print(String.Format("Level changed from {0} to {1}: START", old.level, current.level)); | 71 | print(String.Format("Level changed from {0} to {1}: START", old.level, current.level)); |
| 69 | if (settings["zero"]) { | 72 | if (settings["zero"]) { |
| 70 | vars.waypoints = new List<int>{106, 17, 110, 115, 111, 36, 44}; | 73 | vars.waypoints = new List<int>{106, 17, 110, 115, 111, 36, 44}; |
| 74 | } else if (settings["allGodCubes"]) { | ||
| 75 | vars.waypoints = new List<int>{82, 83, 84, 85, 86, 87, 88}; | ||
| 71 | } else { | 76 | } else { |
| 72 | vars.waypoints = null; | 77 | vars.waypoints = null; |
| 73 | } | 78 | } |
| 74 | vars.prevLevel = current.level; | 79 | vars.prevLevel = current.level; |
| 75 | vars.seqIndex = 0; | ||
| 76 | vars.stopwatch = Stopwatch.StartNew(); | 80 | vars.stopwatch = Stopwatch.StartNew(); |
| 77 | vars.prev.Clear(); | 81 | vars.prev.Clear(); |
| 78 | vars.firstRoom = false; | 82 | vars.firstRoom = false; |
| @@ -84,13 +88,20 @@ split { | |||
| 84 | // Split when level index changes. We don't split for the first room change in a run, | 88 | // Split when level index changes. We don't split for the first room change in a run, |
| 85 | // because that is always going to be changing from -1 to 9, and it happens a couple of | 89 | // because that is always going to be changing from -1 to 9, and it happens a couple of |
| 86 | // seconds after the timer starts. | 90 | // seconds after the timer starts. |
| 87 | if (vars.firstRoom && current.level != vars.prevLevel && current.level >= 0) { | 91 | if (vars.firstRoom && current.level != vars.prevLevel && current.level > 0) { |
| 88 | string action = "NO SPLIT"; | 92 | string action = "NO SPLIT"; |
| 89 | 93 | ||
| 90 | // Ignore the split rules when script is reloaded mid-game: | 94 | // Ignore the split rules when script is reloaded mid-game: |
| 91 | if (vars.prevLevel != 0) { | 95 | if (vars.prevLevel != 0) { |
| 92 | // Split rules: | 96 | // Split rules: |
| 93 | if (vars.waypoints == null) { | 97 | if (settings["every"]) { |
| 98 | if (settings["fall"] || !vars.fall.Contains(current.level)) { | ||
| 99 | action = "SPLIT"; | ||
| 100 | } | ||
| 101 | } else if (vars.waypoints != null) { | ||
| 102 | if (vars.waypoints.Contains(current.level)) { | ||
| 103 | action = "SPLIT"; | ||
| 104 | } | ||
| 94 | if (settings["allGodCubes"]) { | 105 | if (settings["allGodCubes"]) { |
| 95 | if (current.level >= 82 && current.level <= 88) { | 106 | if (current.level >= 82 && current.level <= 88) { |
| 96 | action = "SPLIT"; | 107 | action = "SPLIT"; |
| @@ -98,26 +109,16 @@ split { | |||
| 98 | } else { | 109 | } else { |
| 99 | action = "SPLIT"; | 110 | action = "SPLIT"; |
| 100 | } | 111 | } |
| 101 | } else if (vars.seqIndex < vars.waypoints.Count) { | ||
| 102 | if (current.level == vars.waypoints[vars.seqIndex]) { | ||
| 103 | vars.seqIndex++; | ||
| 104 | action = String.Format("SPLIT (new seqIndex = {0})", vars.seqIndex); | ||
| 105 | } else { | ||
| 106 | action = String.Format("NO SPLIT (seqIndex = {0}, {1} expected)", | ||
| 107 | vars.seqIndex, vars.waypoints[vars.seqIndex]); | ||
| 108 | } | ||
| 109 | } else { | ||
| 110 | action = String.Format("NO SPLIT (seqIndex = {0}, end of waypoint sequence)", vars.seqIndex); | ||
| 111 | } | 112 | } |
| 112 | 113 | ||
| 113 | print(String.Format("Level changed from {0} to {1}: {2}", vars.prevLevel, current.level, action)); | ||
| 114 | |||
| 115 | if (settings["norepeats"]) { | 114 | if (settings["norepeats"]) { |
| 116 | if (vars.prev.Contains(current.level)) { | 115 | if (vars.prev.Contains(current.level)) { |
| 117 | action = "NO SPLIT"; | 116 | action = "NO SPLIT"; |
| 118 | } | 117 | } |
| 119 | vars.prev.Add(current.level); | 118 | vars.prev.Add(current.level); |
| 120 | } | 119 | } |
| 120 | |||
| 121 | print(String.Format("Level changed from {0} to {1}: {2}", vars.prevLevel, current.level, action)); | ||
| 121 | } | 122 | } |
| 122 | 123 | ||
| 123 | vars.prevLevel = current.level; | 124 | vars.prevLevel = current.level; |
| @@ -130,9 +131,11 @@ split { | |||
| 130 | 131 | ||
| 131 | // Final split of the game: | 132 | // Final split of the game: |
| 132 | // Split after being in one of the ending cutscenes for 1.1 seconds. | 133 | // Split after being in one of the ending cutscenes for 1.1 seconds. |
| 133 | if ((current.level == 99 || current.level == 103 || current.level == 104) | 134 | if (settings["raymarchitecture"] |
| 135 | && (current.level == 99 || current.level == 103 || current.level == 104) | ||
| 134 | && vars.stopwatch != null | 136 | && vars.stopwatch != null |
| 135 | && vars.stopwatch.ElapsedMilliseconds >= 1100) { | 137 | && vars.stopwatch.ElapsedMilliseconds >= 1100) { |
| 138 | print("SPLIT on Raymarchitecture"); | ||
| 136 | vars.stopwatch = null; | 139 | vars.stopwatch = null; |
| 137 | return true; | 140 | return true; |
| 138 | } | 141 | } |
