Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shadowmantle_crtcontroller_Step_0

(view raw script w/o annotations or w/e)
1
if (crt == 0)
2
    crt = 629;
3
if (boss == 0)
4
    boss = 584;
5
if (i_ex(crt))
6
{
7
    if (i_ex(boss))
8
    {
9
        if (boss.phase == 1)
10
        {
11
            with (crt)
12
                chromStrength = lerp(chromStrength, 4, 0.01);
13
            siner = 0;
14
        }
15
        if (boss.phase == 2)
16
        {
17
            with (crt)
18
                chromStrength = lerp(chromStrength, 6, 0.01);
19
            siner = 0;
20
        }
21
        if (boss.phase == 3)
22
        {
23
            siner++;
24
            var sinmod = sin(siner / 15) * 2;
25
            with (crt)
26
                chromStrength = lerp(chromStrength, 6 + sinmod, 0.5);
27
        }
28
        if (boss.phase == 4)
29
        {
30
            siner++;
31
            var sinmod = sin(siner / 10) * 4;
32
            with (crt)
33
                chromStrength = lerp(chromStrength, 6 + sinmod, 0.5);
34
        }
35
    }
36
    else
37
    {
38
        siner = lerp(siner, 0, 0.05);
39
        var sinmod = sin(siner / 15) * 4;
40
        with (crt)
41
            chromStrength = lerp(chromStrength, 0.5 + (sinmod * 2), 0.5);
42
    }
43
}