-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathYoNoid2.asl
80 lines (67 loc) · 2.11 KB
/
YoNoid2.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
state("noid") {
string10 scene: 0x104FB78, 0x24, 0x30;
string10 loadingScene: 0x104FB78, 0x14, 0x0, 0x30;
byte dialogue: "mono.dll", 0x20C574, 0x10, 0xBC, 0x0, 0x8, 0xA8, 0xCC, 0x74, 0x40, 0xD8, 0x74;
}
startup {
//set up settings and variables required for logic
settings.Add("lc", true, "Level Completion");
settings.Add("le", true, "Level Entry");
settings.Add("mikestart", false, "Split at the beginning of the Mike fight");
settings.Add("LevelIntro", true, "New York", "lc");
vars.doneSplits = new List<string>();
vars.lastLevel = "";
vars.stopwatch = new Stopwatch();
vars.l = new Dictionary<string, string> {
{"PZNTv5", "Plizzanet"},
{"LeviLevle", "Swing Factory"},
{"dungeon", "Domino Dungeon"},
{"MikeLayer", "???"}
};
foreach (var Tag in vars.l) {
settings.Add(Tag.Key, true, Tag.Value, "lc");
settings.Add(Tag.Key + "-e", false, Tag.Value, "le");
};
}
init {
current.miketalk = 0;
}
start {
timer.Run.Offset = TimeSpan.FromSeconds(0);
if (current.scene != old.scene && old.scene == "title") {
current.miketalk = 0;
vars.doneSplits.Clear();
timer.Run.Offset = TimeSpan.FromSeconds(1.05);
return true;
}
}
split {
if ((current.scene == null || current.scene == "title") && old.scene != current.scene && old.scene != "title") {
vars.lastLevel = old.scene;
}
//level splits
if (current.scene != vars.lastLevel && current.scene != null) {
if (current.scene == "void") {
if (settings[vars.lastLevel] && !vars.doneSplits.Contains(vars.lastLevel)) {
vars.doneSplits.Add(vars.lastLevel);
return true;
}
} else if (vars.lastLevel == "void") {
if (settings[current.scene + "-e"] && !vars.doneSplits.Contains(current.scene + "-e")) {
vars.doneSplits.Add(current.scene + "-e");
return true;
};
}
}
//mike splits
if (current.scene == "MikeLayer" && current.dialogue == old.dialogue - 1) {
current.miketalk++;
}
if (current.miketalk == old.miketalk + 1) {
if (current.miketalk == 1) return settings["mikestart"];
if (current.miketalk == 2) return settings["MikeLayer"];
}
}
isLoading {
return (current.scene != current.loadingScene);
}