Deltarune (Chapter 3) 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 == 3)
2
{
3
    if (instance_exists(obj_rouxls_ch3_enemy) && obj_rouxls_ch3_enemy.intro < 2)
4
        exit;
5
    if (instance_exists(obj_tenna_board4_enemy) && obj_tenna_board4_enemy.intro < 2)
6
        exit;
7
    if (instance_exists(obj_elnina_lanino_controller) && obj_elnina_lanino_controller.intro < 4)
8
        exit;
9
    if (instance_exists(obj_tennabattleconvo_controller) && obj_tennabattleconvo_controller.introcon < 2)
10
        exit;
11
    if (instance_exists(obj_knight_enemy) && obj_knight_enemy.end_cutscene_version > 0)
12
        exit;
13
    if (i_ex(obj_susiezilla_gamecontroller))
14
        exit;
15
    if (i_ex(obj_chefs_game))
16
        exit;
17
    if (i_ex(obj_rhythmgame))
18
        exit;
19
    if (i_ex(obj_shootout_controller) && i_ex(obj_tenna_enemy))
20
        exit;
21
    if (i_ex(obj_shutta_enemy) && obj_shutta_enemy.amiabossfight && victory == 1 && victoried == 0)
22
        global.battletyper = 4;
23
}
24
if (victory == 1 && victoried == 0)
25
{
26
    global.faceaction[0] = 0;
27
    global.faceaction[1] = 0;
28
    global.faceaction[2] = 0;
29
    global.battleend = 1;
30
    global.mnfight = -1;
31
    global.myfight = 7;
32
    with (battlewriter)
33
        instance_destroy();
34
    with (obj_face)
35
        instance_destroy();
36
    with (obj_smallface)
37
        instance_destroy();
38
    for (i = 0; i < 5; i += 1)
39
    {
40
        if (global.hp[i] < 1)
41
            global.hp[i] = round(global.maxhp[i] / 8);
42
    }
43
    lastbattlewriter = 32482473284732;
44
    if (skipvictory == 0)
45
    {
46
        global.monstergold[3] += floor(global.tension / 10) * global.chapter;
47
        if (global.charweapon[1] == 8)
48
            global.monstergold[3] += floor(global.monstergold[3] / 20);
49
        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);
50
        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);
51
        global.monstergold[3] = floor(global.monstergold[3]);
52
        if (global.flag[37 dojo_active] == 1)
53
            global.monstergold[3] = 0;
54
        global.gold += global.monstergold[3];
55
        global.xp += global.monsterexp[3];
56
        if (global.gold < 0)
57
            global.gold = 0;
58
        global.fc = 0;
59
        global.fe = 0;
60
        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");
61
        if (global.flag[37 dojo_active] == 1)
62
            global.battlemsg[0] = stringsetloc(
* You won the battle!Wait for inputClose Message
"* You won the battle!/%", "obj_battlecontroller_slash_Step_0_gml_43_0"
);
63
        if (global.flag[63 violenced_last] == 1)
64
        {
65
            var gainedstats = 
scr_levelup
scr_levelup

function
scr_levelup()
{ var krismaxhp = 200; var susiemaxhp = 240; var ralseimaxhp = 180; var encountercountflag = 1248; var attackpluscountflag = 1249; var gainedstats = 0; global.flag[encountercountflag]++; if (global.maxhp[1] < krismaxhp || global.maxhp[2] < susiemaxhp || global.maxhp[3] < ralseimaxhp) { gainedstats = 1; if (global.maxhp[1] < krismaxhp) { global.maxhp[1] += 2; global.hp[1] += 2; } if (global.maxhp[2] < susiemaxhp) { global.maxhp[2] += 2; global.hp[2] += 2; } if (global.maxhp[3] < ralseimaxhp) { global.maxhp[3] += 2; global.hp[3] += 2; } if ((global.flag[encountercountflag] % 2) == 0) global.maxhp[2] += 1; } if ((global.flag[encountercountflag] % 10) == 0 && global.flag[attackpluscountflag] < 2) { gainedstats = 1; global.at[1] += 1; global.at[2] += 1; global.mag[2] += 1; global.at[3] += 1; global.mag[3] += 1; global.flag[attackpluscountflag]++; } if (
scr_havechar(4))
{ global.flag[919 times_noelle_leveled]++; global.maxhp[4] += 4; global.hp[4] += 4; if ((global.flag[1248 times_leveled_ch3] % 4) == 0) { global.at[4] += 1; global.mag[4] += 1; } } global.maxhp[1] = clamp(global.maxhp[1], 10, krismaxhp); global.maxhp[2] = clamp(global.maxhp[2], 10, susiemaxhp); global.maxhp[3] = clamp(global.maxhp[3], 10, ralseimaxhp); 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]); return gainedstats; }
();
66
            if (gainedstats)
67
            {
68
                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");
69
                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))
70
                    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");
71
                var lvsnd = snd_play_pitch(snd_dtrans_lw, 2);
72
                snd_volume(lvsnd, 0.7, 0);
73
            }
74
        }
75
        global.battletyper = 4;
76
        global.msg[0] = global.battlemsg[0];
77
        global.typer = global.battletyper;
78
        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); if (global.chapter == 3 && i_ex(obj_tennabattleconvo_controller) && (obj_tennabattleconvo_controller.chattedduringbulletphase == true || (obj_tennabattleconvo_controller.introcon >= 0.1 && obj_tennabattleconvo_controller.introcon <= 2))) { } else { 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 }
();
79
        if (global.flag[38 no_battle_end_msg] == 1)
80
        {
81
            with (lastbattlewriter)
82
                instance_destroy();
83
        }
84
        for (i = 0; i < 3; i += 1)
85
        {
86
            with (global.charinstance[i])
87
            {
88
                state = 7;
89
                hurt = 0;
90
                hurttimer = 0;
91
            }
92
        }
93
    }
94
    victoried = 1;
95
    victortimer = 0;
96
    if (skipvictory == 1)
97
        victortimer = -20;
98
    if (global.chapter == 3 && i_ex(obj_tenna_board4_enemy) && skipvictory == 1)
99
        victortimer = 0;
100
    with (obj_tensionbar)
101
    {
102
alarm[5]
103
        hspeed = -10;
104
        friction = -0.4;
105
    }
106
}
107
if (victoried == 1)
108
{
109
    victortimer += 1;
110
    if (victortimer == 15 && room == room_ch3_gameshowroom && i_ex(obj_tenna_board4_enemy))
111
        instance_create(x, y, obj_board4_battleend_wipe);
112
    if (i_ex(lastbattlewriter) == false && victortimer >= 10)
113
    {
114
        intro = 2;
115
        if (bp <= 0)
116
            
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(); } }
();
117
    }
