1 |
function scr_attackphase_ch1scr_attackphase_ch1function scr_attackphase_ch1()
{
with (obj_battlecontroller_ch1)
{
techwon = 0;
if ( scr_monsterpop_ch1() == 0)
techwon = 1;
if (techwon == 0)
{
fightphase = 1;
global.charturn = 3;
if (global.charaction[0] == 4 || global.charaction[0] == 2)
fightphase = 0;
if (global.charaction[1] == 4 || global.charaction[1] == 2)
fightphase = 0;
if (global.charaction[2] == 4 || global.charaction[2] == 2)
fightphase = 0;
if (global.myfight == 4)
fightphase = 1;
if (fightphase == 1)
{
global.myfight = 1;
instance_create_ch1(xx + 2, yy + 365, obj_attackpress_ch1);
}
else
{
global.myfight = 4;
instance_create_ch1(0, 0, obj_spellphase_ch1);
}
}
else
{
scr_wincombat_ch1();
}
}
} () |
2 |
{ |
3 |
with (obj_battlecontroller_ch1) |
4 |
{ |
5 |
techwon = 0; |
6 |
if (scr_monsterpop_ch1() == 0) |
7 |
techwon = 1; |
8 |
if (techwon == 0) |
9 |
{ |
10 |
fightphase = 1; |
11 |
global.charturn = 3; |
12 |
if (global.charaction[0] == 4 || global.charaction[0] == 2) |
13 |
fightphase = 0; |
14 |
if (global.charaction[1] == 4 || global.charaction[1] == 2) |
15 |
fightphase = 0; |
16 |
if (global.charaction[2] == 4 || global.charaction[2] == 2) |
17 |
fightphase = 0; |
18 |
if (global.myfight == 4) |
19 |
fightphase = 1; |
20 |
if (fightphase == 1) |
21 |
{ |
22 |
global.myfight = 1; |
23 |
instance_create_ch1(xx + 2, yy + 365, obj_attackpress_ch1); |
24 |
} |
25 |
else |
26 |
{ |
27 |
global.myfight = 4; |
28 |
instance_create_ch1(0, 0, obj_spellphase_ch1); |
29 |
} |
30 |
} |
31 |
else |
32 |
{ |
33 |
scr_wincombat_ch1scr_wincombat_ch1function scr_wincombat_ch1()
{
global.myfight = 7;
global.mnfight = -1;
with (obj_battlecontroller_ch1)
victory = 1;
for (i = 0; i < 3; i += 1)
{
if (global.monster[i] == 1 && instance_exists(global.monsterinstance[i]))
{
with (global.monsterinstance[i])
scr_monsterdefeat_ch1();
}
}
} (); |
34 |
} |
35 |
} |
36 |
} |