Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_battlecontroller_Step_0

(view raw script w/o annotations or w/e)
1
if (global.chapter == 2)
2
{
3
    if (gigaqueencon != 0)
4
        exit;
5
    if ((instance_exists(o_boxingcontroller) && o_boxingcontroller.dead == 1 && global.turntimer < 0) || instance_exists(obj_boxing_loss_controller) || instance_exists(o_bq_whitefade_persistent))
6
        exit;
7
}
8
if (global.chapter == 2 && instance_exists(obj_queen_enemy) && obj_queen_enemy.intro > 0)
9
    exit;
10
if (victory == 1 && victoried == 0)
11
{
12
    global.faceaction[0] = 0;
13
    global.faceaction[1] = 0;
14
    global.faceaction[2] = 0;
15
    global.battleend = 1;
16
    global.mnfight = -1;
17
    global.myfight = 7;
18
    with (battlewriter)
19
        instance_destroy();
20
    with (obj_face)
21
        instance_destroy();
22
    with (obj_smallface)
23
        instance_destroy();
24
    for (i = 0; i < 5; i += 1)
25
    {
26
        if (global.hp[i] < 1)
27
            global.hp[i] = round(global.maxhp[i] / 8);
28
    }
29
    lastbattlewriter = 32482473284732;
30
    if (skipvictory == 0)
31
    {
32
        global.monstergold[3] += floor(global.tension / 10) * global.chapter;
33
        if (global.charweapon[1] == 8)
34
            global.monstergold[3] += floor(global.monstergold[3] / 20);
35
        global.monstergold[3] *= 1 + (scr_armorcheck_equipped_party
scr_armorcheck_equipped_party

function scr_armorcheck_equipped_party(arg0) { var __totalwearing = 0; for (var __weari = 0; __weari < 3; __weari++) { if (global.char[__weari] != 0) __totalwearing += scr_armorcheck_equipped(global.char[__weari], arg0); } return __totalwearing; }
(8) * 0.05);
36
        global.monstergold[3] *= 1 + (scr_armorcheck_equipped_party
scr_armorcheck_equipped_party

function scr_armorcheck_equipped_party(arg0) { var __totalwearing = 0; for (var __weari = 0; __weari < 3; __weari++) { if (global.char[__weari] != 0) __totalwearing += scr_armorcheck_equipped(global.char[__weari], arg0); } return __totalwearing; }
(21) * 0.3);
37
        global.monstergold[3] = floor(global.monstergold[3]);
38
        if (global.flag[37 dojo_active] == 1)
39
            global.monstergold[3] = 0;
40
        global.gold += global.monstergold[3];
41
        global.xp += global.monsterexp[3];
42
        if (global.gold < 0)
43
            global.gold = 0;
44
        global.fc = 0;
45
        global.fe = 0;
46
        global.battlemsg[0] = stringsetsubloc("* You won^1!&* Got ~1 EXP and ~2 D$./%", string(global.monsterexp[3]), string(global.monstergold[3]), "obj_battlecontroller_slash_Step_0_gml_42_0");
47
        if (global.flag[37 dojo_active] == 1)
48
            global.battlemsg[0] = stringsetloc(
* You won the battle!Wait for inputClose Message
"* You won the battle!/%", "obj_battlecontroller_slash_Step_0_gml_43_0"
);
49
        if (global.flag[63 violenced_last] == 1)
50
        {
51
            global.battlemsg[0] = stringsetsubloc("* You won^1!&* Got ~1 D$^1.&* You became stronger./%", string(global.monstergold[3]), "obj_battlecontroller_slash_Step_0_gml_46_0");
52
            if (scr_havechar
scr_havechar

function scr_havechar(arg0) { var checker = arg0; if (checker == "susie" || checker == "su" || checker == "s") checker = 2; if (checker == "ralsei" || checker == "ra" || checker == "r") checker = 3; if (checker == "noelle" || checker == "no" || checker == "n") checker = 4; _rreturn = 0; if (global.char[0] == checker) _rreturn = 1; if (global.char[1] == checker) _rreturn = 1; if (global.char[2] == checker) _rreturn = 1; return _rreturn; }
(4))
53
                global.battlemsg[0] = stringsetsubloc("* You won^1!&* Got ~1 D$^1.&* Noelle became stronger./%", string(global.monstergold[3]), "obj_battlecontroller_slash_Step_0_gml_69_0");
54
            var lvsnd = snd_play_pitch(snd_dtrans_lw, 2);
55
            snd_volume(lvsnd, 0.7, 0);
56
            scr_levelup
scr_levelup

function scr_levelup() { global.flag[65 times_leveled]++; global.maxhp[1] += 2; global.maxhp[2] += 2; global.maxhp[3] += 2; global.hp[1] += 2; global.hp[2] += 2; global.hp[3] += 2; if ((global.flag[65 times_leveled] % 2) == 0) global.maxhp[2] += 1; if ((global.flag[65 times_leveled] % 10) == 0) { global.at[1] += 1; global.at[2] += 1; global.mag[2] += 1; global.at[3] += 1; global.mag[3] += 1; global.flag[66 times_gained_at]++; } if (scr_havechar(4)) { global.flag[919 times_noelle_leveled]++; global.maxhp[4] += 4; global.hp[4] += 4; if ((global.flag[65 times_leveled] % 4) == 0) { global.at[4] += 1; global.mag[4] += 1; } } global.maxhp[1] = clamp(global.maxhp[1], 10, 160); global.maxhp[2] = clamp(global.maxhp[2], 10, 190); global.maxhp[3] = clamp(global.maxhp[3], 10, 140); global.maxhp[4] = clamp(global.maxhp[4], 10, 999); for (var _i = 1; _i < 5; _i++) global.hp[_i] = min(global.hp[_i], global.maxhp[_i]); with (obj_event_manager) trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_19); } enum UnknownEnum { Value_0, Value_19 = 19 }
();
57
        }
58
        global.msg[0] = global.battlemsg[0];
59
        global.typer = global.battletyper;
60
        lastbattlewriter = scr_battletext
scr_battletext

function scr_battletext() { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
61
        if (global.flag[38 no_battle_end_msg] == 1)
62
        {
63
            with (lastbattlewriter)
64
                instance_destroy();
65
        }
66
        for (i = 0; i < 3; i += 1)
67
        {
68
            with (global.charinstance[i])
69
            {
70
                state = 7;
71
                hurt = 0;
72
                hurttimer = 0;
73
            }
74
        }
75
    }
76
    victoried = 1;
77
    victortimer = 0;
78
    if (skipvictory == 1)
79
        victortimer = -20;
80
    with (obj_tensionbar)
81
    {
82
alarm[5]
83
        hspeed = -10;
84
        friction = -0.4;
85
    }
86
}
87
if (victoried == 1)
88
{
89
    victortimer += 1;
90
    if (i_ex(lastbattlewriter) == false && victortimer >= 10)
91
    {
92
        intro = 2;
93
        if (bp <= 0)
94
            scr_endcombat
scr_endcombat

function scr_endcombat() { global.fighting = 0; if (global.specialbattle == 0 || global.specialbattle == 2 || global.specialbattle == 3) { if (global.specialbattle == 2) { with (obj_mainchara) { cutscene = 1; x = global.charinstance[0].x; y = global.charinstance[0].y; } with (global.cinstance[0]) { x = global.charinstance[1].x; y = global.charinstance[1].y; } with (global.cinstance[1]) { x = global.charinstance[2].x; y = global.charinstance[2].y; } with (obj_caterpillarchara) scr_caterpillar_interpolate(); scr_pan_to_obj(obj_mainchara, 30); with (obj_mainchara) visible = 1; with (obj_caterpillarchara) visible = 1; } instance_create(0, 0, obj_endbattle); with (obj_monsterparent) instance_destroy(); with (obj_bulletparent) instance_destroy(); with (obj_heroparent) instance_destroy(); global.charinstance[0] = obj_mainchara; global.charinstance[1] = global.cinstance[0]; global.charinstance[2] = global.cinstance[1]; instance_destroy(); } }
();
95
    }
96
}
97
if (global.myfight == 0)
98
{
99
    if (global.bmenuno == 0)
100
    {
101
        if (!i_ex(battlewriter) || (global.chapter == 2 && !i_ex(battlewriter) && gigaqueencon == 0))
102
        {
103
            global.msg[0] = global.battlemsg[0];
104
            global.typer = global.battletyper;
105
            scr_battletext
scr_battletext

function scr_battletext() { xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
106
        }
107
        if (left_p() == 1 && lbuffer < 0)
108
        {
109
            if (global.bmenucoord[0][global.charturn] == 0)
110
                global.bmenucoord[0][global.charturn] = 4;
111
            else
112
                global.bmenucoord[0][global.charturn] -= 1;
113
            movenoise = 1;
114
            rbuffer = 1;
115
        }
116
        if (right_p() == 1 && rbuffer < 0)
117
        {
118
            if (global.bmenucoord[0][global.charturn] == 4)
119
                global.bmenucoord[0][global.charturn] = 0;
120
            else
121
                global.bmenucoord[0][global.charturn] += 1;
122
            movenoise = 1;
123
            lbuffer = 1;
124
        }
125
        if (button1_p() == 1 && twobuffer < 0)
126
        {
127
            onebuffer = 1;
128
            selnoise = 1;
129
            if (global.bmenucoord[0][global.charturn] == 0)
130
                global.bmenuno = 1;
131
            if (global.bmenucoord[0][global.charturn] == 1 && global.char[global.charturn] != 1)
132
            {
133
                onebuffer = 1;
134
                global.bmenuno = 2;
135
            }
136
            else if (global.bmenucoord[0][global.charturn] == 1)
137
            {
138
                onebuffer = 1;
139
                global.bmenuno = 11;
140
            }
141
            if (global.bmenucoord[0][global.charturn] == 2 && tempitem[0][global.charturn] != 0)
142
            {
143
                onebuffer = 1;
144
                global.bmenuno = 4;
145
                scr_iteminfo_temp
scr_iteminfo_temp

function scr_iteminfo_temp(arg0) { for (i = 0; i < 12; i += 1) { itemid = tempitem[i][arg0]; scr_iteminfo(itemid); tempitemnameb[i][arg0] = itemnameb; tempitemdescb[i][arg0] = itemdescb; tempitemvalue[i][arg0] = value; tempitemusable[i][arg0] = usable; } }
(global.charturn);
146
                for (i = 0; i < 12; i += 1)
147
                {
148
                    if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0 && global.bmenucoord[4][global.charturn] > 0)
149
                        global.bmenucoord[4][global.charturn] -= 1;
150
                }
151
            }
152
            if (global.bmenucoord[0][global.charturn] == 3)
153
            {
154
                onebuffer = 1;
155
                global.bmenuno = 12;
156
            }
157
            if (global.bmenucoord[0][global.charturn] == 4)
158
            {
159
                scr_tensionheal
scr_tensionheal

function scr_tensionheal(arg0) { global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(40);
160
                global.faceaction[global.charturn] = 4;
161
                global.charaction[global.charturn] = 10;
162
                scr_nexthero
scr_nexthero

function scr_nexthero() { moveswapped = 0; prevturn = global.charturn; if (global.charturn == 0) { moveswapped = 1; if (global.charmove[1] == 1 && scr_charcan(1)) global.charturn = 1; else if (global.charmove[2] == 1 && scr_charcan(2)) global.charturn = 2; else scr_endturn(); } if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (scr_charcan(2) && global.acting[1] == 0) global.charturn = 2; else scr_endturn(); } if (global.charturn == 2 && moveswapped == 0) scr_endturn(); if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } }
();
163
                if (global.chapter == 2 && instance_exists(o_boxingcontroller))
164
                {
165
                    o_boxingcontroller.defend = 1;
166
                    o_boxingcontroller.specialcon = 8;
167
                }
168
            }
169
        }
170
        if (button2_p() == 1 && onebuffer < 0 && global.charturn > 0)
171
        {
172
            twobuffer = 1;
173
            movenoise = 1;
174
            scr_prevhero
scr_prevhero

function scr_prevhero() { prevturn = global.charturn; moveswapped = 0; if (global.charturn == 1) { if (global.charmove[0] == 1) { global.charturn = 0; moveswapped = 1; } } if (global.charturn == 2) { moveswapped = 1; if (global.charmove[1] == 1 && global.acting[1] == 0) global.charturn = 1; else if (global.charmove[0] == 1) global.charturn = 0; } if (moveswapped == 1) { global.bmenuno = 0; if (global.char[global.charturn] == 4) { with (obj_monsterparent) actingnoe = 0; } if (global.char[global.charturn] == 3) { with (obj_monsterparent) actingral = 0; } if (global.char[global.charturn] == 2) { with (obj_monsterparent) actingsus = 0; } global.actingsingle[global.charturn] = 0; global.actingsimul[global.charturn] = 0; global.faceaction[global.charturn] = 0; global.chartarget[global.charturn] = 0; global.charaction[global.charturn] = 0; global.charspecial[global.charturn] = 0; movenoise = 1; } if (global.charturn == 0) { with (obj_monsterparent) acting = 0; global.acting[0] = 0; global.acting[1] = 0; global.acting[2] = 0; global.faceaction[1] = 0; global.chartarget[1] = 0; global.charaction[1] = 0; global.charspecial[1] = 0; global.faceaction[2] = 0; global.tension = global.temptension[0]; for (i = 0; i < 12; i += 1) tempitem[i][0] = global.item[i]; } else { global.tension = global.temptension[global.charturn]; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][global.charturn - 1]; } }
();
175
        }