118
}
119
if (global.myfight == 0)
120
{
121
    if (global.bmenuno == 0)
122
    {
123
        var can_input = true;
124
        if (i_ex(obj_board_battleintroduction))
125
            can_input = false;
126
        var play_battlemsg = true;
127
        if (spadesuccesscon == 1 || rouxlserrorcon == 1)
128
            can_input = false;
129
        if (global.chapter == 3 && i_ex(obj_rouxls_ch3_enemy))
130
        {
131
            with (obj_rouxls_ch3_enemy)
132
                dancecon = 1;
133
            if (obj_rouxls_ch3_enemy.intro == 2)
134
                can_input = false;
135
            play_battlemsg = false;
136
            if (obj_rouxls_ch3_enemy.intro == 3)
137
                play_battlemsg = true;
138
            if (oopsallacts == 1 && spadebuttonenabled == true && obj_rouxls_ch3_enemy.phase != 3 && global.charturn == 0 && dogcon == 0)
139
                dogtimer++;
140
            else
141
                dogtimer = 0;
142
            if (dogtimer == 1000)
143
                dogcon = 1;
144
        }
145
        if (((!i_ex(battlewriter) && play_battlemsg == true) || (global.chapter == 2 && !i_ex(battlewriter))) && play_battlemsg == true)
146
        {
147
            global.msg[0] = global.battlemsg[0];
148
            global.typer = global.battletyper;
149
            if ((global.chapter == 3 && i_ex(obj_tenna_enemy) && obj_tenna_enemy.turn == 0) || i_ex(obj_tennabattleconvo_controller))
150
            {
151
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("tenna");
152
                global.fc = 22;
153
                global.typer = 80;
154
            }
155
            if (global.chapter == 3 && global.encounterno == 123 && i_ex(obj_pippins_enemy) && obj_pippins_enemy.turns == 0)
156
            {
157
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("ralsei");
158
                global.fc = 2;
159
                global.typer = 45;
160
            }
161
            if (global.chapter == 3 && global.encounterno == 123 && i_ex(obj_pippins_enemy) && obj_pippins_enemy.turns == 1)
162
            {
163
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("susie");
164
                global.fc = 1;
165
                global.typer = 47;
166
            }
167
            if (global.chapter == 3 && global.encounterno == 123 && i_ex(obj_pippins_enemy) && obj_pippins_enemy.turns == 2)
168
            {
169
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("ralsei");
170
                global.fc = 2;
171
                global.typer = 45;
172
            }
173
            if (global.chapter == 3 && global.encounterno == 123 && i_ex(obj_pippins_enemy) && obj_pippins_enemy.turns == 3)
174
            {
175
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("susie");
176
                global.fc = 1;
177
                global.typer = 47;
178
            }
179
            if (global.chapter == 3 && global.encounterno == 123 && i_ex(obj_pippins_enemy) && obj_pippins_enemy.turns == 4)
180
            {
181
                
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("ralsei");
182
                global.fc = 2;
183
                global.typer = 45;
184
            }
185
            
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); if (global.chapter == 3 && i_ex(obj_tennabattleconvo_controller) && (obj_tennabattleconvo_controller.chattedduringbulletphase == true || (obj_tennabattleconvo_controller.introcon >= 0.1 && obj_tennabattleconvo_controller.introcon <= 2))) { } else { 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 }
();
186
        }
187
        if (left_p() == 1 && lbuffer < 0 && can_input == true)
188
        {
189
            if (global.bmenucoord[0][global.charturn] == 0)
190
                global.bmenucoord[0][global.charturn] = 4;
191
            else
192
                global.bmenucoord[0][global.charturn] -= 1;
193
            movenoise = 1;
194
            rbuffer = 1;
195
            if (disablesusieact == 1 && global.charturn == 1 && global.bmenucoord[0][global.charturn] == 1)
196
                global.bmenucoord[0][global.charturn] = 0;
197
        }
198
        if (right_p() == 1 && rbuffer < 0 && can_input == true)
199
        {
200
            if (global.bmenucoord[0][global.charturn] == 4)
201
                global.bmenucoord[0][global.charturn] = 0;
202
            else
203
                global.bmenucoord[0][global.charturn] += 1;
204
            movenoise = 1;
205
            lbuffer = 1;
206
            if (disablesusieact == 1 && global.charturn == 1 && global.bmenucoord[0][global.charturn] == 1)
207
                global.bmenucoord[0][global.charturn] = 2;
208
        }
209
        if (button1_p() == 1 && rouxlserrorcon == 1 && dogcon < 1)
210
        {
211
        }
212
        else if (button1_p() == 1 && twobuffer < 0 && can_input == true)
213
        {
214
            onebuffer = 1;
215
            selnoise = 1;
216
            if (oopsallacts == 1)
217
            {
218
                norouxlsbutton = true;
219
                if (spadebuttonenabled == false)
220
                {
221
                    global.faceaction[global.charturn] = 6;
222
                    global.bmenucoord[0][0] = 2;
223
                    global.bmenucoord[0][1] = 2;
224
                    global.bmenucoord[0][2] = 2;
225
                    if (obj_battlecontroller.rouxlsgridenabled == true)
226
                    {
227
                        obj_battlecontroller.rouxlsbuttoncount_y = 4;
228
                        rouxlserrorcon = 0;
229
                        rouxlstelegraphtimer = 0;
230
                    }
231
                    if (i_ex(obj_tenna_board4_enemy))
232
                    {
233
                        onebuffer = 1;
234
                        global.bmenuno = 11;
235
                    }
236
                    else
237
                    {
238
                        
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
239
                    }
240
                    exit;
241
                }
242
                spadesuccesscon = 1;
243
                var ralseiyarn = false;
244
                if (global.charturn == 2 && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2) && obj_rouxls_ch3_enemy.yarnendturn == 0)
245
                {
246
                    selnoise = 0;
247
                    global.bmenuno = 0;
248
                    obj_rouxls_ch3_enemy.yarnendturn = 1;
249
                    if (dogcon < 1)
250
                    {
251
                        rouxlsbuttonendcon = 0;
252
                        if ((spadebuttoncount - 1) == (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)) || recentlyhighlightingspade > 0)
253
                        {
254
                            snd_play(snd_coin);
255
                            global.faceaction[global.charturn] = 6;
256
                            spadesuccesscon = 1;
257
                            if (recentlyhighlightingspade > 0 && (spadebuttoncount - 1) != (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)))
258
                                spadebuttoncount = recentlyhighlightingspadevalue;
259
                        }
260
                        else
261
                        {
262
                            snd_play(snd_error);
263
                            spadesuccesscon = 1;
264
                            spadefail = true;
265
                        }
266
                    }
267
                    if (dogcon > 0)
268
                    {
269
                        snd_play(snd_pombark);
270
                        dogselectedcount++;
271
                        spadesuccesscon = 0;
272
                        if (global.charturn == 2 && dogselectedcount < 9)
273
                        {
274
                            global.charturn = 0;
275
                            global.bmenuno = 0;
276
                        }
277
                        else if (global.charturn == 2 && dogselectedcount >= 9)
278
                        {
279
                            
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
280
                            global.bmenucoord[0][0] = 2;
281
                            global.bmenucoord[0][1] = 2;
282
                            global.bmenucoord[0][2] = 2;
283
                            if (rouxlsgridenabled == true)
284
                            {
285
                                rouxlsbuttoncount_y = 4;
286
                                buttonorder = 0;
287
                                rouxlsbuttoncount = choose(0, -1, -3, -4);
288
                            }
289
                            obj_rouxls_ch3_enemy.dogtrigger = 1;
290
                        }
291
                        else
292
                        {
293
                            
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
294
                            global.bmenucoord[0][0] = 2;
295
                            global.bmenucoord[0][1] = 2;
296
                            global.bmenucoord[0][2] = 2;
297
                            if (rouxlsgridenabled == true)
298
                            {
299
                                rouxlsbuttoncount_y = 4;
300
                                buttonorder = 0;
301
                                rouxlsbuttoncount = choose(0, -1, -3, -4);
302
                            }
303
                        }
304
                    }
305
                    exit;
306
                }
