1 |
function scr_retargetscr_retargetfunction scr_retarget(arg0)
{
thistarget = global.chartarget[arg0];
cancelattack = 0;
if (thistarget == 0)
{
if (global.monster[0] == 0)
thistarget = 1;
}
if (thistarget == 1)
{
if (global.monster[1] == 0)
thistarget = 2;
}
if (thistarget == 2)
{
if (global.monster[2] == 0)
thistarget = 3;
if (thistarget == 3 && global.monster[0] == 1)
thistarget = 0;
if (thistarget == 3 && global.monster[1] == 1)
thistarget = 1;
if (thistarget == 3)
cancelattack = 1;
}
global.chartarget[arg0] = thistarget;
} (arg0) |
2 |
{ |
3 |
thistarget = global.chartarget[arg0]; |
4 |
cancelattack = 0; |
5 |
if (thistarget == 0) |
6 |
{ |
7 |
if (global.monster[0] == 0) |
8 |
thistarget = 1; |
9 |
} |
10 |
if (thistarget == 1) |
11 |
{ |
12 |
if (global.monster[1] == 0) |
13 |
thistarget = 2; |
14 |
} |
15 |
if (thistarget == 2) |
16 |
{ |
17 |
if (global.monster[2] == 0) |
18 |
thistarget = 3; |
19 |
if (thistarget == 3 && global.monster[0] == 1) |
20 |
thistarget = 0; |
21 |
if (thistarget == 3 && global.monster[1] == 1) |
22 |
thistarget = 1; |
23 |
if (thistarget == 3) |
24 |
cancelattack = 1; |
25 |
} |
26 |
global.chartarget[arg0] = thistarget; |
27 |
} |