Deltarune (Chapter 4) 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 == 4)
2
{
3
    for (var i = 0; i < instance_number(obj_balthizard_enemy); i++)
4
    {
5
        turtle[i] = instance_find(obj_balthizard_enemy, i);
6
        if (turtle[i].gersonevent == true && turtle[i].gersonintro < 2)
7
            exit;
8
    }
9
    if (i_ex(obj_holywatercooler_enemy) && obj_holywatercooler_enemy.introcon > 0)
10
        exit;
11
    if (soundbattle == true)
12
    {
13
        if (global.myfight == 0 && global.bmenuno == 0 && !i_ex(obj_herokris) && i_ex(obj_sound_of_justice_enemy) && obj_sound_of_justice_enemy.phase == 1)
14
        {
15
            if (global.hp[2] <= (global.maxhp[2] * 0.5) && global.tension >= global.spellcost[2][1])
16
            {
17
                global.bmenuno = 0;
18
                global.bmenucoord[2][global.charturn] = 1;
19
                global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
20
                
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_24_0_b"
);
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_34_0_b"
);
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_45_0_b"
);
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_55_0_b"
);
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_67_0_b"
);
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 == 4) spelldesc = stringsetloc(
Execute various behaviors.#It can't be considered magic.
"Execute various behaviors.#It can't be considered magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0"
);
spelltarget = 0; cost = 0; spellusable = 0; break; case 8: spellname = stringsetloc(
SleepMist
"SleepMist", "scr_spellinfo_slash_scr_spellinfo_gml_96_0"
);
spellnameb = stringsetloc(
Sleep Mist
"Sleep Mist", "scr_spellinfo_slash_scr_spellinfo_gml_97_0"
);
spelldescb = stringsetloc(
Spare#TIRED foes
"Spare#TIRED foes", "scr_spellinfo_slash_scr_spellinfo_gml_98_0"
);
spelldesc = stringsetloc(
A cold mist sweeps through,#sparing all TIRED enemies.
"A cold mist sweeps through,#sparing all TIRED enemies.", "scr_spellinfo_slash_scr_spellinfo_gml_99_0"
);
spelltarget = 0; cost = 80; spellusable = 0; break; case 9: spellname = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_107_0"
);
spellnameb = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_108_0"
);
...
(11);
21
                
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();
}
();
22
                exit;
23
            }
24
            else
25
            {
26
                
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
27
            }
28
        }
29
        if (global.hp[2] < 1)
30
            exit;
31
        if (i_ex(obj_sound_of_justice_enemy) && victory == 0)
32
        {
33
            if (selnoise == 1)
34
            {
35
                snd_play(snd_select);
36
                selnoise = 0;
37
            }
38
            if (obj_sound_of_justice_enemy.kris_phase2_try_attack_con > 0 || obj_sound_of_justice_enemy.susie_phase2_try_attack_con > 0 || obj_sound_of_justice_enemy.intermission1_con > 0 || obj_sound_of_justice_enemy.endingcon > 0 || obj_sound_of_justice_enemy.introcon > 0)
39
                exit;
40
        }
41
    }
42
    if (i_ex(obj_hammer_of_justice_enemy) && obj_hammer_of_justice_enemy.endcon == 5 && obj_hammer_of_justice_enemy.endtimer >= 105)
43
    {
44
    }
45
    else if (i_ex(obj_hammer_of_justice_enemy) && obj_hammer_of_justice_enemy.endcon > 0 && obj_hammer_of_justice_enemy.endtimer > 0 && obj_hammer_of_justice_enemy.end_cutscene_version == 1)
46
    {
47
        exit;
48
    }
49
    else if (i_ex(obj_hammer_of_justice_enemy) && obj_hammer_of_justice_enemy.endcon > 1 && obj_hammer_of_justice_enemy.end_cutscene_version == 1)
50
    {
51
        exit;
52
    }
53
    if (i_ex(obj_elnina_lanino_rematch_controller) && obj_elnina_lanino_rematch_controller.endcon > 0)
54
        exit;
55
    if (i_ex(obj_titan_enemy) && obj_titan_enemy.gerson.sprite_index == spr_gerson_item && global.mnfight != 2)
56
        exit;
57
}
58
if (victory == 1 && victoried == 0)
59
{
60
    global.faceaction[0] = 0;
61
    global.faceaction[1] = 0;
62
    global.faceaction[2] = 0;
63
    global.battleend = 1;
64
    global.mnfight = -1;
65
    global.myfight = 7;
66
    with (battlewriter)
67
        instance_destroy();
68
    with (obj_face)
69
        instance_destroy();
70
    with (obj_smallface)
71
        instance_destroy();
72
    for (var i = 0; i < 5; i += 1)
73
    {
74
        if (global.hp[i] < 1)
75
            global.hp[i] = round(global.maxhp[i] / 8);
76
    }
77
    lastbattlewriter = 32482473284732;
78
    if (skipvictory == 0)
79
    {
80
        global.monstergold[3] += floor(global.tension / 10) * global.chapter;
81
        if (global.charweapon[1] == 8)
82
            global.monstergold[3] += floor(global.monstergold[3] / 20);
83
        if (global.charweapon[1] == 53)
84
            global.monstergold[3] += floor(global.monstergold[3] / 20);
85
        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);
86
        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);
87
        global.monstergold[3] -= global.monstergold[3] * (
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; }
(54) * 0.1);
88
        global.monstergold[3] = floor(global.monstergold[3]);
89
        if (global.flag[37 dojo_active] == 1)
90
            global.monstergold[3] = 0;
91
        global.gold += global.monstergold[3];
92
        global.xp += global.monsterexp[3];
93
        if (global.gold < 0)
94
            global.gold = 0;
95
        global.fc = 0;
96
        global.fe = 0;
97
        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");
98
        if (gersonend == true)
99
            global.battlemsg[0] = stringsetsubloc("* You won^1!&* Got ~1 EXP and ~2 D$.&* Susie's heal power increased!/%", string(global.monsterexp[3]), string(global.monstergold[3]), "obj_battlecontroller_slash_Step_0_gml_101_0");
100
        if (global.flag[37 dojo_active] == 1)
101
            global.battlemsg[0] = stringsetloc(
* You won the battle!Wait for inputClose Message
"* You won the battle!/%", "obj_battlecontroller_slash_Step_0_gml_43_0"
);
102
        if (global.flag[63 violenced_last] == 1)
103
        {
104
            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");
105
            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))
106
                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");
107
            var lvsnd = snd_play_pitch(snd_dtrans_lw, 2);
108
            snd_volume(lvsnd, 0.7, 0);
109
            
scr_levelup
scr_levelup

function
scr_levelup()
{ var krismaxhp = 240; var susiemaxhp = 290; var ralseimaxhp = 210; var encountercountflag = 1580; var attackpluscountflag = 1618; 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[1580] % 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; }
();
110
        }
