-
Notifications
You must be signed in to change notification settings - Fork 10
/
Flyonoid.asl
106 lines (89 loc) · 2.4 KB
/
Flyonoid.asl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//Flyonoid Autosplitter + Load Remover by rythin
//Todo: support for Max Energy runs?
//Contanct info in case issues arise:
//Discord: rythin#0135
//Twitter: rythin_sr
//Twitch: rythin_sr
state("mask") {
string20 level: 0x6A987; //level name
int load: 0x8F95C; //1 when loading
int end: 0x87504; //garbage values in most levels, 0 -> 1 on game end
}
startup {
settings.Add("IL", false, "IL Mode");
settings.Add("levels", true, "Levels");
vars.d = new Dictionary<string, string> {
{"white1/planet.txt", "1"},
{"white2/planet.txt", "2"},
{"white3/planet.txt", "3"},
{"white4/planet.txt", "4"},
{"red1/planet.txt", "5"},
{"red2/planet.txt", "6"},
{"red3/planet.txt", "7"},
{"red4/planet.txt", "8"},
{"blue1/planet.txt", "9"},
{"blue2/planet.txt", "10"},
{"blue3/planet.txt", "11"},
{"blue4/planet.txt", "12"},
{"yellow1/planet.txt", "13"},
{"yellow2/planet.txt", "14"},
{"yellow3/planet.txt", "15"},
{"yellow4/planet.txt", "16"},
{"base1/planet.txt", "17"},
{"base2/planet.txt", "18"},
{"base3/planet.txt", "19"}
};
foreach (var Tag in vars.d) {
settings.Add(Tag.Key, true, Tag.Value, "levels");
};
}
start {
//autostart for full game runs
if (settings["IL"] == false) {
if (current.level == "White1/Planet.txt") {
if (current.load == 0 && old.load == 1) {
return true;
}
}
}
//autostart for IL runs
else if (settings["IL"] == true) {
if (current.load == 0 && old.load == 1) {
return true;
}
}
}
split {
//the capitalization of map names seems random, or at least very specific and is different when choosing the level from stage select or going into it from the previous level
//forcing the names to all lowercase removes this issue
//level splits according to settings
if (current.level != old.level && current.level.ToLowerInvariant() != "white1/planet.txt") {
if (settings[old.level.ToLowerInvariant()] == true && settings["IL"] == false) {
return true;
}
else if (settings["IL"] == true) {
return true;
}
}
//final split
if (old.level.ToLowerInvariant() == "base4/planet.txt" && current.level == "") {
return true;
}
}
reset {
if (settings["IL"] == true) {
if (current.load == 0 && old.load == 1) {
return true;
}
}
if (settings["IL"] == false) {
if (current.level == "White1/Planet.txt") {
if (current.load == 0 && old.load == 1) {
return true;
}
}
}
}
isLoading {
return current.load == 1;
}