19 lines
389 B
Plaintext
19 lines
389 B
Plaintext
|
function st_enemyturn() {
|
||
|
while global.turn == ARMY.THEM {
|
||
|
var done = true;
|
||
|
for (k=0; k<array_length(global.units[ARMY.THEM]); k++) {
|
||
|
var target = global.units[ARMY.THEM][k];
|
||
|
if !target.waiting {
|
||
|
done = false;
|
||
|
} else {
|
||
|
continue;
|
||
|
}
|
||
|
c_doenemyai(target);
|
||
|
}
|
||
|
if done {
|
||
|
c_dewait(global.turn);
|
||
|
state = st_control;
|
||
|
global.turn = (global.turn+1)%2;
|
||
|
}
|
||
|
}
|
||
|
}
|