111
        global.msg[0] = global.battlemsg[0];
112
        global.typer = global.battletyper;
113
        lastbattlewriter = 
scr_battletext
scr_battletext

function
scr_battletext()
{ xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
114
        if (global.flag[38 no_battle_end_msg] == 1)
115
        {
116
            with (lastbattlewriter)
117
                instance_destroy();
118
        }
119
        for (var i = 0; i < 3; i += 1)
120
        {
121
            with (global.charinstance[i])
122
            {
123
                state = 7;
124
                hurt = 0;
125
                hurttimer = 0;
126
            }
127
        }
128
    }
129
    victoried = 1;
130
    victortimer = 0;
131
    if (skipvictory == 1)
132
        victortimer = -20;
133
    with (obj_tensionbar)
134
    {
135
alarm[5]
136
        hspeed = -10;
137
        friction = -0.4;
138
    }
139
}
140
if (victoried == 1)
141
{
142
    victortimer += 1;
143
    if (i_ex(lastbattlewriter) == false && victortimer >= 10)
144
    {
145
        intro = 2;
146
        if (bp <= 0)
147
            
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(); } }
();
148
    }
149
}
150
if (global.myfight == 0)
151
{
152
    if (global.bmenuno == 0)
153
    {
154
        if (!i_ex(battlewriter) || (global.chapter == 2 && !i_ex(battlewriter)))
155
        {
156
            global.msg[0] = global.battlemsg[0];
157
            global.typer = global.battletyper;
158
            if (global.chapter == 4 && facevar == 1)
159
            {
160
                
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("susie");
161
                global.fe = 17;
162
                facevar = 0;
163
            }
164
            if (global.chapter == 4 && facevar == 2)
165
            {
166
                
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 == "gerson" || _speaker == "ger" || _speaker == "gers") global.typer = 85; 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; if (global.chapter == 1) { if (global.plot < 235) global.typer = 36; ...
("susie");
167
                global.fe = 5;
168
                facevar = 0;
169
            }
170
            
scr_battletext
scr_battletext

function
scr_battletext()
{ xx = __view_get(e__VW.XView, 0); yy = __view_get(e__VW.YView, 0); if (global.fc != 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); if (global.fc == 0) battlewriter = instance_create(xx + 30, yy + 376, obj_writer); myface = instance_create(xx + 26, yy + 380, obj_face); with (battlewriter) { dialoguer = 1; facer = 1; if (global.fc == 0 && originalcharline == 33) charline = 26; } return battlewriter; } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
171
        }
172
        if (left_p() == 1 && lbuffer < 0)
173
        {
174
            if (global.bmenucoord[0][global.charturn] == 0)
175
                global.bmenucoord[0][global.charturn] = 4;
176
            else
177
                global.bmenucoord[0][global.charturn] -= 1;
178
            movenoise = 1;
179
            rbuffer = 1;
180
            if (disableitembutton == 1 && global.bmenucoord[0][global.charturn] == 2)
181
                global.bmenucoord[0][global.charturn] = 1;
182
            if (disablesusieattack == 1 && global.charturn == 1 && global.bmenucoord[0][global.charturn] == 0)
183
                global.bmenucoord[0][global.charturn] = 4;
184
        }
185
        if (right_p() == 1 && rbuffer < 0)
186
        {
187
            if (global.bmenucoord[0][global.charturn] == 4)
188
                global.bmenucoord[0][global.charturn] = 0;
189
            else
190
                global.bmenucoord[0][global.charturn] += 1;
191
            movenoise = 1;
192
            lbuffer = 1;
193
            if (disableitembutton == 1 && global.bmenucoord[0][global.charturn] == 2)
194
                global.bmenucoord[0][global.charturn] = 3;
195
            if (disablesusieattack == 1 && global.charturn == 1 && global.bmenucoord[0][global.charturn] == 0)
196
                global.bmenucoord[0][global.charturn] = 1;
197
        }
198
        if (button1_p() == 1 && twobuffer < 0)
199
        {
200
            onebuffer = 1;
201
            selnoise = 1;
202
            if (global.bmenucoord[0][global.charturn] == 0)
203
                global.bmenuno = 1;
204
            if (global.bmenucoord[0][global.charturn] == 1 && global.char[global.charturn] != 1)
205
            {
206
                onebuffer = 1;
207
                global.bmenuno = 2;
208
            }
209
            else if (global.bmenucoord[0][global.charturn] == 1)
210
            {
211
                onebuffer = 1;
212
                global.bmenuno = 11;
213
            }
214
            if (global.bmenucoord[0][global.charturn] == 2 && tempitem[0][global.charturn] != 0)
215
            {
216
                onebuffer = 1;
217
                global.bmenuno = 4;
218
                
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);
219
                for (var i = 0; i < 12; i += 1)
220
                {
221
                    if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0 && global.bmenucoord[4][global.charturn] > 0)
222
                        global.bmenucoord[4][global.charturn] -= 1;
223
                }
224
            }
225
            if (global.bmenucoord[0][global.charturn] == 3)
226
            {
227
                onebuffer = 1;
228
                global.bmenuno = 12;
229
            }
230
            if (global.bmenucoord[0][global.charturn] == 4)
231
            {
232
                if (global.chapter == 4 && (i_ex(obj_titan_spawn_enemy) || i_ex(obj_titan_enemy) || i_ex(obj_jackenstein_enemy) || i_ex(obj_sound_of_justice_enemy)))
233
                    
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ if (i_ex(obj_jackenstein_enemy) && global.tempflag[89] >= 3) global.tension += ceil(arg0 * 1.5); else global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(5);
234
                else
235
                    
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ if (i_ex(obj_jackenstein_enemy) && global.tempflag[89] >= 3) global.tension += ceil(arg0 * 1.5); else global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(40);
236
                global.faceaction[global.charturn] = 4;
237
                global.charaction[global.charturn] = 10;
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
239
            }
240
        }
241
        if (button2_p() == 1 && onebuffer < 0 && global.charturn > 0)
242
        {
243
            twobuffer = 1;
244
            movenoise = 1;
245
            
scr_prevhero
scr_prevhero

function
scr_prevhero()
{ prevturn = global.charturn; moveswapped = 0; if (global.charturn == 1) { if (global.charmove[0] == 1) { global.charturn = 0; moveswapped = 1; } } if (global.charturn == 2) { moveswapped = 1; if (global.charmove[1] == 1 && global.acting[1] == 0) global.charturn = 1; else if (global.charmove[0] == 1) global.charturn = 0; } if (moveswapped == 1) { global.bmenuno = 0; if (global.char[global.charturn] == 4) { with (obj_monsterparent) actingnoe = 0; } if (global.char[global.charturn] == 3) { with (obj_monsterparent) actingral = 0; } if (global.char[global.charturn] == 2) { with (obj_monsterparent) actingsus = 0; } global.actingsingle[global.charturn] = 0; global.actingsimul[global.charturn] = 0; global.faceaction[global.charturn] = 0; global.chartarget[global.charturn] = 0; global.charaction[global.charturn] = 0; global.charspecial[global.charturn] = 0; movenoise = 1; } if (global.charturn == 0) { with (obj_monsterparent) acting = 0; global.acting[0] = 0; global.acting[1] = 0; global.acting[2] = 0; global.faceaction[1] = 0; global.chartarget[1] = 0; global.charaction[1] = 0; global.charspecial[1] = 0; global.faceaction[2] = 0; global.tension = global.temptension[0]; for (i = 0; i < 12; i += 1) tempitem[i][0] = global.item[i]; } else { global.tension = global.temptension[global.charturn]; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][global.charturn - 1]; } }
();
246
        }
