Frame 1
fscommand ("fullscreen", "false");
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
fscommand ("trapallkeys", "true");
_quality = "BEST";
Instance of Symbol 122 MovieClip [Blank] in Frame 1
onClipEvent (enterFrame) {
_parent.doglow();
}
Frame 67
stop();
AttackBtn.tabEnabled = (MoveBtn.tabEnabled = (WaitBtn.tabEnabled = (StatusBtn.tabEnabled = false)));
Instance of Symbol 808 MovieClip in Frame 67
onClipEvent (enterFrame) {
var l = _parent.getBytesLoaded();
var t = _parent.getBytesTotal();
if (l >= t) {
gotoAndStop (503);
} else {
gotoAndStop(2 + Math.round((500 * l) / t));
}
}
Frame 68
function cell_x(row, col) {
return(400 + ((col - row) * 44));
}
function cell_y(row, col) {
return(((col + row) * 22) - 206);
}
function hidecells() {
cells._visible = false;
pointer._visible = false;
pointer.stop();
}
function showcells() {
cells._visible = true;
}
function cancelaction() {
canceltext._visible = false;
if (cells.movecells != null) {
cells.movecells.removeMovieClip();
}
if (cells.attackcells != null) {
cells.attackcells.removeMovieClip();
}
menu.gotoAndPlay("ShowMenu");
}
function endaction() {
targetstats.showstats();
var count = 0;
var i = 0;
while (i < NUM_UNITS) {
if ((unit[i].control && (unit[i].team == PLAYER)) && (unit[i].unitcell != null)) {
count++;
break;
}
i++;
}
if (count == 0) {
gotoAndPlay (116);
} else {
count = 0;
var i = 0;
while (i < NUM_UNITS) {
if ((unit[i].team == ENEMY) && (unit[i].unitcell != null)) {
count++;
}
i++;
}
if (count == 0) {
gotoAndPlay (79);
} else if (((((((unit[1].unitcell == null) && (unit[2].unitcell == null)) && (unit[3].unitcell == null)) && (unit[4].unitcell == null)) && (unit[5].unitcell == null)) && (unit[6].unitcell == null)) && (unit[0].unit == "Healer")) {
allystats._visible = (queue._visible = (activestats._visible = (targetstats._visible = false)));
unit[0].attachMovie("Transform", "fx", 99);
} else if (currentunit.control) {
menu.gotoAndPlay("ShowMenu");
} else {
ai.endact();
}
}
}
function doattack(direction, row, col, area) {
hidecells();
targetstats.posdmg = (targetstats.negdmg = (targetstats.posvary = (targetstats.negvary = "")));
indicator._visible = false;
indicator.stop();
cells.attackcells.removeMovieClip();
currentunit.attack(direction, row, col, area);
}
function domove(row, col) {
hidecells();
indicator._visible = false;
indicator.stop();
cells.movecells.removeMovieClip();
dbuffer = new Array(ROWS);
var i = 0;
while (i < ROWS) {
dbuffer[i] = new Array(COLS);
i++;
}
currentunit.movepath(getmovepath(currentunit.row, currentunit.col, row, col, currentunit.movedistance, 0));
delete dbuffer;
}
function getmovepath(row1, col1, row2, col2, maxsteps, steps) {
if (steps >= maxsteps) {
return(false);
}
if ((dbuffer[row1][col1] != undefined) && (dbuffer[row1][col1] <= steps)) {
return(false);
}
dbuffer[row1][col1] = steps;
if ((row1 == row2) && ((col1 + 1) == col2)) {
return("1");
}
if (((row1 + 1) == row2) && (col1 == col2)) {
return("2");
}
if ((row1 == row2) && ((col1 - 1) == col2)) {
return("3");
}
if (((row1 - 1) == row2) && (col1 == col2)) {
return("4");
}
var temp1;
var temp2;
var tempd = "";
if ((map[row1][col1 + 1] != -1) && (map[row1][col1 + 1].team != currentunit.team)) {
temp1 = false;
} else {
temp1 = getmovepath(row1, col1 + 1, row2, col2, maxsteps, steps + 1);
if (temp1 != false) {
tempd = "1";
}
}
if ((map[row1 + 1][col1] == -1) || (map[row1 + 1][col1].team == currentunit.team)) {
temp2 = getmovepath(row1 + 1, col1, row2, col2, maxsteps, steps + 1);
if (temp2 != false) {
if (temp1 == false) {
tempd = "2";
temp1 = temp2;
} else if (temp2.length < temp1.length) {
tempd = "2";
temp1 = temp2;
}
}
}
if ((map[row1][col1 - 1] == -1) || (map[row1][col1 - 1].team == currentunit.team)) {
temp2 = getmovepath(row1, col1 - 1, row2, col2, maxsteps, steps + 1);
if (temp2 != false) {
if (temp1 == false) {
tempd = "3";
temp1 = temp2;
} else if (temp2.length < temp1.length) {
tempd = "3";
temp1 = temp2;
}
}
}
if ((map[row1 - 1][col1] == -1) || (map[row1 - 1][col1].team == currentunit.team)) {
temp2 = getmovepath(row1 - 1, col1, row2, col2, maxsteps, steps + 1);
if (temp2 != false) {
if (temp1 == false) {
tempd = "4";
temp1 = temp2;
} else if (temp2.length < temp1.length) {
tempd = "4";
temp1 = temp2;
}
}
}
if (!temp1) {
return(false);
}
return(tempd + temp1);
}
function endturn() {
indicator._visible = false;
indicator.stop();
currentunit.unitcell.gotoAndStop("Enable");
beginnextturn();
}
function beginnextturn() {
var mincnt = 99999;
var i = 0;
while (i < unit.length) {
if (unit[i].unitcell != null) {
if (unit[i].cnt < mincnt) {
mincnt = unit[i].cnt;
}
}
i++;
}
if (mincnt == 99999) {
var i = 0;
while (i < QSIZE) {
eval ("queue.q" + i).showpic();
i++;
}
activestats.showstats();
return(undefined);
}
var currentcntoff = -1;
var i = 0;
while (i < unit.length) {
if (unit[i].unitcell != null) {
unit[i].cnt = unit[i].cnt - mincnt;
if ((unit[i].cnt <= 0) && (unit[i].cntoff > currentcntoff)) {
currentcntoff = unit[i].cntoff;
currentindex = i;
}
}
i++;
}
currentunit = unit[currentindex];
currentunit.cnt = 100 / currentunit.spd;
currentunit.unitcell.gotoAndStop("Disable");
queue.q0.showpic(currentunit.unit);
calcqueue();
calcqueue(true);
showqueue();
activestats.showstats(currentunit);
currentunit.moved = (currentunit.attacked = false);
if (currentunit.control) {
currentunit.undorow = currentunit.row;
currentunit.undocol = currentunit.col;
currentunit.undodirection = currentunit.direction;
menu.gotoAndPlay("ShowMenu");
} else {
ai.act();
}
}
function calcqueue(wait) {
var Qtemp;
var fullcnt;
if (wait == true) {
fullcnt = currentunit.cnt;
currentunit.cnt = currentunit.cnt / 2;
Qtemp = Qhalf;
} else {
Qtemp = Qfull;
}
var j = 1;
while (j < QSIZE) {
Qtemp[j].cnt = 99999 /* 0x01869F */;
j++;
}
var i = 0;
while (i < unit.length) {
if (unit[i].unitcell != null) {
var j = 1;
while (j < QSIZE) {
if ((unit[i].cnt < Qtemp[j].cnt) || ((unit[i].cnt == Qtemp[j].cnt) && (unit[i].cntoff > Qtemp[j].cntoff))) {
var k = (QSIZE - 1);
while (k > j) {
var l = (k - 1);
Qtemp[k].cnt = Qtemp[l].cnt;
Qtemp[k].cntoff = Qtemp[l].cntoff;
Qtemp[k].interval = Qtemp[l].interval;
Qtemp[k].unit = Qtemp[l].unit;
k--;
}
Qtemp[j].cnt = unit[i].cnt;
Qtemp[j].cntoff = unit[i].cntoff;
Qtemp[j].interval = 100 / unit[i].spd;
Qtemp[j].unit = unit[i].unit;
break;
}
j++;
}
}
i++;
}
var i = 1;
while (i < (QSIZE - 1)) {
var nextcnt = (Qtemp[i].cnt + Qtemp[i].interval);
var j = (i + 1);
while (j < QSIZE) {
if ((nextcnt < Qtemp[j].cnt) || ((nextcnt == Qtemp[j].cnt) && (Qtemp[i].cntoff > Qtemp[j].cntoff))) {
var k = (QSIZE - 1);
while (k > j) {
var l = (k - 1);
Qtemp[k].cnt = Qtemp[l].cnt;
Qtemp[k].cntoff = Qtemp[l].cntoff;
Qtemp[k].interval = Qtemp[l].interval;
Qtemp[k].unit = Qtemp[l].unit;
k--;
}
Qtemp[j].cnt = nextcnt;
Qtemp[j].cntoff = Qtemp[i].cntoff;
Qtemp[j].interval = Qtemp[i].interval;
Qtemp[j].unit = Qtemp[i].unit;
break;
}
j++;
}
i++;
}
if (wait == true) {
currentunit.cnt = fullcnt;
}
}
function showqueue(wait) {
var Qtemp;
if (wait == true) {
Qtemp = Qhalf;
} else {
Qtemp = Qfull;
}
var j = 1;
while (j < QSIZE) {
eval ("queue.q" + j).showpic(Qtemp[j].unit);
j++;
}
}
function addprop(row, col, prop) {
units.attachMovie(prop, ((prop + row) + "x") + col, ((((row + col) + 1) * 100) + 70) - (col * 2));
var temp = eval (((("units." + prop) + row) + "x") + col);
temp._x = cell_x(row, col);
temp._y = cell_y(row, col);
}
function copyunit(i, j) {
unit[i].unit = unittype[j].unit;
unit[i].name = unittype[j].name;
unit[i].hp = (unit[i].hpmax = unittype[j].hp);
unit[i].hpsecret = unittype[j].hpsecret;
unit[i].movedistance = unittype[j].movedistance;
unit[i].ap = unittype[j].ap;
unit[i].df = unittype[j].df;
unit[i].mdf = unittype[j].mdf;
unit[i].ag = unittype[j].ag;
unit[i].spd = unittype[j].spd;
unit[i].cnt = 100 / unit[i].spd;
unit[i].cntoff = unittype[j].cntoff;
unit[i].bloodtype = unittype[j].bloodtype;
unit[i].damage = unittype[j].damage;
unit[i].attacktype = unittype[j].attacktype;
unit[i].range = unittype[j].range;
unit[i].spread = unittype[j].spread;
unit[i].attackface = unittype[j].attackface;
unit[i].attackbump = unittype[j].attackbump;
unit[i].showfxalways = unittype[j].showfxalways;
unit[i].attackrecover = unittype[j].attackrecover;
}
_quality = "MEDIUM";
ROWS = (COLS = 23);
QSIZE = 14;
Qfull = new Array(QSIZE);
Qhalf = new Array(QSIZE);
var i = 1;
while (i < QSIZE) {
Qfull[i] = new Object();
Qhalf[i] = new Object();
i++;
}
PLAYER = 0;
ENEMY = 1;
unit = new Array(14);
unittype = new Array(14);
var i = 0;
while (i < 14) {
unittype[i] = new Object();
i++;
}
unittype[0].unit = "Archer";
unittype[0].name = "Hunter";
unittype[0].hp = 2650;
unittype[0].movedistance = 4;
unittype[0].ap = 16;
unittype[0].df = 6;
unittype[0].mdf = 4;
unittype[0].ag = 14;
unittype[0].spd = 15;
unittype[0].cntoff = 9;
unittype[0].bloodtype = "RedBlood";
unittype[0].damage = "physical";
unittype[0].attacktype = "projectile";
unittype[1].unit = "Fighter";
unittype[1].name = "Shadowfist Fighter";
unittype[1].hp = 3200;
unittype[1].movedistance = 5;
unittype[1].ap = 18;
unittype[1].df = 9;
unittype[1].mdf = 0;
unittype[1].ag = 18;
unittype[1].spd = 13;
unittype[1].cntoff = 11;
unittype[1].bloodtype = "RedBlood";
unittype[1].damage = "physical";
unittype[1].attacktype = "normal";
unittype[1].range = 1;
unittype[1].spread = 0;
unittype[1].attackface = true;
unittype[2].unit = "Knight";
unittype[2].name = "Ironclad Sentinel";
unittype[2].hp = 4095;
unittype[2].movedistance = 3;
unittype[2].ap = 17;
unittype[2].df = 15;
unittype[2].mdf = 5;
unittype[2].ag = 6;
unittype[2].spd = 10;
unittype[2].cntoff = 14;
unittype[2].bloodtype = "RedBlood";
unittype[2].damage = "physical";
unittype[2].attacktype = "normal";
unittype[2].range = 1;
unittype[2].spread = 0;
unittype[2].attackface = true;
unittype[3].unit = "Mage";
unittype[3].name = "Templar Mage";
unittype[3].hp = 2405;
unittype[3].movedistance = 3;
unittype[3].ap = 20;
unittype[3].df = 7;
unittype[3].mdf = 9;
unittype[3].ag = 3;
unittype[3].spd = 10;
unittype[3].cntoff = 5;
unittype[3].bloodtype = "RedBlood";
unittype[3].damage = "magic";
unittype[3].attacktype = "line";
unittype[3].range = 4;
unittype[3].showfxalways = true;
unittype[3].attackrecover = false;
unittype[4].unit = "Wizard";
unittype[4].name = "Red Wizard";
unittype[4].hp = 2500;
unittype[4].movedistance = 3;
unittype[4].ap = 30;
unittype[4].df = 4;
unittype[4].mdf = 14;
unittype[4].ag = 0;
unittype[4].spd = 9;
unittype[4].cntoff = 3;
unittype[4].bloodtype = "RedBlood";
unittype[4].damage = "magic";
unittype[4].attacktype = "normal";
unittype[4].range = 3;
unittype[4].spread = 1;
unittype[4].showfxalways = true;
unittype[4].attackrecover = false;
unittype[5].unit = "Healer";
unittype[5].name = "Mystical Healer";
unittype[5].hp = 2170;
unittype[5].movedistance = 4;
unittype[5].ap = 13;
unittype[5].df = 5;
unittype[5].mdf = 10;
unittype[5].ag = 8;
unittype[5].spd = 11;
unittype[5].cntoff = 2;
unittype[5].bloodtype = "RedBlood";
unittype[5].damage = "heal";
unittype[5].attacktype = "normal";
unittype[5].range = 1;
unittype[5].spread = 0;
unittype[5].attackbump = false;
unittype[6].unit = "Assassin";
unittype[6].name = "Shadowblade Assassin";
unittype[6].hp = 2410;
unittype[6].movedistance = 5;
unittype[6].ap = 15;
unittype[6].df = 5;
unittype[6].mdf = 5;
unittype[6].ag = 20;
unittype[6].spd = 18;
unittype[6].cntoff = 10;
unittype[6].bloodtype = "RedBlood";
unittype[6].damage = "physical";
unittype[6].attacktype = "normal";
unittype[6].range = 1;
unittype[6].spread = 0;
unittype[6].attackface = true;
unittype[7].unit = "GateKeeper";
unittype[7].name = "Talon Guard";
unittype[7].hp = 2705;
unittype[7].movedistance = 4;
unittype[7].ap = 18;
unittype[7].df = 6;
unittype[7].mdf = 8;
unittype[7].ag = 11;
unittype[7].spd = 14;
unittype[7].cntoff = 8;
unittype[7].bloodtype = "RedBlood";
unittype[7].damage = "magic";
unittype[7].attacktype = "projectile";
unittype[8].unit = "DarkSoldier";
unittype[8].name = "Talon Soldier";
unittype[8].hp = 3170;
unittype[8].movedistance = 4;
unittype[8].ap = 22;
unittype[8].df = 8;
unittype[8].mdf = 8;
unittype[8].ag = 8;
unittype[8].spd = 14;
unittype[8].cntoff = 12;
unittype[8].bloodtype = "RedBlood";
unittype[8].damage = "physical";
unittype[8].attacktype = "normal";
unittype[8].range = 1;
unittype[8].spread = 0;
unittype[8].attackface = true;
unittype[9].unit = "Cleric";
unittype[9].name = "Cleric";
unittype[9].hp = 2505;
unittype[9].movedistance = 3;
unittype[9].ap = 16;
unittype[9].df = 7;
unittype[9].mdf = 7;
unittype[9].ag = 2;
unittype[9].spd = 11;
unittype[9].cntoff = 1;
unittype[9].bloodtype = "RedBlood";
unittype[9].damage = "heal";
unittype[9].attacktype = "normal";
unittype[9].range = 4;
unittype[9].spread = 0;
unittype[9].attackbump = false;
unittype[9].showfxalways = true;
unittype[10].unit = "Angel";
unittype[10].name = "Daemon";
unittype[10].hp = 5000;
unittype[10].hpsecret = true;
unittype[10].movedistance = 6;
unittype[10].ap = 250;
unittype[10].df = 0;
unittype[10].mdf = 0;
unittype[10].ag = 20;
unittype[10].spd = 11;
unittype[10].cntoff = 7;
unittype[10].bloodtype = "RedBlood";
unittype[10].damage = "magic";
unittype[10].attacktype = "normal";
unittype[10].range = 4;
unittype[10].spread = 0;
unittype[10].showfxalways = true;
unittype[11].unit = "Swordsman";
unittype[11].name = "Macabre Swordsman";
unittype[11].hp = 2660;
unittype[11].movedistance = 3;
unittype[11].ap = 19;
unittype[11].df = 8;
unittype[11].mdf = 3;
unittype[11].ag = 14;
unittype[11].spd = 15;
unittype[11].cntoff = 13;
unittype[11].bloodtype = "RedBlood";
unittype[11].damage = "physical";
unittype[11].attacktype = "normal";
unittype[11].range = 1;
unittype[11].spread = 0;
unittype[11].attackface = true;
unittype[11].attackrecover = false;
unittype[12].unit = "Striker";
unittype[12].name = "Templar Striker";
unittype[12].hp = 2400;
unittype[12].movedistance = 4;
unittype[12].ap = 15;
unittype[12].df = 7;
unittype[12].mdf = 7;
unittype[12].ag = 4;
unittype[12].spd = 10;
unittype[12].cntoff = 6;
unittype[12].bloodtype = "RedBlood";
unittype[12].damage = "magic";
unittype[12].attacktype = "line";
unittype[12].range = 2;
unittype[12].showfxalways = true;
unittype[12].attackrecover = false;
unittype[13].unit = "Sorceress";
unittype[13].name = "Mystical Sorceress";
unittype[13].hp = 2240;
unittype[13].movedistance = 2;
unittype[13].ap = 21;
unittype[13].df = 0;
unittype[13].mdf = 20;
unittype[13].ag = 0;
unittype[13].spd = 8;
unittype[13].cntoff = 4;
unittype[13].bloodtype = "RedBlood";
unittype[13].damage = "magic";
unittype[13].attacktype = "normal";
unittype[13].range = 5;
unittype[13].spread = 2;
unittype[13].showfxalways = true;
unittype[13].attackrecover = false;
bloodcount = 0;
bloods = new Array(ROWS);
map = new Array(ROWS);
var row = 0;
while (row < ROWS) {
bloods[row] = new Array(COLS);
map[row] = new Array(COLS);
var col = 0;
while (col < COLS) {
bloods[row][col] = 0;
if ((((row > 6) && (row < 18)) && (col > 6)) && (col < 18)) {
map[row][col] = -1;
} else {
map[row][col] = null;
}
col++;
}
row++;
}
map[16][7] = (map[17][7] = (map[17][8] = (map[7][16] = (map[7][17] = (map[8][17] = null)))));
var i = 9;
while (i < 14) {
map[7][i] = -2;
i++;
}
map[8][7] = -2;
var i = 10;
while (i < 15) {
map[8][i] = -2;
i++;
}
map[9][7] = (map[9][8] = -2);
var i = 10;
while (i < 14) {
map[9][i] = -2;
i++;
}
map[10][7] = (map[10][8] = (map[11][8] = (map[11][9] = (map[12][17] = (map[13][15] = -2)))));
var i = 14;
while (i < 17) {
map[14][i] = -2;
i++;
}
var i = 11;
while (i < 17) {
map[15][i] = -2;
i++;
}
var i = 10;
while (i < 18) {
map[16][i] = -2;
i++;
}
var i = 11;
while (i < 18) {
map[17][i] = -2;
i++;
}
addprop(8, 12, "FireHole");
addprop(16, 12, "FireHole");
addprop(8, 10, "SmokeHole");
cells.attachMovie("Blank", "grid", 60);
cells.attachMovie("Blank", "unitcells", 90);
var row = 0;
while (row < ROWS) {
var col = 0;
while (col < COLS) {
if (map[row][col] != null) {
var tempname = ((("g" + row) + "x") + col);
cells.grid.attachMovie("GridCell", tempname, (100 * row) + col);
var tempcell = eval ("cells.grid." + tempname);
tempcell.row = row;
tempcell.col = col;
}
col++;
}
row++;
}
NUM_UNITS = 13;
allystatcount = 0;
var i = 0;
while (i < NUM_UNITS) {
units.attachMovie("Unit", "unit" + i, i);
cells.unitcells.attachMovie("UnitCell", "cell" + i, i);
unit[i] = eval ("units.unit" + i);
unit[i].unitcell = eval ("cells.unitcells.cell" + i);
unit[i].unitcell.unit = unit[i];
unit[i].control = i < 7;
if (i > 6) {
unit[i].direction = 1;
unit[i].team = ENEMY;
} else {
unit[i].direction = 3;
unit[i].team = PLAYER;
}
switch (i) {
case 0 :
j = 5;
unit[i].row = 10;
unit[i].col = 17;
break;
case 1 :
j = 0;
unit[i].row = 13;
unit[i].col = 17;
break;
case 2 :
j = 3;
unit[i].row = 11;
unit[i].col = 16;
break;
case 3 :
j = 4;
unit[i].row = 12;
unit[i].col = 16;
break;
case 4 :
j = 6;
unit[i].row = 10;
unit[i].col = 16;
break;
case 5 :
j = 1;
unit[i].row = 11;
unit[i].col = 15;
break;
case 6 :
j = 2;
unit[i].row = 12;
unit[i].col = 15;
break;
case 7 :
j = 7;
unit[i].row = 12;
unit[i].col = 10;
break;
case 8 :
j = 8;
unit[i].row = 11;
unit[i].col = 10;
break;
case 9 :
j = 9;
unit[i].row = 12;
unit[i].col = 8;
break;
case 10 :
j = 13;
unit[i].row = 12;
unit[i].col = 9;
break;
case 11 :
j = 11;
unit[i].row = 10;
unit[i].col = 9;
break;
case 12 :
j = 12;
unit[i].row = 13;
unit[i].col = 9;
}
copyunit(i, j);
map[unit[i].row][unit[i].col] = unit[i];
if (unit[i].team == PLAYER) {
allystats.attachMovie("AllyStat", unit[i].name, allystatcount++);
var tempallystat = eval ("allystats." + unit[i].name);
tempallystat._y = 0;
tempallystat._x = ((-tempallystat._width) * allystatcount) * 1.4;
tempallystat.pic.gotoAndStop(unit[i].unit);
tempallystat.unit = unit[i];
}
i++;
}
hidecells();
if (muted != true) {
BGM.gotoAndStop("On");
}
allystats._visible = (queue._visible = (activestats._visible = (targetstats._visible = false)));
fullscreenbtn.tabEnabled = (fullscreenbtn.useHandCursor = false);
Instance of Symbol 122 MovieClip [Blank] "blood" in Frame 68
onClipEvent (load) {
count = 0;
}
Instance of Symbol 816 MovieClip in Frame 68
onClipEvent (load) {
gotoAndPlay(Math.floor(Math.random() * 6) + 1 +67);
}
Instance of Symbol 816 MovieClip in Frame 68
onClipEvent (load) {
gotoAndPlay(Math.floor(Math.random() * 6) + 1 +67);
}
Instance of Symbol 689 MovieClip "indicator" in Frame 68
onClipEvent (load) {
_visible = false;
stop();
}
Instance of Symbol 122 MovieClip [Blank] "shadows" in Frame 68
onClipEvent (load) {
count = 0;
}
Instance of Symbol 891 MovieClip "pointer" in Frame 68
onClipEvent (load) {
_visible = false;
stop();
}
Instance of Symbol 894 MovieClip "canceltext" in Frame 68
onClipEvent (load) {
_visible = false;
}
Frame 78
stop();
allystats._visible = (queue._visible = (activestats._visible = (targetstats._visible = true)));
if (muted != true) {
Mute.gotoAndStop("UnMuted");
} else {
Mute.gotoAndStop("Muted");
}
beginnextturn();
Frame 79
Mute.gotoAndStop("Disable");
Frame 95
fullscreenbtn.tabEnabled = (fullscreenbtn.useHandCursor = false);
stop();
Frame 96
BGM.gotoAndPlay("Off");
Frame 115
gotoAndPlay (213);
Frame 116
Mute.gotoAndStop("Disable");
BGM.gotoAndPlay("Off");
Frame 135
fullscreenbtn.tabEnabled = (fullscreenbtn.useHandCursor = false);
Frame 213
PlayAgainBtn.tabEnabled = (PlayAgainBtn.enabled = false);
Frame 222
stop();
PlayAgainBtn.enabled = true;
Frame 224
gotoAndPlay (68);
Symbol 5 MovieClip [Unit] Frame 1
function attackcommand() {
_parent._parent.showcells();
_parent._parent.cells.attachMovie("Blank", "attackcells", 100);
_parent._parent.cells.attackcells._x = (_parent._parent.cells.attackcells._y = 0);
_parent._parent.cells.attackcells.attachMovie("CancelCell", "cancelcell", (100 * row) + col);
_parent._parent.cells.attackcells.cancelcell.row = row;
_parent._parent.cells.attackcells.cancelcell.col = col;
_parent._parent.cells.attackcells.attacktype = attacktype;
_parent._parent.cells.attackcells.crow = row;
_parent._parent.cells.attackcells.ccol = col;
if (attacktype == "normal") {
_parent._parent.cells.attackcells.spread = spread;
var temprow = (row - range);
while (temprow <= (row + range)) {
var range1 = (range - Math.abs(row - temprow));
var tempcol = (col - range1);
while (tempcol <= (col + range1)) {
if ((((temprow != row) || (tempcol != col)) && (_parent._parent.map[temprow][tempcol] != null)) && (_parent._parent.map[temprow][tempcol] != -2)) {
showattackcell(temprow, tempcol);
}
tempcol++;
}
temprow++;
}
} else if (attacktype == "line") {
_parent._parent.cells.attackcells.range = range;
var temprow = (row - range);
while (temprow <= (row + range)) {
if (((temprow != row) && (_parent._parent.map[temprow][col] != null)) && (_parent._parent.map[temprow][col] != -2)) {
showattackcell(temprow, col);
}
temprow++;
}
var tempcol = (col - range);
while (tempcol <= (col + range)) {
if (((tempcol != col) && (_parent._parent.map[row][tempcol] != null)) && (_parent._parent.map[row][tempcol] != -2)) {
showattackcell(row, tempcol);
}
tempcol++;
}
} else if (attacktype == "projectile") {
var temprow = row;
var tempcol = col;
var temprange = 0;
var currange = 0;
do {
if (_parent._parent.map[temprow][++tempcol] == null) {
break;
}
if ((currange++) > 0) {
if (_parent._parent.map[temprow][tempcol] != -2) {
showattackcell(temprow, tempcol);
}
}
} while ((_parent._parent.map[temprow][tempcol] == -1) || (_parent._parent.map[temprow][tempcol] == -2));
if (currange > temprange) {
temprange = currange;
}
tempcol = col;
currange = 0;
do {
if (_parent._parent.map[++temprow][tempcol] == null) {
break;
}
if ((currange++) > 0) {
if (_parent._parent.map[temprow][tempcol] != -2) {
showattackcell(temprow, tempcol);
}
}
} while ((_parent._parent.map[temprow][tempcol] == -1) || (_parent._parent.map[temprow][tempcol] == -2));
if (currange > temprange) {
temprange = currange;
}
temprow = row;
currange = 0;
do {
if (_parent._parent.map[temprow][--tempcol] == null) {
break;
}
if ((currange++) > 0) {
if (_parent._parent.map[temprow][tempcol] != -2) {
showattackcell(temprow, tempcol);
}
}
} while ((_parent._parent.map[temprow][tempcol] == -1) || (_parent._parent.map[temprow][tempcol] == -2));
if (currange > temprange) {
temprange = currange;
}
tempcol = col;
currange = 0;
do {
if (_parent._parent.map[--temprow][tempcol] == null) {
break;
}
if ((currange++) > 0) {
if (_parent._parent.map[temprow][tempcol] != -2) {
showattackcell(temprow, tempcol);
}
}
} while ((_parent._parent.map[temprow][tempcol] == -1) || (_parent._parent.map[temprow][tempcol] == -2));
if (currange > temprange) {
temprange = currange;
}
_parent._parent.cells.attackcells.range = temprange;
}
}
function showattackcell(temprow, tempcol) {
var tempcell = ((("cell" + temprow) + "x") + tempcol);
_parent._parent.cells.attackcells.attachMovie("AttackCell", tempcell, (100 * temprow) + tempcol);
eval ("_parent._parent.cells.attackcells." + tempcell).row = temprow;
eval ("_parent._parent.cells.attackcells." + tempcell).col = tempcol;
}
function movecommand() {
_parent._parent.showcells();
_parent._parent.cells.attachMovie("Blank", "movecells", 100);
_parent._parent.cells.movecells._x = (_parent._parent.cells.movecells._y = 0);
_parent._parent.cells.movecells.attachMovie("CancelCell", "cancelcell", (100 * row) + col);
_parent._parent.cells.movecells.cancelcell.row = row;
_parent._parent.cells.movecells.cancelcell.col = col;
dbuffer = new Array(_parent._parent.ROWS);
var i = 0;
while (i < _parent._parent.ROWS) {
dbuffer[i] = new Array(_parent._parent.COLS);
i++;
}
showmovegrid(row, col, movedistance, "movecells", "MoveCell");
delete dbuffer;
}
function undocommand() {
if (undorow == undefined) {
undorow = row;
}
if (undocol == undefined) {
undocol = col;
}
if (undodirection == undefined) {
undodirection = direction;
}
gotoAndPlay (48);
}
function showmoverange() {
if ((_parent._parent.cells.moverangecells.cancelcell.row == row) && (_parent._parent.cells.moverangecells.cancelcell.col == col)) {
_parent._parent.cells.moverangecells.removeMovieClip();
return(undefined);
}
_parent._parent.cells.attachMovie("Blank", "moverangecells", 50);
_parent._parent.cells.moverangecells._x = (_parent._parent.cells.moverangecells._y = 0);
_parent._parent.cells.moverangecells.attachMovie("RangeCancelCell", "cancelcell", (100 * row) + col);
_parent._parent.cells.moverangecells.cancelcell.row = row;
_parent._parent.cells.moverangecells.cancelcell.col = col;
dbuffer = new Array(_parent._parent.ROWS);
var i = 0;
while (i < _parent._parent.ROWS) {
dbuffer[i] = new Array(_parent._parent.COLS);
i++;
}
showmovegrid(row, col, movedistance, "moverangecells", "MoveRangeCell");
delete dbuffer;
}
function showmovegrid(cellrow, cellcol, distance, frame, attachment) {
if (distance <= 0) {
return(undefined);
}
if ((dbuffer[cellrow][cellcol] != undefined) && (dbuffer[cellrow][cellcol] >= distance)) {
return(undefined);
}
if ((_parent._parent.map[cellrow][cellcol] != -1) && (_parent._parent.map[cellrow][cellcol].team != team)) {
return(undefined);
}
dbuffer[cellrow][cellcol] = distance;
var tempcell;
var temppath = (("_parent._parent.cells." + frame) + ".");
var temprow = new Array(cellrow, cellrow + 1, cellrow, cellrow - 1);
var tempcol = new Array(cellcol + 1, cellcol, cellcol - 1, cellcol);
var i = 0;
while (i < 4) {
tempcell = (("cell" + temprow[i]) + "x") + tempcol[i];
if ((_parent._parent.map[temprow[i]][tempcol[i]] == -1) && (eval (temppath + tempcell) == null)) {
eval ("_parent._parent.cells." + frame).attachMovie(attachment, tempcell, (100 * temprow[i]) + tempcol[i]);
eval (temppath + tempcell).row = temprow[i];
eval (temppath + tempcell).col = tempcol[i];
}
i++;
}
distance--;
var i = 0;
while (i < 4) {
showmovegrid(temprow[i], tempcol[i], distance, frame, attachment);
i++;
}
}
function stand(facedirection) {
if (facedirection == undefined) {
facedirection = direction;
}
switch (Math.abs(facedirection - direction)) {
case 0 :
sprite.gotoAndStop("Stand" + direction);
gotoAndStop (3);
return;
case 2 :
sprite.gotoAndStop("WalkM" + ((direction % 4) + 1));
direction = facedirection;
gotoAndPlay (3);
return;
default :
direction = facedirection;
gotoAndStop (5);
}
}
function die() {
_parent._parent.map[row][col] = -1;
unitcell.removeMovieClip();
delete unitcell;
attachMovie("Death", "deathfx", 99);
gotoAndPlay (46);
}
function letpass(approachdirection, nextdirection) {
if ((approachdirection < 1) || (approachdirection > 4)) {
approachdirection = 0;
}
var temp = new Array(5);
temp[approachdirection] = false;
temp[((nextdirection + 1) % 4) + 1] = false;
dodgedirection = direction;
var i = 1;
while (i <= 4) {
if (temp[i] == false) {
} else {
if (i == direction) {
dodgedirection = i;
break;
}
if (dodgedirection == direction) {
dodgedirection = i;
} else if (Math.abs(dodgedirection - direction) == 2) {
dodgedirection = i;
}
}
i++;
}
gotoAndPlay (27);
}
function attack(facedirection, targetrow, targetcol, targetarea) {
if ((facedirection >= 1) && (facedirection <= 4)) {
olddirection = direction;
direction = facedirection;
}
if ((targetrow == null) || (targetcol == null)) {
targetlist = new Array(targetarea.length);
var i = 0;
while (i < targetlist.length) {
targetlist[i] = _parent._parent.map[targetarea[i].row][targetarea[i].col];
if (targetlist[i] == -1) {
if (showfxalways) {
_parent.attachMovie("Blank", "tempfx" + i, ((((targetarea[i].row + targetarea[i].col) + 1) * 100) + 70) - targetarea[i].col);
targetlist[i] = eval ("_parent.tempfx" + i);
targetlist[i]._x = _parent._parent.cell_x(targetarea[i].row, targetarea[i].col);
targetlist[i]._y = _parent._parent.cell_y(targetarea[i].row, targetarea[i].col) + 22;
targetlist[i].sprite = targetlist[i];
targetlist[i].istempfx = true;
} else {
targetlist[i] = null;
}
} else if (targetlist[i] == -2) {
targetlist[i] = null;
}
i++;
}
} else {
targetlist = new Array(1);
targetlist[0] = _parent._parent.map[targetrow][targetcol];
if (targetlist[0] == -1) {
if (showfxalways) {
_parent.attachMovie("Blank", "tempfx", ((((targetrow + targetcol) + 1) * 100) + 70) - targetcol);
targetlist[0] = _parent.tempfx;
targetlist[0]._x = _parent._parent.coords.cell_x(targetrow, targetcol);
targetlist[0]._y = _parent._parent.coords.cell_y(targetrow, targetcol) + 22;
targetlist[0].sprite = targetlist[0];
targetlist[0].istempfx = true;
} else {
targetlist[0] = null;
}
} else if (targetlist[0] == -2) {
targetlist[0] = null;
}
}
gotoAndPlay (19);
}
function movepath(newpath, freecell) {
if (newpath != undefined) {
path = newpath;
}
if (path.length > 0) {
if (freecell != false) {
_parent._parent.map[row][col] = -1;
}
var newdirection = Number(path.charAt(0));
path = path.substr(1);
switch (newdirection) {
case 1 :
col++;
break;
case 2 :
row++;
break;
case 3 :
col--;
break;
case 4 :
row--;
break;
default :
return(undefined);
}
if (Math.abs(newdirection - direction) == 2) {
sprite.gotoAndStop("WalkM" + ((direction % 4) + 1));
direction = newdirection;
gotoAndPlay (6);
} else {
direction = newdirection;
gotoAndPlay (8);
}
}
}
function moveshift(shiftdirection) {
if (shiftdirection == undefined) {
shiftdirection = direction;
}
switch (shiftdirection) {
case 1 :
_x = (_x + 11);
shadow._x = _x + 11;
_y = (_y + 5.5);
shadow._y = _y + 5.5;
return;
case 2 :
_x = (_x - 11);
shadow._x = _x - 11;
_y = (_y + 5.5);
shadow._y = _y + 5.5;
return;
case 3 :
_x = (_x - 11);
shadow._x = _x - 11;
_y = (_y - 5.5);
shadow._y = _y - 5.5;
return;
case 4 :
_x = (_x + 11);
shadow._x = _x + 11;
_y = (_y - 5.5);
shadow._y = _y - 5.5;
}
}
function setdepth(offset) {
if (offset == undefined) {
offset = 0;
}
swapDepths((((((row + col) + 1) * 100) + 70) - (col * 2)) + offset);
}
path = "";
if ((((unit != undefined) && (direction != undefined)) && (row != undefined)) && (col != undefined)) {
if (!((direction >= 1) && (direction <= 4))) {
direction = 1;
}
setdepth();
_parent._parent.shadows.attachMovie("Shadow", _name, 100 + (_parent._parent.shadows.count++));
shadow = eval ("_parent._parent.shadows." + _name);
_x = _parent._parent.cell_x(row, col);
shadow._x = _parent._parent.cell_x(row, col);
_y = _parent._parent.cell_y(row, col);
shadow._y = _parent._parent.cell_y(row, col);
attachMovie(unit, "sprite", 0);
sprite._x = 0;
sprite._y = 22;
stand();
}
Symbol 5 MovieClip [Unit] Frame 2
gotoAndPlay (1);
Symbol 5 MovieClip [Unit] Frame 3
state = "Standing";
standalt = false;
Symbol 5 MovieClip [Unit] Frame 5
state = "Standing";
sprite.gotoAndStop("Stand" + direction);
stop();
Symbol 5 MovieClip [Unit] Frame 6
state = "Walking";
Symbol 5 MovieClip [Unit] Frame 8
state = "Walking";
sprite.gotoAndStop("WalkL" + direction);
moveshift();
if (_parent._parent.map[row][col] != -1) {
var temp;
if (path.length > 0) {
temp = Number(path.charAt(0));
} else {
temp = 0;
}
_parent._parent.map[row][col].letpass(direction, temp);
}
Symbol 5 MovieClip [Unit] Frame 11
sprite.gotoAndStop("WalkM" + direction);
moveshift();
if (_parent._parent.map[row][col] != -1) {
var tempdir = _parent._parent.map[row][col].dodgedirection;
if (tempdir < 3) {
setdepth(1);
} else {
setdepth(-1);
}
} else {
setdepth();
}
Symbol 5 MovieClip [Unit] Frame 13
sprite.gotoAndStop("WalkR" + direction);
moveshift();
Symbol 5 MovieClip [Unit] Frame 16
sprite.gotoAndStop("WalkM" + direction);
moveshift();
if (path.length <= 0) {
_parent._parent.map[row][col] = this;
moved = true;
_parent._parent.endaction();
stand();
}
Symbol 5 MovieClip [Unit] Frame 18
movepath(undefined, false);
Symbol 5 MovieClip [Unit] Frame 19
state = "Attacking";
sprite.attacking = (fxdone = (counting = true));
sprite.connected = false;
if (attackface) {
targetdirection = ((direction + 1) % 4) + 1;
var i = 0;
while (i < targetlist.length) {
targetlist[i].stand(targetdirection);
i++;
}
}
targeti = 0;
switch (Math.abs(direction - olddirection)) {
case 0 :
sprite.gotoAndPlay("Attack" + direction);
gotoAndPlay (25);
break;
case 2 :
sprite.gotoAndStop("WalkM" + ((olddirection % 4) + 1));
break;
default :
gotoAndPlay (21);
}
Symbol 5 MovieClip [Unit] Frame 21
sprite.gotoAndStop("Stand" + direction);
Symbol 5 MovieClip [Unit] Frame 24
sprite.gotoAndPlay("Attack" + direction);
gotoAndPlay (25);
Symbol 5 MovieClip [Unit] Frame 25
if (sprite.attacking || (sprite.connected)) {
shadow._x = _x + sprite.shift_x;
shadow._y = _y + sprite.shift_y;
if (sprite.connected) {
if (targetlist[targeti] != null) {
targetlist[targeti].sprite.attachMovie(sprite.fxtype, "fx", 100);
targetlist[targeti].sprite.fx.direction = direction;
if (attackbump != false) {
if (targetlist[targeti] != this) {
targetlist[targeti].sprite.gotoAndStop("WalkR" + targetlist[targeti].direction);
}
targetlist[targeti].sprite._x = targetlist[targeti].sprite._x + sprite.bump_x;
targetlist[targeti].sprite._y = targetlist[targeti].sprite._y + sprite.bump_y;
targetlist[targeti].shadow._x = targetlist[targeti].shadow._x + sprite.bump_x;
targetlist[targeti].shadow._y = targetlist[targeti].shadow._y + sprite.bump_y;
if (targetlist[targeti].bloodtype != undefined) {
var bloodname = (((("blood" + targetlist[targeti].row) + "x") + targetlist[targeti].col) + "x");
}
var i = 0;
while (i < 2) {
var bloodname1 = (bloodname + (_parent._parent.bloods[targetlist[targeti].row][targetlist[targeti].col]++));
_parent._parent.blood.attachMovie(targetlist[targeti].bloodtype, bloodname1, _parent._parent.bloodcount++);
eval (("_parent._parent.blood." + bloodname) + (_parent._parent.bloods[targetlist[targeti].row][targetlist[targeti].col] - 25)).removeMovieClip();
var tempblood = eval ("_parent._parent.blood." + bloodname1);
tempblood._x = ((Math.random() * 50) - 25) + _parent._parent.cell_x(targetlist[targeti].row, targetlist[targeti].col);
tempblood._y = ((Math.random() * 25) + 9.5) + _parent._parent.cell_y(targetlist[targeti].row, targetlist[targeti].col);
tempblood._xscale = (tempblood._yscale = 60 + (Math.random() * 60));
i++;
}
}
}
if ((++targeti) >= targetlist.length) {
sprite.connected = false;
}
}
} else if (fxdone) {
shadow._x = _x;
shadow._y = _y;
var i = 0;
while (i < targetlist.length) {
if (((targetlist[i] != null) && (!targetlist[i].istempfx)) && (attackbump != false)) {
targetlist[i].sprite._x = targetlist[i].sprite._x - sprite.bump_x;
targetlist[i].sprite._y = targetlist[i].sprite._y - sprite.bump_y;
targetlist[i].shadow._x = targetlist[i].shadow._x - sprite.bump_x;
targetlist[i].shadow._y = targetlist[i].shadow._y - sprite.bump_y;
if ((attackrecover != false) && (targetlist[targeti] != this)) {
targetlist[i].stand();
}
}
i++;
}
sprite.gotoAndStop("Stand" + direction);
targeti = -1;
lastcounter = (counter = null);
fxdone = false;
killed = false;
} else if (counting) {
if ((counter == null) || (counter.done)) {
if ((++targeti) >= targetlist.length) {
counting = false;
} else if (targetlist[targeti].hp != undefined) {
_parent._parent.targetstats.showstats(targetlist[targeti]);
targetlist[targeti].attachMovie("HPCounter", "hpcounter", 110);
lastcounter = (counter = targetlist[targeti].hpcounter);
var dmg;
if (damage == "heal") {
dmg = ap * 50;
dmg = dmg + (((dmg * ap) * Math.random()) / 300);
} else {
var tdf;
if (damage == "magic") {
tdf = targetlist[targeti].mdf;
} else {
tdf = targetlist[targeti].df;
}
dmg = (ap - tdf) * 50;
if (damage == "magic") {
dmg = dmg + (((dmg * ap) * Math.random()) / 300);
dmg = dmg - (((dmg * tdf) * Math.random()) / 200);
} else {
dmg = dmg + (((dmg * ag) * Math.random()) / 100);
dmg = dmg - (((dmg * targetlist[targeti].ag) * Math.random()) / 50);
}
}
if (dmg < 0) {
dmg = 0;
} else if (dmg > 9999) {
dmg = 9999;
} else {
dmg = Math.round(dmg);
}
counter.heal = damage == "heal";
if (counter.heal) {
targetlist[targeti].hp = targetlist[targeti].hp + dmg;
if (targetlist[targeti].hp > targetlist[targeti].hpmax) {
dmg = dmg - (targetlist[targeti].hp - targetlist[targeti].hpmax);
targetlist[targeti].hp = targetlist[targeti].hpmax;
}
} else {
targetlist[targeti].hp = targetlist[targeti].hp - dmg;
if (targetlist[targeti].hp <= 0) {
targetlist[targeti].hp = 0;
killed = true;
targetlist[targeti].die();
}
}
counter.counter = dmg;
_parent._parent.targetstats.newhp = targetlist[targeti].hp;
_parent._parent.targetstats.gotoAndStop("HPChange");
} else {
counter = null;
}
}
} else if (lastcounter.done == undefined) {
delete targetlist;
attacked = true;
if (killed) {
_parent._parent.calcqueue();
_parent._parent.showqueue();
}
_parent._parent.endaction();
undodirection = direction;
stand();
}
Symbol 5 MovieClip [Unit] Frame 26
gotoAndPlay (25);
Symbol 5 MovieClip [Unit] Frame 27
state = "LettingPass";
sprite.gotoAndStop("WalkR" + dodgedirection);
moveshift(((dodgedirection + 1) % 4) + 1);
Symbol 5 MovieClip [Unit] Frame 30
sprite.gotoAndStop("WalkM" + dodgedirection);
moveshift(((dodgedirection + 1) % 4) + 1);
Symbol 5 MovieClip [Unit] Frame 42
sprite.gotoAndStop("WalkR" + dodgedirection);
moveshift(dodgedirection);
Symbol 5 MovieClip [Unit] Frame 45
moveshift(dodgedirection);
stand();
Symbol 5 MovieClip [Unit] Frame 46
if ((hpcounter == null) && (deathfx == null)) {
shadow.removeMovieClip();
removeMovieClip(this);
}
Symbol 5 MovieClip [Unit] Frame 47
gotoAndPlay (46);
Symbol 5 MovieClip [Unit] Frame 48
_alpha = 75;
shadow._alpha = 75;
Symbol 5 MovieClip [Unit] Frame 49
_alpha = 50;
shadow._alpha = 50;
Symbol 5 MovieClip [Unit] Frame 50
_alpha = 25;
shadow._alpha = 25;
Symbol 5 MovieClip [Unit] Frame 51
_alpha = 0;
shadow._alpha = 0;
_parent._parent.map[row][col] = -1;
row = undorow;
col = undocol;
direction = undodirection;
_parent._parent.map[row][col] = this;
setdepth();
_x = _parent._parent.cell_x(row, col);
shadow._x = _parent._parent.cell_x(row, col);
_y = _parent._parent.cell_y(row, col);
shadow._y = _parent._parent.cell_y(row, col);
moved = false;
_parent._parent.endaction();
attachMovie("UndoFadeIn", "fadein", 10);
stand();
Symbol 56 MovieClip [Assassin] Frame 18
shift_x = 10;
shift_y = 5;
Symbol 56 MovieClip [Assassin] Frame 22
fxtype = "Slash";
connected = true;
bump_x = 12;
bump_y = 6;
shift_x = 35;
shift_y = 15.5;
Symbol 56 MovieClip [Assassin] Frame 32
attacking = false;
stop();
Symbol 56 MovieClip [Assassin] Frame 33
shift_x = -10;
shift_y = 5;
Symbol 56 MovieClip [Assassin] Frame 37
fxtype = "Slash";
connected = true;
bump_x = -12;
bump_y = 6;
shift_x = -31;
shift_y = 17.5;
Symbol 56 MovieClip [Assassin] Frame 47
attacking = false;
stop();
Symbol 56 MovieClip [Assassin] Frame 48
shift_x = -10;
shift_y = -5;
Symbol 56 MovieClip [Assassin] Frame 52
fxtype = "Slash";
connected = true;
bump_x = -12;
bump_y = -6;
shift_x = -35;
shift_y = -15.5;
Symbol 56 MovieClip [Assassin] Frame 62
attacking = false;
stop();
Symbol 56 MovieClip [Assassin] Frame 63
shift_x = 10;
shift_y = -5;
Symbol 56 MovieClip [Assassin] Frame 67
fxtype = "Slash";
connected = true;
bump_x = 12;
bump_y = -6;
shift_x = 31;
shift_y = -17.5;
Symbol 56 MovieClip [Assassin] Frame 77
attacking = false;
stop();
Symbol 98 MovieClip [Cleric] Frame 18
shift_x = 4;
shift_y = 2;
Symbol 98 MovieClip [Cleric] Frame 20
fxtype = "Light";
connected = true;
shift_x = 10;
shift_y = 5;
Symbol 98 MovieClip [Cleric] Frame 34
shift_x = 4;
shift_y = 2;
Symbol 98 MovieClip [Cleric] Frame 35
attacking = false;
stop();
Symbol 98 MovieClip [Cleric] Frame 36
shift_x = -4;
shift_y = 2;
Symbol 98 MovieClip [Cleric] Frame 38
fxtype = "Light";
connected = true;
shift_x = -10;
shift_y = 5;
Symbol 98 MovieClip [Cleric] Frame 52
shift_x = -4;
shift_y = 2;
Symbol 98 MovieClip [Cleric] Frame 53
attacking = false;
stop();
Symbol 98 MovieClip [Cleric] Frame 54
shift_x = -4;
shift_y = -2;
Symbol 98 MovieClip [Cleric] Frame 56
fxtype = "Light";
connected = true;
shift_x = -10;
shift_y = -5;
Symbol 98 MovieClip [Cleric] Frame 70
shift_x = -4;
shift_y = -2;
Symbol 98 MovieClip [Cleric] Frame 71
attacking = false;
stop();
Symbol 98 MovieClip [Cleric] Frame 72
shift_x = 4;
shift_y = -2;
Symbol 98 MovieClip [Cleric] Frame 74
fxtype = "Light";
connected = true;
shift_x = 10;
shift_y = -5;
Symbol 98 MovieClip [Cleric] Frame 88
shift_x = 4;
shift_y = -2;
Symbol 98 MovieClip [Cleric] Frame 89
attacking = false;
stop();
Symbol 140 MovieClip [Angel] Frame 18
fxtype = "Nuke";
connected = true;
bump_x = (bump_y = 0);
shift_x = 1;
shift_y = 0.5;
Symbol 140 MovieClip [Angel] Frame 29
shift_x = 5;
shift_y = 2.5;
Instance of Symbol 122 MovieClip [Blank] in Symbol 140 MovieClip [Angel] Frame 29
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 140 MovieClip [Angel] Frame 38
attacking = false;
stop();
Symbol 140 MovieClip [Angel] Frame 39
fxtype = "Nuke";
connected = true;
bump_x = (bump_y = 0);
shift_x = -1;
shift_y = 0.5;
Symbol 140 MovieClip [Angel] Frame 50
shift_x = -5;
shift_y = 2.5;
Instance of Symbol 122 MovieClip [Blank] in Symbol 140 MovieClip [Angel] Frame 50
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 140 MovieClip [Angel] Frame 59
attacking = false;
stop();
Symbol 140 MovieClip [Angel] Frame 60
fxtype = "Nuke";
connected = true;
bump_x = (bump_y = 0);
shift_x = -1;
shift_y = -0.5;
Symbol 140 MovieClip [Angel] Frame 71
shift_x = -5;
shift_y = -2.5;
Instance of Symbol 122 MovieClip [Blank] in Symbol 140 MovieClip [Angel] Frame 71
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 140 MovieClip [Angel] Frame 80
attacking = false;
stop();
Symbol 140 MovieClip [Angel] Frame 81
fxtype = "Nuke";
connected = true;
bump_x = (bump_y = 0);
shift_x = 1;
shift_y = -0.5;
Symbol 140 MovieClip [Angel] Frame 92
shift_x = 5;
shift_y = -2.5;
Instance of Symbol 122 MovieClip [Blank] in Symbol 140 MovieClip [Angel] Frame 92
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 140 MovieClip [Angel] Frame 101
attacking = false;
stop();
Symbol 181 MovieClip [Healer] Frame 18
shift_x = 2;
shift_y = 1;
Symbol 181 MovieClip [Healer] Frame 22
fxtype = "Glow";
connected = true;
shift_x = 18;
shift_y = 5;
Symbol 181 MovieClip [Healer] Frame 37
attacking = false;
stop();
Symbol 181 MovieClip [Healer] Frame 38
shift_x = -2;
shift_y = 1;
Symbol 181 MovieClip [Healer] Frame 42
fxtype = "Glow";
connected = true;
shift_x = -10;
shift_y = 9;
Symbol 181 MovieClip [Healer] Frame 57
attacking = false;
stop();
Symbol 181 MovieClip [Healer] Frame 58
shift_x = -2;
shift_y = -1;
Symbol 181 MovieClip [Healer] Frame 62
fxtype = "Glow";
connected = true;
shift_x = -18;
shift_y = -5;
Symbol 181 MovieClip [Healer] Frame 77
attacking = false;
stop();
Symbol 181 MovieClip [Healer] Frame 78
shift_x = 2;
shift_y = -1;
Symbol 181 MovieClip [Healer] Frame 82
fxtype = "Glow";
connected = true;
shift_x = 10;
shift_y = -9;
Symbol 181 MovieClip [Healer] Frame 97
attacking = false;
stop();
Symbol 233 MovieClip [Sorceress] Frame 18
shift_x = (shift_y = 0);
Symbol 233 MovieClip [Sorceress] Frame 24
fxtype = "Starfall";
connected = true;
bump_x = (bump_y = 0);
Instance of Symbol 122 MovieClip [Blank] in Symbol 233 MovieClip [Sorceress] Frame 24
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 233 MovieClip [Sorceress] Frame 44
attacking = false;
stop();
Symbol 233 MovieClip [Sorceress] Frame 45
shift_x = (shift_y = 0);
Symbol 233 MovieClip [Sorceress] Frame 51
fxtype = "Starfall";
connected = true;
bump_x = (bump_y = 0);
Instance of Symbol 122 MovieClip [Blank] in Symbol 233 MovieClip [Sorceress] Frame 51
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 233 MovieClip [Sorceress] Frame 71
attacking = false;
stop();
Symbol 233 MovieClip [Sorceress] Frame 72
shift_x = (shift_y = 0);
Symbol 233 MovieClip [Sorceress] Frame 78
fxtype = "Starfall";
connected = true;
bump_x = (bump_y = 0);
Instance of Symbol 122 MovieClip [Blank] in Symbol 233 MovieClip [Sorceress] Frame 78
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 233 MovieClip [Sorceress] Frame 98
attacking = false;
stop();
Symbol 233 MovieClip [Sorceress] Frame 99
shift_x = (shift_y = 0);
Symbol 233 MovieClip [Sorceress] Frame 105
fxtype = "Starfall";
connected = true;
bump_x = (bump_y = 0);
Instance of Symbol 122 MovieClip [Blank] in Symbol 233 MovieClip [Sorceress] Frame 105
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 233 MovieClip [Sorceress] Frame 125
attacking = false;
stop();
Symbol 286 MovieClip [Wizard] Frame 18
shift_x = (shift_y = 0);
Symbol 286 MovieClip [Wizard] Frame 26
fxtype = "Fire";
connected = true;
bump_x = (bump_y = 0);
Symbol 286 MovieClip [Wizard] Frame 39
attacking = false;
stop();
Symbol 286 MovieClip [Wizard] Frame 40
shift_x = (shift_y = 0);
Symbol 286 MovieClip [Wizard] Frame 48
fxtype = "Fire";
connected = true;
bump_x = (bump_y = 0);
Symbol 286 MovieClip [Wizard] Frame 61
attacking = false;
stop();
Symbol 286 MovieClip [Wizard] Frame 62
shift_x = (shift_y = 0);
Symbol 286 MovieClip [Wizard] Frame 70
fxtype = "Fire";
connected = true;
bump_x = (bump_y = 0);
Symbol 286 MovieClip [Wizard] Frame 83
attacking = false;
stop();
Symbol 286 MovieClip [Wizard] Frame 84
shift_x = (shift_y = 0);
Symbol 286 MovieClip [Wizard] Frame 92
fxtype = "Fire";
connected = true;
bump_x = (bump_y = 0);
Symbol 286 MovieClip [Wizard] Frame 105
attacking = false;
stop();
Symbol 328 MovieClip [Mage] Frame 18
shift_x = 2;
shift_y = 1;
Symbol 328 MovieClip [Mage] Frame 22
fxtype = "GroundBlast";
connected = true;
bump_x = (bump_y = 0);
shift_x = 14;
shift_y = 7;
Symbol 328 MovieClip [Mage] Frame 31
attacking = false;
stop();
Symbol 328 MovieClip [Mage] Frame 32
shift_x = -2;
shift_y = 1;
Symbol 328 MovieClip [Mage] Frame 36
fxtype = "GroundBlast";
connected = true;
bump_x = (bump_y = 0);
shift_x = -14;
shift_y = 7;
Symbol 328 MovieClip [Mage] Frame 45
attacking = false;
stop();
Symbol 328 MovieClip [Mage] Frame 46
shift_x = -2;
shift_y = -1;
Symbol 328 MovieClip [Mage] Frame 50
fxtype = "GroundBlast";
connected = true;
bump_x = (bump_y = 0);
shift_x = -14;
shift_y = -7;
Symbol 328 MovieClip [Mage] Frame 59
attacking = false;
stop();
Symbol 328 MovieClip [Mage] Frame 60
shift_x = 2;
shift_y = -1;
Symbol 328 MovieClip [Mage] Frame 64
fxtype = "GroundBlast";
connected = true;
bump_x = (bump_y = 0);
shift_x = 14;
shift_y = -7;
Symbol 328 MovieClip [Mage] Frame 73
attacking = false;
stop();
Symbol 369 MovieClip [Knight] Frame 18
shift_x = 8;
shift_y = 4;
Symbol 369 MovieClip [Knight] Frame 22
fxtype = "Slash";
connected = true;
bump_x = 10;
bump_y = 5;
shift_x = 18;
shift_y = 9;
Symbol 369 MovieClip [Knight] Frame 32
attacking = false;
stop();
Symbol 369 MovieClip [Knight] Frame 33
shift_x = -8;
shift_y = 4;
Symbol 369 MovieClip [Knight] Frame 37
fxtype = "Slash";
connected = true;
bump_x = -10;
bump_y = 5;
shift_x = -18;
shift_y = 9;
Symbol 369 MovieClip [Knight] Frame 47
attacking = false;
stop();
Symbol 369 MovieClip [Knight] Frame 48
shift_x = -8;
shift_y = -4;
Symbol 369 MovieClip [Knight] Frame 52
fxtype = "Slash";
connected = true;
bump_x = -10;
bump_y = -5;
shift_x = -18;
shift_y = -9;
Symbol 369 MovieClip [Knight] Frame 62
attacking = false;
stop();
Symbol 369 MovieClip [Knight] Frame 63
shift_x = 8;
shift_y = -4;
Symbol 369 MovieClip [Knight] Frame 67
fxtype = "Slash";
connected = true;
bump_x = 10;
bump_y = -5;
shift_x = 18;
shift_y = -9;
Symbol 369 MovieClip [Knight] Frame 77
attacking = false;
stop();
Symbol 410 MovieClip [Fighter] Frame 18
shift_x = -9;
shift_y = -4.5;
Symbol 410 MovieClip [Fighter] Frame 25
fxtype = "HeadImpact";
connected = true;
bump_x = 7;
bump_y = 3.5;
shift_x = 20;
shift_y = 10;
Symbol 410 MovieClip [Fighter] Frame 34
attacking = false;
stop();
Symbol 410 MovieClip [Fighter] Frame 35
shift_x = 9;
shift_y = -4.5;
Symbol 410 MovieClip [Fighter] Frame 42
fxtype = "HeadImpact";
connected = true;
bump_x = -7;
bump_y = 3.5;
shift_x = -20;
shift_y = 10;
Symbol 410 MovieClip [Fighter] Frame 51
attacking = false;
stop();
Symbol 410 MovieClip [Fighter] Frame 52
shift_x = 9;
shift_y = 4.5;
Symbol 410 MovieClip [Fighter] Frame 59
fxtype = "HeadImpact";
connected = true;
bump_x = -7;
bump_y = -3.5;
shift_x = -20;
shift_y = -10;
Symbol 410 MovieClip [Fighter] Frame 68
attacking = false;
stop();
Symbol 410 MovieClip [Fighter] Frame 69
shift_x = -9;
shift_y = 4.5;
Symbol 410 MovieClip [Fighter] Frame 76
fxtype = "HeadImpact";
connected = true;
bump_x = 7;
bump_y = -3.5;
shift_x = 20;
shift_y = -10;
Symbol 410 MovieClip [Fighter] Frame 85
attacking = false;
stop();
Symbol 459 MovieClip [Swordsman] Frame 18
shift_x = -4;
shift_y = -7;
Symbol 459 MovieClip [Swordsman] Frame 23
shift_x = 27;
shift_y = 11.5;
fxtype = "Stab";
connected = true;
bump_x = (bump_y = 0);
Symbol 459 MovieClip [Swordsman] Frame 28
shift_x = -5;
shift_y = -6.5;
Symbol 459 MovieClip [Swordsman] Frame 34
attacking = false;
stop();
Symbol 459 MovieClip [Swordsman] Frame 35
shift_x = 14;
shift_y = -2;
Symbol 459 MovieClip [Swordsman] Frame 40
shift_x = -23;
shift_y = 13.5;
fxtype = "Stab";
connected = true;
bump_x = (bump_y = 0);
Symbol 459 MovieClip [Swordsman] Frame 45
shift_x = 13;
shift_y = -2.5;
Symbol 459 MovieClip [Swordsman] Frame 51
attacking = false;
stop();
Symbol 459 MovieClip [Swordsman] Frame 52
shift_x = 4;
shift_y = 7;
Symbol 459 MovieClip [Swordsman] Frame 57
shift_x = -27;
shift_y = -11.5;
fxtype = "Stab";
connected = true;
bump_x = (bump_y = 0);
Symbol 459 MovieClip [Swordsman] Frame 62
shift_x = 5;
shift_y = 6.5;
Symbol 459 MovieClip [Swordsman] Frame 68
attacking = false;
stop();
Symbol 459 MovieClip [Swordsman] Frame 69
shift_x = -14;
shift_y = 2;
Symbol 459 MovieClip [Swordsman] Frame 74
shift_x = 23;
shift_y = -13.5;
fxtype = "Stab";
connected = true;
bump_x = (bump_y = 0);
Symbol 459 MovieClip [Swordsman] Frame 79
shift_x = -13;
shift_y = 2.5;
Symbol 459 MovieClip [Swordsman] Frame 85
attacking = false;
stop();
Symbol 519 MovieClip [Striker] Frame 18
shift_x = (shift_y = 0);
Symbol 519 MovieClip [Striker] Frame 25
shift_x = 10;
shift_y = 8;
fxtype = "Wind";
connected = true;
bump_x = (bump_y = 0);
Symbol 519 MovieClip [Striker] Frame 33
attacking = false;
stop();
Symbol 519 MovieClip [Striker] Frame 34
shift_x = (shift_y = 0);
Symbol 519 MovieClip [Striker] Frame 41
shift_x = -16;
shift_y = 5;
fxtype = "Wind";
connected = true;
bump_x = (bump_y = 0);
Symbol 519 MovieClip [Striker] Frame 49
attacking = false;
stop();
Symbol 519 MovieClip [Striker] Frame 50
shift_x = (shift_y = 0);
Symbol 519 MovieClip [Striker] Frame 57
shift_x = -10;
shift_y = -8;
fxtype = "Wind";
connected = true;
bump_x = (bump_y = 0);
Symbol 519 MovieClip [Striker] Frame 65
attacking = false;
stop();
Symbol 519 MovieClip [Striker] Frame 66
shift_x = (shift_y = 0);
Symbol 519 MovieClip [Striker] Frame 73
shift_x = 16;
shift_y = -5;
fxtype = "Wind";
connected = true;
bump_x = (bump_y = 0);
Symbol 519 MovieClip [Striker] Frame 81
attacking = false;
stop();
Symbol 566 MovieClip [DarkSoldier] Frame 18
shift_x = 6;
shift_y = 3;
Symbol 566 MovieClip [DarkSoldier] Frame 21
shift_x = 15;
shift_y = 6.5;
fxtype = "LowSlash";
connected = true;
bump_x = 9;
bump_y = 4.5;
Symbol 566 MovieClip [DarkSoldier] Frame 31
attacking = false;
stop();
Symbol 566 MovieClip [DarkSoldier] Frame 32
shift_x = -6;
shift_y = 3;
Symbol 566 MovieClip [DarkSoldier] Frame 35
shift_x = -13;
shift_y = 7.5;
fxtype = "LowSlash";
connected = true;
bump_x = -9;
bump_y = 4.5;
Symbol 566 MovieClip [DarkSoldier] Frame 45
attacking = false;
stop();
Symbol 566 MovieClip [DarkSoldier] Frame 46
shift_x = -6;
shift_y = -3;
Symbol 566 MovieClip [DarkSoldier] Frame 49
shift_x = -15;
shift_y = -6.5;
fxtype = "LowSlash";
connected = true;
bump_x = -9;
bump_y = -4.5;
Symbol 566 MovieClip [DarkSoldier] Frame 59
attacking = false;
stop();
Symbol 566 MovieClip [DarkSoldier] Frame 60
shift_x = 6;
shift_y = -3;
Symbol 566 MovieClip [DarkSoldier] Frame 63
shift_x = 13;
shift_y = -7.5;
fxtype = "LowSlash";
connected = true;
bump_x = 9;
bump_y = -4.5;
Symbol 566 MovieClip [DarkSoldier] Frame 73
attacking = false;
stop();
Symbol 609 MovieClip [GateKeeper] Frame 18
shift_x = 16;
shift_y = 6;
Symbol 609 MovieClip [GateKeeper] Frame 29
shift_x = 14;
shift_y = 6;
Symbol 609 MovieClip [GateKeeper] Frame 31
fxtype = "Blast";
connected = true;
bump_x = 6;
bump_y = 3;
Symbol 609 MovieClip [GateKeeper] Frame 36
attacking = false;
stop();
Symbol 609 MovieClip [GateKeeper] Frame 37
shift_x = -12;
shift_y = 8;
Symbol 609 MovieClip [GateKeeper] Frame 48
shift_x = -12;
shift_y = 7;
Symbol 609 MovieClip [GateKeeper] Frame 50
fxtype = "Blast";
connected = true;
bump_x = -6;
bump_y = 3;
Symbol 609 MovieClip [GateKeeper] Frame 55
attacking = false;
stop();
Symbol 609 MovieClip [GateKeeper] Frame 56
shift_x = -16;
shift_y = -6;
Symbol 609 MovieClip [GateKeeper] Frame 67
shift_x = -14;
shift_y = -6;
Symbol 609 MovieClip [GateKeeper] Frame 69
fxtype = "Blast";
connected = true;
bump_x = -6;
bump_y = -3;
Symbol 609 MovieClip [GateKeeper] Frame 74
attacking = false;
stop();
Symbol 609 MovieClip [GateKeeper] Frame 75
shift_x = 12;
shift_y = -8;
Symbol 609 MovieClip [GateKeeper] Frame 86
shift_x = 12;
shift_y = -7;
Symbol 609 MovieClip [GateKeeper] Frame 88
fxtype = "Blast";
connected = true;
bump_x = 6;
bump_y = -3;
Symbol 609 MovieClip [GateKeeper] Frame 93
attacking = false;
stop();
Symbol 648 MovieClip [Archer] Frame 18
shift_x = 0;
shift_y = -5.5;
Symbol 648 MovieClip [Archer] Frame 38
fxtype = "Slash";
connected = true;
bump_x = 4;
bump_y = 2;
Symbol 648 MovieClip [Archer] Frame 42
attacking = false;
stop();
Symbol 648 MovieClip [Archer] Frame 43
shift_x = 11;
shift_y = 0;
Symbol 648 MovieClip [Archer] Frame 63
fxtype = "Slash";
connected = true;
bump_x = -4;
bump_y = 2;
Symbol 648 MovieClip [Archer] Frame 67
attacking = false;
stop();
Symbol 648 MovieClip [Archer] Frame 68
shift_x = 0;
shift_y = 5.5;
Symbol 648 MovieClip [Archer] Frame 88
fxtype = "Slash";
connected = true;
bump_x = -4;
bump_y = -2;
Symbol 648 MovieClip [Archer] Frame 92
attacking = false;
stop();
Symbol 648 MovieClip [Archer] Frame 93
shift_x = -11;
shift_y = 0;
Symbol 648 MovieClip [Archer] Frame 113
fxtype = "Slash";
connected = true;
bump_x = 4;
bump_y = -2;
Symbol 648 MovieClip [Archer] Frame 117
attacking = false;
stop();
Symbol 649 MovieClip [UndoFadeIn] Frame 2
if (_parent._alpha >= 100) {
removeMovieClip(this);
} else {
_parent.shadow._alpha = (_parent._alpha = _parent._alpha + 25);
gotoAndPlay (1);
}
Symbol 651 MovieClip [HeadImpact] Frame 1
_x = 0;
_y = -44;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
Symbol 651 MovieClip [HeadImpact] Frame 2
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 651 MovieClip [HeadImpact] Frame 3
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 651 MovieClip [HeadImpact] Frame 4
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 651 MovieClip [HeadImpact] Frame 5
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 651 MovieClip [HeadImpact] Frame 6
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 652 MovieClip [Light] Frame 1
function doglow() {
x = x + y;
if (x > 100) {
y = y * -1;
x = x + y;
} else if (x < 0) {
x = 0;
}
glow.rb = (255 * x) / 100;
glow.gb = (230 * x) / 100;
glow.bb = (80 * x) / 100;
spritecolor.setTransform(glow);
}
_y = 0;
_x = 0;
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
x = 0;
y = 14.2857142857143;
Instance of Symbol 122 MovieClip [Blank] in Symbol 652 MovieClip [Light] Frame 1
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 652 MovieClip [Light] Frame 16
glow.rb = (glow.gb = (glow.bb = 0));
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 659 MovieClip [Transform] Frame 1
_x = 0;
_y = 22;
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 64;
glowg = 255;
glowb = 0;
Symbol 659 MovieClip [Transform] Frame 2
glow.rb = glowr / 4;
glow.gb = glowg / 4;
glow.bb = glowb / 4;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 3
glow.rb = glowr / 2;
glow.gb = glowg / 2;
glow.bb = glowb / 2;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 4
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
_x = (_x - DX);
_y = (_y - DY);
glow.rb = (glowr * 3) / 4;
glow.gb = (glowg * 3) / 4;
glow.bb = (glowb * 3) / 4;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 5
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + DX);
_y = (_y + DY);
_parent.attachMovie(_parent._parent._parent.unittype[10].unit, "sprite", 0);
_parent.sprite._x = 0;
_parent.sprite._y = 22;
_parent.stand();
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 6
glow.rb = (glowr * 3) / 4;
glow.gb = (glowg * 3) / 4;
glow.bb = (glowb * 3) / 4;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 7
glow.rb = glowr / 2;
glow.gb = glowg / 2;
glow.bb = glowb / 2;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 8
glow.rb = glowr / 4;
glow.gb = glowg / 4;
glow.bb = glowb / 4;
spritecolor.setTransform(glow);
Symbol 659 MovieClip [Transform] Frame 9
glow.rb = 0;
glow.gb = 0;
glow.bb = 0;
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
Symbol 659 MovieClip [Transform] Frame 10
var tempallystat = eval ("_parent._parent._parent.allystats." + _parent.name);
var tempcnt = _parent.cnt;
_parent._parent._parent.copyunit(0, 10);
_parent.cnt = tempcnt;
tempallystat.pic.gotoAndStop(_parent.unit);
_parent._parent._parent.calcqueue();
_parent._parent._parent.showqueue();
_parent._parent._parent.allystats._visible = (_parent._parent._parent.queue._visible = (_parent._parent._parent.activestats._visible = (_parent._parent._parent.targetstats._visible = true)));
_parent._parent._parent.endaction();
removeMovieClip(this);
Symbol 660 MovieClip [Glow] Frame 1
function doglow() {
x = x + y;
if (x > 100) {
y = y * -1;
x = x + y;
} else if (x < 0) {
x = 0;
}
glow.rb = (112 * x) / 100;
glow.gb = (255 * x) / 100;
glow.bb = (204 * x) / 100;
spritecolor.setTransform(glow);
}
_x = 0;
_y = -27.5;
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
x = 0;
y = 14.2857142857143;
Instance of Symbol 122 MovieClip [Blank] in Symbol 660 MovieClip [Glow] Frame 1
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 660 MovieClip [Glow] Frame 16
glow.rb = (glow.gb = (glow.bb = 0));
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 661 MovieClip [Starfall] Frame 1
_y = 0;
_x = 0;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 64;
glowg = 255;
glowb = 0;
Symbol 661 MovieClip [Starfall] Frame 2
glow.rb = glowr / 4;
glow.gb = glowg / 4;
glow.bb = glowb / 4;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 3
glow.rb = glowr / 2;
glow.gb = glowg / 2;
glow.bb = glowb / 2;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 4
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
_x = (_x - DX);
_y = (_y - DY);
glow.rb = (glowr * 3) / 4;
glow.gb = (glowg * 3) / 4;
glow.bb = (glowb * 3) / 4;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 5
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + DX);
_y = (_y + DY);
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 6
glow.rb = (glowr * 3) / 4;
glow.gb = (glowg * 3) / 4;
glow.bb = (glowb * 3) / 4;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 7
glow.rb = glowr / 2;
glow.gb = glowg / 2;
glow.bb = glowb / 2;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 8
glow.rb = glowr / 4;
glow.gb = glowg / 4;
glow.bb = glowb / 4;
spritecolor.setTransform(glow);
Symbol 661 MovieClip [Starfall] Frame 9
_parent._parent.stand();
glow.rb = 0;
glow.gb = 0;
glow.bb = 0;
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 663 MovieClip [Fire] Frame 1
_x = 0;
_y = -16;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 255;
glowg = 44;
glowb = 0;
Symbol 663 MovieClip [Fire] Frame 3
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
_x = (_x - DX);
_y = (_y - DY);
glow.rb = glowr / 4;
glow.gb = glowg / 4;
glow.bb = glowb / 4;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 4
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + DX);
_y = (_y + DY);
glow.rb = glowr / 2;
glow.gb = glowg / 2;
glow.bb = glowb / 2;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 5
glow.rb = (glowr * 3) / 4;
glow.gb = (glowg * 3) / 4;
glow.bb = (glowb * 3) / 4;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 6
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 11
glow.rb = (glowr * 3) / 4;
glow.gb = (glowg * 3) / 4;
glow.bb = (glowb * 3) / 4;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 12
glow.rb = glowr / 2;
glow.gb = glowg / 2;
glow.bb = glowb / 2;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 13
glow.rb = glowr / 4;
glow.gb = glowg / 4;
glow.bb = glowb / 4;
spritecolor.setTransform(glow);
Symbol 663 MovieClip [Fire] Frame 14
_parent._parent.stand();
glow.rb = 0;
glow.gb = 0;
glow.bb = 0;
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 669 MovieClip [Nuke] Frame 1
_y = 0;
_x = 0;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 255;
glowg = 0;
glowb = 0;
Instance of Symbol 122 MovieClip [Blank] in Symbol 669 MovieClip [Nuke] Frame 1
onClipEvent (enterFrame) {
_parent.doglow();
}
Symbol 669 MovieClip [Nuke] Frame 2
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
Symbol 669 MovieClip [Nuke] Frame 3
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
Symbol 669 MovieClip [Nuke] Frame 4
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
Symbol 669 MovieClip [Nuke] Frame 14
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
_x = (_x - DX);
_y = (_y - DY);
Symbol 669 MovieClip [Nuke] Frame 15
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + DX);
_y = (_y + DY);
Symbol 669 MovieClip [Nuke] Frame 16
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
Symbol 669 MovieClip [Nuke] Frame 17
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
Symbol 669 MovieClip [Nuke] Frame 18
glow.rb = 0;
glow.gb = 0;
glow.bb = 0;
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 674 MovieClip [Wind] Frame 1
_y = 0;
_x = 0;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 0;
glowg = 0;
glowb = 255;
_parent._x = _parent._x + (3 * DX);
_parent._y = _parent._y + (3 * DY);
_x = (_x - (3 * DX));
_y = (_y - (3 * DY));
Symbol 674 MovieClip [Wind] Frame 2
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + (2 * DX));
_y = (_y + (2 * DY));
Symbol 674 MovieClip [Wind] Frame 3
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 674 MovieClip [Wind] Frame 4
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
spritecolor.setTransform(glow);
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + (2 * DX));
_y = (_y + (2 * DY));
Symbol 674 MovieClip [Wind] Frame 5
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
_x = (_x + DX);
_y = (_y + DY);
Symbol 674 MovieClip [Wind] Frame 6
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
_x = (_x + DX);
_y = (_y + DY);
Symbol 674 MovieClip [Wind] Frame 7
_parent._x = _parent._x - (2 * DX);
_parent._y = _parent._y - (2 * DY);
_parent._parent.stand();
glow.rb = 0;
glow.gb = 0;
glow.bb = 0;
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 675 MovieClip [GroundBlast] Frame 1
_y = 0;
_x = 0;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 255;
glowg = 0;
glowb = 0;
Symbol 675 MovieClip [GroundBlast] Frame 2
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
Symbol 675 MovieClip [GroundBlast] Frame 3
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
_x = (_x - DX);
_y = (_y - DY);
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
Symbol 675 MovieClip [GroundBlast] Frame 4
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
_x = (_x + DX);
_y = (_y + DY);
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
spritecolor.setTransform(glow);
Symbol 675 MovieClip [GroundBlast] Frame 5
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
Symbol 675 MovieClip [GroundBlast] Frame 6
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
Symbol 675 MovieClip [GroundBlast] Frame 7
_parent._parent.stand();
glow.rb = 0;
glow.gb = 0;
glow.bb = 0;
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 676 MovieClip [Blast] Frame 1
_x = 0;
_y = -30;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
spritecolor = new Color(_parent);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glowr = 102;
glowg = 153;
glowb = 255;
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
Symbol 676 MovieClip [Blast] Frame 2
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
Symbol 676 MovieClip [Blast] Frame 3
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
glow.rb = glowr;
glow.gb = glowg;
glow.bb = glowb;
spritecolor.setTransform(glow);
Symbol 676 MovieClip [Blast] Frame 4
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
glow.rb = (glowr * 2) / 3;
glow.gb = (glowg * 2) / 3;
glow.bb = (glowb * 2) / 3;
spritecolor.setTransform(glow);
Symbol 676 MovieClip [Blast] Frame 5
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
glow.rb = glowr / 3;
glow.gb = glowg / 3;
glow.bb = glowb / 3;
spritecolor.setTransform(glow);
Symbol 676 MovieClip [Blast] Frame 6
glow.rb = (glow.gb = (glow.bb = 0));
spritecolor.setTransform(glow);
delete glow;
delete spritecolor;
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 677 MovieClip [Stab] Frame 1
_x = 0;
_y = -34;
switch (direction) {
case 1 :
_x = (_x - 5);
_y = (_y + 2.5);
DX = 4;
DY = 2;
break;
case 2 :
_x = (_x - 5);
_y = (_y - 2.5);
DX = -4;
DY = 2;
break;
case 3 :
_x = (_x + 5);
_y = (_y - 2.5);
DX = -4;
DY = -2;
break;
case 4 :
_x = (_x + 5);
_y = (_y + 2.5);
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
_parent._x = _parent._x + (3 * DX);
_parent._y = _parent._y + (3 * DY);
_parent._parent.shadow._x = _parent._parent.shadow._x + (3 * DX);
_parent._parent.shadow._y = _parent._parent.shadow._y + (3 * DY);
Symbol 677 MovieClip [Stab] Frame 2
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 677 MovieClip [Stab] Frame 3
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 677 MovieClip [Stab] Frame 6
_parent._x = _parent._x - (5.5 * DX);
_parent._y = _parent._y - (5.5 * DY);
_parent._parent.shadow._x = _parent._parent.shadow._x - (5.5 * DX);
_parent._parent.shadow._y = _parent._parent.shadow._y - (5.5 * DY);
Symbol 677 MovieClip [Stab] Frame 7
_parent._x = _parent._x + (3 * DX);
_parent._y = _parent._y + (3 * DY);
_parent._parent.shadow._x = _parent._parent.shadow._x + (2.5 * DX);
_parent._parent.shadow._y = _parent._parent.shadow._y + (2.5 * DY);
Symbol 677 MovieClip [Stab] Frame 8
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 677 MovieClip [Stab] Frame 9
_parent._x = _parent._x + (DX / 2);
_parent._y = _parent._y + (DY / 2);
_parent._parent.stand();
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 678 MovieClip [LowSlash] Frame 1
_x = 0;
_y = -24;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
Symbol 678 MovieClip [LowSlash] Frame 2
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 678 MovieClip [LowSlash] Frame 3
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 678 MovieClip [LowSlash] Frame 4
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 678 MovieClip [LowSlash] Frame 5
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 678 MovieClip [LowSlash] Frame 6
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 679 MovieClip [Slash] Frame 1
_x = 0;
_y = -30;
switch (direction) {
case 1 :
DX = 4;
DY = 2;
break;
case 2 :
DX = -4;
DY = 2;
break;
case 3 :
DX = -4;
DY = -2;
break;
case 4 :
DX = 4;
DY = -2;
break;
default :
DX = (DY = 0);
}
Symbol 679 MovieClip [Slash] Frame 2
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 679 MovieClip [Slash] Frame 3
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 679 MovieClip [Slash] Frame 4
_parent._x = _parent._x + DX;
_parent._y = _parent._y + DY;
Symbol 679 MovieClip [Slash] Frame 5
_parent._x = _parent._x - DX;
_parent._y = _parent._y - DY;
Symbol 679 MovieClip [Slash] Frame 6
if (_parent.istempfx) {
_parent.removeMovieClip();
} else {
removeMovieClip(this);
}
Symbol 691 Button
on (release) {
if (_parent._parent.moverangecells != null) {
_parent._parent.moverangecells.removeMovieClip();
}
}
Symbol 692 MovieClip [GridCell] Frame 1
btn.useHandCursor = (btn.tabEnabled = false);
_x = _parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent.cell_y(row, col);
Symbol 693 Button
on (rollOver) {
var s = new Sound(this);
s.attachSound("Beep1");
s.start();
btn.useHandCursor = (_parent._parent.movecells == null) && (_parent._parent.attackcells == null);
_parent._parent._parent.pointer._x = _x;
_parent._parent._parent.pointer._y = _y;
_parent._parent._parent.pointer.play();
_parent._parent._parent.pointer._visible = true;
_parent._parent._parent.targetstats.showstats(unit);
}
on (release) {
if ((_parent._parent.movecells == null) && (_parent._parent.attackcells == null)) {
var s = new Sound(this);
s.attachSound("Beep1");
s.start();
unit.showmoverange();
}
}
on (rollOut, releaseOutside) {
_parent._parent._parent.pointer._visible = false;
_parent._parent._parent.pointer.stop();
_parent._parent._parent.targetstats.showstats();
}
Symbol 694 MovieClip [UnitCell] Frame 1
btn.tabEnabled = false;
_x = _parent._parent._parent.cell_x(unit.row, unit.col);
_y = _parent._parent._parent.cell_y(unit.row, unit.col);
stop();
Symbol 695 Button
on (release) {
var s = new Sound(this);
s.attachSound("Beep1");
s.start();
_parent._parent._parent.cancelaction();
}
on (rollOver) {
var s = new Sound(this);
s.attachSound("Beep1");
s.start();
_parent._parent._parent.canceltext._x = _x;
_parent._parent._parent.canceltext._y = _y;
_parent._parent._parent.canceltext._visible = true;
}
on (rollOut, releaseOutside) {
_parent._parent._parent.canceltext._visible = false;
}
Symbol 696 MovieClip [CancelCell] Frame 1
btn.tabEnabled = false;
_x = _parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent.cell_y(row, col);
Symbol 699 MovieClip [AttackBound] Frame 1
_x = _parent._parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent._parent.cell_y(row, col);
var i = 1;
while (i <= 4) {
if (bounds.indexOf("" + i) < 0) {
eval ("b" + i)._visible = false;
}
i++;
}
Symbol 701 Button
on (release) {
var facedirection;
if (Math.abs(row - _parent.crow) < Math.abs(col - _parent.ccol)) {
if (col > _parent.ccol) {
facedirection = 1;
} else {
facedirection = 3;
}
} else if (row > _parent.crow) {
facedirection = 2;
} else {
facedirection = 4;
}
if (_parent.attacktype == "normal") {
if (_parent.spread <= 0) {
_parent._parent._parent.doattack(facedirection, row, col);
} else {
var area = new Array();
var coords = new Object();
coords.row = row;
coords.col = col;
area.push(coords);
var i = 1;
while (i <= _parent.spread) {
var temprow;
var tempcol;
(temprow = _parent.spread);
(tempcol = _parent.spread + i);
while (tempcol > _parent.spread) {
if (bbuffer[temprow][tempcol] != null) {
var coords = new Object();
coords.row = (temprow + row) - _parent.spread;
coords.col = (tempcol + col) - _parent.spread;
area.push(coords);
}
temprow++;
tempcol--;
}
(temprow = _parent.spread + i);
(tempcol = _parent.spread);
while (temprow > _parent.spread) {
if (bbuffer[temprow][tempcol] != null) {
var coords = new Object();
coords.row = (temprow + row) - _parent.spread;
coords.col = (tempcol + col) - _parent.spread;
area.push(coords);
}
temprow--;
tempcol--;
}
(temprow = _parent.spread);
(tempcol = _parent.spread - i);
while (tempcol < _parent.spread) {
if (bbuffer[temprow][tempcol] != null) {
var coords = new Object();
coords.row = (temprow + row) - _parent.spread;
coords.col = (tempcol + col) - _parent.spread;
area.push(coords);
}
temprow--;
tempcol++;
}
(temprow = _parent.spread - i);
(tempcol = _parent.spread);
while (temprow < _parent.spread) {
if (bbuffer[temprow][tempcol] != null) {
var coords = new Object();
coords.row = (temprow + row) - _parent.spread;
coords.col = (tempcol + col) - _parent.spread;
area.push(coords);
}
temprow++;
tempcol++;
}
i++;
}
_parent._parent._parent.doattack(facedirection, null, null, area);
}
} else if (_parent.attacktype == "line") {
var temprow = _parent.crow;
var tempcol = _parent.ccol;
var area = new Array();
var i = 0;
while (i < _parent.range) {
if (col > _parent.ccol) {
tempcol++;
} else if (row > _parent.crow) {
temprow++;
} else if (col < _parent.ccol) {
tempcol--;
} else if (row < _parent.crow) {
temprow--;
}
if (bbuffer[i] != null) {
var coords = new Object();
coords.row = temprow;
coords.col = tempcol;
area.push(coords);
}
i++;
}
_parent._parent._parent.doattack(facedirection, null, null, area);
} else if (_parent.attacktype == "projectile") {
var temprow = _parent.crow;
var tempcol = _parent.ccol;
if (col > _parent.ccol) {
tempcol = tempcol + _parent.range;
} else if (row > _parent.crow) {
temprow = temprow + _parent.range;
} else if (col < _parent.ccol) {
tempcol = tempcol - _parent.range;
} else if (row < _parent.crow) {
temprow = temprow - _parent.range;
}
var i = _parent.range;
while (bbuffer[--i] == null) {
if (col > _parent.ccol) {
tempcol--;
} else if (row > _parent.crow) {
temprow--;
} else if (col < _parent.ccol) {
tempcol++;
} else if (row < _parent.crow) {
temprow++;
}
}
_parent._parent._parent.doattack(facedirection, temprow, tempcol);
}
}
on (rollOver) {
var tunit = _parent._parent._parent.map[row][col];
if (tunit.unitcell != null) {
var s = new Sound(this);
s.attachSound("Beep1");
s.start();
_parent._parent._parent.pointer._x = _x;
_parent._parent._parent.pointer._y = _y;
_parent._parent._parent.pointer.play();
_parent._parent._parent.pointer._visible = true;
var aunit = _parent._parent._parent.currentunit;
var mindmg;
var maxdmg;
if (aunit.damage == "heal") {
mindmg = aunit.ap * 50;
maxdmg = mindmg + ((mindmg * aunit.ap) / 300);
} else {
var tdf;
if (aunit.damage == "magic") {
tdf = tunit.mdf;
} else {
tdf = tunit.df;
}
maxdmg = (mindmg = (aunit.ap - tdf) * 50);
if (aunit.damage == "magic") {
maxdmg = maxdmg + ((maxdmg * aunit.ap) / 300);
mindmg = mindmg - ((mindmg * tdf) / 200);
} else {
maxdmg = maxdmg + ((maxdmg * aunit.ag) / 100);
mindmg = mindmg - ((mindmg * tunit.ag) / 50);
}
}
if (mindmg < 0) {
mindmg = 0;
} else if (mindmg > 9999) {
mindmg = 9999;
}
if (maxdmg < 0) {
maxdmg = 0;
} else if (maxdmg > 9999) {
maxdmg = 9999;
}
var vary;
if (maxdmg != 0) {
vary = Math.round((100 * mindmg) / maxdmg);
} else {
vary = 0;
}
_parent._parent._parent.targetstats.showstats(tunit, Math.round(maxdmg), vary, aunit.damage == "heal");
}
_parent.attachMovie("Blank", "bounds", 10000);
_parent.bounds._x = (_parent.bounds._y = 0);
if (_parent.attacktype == "normal") {
var temprow = 0;
while (temprow < len) {
var tempcol = 0;
while (tempcol < len) {
if (bbuffer[temprow][tempcol]) {
var maprow = ((temprow + row) - _parent.spread);
var mapcol = ((tempcol + col) - _parent.spread);
if (bbuffer[temprow][tempcol] != null) {
var tempcell = ((("bound" + maprow) + "x") + mapcol);
_parent.bounds.attachMovie("AttackBound", tempcell, (100 * maprow) + mapcol);
eval ("_parent.bounds." + tempcell).row = maprow;
eval ("_parent.bounds." + tempcell).col = mapcol;
eval ("_parent.bounds." + tempcell).bounds = bbuffer[temprow][tempcol];
}
}
tempcol++;
}
temprow++;
}
} else if ((_parent.attacktype == "line") || (_parent.attacktype == "projectile")) {
temprow = _parent.crow;
tempcol = _parent.ccol;
var i = 0;
while (i < _parent.range) {
if (col > _parent.ccol) {
tempcol++;
} else if (row > _parent.crow) {
temprow++;
} else if (col < _parent.ccol) {
tempcol--;
} else if (row < _parent.crow) {
temprow--;
}
if (bbuffer[i] != null) {
var tempcell = ((("bound" + temprow) + "x") + tempcol);
_parent.bounds.attachMovie("AttackBound", tempcell, (100 * temprow) + tempcol);
eval ("_parent.bounds." + tempcell).row = temprow;
eval ("_parent.bounds." + tempcell).col = tempcol;
eval ("_parent.bounds." + tempcell).bounds = bbuffer[i];
}
i++;
}
}
}
on (rollOut, releaseOutside) {
if (_parent._parent._parent.map[row][col] != -1) {
_parent._parent._parent.pointer._visible = false;
_parent._parent._parent.pointer.stop();
_parent._parent._parent.targetstats.showstats();
}
_parent.bounds.removeMovieClip();
}
Symbol 702 MovieClip [AttackCell] Frame 1
btn.tabEnabled = false;
_x = _parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent.cell_y(row, col);
if (_parent.attacktype == "normal") {
len = (_parent.spread * 2) + 1;
bbuffer = new Array(len);
var i = 0;
while (i < len) {
bbuffer[i] = new Array(len);
i++;
}
var temprow = (row - _parent.spread);
while (temprow <= (row + _parent.spread)) {
var spread1 = (_parent.spread - Math.abs(row - temprow));
var tempcol = (col - spread1);
while (tempcol <= (col + spread1)) {
if ((_parent.crow != temprow) || (_parent.ccol != tempcol)) {
if ((_parent._parent._parent.map[temprow][tempcol] != null) && (_parent._parent._parent.map[temprow][tempcol] != -2)) {
bbuffer[(temprow - row) + _parent.spread][(tempcol - col) + _parent.spread] = true;
}
}
tempcol++;
}
temprow++;
}
var temprow = 0;
while (temprow < len) {
var tempcol = 0;
while (tempcol < len) {
if (bbuffer[temprow][tempcol]) {
bounds = "";
if (bbuffer[temprow][tempcol + 1] == null) {
bounds = bounds + "1";
}
if (bbuffer[temprow + 1][tempcol] == null) {
bounds = bounds + "2";
}
if (bbuffer[temprow][tempcol - 1] == null) {
bounds = bounds + "3";
}
if (bbuffer[temprow - 1][tempcol] == null) {
bounds = bounds + "4";
}
bbuffer[temprow][tempcol] = bounds;
}
tempcol++;
}
temprow++;
}
} else if ((_parent.attacktype == "line") || (_parent.attacktype == "projectile")) {
bbuffer = new Array(_parent.range);
temprow = _parent.crow;
tempcol = _parent.ccol;
var i = 0;
while (i < _parent.range) {
if (col > _parent.ccol) {
tempcol++;
} else if (row > _parent.crow) {
temprow++;
} else if (col < _parent.ccol) {
tempcol--;
} else if (row < _parent.crow) {
temprow--;
}
if (eval ((("_parent.cell" + temprow) + "x") + tempcol) != null) {
bbuffer[i] = true;
}
i++;
}
var i = 0;
while (i < _parent.range) {
if (bbuffer[i]) {
bounds = "";
if (col > _parent.ccol) {
if (bbuffer[i + 1] == null) {
bounds = bounds + "1";
}
bounds = bounds + "2";
if (bbuffer[i - 1] == null) {
bounds = bounds + "3";
}
bounds = bounds + "4";
} else if (row > _parent.crow) {
bounds = bounds + "1";
if (bbuffer[i + 1] == null) {
bounds = bounds + "2";
}
bounds = bounds + "3";
if (bbuffer[i - 1] == null) {
bounds = bounds + "4";
}
} else if (col < _parent.ccol) {
if (bbuffer[i - 1] == null) {
bounds = bounds + "1";
}
bounds = bounds + "2";
if (bbuffer[i + 1] == null) {
bounds = bounds + "3";
}
bounds = bounds + "4";
} else if (row < _parent.crow) {
bounds = bounds + "1";
if (bbuffer[i - 1] == null) {
bounds = bounds + "2";
}
bounds = bounds + "3";
if (bbuffer[i + 1] == null) {
bounds = bounds + "4";
}
}
bbuffer[i] = bounds;
}
i++;
}
}
Symbol 704 MovieClip [MoveRangeCell] Frame 1
_x = _parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent.cell_y(row, col);
Symbol 706 MovieClip [RangeCancelCell] Frame 1
_x = _parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent.cell_y(row, col);
Symbol 707 Button
on (release) {
_parent._parent._parent.domove(row, col);
}
Symbol 708 MovieClip [MoveCell] Frame 1
btn.tabEnabled = false;
_x = _parent._parent._parent.cell_x(row, col);
_y = _parent._parent._parent.cell_y(row, col);
Symbol 720 MovieClip Frame 20
stop();
Symbol 721 MovieClip [HPCounter] Frame 1
done = false;
_y = 0;
if (heal) {
green = new Object();
green = {ra:"20", rb:"0", ga:"100", gb:"0", ba:"40", bb:"0", aa:"100", ab:"0"};
new Color(this).setTransform(green);
}
thousands = Math.floor(counter / 1000);
counter = counter - (thousands * 1000);
hundreds = Math.floor(counter / 100);
counter = counter - (hundreds * 100);
tens = Math.floor(counter / 10);
ones = counter - (tens * 10);
if (thousands > 0) {
_x = 0;
d4.digit.digit = thousands;
} else {
thousands = "";
if (hundreds > 0) {
_x = -5.15;
} else {
hundreds = "";
if (tens > 0) {
_x = -10.3;
} else {
tens = "";
_x = -15.45;
}
}
}
Symbol 721 MovieClip [HPCounter] Frame 2
d3.digit.digit = hundreds;
Symbol 721 MovieClip [HPCounter] Frame 3
d2.digit.digit = tens;
Symbol 721 MovieClip [HPCounter] Frame 4
d1.digit.digit = ones;
Symbol 721 MovieClip [HPCounter] Frame 15
done = true;
Symbol 721 MovieClip [HPCounter] Frame 24
removeMovieClip(this);
Symbol 722 MovieClip [Death] Frame 1
_x = 0;
_y = 6;
spritecolor = new Color(_parent.sprite);
glow = new Object();
glow = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
glow.ra = 80;
glow.ga = 87;
glow.aa = 75;
spritecolor.setTransform(glow);
_parent.shadow._alpha = 75;
Symbol 722 MovieClip [Death] Frame 2
glow.ra = 60;
glow.ga = 73;
glow.aa = 50;
spritecolor.setTransform(glow);
_parent.shadow._alpha = 50;
Symbol 722 MovieClip [Death] Frame 3
glow.ra = 40;
glow.ga = 60;
glow.aa = 25;
spritecolor.setTransform(glow);
_parent.shadow._alpha = 25;
Symbol 722 MovieClip [Death] Frame 4
_parent.shadow._alpha = (_parent.sprite._alpha = 0);
Symbol 722 MovieClip [Death] Frame 13
delete glow;
delete spritecolor;
removeMovieClip(this);
Symbol 729 MovieClip [SmokeHole] Frame 1
if (started != true) {
started = true;
gotoAndPlay(Math.floor(Math.random() * 25) + 1);
}
Symbol 740 MovieClip [RedBlood] Frame 1
var temp = Math.floor(Math.random() * 5);
if (temp < 1) {
gotoAndPlay (21);
} else if (temp < 2) {
gotoAndPlay (41);
} else if (temp < 3) {
gotoAndPlay (61);
} else if (temp < 4) {
gotoAndPlay (81);
}
Symbol 740 MovieClip [RedBlood] Frame 20
stop();
Symbol 740 MovieClip [RedBlood] Frame 40
stop();
Symbol 740 MovieClip [RedBlood] Frame 60
stop();
Symbol 740 MovieClip [RedBlood] Frame 80
stop();
Symbol 740 MovieClip [RedBlood] Frame 100
stop();
Symbol 742 MovieClip Frame 1
stop();
Instance of Symbol 122 MovieClip [Blank] in Symbol 746 MovieClip [AllyStat] Frame 1
onClipEvent (enterFrame) {
if (_parent.unit.unitcell == null) {
newhp = 0;
} else {
newhp = _parent.unit.hp;
}
if (hp != newhp) {
count = count + 0.045;
hp = hp + Math.round((newhp - hp) * count);
if (hp > newhp) {
hp--;
} else if (hp < newhp) {
hp++;
}
if (hp <= 0) {
_parent.gotoAndPlay(150);
} else {
_parent.gotoAndStop(150 - Math.round((149 * hp) / _parent.unit.hpmax));
}
} else {
count = 0.2;
}
}
onClipEvent (load) {
count = 0.2;
hp = _parent.unit.hp;
_parent.gotoAndStop(150 - Math.round((149 * hp) / _parent.unit.hpmax));
}
Symbol 746 MovieClip [AllyStat] Frame 151
_alpha = 70;
Symbol 746 MovieClip [AllyStat] Frame 152
_alpha = 55;
Symbol 746 MovieClip [AllyStat] Frame 153
_alpha = 47.5;
stop();
Symbol 757 MovieClip [StatSheet] Frame 1
function showbar(bar, percentage) {
if (percentage < 0) {
percentage = 0;
} else if (percentage > 1) {
percentage = 1;
}
bar.gotoAndStop(1 + Math.round(199 * percentage));
}
var unit = _parent._parent.currentunit;
name = unit.name;
if (unit.attacktype == "projectile") {
ability = "Long range ";
} else if (unit.range > 1) {
if (unit.attacktype == "line") {
ability = "In line ";
} else if (unit.spread > 0) {
ability = "Area ";
} else {
ability = "Ranged ";
}
} else {
ability = "Close range ";
}
if (unit.damage == "heal") {
ability = ability + "heal";
} else if (unit.damage == "magic") {
ability = ability + "magic damage";
} else {
ability = ability + "physical damage";
}
showbar(power, unit.ap / 30);
showbar(vitality, Math.pow(unit.hpmax / 5000, 0.8));
showbar(agility, unit.ag / 20);
showbar(defense, unit.df / 20);
showbar(magicresist, unit.mdf / 20);
showbar(speed, Math.pow((unit.spd - 4) / 16, 1.2));
showbar(movement, Math.pow(unit.movedistance / 6, 1.2));
_x = -800;
_y = -600;
Symbol 759 MovieClip [FireHole] Frame 1
if (started != true) {
started = true;
gotoAndPlay(Math.floor(Math.random() * 13) + 1);
}
Symbol 781 MovieClip Frame 29
gotoAndPlay (1);
Symbol 807 Button
on (release) {
_parent.play();
}
Symbol 808 MovieClip Frame 503
PlayNowBtn.tabEnabled = false;
Symbol 809 Button
on (release) {
if (cells.moverangecells != null) {
cells.moverangecells.removeMovieClip();
} else if ((cells.movecells != null) || (cells.attackcells != null)) {
cancelaction();
} else if (activestats.statsheet != null) {
activestats.statsheet.removeMovieClip();
menu.gotoAndPlay("ShowMenu");
}
}
Symbol 819 MovieClip Frame 1
if (started != true) {
started = true;
gotoAndPlay(Math.floor(Math.random() * 12) + 1);
}
Symbol 823 MovieClip Frame 1
function showpic(unit) {
pic.gotoAndStop(1);
pic.gotoAndStop(unit);
}
Symbol 846 MovieClip Frame 1
function showstats(unit, damage, vary, heal) {
if (unit == null) {
name = "";
hp = (hpmax = "----");
negdmg = (posdmg = (negvary = (posvary = "")));
pic.gotoAndStop(1);
hpbar.gotoAndStop(1);
} else {
name = unit.name;
myhp = unit.hp;
myhpmax = unit.hpmax;
if (unit.hpsecret == true) {
hp = (hpmax = "????");
} else {
hp = myhp;
hpmax = myhpmax;
}
pic.gotoAndStop(unit.unit);
hpbar.gotoAndStop(1 + Math.round((199 * myhp) / myhpmax));
if (damage == null) {
negdmg = (posdmg = (negvary = (posvary = "")));
} else if (heal) {
negdmg = (negvary = "");
posdmg = "+" + damage;
posvary = ("(" + vary) + "%)";
} else {
posdmg = (posvary = "");
negdmg = "-" + damage;
negvary = ("(" + vary) + "%)";
}
}
}
hpbar.stop();
if (_name == "activestats") {
gotoAndStop (3);
} else {
stop();
}
Symbol 846 MovieClip Frame 2
changer.count = 0.2;
Instance of Symbol 122 MovieClip [Blank] "changer" in Symbol 846 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_parent.myhp != _parent.newhp) {
count = count + 0.045;
_parent.myhp = _parent.myhp + Math.round((_parent.newhp - _parent.myhp) * count);
if (_parent.myhp > _parent.newhp) {
_parent.myhp--;
} else if (_parent.myhp < _parent.newhp) {
_parent.myhp++;
}
if (_parent.hp != "????") {
_parent.hp = _parent.myhp;
_parent.hpmax = _parent.myhpmax;
}
_parent.hpbar.gotoAndStop(1 + Math.round((199 * _parent.myhp) / _parent.myhpmax));
} else {
_parent.gotoAndStop(1);
}
}
Symbol 850 Button
on (release) {
play();
_parent.muted = true;
_parent.BGM.gotoAndStop("Mute");
}
Symbol 851 Button
on (release) {
play();
_parent.muted = false;
_parent.BGM.gotoAndStop("On");
}
Symbol 852 MovieClip Frame 1
stop();
if (_parent.muted != true) {
Mute._alpha = 30;
}
Symbol 852 MovieClip Frame 2
MuteBtn.tabEnabled = false;
Symbol 852 MovieClip Frame 11
stop();
MuteBtn.tabEnabled = false;
Symbol 852 MovieClip Frame 20
gotoAndStop (2);
Symbol 853 Button
on (release) {
_parent.hidecells();
_parent.items.gotoAndStop("Disable");
if (_parent.cells.moverangecells != null) {
_parent.cells.moverangecells.removeMovieClip();
}
docommand = "Status";
gotoAndPlay(_currentframe + 2);
}
on (rollOver) {
command = "Status";
}
on (rollOut, releaseOutside) {
command = "";
}
Symbol 854 Button
on (release) {
_parent.hidecells();
_parent.items.gotoAndStop("Disable");
if (_parent.cells.moverangecells != null) {
_parent.cells.moverangecells.removeMovieClip();
}
if (halfcnt != null) {
_parent.currentunit.cnt = halfcnt;
}
docommand = "Wait";
gotoAndPlay(_currentframe + 2);
}
on (rollOver) {
command = "Wait";
if (halfcnt != null) {
_parent.showqueue(true);
}
}
on (rollOut, releaseOutside) {
command = "";
if (halfcnt != null) {
_parent.showqueue();
}
}
Symbol 855 Button
on (release) {
_parent.hidecells();
_parent.items.gotoAndStop("Disable");
if (_parent.cells.moverangecells != null) {
_parent.cells.moverangecells.removeMovieClip();
}
docommand = movestring;
if (docommand == "Undo") {
_parent.currentunit.undocommand();
}
gotoAndPlay(_currentframe + 2);
}
on (rollOver) {
command = movestring;
}
on (rollOut, releaseOutside) {
command = "";
}
Symbol 856 Button
on (release) {
_parent.hidecells();
_parent.items.gotoAndStop("Disable");
if (_parent.cells.moverangecells != null) {
_parent.cells.moverangecells.removeMovieClip();
}
docommand = "Attack";
gotoAndPlay(_currentframe + 2);
}
on (rollOver) {
command = actstring;
}
on (rollOut, releaseOutside) {
command = "";
}
Symbol 866 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 2
_x = _parent.currentunit._x;
_parent.indicator._x = _parent.currentunit._x;
_parent.indicator._y = _parent.currentunit._y + 22;
_y = (_parent.currentunit._y - 25);
_parent.indicator.play();
_parent.indicator._visible = true;
command = "";
if (_parent.currentunit.damage == "heal") {
actstring = "Heal";
} else {
actstring = "Attack";
}
if (_parent.currentunit.moved) {
movestring = "Undo";
} else {
movestring = "Move";
}
if (!_parent.currentunit.attacked) {
canundo = true;
}
if ((!_parent.currentunit.moved) && (!_parent.currentunit.attacked)) {
halfcnt = _parent.currentunit.cnt / 2;
} else {
halfcnt = null;
}
_parent.showcells();
_parent.items.gotoAndStop("Enable");
Symbol 866 MovieClip Frame 6
attackbtn.tabEnabled = (movebtn.tabEnabled = (waitbtn.tabEnabled = (statusbtn.tabEnabled = false)));
if (_parent.currentunit.attacked) {
attackbtn.enabled = false;
if (_parent.currentunit.moved) {
movebtn.enabled = canundo;
}
}
stop();
Instance of Symbol 122 MovieClip [Blank] in Symbol 866 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_parent._parent.currentunit.attacked && (_parent.attackbtn._alpha > 50)) {
_parent.attackbtn._alpha = _parent.attackbtn._alpha - 10;
}
}
Instance of Symbol 122 MovieClip [Blank] in Symbol 866 MovieClip Frame 6
onClipEvent (enterFrame) {
if (_parent._parent.currentunit.moved) {
if ((!_parent.canundo) && (_parent.movebtn._alpha > 50)) {
_parent.movebtn._alpha = _parent.movebtn._alpha - 10;
}
switch (_parent.movebtn._rotation) {
case 0 :
_parent.movebtn._rotation = -16.2;
break;
case -16.2 :
_parent.movebtn._rotation = -28.8;
break;
case -28.8 :
_parent.movebtn._rotation = -37.8;
break;
case -37.8 :
_parent.movebtn._rotation = -43.2;
break;
case -43.2 :
_parent.movebtn._rotation = -45;
}
}
}
Symbol 866 MovieClip Frame 12
stop();
if (docommand == "Attack") {
if (_parent.currentunit.moved) {
canundo = false;
}
_parent.currentunit.attackcommand();
} else if (docommand == "Move") {
_parent.currentunit.movecommand();
} else if (docommand == "Wait") {
_parent.endturn();
} else if (docommand == "Status") {
_parent.activestats.attachMovie("StatSheet", "statsheet", 10);
}
Symbol 895 MovieClip Frame 1
function calcattackpoints() {
var points = 0;
var row = _parent.currentunit.row;
var col = _parent.currentunit.col;
if (_parent.currentunit.attacktype == "normal") {
var temprow = (row - _parent.currentunit.range);
while (temprow <= (row + _parent.currentunit.range)) {
var tempcol = ((col - _parent.currentunit.range) + Math.abs(row - temprow));
while (tempcol <= ((col + _parent.currentunit.range) - Math.abs(row - temprow))) {
if ((((temprow != row) || (tempcol != col)) && (_parent.map[temprow][tempcol] != null)) && (_parent.map[temprow][tempcol] != -2)) {
var temppoints = 0;
var srow = (temprow - _parent.currentunit.spread);
while (srow <= (temprow + _parent.currentunit.spread)) {
var spread1 = (_parent.currentunit.spread - Math.abs(temprow - srow));
var scol = (tempcol - spread1);
while (scol <= (tempcol + spread1)) {
if ((row != srow) || (col != scol)) {
if (((_parent.map[srow][scol] != null) && (_parent.map[srow][scol] != -2)) && (_parent.map[srow][scol] != -1)) {
temppoints = temppoints + calcdamage(_parent.currentunit, _parent.map[srow][scol]);
}
}
scol++;
}
srow++;
}
if (temppoints > points) {
points = temppoints;
tempattackrow = temprow;
tempattackcol = tempcol;
}
}
tempcol++;
}
temprow++;
}
} else if (_parent.currentunit.attacktype == "line") {
var temppoints = 0;
var temprow = (row - _parent.currentunit.range);
while (temprow < row) {
if (((_parent.map[temprow][col] != null) && (_parent.map[temprow][col] != -2)) && (_parent.map[temprow][col] != -1)) {
temppoints = temppoints + calcdamage(_parent.currentunit, _parent.map[temprow][col]);
}
temprow++;
}
if (temppoints > points) {
points = temppoints;
tempattackrow = row - 1;
tempattackcol = col;
}
temppoints = 0;
var temprow = (row + _parent.currentunit.range);
while (temprow > row) {
if (((_parent.map[temprow][col] != null) && (_parent.map[temprow][col] != -2)) && (_parent.map[temprow][col] != -1)) {
temppoints = temppoints + calcdamage(_parent.currentunit, _parent.map[temprow][col]);
}
temprow--;
}
if (temppoints > points) {
points = temppoints;
tempattackrow = row + 1;
tempattackcol = col;
}
temppoints = 0;
var tempcol = (col - _parent.currentunit.range);
while (tempcol < col) {
if (((_parent.map[row][tempcol] != null) && (_parent.map[row][tempcol] != -2)) && (_parent.map[row][tempcol] != -1)) {
temppoints = temppoints + calcdamage(_parent.currentunit, _parent.map[row][tempcol]);
}
tempcol++;
}
if (temppoints > points) {
points = temppoints;
tempattackrow = row;
tempattackcol = col - 1;
}
temppoints = 0;
var tempcol = (col + _parent.currentunit.range);
while (tempcol > col) {
if (((_parent.map[row][tempcol] != null) && (_parent.map[row][tempcol] != -2)) && (_parent.map[row][tempcol] != -1)) {
temppoints = temppoints + calcdamage(_parent.currentunit, _parent.map[row][tempcol]);
}
tempcol--;
}
if (temppoints > points) {
points = temppoints;
tempattackrow = row;
tempattackcol = col + 1;
}
} else if (_parent.currentunit.attacktype == "projectile") {
var temprow = row;
var tempcol = col;
var currange = 0;
do {
if (_parent.map[temprow][++tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if ((currange > 1) && (_parent.map[temprow][tempcol] != null)) {
var temppoints = calcdamage(_parent.currentunit, _parent.map[temprow][tempcol]);
if (temppoints > points) {
points = temppoints;
tempattackrow = temprow;
tempattackcol = tempcol;
}
}
tempcol = col;
currange = 0;
do {
if (_parent.map[++temprow][tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if ((currange > 1) && (_parent.map[temprow][tempcol] != null)) {
var temppoints = calcdamage(_parent.currentunit, _parent.map[temprow][tempcol]);
if (temppoints > points) {
points = temppoints;
tempattackrow = temprow;
tempattackcol = tempcol;
}
}
temprow = row;
currange = 0;
do {
if (_parent.map[temprow][--tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if ((currange > 1) && (_parent.map[temprow][tempcol] != null)) {
var temppoints = calcdamage(_parent.currentunit, _parent.map[temprow][tempcol]);
if (temppoints > points) {
points = temppoints;
tempattackrow = temprow;
tempattackcol = tempcol;
}
}
tempcol = col;
currange = 0;
do {
if (_parent.map[--temprow][tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if ((currange > 1) && (_parent.map[temprow][tempcol] != null)) {
var temppoints = calcdamage(_parent.currentunit, _parent.map[temprow][tempcol]);
if (temppoints > points) {
points = temppoints;
tempattackrow = temprow;
tempattackcol = tempcol;
}
}
}
return(points);
}
function calctargettedpoints1(aunit) {
var row = aunit.row;
var col = aunit.col;
if (aunit.attacktype == "normal") {
var range1 = (aunit.range + aunit.spread);
var temprow = (row - range1);
while (temprow <= (row + range1)) {
var tempcol = ((col - range1) + Math.abs(row - temprow));
while (tempcol <= ((col + range1) - Math.abs(row - temprow))) {
if ((_parent.currentunit.row == temprow) && (_parent.currentunit.col == tempcol)) {
return(calcdamage(aunit, _parent.currentunit));
}
tempcol++;
}
temprow++;
}
} else if (aunit.attacktype == "line") {
var temprow = (row - aunit.range);
while (temprow <= (row + aunit.range)) {
if ((_parent.currentunit.row == temprow) && (_parent.currentunit.col == col)) {
return(calcdamage(aunit, _parent.currentunit));
}
temprow++;
}
var tempcol = (col - aunit.range);
while (tempcol <= (col + aunit.range)) {
if ((_parent.currentunit.row == row) && (_parent.currentunit.col == tempcol)) {
return(calcdamage(aunit, _parent.currentunit));
}
tempcol++;
}
} else if (aunit.attacktype == "projectile") {
var temprow = row;
var tempcol = col;
var currange = 0;
do {
if (_parent.map[temprow][++tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if (((currange > 1) && (_parent.currentunit.row == temprow)) && (_parent.currentunit.col == tempcol)) {
return(calcdamage(aunit, _parent.currentunit));
}
tempcol = col;
currange = 0;
do {
if (_parent.map[++temprow][tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if (((currange > 1) && (_parent.currentunit.row == temprow)) && (_parent.currentunit.col == tempcol)) {
return(calcdamage(aunit, _parent.currentunit));
}
temprow = row;
currange = 0;
do {
if (_parent.map[temprow][--tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if (((currange > 1) && (_parent.currentunit.row == temprow)) && (_parent.currentunit.col == tempcol)) {
return(calcdamage(aunit, _parent.currentunit));
}
tempcol = col;
currange = 0;
do {
if (_parent.map[--temprow][tempcol] == null) {
break;
}
currange++;
} while ((_parent.map[temprow][tempcol] == -1) || (_parent.map[temprow][tempcol] == -2));
if (((currange > 1) && (_parent.currentunit.row == temprow)) && (_parent.currentunit.col == tempcol)) {
return(calcdamage(aunit, _parent.currentunit));
}
}
return(0);
}
function calctargettedpoints(wait) {
var fullcnt;
var points = 0;
var allycount = 0;
var enemycount = 0;
var allyrows = 0;
var allycols = 0;
var enemyrows = 0;
var enemycols = 0;
var trow;
var tcol;
var tpoints = 0;
if (wait == true) {
fullcnt = _parent.currentunit.cnt;
_parent.currentunit.cnt = _parent.currentunit.cnt / 2;
}
var i = 0;
while (i < _parent.unit.length) {
if ((_parent.unit[i].unitcell != null) && (_parent.unit[i] != _parent.currentunit)) {
var rowpoints = Math.abs(_parent.unit[i].row - _parent.currentunit.row);
var colpoints = Math.abs(_parent.unit[i].col - _parent.currentunit.col);
if (_parent.unit[i].team == _parent.currentunit.team) {
allycount++;
allyrows = allyrows + rowpoints;
allycols = allycols + colpoints;
if (_parent.unit[i].damage == "heal") {
var temppoints = calctargettedpoints1(_parent.unit[i]);
if (_parent.currentunit.cnt < _parent.unit[i].cnt) {
temppoints = temppoints / 6;
}
points = points + temppoints;
}
if (_parent.currentunit.damage == "heal") {
var temppoints = (calcdamage(_parent.currentunit, _parent.unit[i]) * Math.pow(0.98, _parent.unit[i].row + _parent.unit[i].col));
if (temppoints > tpoints) {
tpoints = temppoints;
trow = _parent.unit[i].row;
tcol = _parent.unit[i].col;
}
}
} else {
enemycount++;
enemyrows = enemyrows + rowpoints;
enemycols = enemycols + colpoints;
if (_parent.unit[i].damage != "heal") {
var temppoints = calctargettedpoints1(_parent.unit[i]);
if (_parent.currentunit.cnt < _parent.unit[i].cnt) {
temppoints = temppoints / 10;
}
points = points - temppoints;
}
if (_parent.currentunit.damage != "heal") {
var temppoints = (calcdamage(_parent.currentunit, _parent.unit[i]) * Math.pow(0.98, _parent.unit[i].row + _parent.unit[i].col));
if (temppoints > tpoints) {
tpoints = temppoints;
trow = _parent.unit[i].row;
tcol = _parent.unit[i].col;
}
}
}
}
i++;
}
var pospoints = 0;
var negpoints = 0;
var hpfactor = (_parent.currentunit.hp / _parent.currentunit.hpmax);
var allypoints = (allyrows + allycols);
var enemypoints = (enemyrows + enemycols);
if ((allypoints * allycount) > 0) {
allypoints = 1 / Math.pow(allypoints / allycount, 1 / allycount);
} else {
allypoints = 0;
}
if ((enemypoints * enemycount) > 0) {
enemypoints = 1 / Math.pow(enemypoints / enemycount, 1 / enemycount);
} else {
enemypoints = 0;
}
if (tpoints > 0) {
trow = Math.abs(trow - _parent.currentunit.row);
tcol = Math.abs(tcol - _parent.currentunit.col);
tpoints = 1 / (trow + tcol);
}
if (_parent.currentunit.damage == "heal") {
pospoints = pospoints + ((allypoints / 100) + tpoints);
negpoints = negpoints + (enemypoints / 100);
} else if (_parent.currentunit.attacktype == "projectile") {
if (enemypoints > 0) {
pospoints = pospoints + (0.01 / Math.pow((Math.min(enemyrows, enemycols) + 1) / enemycount, 1 / enemycount));
negpoints = negpoints + (0.01 / Math.pow((Math.max(enemyrows, enemycols) + 1) / enemycount, 1 / enemycount));
}
if (tpoints > 0) {
pospoints = pospoints + (1 / (Math.min(trow, tcol) + 1));
negpoints = negpoints + (1 / (Math.max(trow, tcol) + 1));
}
pospoints = pospoints + (allypoints / 10000);
} else {
pospoints = pospoints + (tpoints + (allypoints / 100));
}
if (_parent.currentunit.hp < Math.pow(_parent.currentunit.hpmax, 0.8)) {
pospoints = (pospoints / 100) + (allypoints / 100);
negpoints = (negpoints / 100) + enemypoints;
}
if (wait == true) {
_parent.currentunit.cnt = fullcnt;
if (points > 0) {
points = points * (2 - hpfactor);
}
}
return((points + pospoints) - negpoints);
}
function calcdamage(aunit, tunit) {
var mindmg;
var maxdmg;
if (aunit.damage == "heal") {
mindmg = aunit.ap * 50;
maxdmg = mindmg + ((mindmg * aunit.ap) / 300);
} else {
var tdf;
if (aunit.damage == "magic") {
tdf = tunit.mdf;
} else {
tdf = tunit.df;
}
maxdmg = (mindmg = (aunit.ap - tdf) * 50);
if (aunit.damage == "magic") {
maxdmg = maxdmg + ((maxdmg * aunit.ap) / 300);
mindmg = mindmg - ((mindmg * tdf) / 200);
} else {
maxdmg = maxdmg + ((maxdmg * aunit.ag) / 100);
mindmg = mindmg - ((mindmg * tunit.ag) / 50);
}
}
if (mindmg < 0) {
mindmg = 0;
} else if (mindmg > 9999) {
mindmg = 9999;
}
if (maxdmg < 0) {
maxdmg = 0;
} else if (maxdmg > 9999) {
maxdmg = 9999;
}
if (((tunit.team == _parent.currentunit.team) && (aunit.damage != "heal")) || ((tunit.team != _parent.currentunit.team) && (aunit.damage == "heal"))) {
mindmg = (mindmg + (4 * maxdmg)) / 5;
} else {
mindmg = ((4 * mindmg) + maxdmg) / 5;
}
if (aunit.damage == "heal") {
if ((tunit.hpmax - tunit.hp) <= mindmg) {
mindmg = tunit.hpmax - tunit.hp;
} else {
mindmg = mindmg / (0.3 + ((0.7 * tunit.hp) / tunit.hpmax));
}
mindmg = (-mindmg) / 2;
} else if (tunit.hp <= mindmg) {
mindmg = ((((tunit.hp + tunit.hpmax) / 2) + (tunit.ap * 50)) + ((tunit.df + tunit.mdf) * 25)) + ((tunit.ag + tunit.spd) * 5);
if (((aunit == _parent.currentunit) && (aunit.team != tunit.team)) && (tunit.damage != "heal")) {
mindmg = mindmg + ((calcdamage(tunit, aunit) / (0.1 + (aunit.hp / aunit.hpmax))) / 10);
}
} else {
mindmg = mindmg / (0.4 + ((0.6 * (tunit.hp - mindmg)) / tunit.hpmax));
}
if (aunit.team == tunit.team) {
mindmg = -mindmg;
}
if (mindmg < 0) {
mindmg = mindmg * 2.5;
}
return(mindmg);
}
function attack() {
attacked = true;
if ((attackrow == null) || (attackcol == null)) {
endact();
} else {
if (_parent.map[attackrow][attackcol].unitcell != null) {
_parent.targetstats.showstats(_parent.map[attackrow][attackcol]);
}
var facedirection;
if (Math.abs(attackrow - _parent.currentunit.row) < Math.abs(attackcol - _parent.currentunit.col)) {
if (attackcol > _parent.currentunit.col) {
facedirection = 1;
} else {
facedirection = 3;
}
} else if (attackrow > _parent.currentunit.row) {
facedirection = 2;
} else {
facedirection = 4;
}
if (_parent.currentunit.attacktype == "normal") {
if (_parent.currentunit.spread <= 0) {
_parent.doattack(facedirection, attackrow, attackcol);
} else {
var area = new Array();
var coords = new Object();
coords.row = attackrow;
coords.col = attackcol;
area.push(coords);
var i = 1;
while (i <= _parent.currentunit.spread) {
var temprow;
var tempcol;
(temprow = attackrow);
(tempcol = attackcol + i);
while (tempcol > attackcol) {
if ((temprow != _parent.currentunit.row) || (tempcol != _parent.currentunit.col)) {
if ((_parent.map[temprow][tempcol] != null) && (_parent.map[temprow][tempcol] != -2)) {
var coords = new Object();
coords.row = temprow;
coords.col = tempcol;
area.push(coords);
}
}
temprow++;
tempcol--;
}
(temprow = attackrow + i);
(tempcol = attackcol);
while (temprow > attackrow) {
if ((temprow != _parent.currentunit.row) || (tempcol != _parent.currentunit.col)) {
if ((_parent.map[temprow][tempcol] != null) && (_parent.map[temprow][tempcol] != -2)) {
var coords = new Object();
coords.row = temprow;
coords.col = tempcol;
area.push(coords);
}
}
temprow--;
tempcol--;
}
(temprow = attackrow);
(tempcol = attackcol - i);
while (tempcol < attackcol) {
if ((temprow != _parent.currentunit.row) || (tempcol != _parent.currentunit.col)) {
if ((_parent.map[temprow][tempcol] != null) && (_parent.map[temprow][tempcol] != -2)) {
var coords = new Object();
coords.row = temprow;
coords.col = tempcol;
area.push(coords);
}
}
temprow--;
tempcol++;
}
(temprow = attackrow - i);
(tempcol = attackcol);
while (temprow < attackrow) {
if ((temprow != _parent.currentunit.row) || (tempcol != _parent.currentunit.col)) {
if ((_parent.map[temprow][tempcol] != null) && (_parent.map[temprow][tempcol] != -2)) {
var coords = new Object();
coords.row = temprow;
coords.col = tempcol;
area.push(coords);
}
}
temprow++;
tempcol++;
}
i++;
}
_parent.doattack(facedirection, null, null, area);
}
} else if (_parent.currentunit.attacktype == "line") {
var temprow = _parent.currentunit.row;
var tempcol = _parent.currentunit.col;
var area = new Array();
var i = 0;
while (i < _parent.currentunit.range) {
if (attackcol > _parent.currentunit.col) {
tempcol++;
} else if (attackrow > _parent.currentunit.row) {
temprow++;
} else if (attackcol < _parent.currentunit.col) {
tempcol--;
} else if (attackrow < _parent.currentunit.row) {
temprow--;
}
if ((_parent.map[temprow][tempcol] != null) && (_parent.map[temprow][tempcol] != -2)) {
var coords = new Object();
coords.row = temprow;
coords.col = tempcol;
area.push(coords);
}
i++;
}
_parent.doattack(facedirection, null, null, area);
} else if (_parent.currentunit.attacktype == "projectile") {
_parent.doattack(facedirection, attackrow, attackcol);
}
}
}
function calcmovepoints(cellrow, cellcol, distance) {
if (distance <= 0) {
return(undefined);
}
if ((dbuffer[cellrow][cellcol] != undefined) && (dbuffer[cellrow][cellcol] >= distance)) {
return(undefined);
}
if ((_parent.map[cellrow][cellcol] != -1) && (_parent.map[cellrow][cellcol].team != _parent.currentunit.team)) {
return(undefined);
}
dbuffer[cellrow][cellcol] = distance;
var temprow = new Array(cellrow, cellrow + 1, cellrow, cellrow - 1);
var tempcol = new Array(cellcol + 1, cellcol, cellcol - 1, cellcol);
var oldrow = _parent.currentunit.row;
var oldcol = _parent.currentunit.col;
_parent.map[oldrow][oldcol] = -1;
var i = 0;
while (i < 4) {
if ((_parent.map[temprow[i]][tempcol[i]] == -1) && (tbuffer[temprow[i]][tempcol[i]] == undefined)) {
_parent.currentunit.row = temprow[i];
_parent.currentunit.col = tempcol[i];
_parent.map[temprow[i]][tempcol[i]] = _parent.currentunit;
var attackpoints;
if (attacked) {
attackpoints = 0;
} else {
attackpoints = calcattackpoints();
}
tbuffer[temprow[i]][tempcol[i]] = (attackpoints * (0.1 + (_parent.currentunit.hp / _parent.currentunit.hpmax))) + (calctargettedpoints() / 10);
if (tbuffer[temprow[i]][tempcol[i]] > tbuffer[moverow][movecol]) {
if (attackpoints > 0) {
if ((((attackrow == tempattackrow) && (attackcol == tempattackcol)) && (moverow == oldrow)) && (movecol == oldcol)) {
tbuffer[moverow][movecol] = tbuffer[temprow[i]][tempcol[i]];
} else {
attackrow = tempattackrow;
attackcol = tempattackcol;
moverow = temprow[i];
movecol = tempcol[i];
}
} else if ((attacked || (attackrow == null)) || (attackcol == null)) {
attackrow = (attackcol = null);
moverow = temprow[i];
movecol = tempcol[i];
} else {
tbuffer[moverow][movecol] = tbuffer[temprow[i]][tempcol[i]];
}
}
_parent.map[temprow[i]][tempcol[i]] = -1;
}
i++;
}
_parent.map[oldrow][oldcol] = _parent.currentunit;
_parent.currentunit.row = oldrow;
_parent.currentunit.col = oldcol;
distance--;
var i = 0;
while (i < 4) {
calcmovepoints(temprow[i], tempcol[i], distance);
i++;
}
}
function move() {
dbuffer = new Array(_parent.ROWS);
tbuffer = new Array(_parent.ROWS);
var i = 0;
while (i < _parent.ROWS) {
dbuffer[i] = new Array(_parent.COLS);
tbuffer[i] = new Array(_parent.COLS);
i++;
}
moverow = _parent.currentunit.row;
movecol = _parent.currentunit.col;
if (!attacked) {
tbuffer[_parent.currentunit.row][_parent.currentunit.col] = calcattackpoints() * (0.1 + (_parent.currentunit.hp / _parent.currentunit.hpmax));
if (tbuffer[_parent.currentunit.row][_parent.currentunit.col] > 0) {
tbuffer[_parent.currentunit.row][_parent.currentunit.col] = tbuffer[_parent.currentunit.row][_parent.currentunit.col] + 0.2;
attackrow = tempattackrow;
attackcol = tempattackcol;
} else {
attackrow = (attackcol = null);
tbuffer[_parent.currentunit.row][_parent.currentunit.col] = calctargettedpoints(true) / 10;
}
} else {
tbuffer[_parent.currentunit.row][_parent.currentunit.col] = calctargettedpoints(!_parent.currentunit.attacked) / 10;
}
calcmovepoints(_parent.currentunit.row, _parent.currentunit.col, _parent.currentunit.movedistance);
delete dbuffer;
delete tbuffer;
if ((moverow != _parent.currentunit.row) || (movecol != _parent.currentunit.col)) {
moved = true;
_parent.domove(moverow, movecol);
} else if (attacked) {
moved = true;
endact();
} else {
attack();
}
}
function act() {
moved = (attacked = false);
gotoAndPlay (2);
}
function endact() {
gotoAndPlay (2);
}
stop();
Symbol 895 MovieClip Frame 2
_parent.indicator._x = _parent.currentunit._x;
_parent.indicator._y = _parent.currentunit._y + 22;
_parent.indicator.play();
_parent.indicator._visible = true;
Symbol 895 MovieClip Frame 3
stop();
if (!moved) {
move();
} else if (!attacked) {
attack();
} else {
if ((!_parent.currentunit.moved) && (!_parent.currentunit.attacked)) {
_parent.currentunit.cnt = _parent.currentunit.cnt / 2;
}
_parent.endturn();
}
Symbol 898 MovieClip Frame 1
stop();
bgm = new Sound(this);
Symbol 898 MovieClip Frame 2
bgm.setVolume(100);
Symbol 898 MovieClip Frame 3
var vol = bgm.getVolume();
if (vol <= 5) {
bgm.stop();
stop();
} else {
bgm.setVolume(vol - 5);
}
Symbol 898 MovieClip Frame 4
gotoAndPlay (3);
Symbol 902 Button
on (release) {
play();
}
Symbol 905 Button
on (release) {
gotoAndPlay (195);
}
Symbol 909 Button
on (release) {
play();
}