176
        with (battlewriter)
177
            depth = 3;
178
        with (obj_face_parent)
179
            depth = 3;
180
        with (obj_smallface)
181
            depth = 3;
182
    }
183
    if (global.bmenuno == 2 && global.flag[34 disable_monster_acts] == 1)
184
    {
185
        with (battlewriter)
186
            skipme = 1;
187
        with (battlewriter)
188
            depth = 10;
189
        with (obj_face_parent)
190
            depth = 10;
191
        with (obj_smallface)
192
            depth = 10;
193
        thischar = global.char[global.charturn];
194
        if (right_p() || left_p())
195
        {
196
            cango = 1;
197
            spellcoord = global.bmenucoord[2][global.charturn];
198
            if (spellcoord < 11)
199
            {
200
                if (global.spell[thischar][global.bmenucoord[2][global.charturn] + 1] == 0)
201
                {
202
                    cango = 0;
203
                    if ((spellcoord % 2) == 1 && spellcoord > 0)
204
                        global.bmenucoord[2][global.charturn] -= 1;
205
                }
206
            }
207
            else
208
            {
209
                global.bmenucoord[2][global.charturn] -= 1;
210
                cango = 0;
211
            }
212
            if (cango == 1)
213
            {
214
                if ((spellcoord % 2) == 0)
215
                    global.bmenucoord[2][global.charturn] += 1;
216
                else
217
                    global.bmenucoord[2][global.charturn] -= 1;
218
            }
219
        }
220
        if (down_p())
221
        {
222
            spellcoord = global.bmenucoord[2][global.charturn];
223
            cango = 1;
224
            if (spellcoord >= 10)
225
            {
226
                cango = 0;
227
            }
228
            else
229
            {
230
                if (global.spell[thischar][spellcoord + 2] == 0)
231
                    cango = 0;
232
                if (spellcoord == 5 && global.spell[thischar][6] != 0 && global.spell[thischar][7] == 0)
233
                    cango = 2;
234
            }
235
            if (cango != 0)
236
            {
237
                if (cango == 1)
238
                    global.bmenucoord[2][global.charturn] += 2;
239
                if (cango == 2)
240
                    global.bmenucoord[2][global.charturn] = 6;
241
            }
242
        }
243
        if (up_p())
244
        {
245
            spellcoord = global.bmenucoord[2][global.charturn];
246
            cango = 1;
247
            if (spellcoord <= 1)
248
                cango = 0;
249
            if (cango == 1)
250
                global.bmenucoord[2][global.charturn] -= 2;
251
        }
252
        global.tensionselect = global.spellcost[thischar][global.bmenucoord[2][global.charturn]];
253
        if (button1_p() && global.spell[thischar][global.bmenucoord[2][global.charturn]] != 0 && onebuffer < 0)
254
        {
255
            if (global.spellcost[thischar][global.bmenucoord[2][global.charturn]] <= global.tension)
256
            {
257
                onebuffer = 2;
258
                global.bmenuno = 0;
259
                selnoise = 1;
260
                scr_spellinfo
scr_spellinfo

function scr_spellinfo(arg0) { cost = -1; spelltarget = 1; spellname = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_3_0"
); spellnameb = " "; spelldescb = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_5_0"
); spelldesc = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_6_0"
); spellanim = 0; spellusable = 0; spelltext = " "; switch (arg0) { case 0: spellname = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_14_0"
); spellnameb = " "; spelltarget = 0; cost = -1; spelldescb = stringsetloc(
None
"None", "scr_spellinfo_slash_scr_spellinfo_gml_18_0"
); break; case 1: spellname = stringsetloc(
Rude Sword
"Rude Sword", "scr_spellinfo_slash_scr_spellinfo_gml_21_0"
); spellnameb = stringsetloc(
RudeSword
"RudeSword", "scr_spellinfo_slash_scr_spellinfo_gml_22_0"
); spelldescb = stringsetloc(
Rude#Damage#
"Rude#Damage#", "scr_spellinfo_slash_scr_spellinfo_gml_23_0"
); spelldesc = stringsetloc(
Deals moderate Rude-elemental damage to#one foe. Depends on Attack
Magic.
"Deals moderate Rude-elemental damage to#one foe. Depends on Attack & Magic.", "scr_spellinfo_slash_scr_spellinfo_gml_24_0"
); spelltarget = 2; cost = 125; spellusable = 0; break; case 2: spellname = stringsetloc(
Heal Prayer
"Heal Prayer", "scr_spellinfo_slash_scr_spellinfo_gml_31_0"
); spellnameb = stringsetloc(
Heal Prayer
"Heal Prayer", "scr_spellinfo_slash_scr_spellinfo_gml_32_0"
); spelldescb = stringsetloc(
Heal#Ally
"Heal#Ally", "scr_spellinfo_slash_scr_spellinfo_gml_33_0"
); spelldesc = stringsetloc(
Heavenly light restores a little HP to#one party member. Depends on Magic.
"Heavenly light restores a little HP to#one party member. Depends on Magic.", "scr_spellinfo_slash_scr_spellinfo_gml_34_0"
); spelltarget = 1; cost = 80; usable = 0; spellusable = 0; break; case 3: spellname = stringsetloc(
Pacify
"Pacify", "scr_spellinfo_slash_scr_spellinfo_gml_42_0"
); spellnameb = stringsetloc(
Pacify
"Pacify", "scr_spellinfo_slash_scr_spellinfo_gml_43_0"
); spelldescb = stringsetloc(
Spare#TIRED foe
"Spare#TIRED foe", "scr_spellinfo_slash_scr_spellinfo_gml_44_0"
); spelldesc = stringsetloc(
SPARE a tired enemy by putting them to sleep.
"SPARE a tired enemy by putting them to sleep.", "scr_spellinfo_slash_scr_spellinfo_gml_45_0"
); spelltarget = 2; cost = 40; usable = 0; spellusable = 0; break; case 4: spellname = stringsetloc(
Rude Buster
"Rude Buster", "scr_spellinfo_slash_scr_spellinfo_gml_52_0"
); spellnameb = stringsetloc(
Rude Buster
"Rude Buster", "scr_spellinfo_slash_scr_spellinfo_gml_53_0"
); spelldescb = stringsetloc(
Rude#Damage#
"Rude#Damage#", "scr_spellinfo_slash_scr_spellinfo_gml_54_0"
); spelldesc = stringsetloc(
Deals moderate Rude-elemental damage to#one foe. Depends on Attack
Magic.
"Deals moderate Rude-elemental damage to#one foe. Depends on Attack & Magic.", "scr_spellinfo_slash_scr_spellinfo_gml_55_0"
); spelltarget = 2; cost = 125; if (global.charweapon[2] == 7) cost = 100; spellusable = 0; break; case 5: spellname = stringsetloc(
Red Buster
"Red Buster", "scr_spellinfo_slash_scr_spellinfo_gml_64_0"
); spellnameb = stringsetloc(
Red Buster
"Red Buster", "scr_spellinfo_slash_scr_spellinfo_gml_65_0"
); spelldescb = stringsetloc(
Red#Damage#
"Red#Damage#", "scr_spellinfo_slash_scr_spellinfo_gml_66_0"
); spelldesc = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_67_0"
); spelltarget = 2; cost = 0; spellusable = 0; break; case 6: spellname = stringsetloc(
Dual Heal
"Dual Heal", "scr_spellinfo_slash_scr_spellinfo_gml_75_0"
); spellnameb = stringsetloc(
Dual Heal
"Dual Heal", "scr_spellinfo_slash_scr_spellinfo_gml_76_0"
); spelldescb = stringsetloc(
Heal All#30 HP
"Heal All#30 HP", "scr_spellinfo_slash_scr_spellinfo_gml_77_0"
); spelldesc = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_78_0"
); spelltarget = 0; cost = 0; spellusable = 0; break; case 7: spellname = stringsetloc(
ACT
"ACT", "scr_spellinfo_slash_scr_spellinfo_gml_86_0"
); spellnameb = stringsetloc(
ACT
"ACT", "scr_spellinfo_slash_scr_spellinfo_gml_87_0"
); spelldescb = stringsetloc(
Use#action
"Use#action", "scr_spellinfo_slash_scr_spellinfo_gml_88_0"
); spelldesc = stringsetloc(
Do all sorts of things.#It isn't magic.
"Do all sorts of things.#It isn't magic.", "scr_spellinfo_slash_scr_spellinfo_gml_89_0"
); if (global.chapter == 2) spelldesc = stringsetloc(
You can do many things.#Don't confuse it with magic.
"You can do many things.#Don't confuse it with magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0"
); spelltarget = 0; cost = 0; spellusable = 0; break; case 8: spellname = stringsetloc(
SleepMist
"SleepMist", "scr_spellinfo_slash_scr_spellinfo_gml_96_0"
); spellnameb = stringsetloc(
Sleep Mist
"Sleep Mist", "scr_spellinfo_slash_scr_spellinfo_gml_97_0"
); spelldescb = stringsetloc(
Spare#TIRED foes
"Spare#TIRED foes", "scr_spellinfo_slash_scr_spellinfo_gml_98_0"
); spelldesc = stringsetloc(
A cold mist sweeps through,#sparing all TIRED enemies.
"A cold mist sweeps through,#sparing all TIRED enemies.", "scr_spellinfo_slash_scr_spellinfo_gml_99_0"
); spelltarget = 0; cost = 80; spellusable = 0; break; case 9: spellname = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_107_0"
); spellnameb = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_108_0"
); ...
(global.spell[thischar][global.bmenucoord[2][global.charturn]]);
261
                if (spelltarget == 0)