247
        with (battlewriter)
248
            depth = 3;
249
        with (obj_face_parent)
250
            depth = 3;
251
        with (obj_smallface)
252
            depth = 3;
253
    }
254
    if (global.bmenuno == 2 && global.flag[34 disable_monster_acts] == 1)
255
    {
256
        with (battlewriter)
257
            skipme = 1;
258
        with (battlewriter)
259
            depth = 10;
260
        with (obj_face_parent)
261
            depth = 10;
262
        with (obj_smallface)
263
            depth = 10;
264
        thischar = global.char[global.charturn];
265
        if (right_p() || left_p())
266
        {
267
            cango = 1;
268
            spellcoord = global.bmenucoord[2][global.charturn];
269
            if (spellcoord < 11)
270
            {
271
                if (global.spell[thischar][global.bmenucoord[2][global.charturn] + 1] == 0)
272
                {
273
                    cango = 0;
274
                    if ((spellcoord % 2) == 1 && spellcoord > 0)
275
                        global.bmenucoord[2][global.charturn] -= 1;
276
                }
277
            }
278
            else
279
            {
280
                global.bmenucoord[2][global.charturn] -= 1;
281
                cango = 0;
282
            }
283
            if (cango == 1)
284
            {
285
                if ((spellcoord % 2) == 0)
286
                    global.bmenucoord[2][global.charturn] += 1;
287
                else
288
                    global.bmenucoord[2][global.charturn] -= 1;
289
            }
290
        }
291
        if (down_p())
292
        {
293
            spellcoord = global.bmenucoord[2][global.charturn];
294
            cango = 1;
295
            if (spellcoord >= 10)
296
            {
297
                cango = 0;
298
            }
299
            else
300
            {
301
                if (global.spell[thischar][spellcoord + 2] == 0)
302
                    cango = 0;
303
                if (spellcoord == 5 && global.spell[thischar][6] != 0 && global.spell[thischar][7] == 0)
304
                    cango = 2;
305
            }
306
            if (cango != 0)
307
            {
308
                if (cango == 1)
309
                    global.bmenucoord[2][global.charturn] += 2;
310
                if (cango == 2)
311
                    global.bmenucoord[2][global.charturn] = 6;
312
            }
313
        }
314
        if (up_p())
315
        {
316
            spellcoord = global.bmenucoord[2][global.charturn];
317
            cango = 1;
318
            if (spellcoord <= 1)
319
                cango = 0;
320
            if (cango == 1)
321
                global.bmenucoord[2][global.charturn] -= 2;
322
        }
323
        global.tensionselect = global.spellcost[thischar][global.bmenucoord[2][global.charturn]];
324
        if (button1_p() && global.spell[thischar][global.bmenucoord[2][global.charturn]] != 0 && onebuffer < 0)
325
        {
326
            if (global.spellcost[thischar][global.bmenucoord[2][global.charturn]] <= global.tension)
327
            {
328
                onebuffer = 2;
329
                global.bmenuno = 0;
330
                selnoise = 1;
331
                
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_24_0_b"
);
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_34_0_b"
);
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_45_0_b"
);
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_55_0_b"
);
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_67_0_b"
);
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 == 4) spelldesc = stringsetloc(
Execute various behaviors.#It can't be considered magic.
"Execute various behaviors.#It can't be considered magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0"
);
spelltarget = 0; cost = 0; spellusable = 0; break; case 8: spellname = stringsetloc(
SleepMist
"SleepMist", "scr_spellinfo_slash_scr_spellinfo_gml_96_0"
);
spellnameb = stringsetloc(
Sleep Mist
"Sleep Mist", "scr_spellinfo_slash_scr_spellinfo_gml_97_0"
);
spelldescb = stringsetloc(
Spare#TIRED foes
"Spare#TIRED foes", "scr_spellinfo_slash_scr_spellinfo_gml_98_0"
);
spelldesc = stringsetloc(
A cold mist sweeps through,#sparing all TIRED enemies.
"A cold mist sweeps through,#sparing all TIRED enemies.", "scr_spellinfo_slash_scr_spellinfo_gml_99_0"
);
spelltarget = 0; cost = 80; spellusable = 0; break; case 9: spellname = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_107_0"
);
spellnameb = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_108_0"
);
...
(global.spell[thischar][global.bmenucoord[2][global.charturn]]);
332
                if (spelltarget == 0)
333
                    
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();
}
();
334
                if (spelltarget == 1)
335
                    global.bmenuno = 8;
336
                if (spelltarget == 2)
337
                    global.bmenuno = 3;
338
            }
339
        }
340
        if (button2_p() && onebuffer < 0)
341
        {
342
            global.tensionselect = 0;
343
            twobuffer = 1;
344
            global.bmenuno = 0;
345
            movenoise = 1;
346
        }
347
    }
348
    if (global.bmenuno == 2 && global.flag[34 disable_monster_acts] == 0)
349
    {
350
        with (battlewriter)
351
            skipme = 1;
352
        with (battlewriter)
353
            depth = 10;
354
        with (obj_face_parent)
355
            depth = 10;
356
        with (obj_smallface)
357
            depth = 10;
358
        thischar = global.charturn;
359
        if (right_p() || left_p())
360
        {
361
            cango = 1;
362
            spellcoord = global.bmenucoord[2][global.charturn];
363
            if (spellcoord < 11)
364
            {
365
                if (global.battlespell[thischar][global.bmenucoord[2][global.charturn] + 1] == 0)
366
                {
367
                    cango = 0;
368
                    if ((spellcoord % 2) == 1 && spellcoord > 0)
369
                        global.bmenucoord[2][global.charturn] -= 1;
370
                }
371
            }
372
            else
373
            {
374
                global.bmenucoord[2][global.charturn] -= 1;
375
                cango = 0;
376
            }
377
            if (cango == 1)
378
            {
379
                if ((spellcoord % 2) == 0)
380
                    global.bmenucoord[2][global.charturn] += 1;
381
                else
382
                    global.bmenucoord[2][global.charturn] -= 1;
383
            }
384
        }
385
        if (down_p())
386
        {
387
            spellcoord = global.bmenucoord[2][global.charturn];
388
            cango = 1;
389
            if (spellcoord >= 10)
390
            {
391
                cango = 0;
392
            }
393
            else
394
            {
395
                if (global.battlespell[thischar][spellcoord + 2] == 0)
396
                    cango = 0;
397
                if (spellcoord == 5 && global.battlespell[thischar][6] != 0 && global.battlespell[thischar][7] == 0)
398
                    cango = 2;
399
            }
400
            if (cango != 0)
401
            {
402
                if (cango == 1)
403
                    global.bmenucoord[2][global.charturn] += 2;
404
                if (cango == 2)
405
                    global.bmenucoord[2][global.charturn] = 6;
406
            }
407
        }
408
        if (up_p())
409
        {
410
            spellcoord = global.bmenucoord[2][global.charturn];
411
            cango = 1;
412
            if (spellcoord <= 1)
413
                cango = 0;
414
            if (cango == 1)
415
                global.bmenucoord[2][global.charturn] -= 2;
416
        }
417
        global.tensionselect = global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]];