307
                if (spadebuttonenabled == true && ralseiyarn == false)
308
                {
309
                    selnoise = 0;
310
                    if (dogcon > 0)
311
                    {
312
                        if ((spadebuttoncount - 1) == (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)) || recentlyhighlightingspade > 0 || dogcon == 2)
313
                        {
314
                            buttonspeed++;
315
                            snd_play(snd_pombark);
316
                            dogselectedcount++;
317
                            if (dogcon == 1)
318
                                dogcon = 2;
319
                            if (recentlyhighlightingspade > 0 && (spadebuttoncount - 1) != (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)))
320
                                spadebuttoncount = recentlyhighlightingspadevalue;
321
                        }
322
                        else
323
                        {
324
                            snd_play(snd_error);
325
                            dogcon = -1;
326
                            spadefail = true;
327
                        }
328
                    }
329
                    else if ((spadebuttoncount - 1) == (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)) || recentlyhighlightingspade > 0)
330
                    {
331
                        buttonspeed++;
332
                        with (obj_rouxls_ch3_enemy)
333
                            spadepower++;
334
                        snd_play(snd_coin);
335
                        global.faceaction[global.charturn] = 6;
336
                        spadesuccesscon = 1;
337
                        if (recentlyhighlightingspade > 0 && (spadebuttoncount - 1) != (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)))
338
                            spadebuttoncount = recentlyhighlightingspadevalue;
339
                    }
340
                    else if ((heartbuttoncount - 1) == (global.bmenucoord[0][global.charturn] + (rouxlsbuttoncount_y * 5)))
341
                    {
342
                        buttonspeed++;
343
                        snd_play(snd_coin);
344
                        heartsuccesscon = 1;
345
                        spadebuttontimer = 0;
346
                    }
347
                    else
348
                    {
349
                        snd_play(snd_error);
350
                        spadesuccesscon = 1;
351
                        spadefail = true;
352
                    }
353
                    if (obj_rouxls_ch3_enemy.phase > 1)
354
                    {
355
                    }
356
                }
357
                rouxlsbuttonendcon = 0;
358
                rouxlsbuttonendcon = 0;
359
                if (dogcon < 1)
360
                    rouxlsbuttonendcon = 0;
361
                if (dogcon > 0)
362
                {
363
                    dogselectedcount++;
364
                    if (global.charturn == 2 && dogselectedcount < 9)
365
                    {
366
                        rouxlsbuttonendcon = 1;
367
                    }
368
                    else if (global.charturn == 2 && dogselectedcount >= 9)
369
                    {
370
                        rouxlsbuttonendcon = 0;
371
                        obj_rouxls_ch3_enemy.dogtrigger = 1;
372
                    }
373
                    else
374
                    {
375
                        rouxlsbuttonendcon = 0;
376
                    }
377
                }
378
                exit;
379
            }
380
            if (global.bmenucoord[0][global.charturn] == 0)
381
                global.bmenuno = 1;
382
            if (global.bmenucoord[0][global.charturn] == 1 && global.char[global.charturn] != 1)
383
            {
384
                onebuffer = 1;
385
                global.bmenuno = 2;
386
            }
387
            else if (global.bmenucoord[0][global.charturn] == 1)
388
            {
389
                onebuffer = 1;
390
                global.bmenuno = 11;
391
            }
392
            if (global.bmenucoord[0][global.charturn] == 2 && tempitem[0][global.charturn] != 0)
393
            {
394
                onebuffer = 1;
395
                global.bmenuno = 4;
396
                
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);
397
                for (i = 0; i < 12; i += 1)
398
                {
399
                    if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0 && global.bmenucoord[4][global.charturn] > 0)
400
                        global.bmenucoord[4][global.charturn] -= 1;
401
                }
402
            }
403
            if (global.bmenucoord[0][global.charturn] == 3)
404
            {
405
                onebuffer = 1;
406
                global.bmenuno = 12;
407
            }
408
            if (global.bmenucoord[0][global.charturn] == 4)
409
            {
410
                
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; if (global.chapter == 3 && i_ex(obj_gameshow_battlemanager)) obj_gameshow_battlemanager.tpgained += arg0; if (global.chapter == 3) { obj_battlecontroller.mercytotal += arg0; if (obj_battlecontroller.mercytotal < 0) obj_battlecontroller.mercytotal = 0; if (obj_battlecontroller.mercytotal >= 250) obj_battlecontroller.mercytotal = 250; } }
(40);
411
                if (global.chapter == 3)
412
                    idefendedthisturn++;
413
                global.faceaction[global.charturn] = 4;
414
                global.charaction[global.charturn] = 10;
415
                
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
416
            }
417
        }
418
        var rouxlsbattle = false;
419
        if (global.chapter == 3 && i_ex(obj_rouxls_ch3_enemy))
420
            rouxlsbattle = true;
421
        if (button2_p() == 1 && onebuffer < 0 && global.charturn > 0 && rouxlsbattle == false)
422
        {
423
            twobuffer = 1;
424
            movenoise = 1;
425
            
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 (idefendedthisturn > 0) { idefendedthisturn--; mercytotal -= 40; } 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]; } }
();
426
        }
427
        with (battlewriter)
428
            depth = 3;
429
        with (obj_face_parent)
430
            depth = 3;
431
        with (obj_smallface)
432
            depth = 3;
433
    }
434
    if (global.bmenuno == 2 && global.flag[34 disable_monster_acts] == 1)
