Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_organ_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (!audio_is_playing(snd_harmonize_act_b))
2
{
3
    harmon_sound = snd_play(snd_harmonize_act_b);
4
    snd_volume(harmon_sound, 0, 0);
5
}
6
if (global.turntimer < 2 && audio_is_playing(snd_harmonize_act_b))
7
    snd_volume(harmon_sound, 0, 0);
8
if (global.monster[myself] == 1)
9
{
10
    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)
11
    {
12
        
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; } }
();
13
        myattackchoice = 0;
14
        myattackpriority = 1;
15
        if (myattackchoice == 2)
16
            myattackpriority = 50;
17
        
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);
18
        if (!instance_exists(obj_darkener))
19
            instance_create(0, 0, obj_darkener);
20
        global.typer = 50;
21
        rr = choose(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
22
        if (rr == 0)
23
            msgsetloc(0, 
I am the
philosopher.
Amen.
"I am the&philosopher.&Amen.", "obj_organ_enemy_slash_Step_0_gml_35_0"
);
24
        if (rr == 1)
25
            msgsetloc(0, 
Listen!
The song of
legend plays.
Amen.
"Listen!&The song of&legend plays.&Amen.", "obj_organ_enemy_slash_Step_0_gml_36_0"
);
26
        if (rr == 2)
27
            msgsetloc(0, 
The truth
sung in
glass.
Amen.
"The truth&sung in&glass.&Amen.", "obj_organ_enemy_slash_Step_0_gml_37_0"
);
28
        if (rr == 3)
29
            msgsetloc(0, 
The tale
which must
be followed.
"The tale&which must&be followed.", "obj_organ_enemy_slash_Step_0_gml_38_0"
);
30
        if (rr == 4)
31
            msgsetloc(0, 
The tail
which must
not be
followed.
"The tail&which must&not be&followed.", "obj_organ_enemy_slash_Step_0_gml_39_0"
);
32
        if (rr == 5)
33
            msgsetloc(0, 
Do re mii
Do re yuu
Do re mon.
Amen.
"Do re mii&Do re yuu&Do re mon.&Amen.", "obj_organ_enemy_slash_Step_0_gml_40_0"
);
34
        if (rr == 6)
35
            msgsetloc(0, 
It was
glowing.
The voice
was glowing!
"It was&glowing.&The voice&was glowing!", "obj_organ_enemy_slash_Step_0_gml_41_0"
);
36
        if (rr == 7)
37
            msgsetloc(0, 
What is
DELTARUNE?
"What is&DELTARUNE?", "obj_organ_enemy_slash_Step_0_gml_42_0"
);
38
        if (rr == 8)
39
            msgsetloc(0, 
What isn't
DELTARUNE?
"What isn't&DELTARUNE?", "obj_organ_enemy_slash_Step_0_gml_43_0"
);
40
        if (rr == 9)
41
            msgsetloc(0, 
What am I?
Am I a butterfly?
"What am I?&Am I a butterfly?", "obj_organ_enemy_slash_Step_0_gml_44_0"
);
42
        if (rr == 10)
43
            msgsetloc(0, 
What am I?
Am I a man?
"What am I?&Am I a man?", "obj_organ_enemy_slash_Step_0_gml_45_0"
);
44
        if (rr == 11)
45
            msgsetloc(0, 
Why are we
fighting?
"Why are we&fighting?", "obj_organ_enemy_slash_Step_0_gml_46_0"
);
46
        if (rr == 12)
47
            msgsetloc(0, 
How could we
ever make
peace?
"How could we&ever make&peace?", "obj_organ_enemy_slash_Step_0_gml_47_0"
);
48
        if (global.mercymod[myself] >= 100)
49
            msgsetloc(0, 
The answer...
... was LOVE?
"The answer...&... was LOVE?", "obj_organ_enemy_slash_Step_0_gml_48_0"
);
50
        
scr_enemyblcon
scr_enemyblcon

function
scr_enemyblcon(arg0, arg1, arg2)
{ if (arg2 == 0) { mywriter = instance_create(arg0, arg1, obj_writer); return mywriter; } if (arg2 == 1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); return myblcon; } if (arg2 == 2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v; return myblcon; } if (arg2 == 3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; return myblcon; } if (arg2 == 4) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 0; myblcon.image_speed = 0; return myblcon; } if (arg2 == 5) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 1; myblcon.image_speed = 0; return myblcon; } if (arg2 == 6) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 7) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_r; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 8) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_tall; return myblcon; } if (arg2 == 10) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; return myblcon; } if (arg2 == 11) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_z; return myblcon; } }
(x - 10, y + 54, 10);
51
        talked = 1;
52
        talktimer = 0;
53
        rtimer = 0;
54
    }
55
    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"))
56
        
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);
57
    if (global.mnfight == 1.5)
