|
1
|
global.interact = 2;
|
|
2
|
if (global.flag[9 battle_music] == 1)
|
|
3
|
snd_volume(global.currentsong[1], 0, 20);
|
|
4
|
scr_encountersetupscr_encountersetup
function scr_encountersetup(arg0)
{
xx = camerax();
yy = cameray();
var partyconfig = 0;
if (global.char[0] != 0 && global.char[1] == 0 && global.char[2] == 0)
partyconfig = 1;
if (global.char[0] != 0 && global.char[1] != 0 && global.char[2] == 0)
partyconfig = 2;
for (var i = 0; i < 3; i++)
{
global.heromakex[i] = xx + 80;
global.heromakey[i] = yy + 50 + (80 * i);
global.monsterinstancetype[i] = obj_baseenemy;
global.monstertype[i] = 1Enemy (placeholder/G-BODY);
global.monstermakex[i] = xx + 500 + (20 * i);
global.monstermakey[i] = yy + 40 + (90 * i);
}
global.monstertype[1] = 0(None);
global.monstertype[2] = 0(None);
if (global.char[0] != 0 && global.char[1] == 0 && global.char[2] == 0)
global.heromakey[0] = yy + 140;
if (global.char[0] != 0 && global.char[1] != 0 && global.char[2] == 0)
{
global.heromakey[0] = yy + 100;
global.heromakey[1] = yy + 180;
}
global.battlemsg[0] = stringsetloc(* It is known."* It is known.", "scr_encountersetup_slash_scr_encountersetup_gml_34_0" );
switch (arg0)
{
case 0:
break;
case 1:
global.monsterinstancetype[0] = obj_baseenemy;
global.monstertype[0] = 1Enemy (placeholder/G-BODY);
global.monstermakex[0] = xx + 480;
global.monstermakey[0] = yy + 110;
global.monsterinstancetype[1] = obj_baseenemy;
global.monstertype[1] = 1Enemy (placeholder/G-BODY);
global.monstermakex[1] = xx + 500;
global.monstermakey[1] = yy + 200;
global.monstertype[2] = 0(None);
global.battlemsg[0] = stringsetloc(* Test enemies showed up."* Test enemies showed up.", "scr_encountersetup_slash_scr_encountersetup_gml_60_0" );
break;
case 2:
global.monsterinstancetype[0] = obj_lancerboss;
global.monstertype[0] = 2Lancer;
global.monstermakex[0] = xx + 540;
global.monstermakey[0] = yy + 200;
global.monstertype[1] = 0(None);
global.monstertype[2] = 0(None);
break;
case 3:
global.monsterinstancetype[0] = obj_dummyenemy;
global.monstertype[0] = 3Dummy;
global.monstermakex[0] = xx + 500;
global.monstermakey[0] = yy + 160;
if (instance_exists(obj_npc_room))
{
global.monstermakex[0] = obj_npc_room.xstart;
global.monstermakey[0] = obj_npc_room.ystart;
}
global.monstertype[1] = 0(None);
global.monstertype[2] = 0(None);
break;
case 4:
global.monsterinstancetype[0] = obj_diamondenemy;
global.monstertype[0] = 5Rudinn;
global.monstermakex[0] = xx + 480;
global.monstermakey[0] = yy + 140;
global.monstertype[1] = 0(None);
global.monstertype[2] = 0(None);
global.battlemsg[0] = stringsetloc(* Rudinn drew near!"* Rudinn drew near!", "scr_encountersetup_slash_scr_encountersetup_gml_98_0" );
if (global.flag[500 times_rudinn_fought] >= 1)
global.battlemsg[0] = stringsetloc(* A different Rudinn from last time drew near!"* A different Rudinn from last time drew near!", "scr_encountersetup_slash_scr_encountersetup_gml_99_0" );
if (global.flag[500 times_rudinn_fought] == 2)
global.battlemsg[0] = stringsetloc(* Assumedly another different Rudinn appeared!"* Assumedly another different Rudinn appeared!", "scr_encountersetup_slash_scr_encountersetup_gml_100_0" );
break;
case 5:
global.monsterinstancetype[0] = obj_diamondenemy;
global.monstertype[0] = 5Rudinn;
global.monstermakex[0] = xx + 480;
global.monstermakey[0] = yy + 110;
global.monsterinstancetype[1] = obj_diamondenemy;
global.monstertype[1] = 5Rudinn;
global.monstermakex[1] = xx + 500;
global.monstermakey[1] = yy + 200;
global.monstertype[2] = 0(None);
global.battlemsg[0] = stringsetloc(* A necklace of Rudinns blocks your path."* A necklace of Rudinns blocks your path.", "scr_encountersetup_slash_scr_encountersetup_gml_116_0" );
break;
case 6:
global.monsterinstancetype[0] = obj_diamondenemy;
global.monstertype[0] = 5Rudinn;
global.monstermakex[0] = xx + 480;
global.monstermakey[0] = yy + 110;
global.monsterinstancetype[1] = obj_heartenemy;
global.monstertype[1] = 6Hathy;
global.monstermakex[1] = xx + 500;
global.monstermakey[1] = yy + 200;
global.monstertype[2] = 0(None);
global.battlemsg[0] = stringsetloc(* Rudinn and Hathy blocked the way!"* Rudinn and Hathy blocked the way!", "scr_encountersetup_slash_scr_encountersetup_gml_132_0" );
... (global.encounterno);
|
|
5
|
with (obj_mainchara)
|
|
6
|
visible = 0;
|
|
7
|
with (global.cinstance[0])
|
|
8
|
visible = 0;
|
|
9
|
with (global.cinstance[1])
|
|
10
|
visible = 0;
|
|
11
|
with (obj_mainchara)
|
|
12
|
fun = 0;
|
|
13
|
with (obj_caterpillarchara)
|
|
14
|
fun = 0;
|
|
15
|
count = 0;
|
|
16
|
battlestartdelay = 0;
|
|
17
|
var gerson_arena_mode = global.encounterno == 160 && room == room_dw_church_arena;
|
|
18
|
if (global.encounterno == 176 && room == room_dw_churchb_nongerson)
|
|
19
|
gerson_arena_mode = 1;
|
|
20
|
if (gerson_arena_mode)
|
|
21
|
{
|
|
22
|
if (room == room_dw_church_arena)
|
|
23
|
{
|
|
24
|
global.heromakex[0] = 629;
|
|
25
|
global.heromakey[0] = 149;
|
|
26
|
battlestartdelay = 25;
|
|
27
|
c[0] = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (global.cinstance[0].x, global.cinstance[0].y, spr_susie_idle);
|
|
28
|
}
|
|
29
|
if (room == room_dw_churchb_nongerson)
|
|
30
|
{
|
|
31
|
global.heromakex[0] = 108;
|
|
32
|
global.heromakey[0] = 149;
|
|
33
|
c[0] = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (global.cinstance[0].x, global.cinstance[0].y, spr_susier_dark);
|
|
34
|
}
|
|
35
|
}
|
|
36
|
else
|
|
37
|
{
|
|
38
|
c[0] = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (obj_mainchara.x, obj_mainchara.y, spr_kris_sword_jump_down);
|
|
39
|
if (i_ex(global.cinstance[0]))
|
|
40
|
{
|
|
41
|
count += 1;
|
|
42
|
c[1] = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (global.cinstance[0].x, global.cinstance[0].y, global.cinstance[0].rsprite);
|
|
43
|
if (global.cinstance[0].rsprite == spr_susier_dark)
|
|
44
|
c[1].sprite_index = spr_susier_wall;
|
|
45
|
if (global.cinstance[0].name == "noelle")
|
|
46
|
{
|
|
47
|
var _sideb = scr_sideb_get_phasescr_sideb_get_phase
function scr_sideb_get_phase()
{
var phase = 0;
if (global.flag[916 snowgrave_fail] == 0)
{
if (global.flag[915 snowgrave_plot] > 0 && global.flag[915 snowgrave_plot] < 4)
phase = 1;
if (global.flag[915 snowgrave_plot] >= 4 && global.flag[915 snowgrave_plot] < 7)
phase = 2;
if (global.flag[915 snowgrave_plot] >= 7 && global.flag[915 snowgrave_plot] < 20)
phase = 3;
if (global.flag[915 snowgrave_plot] >= 20)
phase = 4;
}
return phase;
}
function scr_sideb_active()
{
return scr_sideb_get_phase() >= 3;
} ();
|
|
48
|
c[1].sprite_index = spr_noelleb_battleintro;
|
|
49
|
if (_sideb >= 2)
|
|
50
|
c[1].sprite_index = spr_noelleb_battleintro_sideb;
|
|
51
|
c[1].image_speed = 0.5;
|
|
52
|
}
|
|
53
|
}
|
|
54
|
if (i_ex(global.cinstance[1]) && room != room_dw_churchb_nongerson)
|
|
55
|
{
|
|
56
|
count += 1;
|
|
57
|
c[2] = scr_dark_markerscr_dark_marker
function scr_dark_marker(arg0, arg1, arg2)
{
thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
sprite_index = arg2;
image_speed = 0;
image_xscale = 2;
image_yscale = 2;
}
return thismarker;
} (global.cinstance[1].x, global.cinstance[1].y, global.cinstance[1].rsprite);
|
|
58
|
if (global.cinstance[1].rsprite == spr_susier_dark)
|
|
59
|
c[2].sprite_index = spr_susier_wall;
|
|
60
|
if (global.cinstance[1].name == "noelle")
|
|
61
|
{
|
|
62
|
c[2].sprite_index = spr_noelleb_battleintro;
|
|
63
|
c[2].image_speed = 0.5;
|
|
64
|
}
|
|
65
|
}
|
|
66
|
}
|
|
67
|
for (i = 0; i < (count + 1); i += 1)
|
|
68
|
{
|
|
69
|
c[i].direction = point_direction(c[i].x, c[i].y, global.heromakex[i], global.heromakey[i]);
|
|
70
|
c[i].speed = point_distance(c[i].x, c[i].y, global.heromakex[i], global.heromakey[i]) / 10;
|
|
71
|
c[i].depth = 200 - (i * 20);
|
|
72
|
}
|
|
73
|
fightcon = 1;
|
|
74
|
counttimer = 0;
|
|
75
|
if (global.chapter == 4 && room == room_dw_church_jackenstein)
|
|
76
|
{
|
|
77
|
with (c[0])
|
|
78
|
sprite_index = spr_nothing;
|
|
79
|
with (c[1])
|
|
80
|
sprite_index = spr_nothing;
|
|
81
|
with (c[2])
|
|
82
|
sprite_index = spr_nothing;
|
|
83
|
}
|