1 |
function scr_endturnscr_endturnfunction scr_endturn()
{
for (i = 0; i < 12; i += 1)
global.item[i] = tempitem[i][global.charturn];
for (i = 0; i < 12; i += 1)
{
for (j = 0; j < 3; j += 1)
tempitem[i][j] = global.item[i];
}
moveswapped = 0;
with (obj_writer)
instance_destroy();
with (obj_face)
instance_destroy();
with (obj_smallface)
instance_destroy();
global.attacking = 0;
for (i = 0; i < 3; i += 1)
{
global.monsterattackname[i] = " ";
if (global.charauto[global.char[i]] == 1 && global.hp[global.char[i]] > 0)
{
if (global.monster[2] == 1)
global.chartarget[i] = 2;
if (global.monster[1] == 1)
global.chartarget[i] = 1;
if (global.monster[0] == 1)
global.chartarget[i] = 0;
}
if (global.charaction[i] == 1)
global.attacking = 1;
}
__noactors = 1;
if (global.acting[0] == 1)
__noactors = 0;
for (__noactorsi = 0; __noactorsi < 3; __noactorsi++)
{
if (global.actingsingle[__noactorsi] == 1)
__noactors = 0;
}
if (__noactors == 1)
{
scr_attackphase();
}
else
{
global.charturn = 3;
global.myfight = 3;
global.currentactingchar = 0;
if (global.acting[0] == 0)
scr_nextact();
if (global.chapter == 2 && instance_exists(obj_sweet_enemy) && global.actingsingle[0] == 1 && global.actingsingle[1] == 0 && global.actingsingle[2] == 0)
obj_sweet_enemy.simultotal_funny = 1;
if (global.acting[0] == 1 && global.actingsimul[0] == 1)
scr_act_simul();
}
with (obj_battlecontroller)
{
messagepriority = -1;
attackpriority = -1;
}
} () |
2 |
{ |
3 |
for (i = 0; i < 12; i += 1) |
4 |
global.item[i] = tempitem[i][global.charturn]; |
5 |
for (i = 0; i < 12; i += 1) |
6 |
{ |
7 |
for (j = 0; j < 3; j += 1) |
8 |
tempitem[i][j] = global.item[i]; |
9 |
} |
10 |
moveswapped = 0; |
11 |
with (obj_writer) |
12 |
instance_destroy(); |
13 |
with (obj_face) |
14 |
instance_destroy(); |
15 |
with (obj_smallface) |
16 |
instance_destroy(); |
17 |
global.attacking = 0; |
18 |
for (i = 0; i < 3; i += 1) |
19 |
{ |
20 |
global.monsterattackname[i] = " "; |
21 |
if (global.charauto[global.char[i]] == 1 && global.hp[global.char[i]] > 0) |
22 |
{ |
23 |
if (global.monster[2] == 1) |
24 |
global.chartarget[i] = 2; |
25 |
if (global.monster[1] == 1) |
26 |
global.chartarget[i] = 1; |
27 |
if (global.monster[0] == 1) |
28 |
global.chartarget[i] = 0; |
29 |
} |
30 |
if (global.charaction[i] == 1) |
31 |
global.attacking = 1; |
32 |
} |
33 |
__noactors = 1; |
34 |
if (global.acting[0] == 1) |
35 |
__noactors = 0; |
36 |
for (__noactorsi = 0; __noactorsi < 3; __noactorsi++) |
37 |
{ |
38 |
if (global.actingsingle[__noactorsi] == 1) |
39 |
__noactors = 0; |
40 |
} |
41 |
if (__noactors == 1) |
42 |
{ |
43 |
scr_attackphasescr_attackphasefunction scr_attackphase()
{
with (obj_battlecontroller)
{
techwon = 0;
if ( scr_monsterpop() == 0)
techwon = 1;
if (global.chapter == 2 && i_ex(obj_berdlyb_enemy) && obj_berdlyb_enemy.endcon == 1)
techwon = 1;
else if (techwon == 1)
scr_wincombat();
if (techwon == 0)
{
for (__hiti = 0; __hiti < 3; __hiti++)
global.hittarget[__hiti] = 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(xx + 2, yy + 365, obj_attackpress);
}
else
{
global.myfight = 4;
instance_create(0, 0, obj_spellphase);
}
}
}
} (); |
44 |
} |
45 |
else |
46 |
{ |
47 |
global.charturn = 3; |
48 |
global.myfight = 3; |
49 |
global.currentactingchar = 0; |
50 |
if (global.acting[0] == 0) |
51 |
scr_nextactscr_nextactfunction scr_nextact()
{
global.acting[0] = 0;
global.acting[1] = 0;
global.acting[2] = 0;
global.actingsingle[global.currentactingchar] = 0;
__minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]];
with (__minstance)
{
acting = 0;
actcon = 0;
actconsus = 0;
actconral = 0;
actconnoe = 0;
}
var singleactcomplete = 0;
while (global.currentactingchar < 3)
{
global.currentactingchar++;
if (global.currentactingchar < 3)
{
if (global.actingsingle[global.currentactingchar] == 1)
{
__minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]];
if (global.char[global.currentactingchar] == 2)
{
with (__minstance)
actconsus = 1;
if (global.actingsimul[global.currentactingchar] == 0)
singleactcomplete = 1;
break;
}
if (global.char[global.currentactingchar] == 3)
{
with (__minstance)
actconral = 1;
if (global.actingsimul[global.currentactingchar] == 0)
singleactcomplete = 1;
break;
}
if (global.char[global.currentactingchar] == 4)
{
with (__minstance)
actconnoe = 1;
if (global.actingsimul[global.currentactingchar] == 0)
singleactcomplete = 1;
break;
}
}
}
}
if (global.currentactingchar >= 3)
{
with (obj_monsterparent)
{
acting = 0;
actingsus = 0;
actingral = 0;
actingnoe = 0;
}
global.currentactingchar = 0;
scr_attackphase();
}
else if (!singleactcomplete)
{
scr_act_simul();
}
} (); |
52 |
if (global.chapter == 2 && instance_exists(obj_sweet_enemy) && global.actingsingle[0] == 1 && global.actingsingle[1] == 0 && global.actingsingle[2] == 0) |
53 |
obj_sweet_enemy.simultotal_funny = 1; |
54 |
if (global.acting[0] == 1 && global.actingsimul[0] == 1) |
55 |
scr_act_simulscr_act_simulfunction scr_act_simul()
{
__simulcount = 0;
for (__ii = global.currentactingchar; __ii < 3; __ii++)
{
__foundsimul = 0;
if (global.actingsingle[__ii] == 1 && instance_exists(obj_monsterparent))
{
if (global.char[__ii] == 1 && global.actsimul[global.actingtarget[__ii]][global.actingchoice[__ii]] == 1)
{
obj_monsterparent.simulorderkri = __simulcount;
with (global.monsterinstance[global.actingtarget[__ii]])
actcon = 0;
__foundsimul = 1;
}
if (global.char[__ii] == 2 && global.actsimulsus[global.actingtarget[__ii]][global.actingchoice[__ii]] == 1)
{
obj_monsterparent.simulordersus = __simulcount;
with (global.monsterinstance[global.actingtarget[__ii]])
actconsus = 1;
__foundsimul = 1;
}
if (global.char[__ii] == 3 && global.actsimulral[global.actingtarget[__ii]][global.actingchoice[__ii]] == 1)
{
obj_monsterparent.simulorderral = __simulcount;
with (global.monsterinstance[global.actingtarget[__ii]])
actconral = 1;
__foundsimul = 1;
}
if (global.char[__ii] == 4 && global.actsimulnoe[global.actingtarget[__ii]][global.actingchoice[__ii]] == 1)
{
obj_monsterparent.simulordernoe = __simulcount;
with (global.monsterinstance[global.actingtarget[__ii]])
actconnoe = 1;
__foundsimul = 1;
}
if (__foundsimul)
{
global.actingsingle[__ii] = 0;
__simulcount++;
}
obj_monsterparent.simultotal = __simulcount;
}
}
} (); |
56 |
} |
57 |
with (obj_battlecontroller) |
58 |
{ |
59 |
messagepriority = -1; |
60 |
attackpriority = -1; |
61 |
} |
62 |
} |