58
    {
59
        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))
60
        {
61
            if (!instance_exists(obj_growtangle))
62
                instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
63
            if (!instance_exists(obj_moveheart))
64
                
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); }
();
65
            global.mnfight = 2;
66
            
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(220);
67
        }
68
    }
69
    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)
70
    {
71
        rtimer += 1;
72
        if (rtimer == 12)
73
        {
74
            if (harmonize > 0 || chorus > 0)
75
            {
76
                with (obj_dbulletcontroller)
77
                {
78
                    if (type == 109)
79
                        type = 108;
80
                }
81
                myattackchoice = 1;
82
            }
83
            else
84
            {
85
                var bar_number = 0;
86
                with (obj_dbulletcontroller)
87
                {
88
                    if (type == 109)
89
                        bar_number++;
90
                }
91
                if (bar_number > 0)
92
                    myattackchoice = 0;
93
                else
94
                    myattackchoice = choose(0, 1);
95
            }
96
            if (myattackchoice == 0)
97
            {
98
                global.monsterattackname[myself] = "organnotes";
99
                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);
100
                dc.type = 108;
101
            }
102
            if (myattackchoice == 1)
103
            {
104
                global.monsterattackname[myself] = "organlongnote";
105
                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);
106
                dc.type = 109;
107
                if (harmonize == 1)
108
                    dc.difficulty = 1;
109
                if (chorus == 1)
110
                    dc.difficulty = 2;
111
            }
112
            
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(220);
113
            if (harmonize > 0 || chorus > 0)
114
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(220);
115
            turns += 1;
116
            global.typer = 6;
117
            global.fc = 0;
118
            rr = choose(0, 1, 2, 3);
119
            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)))
120
            {
121
                var substring = string(myself);
122
                if (rr == 0)
123
                    global.battlemsg[0] = stringsetloc(
* Organikk toots philosophically.
"* Organikk toots philosophically.", "obj_organ_enemy_slash_Step_0_gml_149_0"
);
124
                if (rr == 1)
125
                    global.battlemsg[0] = stringsetloc(
* Organikk divinates through echolocation.
"* Organikk divinates through echolocation.", "obj_organ_enemy_slash_Step_0_gml_150_0"
);
126
                if (rr == 2)
127
                    global.battlemsg[0] = stringsetloc(
* Organikk claps with one hand.
"* Organikk claps with one hand.", "obj_organ_enemy_slash_Step_0_gml_151_0"
);
128
                if (rr == 3)
129
                    global.battlemsg[0] = stringsetloc(
* Organikk considers the meaning of the stars and sky.
"* Organikk considers the meaning of the stars and sky.", "obj_organ_enemy_slash_Step_0_gml_152_0"
);
130
                if (irandom(100) < 3)
131
                    global.battlemsg[0] = stringsetloc(
* Smells like brass and satin.
"* Smells like brass and satin.", "obj_organ_enemy_slash_Step_0_gml_153_0"
);
132
            }
133
            if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 3))
134
            {
135
                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)))
136
                    global.battlemsg[0] = stringsetloc(
* Organikk extolls the virtues of having low HP.
"* Organikk extolls the virtues of having low HP.", "obj_organ_enemy_slash_Step_0_gml_158_0"
);
137
            }
138
            if (global.mercymod[myself] >= 100)
139
            {
140
                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)))
141
                    global.battlemsg[0] = stringsetloc(
* Organikk extolls the virtues of mercy.
"* Organikk extolls the virtues of mercy.", "obj_organ_enemy_slash_Step_0_gml_163_0"
);
142
            }
143
            if (global.monsterstatus[myself] == 1)
144
            {
145
                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)))
146
                    global.battlemsg[0] = stringsetloc(
* Organikk extolls the virtues of naptime.
"* Organikk extolls the virtues of naptime.", "obj_organ_enemy_slash_Step_0_gml_168_0"
);
147
            }
148
            attacked = 1;
149
        }
150
    }
151
    if (global.mnfight == 2 && global.turntimer > 1 && (harmonize == 1 || chorus == 1))
152
    {
153
    }
154
    if (global.mnfight == 2 && global.turntimer < 1)
155
    {
156
        
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");
157
        if (mercygained > 0 && (harmonize == 1 || chorus == 1))
158
        {
159
            with (obj_organ_enemy)
160
            {
161
                if (chorus == 0 && harmonize == 0)
162
                {
163
                    if (mercygained > 50)
164
                        mercygained = 50;
165
                    if (other.chorus == 1 && global.monsterstatus[myself] != 1)
166
                        
scr_monster_make_tired
scr_monster_make_tired

function
scr_monster_make_tired(arg0)
{ if (global.monsterstatus[arg0] == 0) { __tiredwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] - (global.hittarget[arg0] * 20)) + 20, obj_dmgwriter); __tiredwriter.type = 13; global.hittarget[arg0] += 1; snd_play_x(snd_spellcast, 0.5, 0.9); } global.monstercomment[arg0] = stringsetloc(
(Tired)
"(Tired)", "scr_monster_make_tired_slash_scr_monster_make_tired_gml_1_0"
);
global.monsterstatus[arg0] = 1; }
(myself);
167
                }