262
                    scr_spellconsumeb
scr_spellconsumeb

function scr_spellconsumeb() { global.tension -= cost; global.faceaction[global.charturn] = 2; global.charaction[global.charturn] = 2; if (global.flag[34 disable_monster_acts] == 1) global.charspecial[global.charturn] = global.spell[global.char[global.charturn]][global.bmenucoord[2][global.charturn]]; if (global.flag[34 disable_monster_acts] == 0) global.charspecial[global.charturn] = global.battlespell[global.charturn][global.bmenucoord[2][global.charturn]]; global.tensionselect = 0; if (spellanim == 1) { with (global.charinstance[global.charturn]) { spellframes = 0; spellsprite = spellreadysprite; } } else { with (global.charinstance[global.charturn]) { spellframes = remspellframes; spellsprite = remspellsprite; } } scr_nexthero(); }
();
263
                if (spelltarget == 1)
264
                    global.bmenuno = 8;
265
                if (spelltarget == 2)
266
                    global.bmenuno = 3;
267
            }
268
        }
269
        if (button2_p() && onebuffer < 0)
270
        {
271
            global.tensionselect = 0;
272
            twobuffer = 1;
273
            global.bmenuno = 0;
274
            movenoise = 1;
275
        }
276
    }
277
    if (global.bmenuno == 2 && global.flag[34 disable_monster_acts] == 0)
278
    {
279
        with (battlewriter)
280
            skipme = 1;
281
        with (battlewriter)
282
            depth = 10;
283
        with (obj_face_parent)
284
            depth = 10;
285
        with (obj_smallface)
286
            depth = 10;
287
        thischar = global.charturn;
288
        if (right_p() || left_p())
289
        {
290
            cango = 1;
291
            spellcoord = global.bmenucoord[2][global.charturn];
292
            if (spellcoord < 11)
293
            {
294
                if (global.battlespell[thischar][global.bmenucoord[2][global.charturn] + 1] == 0)
295
                {
296
                    cango = 0;
297
                    if ((spellcoord % 2) == 1 && spellcoord > 0)
298
                        global.bmenucoord[2][global.charturn] -= 1;
299
                }
300
            }
301
            else
302
            {
303
                global.bmenucoord[2][global.charturn] -= 1;
304
                cango = 0;
305
            }
306
            if (cango == 1)
307
            {
308
                if ((spellcoord % 2) == 0)
309
                    global.bmenucoord[2][global.charturn] += 1;
310
                else
311
                    global.bmenucoord[2][global.charturn] -= 1;
312
            }
313
        }
314
        if (down_p())
315
        {
316
            spellcoord = global.bmenucoord[2][global.charturn];
317
            cango = 1;
318
            if (spellcoord >= 10)
319
            {
320
                cango = 0;
321
            }
322
            else
323
            {
324
                if (global.battlespell[thischar][spellcoord + 2] == 0)
325
                    cango = 0;
326
                if (spellcoord == 5 && global.battlespell[thischar][6] != 0 && global.battlespell[thischar][7] == 0)
327
                    cango = 2;
328
            }
329
            if (cango != 0)
330
            {
331
                if (cango == 1)
332
                    global.bmenucoord[2][global.charturn] += 2;
333
                if (cango == 2)
334
                    global.bmenucoord[2][global.charturn] = 6;
335
            }
336
        }
337
        if (up_p())
338
        {
339
            spellcoord = global.bmenucoord[2][global.charturn];
340
            cango = 1;
341
            if (spellcoord <= 1)
342
                cango = 0;
343
            if (cango == 1)
344
                global.bmenucoord[2][global.charturn] -= 2;
345
        }
346
        global.tensionselect = global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]];
347
        if (button1_p() && global.battlespell[thischar][global.bmenucoord[2][global.charturn]] != 0 && onebuffer < 0)
348
        {
349
            if (global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]] <= global.tension)