435
    {
436
        with (battlewriter)
437
            skipme = 1;
438
        with (battlewriter)
439
            depth = 10;
440
        with (obj_face_parent)
441
            depth = 10;
442
        with (obj_smallface)
443
            depth = 10;
444
        thischar = global.char[global.charturn];
445
        if (right_p() || left_p())
446
        {
447
            cango = 1;
448
            spellcoord = global.bmenucoord[2][global.charturn];
449
            if (spellcoord < 11)
450
            {
451
                if (global.spell[thischar][global.bmenucoord[2][global.charturn] + 1] == 0)
452
                {
453
                    cango = 0;
454
                    if ((spellcoord % 2) == 1 && spellcoord > 0)
455
                        global.bmenucoord[2][global.charturn] -= 1;
456
                }
457
            }
458
            else
459
            {
460
                global.bmenucoord[2][global.charturn] -= 1;
461
                cango = 0;
462
            }
463
            if (cango == 1)
464
            {
465
                if ((spellcoord % 2) == 0)
466
                    global.bmenucoord[2][global.charturn] += 1;
467
                else
468
                    global.bmenucoord[2][global.charturn] -= 1;
469
            }
470
        }
471
        if (down_p())
472
        {
473
            spellcoord = global.bmenucoord[2][global.charturn];
474
            cango = 1;
475
            if (spellcoord >= 10)
476
            {
477
                cango = 0;
478
            }
479
            else
480
            {
481
                if (global.spell[thischar][spellcoord + 2] == 0)
482
                    cango = 0;
483
                if (spellcoord == 5 && global.spell[thischar][6] != 0 && global.spell[thischar][7] == 0)
484
                    cango = 2;
485
            }
486
            if (cango != 0)
487
            {
488
                if (cango == 1)
489
                    global.bmenucoord[2][global.charturn] += 2;
490
                if (cango == 2)
491
                    global.bmenucoord[2][global.charturn] = 6;
492
            }
493
        }
494
        if (up_p())
495
        {
496
            spellcoord = global.bmenucoord[2][global.charturn];
497
            cango = 1;
498
            if (spellcoord <= 1)
499
                cango = 0;
500
            if (cango == 1)
501
                global.bmenucoord[2][global.charturn] -= 2;
502
        }
503
        global.tensionselect = global.spellcost[thischar][global.bmenucoord[2][global.charturn]];
504
        if (button1_p() && global.spell[thischar][global.bmenucoord[2][global.charturn]] != 0 && onebuffer < 0)
505
        {
506
            if (global.spellcost[thischar][global.bmenucoord[2][global.charturn]] <= global.tension)
507
            {
508
                onebuffer = 2;
509
                global.bmenuno = 0;
510
                selnoise = 1;
511
                
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 == 3) spelldesc = stringsetloc(
Many different skills.#It has nothing to do with magic.
"Many different skills.#It has nothing to do with magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0_b"
);
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]]);
512
                if (spelltarget == 0)
513
                    
scr_spellconsumeb
scr_spellconsumeb

function
scr_spellconsumeb()
{ global.tension -= floor(floor((cost / global.maxtension) * 100) * 2.5); 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();
}
();
514
                if (spelltarget == 1)
515
                    global.bmenuno = 8;
516
                if (spelltarget == 2)
517
                    global.bmenuno = 3;
518
            }
519
        }
520
        if (button2_p() && onebuffer < 0)
521
        {
522
            global.tensionselect = 0;
523
            twobuffer = 1;
524
            global.bmenuno = 0;
525
            movenoise = 1;
526
        }
527
    }
528
    if (global.bmenuno == 2 && global.flag[34 disable_monster_acts] == 0)
529
    {
530
        with (battlewriter)
531
            skipme = 1;
532
        with (battlewriter)
533
            depth = 10;
534
        with (obj_face_parent)
535
            depth = 10;
536
        with (obj_smallface)
537
            depth = 10;
538
        thischar = global.charturn;
539
        if (right_p() || left_p())
540
        {
541
            cango = 1;
542
            spellcoord = global.bmenucoord[2][global.charturn];
543
            if (spellcoord < 11)
544
            {
545
                if (global.battlespell[thischar][global.bmenucoord[2][global.charturn] + 1] == 0)
546
                {
547
                    cango = 0;
548
                    if ((spellcoord % 2) == 1 && spellcoord > 0)
549
                        global.bmenucoord[2][global.charturn] -= 1;
550
                }
551
            }
552
            else
553
            {
554
                global.bmenucoord[2][global.charturn] -= 1;
555
                cango = 0;
556
            }
557
            if (cango == 1)
558
            {
559
                if ((spellcoord % 2) == 0)
560
                    global.bmenucoord[2][global.charturn] += 1;
561
                else
562
                    global.bmenucoord[2][global.charturn] -= 1;
563
            }
564
        }
565
        if (down_p())
566
        {
567
            spellcoord = global.bmenucoord[2][global.charturn];
568
            cango = 1;
569
            if (spellcoord >= 10)
570
            {
571
                cango = 0;
572
            }
573
            else
574
            {
575
                if (global.battlespell[thischar][spellcoord + 2] == 0)
576
                    cango = 0;
577
                if (spellcoord == 5 && global.battlespell[thischar][6] != 0 && global.battlespell[thischar][7] == 0)
578
                    cango = 2;
579
            }
580
            if (cango != 0)
581
            {
582
                if (cango == 1)
583
                    global.bmenucoord[2][global.charturn] += 2;
584
                if (cango == 2)
585
                    global.bmenucoord[2][global.charturn] = 6;
586
            }
587
        }
588
        if (up_p())
589
        {
590
            spellcoord = global.bmenucoord[2][global.charturn];
591
            cango = 1;
592
            if (spellcoord <= 1)
593
                cango = 0;
594
            if (cango == 1)
595
                global.bmenucoord[2][global.charturn] -= 2;
596
        }
597
        global.tensionselect = global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]];
598
        var _confirm = true;
599
        var havejeviltail = false;
600
        if (global.chararmor1[1] == 7 || global.chararmor2[1] == 7 || global.chararmor1[2] == 7 || global.chararmor2[2] == 7 || global.chararmor1[3] == 7 || global.chararmor2[3] == 7)
601
            havejeviltail = true;
602
        if (i_ex(obj_pippins_enemy) && global.battlespellname[thischar][global.bmenucoord[2][global.charturn]] == global.actname[obj_pippins_enemy.myself][3] && global.flag[1044 points] < 150)
603
            _confirm = false;
604
        if (!havejeviltail && i_ex(obj_tenna_enemy_bg) && i_ex(obj_tenna_enemy) && obj_tenna_enemy_bg.myscore < 20 && global.battlespellname[thischar][global.bmenucoord[2][global.charturn]] == global.actnamesus[obj_tenna_enemy.myself][1])
605
            _confirm = false;
606
        if (havejeviltail && i_ex(obj_tenna_enemy_bg) && i_ex(obj_tenna_enemy) && obj_tenna_enemy_bg.myscore < 30 && global.battlespellname[thischar][global.bmenucoord[2][global.charturn]] == global.actnamesus[obj_tenna_enemy.myself][1])
607
            _confirm = false;
608
        if (button1_p() && global.battlespell[thischar][global.bmenucoord[2][global.charturn]] != 0 && onebuffer < 0 && _confirm == true)
609
        {
610
            if (global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]] <= global.tension)
611
            {
612
                onebuffer = 2;
613
                global.bmenuno = 0;
614
                selnoise = 1;
615
                if (global.battlespell[thischar][global.bmenucoord[2][global.charturn]] != -1)
616
                {
617
                    
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 == 3) spelldesc = stringsetloc(
Many different skills.#It has nothing to do with magic.
"Many different skills.#It has nothing to do with magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0_b"
);
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]]);
618
                    if (spelltarget == 0)