418
        if (button1_p() && global.battlespell[thischar][global.bmenucoord[2][global.charturn]] != 0 && onebuffer < 0)
419
        {
420
            if (global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]] <= global.tension)
421
            {
422
                if (global.chapter == 4 && (i_ex(obj_titan_spawn_enemy) || i_ex(obj_titan_enemy) || i_ex(obj_sound_of_justice_enemy)))
423
                {
424
                    if (global.charturn > 0 && global.bmenucoord[2][global.charturn] == 0)
425
                        skipmonsterselection = 1;
426
                }
427
                onebuffer = 2;
428
                global.bmenuno = 0;
429
                selnoise = 1;
430
                if (i_ex(obj_sound_of_justice_enemy))
431
                {
432
                    if (global.bmenucoord[2][global.charturn] == 0)
433
                        obj_sound_of_justice_enemy.susie_phase2_try_attack_con = 1;
434
                    if (global.bmenucoord[2][global.charturn] == 1)
435
                        obj_sound_of_justice_enemy.endingcon = 1;
436
                    
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
437
                    exit;
438
                }
439
                if (global.battlespell[thischar][global.bmenucoord[2][global.charturn]] != -1)
440
                {
441
                    
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_24_0_b"
);
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_34_0_b"
);
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_45_0_b"
);
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_55_0_b"
);
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_67_0_b"
);
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 == 4) spelldesc = stringsetloc(
Execute various behaviors.#It can't be considered magic.
"Execute various behaviors.#It can't be considered magic.", "scr_spellinfo_slash_scr_spellinfo_gml_93_0"
);
spelltarget = 0; cost = 0; spellusable = 0; break; case 8: spellname = stringsetloc(
SleepMist
"SleepMist", "scr_spellinfo_slash_scr_spellinfo_gml_96_0"
);
spellnameb = stringsetloc(
Sleep Mist
"Sleep Mist", "scr_spellinfo_slash_scr_spellinfo_gml_97_0"
);
spelldescb = stringsetloc(
Spare#TIRED foes
"Spare#TIRED foes", "scr_spellinfo_slash_scr_spellinfo_gml_98_0"
);
spelldesc = stringsetloc(
A cold mist sweeps through,#sparing all TIRED enemies.
"A cold mist sweeps through,#sparing all TIRED enemies.", "scr_spellinfo_slash_scr_spellinfo_gml_99_0"
);
spelltarget = 0; cost = 80; spellusable = 0; break; case 9: spellname = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_107_0"
);
spellnameb = stringsetloc(
IceShock
"IceShock", "scr_spellinfo_slash_scr_spellinfo_gml_108_0"
);
...
(global.battlespell[thischar][global.bmenucoord[2][global.charturn]]);
442
                    if (spelltarget == 0)
443
                        
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();
}
();
444
                    if (spelltarget == 1)
445
                        global.bmenuno = 8;
446
                    if (spelltarget == 2)
447
                        global.bmenuno = 3;
448
                    if (spelltarget == 3)
449
                        global.bmenuno = 99;
450
                }
451
                else
452
                {
453
                    global.bmenuno = 13;
454
                }
455
            }
456
        }
457
        if (button2_p() && onebuffer < 0)
458
        {
459
            global.tensionselect = 0;
460
            twobuffer = 1;
461
            global.bmenuno = 0;
462
            movenoise = 1;
463
        }
464
    }
465
    if (global.bmenuno == 4)
466
    {
467
        with (battlewriter)
468
            skipme = 1;
469
        with (battlewriter)
470
            depth = 10;
471
        with (obj_face_parent)
472
            depth = 10;
473
        with (obj_smallface)
474
            depth = 10;
475
        if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0)
476
            global.bmenucoord[4][global.charturn] -= 1;
477
        if (right_p())
478
        {
479
            cango = 1;
480
            itemcoord = global.bmenucoord[4][global.charturn];
481
            if (itemcoord < 11)
482
            {
483
                if (tempitem[global.bmenucoord[4][global.charturn] + 1][global.charturn] == 0)
484
                {
485
                    cango = 0;
486
                    if ((itemcoord % 2) == 1 && itemcoord > 0)
487
                        global.bmenucoord[4][global.charturn] -= 1;
488
                }
489
            }
490
            else
491
            {
492
                global.bmenucoord[4][global.charturn] -= 1;
493
                cango = 0;
494
            }
495
            if (cango == 1)
496
            {
497
                if ((itemcoord % 2) == 0)
498
                    global.bmenucoord[4][global.charturn] += 1;
499
                else
500
                    global.bmenucoord[4][global.charturn] -= 1;
501
            }
502
        }
503
        if (left_p())
504
        {
505
            cango = 1;
506
            itemcoord = global.bmenucoord[4][global.charturn];
507
            if (tempitem[1][global.charturn] != 0)
508
            {
509
                if ((itemcoord % 2) == 0)
510
                    global.bmenucoord[4][global.charturn] += 1;
511
                else
512
                    global.bmenucoord[4][global.charturn] -= 1;
513
            }
514
        }
515
        if (down_p())
516
        {
517
            itemcoord = global.bmenucoord[4][global.charturn];
518
            cango = 1;
519
            if (itemcoord >= 10)
520
            {
521
                cango = 0;
522
            }
523
            else
524
            {
525
                if (tempitem[itemcoord + 2][global.charturn] == 0)
526
                    cango = 0;
527
                if (itemcoord == 5 && tempitem[6][global.charturn] != 0 && tempitem[7][global.charturn] == 0)
528
                    cango = 2;
529
            }
530
            if (cango != 0)
531
            {
532
                if (cango == 1)
533
                    global.bmenucoord[4][global.charturn] += 2;
534
                if (cango == 2)
535
                    global.bmenucoord[4][global.charturn] = 6;
536
            }
537
        }
538
        if (up_p())
