Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_halo_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (setnewtext == true)
2
{
3
    rr = choose(0, 1, 2, 3);
4
    exspace = 0;
5
    if (rr == 0)
6
    {
7
        text = stringsetloc(
Halo, goodeye! Halo, goodeye!
"Halo, goodeye! Halo, goodeye!", "obj_halo_enemy_slash_Step_0_gml_6_0"
);
8
        if (global.lang == "ja")
9
            exspace = 1;
10
    }
11
    if (rr == 1)
12
        text = stringsetloc(
Halo, are you listening?
"Halo, are you listening? ", "obj_halo_enemy_slash_Step_0_gml_7_0"
);
13
    if (rr == 2)
14
        text = stringsetloc(
You oppose the revolution?
"You oppose the revolution? ", "obj_halo_enemy_slash_Step_0_gml_8_0"
);
15
    if (rr == 3)
16
        text = stringsetloc(
Open your eyes Open your eyes
"Open your eyes Open your eyes", "obj_halo_enemy_slash_Step_0_gml_9_0"
);
17
    if (global.mercymod[myself] >= 100)
18
    {
19
        if (rr == 0 || rr == 1)
20
            text = stringsetloc(
Viva la revolution! Viva la revolution!
"Viva la revolution! Viva la revolution!", "obj_halo_enemy_slash_Step_0_gml_13_0"
);
21
        if (rr == 2 || rr == 3)
22
            text = stringsetloc(
To spin, is to trust
"To spin, is to trust", "obj_halo_enemy_slash_Step_0_gml_14_0"
);
23
    }
24
    textlength = string_length(text);
25
    setnewtext = false;
26
}
27
if (global.monster[myself] == 1)
28
{
29
    if (
scr_isphase
scr_isphase

function
scr_isphase(arg0)
{ __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("enemytalk") && talked == 0)
30
    {
31
        
scr_randomtarget
scr_randomtarget

function
scr_randomtarget()
{ abletotarget = 1; if (global.charcantarget[0] == 0 && global.charcantarget[1] == 0 && global.charcantarget[2] == 0) abletotarget = 0; mytarget = choose(0, 1, 2); if (abletotarget == 1) { while (global.charcantarget[mytarget] == 0) mytarget = choose(0, 1, 2); } else { mytarget = 3; } global.targeted[mytarget] = 1; if (global.chapter >= 2 && mytarget != 3) { if (global.charcantarget[0]) global.targeted[0] = 1; if (global.charcantarget[1]) global.targeted[1] = 1; if (global.charcantarget[2]) global.targeted[2] = 1; mytarget = 4; } }
();
32
        myattackchoice = choose(0, 1);
33
        myattackpriority = 1;
34
        if (myattackchoice == 2)
35
            myattackpriority = 50;
36
        
scr_attackpriority
scr_attackpriority

function
scr_attackpriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.attackpriority < arg0) { obj_battlecontroller.attackpriority = arg0; return true; } else { return false; } } else { return false; } }
(myattackpriority - 1);
37
        if (!instance_exists(obj_darkener))
38
            instance_create(0, 0, obj_darkener);
39
        setnewtext = true;
40
        talked = 1;
41
        talktimer = 0;
42
        rtimer = 0;
43
    }
44
    if (talked == 1 && 
scr_isphase
scr_isphase

function
scr_isphase(arg0)
{ __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("enemytalk"))
45
        
scr_blconskip
scr_blconskip

function
scr_blconskip(arg0)
{ if (arg0 >= 0) { if (button1_p() && talktimer > arg0) talktimer = talkmax; talktimer += 1; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); with (obj_guei_balloon) instance_destroy(); global.mnfight = 1.5; } } else if (arg0 == -1) { if (instance_exists(obj_writer) == false) global.mnfight = 1.5; } else if (arg0 == -2) { talktimer += 1; if (talktimer > 15) talktimer = talkmax; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); with (obj_guei_balloon) instance_destroy(); global.mnfight = 1.5; } } }
(15);
46
    if (global.mnfight == 1.5)