619
                        
scr_spellconsumeb
scr_spellconsumeb

function
scr_spellconsumeb()
{ global.tension -= floor(floor((cost / global.maxtension) * 100) * 2.5); 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();
}
();
620
                    if (spelltarget == 1)
621
                        global.bmenuno = 8;
622
                    if (spelltarget == 2)
623
                        global.bmenuno = 3;
624
                    if (spelltarget == 3)
625
                        global.bmenuno = 99;
626
                }
627
                else
628
                {
629
                    global.bmenuno = 13;
630
                }
631
            }
632
        }
633
        if (button2_p() && onebuffer < 0)
634
        {
635
            global.tensionselect = 0;
636
            twobuffer = 1;
637
            global.bmenuno = 0;
638
            movenoise = 1;
639
        }
640
    }
641
    if (global.bmenuno == 4)
642
    {
643
        with (battlewriter)
644
            skipme = 1;
645
        with (battlewriter)
646
            depth = 10;
647
        with (obj_face_parent)
648
            depth = 10;
649
        with (obj_smallface)
650
            depth = 10;
651
        if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0)
652
            global.bmenucoord[4][global.charturn] -= 1;
653
        if (right_p())
654
        {
655
            cango = 1;
656
            itemcoord = global.bmenucoord[4][global.charturn];
657
            if (itemcoord < 11)
658
            {
659
                if (tempitem[global.bmenucoord[4][global.charturn] + 1][global.charturn] == 0)
660
                {
661
                    cango = 0;
662
                    if ((itemcoord % 2) == 1 && itemcoord > 0)
663
                        global.bmenucoord[4][global.charturn] -= 1;
664
                }
665
            }
666
            else
667
            {
668
                global.bmenucoord[4][global.charturn] -= 1;
669
                cango = 0;
670
            }
671
            if (cango == 1)
672
            {
673
                if ((itemcoord % 2) == 0)
674
                    global.bmenucoord[4][global.charturn] += 1;
675
                else
676
                    global.bmenucoord[4][global.charturn] -= 1;
677
            }
678
        }
679
        if (left_p())
680
        {
681
            cango = 1;
682
            itemcoord = global.bmenucoord[4][global.charturn];
683
            if (tempitem[1][global.charturn] != 0)
684
            {
685
                if ((itemcoord % 2) == 0)
686
                    global.bmenucoord[4][global.charturn] += 1;
687
                else
688
                    global.bmenucoord[4][global.charturn] -= 1;
689
            }
690
        }
691
        if (down_p())
692
        {
693
            itemcoord = global.bmenucoord[4][global.charturn];
694
            cango = 1;
695
            if (itemcoord >= 10)
696
            {
697
                cango = 0;
698
            }
699
            else
700
            {
701
                if (tempitem[itemcoord + 2][global.charturn] == 0)
702
                    cango = 0;
703
                if (itemcoord == 5 && tempitem[6][global.charturn] != 0 && tempitem[7][global.charturn] == 0)
704
                    cango = 2;
705
            }
706
            if (cango != 0)
707
            {
708
                if (cango == 1)
709
                    global.bmenucoord[4][global.charturn] += 2;
710
                if (cango == 2)
711
                    global.bmenucoord[4][global.charturn] = 6;
712
            }
713
        }
714
        if (up_p())
715
        {
716
            itemcoord = global.bmenucoord[4][global.charturn];
717
            cango = 1;
718
            if (itemcoord <= 1)
719
                cango = 0;
720
            if (cango == 1)
721
                global.bmenucoord[4][global.charturn] -= 2;
722
        }
723
        if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0)
724
            global.bmenucoord[4][global.charturn] -= 1;
725
        if (button1_p() && tempitem[global.bmenucoord[4][global.charturn]][global.charturn] != 0 && onebuffer < 0)
726
        {
727
            onebuffer = 2;
728
            global.bmenuno = 0;
729
            selnoise = 1;
730
            
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; if (global.chapter == 3) healamount = 150; if (global.chapter >= 4) healamount = 160; 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; ...
(tempitem[global.bmenucoord[4][global.charturn]][global.charturn]);
731
            if (itemtarget == 0 || itemtarget == 2)
732
            {
733
                var item_use = false;
734
                var _tensionhealed = 0;
735
                if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 27)
736
                {
737
                    
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; if (global.chapter == 3 && i_ex(obj_gameshow_battlemanager)) obj_gameshow_battlemanager.tpgained += arg0; if (global.chapter == 3) { obj_battlecontroller.mercytotal += arg0; if (obj_battlecontroller.mercytotal < 0) obj_battlecontroller.mercytotal = 0; if (obj_battlecontroller.mercytotal >= 250) obj_battlecontroller.mercytotal = 250; } }
(80);
738
                    _tensionhealed = 1;
739
                    item_use = true;
740
                }
741
                if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 28)
742
                {
743
                    
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; if (global.chapter == 3 && i_ex(obj_gameshow_battlemanager)) obj_gameshow_battlemanager.tpgained += arg0; if (global.chapter == 3) { obj_battlecontroller.mercytotal += arg0; if (obj_battlecontroller.mercytotal < 0) obj_battlecontroller.mercytotal = 0; if (obj_battlecontroller.mercytotal >= 250) obj_battlecontroller.mercytotal = 250; } }
(ceil(global.maxtension / 2));
744
                    _tensionhealed = 1;
745
                    item_use = true;
746
                }
747
                if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 29)
748
                {
749
                    
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; if (global.chapter == 3 && i_ex(obj_gameshow_battlemanager)) obj_gameshow_battlemanager.tpgained += arg0; if (global.chapter == 3) { obj_battlecontroller.mercytotal += arg0; if (obj_battlecontroller.mercytotal < 0) obj_battlecontroller.mercytotal = 0; if (obj_battlecontroller.mercytotal >= 250) obj_battlecontroller.mercytotal = 250; } }
(ceil(global.maxtension));
750
                    _tensionhealed = 1;
751
                    item_use = true;
752
                }
753
                if (_tensionhealed)
754
                {
755
                    var _drivenoise = snd_play(snd_cardrive);
756
                    snd_pitch(_drivenoise, 1.4);
757
                    snd_volume(_drivenoise, 0.8, 0);
758
                    with (global.charinstance[global.charturn])
759
                    {
760
                        ha = instance_create(x, y, obj_healanim);
761
                        ha.target = id;
762
                        ha.particlecolor = c_orange;
763
                    }
764
                    
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);
765
                    
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
766
                }
767
                if (!_tensionhealed)
768
                    
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();
}
();
769
                if (item_use == true)
770
                {
771
                    with (obj_event_manager)
772
                        trigger_event(UnknownEnum.Value_0, get_consumer_trophy());
773
                }
774
            }
775
            if (itemtarget == 1)
776
                global.bmenuno = 7;
777
        }
778
        if (button2_p() && onebuffer < 0)