350
            {
351
                onebuffer = 2;
352
                global.bmenuno = 0;
353
                selnoise = 1;
354
                if (global.battlespell[thischar][global.bmenucoord[2][global.charturn]] != -1)
355
                {
356
                    scr_spellinfo
scr_spellinfo

function scr_spellinfo(arg0) { cost = -1; spelltarget = 1; spellname = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_3_0"
); spellnameb = " "; spelldescb = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_5_0"
); spelldesc = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_6_0"
); spellanim = 0; spellusable = 0; spelltext = " "; switch (arg0) { case 0: spellname = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_14_0"
); spellnameb = " "; spelltarget = 0; cost = -1; spelldescb = stringsetloc(
None
"None", "scr_spellinfo_slash_scr_spellinfo_gml_18_0"
); break; case 1: spellname = stringsetloc(
Rude Sword
"Rude Sword", "scr_spellinfo_slash_scr_spellinfo_gml_21_0"
); spellnameb = stringsetloc(
RudeSword
"RudeSword", "scr_spellinfo_slash_scr_spellinfo_gml_22_0"
); spelldescb = stringsetloc(
Rude#Damage#
"Rude#Damage#", "scr_spellinfo_slash_scr_spellinfo_gml_23_0"
); spelldesc = stringsetloc(
Deals moderate Rude-elemental damage to#one foe. Depends on Attack
Magic.
"Deals moderate Rude-elemental damage to#one foe. Depends on Attack & Magic.", "scr_spellinfo_slash_scr_spellinfo_gml_24_0"
); spelltarget = 2; cost = 125; spellusable = 0; break; case 2: spellname = stringsetloc(
Heal Prayer
"Heal Prayer", "scr_spellinfo_slash_scr_spellinfo_gml_31_0"
); spellnameb = stringsetloc(
Heal Prayer
"Heal Prayer", "scr_spellinfo_slash_scr_spellinfo_gml_32_0"
); spelldescb = stringsetloc(
Heal#Ally
"Heal#Ally", "scr_spellinfo_slash_scr_spellinfo_gml_33_0"
); spelldesc = stringsetloc(
Heavenly light restores a little HP to#one party member. Depends on Magic.
"Heavenly light restores a little HP to#one party member. Depends on Magic.", "scr_spellinfo_slash_scr_spellinfo_gml_34_0"
); spelltarget = 1; cost = 80; usable = 0; spellusable = 0; break; case 3: spellname = stringsetloc(
Pacify
"Pacify", "scr_spellinfo_slash_scr_spellinfo_gml_42_0"
); spellnameb = stringsetloc(
Pacify
"Pacify", "scr_spellinfo_slash_scr_spellinfo_gml_43_0"
); spelldescb = stringsetloc(
Spare#TIRED foe
"Spare#TIRED foe", "scr_spellinfo_slash_scr_spellinfo_gml_44_0"
); spelldesc = stringsetloc(
SPARE a tired enemy by putting them to sleep.
"SPARE a tired enemy by putting them to sleep.", "scr_spellinfo_slash_scr_spellinfo_gml_45_0"
); spelltarget = 2; cost = 40; usable = 0; spellusable = 0; break; case 4: spellname = stringsetloc(
Rude Buster
"Rude Buster", "scr_spellinfo_slash_scr_spellinfo_gml_52_0"
); spellnameb = stringsetloc(
Rude Buster
"Rude Buster", "scr_spellinfo_slash_scr_spellinfo_gml_53_0"
); spelldescb = stringsetloc(
Rude#Damage#
"Rude#Damage#", "scr_spellinfo_slash_scr_spellinfo_gml_54_0"
); spelldesc = stringsetloc(
Deals moderate Rude-elemental damage to#one foe. Depends on Attack
Magic.
"Deals moderate Rude-elemental damage to#one foe. Depends on Attack & Magic.", "scr_spellinfo_slash_scr_spellinfo_gml_55_0"
); spelltarget = 2; cost = 125; if (global.charweapon[2] == 7) cost = 100; spellusable = 0; break; case 5: spellname = stringsetloc(
Red Buster
"Red Buster", "scr_spellinfo_slash_scr_spellinfo_gml_64_0"
); spellnameb = stringsetloc(
Red Buster
"Red Buster", "scr_spellinfo_slash_scr_spellinfo_gml_65_0"
); spelldescb = stringsetloc(
Red#Damage#
"Red#Damage#", "scr_spellinfo_slash_scr_spellinfo_gml_66_0"
); spelldesc = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_67_0"
); spelltarget = 2; cost = 0; spellusable = 0; break; case 6: spellname = stringsetloc(
Dual Heal
"Dual Heal", "scr_spellinfo_slash_scr_spellinfo_gml_75_0"
); spellnameb = stringsetloc(
Dual Heal
"Dual Heal", "scr_spellinfo_slash_scr_spellinfo_gml_76_0"
); spelldescb = stringsetloc(
Heal All#30 HP
"Heal All#30 HP", "scr_spellinfo_slash_scr_spellinfo_gml_77_0"
); spelldesc = stringsetloc(
" ", "scr_spellinfo_slash_scr_spellinfo_gml_78_0"
); spelltarget = 0; cost = 0; spellusable = 0; break; case 7: spellname = stringsetloc(
ACT
"ACT", "scr_spellinfo_slash_scr_spellinfo_gml_86_0"
); spellnameb = stringsetloc(
ACT
"ACT", "scr_spellinfo_slash_scr_spellinfo_gml_87_0"
); spelldescb = stringsetloc(
Use#action
"Use#action", "scr_spellinfo_slash_scr_spellinfo_gml_88_0"
); spelldesc = stringsetloc(
Do all sorts of things.#It isn't magic.
"Do all sorts of things.#It isn't magic.", "scr_spellinfo_slash_scr_spellinfo_gml_89_0"
); if (global.chapter == 2) spelldesc = stringsetloc(
You can do many things.#Don't confuse it with magic.
"You can do many things.#Don't confuse it with magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0"
); spelltarget = 0; cost = 0; spellusable = 0; break; case 8: spellname = stringsetloc(
SleepMist
"SleepMist", "scr_spellinfo_slash_scr_spellinfo_gml_96_0"
); spellnameb = stringsetloc(
Sleep Mist
"Sleep Mist", "scr_spellinfo_slash_scr_spellinfo_gml_97_0"
); spelldescb = stringsetloc(
Spare#TIRED foes
"Spare#TIRED foes", "scr_spellinfo_slash_scr_spellinfo_gml_98_0"
); spelldesc = stringsetloc(
A cold mist sweeps through,#sparing all TIRED enemies.
"A cold mist sweeps through,#sparing all TIRED enemies.", "scr_spellinfo_slash_scr_spellinfo_gml_99_0"
); spelltarget = 0; cost = 80; spellusable = 0; break; case 9: spellname = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_107_0"
); spellnameb = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_108_0"
); ...
(global.battlespell[thischar][global.bmenucoord[2][global.charturn]]);
357
                    if (spelltarget == 0)
358
                        scr_spellconsumeb
scr_spellconsumeb

function scr_spellconsumeb() { global.tension -= cost; global.faceaction[global.charturn] = 2; global.charaction[global.charturn] = 2; if (global.flag[34 disable_monster_acts] == 1) global.charspecial[global.charturn] = global.spell[global.char[global.charturn]][global.bmenucoord[2][global.charturn]]; if (global.flag[34 disable_monster_acts] == 0) global.charspecial[global.charturn] = global.battlespell[global.charturn][global.bmenucoord[2][global.charturn]]; global.tensionselect = 0; if (spellanim == 1) { with (global.charinstance[global.charturn]) { spellframes = 0; spellsprite = spellreadysprite; } } else { with (global.charinstance[global.charturn]) { spellframes = remspellframes; spellsprite = remspellsprite; } } scr_nexthero(); }
();
359
                    if (spelltarget == 1)
360
                        global.bmenuno = 8;
361
                    if (spelltarget == 2)
362
                        global.bmenuno = 3;
363
                    if (spelltarget == 3)
364
                        global.bmenuno = 99;
365
                }
366
                else
367
                {
368
                    global.bmenuno = 13;
369
                }
370
            }
371
        }
372
        if (button2_p() && onebuffer < 0)
373
        {
374
            global.tensionselect = 0;
375
            twobuffer = 1;
376
            global.bmenuno = 0;
377
            movenoise = 1;
378
        }
379
    }
380
    if (global.bmenuno == 4)
381
    {
382
        with (battlewriter)
383
            skipme = 1;
384
        with (battlewriter)
385
            depth = 10;
386
        with (obj_face_parent)
387
            depth = 10;
388
        with (obj_smallface)
389
            depth = 10;
390
        if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0)
391
            global.bmenucoord[4][global.charturn] -= 1;
392
        if (right_p())
393
        {
394
            cango = 1;
395
            itemcoord = global.bmenucoord[4][global.charturn];
396
            if (itemcoord < 11)
397
            {
398
                if (tempitem[global.bmenucoord[4][global.charturn] + 1][global.charturn] == 0)
399
                {
400
                    cango = 0;
401
                    if ((itemcoord % 2) == 1 && itemcoord > 0)
402
                        global.bmenucoord[4][global.charturn] -= 1;
403
                }
404
            }
405
            else
406
            {
407
                global.bmenucoord[4][global.charturn] -= 1;
408
                cango = 0;
409
            }
410
            if (cango == 1)
411
            {
412
                if ((itemcoord % 2) == 0)
413
                    global.bmenucoord[4][global.charturn] += 1;
414
                else
415
                    global.bmenucoord[4][global.charturn] -= 1;
416
            }
417
        }
418
        if (left_p())
419
        {
420
            cango = 1;
421
            itemcoord = global.bmenucoord[4][global.charturn];
422
            if (tempitem[1][global.charturn] != 0)
423
            {
424
                if ((itemcoord % 2) == 0)
425
                    global.bmenucoord[4][global.charturn] += 1;
426
                else
427
                    global.bmenucoord[4][global.charturn] -= 1;
428
            }
429
        }
430
        if (down_p())
431
        {
432
            itemcoord = global.bmenucoord[4][global.charturn];
433
            cango = 1;
434
            if (itemcoord >= 10)
435
            {
436
                cango = 0;
437
            }
438
            else
439
            {
440
                if (tempitem[itemcoord + 2][global.charturn] == 0)
441
                    cango = 0;
442
                if (itemcoord == 5 && tempitem[6][global.charturn] != 0 && tempitem[7][global.charturn] == 0)
443
                    cango = 2;
444
            }
445
            if (cango != 0)
446
            {
447
                if (cango == 1)
448
                    global.bmenucoord[4][global.charturn] += 2;
449
                if (cango == 2)
450
                    global.bmenucoord[4][global.charturn] = 6;
451
            }
452
        }
453
        if (up_p())
454
        {
455
            itemcoord = global.bmenucoord[4][global.charturn];
456
            cango = 1;
457
            if (itemcoord <= 1)
458
                cango = 0;
459
            if (cango == 1)
460
                global.bmenucoord[4][global.charturn] -= 2;
461
        }
462
        if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0)
463
            global.bmenucoord[4][global.charturn] -= 1;
464
        if (button1_p() && tempitem[global.bmenucoord[4][global.charturn]][global.charturn] != 0 && onebuffer < 0)