539
        {
540
            itemcoord = global.bmenucoord[4][global.charturn];
541
            cango = 1;
542
            if (itemcoord <= 1)
543
                cango = 0;
544
            if (cango == 1)
545
                global.bmenucoord[4][global.charturn] -= 2;
546
        }
547
        if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 0)
548
            global.bmenucoord[4][global.charturn] -= 1;
549
        if (button1_p() && tempitem[global.bmenucoord[4][global.charturn]][global.charturn] != 0 && onebuffer < 0)
550
        {
551
            onebuffer = 2;
552
            global.bmenuno = 0;
553
            selnoise = 1;
554
            
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(
Darker Candy
"Darker Candy", "scr_iteminfo_slash_scr_iteminfo_gml_16_0_b"
);
itemdescb = stringsetloc(
Heals#120HP
"Heals#120HP", "scr_iteminfo_slash_scr_iteminfo_gml_17_0"
);
itemtarget = 1; value = 120; 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]);
555
            if (itemtarget == 0 || itemtarget == 2)
556
            {
557
                var _tensionhealed = 0;
558
                var allowtensionheal = true;
559
                if (global.chapter == 4)
560
                {
561
                    if (instance_exists(obj_hammer_of_justice_enemy))
562
                        allowtensionheal = false;
563
                }
564
                if (allowtensionheal)
565
                {
566
                    var item_use = false;
567
                    if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 27)
568
                    {
569
                        
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ if (i_ex(obj_jackenstein_enemy) && global.tempflag[89] >= 3) global.tension += ceil(arg0 * 1.5); else global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(80);
570
                        _tensionhealed = 1;
571
                        item_use = true;
572
                    }
573
                    if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 28)
574
                    {
575
                        
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ if (i_ex(obj_jackenstein_enemy) && global.tempflag[89] >= 3) global.tension += ceil(arg0 * 1.5); else global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(ceil(global.maxtension / 2));
576
                        _tensionhealed = 1;
577
                        item_use = true;
578
                    }
579
                    if (tempitem[global.bmenucoord[4][global.charturn]][global.charturn] == 29)
580
                    {
581
                        
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ if (i_ex(obj_jackenstein_enemy) && global.tempflag[89] >= 3) global.tension += ceil(arg0 * 1.5); else global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(ceil(global.maxtension));
582
                        _tensionhealed = 1;
583
                        item_use = true;
584
                    }
585
                    if (item_use == true)
586
                    {
587
                        with (obj_event_manager)
588
                            trigger_event(UnknownEnum.Value_0, get_consumer_trophy());
589
                    }
590
                }
591
                if (_tensionhealed)
592
                {
593
                    var _drivenoise = snd_play(snd_cardrive);
594
                    snd_pitch(_drivenoise, 1.4);
595
                    snd_volume(_drivenoise, 0.8, 0);
596
                    with (global.charinstance[global.charturn])
597
                    {
598
                        ha = instance_create(x, y, obj_healanim);
599
                        ha.target = id;
600
                        ha.particlecolor = c_orange;
601
                    }
602
                    
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);
603
                    
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
604
                }
605
                if (!_tensionhealed)
606
                    
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();
}
();
607
            }
608
            if (itemtarget == 1)
609
                global.bmenuno = 7;
610
        }
611
        if (button2_p() && onebuffer < 0)
612
        {
613
            twobuffer = 1;
614
            global.bmenuno = 0;
615
            movenoise = 1;
616
        }
617
    }
618
    if (global.bmenuno == 9)
619
    {
620
        thisenemy = global.bmenucoord[11][global.charturn];
621
        
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);
622
        if (right_p())
623
        {
624
            cango = 1;
625
            actcoord = global.bmenucoord[9][global.charturn];
626
            if (actcoord < 5)
627
            {
628
                if (canact[global.bmenucoord[9][global.charturn] + 1] == 0)
629
                {
630
                    cango = 0;
631
                    if ((actcoord % 2) == 1 && actcoord > 0)
632
                        global.bmenucoord[9][global.charturn] -= 1;
633
                }
634
            }
635
            else
636
            {
637
                global.bmenucoord[9][global.charturn] -= 1;
638
                cango = 0;
639
            }
640
            if (cango == 1)
641
            {
642
                if ((actcoord % 2) == 0)
643
                    global.bmenucoord[9][global.charturn] += 1;
644
                else
645
                    global.bmenucoord[9][global.charturn] -= 1;
646
            }
647
        }
648
        if (left_p())
649
        {
650
            cango = 1;
651
            actcoord = global.bmenucoord[9][global.charturn];
652
            if ((actcoord % 2) == 0)
653
            {
654
                if (canact[actcoord + 1] != 0)
655
                    global.bmenucoord[9][global.charturn] += 1;
656
            }
657
            else
658
            {
659
                global.bmenucoord[9][global.charturn] -= 1;
660
            }
661
        }
662
        if (down_p())
663
        {
664
            actcoord = global.bmenucoord[9][global.charturn];
665
            cango = 1;
666
            if (actcoord >= 4)
667
                cango = 0;
668
            else if (canact[actcoord + 2] == 0)
669
                cango = 0;
670
            if (cango != 0)
671
            {
672
                if (cango == 1)
673
                    global.bmenucoord[9][global.charturn] += 2;
674
            }
675
        }
676
        if (up_p())
677
        {
678
            actcoord = global.bmenucoord[9][global.charturn];
679
            cango = 1;
680
            if (actcoord <= 1)
681
                cango = 0;
682
            if (cango == 1)
683
                global.bmenucoord[9][global.charturn] -= 2;
684
        }
685
        global.tensionselect = acttpcost[global.bmenucoord[9][global.charturn]];
686
        canpress = 1;
687
        if (global.char[global.charturn] == 1)
688
        {
689
            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)
690
            {
691
                if (havechar[1] == 0 || global.hp[2] <= 0)
692
                    canpress = 0;
693
            }
694
            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)
695
            {
696
                if (havechar[2] == 0 || global.hp[3] <= 0)
697
                    canpress = 0;
698
            }
699
            if (global.actactor[global.bmenucoord[11][global.charturn]][global.bmenucoord[9][global.charturn]] == 5)
700
            {
701
                if (havechar[3] == 0 || global.hp[4] <= 0)
702
                    canpress = 0;
703
            }
704
        }
705
        if (canpress == 1)
706
        {
707
            if (button1_p() && global.canact[thisenemy][global.bmenucoord[9][global.charturn]] == 1 && global.tension >= global.tensionselect && onebuffer < 0)
708
            {
709
                onebuffer = 2;
710
                global.bmenuno = 0;
711
                selnoise = 1;
712
                global.actingchoice[global.charturn] = global.bmenucoord[9][global.charturn];
713
                global.tension -= acttpcost[global.bmenucoord[9][global.charturn]];
714
                global.tensionselect = 0;
715
                
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]);
716
                global.bmenucoord[9][global.charturn] = 0;