168
                global.mercymod[myself] += mercygained;
169
                if (global.mercymod[myself] < 0)
170
                    global.mercymod[myself] = 0;
171
                if (global.mercymod[myself] >= 100)
172
                    global.mercymod[myself] = 100;
173
            }
174
            with (obj_halo_enemy)
175
            {
176
                if (global.monsterstatus[myself] != 1)
177
                    
scr_monster_make_tired
scr_monster_make_tired

function
scr_monster_make_tired(arg0)
{ if (global.monsterstatus[arg0] == 0) { __tiredwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] - (global.hittarget[arg0] * 20)) + 20, obj_dmgwriter); __tiredwriter.type = 13; global.hittarget[arg0] += 1; snd_play_x(snd_spellcast, 0.5, 0.9); } global.monstercomment[arg0] = stringsetloc(
(Tired)
"(Tired)", "scr_monster_make_tired_slash_scr_monster_make_tired_gml_1_0"
);
global.monsterstatus[arg0] = 1; }
(myself);
178
                if (mercygained > 50)
179
                    mercygained = 50;
180
                global.mercymod[myself] += mercygained;
181
                if (global.mercymod[myself] < 0)
182
                    global.mercymod[myself] = 0;
183
                if (global.mercymod[myself] >= 100)
184
                    global.mercymod[myself] = 100;
185
            }
186
            with (obj_bell_enemy)
187
            {
188
                if (other.chorus == 1 && global.monsterstatus[myself] != 1)
189
                    
scr_monster_make_tired
scr_monster_make_tired

function
scr_monster_make_tired(arg0)
{ if (global.monsterstatus[arg0] == 0) { __tiredwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] - (global.hittarget[arg0] * 20)) + 20, obj_dmgwriter); __tiredwriter.type = 13; global.hittarget[arg0] += 1; snd_play_x(snd_spellcast, 0.5, 0.9); } global.monstercomment[arg0] = stringsetloc(
(Tired)
"(Tired)", "scr_monster_make_tired_slash_scr_monster_make_tired_gml_1_0"
);
global.monsterstatus[arg0] = 1; }
(myself);
190
                if (mercygained > 50)
191
                    mercygained = 50;
192
                global.mercymod[myself] += mercygained;
193
                if (global.mercymod[myself] < 0)
194
                    global.mercymod[myself] = 0;
195
                if (global.mercymod[myself] >= 100)
196
                    global.mercymod[myself] = 100;
197
            }
198
        }
199
        mercygained = 0;
200
        harmonize = 0;
201
        chorus = 0;
202
    }
203
}
204
if (global.myfight == 3)
205
{
206
    xx = __view_get(e__VW.XView, 0);
207
    yy = __view_get(e__VW.YView, 0);
208
    if (acting == 1 && actcon == 0)
209
    {
210
        actcon = 1;
211
        msgsetloc(0, 
* Organikk - A philosopher. Why he's fighting you is one of life's questions.Wait for inputClose Message
"* Organikk - A philosopher. Why he's fighting you is one of life's questions./%", "obj_organ_enemy_slash_Step_0_gml_241_0"
);
212
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
213
    }
214
    if (acting == 2 && actcon == 0)
215
    {
216
        performtimer++;
217
        if (performtimer == 1)
218
        {
219
            if (wicabell_tuning == false)
220
            {
221
                msgsetloc(0, 
* You performed a tune! It was mildly effective!Wait for inputClose Message
"* You performed a tune! It was mildly effective!/%", "obj_organ_enemy_slash_Step_0_gml_252_0"
);
222
                
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, 35);
223
                snd_play(snd_act_perform);
224
            }
225
            else
226
            {
227
                msgsetloc(0, 
* You performed a tune! It was super effective!Wait for inputClose Message
"* You performed a tune! It was super effective!/%", "obj_organ_enemy_slash_Step_0_gml_258_0"
);
228
                
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, 100);
229
                snd_play(snd_act_perform_better);
230
            }
231
            
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
232
            
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_act, 1, false);
233
        }
234
        if (performtimer == 3)
235
        {
236
            repeat (6)
237
                instance_create_depth(obj_herokris.x + 40, obj_herokris.y + 20 + irandom(40), obj_herokris.depth + 1, obj_dazzle_particle);
238
        }
239
        if (performtimer == 9)
240
        {
241
            
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");
242
            performtimer = 0;
243
            actcon = 1;
244
        }