465
        {
466
            onebuffer = 2;
467
            global.bmenuno = 0;
468
            selnoise = 1;
469
            scr_iteminfo
scr_iteminfo

function scr_iteminfo(arg0) { usable = 0; replaceable = 0; value = 0; itemtarget = 0; itemnameb = " "; itemdescb = " "; switch (arg0) { case 0: itemnameb = " "; itemdescb = "---"; break; case 1: itemnameb = stringsetloc(
Dark Candy
"Dark Candy", "scr_iteminfo_slash_scr_iteminfo_gml_15_0"
); itemdescb = stringsetloc(
Heals#40HP
"Heals#40HP", "scr_iteminfo_slash_scr_iteminfo_gml_16_0"
); itemtarget = 1; value = 25; usable = 1; break; case 2: itemnameb = stringsetloc(
ReviveMint
"ReviveMint", "scr_iteminfo_slash_scr_iteminfo_gml_22_0"
); itemdescb = stringsetloc(
Heal#Downed#Ally
"Heal#Downed#Ally", "scr_iteminfo_slash_scr_iteminfo_gml_23_0"
); itemtarget = 1; value = 400; usable = 1; break; case 3: itemnameb = stringsetloc(
Glowshard
"Glowshard", "scr_iteminfo_slash_scr_iteminfo_gml_29_0"
); itemdescb = stringsetloc(
Sell#at#shops
"Sell#at#shops", "scr_iteminfo_slash_scr_iteminfo_gml_30_0"
); itemtarget = 0; value = 200 + (global.chapter * 100); usable = 0; break; case 4: itemnameb = stringsetloc(
Manual
"Manual", "scr_iteminfo_slash_scr_iteminfo_gml_36_0"
); itemdescb = stringsetloc(
Read#out of#battle
"Read#out of#battle", "scr_iteminfo_slash_scr_iteminfo_gml_37_0"
); itemtarget = 2; value = 1; usable = 0; break; case 5: itemnameb = stringsetloc(
BrokenCake
"BrokenCake", "scr_iteminfo_slash_scr_iteminfo_gml_43_0"
); itemdescb = stringsetloc(
Heals#20HP
"Heals#20HP", "scr_iteminfo_slash_scr_iteminfo_gml_44_0"
); itemtarget = 1; value = 5; usable = 1; break; case 6: itemnameb = stringsetloc(
Top Cake
"Top Cake", "scr_iteminfo_slash_scr_iteminfo_gml_50_0"
); itemdescb = stringsetloc(
Heals#team#160HP
"Heals#team#160HP", "scr_iteminfo_slash_scr_iteminfo_gml_51_0"
); itemtarget = 2; value = 150; usable = 1; break; case 7: var healamount = (global.chapter == 1) ? 80 : 140; itemnameb = stringsetloc(
Spincake
"Spincake", "scr_iteminfo_slash_scr_iteminfo_gml_58_0"
); itemdescb = stringsetsubloc("Heals#team#~1HP", string(healamount), "scr_iteminfo_slash_scr_iteminfo_gml_59_0"); itemtarget = 2; value = 5; usable = 1; break; case 8: itemnameb = stringsetloc(
Darkburger
"Darkburger", "scr_iteminfo_slash_scr_iteminfo_gml_65_0"
); itemdescb = stringsetloc(
Heals#70HP
"Heals#70HP", "scr_iteminfo_slash_scr_iteminfo_gml_66_0"
); itemtarget = 1; value = 70; usable = 1; break; case 9: itemnameb = stringsetloc(
LancerCookie
"LancerCookie", "scr_iteminfo_slash_scr_iteminfo_gml_72_0"
); itemdescb = stringsetloc(
Heals#50HP
"Heals#50HP", "scr_iteminfo_slash_scr_iteminfo_gml_73_0"
); itemtarget = 1; value = 10; usable = 1; break; case 10: itemnameb = stringsetloc(
GigaSalad
"GigaSalad", "scr_iteminfo_slash_scr_iteminfo_gml_79_0"
); itemdescb = stringsetloc(
Heals#4HP
"Heals#4HP", "scr_iteminfo_slash_scr_iteminfo_gml_80_0"
); itemtarget = 1; value = 10; usable = 1; break; case 11: itemnameb = stringsetloc(
ClubsSandwich
"ClubsSandwich", "scr_iteminfo_slash_scr_iteminfo_gml_86_0"
); itemdescb = stringsetloc(
Heals#team#70HP
"Heals#team#70HP", "scr_iteminfo_slash_scr_iteminfo_gml_87_0"
); itemtarget = 2; value = 70; usable = 1; break; case 12: itemnameb = stringsetloc(
HeartsDonut
"HeartsDonut", "scr_iteminfo_slash_scr_iteminfo_gml_93_0"
); itemdescb = stringsetloc(
Healing#varies
"Healing#varies", "scr_iteminfo_slash_scr_iteminfo_gml_94_0"
); itemtarget = 1; value = 40; usable = 1; break; case 13: itemnameb = stringsetloc(
ChocDiamond
"ChocDiamond", "scr_iteminfo_slash_scr_iteminfo_gml_100_0"
); ...
(tempitem[global.bmenucoord[4][global.charturn]][global.charturn]);
470
            if (itemtarget == 0 || itemtarget == 2)
471
            {
472
                var item_use = false;
473
                var _tensionhealed = 0;
474
                if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 27)
475
                {
476
                    scr_tensionheal
scr_tensionheal

function scr_tensionheal(arg0) { global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(80);
477
                    _tensionhealed = 1;
478
                    item_use = true;
479
                }
480
                if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 28)
481
                {
482
                    scr_tensionheal
scr_tensionheal

function scr_tensionheal(arg0) { global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(ceil(global.maxtension / 2));
483
                    _tensionhealed = 1;
484
                    item_use = true;
485
                }
486
                if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 29)
487
                {
488
                    scr_tensionheal
scr_tensionheal

function scr_tensionheal(arg0) { global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(ceil(global.maxtension));
489
                    _tensionhealed = 1;
490
                    item_use = true;
491
                }
492
                if (_tensionhealed)
493
                {
494
                    var _drivenoise = snd_play(snd_cardrive);
495
                    snd_pitch(_drivenoise, 1.4);
496
                    snd_volume(_drivenoise, 0.8, 0);
497
                    with (global.charinstance[global.charturn])
498
                    {
499
                        ha = instance_create(x, y, obj_healanim);
500
                        ha.target = id;
501
                        ha.particlecolor = c_orange;
502
                    }
503
                    scr_itemshift_temp
scr_itemshift_temp

function scr_itemshift_temp(arg0, arg1) { tempitem[12][arg1] = 0; for (i = arg0; i < 12; i += 1) tempitem[i][arg1] = tempitem[i + 1][arg1]; }
(global.bmenucoord[4][global.charturn], global.charturn);
504
                    scr_nexthero
scr_nexthero

function scr_nexthero() { moveswapped = 0; prevturn = global.charturn; if (global.charturn == 0) { moveswapped = 1; if (global.charmove[1] == 1 && scr_charcan(1)) global.charturn = 1; else if (global.charmove[2] == 1 && scr_charcan(2)) global.charturn = 2; else scr_endturn(); } if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (scr_charcan(2) && global.acting[1] == 0) global.charturn = 2; else scr_endturn(); } if (global.charturn == 2 && moveswapped == 0) scr_endturn(); if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } }
();
505
                }
506
                if (!_tensionhealed)
507
                    scr_itemconsumeb
scr_itemconsumeb

function scr_itemconsumeb() { global.faceaction[global.charturn] = 3; global.charaction[global.charturn] = 4; global.charspecial[global.charturn] = tempitem[global.bmenucoord[4][global.charturn]][global.charturn] + 200; if (usable == 1 && replaceable == 0) scr_itemshift_temp(global.bmenucoord[4][global.charturn], global.charturn); else if (replaceable > 0) tempitem[global.bmenucoord[4][global.charturn]][global.charturn] = replaceable; scr_nexthero(); }
();
508
                if (item_use == true)
509
                {
510
                    with (obj_event_manager)
511
                        trigger_event(UnknownEnum.Value_0, get_consumer_trophy());
512
                }
513
            }
514
            if (itemtarget == 1)
515
                global.bmenuno = 7;
516
        }
517
        if (button2_p() && onebuffer < 0)
518
        {
519
            twobuffer = 1;
520
            global.bmenuno = 0;
521
            movenoise = 1;
522
        }
523
    }
524
    if (global.bmenuno == 9)