47
    {
48
        arctexttimer++;
49
        if (
scr_attackpriority
scr_attackpriority

function
scr_attackpriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.attackpriority < arg0) { obj_battlecontroller.attackpriority = arg0; return true; } else { return false; } } else { return false; } }
(myattackpriority))
50
        {
51
            if (!instance_exists(obj_growtangle))
52
                instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
53
            if (!instance_exists(obj_moveheart))
54
                
scr_moveheart
scr_moveheart

function
scr_moveheart()
{ global.inv = 0; if (global.chapter == 4 && (i_ex(obj_hammer_of_justice_enemy) || i_ex(obj_sound_of_justice_enemy))) return instance_create(obj_herosusie.x - 250, obj_herosusie.y + 40, obj_moveheart); else return instance_create(obj_herokris.x + 10, obj_herokris.y + 40, obj_moveheart); }
();
55
            global.mnfight = 2;
56
            
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(90);
57
        }
58
    }
59
    if (
scr_isphase
scr_isphase

function
scr_isphase(arg0)
{ __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("bullets") && attacked == 0)
60
    {
61
        rtimer += 1;
62
        if (rtimer == 12)
63
        {
64
            if (myattackchoice == 0)
65
            {
66
                global.monsterattackname[myself] = "HoopAttack";
67
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
68
                dc.type = 102;
69
            }
70
            else if (myattackchoice == 1)
71
            {
72
                global.monsterattackname[myself] = "VVVVVattack";
73
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
74
                dc.type = 103;
75
            }
76
            
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(200);
77
            turns += 1;
78
            global.typer = 6;
79
            global.fc = 0;
80
            rr = choose(0, 1, 2, 3);
81
            if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(random(2)))
82
            {
83
                var substring = string(myself);
84
                if (rr == 0)
85
                    global.battlemsg[0] = stringsetloc(
* Winglade molts and revolts.
"* Winglade molts and revolts.", "obj_halo_enemy_slash_Step_0_gml_114_0"
);
86
                if (rr == 1)
87
                    global.battlemsg[0] = stringsetloc(
* Winglade watches distrustfully.
"* Winglade watches distrustfully.", "obj_halo_enemy_slash_Step_0_gml_115_0"
);
88
                if (rr == 2)
89
                    global.battlemsg[0] = stringsetloc(
* Winglade draws flowers with its blade.
"* Winglade draws flowers with its blade.", "obj_halo_enemy_slash_Step_0_gml_116_0"
);
90
                if (rr == 3)
91
                    global.battlemsg[0] = stringsetloc(
* Winglade rotates aggressively.
"* Winglade rotates aggressively.", "obj_halo_enemy_slash_Step_0_gml_117_0"
);
92
                if (irandom(100) < 3)
93
                    global.battlemsg[0] = stringsetloc(
* Smells like old down pillow.
"* Smells like old down pillow.", "obj_halo_enemy_slash_Step_0_gml_118_0"
);
94
            }
95
            if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 3))
96
            {
97
                if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(100 + random(2)))
98
                    global.battlemsg[0] = stringsetloc(
* Winglade sheds feathers heavily.
"* Winglade sheds feathers heavily.", "obj_halo_enemy_slash_Step_0_gml_123_0"
);
99
            }
100
            if (global.mercymod[myself] >= 100)
101
            {
102
                if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(100 + random(2)))
103
                    global.battlemsg[0] = stringsetloc(
* Winglade flutters trustfully.
"* Winglade flutters trustfully.", "obj_halo_enemy_slash_Step_0_gml_128_0"
);
104
            }
105
            if (global.monsterstatus[myself] == 1)
106
            {
107
                if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(100 + random(2)))