245
    }
246
    if ((acting == 3 || acting == 4) && actcon == 0)
247
    {
248
        msgsetloc(0, 
* You tried to harmonize!
* Touch the GREEN!Wait for inputClose Message
"* You tried to harmonize!&* Touch the GREEN!/%", "obj_organ_enemy_slash_Step_0_gml_282_0"
);
249
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
250
        harmonize = 1;
251
        actcon = 1;
252
    }
253
    if (acting == 5 && actcon == 0)
254
    {
255
        msgsetloc(0, 
* You and Ralsei attempted to harmonize!Wait for inputClose Message
"* You and Ralsei attempted to harmonize!/%", "obj_organ_enemy_slash_Step_0_gml_292_0"
);
256
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
257
        
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_sing, 1, true);
258
        chorus = 1;
259
        actcon = 1;
260
    }
261
    if (actingsus == 1 && actconsus == 1)
262
    {
263
        msgsetloc(0, 
* Susie played random notes!Wait for inputClose Message
"* Susie played random notes!/%", "obj_organ_enemy_slash_Step_0_gml_304_0"
);
264
        
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, 20);
265
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
266
        organsoundcon = 1;
267
        actingsus = 0;
268
        actconsus = 0;
269
    }
270
    if (actingral == 1 && actconral == 1)
271
    {
272
        msgsetloc(0, 
* Ralsei sang sweetly!Wait for inputClose Message
"* Ralsei sang sweetly!/%", "obj_organ_enemy_slash_Step_0_gml_319_0"
);
273
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
274
        
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_sing, 1, 1);
275
        snd_pause(global.batmusic[1]);
276
        if (lullabied == 0)
277
        {
278
            singy = snd_play(snd_ralseising1);
279
            with (object_index)
280
                lullabied = 1;
281
        }
282
        else
283
        {
284
            singy = snd_play(snd_ralseising2);
285
            with (object_index)
286
                lullabied = 0;
287
        }
288
        actcon = 10;
289
        actingral = 0;
290
        actconral = 0;
291
    }
292
    if (actcon == 10)
293
    {
294
        lullatimer += 1;
295
        if (lullatimer >= 30)
296
            actcon = 11;
297
    }
298
    if (actcon == 11 && instance_exists(obj_writer) == false)
299
    {
300
        
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");
301
        snd_stop(singy);
302
        snd_resume(global.batmusic[1]);
303
        
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);
304
        actcon = 1;
305
    }
306
    if (actcon == 20 || actconsus == 20 || actconral == 20)
307
    {
308
        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; }
())
309
        {
310
            actconsus = -1;
311
            actconral = -1;
312
            actcon = 1;
313
        }
314
    }
315
    if (actcon == 1 && !instance_exists(obj_writer))
316
    {
317
        
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");
318
        
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();
} }
();
319
    }
320
}
321
if (organsoundcon == 1)
322
{
323
    organsoundtimer++;
324
    if (organsoundtimer == 1 || organsoundtimer == 8 || organsoundtimer == 15)
325
    {
326
        snd_stop(snd_organ_mi);
327
        snd_stop(snd_organ_re);
328
        snd_stop(snd_organ_so);
329
        snd_stop(snd_organ_ti);
330
        snd_stop(snd_organ_do);
331
        snd_stop(snd_organ_do_a);
332
        snd_stop(snd_organ_fa);
333
        snd_stop(snd_organ_la);
334
        var _rand = irandom(7);
335
        if (_rand == 0)
336
            snd_play(snd_organ_mi);
337
        if (_rand == 1)
338
            snd_play(snd_organ_re);
339
        if (_rand == 2)
340
            snd_play(snd_organ_so);
341
        if (_rand == 3)
342
            snd_play(snd_organ_ti);
343
        if (_rand == 4)
344
            snd_play(snd_organ_do);
345
        if (_rand == 5)
346
            snd_play(snd_organ_do_a);
347
        if (_rand == 6)
348
            snd_play(snd_organ_fa);
349
        if (_rand == 7)
350
            snd_play(snd_organ_la);
351
    }
352
    if (organsoundtimer == 16)
353
    {
354
        organsoundtimer = 0;
355
        organsoundcon = 0;
356
        con = 0;
357
        actcon = 1;
358
        actconsus = 0;
359
    }
360
}
361
if (state == 3)
362
{
363
    
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);
364
    
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; } } }
();
365
}
366
367
enum e__VW
368
{
369
    XView,
370
    YView,
371
    WView,
372
    HView,
373
    Angle,
374
    HBorder,
375
    VBorder,
376
    HSpeed,
377
    VSpeed,
378
    Object,
379
    Visible,
380
    XPort,
381
    YPort,
382
    WPort,
383
    HPort,
384
    Camera,
385
    SurfaceID
386
}