525
    {
526
        thisenemy = global.bmenucoord[11][global.charturn];
527
        scr_actinfo_temp
scr_actinfo_temp

function scr_actinfo_temp(arg0) { for (__acti = 0; __acti < 6; __acti++) { canact[__acti] = 0; if (global.char[global.charturn] == 1) { canact[__acti] = global.canact[arg0][__acti]; acttpcost[__acti] = global.actcost[arg0][__acti]; actsimul[__acti] = global.actsimul[arg0][__acti]; } if (global.char[global.charturn] == 2) { canact[__acti] = global.canactsus[arg0][__acti]; acttpcost[__acti] = global.actcostsus[arg0][__acti]; actsimul[__acti] = global.actsimulsus[arg0][__acti]; } if (global.char[global.charturn] == 3) { canact[__acti] = global.canactral[arg0][__acti]; acttpcost[__acti] = global.actcostral[arg0][__acti]; actsimul[__acti] = global.actsimulral[arg0][__acti]; } if (global.char[global.charturn] == 4) { canact[__acti] = global.canactnoe[arg0][__acti]; acttpcost[__acti] = global.actcostnoe[arg0][__acti]; actsimul[__acti] = global.actsimulnoe[arg0][__acti]; } } }
(thisenemy);
528
        if (right_p())
529
        {
530
            cango = 1;
531
            actcoord = global.bmenucoord[9][global.charturn];
532
            if (actcoord < 5)
533
            {
534
                if (canact[global.bmenucoord[9][global.charturn] + 1] == 0)
535
                {
536
                    cango = 0;
537
                    if ((actcoord % 2) == 1 && actcoord > 0)
538
                        global.bmenucoord[9][global.charturn] -= 1;
539
                }
540
            }
541
            else
542
            {
543
                global.bmenucoord[9][global.charturn] -= 1;
544
                cango = 0;
545
            }
546
            if (cango == 1)
547
            {
548
                if ((actcoord % 2) == 0)
549
                    global.bmenucoord[9][global.charturn] += 1;
550
                else
551
                    global.bmenucoord[9][global.charturn] -= 1;
552
            }
553
        }
554
        if (left_p())
555
        {
556
            cango = 1;
557
            actcoord = global.bmenucoord[9][global.charturn];
558
            if ((actcoord % 2) == 0)
559
            {
560
                if (canact[actcoord + 1] != 0)
561
                    global.bmenucoord[9][global.charturn] += 1;
562
            }
563
            else
564
            {
565
                global.bmenucoord[9][global.charturn] -= 1;
566
            }
567
        }
568
        if (down_p())
569
        {
570
            actcoord = global.bmenucoord[9][global.charturn];
571
            cango = 1;
572
            if (actcoord >= 4)
573
                cango = 0;
574
            else if (canact[actcoord + 2] == 0)
575
                cango = 0;
576
            if (cango != 0)
577
            {
578
                if (cango == 1)
579
                    global.bmenucoord[9][global.charturn] += 2;
580
            }
581
        }
582
        if (up_p())
583
        {
584
            actcoord = global.bmenucoord[9][global.charturn];
585
            cango = 1;
586
            if (actcoord <= 1)
587
                cango = 0;
588
            if (cango == 1)
589
                global.bmenucoord[9][global.charturn] -= 2;
590
        }
591
        global.tensionselect = acttpcost[global.bmenucoord[9][global.charturn]];
592
        canpress = 1;
593
        if (global.char[global.charturn] == 1)
594
        {
595
            if (global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 2 || global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 4)
596
            {
597
                if (havechar[1] == 0 || global.hp[2] <= 0)
598
                    canpress = 0;
599
            }
600
            if (global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 3 || global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 4)
601
            {
602
                if (havechar[2] == 0 || global.hp[3] <= 0)
603
                    canpress = 0;
604
            }
605
            if (global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 5)
606
            {
607
                if (havechar[3] == 0 || global.hp[4] <= 0)
608
                    canpress = 0;
609
            }
610
        }
611
        if (canpress == 1)
612
        {
613
            if (button1_p() && global.canact[thisenemy][global.bmenucoord[9][global.charturn]] == 1 && global.tension >= global.tensionselect && onebuffer < 0)
614
            {
615
                onebuffer = 2;
616
                global.bmenuno = 0;
617
                selnoise = 1;
618
                global.actingchoice[global.charturn] = global.bmenucoord[9][global.charturn];
619
                global.tension -= acttpcost[global.bmenucoord[9][global.charturn]];
620
                global.tensionselect = 0;
621
                scr_actselect
scr_actselect

function scr_actselect(arg0, arg1) { if (i_ex(global.monsterinstance[arg0])) { if (global.char[global.charturn] == 1) global.monsterinstance[arg0].acting = arg1 + 1; if (global.char[global.charturn] == 2) global.monsterinstance[arg0].actingsus = arg1 + 1; if (global.char[global.charturn] == 3) global.monsterinstance[arg0].actingral = arg1 + 1; if (global.char[global.charturn] == 4) global.monsterinstance[arg0].actingnoe = arg1 + 1; } if (global.char[global.charturn] == 1) { global.actingsimul[0] = actsimul[arg1]; global.acting[0] = 1; global.actingsingle[0] = 1; global.actingtarget[global.charturn] = arg0; if (global.actactor[arg0][arg1] == 2) global.acting[charpos[1]] = 1; if (global.actactor[arg0][arg1] == 3) global.acting[charpos[2]] = 1; if (global.actactor[arg0][arg1] == 4) { global.acting[2] = 1; global.acting[1] = 1; } if (global.actactor[arg0][arg1] == 5) global.acting[charpos[3]] = 1; for (i = 0; i < 3; i += 1) { if (global.acting[i] == 1) { global.faceaction[i] = 6; global.charaction[i] = 9; } } } else { global.actingtarget[global.charturn] = arg0; global.actingsingle[global.charturn] = 1; global.actingsimul[global.charturn] = actsimul[arg1]; global.faceaction[global.charturn] = 6; global.charaction[global.charturn] = 9; } }
(thisenemy, global.bmenucoord[9][global.charturn]);
622
                global.bmenucoord[9][global.charturn] = 0;
623
                scr_nexthero
scr_nexthero

function scr_nexthero() { moveswapped = 0; prevturn = global.charturn; if (global.charturn == 0) { moveswapped = 1; if (global.charmove[1] == 1 && scr_charcan(1)) global.charturn = 1; else if (global.charmove[2] == 1 && scr_charcan(2)) global.charturn = 2; else scr_endturn(); } if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (scr_charcan(2) && global.acting[1] == 0) global.charturn = 2; else scr_endturn(); } if (global.charturn == 2 && moveswapped == 0) scr_endturn(); if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } }
();
624
            }
625
        }
626
        if (button2_p() && onebuffer < 0)
627
        {
628
            global.bmenucoord[9][global.charturn] = 0;
629
            global.tensionselect = 0;
630
            twobuffer = 1;
631
            global.bmenuno = 11;
632
            movenoise = 1;
633
        }
634
    }
635
    if (global.bmenuno == 7 || global.bmenuno == 1 || global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
636
    {
637
        with (battlewriter)
638
            skipme = 1;
639
        with (battlewriter)
640
            depth = 10;
641
        with (obj_face_parent)
642
            depth = 10;
643
        with (obj_smallface)
644
            depth = 10;
645
        if (button2_p() && onebuffer < 0)
646
        {
647
            twobuffer = 1;
648
            if (global.bmenuno == 1 || global.bmenuno == 11 || global.bmenuno == 12)
649
                global.bmenuno = 0;
650
            if (global.bmenuno == 7)
651
                global.bmenuno = 4;
652
            if (global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 13)
653
                global.bmenuno = 2;
654
            movenoise = 1;
655
        }
656
        if (global.bmenuno == 7 || global.bmenuno == 1 || global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
657
        {
658
            if (global.bmenuno == 7 || global.bmenuno == 8)
659
            {
660
                for (i = 0; i < 3; i += 1)
661
                {
662
                    ht[i] = 0;
663
                    if (global.char[i] > 0)
664
                        ht[i] = 1;
665
                }
666
            }
667
            if (global.bmenuno == 1 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
668
            {
669
                for (i = 0; i < 3; i += 1)
670
                    ht[i] = global.monster[i];
671
            }
672
            if (global.bmenucoord[global.bmenuno][global.charturn] == 2 && ht[2] == 0)
673
                global.bmenucoord[global.bmenuno][global.charturn] = 0;
674
            if (global.bmenucoord[global.bmenuno][global.charturn] == 0 && ht[0] == 0)
675
                global.bmenucoord[global.bmenuno][global.charturn] = 1;
676
            if (global.bmenucoord[global.bmenuno][global.charturn] == 1 && ht[1] == 0)
677
                global.bmenucoord[global.bmenuno][global.charturn] = 0;
678
            if (global.bmenucoord[global.bmenuno][global.charturn] == 0 && ht[0] == 0)
679
                global.bmenucoord[global.bmenuno][global.charturn] = 2;
680
            if (down_p() == 1)
681
            {
682
                if (global.bmenucoord[global.bmenuno][global.charturn] == 0)
683
                {
684
                    if (ht[1] == 1)
685
                    {
686
                        movenoise = 1;
687
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
688
                    }
689
                    else if (ht[2] == 1)
690
                    {
691
                        movenoise = 1;
692
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
693
                    }
694
                }
695
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 1)
696
                {
697
                    if (ht[2] == 1)
698
                    {
699
                        movenoise = 1;
700
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
701
                    }
702
                    else if (ht[0] == 1)
703
                    {
704
                        movenoise = 1;
705
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
706
                    }
707
                }
708
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 2)
709
                {
710
                    if (ht[0] == 1)
711
                    {
712
                        movenoise = 1;
713
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
714
                    }
715
                    else if (ht[1] == 1)
716
                    {
717
                        movenoise = 1;
718
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
719
                    }
720
                }
721
            }
722
            if (up_p() == 1)
723
            {
724
                if (global.bmenucoord[global.bmenuno][global.charturn] == 0)
725
                {
726
                    if (ht[2] == 1)
727
                    {
728
                        movenoise = 1;
729
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
730
                    }
731
                    else if (ht[1] == 1)
732
                    {
733
                        movenoise = 1;
734
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
735
                    }
736
                }
737
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 1)
738
                {
739
                    if (ht[0] == 1)
740
                    {
741
                        movenoise = 1;
742
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
743
                    }
744
                    else if (ht[2] == 1)
745
                    {
746
                        movenoise = 1;
747
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
748
                    }
749
                }
750
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 2)
751
                {
752
                    if (ht[1] == 1)
753
                    {
754
                        movenoise = 1;
755
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
756
                    }
757
                    else if (ht[0] == 1)
758
                    {
759
                        movenoise = 1;
760
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
761
                    }
762
                }
763
            }
764
            if (button1_p() && onebuffer < 0)
765
            {
766
                onebuffer = 1;
767
                selnoise = 1;
768
                if (global.bmenuno == 1)
769
                {
770
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
771
                    global.faceaction[global.charturn] = 1;
772
                    global.charaction[global.charturn] = 1;
773
                    scr_nexthero
scr_nexthero

function scr_nexthero() { moveswapped = 0; prevturn = global.charturn; if (global.charturn == 0) { moveswapped = 1; if (global.charmove[1] == 1 && scr_charcan(1)) global.charturn = 1; else if (global.charmove[2] == 1 && scr_charcan(2)) global.charturn = 2; else scr_endturn(); } if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (scr_charcan(2) && global.acting[1] == 0) global.charturn = 2; else scr_endturn(); } if (global.charturn == 2 && moveswapped == 0) scr_endturn(); if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } }
();
774
                }
775
                if (global.bmenuno == 7)
776
                {
777
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
778
                    scr_itemconsumeb
scr_itemconsumeb

function scr_itemconsumeb() { global.faceaction[global.charturn] = 3; global.charaction[global.charturn] = 4; global.charspecial[global.charturn] = tempitem[global.bmenucoord[4][global.charturn]][global.charturn] + 200; if (usable == 1 && replaceable == 0) scr_itemshift_temp(global.bmenucoord[4][global.charturn], global.charturn); else if (replaceable > 0) tempitem[global.bmenucoord[4][global.charturn]][global.charturn] = replaceable; scr_nexthero(); }
();
779
                    if (global.chapter == 2 && instance_exists(o_boxingcontroller))
780
                        o_boxingcontroller.specialcon = 7;
781
                }
782
                if (global.bmenuno == 8 || global.bmenuno == 3)