108
                    global.battlemsg[0] = stringsetloc(
* Winglade's eye flutters shut.
"* Winglade's eye flutters shut.", "obj_halo_enemy_slash_Step_0_gml_133_0"
);
109
            }
110
            attacked = 1;
111
        }
112
    }
113
}
114
if (global.myfight == 3)
115
{
116
    xx = __view_get(e__VW.XView, 0);
117
    yy = __view_get(e__VW.YView, 0);
118
    if (acting == 1 && actcon == 0)
119
    {
120
        actcon = 1;
121
        msgsetloc(0, 
* WINGLADE - A radical blade with feathers at the hilt.Wait for inputClose Message
"* WINGLADE - A radical blade with feathers at the hilt./%", "obj_halo_enemy_slash_Step_0_gml_155_0"
);
122
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
123
    }
124
    if (acting == 2 && actcon == 0)
125
    {
126
        actcon = 1;
127
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("kris", spr_krisb_pirouette, 1, true);
128
        snd_stop(snd_pirouette);
129
        snd_play_x(snd_pirouette, 0.7, 1.1);
130
        if (global.flag[241 JEVIL_plot] > 5)
131
        {
132
            msgsetloc(0, 
* You spun masterfully!Wait for inputClose Message
"* You spun masterfully!/%", "obj_halo_enemy_slash_Step_0_gml_168_0"
);
133
            for (var i = 0; i < instance_number(obj_monsterparent); i += 1)
134
            {
135
                enemy[i] = instance_find(obj_monsterparent, i);
136
                if (enemy[i].myself == myself)
137
                {
138
                    with (enemy[i])
139
                        
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 50);
140
                }
141
                else
142
                {
143
                    with (enemy[i])
144
                        
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 10);
145
                }
146
            }
147
        }
148
        else
149
        {
150
            msgsetloc(0, 
* You spun hypnotically!Wait for inputClose Message
"* You spun hypnotically!/%", "obj_halo_enemy_slash_Step_0_gml_183_0"
);
151
            for (var i = 0; i < instance_number(obj_monsterparent); i += 1)
152
            {
153
                enemy[i] = instance_find(obj_monsterparent, i);
154
                if (enemy[i].myself == myself)
155
                {
156
                    with (enemy[i])
157
                        
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 50);
158
                }
159
                else
160
                {
161
                    with (enemy[i])
162
                        
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 10);
163
                }
164
            }
165
        }
166
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
167
    }
168
    if (acting == 3 && actcon == 0)
169
    {
170
        actcon = 1;
171
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("kris", spr_krisb_pirouette, 1, true);
172
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("susie", spr_susie_pirouette, 1, true);
173
        snd_stop(snd_pirouette);
174
        snd_play_x(snd_pirouette, 0.7, 1.1);
175
        if (global.flag[241 JEVIL_plot] > 5)
176
        {
177
            msgsetloc(0, 
* You and Susie spun masterfully!Wait for inputClose Message
"* You and Susie spun masterfully!/%", "obj_halo_enemy_slash_Step_0_gml_209_0"
);
178
            with (obj_monsterparent)
179
                
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 60);
180
        }
181
        else
182
        {
183
            msgsetloc(0, 
* You and Susie spun hypnotically!Wait for inputClose Message
"* You and Susie spun hypnotically!/%", "obj_halo_enemy_slash_Step_0_gml_214_0"
);
184
            with (obj_monsterparent)
185
                
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 60);
186
        }
187
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
188
    }
189
    if (acting == 4 && actcon == 0)
190
    {
191
        acting = 300;
192
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("kris", spr_krisb_pirouette, 1, true);
193
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("susie", spr_susie_pirouette, 1, true);
194
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("ralsei", spr_ralsei_pirouette, 1, true);
195
        msgsetloc(0, 
* Everyone spun masterfully!
* It's a whirlwind...!Wait for inputClose Message
"* Everyone spun masterfully!&* It's a whirlwind...!/%", "obj_halo_enemy_slash_Step_0_gml_228_0"
);
196
        snd_stop(snd_pirouette);
197
        snd_play_x(snd_pirouette, 0.7, 1.1);
198
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
199
        var _whirl = instance_create_depth(obj_herokris.x, obj_herokris.y, depth - 10, obj_halo_whirl);
200
        _whirl.parent = id;
201
    }