717
                
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
718
            }
719
        }
720
        if (button2_p() && onebuffer < 0)
721
        {
722
            global.bmenucoord[9][global.charturn] = 0;
723
            global.tensionselect = 0;
724
            twobuffer = 1;
725
            global.bmenuno = 11;
726
            movenoise = 1;
727
        }
728
    }
729
    if (global.bmenuno == 7 || global.bmenuno == 1 || global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
730
    {
731
        with (battlewriter)
732
            skipme = 1;
733
        with (battlewriter)
734
            depth = 10;
735
        with (obj_face_parent)
736
            depth = 10;
737
        with (obj_smallface)
738
            depth = 10;
739
        if (button2_p() && onebuffer < 0)
740
        {
741
            twobuffer = 1;
742
            if (global.bmenuno == 1 || global.bmenuno == 11 || global.bmenuno == 12)
743
                global.bmenuno = 0;
744
            if (global.bmenuno == 7)
745
                global.bmenuno = 4;
746
            if (global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 13)
747
                global.bmenuno = 2;
748
            movenoise = 1;
749
        }
750
        if (global.bmenuno == 7 || global.bmenuno == 1 || global.bmenuno == 8 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
751
        {
752
            if (global.bmenuno == 7 || global.bmenuno == 8)
753
            {
754
                for (var i = 0; i < 3; i += 1)
755
                {
756
                    ht[i] = 0;
757
                    if (global.char[i] > 0)
758
                        ht[i] = 1;
759
                }
760
            }
761
            if (global.bmenuno == 1 || global.bmenuno == 3 || global.bmenuno == 11 || global.bmenuno == 12 || global.bmenuno == 13)
762
            {
763
                for (var i = 0; i < 3; i += 1)
764
                    ht[i] = global.monster[i];
765
            }
766
            if (global.bmenucoord[global.bmenuno][global.charturn] == 2 && ht[2] == 0)
767
                global.bmenucoord[global.bmenuno][global.charturn] = 0;
768
            if (global.bmenucoord[global.bmenuno][global.charturn] == 0 && ht[0] == 0)
769
                global.bmenucoord[global.bmenuno][global.charturn] = 1;
770
            if (global.bmenucoord[global.bmenuno][global.charturn] == 1 && ht[1] == 0)
771
                global.bmenucoord[global.bmenuno][global.charturn] = 0;
772
            if (global.bmenucoord[global.bmenuno][global.charturn] == 0 && ht[0] == 0)
773
                global.bmenucoord[global.bmenuno][global.charturn] = 2;
774
            if (down_p() == 1)
775
            {
776
                if (global.bmenucoord[global.bmenuno][global.charturn] == 0)
777
                {
778
                    if (ht[1] == 1)
779
                    {
780
                        movenoise = 1;
781
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
782
                    }
783
                    else if (ht[2] == 1)
784
                    {
785
                        movenoise = 1;
786
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
787
                    }
788
                }
789
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 1)
790
                {
791
                    if (ht[2] == 1)
792
                    {
793
                        movenoise = 1;
794
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
795
                    }
796
                    else if (ht[0] == 1)
797
                    {
798
                        movenoise = 1;
799
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
800
                    }
801
                }
802
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 2)
803
                {
804
                    if (ht[0] == 1)
805
                    {
806
                        movenoise = 1;
807
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
808
                    }
809
                    else if (ht[1] == 1)
810
                    {
811
                        movenoise = 1;
812
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
813
                    }
814
                }
815
            }
816
            if (up_p() == 1)
817
            {
818
                if (global.bmenucoord[global.bmenuno][global.charturn] == 0)
819
                {
820
                    if (ht[2] == 1)
821
                    {
822
                        movenoise = 1;
823
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
824
                    }
825
                    else if (ht[1] == 1)
826
                    {
827
                        movenoise = 1;
828
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
829
                    }
830
                }
831
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 1)
832
                {
833
                    if (ht[0] == 1)
834
                    {
835
                        movenoise = 1;
836
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
837
                    }
838
                    else if (ht[2] == 1)
839
                    {
840
                        movenoise = 1;
841
                        global.bmenucoord[global.bmenuno][global.charturn] = 2;
842
                    }
843
                }
844
                else if (global.bmenucoord[global.bmenuno][global.charturn] == 2)
845
                {
846
                    if (ht[1] == 1)
847
                    {
848
                        movenoise = 1;
849
                        global.bmenucoord[global.bmenuno][global.charturn] = 1;
850
                    }
851
                    else if (ht[0] == 1)
852
                    {
853
                        movenoise = 1;
854
                        global.bmenucoord[global.bmenuno][global.charturn] = 0;
855
                    }
856
                }
857
            }
858
            if ((button1_p() && onebuffer < 0) || skipmonsterselection)
859
            {
860
                onebuffer = 1;
861
                selnoise = 1;
862
                skipmonsterselection = 0;
863
                if (global.bmenuno == 1)
864
                {
865
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
866
                    global.faceaction[global.charturn] = 1;
867
                    global.charaction[global.charturn] = 1;
868
                    
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
869
                }
870
                if (global.bmenuno == 7)
871
                {
872
                    var balthizardskip = false;
873
                    for (var i = 0; i < instance_number(obj_balthizard_enemy); i++)
874
                    {
875
                        turtle[i] = instance_find(obj_balthizard_enemy, i);
876
                        if (turtle[i].acting == 5 && global.charturn == 1)
877
                            balthizardskip = true;
878
                    }
879
                    var gueiskip = false;
880
                    for (var i = 0; i < instance_number(obj_guei_enemy); i++)
881
                    {
882
                        guei[i] = instance_find(obj_guei_enemy, i);
883
                        if (guei[i].acting == 4 && obj_guei_enemy.gersonactcount == 1)
884
                            gueiskip = true;
885
                    }
886
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
887
                    if (i_ex(obj_titan_enemy) && obj_titan_enemy.acting == 1)
888
                        
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
889
                    else if (balthizardskip && global.plot == 141)
890
                        
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
891
                    else if (gueiskip)
892
                        
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
893
                    else
894
                        
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();
}
();
895
                }
896
                if (global.bmenuno == 8 || global.bmenuno == 3)
897
                {
898
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
899
                    
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();
}
();
900
                }
901
                if (global.bmenuno == 11)