783
                {
784
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
785
                    scr_spellconsumeb
scr_spellconsumeb

function scr_spellconsumeb() { global.tension -= cost; global.faceaction[global.charturn] = 2; global.charaction[global.charturn] = 2; if (global.flag[34 disable_monster_acts] == 1) global.charspecial[global.charturn] = global.spell[global.char[global.charturn]][global.bmenucoord[2][global.charturn]]; if (global.flag[34 disable_monster_acts] == 0) global.charspecial[global.charturn] = global.battlespell[global.charturn][global.bmenucoord[2][global.charturn]]; global.tensionselect = 0; if (spellanim == 1) { with (global.charinstance[global.charturn]) { spellframes = 0; spellsprite = spellreadysprite; } } else { with (global.charinstance[global.charturn]) { spellframes = remspellframes; spellsprite = remspellsprite; } } scr_nexthero(); }
();
786
                }
787
                if (global.bmenuno == 11)
788
                {
789
                    global.bmenuno = 9;
790
                    actcoord = global.bmenucoord[9][global.charturn];
791
                    thisenemy = global.bmenucoord[11][global.charturn];
792
                    if (global.char[global.charturn] == 1)
793
                    {
794
                        for (i = 0; i < 6; i += 1)
795
                        {
796
                            if (global.canact[thisenemy][actcoord] == 0)
797
                            {
798
                                if (actcoord > 0)
799
                                    global.bmenucoord[9][global.charturn] -= 1;
800
                            }
801
                        }
802
                    }
803
                    if (global.char[global.charturn] == 2)
804
                    {
805
                        for (i = 0; i < 6; i += 1)
806
                        {
807
                            if (global.canactsus[thisenemy][actcoord] == 0)
808
                            {
809
                                if (actcoord > 0)
810
                                    global.bmenucoord[9][global.charturn] -= 1;
811
                            }
812
                        }
813
                    }
814
                    if (global.char[global.charturn] == 3)
815
                    {
816
                        for (i = 0; i < 6; i += 1)
817
                        {
818
                            if (global.canactral[thisenemy][actcoord] == 0)
819
                            {
820
                                if (actcoord > 0)
821
                                    global.bmenucoord[9][global.charturn] -= 1;
822
                            }
823
                        }
824
                    }
825
                    if (global.char[global.charturn] == 4)
826
                    {
827
                        for (i = 0; i < 6; i += 1)
828
                        {
829
                            if (global.canactnoe[thisenemy][actcoord] == 0)
830
                            {
831
                                if (actcoord > 0)
832
                                    global.bmenucoord[9][global.charturn] -= 1;
833
                            }
834
                        }
835
                    }
836
                    onebuffer = 1;
837
                }
838
                if (global.bmenuno == 12)
839
                {
840
                    global.faceaction[global.charturn] = 10;
841
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
842
                    global.charaction[global.charturn] = 2;
843
                    global.charspecial[global.charturn] = 100;
844
                    scr_nexthero
scr_nexthero

function scr_nexthero() { moveswapped = 0; prevturn = global.charturn; if (global.charturn == 0) { moveswapped = 1; if (global.charmove[1] == 1 && scr_charcan(1)) global.charturn = 1; else if (global.charmove[2] == 1 && scr_charcan(2)) global.charturn = 2; else scr_endturn(); } if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (scr_charcan(2) && global.acting[1] == 0) global.charturn = 2; else scr_endturn(); } if (global.charturn == 2 && moveswapped == 0) scr_endturn(); if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } }
();
845
                }
846
                if (global.bmenuno == 13)
847
                {
848
                    onebuffer = 2;
849
                    global.bmenuno = 0;
850
                    selnoise = 1;
851
                    global.actingchoice[global.charturn] = global.bmenucoord[2][global.charturn];
852
                    global.tension -= global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]];
853
                    global.tensionselect = 0;
854
                    scr_actinfo_temp
scr_actinfo_temp

function scr_actinfo_temp(arg0) { for (__acti = 0; __acti < 6; __acti++) { canact[__acti] = 0; if (global.char[global.charturn] == 1) { canact[__acti] = global.canact[arg0][__acti]; acttpcost[__acti] = global.actcost[arg0][__acti]; actsimul[__acti] = global.actsimul[arg0][__acti]; } if (global.char[global.charturn] == 2) { canact[__acti] = global.canactsus[arg0][__acti]; acttpcost[__acti] = global.actcostsus[arg0][__acti]; actsimul[__acti] = global.actsimulsus[arg0][__acti]; } if (global.char[global.charturn] == 3) { canact[__acti] = global.canactral[arg0][__acti]; acttpcost[__acti] = global.actcostral[arg0][__acti]; actsimul[__acti] = global.actsimulral[arg0][__acti]; } if (global.char[global.charturn] == 4) { canact[__acti] = global.canactnoe[arg0][__acti]; acttpcost[__acti] = global.actcostnoe[arg0][__acti]; actsimul[__acti] = global.actsimulnoe[arg0][__acti]; } } }
(global.bmenucoord[13][global.charturn]);
855
                    scr_actselect
scr_actselect

function scr_actselect(arg0, arg1) { if (i_ex(global.monsterinstance[arg0])) { if (global.char[global.charturn] == 1) global.monsterinstance[arg0].acting = arg1 + 1; if (global.char[global.charturn] == 2) global.monsterinstance[arg0].actingsus = arg1 + 1; if (global.char[global.charturn] == 3) global.monsterinstance[arg0].actingral = arg1 + 1; if (global.char[global.charturn] == 4) global.monsterinstance[arg0].actingnoe = arg1 + 1; } if (global.char[global.charturn] == 1) { global.actingsimul[0] = actsimul[arg1]; global.acting[0] = 1; global.actingsingle[0] = 1; global.actingtarget[global.charturn] = arg0; if (global.actactor[arg0][arg1] == 2) global.acting[charpos[1]] = 1; if (global.actactor[arg0][arg1] == 3) global.acting[charpos[2]] = 1; if (global.actactor[arg0][arg1] == 4) { global.acting[2] = 1; global.acting[1] = 1; } if (global.actactor[arg0][arg1] == 5) global.acting[charpos[3]] = 1; for (i = 0; i < 3; i += 1) { if (global.acting[i] == 1) { global.faceaction[i] = 6; global.charaction[i] = 9; } } } else { global.actingtarget[global.charturn] = arg0; global.actingsingle[global.charturn] = 1; global.actingsimul[global.charturn] = actsimul[arg1]; global.faceaction[global.charturn] = 6; global.charaction[global.charturn] = 9; } }
(global.bmenucoord[13][global.charturn], global.bmenucoord[2][global.charturn]);
856
                    scr_nexthero
scr_nexthero

function scr_nexthero() { moveswapped = 0; prevturn = global.charturn; if (global.charturn == 0) { moveswapped = 1; if (global.charmove[1] == 1 && scr_charcan(1)) global.charturn = 1; else if (global.charmove[2] == 1 && scr_charcan(2)) global.charturn = 2; else scr_endturn(); } if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (scr_charcan(2) && global.acting[1] == 0) global.charturn = 2; else scr_endturn(); } if (global.charturn == 2 && moveswapped == 0) scr_endturn(); if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } }
();
857
                }
858
            }
859
        }
860
    }
861
}
862
if (movenoise == 1)
863
{
864
    snd_play(snd_menumove);
865
    movenoise = 0;
866
}
867
if (grazenoise == 1)
868
{
869
    snd_play(snd_graze);
870
    grazenoise = 0;
871
}
872
if (selnoise == 1)
873
{
874
    snd_play(snd_select);
875
    selnoise = 0;
876
}
877
if (damagenoise == 1)
878
{
879
    snd_play(snd_damage);
880
    damagenoise = 0;
881
}
882
if (laznoise == 1)
883
{
884
    snd_play(snd_laz_c);
885
    laznoise = 0;
886
}
887
onebuffer -= 1;
888
twobuffer -= 1;
889
lbuffer -= 1;
890
rbuffer -= 1;
891
if (global.mnfight == 2 && timeron == 1)
892
{
893
    global.turntimer -= 1;
894
    if (global.turntimer <= 0 && reset == 0)
895
    {
896
        with (obj_bulletparent)
897
            instance_destroy();
898
        with (obj_bulletgenparent)
899
            instance_destroy();
900
        with (obj_darkener)
901
            darken = 0;
902
        with (obj_heart)
903
        {
904
            instance_create(x, y, obj_returnheart);
905
            instance_destroy();
906
        }
907
        reset = 1;
908
        if (noreturn == 0)
909
            alarm[2] = 15;
gml_Object_obj_battlecontroller_Alarm_2.gml

if (global.chapter == 2 && instance_exists(obj_spamton_neo_enemy) && global.mercymod[obj_spamton_neo_enemy.myself] > 99) { obj_spamton_neo_enemy.endcon = 1; } else { reset = 0; scr_mnendturn(); }
910
    }
911
}
912
if (global.myfight == 3)
913
{
914
    if (scr_monsterpop
scr_monsterpop

function scr_monsterpop() { return global.monster[0] + global.monster[1] + global.monster[2]; }
() == 0 && !instance_exists(obj_writer))
915
    {
916
        scr_wincombat
scr_wincombat

function scr_wincombat() { if (global.flag[60 dojo_next_encounter] == 0 || global.flag[36 dojo_failure] == 1) { global.myfight = 7; global.mnfight = -1; with (obj_battlecontroller) victory = 1; for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat(); } } } else { for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat(); } } global.encounterno = global.flag[60 dojo_next_encounter]; scr_encountersetup(global.encounterno); global.flag[60 dojo_next_encounter] = 0; for (__j = 0; __j < 3; __j++) { if (global.monstertype[__j] != 0(None)) { _newmonster = scr_monster_add(global.monstertype[__j], global.monsterinstancetype[__j]); global.monsterinstance[_newmonster].x = camerax() + 800; global.monsterinstance[_newmonster].y = global.monstermakey[__j]; with (global.monsterinstance[_newmonster]) scr_move_to_point_over_time(global.monstermakex[myself], global.monstermakey[myself], 10); } } global.myfight = 5; myfightreturntimer = 15; global.mnfight = -1; } }
();
917
        if (global.myfight == 3)