202
    if (acting == 301 && actcon == 0)
203
    {
204
        with (obj_monsterparent)
205
            
scr_spare
scr_spare

function
scr_spare(arg0)
{ with (global.monsterinstance[arg0]) event_user(10); }
(myself);
206
        actcon = 1;
207
    }
208
    if (actingsus == 1 && actconsus == 1)
209
    {
210
        snd_stop(snd_pirouette);
211
        snd_play_x(snd_pirouette, 0.7, 1.1);
212
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("susie", spr_susie_pirouette, 1, true);
213
        msgsetloc(0, 
* Susie wobbles like a top!Wait for inputClose Message
"* Susie wobbles like a top!/%", "obj_halo_enemy_slash_Step_0_gml_249_0"
);
214
        
scr_simultext
scr_simultext

function
scr_simultext(arg0)
{ __simulorder = 0; if (arg0 == "kris") __simulorder = simulorderkri; if (arg0 == "susie") __simulorder = simulordersus; if (arg0 == "ralsei") __simulorder = simulorderral; if (arg0 == "noelle") __simulorder = simulordernoe; __yoffset = __simulorder * 30; global.typer = 4; battlewriter = instance_create(xx + 30, yy + 376 + __yoffset, obj_writer); }
("susie");
215
        if (simulordersus == 0)
216
            actconsus = 20;
217
        else
218
            actconsus = 0;
219
        
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 40);
220
    }
221
    if (actingral == 1 && actconral == 1)
222
    {
223
        snd_stop(snd_pirouette);
224
        snd_play_x(snd_pirouette, 0.7, 1.1);
225
        
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; global.faceaction[myself] = 0; } } }
("ralsei", spr_ralsei_pirouette, 1, true);
226
        msgsetloc(0, 
* Ralsei rotates like a gyro!Wait for inputClose Message
"* Ralsei rotates like a gyro!/%", "obj_halo_enemy_slash_Step_0_gml_263_0"
);
227
        
scr_simultext
scr_simultext

function
scr_simultext(arg0)
{ __simulorder = 0; if (arg0 == "kris") __simulorder = simulorderkri; if (arg0 == "susie") __simulorder = simulordersus; if (arg0 == "ralsei") __simulorder = simulorderral; if (arg0 == "noelle") __simulorder = simulordernoe; __yoffset = __simulorder * 30; global.typer = 4; battlewriter = instance_create(xx + 30, yy + 376 + __yoffset, obj_writer); }
("ralsei");
228
        if (simulorderral == 0)
229
            actconral = 20;
230
        else
231
            actconral = 0;
232
        for (var i = 0; i < instance_number(obj_monsterparent); i += 1)
233
        {
234
            enemy[i] = instance_find(obj_monsterparent, i);
235
            if (enemy[i].myself == myself)
236
            {
237
                with (enemy[i])
238
                    
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 50);
239
            }
240
            else
241
            {
242
                with (enemy[i])
243
                    
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; }
(myself, 10);
244
            }
245
        }
246
    }
247
    if (actcon == 20 || actconsus == 20 || actconral == 20)
248
    {
249
        if (
scr_terminate_writer
scr_terminate_writer

function
scr_terminate_writer()
{ __writerkilled = 0; __writerkillable = 0; __writerended = 0; if (instance_exists(obj_writer)) { obj_writer.__endcheckid = id; with (obj_writer) { if (reachedend == 1) { with (__endcheckid) __writerended++; } } if (__writerended == instance_number(obj_writer)) __writerkillable = 1; } else { __writerkilled = 1; } if (button1_p() && __writerkillable == 1) { with (obj_writer) instance_destroy(); __writerkilled = 1; } return __writerkilled; }
())
250
        {
251
            actconsus = -1;
252
            actconral = -1;
253
            actcon = 1;
254
        }
255
    }