779
        {
780
            twobuffer = 1;
781
            global.bmenuno = 0;
782
            movenoise = 1;
783
        }
784
    }
785
    if (global.bmenuno == 9)
786
    {
787
        thisenemy = global.bmenucoord[11][global.charturn];
788
        
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);
789
        if (right_p())
790
        {
791
            cango = 1;
792
            actcoord = global.bmenucoord[9][global.charturn];
793
            if (actcoord < 5)
794
            {
795
                if (canact[global.bmenucoord[9][global.charturn] + 1] == 0)
796
                {
797
                    cango = 0;
798
                    if ((actcoord % 2) == 1 && actcoord > 0)
799
                        global.bmenucoord[9][global.charturn] -= 1;
800
                }
801
            }
802
            else
803
            {
804
                global.bmenucoord[9][global.charturn] -= 1;
805
                cango = 0;
806
            }
807
            if (cango == 1)
808
            {
809
                if ((actcoord % 2) == 0)
810
                    global.bmenucoord[9][global.charturn] += 1;
811
                else
812
                    global.bmenucoord[9][global.charturn] -= 1;
813
            }
814
        }
815
        if (left_p())
816
        {
817
            cango = 1;
818
            actcoord = global.bmenucoord[9][global.charturn];
819
            if ((actcoord % 2) == 0)
820
            {
821
                if (canact[actcoord + 1] != 0)
822
                    global.bmenucoord[9][global.charturn] += 1;
823
            }
824
            else
825
            {
826
                global.bmenucoord[9][global.charturn] -= 1;
827
            }
828
        }
829
        if (down_p())
830
        {
831
            actcoord = global.bmenucoord[9][global.charturn];
832
            cango = 1;
833
            if (actcoord >= 4)
834
                cango = 0;
835
            else if (canact[actcoord + 2] == 0)
836
                cango = 0;
837
            if (cango != 0)
838
            {
839
                if (cango == 1)
840
                    global.bmenucoord[9][global.charturn] += 2;
841
            }
842
        }
843
        if (up_p())
844
        {
845
            actcoord = global.bmenucoord[9][global.charturn];
846
            cango = 1;
847
            if (actcoord <= 1)
848
                cango = 0;
849
            if (cango == 1)
850
                global.bmenucoord[9][global.charturn] -= 2;
851
        }
852
        global.tensionselect = acttpcost[global.bmenucoord[9][global.charturn]];
853
        canpress = 1;
854
        if (global.char[global.charturn] == 1)
855
        {
856
            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)
857
            {
858
                if (havechar[1] == 0 || global.hp[2] <= 0)
859
                    canpress = 0;
860
            }
861
            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)
862
            {
863
                if (havechar[2] == 0 || global.hp[3] <= 0)
864
                    canpress = 0;
865
            }
866
            if (global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 5)
867
            {
868
                if (havechar[3] == 0 || global.hp[4] <= 0)
869
                    canpress = 0;
870
            }
871
        }
872
        var _confirm = true;
873
        if (global.flag[1044 points] < 150 && i_ex(obj_pippins_enemy) && global.actname[thisenemy][global.bmenucoord[9][global.charturn]] == global.actname[obj_pippins_enemy.myself][3])
874
            _confirm = false;
875
        var havejeviltail = false;
876
        if (global.chararmor1[1] == 7 || global.chararmor2[1] == 7 || global.chararmor1[2] == 7 || global.chararmor2[2] == 7 || global.chararmor1[3] == 7 || global.chararmor2[3] == 7)
877
            havejeviltail = true;
878
        if (!havejeviltail)
879
        {
880
            if (i_ex(obj_tenna_enemy_bg) && i_ex(obj_tenna_enemy) && obj_tenna_enemy_bg.myscore < 20 && global.actname[thisenemy][global.bmenucoord[9][global.charturn]] == global.actnamesus[obj_tenna_enemy.myself][1])
881
                _confirm = false;
882
        }
883
        if (havejeviltail)
884
        {
885
            if (i_ex(obj_tenna_enemy_bg) && i_ex(obj_tenna_enemy) && obj_tenna_enemy_bg.myscore < 30 && global.actname[thisenemy][global.bmenucoord[9][global.charturn]] == global.actnamesus[obj_tenna_enemy.myself][1])
886
                _confirm = false;
887
        }
888
        if (canpress == 1)
889
        {
890
            if (button1_p() && global.canact[thisenemy][global.bmenucoord[9][global.charturn]] == 1 && global.tension >= global.tensionselect && _confirm && onebuffer < 0)
891
            {
892
                onebuffer = 2;
893
                global.bmenuno = 0;
894
                selnoise = 1;
895
                global.actingchoice[global.charturn] = global.bmenucoord[9][global.charturn];
896
                global.tension -= acttpcost[global.bmenucoord[9][global.charturn]];
897
                global.tensionselect = 0;
898
                
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]);
899
                global.bmenucoord[9][global.charturn] = 0;
900
                
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
901
            }
902
        }
903
        if (button2_p() && onebuffer < 0)
904
        {
905
            global.bmenucoord[9][global.charturn] = 0;
906
            global.tensionselect = 0;
907
            twobuffer = 1;
908
            global.bmenuno = 11;
909
            movenoise = 1;
910
        }
911
    }