918
            scr_endturn
scr_endturn

function scr_endturn() { for (i = 0; i < 12; i += 1) global.item[i] = tempitem[i][global.charturn]; for (i = 0; i < 12; i += 1) { for (j = 0; j < 3; j += 1) tempitem[i][j] = global.item[i]; } moveswapped = 0; with (obj_writer) instance_destroy(); with (obj_face) instance_destroy(); with (obj_smallface) instance_destroy(); global.attacking = 0; for (i = 0; i < 3; i += 1) { global.monsterattackname[i] = " "; if (global.charauto[global.char[i]] == 1 && global.hp[global.char[i]] > 0) { if (global.monster[2] == 1) global.chartarget[i] = 2; if (global.monster[1] == 1) global.chartarget[i] = 1; if (global.monster[0] == 1) global.chartarget[i] = 0; } if (global.charaction[i] == 1) global.attacking = 1; } __noactors = 1; if (global.acting[0] == 1) __noactors = 0; for (__noactorsi = 0; __noactorsi < 3; __noactorsi++) { if (global.actingsingle[__noactorsi] == 1) __noactors = 0; } if (__noactors == 1) { scr_attackphase(); } else { global.charturn = 3; global.myfight = 3; global.currentactingchar = 0; if (global.acting[0] == 0) scr_nextact(); if (global.chapter == 2 && instance_exists(obj_sweet_enemy) && global.actingsingle[0] == 1 && global.actingsingle[1] == 0 && global.actingsingle[2] == 0) obj_sweet_enemy.simultotal_funny = 1; if (global.acting[0] == 1 && global.actingsimul[0] == 1) scr_act_simul(); } with (obj_battlecontroller) { messagepriority = -1; attackpriority = -1; } }
();
919
    }
920
}
921
if (global.myfight == 5)
922
{
923
    myfightreturntimer--;
924
    if (myfightreturntimer <= 0)
925
    {
926
        scr_mnendturn
scr_mnendturn

function scr_mnendturn() { if (global.char[0] == 2) sus = 0; if (global.char[1] == 2) sus = 1; if (global.char[2] == 2) sus = 2; techwon = 0; if (scr_monsterpop() == 0) techwon = 1; if (global.flag[39 dojo_abort?] == 1) techwon = 1; if (techwon == 1) scr_wincombat(); if (techwon == 0) { with (obj_battlecontroller) { messagepriority = -1; attackpriority = -1; } scr_battlecursor_memory_reset(); global.mnfight = 0; global.myfight = 0; global.bmenuno = 0; global.charturn = 0; skip = 0; for (i = 0; i < 3; i += 1) { global.hittarget[i] = 0; with (global.charinstance[i]) tu = 0; hptarget = global.char[i]; if (global.char[i] != 0 && global.hp[hptarget] <= 0) { healamt = ceil(global.maxhp[hptarget] / 8); dmgwr = instance_create(global.charinstance[i].x, (global.charinstance[i].y + global.charinstance[i].myheight) - 24, obj_dmgwriter); with (dmgwr) { delay = 1; type = 3; } dmgwr.damage = scr_heal(i, healamt); if (global.hp[hptarget] >= 1) { with (dmgwr) specialmessage = 4; } } } if (global.charmove[0] == 0 || global.charauto[global.char[0]] == 1) global.charturn = 1; if (global.charturn == 1) { if (global.charmove[1] == 0 || global.charauto[global.char[1]] == 1) global.charturn = 2; } if (global.charturn == 2) { if (global.charmove[2] == 0 || global.charauto[global.char[2]] == 1) skip = 1; } for (i = 0; i < 3; i += 1) { global.acting[i] = 0; global.actingsingle[i] = 0; global.actingsimul[i] = 0; global.actingtarget[i] = 0; global.temptension[i] = global.tension; global.charspecial[i] = 0; global.targeted[i] = 0; global.charaction[i] = 0; global.faceaction[i] = 0; global.monsterattackname[i] = " "; } global.currentactingchar = 0; with (obj_monsterparent) { attacked = 0; talked = 0; acting = 0; actingsus = 0; actingral = 0; actingnoe = 0; } if (skip == 1) { if (global.char[0] == 2 && global.charauto[2] == 1) { global.acting[0] = 1; global.myfight = 3; } scr_endturn(); } for (i = 0; i < 12; i += 1) { for (j = 0; j < 3; j += 1) tempitem[i][j] = global.item[i]; } } ...
();
927
        global.spelldelay = 10;
928
        with (obj_heroparent)
929
        {
930
            attacktimer = 0;
931
            image_index = 0;
932
            index = 0;
933
            itemed = 0;
934
            acttimer = 0;
935
            defendtimer = 0;
936
            state = 0;
937
            flash = 0;
938
            siner = 0;
939
            fsiner = 0;
940
alarm[4]
941
        }
942
        with (obj_spellphase)
943
        {
944
            with (spellwriter)
945
                instance_destroy();
946
            instance_destroy();
947
        }
948
    }
949
}
950
if (global.charweapon[4] == 13)
951
{
952
    if ((t_siner % 6) == 0)
953
    {
954
        if (global.hp[4] > round(global.maxhp[4] / 3))
955
            global.hp[4]--;
956
    }
957
}
958
t_siner++;
959
if (scr_debug
scr_debug

function scr_debug() { return 0; }
())
960
{
961
    scr_turn_skip();
962
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f2))
963
        scr_debug_fullheal();
964
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f3))
965
        scr_raise_party
scr_raise_party

function scr_raise_party() { with (obj_dmgwriter) { if (delaytimer >= 1) killactive = 1; } for (i = 0; i < 3; i++) { if (global.char[i] == 0) continue; var _hltarget = global.char[i]; var _curhp = global.hp[_hltarget]; var _healpower; if (_curhp <= 0) _healpower = -_curhp + 5; else _healpower = 1; scr_heal(i, _healpower); with (global.charinstance[i]) { ha = instance_create(x, y, obj_healanim); ha.target = id; dmgwr = scr_dmgwriter_selfchar(); with (dmgwr) { delay = 8; type = 3; damage = _healpower; } if (global.hp[global.char[myself]] >= global.maxhp[global.char[myself]]) { with (dmgwr) specialmessage = 3; } tu += 1; } } for (i = 0; i < 3; i++) { with (global.charinstance[i]) tu--; } }
();
966
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f5))
967
    {
968
        if (global.chapter == 2 && instance_exists(o_boxingqueen))
969
        {
970
            with (o_boxingqueen)
971
                health_count = 10;
972
            with (o_boxinghud)
973
                sub_healthbar_count = 0;
974
        }
975
        else
976
        {
977
            scr_wincombat
scr_wincombat

function scr_wincombat() { if (global.flag[60 dojo_next_encounter] == 0 || global.flag[36 dojo_failure] == 1) { global.myfight = 7; global.mnfight = -1; with (obj_battlecontroller) victory = 1; for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat(); } } } else { for (i = 0; i < 3; i += 1) { if (global.monster[i] == 1 && i_ex(global.monsterinstance[i])) { with (global.monsterinstance[i]) scr_monsterdefeat(); } } global.encounterno = global.flag[60 dojo_next_encounter]; scr_encountersetup(global.encounterno); global.flag[60 dojo_next_encounter] = 0; for (__j = 0; __j < 3; __j++) { if (global.monstertype[__j] != 0(None)) { _newmonster = scr_monster_add(global.monstertype[__j], global.monsterinstancetype[__j]); global.monsterinstance[_newmonster].x = camerax() + 800; global.monsterinstance[_newmonster].y = global.monstermakey[__j]; with (global.monsterinstance[_newmonster]) scr_move_to_point_over_time(global.monstermakex[myself], global.monstermakey[myself], 10); } } global.myfight = 5; myfightreturntimer = 15; global.mnfight = -1; } }
();
978
        }
979
    }
980
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f6))
981
        scr_weaken_enemies();
982
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f8))
983
        scr_weaken_party
scr_weaken_party

function scr_weaken_party() { var _writedamage = false; if (argument_count == 1 && argument[0] == true) _writedamage = true; var _didhit = false; if (_writedamage) { with (obj_dmgwriter) { if (delaytimer >= 1) killactive = 1; } } for (i = 0; i < 3; i++) { if (global.char[i] == 0) continue; var _chartarget = global.char[i]; if (_writedamage) { var __hpdiff = max(0, global.hp[_chartarget] - 1); if (__hpdiff > 0) { with (global.charinstance[i]) { hurt = 1; hurttimer = 0; } } dmgwriter = instance_create(global.charinstance[i].x, (global.charinstance[i].y + global.charinstance[i].myheight) - 24, obj_dmgwriter); dmgwriter.damage = __hpdiff; if (__hpdiff > 0) _didhit = true; } if (global.hp[_chartarget] > 0) global.hp[_chartarget] = 1; } global.inv = global.invc * 40; if (_didhit) { snd_play(snd_hurt1); if (!instance_exists(obj_shake)) instance_create(0, 0, obj_shake); } }
(true);
984
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f9))
985
        global.tension = 0;
986
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f10))
987
        global.tension = 250;
988
    if (scr_debug_keycheck
scr_debug_keycheck

function scr_debug_keycheck(arg0) { var key = arg0; var is_pressed = false; return is_pressed; }
(ord("M")) && !instance_exists(obj_queen_enemy) && !instance_exists(obj_spamton_neo_enemy))
989
    {
990
        if (audio_is_playing(global.batmusic[1]))
991
        {
992
            if (!audio_is_paused(global.batmusic[1]))
993
                audio_pause_sound(global.batmusic[1]);
994
            else
995
                audio_resume_sound(global.batmusic[1]);
996
        }
997
    }
998
}
999
1000
enum UnknownEnum
1001
{
1002
    Value_0
1003
}