256
    if (actcon == 1 && !instance_exists(obj_writer))
257
    {
258
        
scr_nextact
scr_nextact

function
scr_nextact()
{ global.acting[0] = 0; global.acting[1] = 0; global.acting[2] = 0; global.actingsingle[global.currentactingchar] = 0; __minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]]; with (__minstance) { acting = 0; actcon = 0; actconsus = 0; actconral = 0; actconnoe = 0; } var singleactcomplete = 0; while (global.currentactingchar < 3) { global.currentactingchar++; if (global.currentactingchar < 3) { if (global.actingsingle[global.currentactingchar] == 1) { __minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]]; if (global.char[global.currentactingchar] == 2) { with (__minstance) actconsus = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } if (global.char[global.currentactingchar] == 3) { with (__minstance) actconral = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } if (global.char[global.currentactingchar] == 4) { with (__minstance) actconnoe = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } } } } if (i_ex(obj_sound_of_justice_enemy) && obj_sound_of_justice_enemy.phase == 1) { global.charturn = 3; global.myfight = 3; global.currentactingchar = 0; if (global.acting[0] == 0)
scr_nextact();
if (global.acting[0] == 1 && global.actingsimul[0] == 1)
scr_act_simul();
exit; } if (global.currentactingchar >= 3) { with (obj_monsterparent) { acting = 0; actingsus = 0; actingral = 0; actingnoe = 0; } global.currentactingchar = 0;
scr_attackphase();
} else if (!singleactcomplete) {
scr_act_simul();
} }
();
259
        if (acting == 0 && actingsus == 0 && actingral == 0)
260
        {
261
            
scr_battle_sprite_reset
scr_battle_sprite_reset

function
scr_battle_sprite_reset(arg0)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 0; hurt = 0; attacktimer = 0; attacked = 0; global.faceaction[myself] = 0; } } }
("kris");
262
            
scr_battle_sprite_reset
scr_battle_sprite_reset

function
scr_battle_sprite_reset(arg0)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 0; hurt = 0; attacktimer = 0; attacked = 0; global.faceaction[myself] = 0; } } }
("susie");
263
            
scr_battle_sprite_reset
scr_battle_sprite_reset

function
scr_battle_sprite_reset(arg0)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 0; hurt = 0; attacktimer = 0; attacked = 0; global.faceaction[myself] = 0; } } }
("ralsei");
264
        }
265
    }
266
}
267
if (state == 3)
268
{
269
    
scr_enemyhurt_tired_after_damage
scr_enemyhurt_tired_after_damage

function
scr_enemyhurt_tired_after_damage(arg0)
{ if (global.monsterhp[myself] <= (global.monstermaxhp[myself] * arg0))
scr_monster_make_tired(myself);
}
(0.5);
270
    
scr_enemy_hurt
scr_enemy_hurt

function
scr_enemy_hurt()
{ hurttimer -= 1; if (hurttimer < 0) { state = 0; } else { if (global.monster[myself] == 0)
scr_defeatrun();
hurtshake += 1; if (hurtshake > 1) { if (shakex > 0) shakex -= 1; if (shakex < 0) shakex += 1; shakex = -shakex; hurtshake = 0; } } }
();
271
}
272
273
enum e__VW
274
{
275
    XView,
276
    YView,
277
    WView,
278
    HView,
279
    Angle,
280
    HBorder,
281
    VBorder,
282
    HSpeed,
283
    VSpeed,
284
    Object,
285
    Visible,
286
    XPort,
287
    YPort,
288
    WPort,
289
    HPort,
290
    Camera,
291
    SurfaceID
292
}