912
    if (global.bmenuno == 7 || global.bmenuno == 1 || global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
913
    {
914
        with (battlewriter)
915
            skipme = 1;
916
        with (battlewriter)
917
            depth = 10;
918
        with (obj_face_parent)
919
            depth = 10;
920
        with (obj_smallface)
921
            depth = 10;
922
        if (button2_p() && onebuffer < 0)
923
        {
924
            twobuffer = 1;
925
            if (global.bmenuno == 1 || global.bmenuno == 11 || global.bmenuno == 12)
926
                global.bmenuno = 0;
927
            if (global.bmenuno == 7)
928
                global.bmenuno = 4;
929
            if (global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 13)
930
                global.bmenuno = 2;
931
            movenoise = 1;
932
        }
933
        if (global.bmenuno == 7 || global.bmenuno == 1 || global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
934
        {
935
            if (global.bmenuno == 7 || global.bmenuno == 8)
936
            {
937
                for (i = 0; i < 3; i += 1)
938
                {
939
                    ht[i] = 0;
940
                    if (global.char[i] > 0)
941
                        ht[i] = 1;
942
                }
943
            }
944
            if (global.bmenuno == 1 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
945
            {
946
                for (i = 0; i < 3; i += 1)
947
                    ht[i] = global.monster[i];
948
            }
949
            if (global.bmenucoord[global.bmenuno][global.charturn] == 2 && ht[2] == 0)
950
                global.bmenucoord[global.bmenuno][global.charturn] = 0;
951
            if (global.bmenucoord[global.bmenuno][global.charturn] == 0 && ht[0] == 0)
952
                global.bmenucoord[global.bmenuno][global.charturn] = 1;
953
            if (global.bmenucoord[global.bmenuno][global.charturn] == 1 && ht[1] == 0)
954
                global.bmenucoord[global.bmenuno][global.charturn] = 0;
955
            if (global.bmenucoord[global.bmenuno][global.charturn] == 0 && ht[0] == 0)
956
                global.bmenucoord[global.bmenuno][global.charturn] = 2;
957
            if (down_p() == 1)
958
            {
959
                if (global.bmenucoord[global.bmenuno][global.charturn] == 0)
960
                {
961
                    if (ht[1] == 1)
962
                    {
963
                        movenoise = 1;
964
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
965
                    }
966
                    else if (ht[2] == 1)
967
                    {
968
                        movenoise = 1;
969
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
970
                    }
971
                }
972
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 1)
973
                {
974
                    if (ht[2] == 1)
975
                    {
976
                        movenoise = 1;
977
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
978
                    }
979
                    else if (ht[0] == 1)
980
                    {
981
                        movenoise = 1;
982
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
983
                    }
984
                }
985
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 2)
986
                {
987
                    if (ht[0] == 1)
988
                    {
989
                        movenoise = 1;
990
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
991
                    }
992
                    else if (ht[1] == 1)
993
                    {
994
                        movenoise = 1;
995
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
996
                    }
997
                }
998
            }
999
            if (up_p() == 1)
1000
            {
1001
                if (global.bmenucoord[global.bmenuno][global.charturn] == 0)
1002
                {
1003
                    if (ht[2] == 1)
1004
                    {
1005
                        movenoise = 1;
1006
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
1007
                    }
1008
                    else if (ht[1] == 1)
1009
                    {
1010
                        movenoise = 1;
1011
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
1012
                    }
1013
                }
1014
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 1)
1015
                {
1016
                    if (ht[0] == 1)
1017
                    {
1018
                        movenoise = 1;
1019
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
1020
                    }
1021
                    else if (ht[2] == 1)
1022
                    {
1023
                        movenoise = 1;
1024
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
1025
                    }
1026
                }
1027
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 2)
1028
                {
1029
                    if (ht[1] == 1)
1030
                    {
1031
                        movenoise = 1;
1032
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
1033
                    }
1034
                    else if (ht[0] == 1)
1035
                    {
1036
                        movenoise = 1;
1037
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
1038
                    }
1039
                }
1040
            }
1041
            if (button1_p() && onebuffer < 0)
1042
            {
1043
                onebuffer = 1;
1044
                selnoise = 1;
1045
                if (global.bmenuno == 1)
1046
                {
1047
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
1048
                    global.faceaction[global.charturn] = 1;
1049
                    global.charaction[global.charturn] = 1;
1050
                    
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
1051
                }
1052
                if (global.bmenuno == 7)
1053
                {
1054
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
1055
                    
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();
}
();
1056
                }
1057
                if (global.bmenuno == 8 || global.bmenuno == 3)
1058
                {
1059
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
1060
                    
scr_spellconsumeb
scr_spellconsumeb

function
scr_spellconsumeb()
{ global.tension -= floor(floor((cost / global.maxtension) * 100) * 2.5); 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();
}
();
1061
                }
1062
                if (global.bmenuno == 11)
1063
                {
1064
                    global.bmenuno = 9;
1065
                    actcoord = global.bmenucoord[9][global.charturn];
1066
                    thisenemy = global.bmenucoord[11][global.charturn];
1067
                    if (global.char[global.charturn] == 1)
1068
                    {
1069
                        for (i = 0; i < 6; i += 1)
1070
                        {
1071
                            if (global.canact[thisenemy][actcoord] == 0)
1072
                            {
1073
                                if (actcoord > 0)
1074
                                    global.bmenucoord[9][global.charturn] -= 1;
1075
                            }
1076
                        }
1077
                    }
1078
                    if (global.char[global.charturn] == 2)
1079
                    {
1080
                        for (i = 0; i < 6; i += 1)
1081
                        {
1082
                            if (global.canactsus[thisenemy][actcoord] == 0)
1083
                            {
1084
                                if (actcoord > 0)
1085
                                    global.bmenucoord[9][global.charturn] -= 1;
1086
                            }
1087
                        }
1088
                    }
1089
                    if (global.char[global.charturn] == 3)
1090
                    {
1091
                        for (i = 0; i < 6; i += 1)
1092
                        {
1093
                            if (global.canactral[thisenemy][actcoord] == 0)
1094
                            {
1095
                                if (actcoord > 0)
1096
                                    global.bmenucoord[9][global.charturn] -= 1;
1097
                            }
1098
                        }
1099
                    }
1100
                    if (global.char[global.charturn] == 4)
1101
                    {
1102
                        for (i = 0; i < 6; i += 1)
1103
                        {
1104
                            if (global.canactnoe[thisenemy][actcoord] == 0)
1105
                            {
1106
                                if (actcoord > 0)
1107
                                    global.bmenucoord[9][global.charturn] -= 1;
1108
                            }
1109
                        }
1110
                    }
1111
                    onebuffer = 1;
1112
                }
1113
                if (global.bmenuno == 12)
1114
                {
1115
                    global.faceaction[global.charturn] = 10;
1116
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
1117
                    global.charaction[global.charturn] = 2;
1118
                    global.charspecial[global.charturn] = 100;
1119
                    
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
1120
                }
1121
                if (global.bmenuno == 13)
1122
                {
1123
                    onebuffer = 2;
1124
                    global.bmenuno = 0;
1125
                    selnoise = 1;
1126
                    global.actingchoice[global.charturn] = global.bmenucoord[2][global.charturn];
1127
                    global.tension -= global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]];
1128
                    global.tensionselect = 0;
1129
                    
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]);
1130
                    
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]);
1131
                    
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();
} var endturn = false; if (global.charturn == 2 && global.chapter == 3 && i_ex(obj_heroralsei) && (obj_heroralsei.sprite_index == spr_ralseib_yarn_1 || obj_heroralsei.sprite_index == spr_ralseib_yarn_2)) endturn = true; if ((global.charturn == 2 && moveswapped == 0) || endturn == true)
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]; } }
();
1132
                }
1133
            }
1134
        }
1135
    }
1136
}
1137
if (movenoise == 1)
1138
{
1139
    snd_play(snd_menumove);
1140
    movenoise = 0;
1141
}
1142
if (grazenoise == 1)
1143
{
1144
    snd_play(snd_graze);
1145
    grazenoise = 0;
1146
}
1147
if (selnoise == 1)
1148
{
1149
    snd_play(snd_select);
1150
    selnoise = 0;
1151
}
1152
if (damagenoise == 1)
1153
{
1154
    snd_play(snd_damage);
1155
    damagenoise = 0;
1156
}
1157
if (laznoise == 1)
1158
{
1159
    snd_play(snd_laz_c);
1160
    laznoise = 0;
1161
}
1162
onebuffer -= 1;
1163
twobuffer -= 1;
1164
lbuffer -= 1;
1165
rbuffer -= 1;
1166
if (global.mnfight == 2 && timeron == 1)
1167
{
1168
    global.turntimer -= 1;
1169
    if (global.turntimer <= 0 && reset == 0)
1170
    {
1171
        with (obj_bulletparent)
1172
            instance_destroy();
1173
        with (obj_bulletgenparent)
1174
            instance_destroy();
1175
        with (obj_darkener)
1176
            darken = 0;
1177
        with (obj_heart)
1178
        {
1179
            instance_create(x, y, obj_returnheart);
1180
            instance_destroy();
1181
        }
1182
        reset = 1;
1183
        if (noreturn == 0)
1184
            alarm[2]
 = 15;
gml_Object_obj_battlecontroller_Alarm_2.gml

reset = 0;
scr_mnendturn();
1185
    }
1186
}
1187
if (global.myfight == 3)
1188
{
1189
    if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() == 0 && !instance_exists(obj_writer))