902
                {
903
                    global.bmenuno = 9;
904
                    actcoord = global.bmenucoord[9][global.charturn];
905
                    thisenemy = global.bmenucoord[11][global.charturn];
906
                    if (global.char[global.charturn] == 1)
907
                    {
908
                        for (var i = 0; i < 6; i += 1)
909
                        {
910
                            if (global.canact[thisenemy][actcoord] == 0)
911
                            {
912
                                if (actcoord > 0)
913
                                    global.bmenucoord[9][global.charturn] -= 1;
914
                            }
915
                        }
916
                    }
917
                    if (global.char[global.charturn] == 2)
918
                    {
919
                        for (var i = 0; i < 6; i += 1)
920
                        {
921
                            if (global.canactsus[thisenemy][actcoord] == 0)
922
                            {
923
                                if (actcoord > 0)
924
                                    global.bmenucoord[9][global.charturn] -= 1;
925
                            }
926
                        }
927
                    }
928
                    if (global.char[global.charturn] == 3)
929
                    {
930
                        for (var i = 0; i < 6; i += 1)
931
                        {
932
                            if (global.canactral[thisenemy][actcoord] == 0)
933
                            {
934
                                if (actcoord > 0)
935
                                    global.bmenucoord[9][global.charturn] -= 1;
936
                            }
937
                        }
938
                    }
939
                    if (global.char[global.charturn] == 4)
940
                    {
941
                        for (var i = 0; i < 6; i += 1)
942
                        {
943
                            if (global.canactnoe[thisenemy][actcoord] == 0)
944
                            {
945
                                if (actcoord > 0)
946
                                    global.bmenucoord[9][global.charturn] -= 1;
947
                            }
948
                        }
949
                    }
950
                    onebuffer = 1;
951
                }
952
                if (global.bmenuno == 12)
953
                {
954
                    global.faceaction[global.charturn] = 10;
955
                    global.chartarget[global.charturn] = global.bmenucoord[global.bmenuno][global.charturn];
956
                    global.charaction[global.charturn] = 2;
957
                    global.charspecial[global.charturn] = 100;
958
                    
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
959
                }
960
                if (global.bmenuno == 13)
961
                {
962
                    onebuffer = 2;
963
                    global.bmenuno = 0;
964
                    selnoise = 1;
965
                    global.actingchoice[global.charturn] = global.bmenucoord[2][global.charturn];
966
                    global.tension -= global.battlespellcost[thischar][global.bmenucoord[2][global.charturn]];
967
                    global.tensionselect = 0;
968
                    
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]);
969
                    
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]);
970
                    
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) && obj_battlecontroller.skipsusieturn == false) || (i_ex(obj_sound_of_justice_enemy) && i_ex(obj_herokris)))
global.charturn = 1; else if (global.charmove[2] == 1 &&
scr_charcan(2))
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 1 && moveswapped == 0) { moveswapped = 1; if (
scr_charcan(2) && global.acting[1] == 0)
global.charturn = 2; else
scr_endturn();
} if (global.charturn == 2 && moveswapped == 0)
scr_endturn();
if (moveswapped == 1) global.bmenuno = 0; if (global.charturn > 0) { global.temptension[global.charturn] = global.tension; for (i = 0; i < 12; i += 1) tempitem[i][global.charturn] = tempitem[i][prevturn]; } if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; }
();
971
                }
972
            }
973
        }
974
    }
975
}
976
if (movenoise == 1)
977
{
978
    snd_play(snd_menumove);
979
    movenoise = 0;
980
}
981
if (grazenoise == 1)
982
{
983
    snd_play(snd_graze);
984
    grazenoise = 0;
985
}
986
if (selnoise == 1)
987
{
988
    snd_play(snd_select);
989
    selnoise = 0;
990
}
991
if (damagenoise == 1)
992
{
993
    if (i_ex(obj_titan_enemy) && (obj_titan_enemy.drawstate == "defense" || obj_titan_enemy.drawstate == "defense end"))
994
    {
995
        snd_play(snd_bump);
996
    }
997
    else if (i_ex(obj_titan_enemy) && ((obj_titan_enemy.drawstate == "idle" && obj_titan_enemy.starshootcon > 0) || obj_titan_enemy.drawstate == "crack"))
998
    {
999
        with (obj_titan_enemy)
1000
            redflashtimer = 10;
1001
        snd_play(snd_damage);
1002
        snd_play(snd_queen_punched_lower_heavy);
1003
        
scr_shakescreen
scr_shakescreen

function
scr_shakescreen(arg0 = 4, arg1 = 4)
{ var shaker = instance_create(x, y, obj_shake); if (i_ex(shaker)) { shaker.shakex = arg0; shaker.shakey = arg1; } }
();
1004
        with (obj_shake)
1005
        {
1006
            shakex = 4;
1007
            shakey = 4;
1008
        }
1009
    }
1010
    else if (i_ex(obj_titan_enemy) && (obj_titan_enemy.drawstate == "idle" || obj_titan_enemy.drawstate == "crack2") && obj_titan_enemy.starshootcon == 0)
1011
    {
1012
        snd_play_x(snd_metal_hit_reverb, 1, 0.5);
1013
        with (obj_titan_enemy)
1014
            playmeatsoundcon = 1;
1015
    }
1016
    else
1017
    {
1018
        snd_play(snd_damage);
1019
    }
1020
    damagenoise = 0;
1021
}
1022
if (laznoise == 1)
1023
{
1024
    snd_play(snd_laz_c);
1025
    laznoise = 0;
1026
}
1027
onebuffer -= 1;
1028
twobuffer -= 1;
1029
lbuffer -= 1;
1030
rbuffer -= 1;
1031
if (global.mnfight == 2 && timeron == 1)
1032
{
1033
    global.turntimer -= 1;
1034
    if (global.turntimer <= 0 && reset == 0)
1035
    {
1036
        with (obj_bulletparent)
1037
            instance_destroy();
1038
        with (obj_bulletgenparent)
1039
            instance_destroy();
1040
        with (obj_darkener)
1041
            darken = 0;
1042
        with (obj_heart)
1043
        {
1044
            instance_create(x, y, obj_returnheart);
1045
            instance_destroy();
1046
        }
1047
        reset = 1;
1048
        if (noreturn == 0)
1049
            alarm[2]
 = 15;
gml_Object_obj_battlecontroller_Alarm_2.gml

reset = 0;
scr_mnendturn();
1050
    }
1051
}
1052
if (global.myfight == 3)
1053
{
1054
    if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() == 0 && !instance_exists(obj_writer))
1055
    {
1056
        
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; } }
();
1057
        if (global.myfight == 3)
1058
            
scr_endturn
scr_endturn

