Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_queen_enemy_Other_10

(view raw script w/o annotations or w/e)
1
turn++;
2
phaseturn++;
3
rr = 0;
4
if (usewineattack == 1 && phase == 2)
5
{
6
    rr = 2;
7
    difficulty = 0;
8
    usewineattack = 0;
9
    phaseturn -= 1;
10
}
11
if (usewineattack == 1 && phase == 3)
12
{
13
    rr = 2;
14
    difficulty = 1;
15
    usewineattack = 0;
16
    phaseturn -= 1;
17
}
18
if (usewineattack == 1 && phase == 4)
19
{
20
    if (beatwine2nodamage == 1)
21
    {
22
        rr = 2;
23
        difficulty = 2;
24
        usewineattack = 0;
25
    }
26
    else
27
    {
28
        rr = 2;
29
        difficulty = 1;
30
        usewineattack = 0;
31
    }
32
    phaseturn -= 1;
33
}
34
if (usefinalattack == 1)
35
{
36
    rr = 1;
37
    difficulty = 0;
38
    usefinalattack = 2;
39
    phaseturn -= 1;
40
}
41
if ((phase == 1 && rr != 2 && rr != 1) || (phase == 2 && rr != 2 && rr != 1))
42
{
43
    if (phaseturn == 1)
44
    {
45
        rr = 7;
46
        difficulty = 0;
47
    }
48
    if (phaseturn == 2)
49
    {
50
        rr = 3;
51
        difficulty = 0;
52
    }
53
    if (phaseturn == 3)
54
    {
55
        rr = 6;
56
        difficulty = 0;
57
    }
58
    if (phaseturn == 4)
59
    {
60
        rr = 8;
61
        difficulty = 0;
62
    }
63
    if (phaseturn == 5)
64
    {
65
        rr = 4;
66
        difficulty = 0;
67
    }
68
    if (phaseturn == 6)
69
    {
70
        rr = 9;
71
        difficulty = 0;
72
    }
73
    if (phaseturn == 7)
74
    {
75
        rr = 8;
76
        difficulty = 4;
77
    }
78
    if (phaseturn > 7)
79
    {
80
        phaseturn = 7;
81
        var rand = irandom(120);
82
        if (rand >= 0)
83
        {
84
            rr = 7;
85
            difficulty = 0;
86
        }
87
        if (rand >= 20)
88
        {
89
            rr = 3;
90
            difficulty = 0;
91
        }
92
        if (rand >= 40)
93
        {
94
            rr = 6;
95
            difficulty = 0;
96
        }
97
        if (rand >= 60)
98
        {
99
            rr = 8;
100
            difficulty = 0;
101
        }
102
        if (rand >= 80)
103
        {
104
            rr = 4;
105
            difficulty = 0;
106
        }
107
        if (rand >= 100)
108
        {
109
            rr = 8;
110
            difficulty = 4;
111
        }
112
    }
113
}
114
if ((phase == 3 && rr != 2 && rr != 1) || (phase == 4 && rr != 2 && rr != 1))
115
{
116
    if (phaseturn == 1)
117
    {
118
        rr = 7;
119
        difficulty = 0;
120
    }
121
    if (phaseturn == 2)
122
    {
123
        rr = 3;
124
        difficulty = 0;
125
    }
126
    if (phaseturn == 3)
127
    {
128
        rr = 6;
129
        difficulty = 0;
130
    }
131
    if (phaseturn == 4)
132
    {
133
        rr = 8;
134
        difficulty = 0;
135
    }
136
    if (phaseturn == 5)
137
    {
138
        rr = 4;
139
        difficulty = 0;
140
    }
141
    if (phaseturn == 6)
142
    {
143
        rr = 9;
144
        difficulty = 0;
145
    }
146
    if (phaseturn == 7)
147
    {
148
        rr = 8;
149
        difficulty = 4;
150
    }
151
    if (phaseturn == 8)
152
    {
153
        rr = 4;
154
        difficulty = 1;
155
    }
156
    if (phaseturn == 9)
157
    {
158
        rr = 7;
159
        difficulty = 1;
160
    }
161
    if (phaseturn == 10)
162
    {
163
        rr = 6;
164
        difficulty = 1;
165
    }
166
    if (phaseturn == 11)
167
    {
168
        rr = 9;
169
        difficulty = 1;
170
    }
171
    if (phaseturn == 12)
172
    {
173
        rr = 8;
174
        difficulty = 5;
175
    }
176
    if (phaseturn > 12)
177
    {
178
        var rand = irandom(100);
179
        if (rand >= 0)
180
        {
181
            rr = 4;
182
            difficulty = 1;
183
        }
184
        if (rand >= 20)
185
        {
186
            rr = 7;
187
            difficulty = 1;
188
        }
189
        if (rand >= 40)
190
        {
191
            rr = 6;
192
            difficulty = 1;
193
        }
194
        if (rand >= 60)
195
        {
196
            rr = 9;
197
            difficulty = 1;
198
        }
199
        if (rand >= 80)
200
        {
201
            rr = 8;
202
            difficulty = 5;
203
        }
204
    }
205
}
206
if (!instance_exists(obj_berdlyplug_enemy))
207
{
208
    if (rr == 7)
209
        rr = 5;
210
}