1190
    {
1191
        
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; } }
();
1192
        if (global.myfight == 3)
1193
            
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(); if (global.chapter == 3 && i_ex(obj_tennabattleconvo_controller) && (obj_tennabattleconvo_controller.chattedduringbulletphase == true || obj_tennabattleconvo_controller.introcon < 3)) { } else { with (obj_face) instance_destroy(); } with (obj_smallface) instance_destroy(); if (global.chapter == 3) idefendedthisturn = 0; 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.acting[0] == 1 && global.actingsimul[0] == 1)
scr_act_simul();
} with (obj_battlecontroller) { messagepriority = -1; attackpriority = -1; } }
();
1194
    }
1195
}
1196
if (global.myfight == 5)
1197
{
1198
    myfightreturntimer--;
1199
    if (myfightreturntimer <= 0)
1200
    {
1201
        
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();
if (global.chapter == 3 && i_ex(obj_rouxls_ch3_enemy)) { global.bmenucoord[0][0] = 2; global.bmenucoord[0][1] = 2; global.bmenucoord[0][2] = 2; if (obj_battlecontroller.rouxlsgridenabled == true) obj_battlecontroller.rouxlsbuttoncount_y = 4; } if (global.chapter == 3) { with (obj_gameshow_battlemanager) turns++; } 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) { if (global.chapter == 3 && i_ex(obj_knight_enemy)) { } else { 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; ...
();
1202
        global.spelldelay = 10;
1203
        with (obj_heroparent)
1204
        {
1205
            attacktimer = 0;
1206
            image_index = 0;
1207
            index = 0;
1208
            itemed = 0;
1209
            acttimer = 0;
1210
            defendtimer = 0;
1211
            state = 0;
1212
            flash = 0;
1213
            siner = 0;
1214
            fsiner = 0;
1215
alarm[4]
1216
        }
1217
        with (obj_spellphase)
1218
        {
1219
            with (spellwriter)
1220
                instance_destroy();
1221
            instance_destroy();
1222
        }
1223
    }
1224
}
1225
if (global.charweapon[4] == 13)
1226
{
1227
    if ((t_siner % 6) == 0)
1228
    {
1229
        if (global.hp[4] > round(global.maxhp[4] / 3))
1230
            global.hp[4]--;
1231
    }
1232
}
1233
t_siner++;
1234
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
1235
{
1236
    
scr_turn_skip
scr_turn_skip

function
scr_turn_skip()
{ if (scr_debug &&
scr_debug_keycheck(ord("V")) && global.turntimer > 0 && instance_exists(obj_growtangle) && 
scr_isphase("bullets"))
{ global.turntimer = 0;
scr_debug_print("Attack skipped");
} }
();
1237
    if (
scr_debug_keycheck
scr_debug_keycheck

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

function
scr_debug_fullheal()
{ }
();
1239
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f3))
1240
        
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--; } }
();
1241
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f5))
1242
        
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; } }
();
1243
    if (
scr_debug_keycheck
scr_debug_keycheck

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

function
scr_weaken_enemies()
{ for (i = 0; i < 3; i++) { if (!global.monster[i]) continue; dm = instance_create(global.monsterx[i], (global.monstery[i] + 20) - (global.hittarget[i] * 20), obj_dmgwriter); dm.damage = global.monsterhp[i] - 1; var _miss = global.monsterhp[i] == 1; global.monsterhp[i] = 1; with (global.monsterinstance[i]) { var _ex = instance_create(x + (sprite_width / 2), y + (sprite_height / 2), obj_animation_dx); _ex.sprite_index = spr_realisticexplosion; _ex.image_xscale = 2; _ex.image_yscale = 2; _ex.depth = obj_dmgwriter.depth + 1; if (!_miss) { shakex = 9; state = 3; hurttimer = 30; } } } }
();
1245
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f8))
1246
        
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 * 30; if (_didhit) { snd_play(snd_hurt1); if (!instance_exists(obj_shake)) instance_create(0, 0, obj_shake); } }
(true);
1247
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f9))
1248
    {
1249
        global.tension = 0;
1250
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("TP set to 0%");
1251
    }
1252
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ var key = arg0; var is_pressed = false; return is_pressed; }
(vk_f10))
1253
    {
1254
        global.tension = 250;
1255
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("TP maxed out!!");
1256
    }
1257
}
1258
var dolose = false;
1259
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
1260
{
1261
    if (keyboard_check_pressed(vk_f11))
1262
        dolose = true;
1263
}
1264
if (global.chapter == 3)
1265
{
1266
    if (room == room_board_1 || room == room_board_2 || room == room_board_3)
1267
    {
1268
        if (dolose || (global.mnfight == 2 && global.hp[1] < 1 && global.hp[2] < 1 && global.hp[3] < 1 && boardend == 0))
1269
        {
1270
            with (obj_heroparent)
1271
                sprite_index = defeatsprite;
1272
            global.specialbattle = 3;
1273
            boardend = 1;
1274
            alarm[11]
 = 1;
gml_Object_obj_battlecontroller_Alarm_11.gml

with (instance_create(0, 0, obj_board_deathevent)) con = 0.5; instance_create_depth(0, 0, 0, obj_gameover_minigame); obj_battlecontroller.noreturn = 1; obj_battlecontroller.intro = 2; with (obj_tensionbar) { alarm[5] hspeed = -10; friction = -0.4; } snd_stop(global.batmusic[1]); if (global.turntimer > 0) global.turntimer = 0; global.fighting = 0; global.boardbattleresult = "lost"; with (obj_dbulletcontroller) instance_destroy(); with (obj_heart) instance_destroy(); with (obj_growtangle) instance_destroy(); with (obj_writer) instance_destroy(); with (obj_face) instance_destroy(); with (obj_lerpvar) instance_destroy(); with (obj_script_delayed) instance_destroy(); with (obj_afterimage_grow) instance_destroy(); with (obj_darkener) instance_destroy(); global.flag[9 battle_music] = 0;
scr_endcombat();
1275
            with (obj_dmgwriter)
1276
                instance_destroy();
1277
        }
1278
    }
1279
}
1280
1281
enum UnknownEnum
1282
{
1283
    Value_0
1284
}