function
scr_endturn()
{ if (!i_ex(obj_hammer_of_justice_enemy)) { for (i = 0; i < 12; i += 1) global.item[i] = tempitem[i][global.charturn]; } for (i = 0; i < 12; i += 1) { for (j = 0; j < 3; j += 1) tempitem[i][j] = global.item[i]; } moveswapped = 0; with (obj_writer) instance_destroy(); with (obj_face) instance_destroy(); with (obj_smallface) instance_destroy(); global.attacking = 0; for (i = 0; i < 3; i += 1) { global.monsterattackname[i] = " "; if (global.charauto[global.char[i]] == 1 && global.hp[global.char[i]] > 0) { if (global.monster[2] == 1) global.chartarget[i] = 2; if (global.monster[1] == 1) global.chartarget[i] = 1; if (global.monster[0] == 1) global.chartarget[i] = 0; } if (global.charaction[i] == 1) global.attacking = 1; } __noactors = 1; if (global.acting[0] == 1) __noactors = 0; for (__noactorsi = 0; __noactorsi < 3; __noactorsi++) { if (global.actingsingle[__noactorsi] == 1) __noactors = 0; } if (soundbattle) { if (i_ex(obj_sound_of_justice_enemy)) { if (global.charaction[0] == 1) obj_sound_of_justice_enemy.kris_phase2_try_attack_con = 1; if (global.charaction[1] == 4) { } else { if (global.charaction[1] == 1) obj_sound_of_justice_enemy.susie_phase2_try_attack_con = 1; global.charaction[1] = 0; global.faceaction[1] = 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; } }
();
1059
    }
1060
}
1061
if (global.myfight == 5)
1062
{
1063
    myfightreturntimer--;
1064
    if (myfightreturntimer <= 0)
1065
    {
1066
        
scr_mnendturn
scr_mnendturn

function
scr_mnendturn()
{ if (global.char[0] == 2) sus = 0; if (global.char[1] == 2) sus = 1; if (global.char[2] == 2) sus = 2; techwon = 0; if (
scr_monsterpop() == 0)
techwon = 1; if (global.flag[39 dojo_abort?] == 1) techwon = 1; if (techwon == 1)
scr_wincombat();
if (techwon == 0) { with (obj_battlecontroller) { messagepriority = -1; attackpriority = -1; }
scr_battlecursor_memory_reset();
global.mnfight = 0; global.myfight = 0; global.bmenuno = 0; global.charturn = 0; skip = 0; for (i = 0; i < 3; i += 1) { global.hittarget[i] = 0; with (global.charinstance[i]) tu = 0; hptarget = global.char[i]; if (global.chapter == 4 && i_ex(obj_titan_enemy) && obj_titan_enemy.gerson.sprite_index == spr_gerson_item) continue; if (global.char[i] != 0 && global.hp[hptarget] <= 0) { healamt = ceil(global.maxhp[hptarget] / 8); dmgwr = instance_create(global.charinstance[i].x, (global.charinstance[i].y + global.charinstance[i].myheight) - 24, obj_dmgwriter); with (dmgwr) { delay = 1; type = 3; } dmgwr.damage =
scr_heal(i, healamt);
if (global.hp[hptarget] >= 1) { with (dmgwr) specialmessage = 4; } } } if (global.charmove[0] == 0 || global.charauto[global.char[0]] == 1) global.charturn = 1; if (global.charturn == 1) { if (global.charmove[1] == 0 || global.charauto[global.char[1]] == 1) global.charturn = 2; } if (global.charturn == 2) { if (global.charmove[2] == 0 || global.charauto[global.char[2]] == 1) skip = 1; } for (i = 0; i < 3; i += 1) { global.acting[i] = 0; global.actingsingle[i] = 0; global.actingsimul[i] = 0; global.actingtarget[i] = 0; global.temptension[i] = global.tension; global.charspecial[i] = 0; global.targeted[i] = 0; global.charaction[i] = 0; global.faceaction[i] = 0; global.monsterattackname[i] = " "; } global.currentactingchar = 0; with (obj_monsterparent) { attacked = 0; talked = 0; acting = 0; actingsus = 0; actingral = 0; actingnoe = 0; } if (skip == 1) { if (global.char[0] == 2 && global.charauto[2] == 1) { global.acting[0] = 1; global.myfight = 3; }
scr_endturn();
} if (disablesusieattack == 1 && global.charturn == 1) global.bmenucoord[0][global.charturn] = 1; for (i = 0; i < 12; i += 1) { ...
();
1067
        global.spelldelay = 10;
1068
        with (obj_heroparent)
1069
        {
1070
            attacktimer = 0;
1071
            image_index = 0;
1072
            index = 0;
1073
            itemed = 0;
1074
            acttimer = 0;
1075
            defendtimer = 0;
1076
            state = 0;
1077
            flash = 0;
1078
            siner = 0;
1079
            fsiner = 0;
1080
alarm[4]
1081
        }
1082
        with (obj_spellphase)
1083
        {
1084
            with (spellwriter)
1085
                instance_destroy();
1086
            instance_destroy();
1087
        }
1088
    }
1089
}
1090
if (global.charweapon[4] == 13)
1091
{
1092
    if ((t_siner % 6) == 0)
1093
    {
1094
        if (global.hp[4] > round(global.maxhp[4] / 3))
1095
            global.hp[4]--;
1096
    }
1097
}
1098
t_siner++;
1099
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
1100
{
1101
    
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");
} }
();
1102
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ }
(vk_f2))
1103
        
scr_debug_fullheal
scr_debug_fullheal

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

function
scr_debug_keycheck(arg0)
{ }
(vk_f3))
1105
        
scr_raise_party
scr_raise_party

function
scr_raise_party()
{ var _start = 0; var _end = 3; if (
scr_debug())
{ if (keyboard_check(ord("1"))) { _start = 0; _end = 1; } else if (keyboard_check(ord("2"))) { _start = 1; _end = 2; } else if (keyboard_check(ord("3"))) { _start = 2; _end = 3; } } with (obj_dmgwriter) { if (delaytimer >= 1) killactive = 1; } for (i = _start; i < _end; i++) { if (global.char[i] == 0) continue; var _hltarget = global.char[i]; var _curhp = global.hp[_hltarget]; var _healpower; if (_curhp <= 0) _healpower = -_curhp + round(global.maxhp[_hltarget] / 4); else _healpower = 10;
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 = _start; i < _end; i++) { with (global.charinstance[i]) tu--; } }
();
1106
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ }
(vk_f5))
1107
        
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; } }
();
1108
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ }
(vk_f6))
1109
        
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; } } } }
();
1110
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ }
(vk_f8))
1111
        
scr_weaken_party
scr_weaken_party

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

function
scr_debug_keycheck(arg0)
{ }
(vk_f9))
1113
    {
1114
        global.tension = 0;
1115
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("TP set to 0%");
1116
    }
1117
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ }
(vk_f10))
1118
    {
1119
        global.tension = 250;
1120
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { scr_debug_clear_persistent(); }
("TP maxed out!!");
1121
    }
1122
    if (
scr_debug_keycheck
scr_debug_keycheck

function
scr_debug_keycheck(arg0)
{ }
(ord("M")))
1123
    {
1124
        if (audio_is_playing(global.batmusic[1]))
1125
        {
1126
            if (!audio_is_paused(global.batmusic[1]))
1127
                audio_pause_sound(global.batmusic[1]);
1128
            else
1129
                audio_resume_sound(global.batmusic[1]);
1130
        }
1131
    }
1132
}
1133
1134
enum UnknownEnum
1135
{
1136
    Value_0
1137
}