[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 1 (262 B)
Stage.showMenu = false;
stop();
end = _root.getBytesTotal();
onEnterFrame = function () {
loads = _root.getBytesLoaded();
percent = Math.ceil((loads / end) * 100);
t = percent + "%";
if (loads == end) {
nextFrame();
delete onEnterFrame;
}
};
Frame 2 (524 B)
var mains = new Sound();
mains.stop();
mains.attachSound("chase");
mains.start(0, 500);
var user = SharedObject.getLocal("knight_tactics");
if (user.data.maps == undefined) {
user.data.maps = [];
user.data.submit = 32;
}
if (user.data.game == undefined) {
user.data.game = [];
}
var a = ["squire", "squire", "squire", "squire", "squire"];
var jobs = {squire:["Throw Stone", "", "", "", ""]};
var game = {tile:42, size:14.5, currentMap:25, speed:8, sp:3, height:19, points:200, count:0, story:0, saveMap:0};
Frame 3 (806 B)
i = 0;
while (i < 3) {
j = user.data.game[i];
if (j.story == undefined) {
_root["t" + i].text = "No Data";
} else {
_root["t" + i].text = (("Level:" + j.story) + ", Points:") + j.points;
_root["b" + i].onRelease = function () {
game.story = user.data.game[this._name.charAt(1)].story;
game.points = user.data.game[this._name.charAt(1)].points;
a = user.data.game[this._name.charAt(1)].a;
jobs = user.data.game[this._name.charAt(1)].jobs;
currentGame = Number(this._name.charAt(1));
gotoAndStop ("title");
};
_root["bb" + i].onRelease = function () {
user.data.game.splice(Number(this._name.charAt(2)), 1);
_root["t" + this._name.charAt(2)].text = "No Data";
_root["b" + this._name.charAt(2)].onRelease = function () {
};
};
}
i++;
}
Frame 5 (126 B)
e0.gotoAndStop("poison");
e1.gotoAndStop("slow");
e2.gotoAndStop("regen");
e3.gotoAndStop("act");
e4.gotoAndStop("move");
Frame 7 (4.98 KiB) ●
function showList() {
i = page;
while (i < (page + 10)) {
_root["a" + (i - page)].text = nodes[i].attributes.title;
_root["z" + (i - page)].text = nodes[i].attributes.by;
w = nodes[i].attributes.enemies.indexOf(",");
v = 0;
while (nodes[i].attributes.enemies.lastIndexOf(",") > (1 + (w * v))) {
v = v + 1;
}
we = nodes[i].attributes.allies.indexOf(",");
ve = 0;
while (nodes[i].attributes.allies.lastIndexOf(",") > (1 + (we * ve))) {
ve = ve + 1;
}
_root["v" + (i - page)].text = (ve + " Vs ") + v;
wee = nodes[i].attributes.map.indexOf(",");
vee = 0;
while (nodes[i].attributes.map.lastIndexOf(",") > (wee * vee)) {
vee = vee + 1;
}
_root["s" + (i - page)].text = (wee + " X ") + vee;
_root["d" + (i - page)].text = nodes[i].attributes.time;
_root["g" + (i - page)].onRelease = function () {
downloadMap(nodes[Number(this._name.charAt(1)) + page]);
};
i++;
}
i = 0;
while (i < 10) {
if (_root["a" + i].text == "undefined") {
_root["a" + i].text = "";
_root["z" + i].text = "";
_root["v" + i].text = "";
_root["s" + i].text = "";
_root["d" + i].text = "";
_root["g" + i].onRelease = function () {
};
}
i++;
}
pp.text = pag;
}
function downloadMap(n) {
loading._visible = true;
var _local4 = n.attributes.map;
game.currentMap = 99;
w = _local4.indexOf(",");
h = 0;
while (_local4.lastIndexOf(",") > (w * h)) {
h = h + 1;
}
map99 = new Array();
p = 0;
while (p < h) {
map99[p] = new Array();
i = 0;
while (i < w) {
var _local2 = _local4.charAt(i + (p * (w + 1)));
if (Number(_local2) < 10) {
map99[p][i] = Number(_local2);
} else {
var _local1 = 0;
switch (_local2) {
case "a" :
_local1 = 10;
break;
case "b" :
_local1 = 11;
break;
case "c" :
_local1 = 12;
break;
case "d" :
_local1 = 13;
break;
case "e" :
_local1 = 14;
break;
case "f" :
_local1 = 15;
break;
case "g" :
_local1 = 16;
break;
case "h" :
_local1 = 17;
break;
case "i" :
_local1 = 18;
break;
case "j" :
_local1 = 19;
}
map99[p][i] = _local1;
}
i++;
}
p++;
}
var _local5 = n.attributes.allies;
w = _local5.indexOf(",");
h = 0;
while (_local5.lastIndexOf(",") > (w * h)) {
h = h + 1;
}
a99 = new Array();
p = 0;
while (p < h) {
a99[p] = new Array();
i = 0;
while (i < w) {
var _local2 = _local5.charAt(i + (p * (w + 1)));
if (Number(_local2) < 10) {
a99[p][i] = Number(_local2);
} else {
var _local1 = 0;
switch (_local2) {
case "a" :
_local1 = 10;
break;
case "b" :
_local1 = 11;
break;
case "c" :
_local1 = 12;
break;
case "d" :
_local1 = 13;
}
a99[p][i] = _local1;
}
i++;
}
p++;
}
i = 0;
while (i < a99.length) {
temp = a99[i][0];
a99[i][0] = a99[i][1];
a99[i][1] = temp;
i++;
}
var _local3 = n.attributes.enemies;
w = _local3.indexOf(",");
h = 0;
while (_local3.lastIndexOf(",") > (w * h)) {
h = h + 1;
}
e99 = new Array();
p = 0;
while (p < h) {
e99[p] = new Array();
i = 0;
while (i < w) {
var _local2 = _local3.charAt(i + (p * (w + 1)));
if (Number(_local2) < 10) {
e99[p][i] = Number(_local2);
} else {
var _local1 = 0;
switch (_local2) {
case "a" :
_local1 = 10;
break;
case "b" :
_local1 = 11;
break;
case "c" :
_local1 = 12;
break;
case "d" :
_local1 = 13;
break;
case "l" :
_local1 = "knight";
break;
case "n" :
_local1 = "squire";
break;
case "m" :
_local1 = "archer";
break;
case "o" :
_local1 = "alchemist";
break;
case "q" :
_local1 = "robber";
break;
case "r" :
_local1 = "spearman";
break;
case "s" :
_local1 = "healer";
break;
case "t" :
_local1 = "sorcerer";
break;
case "v" :
_local1 = "drummer";
break;
case "w" :
_local1 = "king";
break;
case "y" :
_local1 = "noble";
}
e99[p][i] = _local1;
}
i++;
}
p++;
}
i = 0;
while (i < e99.length) {
temp = e99[i][1];
e99[i][1] = e99[i][2];
e99[i][2] = temp;
i++;
}
gotoAndStop ("play_game");
}
page = 0;
pag = 0;
loading._x = 0;
loading._y = 0;
var kt_xml = new XML();
kt_xml.ignoreWhite = true;
kt_xml.onLoad = function (success) {
if (success) {
nodes = kt_xml.firstChild.childNodes;
showList();
total.text = nodes.length;
loading._visible = false;
} else {
loading._visible = false;
total.text = "Error";
}
};
kt_xml.load("http://www.throwtheproject.com/data_kt.php?action=read");
Frame 8 (1.55 KiB) ●
function learnAbi(abi, cost, pos) {
if (((game.points - cost) > -1) && (jobs[page][pos] != abi)) {
game.points = game.points - cost;
user.data.game[currentGame].points = game.points;
jobs[page][pos] = abi;
pointstext.text = game.points;
learn["c" + pos].text = "Learned";
}
}
function ref() {
message.text = "";
pointstext.text = game.points;
i = 0;
while (i < 5) {
_root["aa" + i].gotoAndStop(a[i]);
_root["aa" + i].char.gotoAndStop(4);
_root["aa" + i].char.char.gotoAndStop(1);
i++;
}
}
function showAb() {
i = 0;
while (i < 5) {
learn["b" + i].onRelease = function () {
};
i++;
}
if (typeof(jobs[page]) == "object") {
i = 0;
while (i < 5) {
if (learn["a" + i] == jobs[page][i]) {
learn["c" + i].text = "Learned";
} else {
learn["b" + i].onRelease = function () {
learnAbi(learn["a" + this._name.charAt(1)], learn["c" + this._name.charAt(1)].text, this._name.charAt(1));
};
}
i++;
}
} else {
i = 1;
while (i < 5) {
learn["t" + i].text = "";
learn["c" + i].text = "";
i++;
}
learn.a0 = page;
learn.t0.text = learn.a0 + " - Unlock this job";
learn.c0.text = jobCost;
learn.b0.onRelease = function () {
if ((game.points - jobCost) > -1) {
game.points = game.points - jobCost;
pointstext.text = game.points;
user.data.game[currentGame].points = game.points;
jobs[page] = ["", "", "", "", ""];
learn.gotoAndStop(10);
}
};
}
}
var page = "squire";
change_jobs._visible = false;
ref();
Frame 9 (3.16 KiB) ●
function decoder(k) {
var _local3 = "";
var _local1 = "z";
p = 0;
while (p < k.length) {
i = 0;
while (i < k[0].length) {
if ((p > 0) && (i == 0)) {
_local3 = _local3 + ",";
}
var _local2 = k[p][i];
if (_local2 < 10) {
_local3 = _local3 + String(_local2);
} else {
switch (_local2) {
case 10 :
_local1 = "a";
break;
case 11 :
_local1 = "b";
break;
case 12 :
_local1 = "c";
break;
case 13 :
_local1 = "d";
break;
case 14 :
_local1 = "e";
break;
case 15 :
_local1 = "f";
break;
case 16 :
_local1 = "g";
break;
case 17 :
_local1 = "h";
break;
case 18 :
_local1 = "i";
break;
case 19 :
_local1 = "j";
break;
case "squire" :
_local1 = "n";
break;
case "alchemist" :
_local1 = "o";
break;
case "spearman" :
_local1 = "r";
break;
case "knight" :
_local1 = "l";
break;
case "king" :
_local1 = "w";
break;
case "noble" :
_local1 = "y";
break;
case "archer" :
_local1 = "m";
break;
case "drummer" :
_local1 = "v";
break;
case "robber" :
_local1 = "q";
break;
case "healer" :
_local1 = "s";
break;
case "sorcerer" :
_local1 = "t";
}
_local3 = _local3 + _local1;
}
i++;
}
p++;
}
return(_local3);
}
upload = false;
loading._x = 0;
loading._y = 0;
loading._visible = false;
i = 0;
while (i < 5) {
if (user.data.maps[i].name != undefined) {
_root["f" + i].text = user.data.maps[i].name;
_root["n" + i].text = "Load";
} else {
_root["n" + i].text = "New";
_root["f" + i].text = "Empty";
}
_root["r" + i].onRelease = function () {
game.saveMap = this._name.charAt(1);
gotoAndStop ("editor");
};
_root["d" + i].onRelease = function () {
delete user.data.maps[this._name.charAt(1)];
_root["n" + this._name.charAt(1)].text = "New";
_root["f" + this._name.charAt(1)].text = "Empty";
};
_root["u" + i].onRelease = function () {
game.saveMap = this._name.charAt(1);
if (user.data.maps[game.saveMap].name != undefined) {
_root.sel.text = user.data.maps[game.saveMap].name + " Map Selected";
upload = true;
} else {
upload = false;
_root.sel.text = "Select a map to upload";
}
};
_root["p" + i].onRelease = function () {
game.saveMap = this._name.charAt(1);
game.currentMap = 99;
map99 = user.data.maps[game.saveMap].map;
a99 = user.data.maps[game.saveMap].allies;
e99 = user.data.maps[game.saveMap].enemies;
i = 0;
while (i < a99.length) {
temp = a99[i][0];
a99[i][0] = a99[i][1];
a99[i][1] = temp;
i++;
}
i = 0;
while (i < e99.length) {
temp = e99[i][1];
e99[i][1] = e99[i][2];
e99[i][2] = temp;
i++;
}
gotoAndStop ("play_game");
};
i++;
}
i = 0;
while (i < 14) {
p = 0;
while (p < 14) {
game[(("t" + i) + "_") + p] = {};
p++;
}
i++;
}
Frame 10 (786 B)
if (((game.currentMap == 0) || (game.currentMap == 9)) || (game.currentMap == 14)) {
game.currentMap = game.currentMap + 1;
gotoAndStop ("play_game");
} else {
i = 0;
while (i < 23) {
if (game.story >= i) {
_root["g" + i].text = "Level " + i;
_root["h" + i].onRelease = function () {
if (this._name.charAt(2) != undefined) {
game.currentMap = Number(this._name.charAt(1) + this._name.charAt(2));
} else {
game.currentMap = Number(this._name.charAt(1));
}
gotoAndStop ("play_game");
};
} else {
_root["g" + i].text = "Locked";
_root["h" + i].onRelease = function () {
};
}
i++;
}
}
i = 0;
while (i < 14) {
p = 0;
while (p < 14) {
game[(("t" + i) + "_") + p] = {};
p++;
}
i++;
}
Frame 11 (5.42 KiB) ● ●
function loadMap(ob) {
_root.createEmptyMovieClip("tiles", 0);
attachMovie("editor_gui", "gui", 2);
tiles.attachMovie("mouse", "mouse", 9999999);
tiles._x = 100;
var _local3 = 0;
i = 0;
while (i < ob.map.length) {
j = 0;
while (j < ob.map[0].length) {
var _local4 = (("t_" + i) + "_") + j;
tiles.attachMovie("tiles", _local4, (((((j + i) * game.tile) / 2) * 300) + ((j - i) * game.tile)) + 3);
tiles[_local4]._x = (j - i) * game.tile;
tiles[_local4]._y = ((j + i) * game.tile) / 2;
tiles[_local4].gotoAndStop(ob.map[i][j] + 1);
j++;
}
i++;
}
i = 0;
while (i < ob.allies.length) {
var _local4 = (("t_" + ob.allies[i][0]) + "_") + ob.allies[i][1];
tiles[_local4].walk.gotoAndStop(11);
tiles[_local4].walk.n.text = "A" + (i + 1);
i++;
}
i = 0;
while (i < ob.enemies.length) {
var _local4 = (("t_" + ob.enemies[i][1]) + "_") + ob.enemies[i][2];
tiles[_local4].walk.gotoAndStop(10);
tiles[_local4].walk.n.text = "E" + (i + 1);
switch (ob.enemies[i][0]) {
case "squire" :
_local3 = 0;
break;
case "alchemist" :
_local3 = 1;
break;
case "archer" :
_local3 = 2;
break;
case "spearman" :
_local3 = 3;
break;
case "knight" :
_local3 = 4;
break;
case "robber" :
_local3 = 5;
break;
case "healer" :
_local3 = 6;
break;
case "sorcerer" :
_local3 = 7;
break;
case "drummer" :
_local3 = 8;
break;
case "king" :
_local3 = 9;
break;
case "noble" :
_local3 = 10;
}
gui["jj" + i] = _local3;
gui["j" + i].text = ob.enemies[i][0];
i++;
}
_root.ene = ob.enemies;
_root.all = ob.allies;
_root.map = ob.map;
go = true;
}
function makeEditor(w, h, a, e) {
all = new Array();
i = 0;
while (i < a) {
all[i] = new Array();
all[i][0] = -1;
all[i][1] = -1;
i++;
}
ene = new Array();
i = 0;
while (i < e) {
ene[i] = new Array();
ene[i][0] = "squire";
ene[i][1] = -1;
ene[i][2] = -1;
i++;
}
map = new Array();
i = 0;
while (i < h) {
map[i] = new Array();
i++;
}
p = 0;
while (p < h) {
i = 0;
while (i < w) {
map[p][i] = 4;
i++;
}
p++;
}
_root.createEmptyMovieClip("tiles", 0);
attachMovie("editor_gui", "gui", 2);
tiles.attachMovie("mouse", "mouse", 9999999);
tiles._x = 100;
i = 0;
while (i < h) {
j = 0;
while (j < w) {
var _local2 = (("t_" + i) + "_") + j;
tiles.attachMovie("tiles", _local2, (((((j + i) * game.tile) / 2) * 300) + ((j - i) * game.tile)) + 3);
tiles[_local2]._x = (j - i) * game.tile;
tiles[_local2]._y = ((j + i) * game.tile) / 2;
tiles[_local2].gotoAndStop(5);
j++;
}
i++;
}
i = 0;
while (i < 5) {
_root.gui["jj" + i] = 0;
i++;
}
go = true;
}
function work() {
gui.tile.gotoAndStop(selectedTile);
var _local1 = ((2 * (_ymouse - tiles._y)) - (_xmouse - tiles._x)) / 2;
var _local2 = (_xmouse - tiles._x) + _local1;
game.ymouse = Math.round(_local1 / game.tile);
game.xmouse = Math.round(_local2 / game.tile) - 1;
tiles.mouse._x = (game.xmouse - game.ymouse) * game.tile;
tiles.mouse._y = ((game.xmouse + game.ymouse) * game.tile) / 2;
}
function tileChange() {
if (arguments[0] == undefined) {
if (hib) {
map[game.ymouse][game.xmouse] = selectedTile - 1;
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].yu.text = selectedTile;
} else {
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].gotoAndStop(selectedTile);
map[game.ymouse][game.xmouse] = selectedTile - 1;
}
} else {
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].gotoAndStop(5);
map[game.ymouse][game.xmouse] = 4;
}
}
function placeUnit(num, team) {
if (((team == "a") && (num <= all.length)) && (tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 1)) {
tiles[(("t_" + all[num - 1][0]) + "_") + all[num - 1][1]].walk.gotoAndStop(1);
all[num - 1][0] = game.ymouse;
all[num - 1][1] = game.xmouse;
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(11);
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.n.text = "A " + num;
} else if (((team == "e") && (num <= ene.length)) && (tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 1)) {
tiles[(("t_" + ene[num - 1][1]) + "_") + ene[num - 1][2]].walk.gotoAndStop(1);
ene[num - 1][1] = game.ymouse;
ene[num - 1][2] = game.xmouse;
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(10);
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.n.text = "E " + num;
} else {
gui.error.text = "Error: You cannot place an other unit and/or an other unit is already placed there";
}
}
function hidTiles() {
if (!hib) {
i = 0;
while (i < map.length) {
p = 0;
while (p < map[0].length) {
tiles[(("t_" + i) + "_") + p].gotoAndStop(20);
tiles[(("t_" + i) + "_") + p].yu.text = map[i][p] + 1;
p++;
}
i++;
}
hib = true;
} else {
i = 0;
while (i < map.length) {
p = 0;
while (p < map[0].length) {
tiles[(("t_" + i) + "_") + p].gotoAndStop(map[i][p] + 1);
p++;
}
i++;
}
hib = false;
}
}
var go = false;
var locks = false;
var hib = false;
selectedTile = 1;
mains.stop();
if (user.data.maps[game.saveMap].name != undefined) {
st._visible = false;
loadMap(user.data.maps[game.saveMap]);
}
Instance of Symbol 306 MovieClip [blank] in Frame 11 (1.69 KiB) ●
onClipEvent (enterFrame) {
if (_root.go) {
if (Key.isDown(40) && (_root.tiles._y > ((-_root.tiles._height) / 3))) {
_root.tiles._y = _root.tiles._y - _root.game.speed;
} else if (Key.isDown(38) && (_root.tiles._y < (_root.tiles._height / 2))) {
_root.tiles._y = _root.tiles._y + _root.game.speed;
}
if (Key.isDown(39) && (_root.tiles._x > ((-_root.tiles._width) / 5))) {
_root.tiles._x = _root.tiles._x - _root.game.speed;
} else if (Key.isDown(37) && (_root.tiles._x < _root.tiles._width)) {
_root.tiles._x = _root.tiles._x + _root.game.speed;
}
_root.work();
}
}
onClipEvent (keyDown) {
if (Key.isDown(32)) {
if (!_root.locks) {
_root.locks = true;
_root.tiles.mouse.gotoAndStop("locked");
_root.gui.error.text = "Tile placement locked. Press space to unlock.";
} else {
_root.tiles.mouse.gotoAndPlay(1);
_root.locks = false;
_root.gui.error.text = "Tile placement unlocked. Press space to lock.";
}
} else if (Key.isDown(72)) {
_root.hidTiles();
}
}
onClipEvent (mouseUp) {
_root.gui.error.text = "";
if (Key.isDown(87)) {
var k = "e";
} else {
var k = "a";
}
if (!_root.locks) {
if (Key.isDown(17)) {
trace((("t_" + _root.game.ymouse) + "_") + _root.game.xmouse);
trace(_root.map[_root.game.ymouse][_root.game.xmouse]);
} else if (Key.isDown(16)) {
_root.tileChange(true);
} else if (Key.isDown(49)) {
_root.placeUnit(1, k);
} else if (Key.isDown(50)) {
_root.placeUnit(2, k);
} else if (Key.isDown(51)) {
_root.placeUnit(3, k);
} else if (Key.isDown(52)) {
_root.placeUnit(4, k);
} else if (Key.isDown(53)) {
_root.placeUnit(5, k);
} else {
_root.tileChange();
}
}
}
Frame 12 (93.73 KiB) ● ● ● ●
stop();
var ac = new Sound();
var ally = {};
var enemy = {};
var map0 = [[3, 3, 3, 3, 3, 3, 3], [3, 0, 0, 0, 0, 0, 0], [3, 1, 0, 0, 0, 0, 0], [3, 1, 2, 8, 8, 8, 8], [3, 1, 0, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0, 0]];
var sound0 = "drama";
var pos0 = [4];
var a0 = [[4, 2], [5, 2], [4, 4], [5, 4], [6, 3]];
var cut0 = ["ma434", "pa02", "pa12", "pa22", "pa32", "ma413", "pa44", "ta4", "ta4", "ta4", "w"];
var mes0 = ["Attention! You all have been called here today by the king. Our misson is to stop the rebellion against this great kingdom.", "There has been talk of a secret group called 'Belve Clan'. This group is planning to overtake the kingdom.", "Its rumoured that the Belve Clan will be gathering at Trade City for a meeting. We must head there at once, fall out!"];
var map1 = [[3, 3, 3, 0, 3, 2, 4, 2, 3, 0, 1, 1, 3], [3, 1, 1, 0, 0, 1, 4, 1, 0, 0, 0, 1, 1], [3, 1, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 1], [2, 1, 0, 1, 4, 4, 1, 4, 4, 0, 1, 0, 2], [4, 4, 4, 4, 4, 1, 2, 1, 4, 4, 4, 4, 4], [2, 1, 0, 1, 4, 4, 1, 4, 4, 0, 1, 0, 2], [3, 1, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 1], [3, 1, 0, 0, 0, 1, 4, 1, 0, 0, 0, 1, 1], [3, 1, 1, 0, 3, 1, 4, 1, 3, 0, 1, 1, 3]];
var sound1 = "attack";
var pos1 = [4, 2];
var a1 = [[1, 2], [3, 1], [3, 5], [4, 6], [2, 6]];
var e1 = [["squire", 9, 3], ["alchemist", 8, 4], ["squire", 9, 5], ["squire", 10, 4]];
var cut1 = ["ta1", "te0", "ta1", "ta1", "o"];
var mes1 = ["You stop right there!.", "Oh and what can a bunch of newly recruits do?", "Don't rush them, wait for them to come to you. When an enemy is within moving range you can attack.", "Theres a better chance of hitting enemies if you attack from the side or better yet behind."];
var map2 = [[6, 6, 6, 5, 5, 4, 6, 5, 7, 6, 7], [6, 6, 7, 5, 4, 4, 5, 4, 7, 5, 4], [5, 4, 7, 4, 4, 4, 4, 4, 4, 5, 4], [4, 4, 5, 4, 4, 7, 4, 4, 4, 7, 4], [6, 6, 6, 6, 4, 7, 7, 4, 4, 4, 4], [4, 4, 7, 4, 4, 5, 6, 6, 5, 4, 4], [7, 7, 4, 4, 4, 4, 6, 5, 4, 7, 4], [6, 5, 4, 7, 7, 5, 7, 4, 4, 7, 4], [6, 5, 4, 4, 4, 6, 5, 4, 4, 4, 5]];
var sound2 = "chase";
var pos2 = [5, 1];
var a2 = [[1, 1], [3, 2], [6, 2], [8, 2], [5, 0]];
var e2 = [["robber", 2, 7], ["squire", 6, 8], ["squire", 8, 6], ["squire", 4, 5], ["squire", 7, 7]];
var cut2 = ["te3", "ta0", "o"];
var mes2 = ["Damn the kings guards.", "Try to lure the enemies away from each other and then kill them off one by one."];
var map3 = [[6, 6, 6, 6, 6, 5, 4, 4, 4, 7, 7, 4], [6, 6, 6, 6, 6, 4, 4, 5, 4, 4, 4, 4], [6, 5, 6, 6, 4, 4, 4, 4, 4, 4, 4, 6], [6, 4, 5, 4, 4, 7, 4, 7, 4, 4, 4, 6], [6, 5, 7, 4, 4, 4, 4, 7, 4, 4, 4, 6], [6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 4, 6], [6, 6, 6, 5, 4, 7, 4, 4, 4, 4, 7, 4], [6, 6, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4], [6, 6, 6, 6, 6, 4, 5, 4, 4, 4, 4, 4], [6, 6, 6, 6, 6, 6, 7, 4, 4, 7, 4, 6], [6, 6, 6, 6, 6, 6, 5, 4, 4, 7, 6, 6]];
var sound3 = "chase";
var a3 = [[8, 8], [7, 6], [7, 1], [10, 8], [9, 3]];
var e3 = [["archer", 4, 9], ["alchemist", 1, 6], ["alchemist", 3, 3], ["archer", 3, 1], ["squire", 5, 7]];
var pos3 = [2, 4];
var jobs3 = {archer:["Bow Shot"], alchemist:["Potion"]};
var cut3 = ["ta0", "o"];
var mes3 = ["Luring enemies will not work here because archers have a ranged attack. You have to rush them."];
var map4 = [[14, 14, 14, 10, 9, 9, 9, 14, 14, 14], [14, 14, 13, 10, 13, 13, 9, 14, 14, 14], [9, 12, 13, 10, 9, 12, 9, 9, 13, 13], [9, 9, 10, 10, 9, 9, 9, 9, 12, 11], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [14, 14, 12, 9, 9, 9, 10, 9, 9, 9], [14, 13, 13, 12, 9, 11, 11, 11, 9, 9], [14, 13, 13, 12, 9, 11, 11, 11, 9, 10], [14, 13, 13, 11, 9, 11, 12, 9, 10, 10], [9, 13, 11, 9, 9, 9, 9, 9, 10, 10]];
var a4 = [[6, 7], [5, 6], [7, 5], [4, 4], [8, 6]];
var e4 = [["archer", 8, 2], ["archer", 2, 7], ["sorcerer", 2, 8], ["sorcerer", 5, 1], ["knight", 1, 2], ["squire", 1, 6]];
var pos4 = [1, 5];
var sound4 = "chase";
var jobs4 = {sorcerer:["Fire 2"]};
var cut4 = ["pe15", "te1", "ta0", "te1", "ta0", "o"];
var mes4 = ["I'm telling you we got to get out of this mess before we get killed!", "Where is your leader?", "No we don't want to fight. Go to Thief's Hideout and let us go.", "Traitors! Kill them all! Thief's Hideout is next."];
var map5 = [[9, 11, 11, 11, 10, 9, 9, 11, 11], [9, 10, 11, 9, 9, 9, 9, 10, 9], [9, 4, 9, 9, 9, 9, 9, 9, 7], [7, 4, 7, 9, 7, 4, 7, 9, 9], [7, 4, 9, 4, 4, 4, 4, 4, 4], [6, 5, 4, 4, 4, 4, 4, 4, 4], [6, 4, 4, 4, 4, 4, 7, 4, 4], [4, 4, 7, 5, 5, 4, 4, 4, 5], [4, 4, 4, 5, 4, 4, 4, 5, 6]];
var a5 = [[2, 6], [4, 7], [4, 6], [8, 6], [6, 7]];
var e5 = [["robber", 4, 2], ["archer", 7, 1], ["alchemist", 5, 0], ["archer", 1, 1], ["alchemist", 2, 0]];
var sound5 = "attack";
var pos5 = [1, 5];
var jobs5 = {alchemist:["Super Potion"]};
var cut5 = ["te0", "o"];
var mes5 = ["Stop! This area is Belve Territory the kings guards arn't allowed here!"];
var map6 = [[14, 10, 10, 4, 9, 4, 9, 4, 10, 4], [14, 13, 9, 4, 9, 14, 11, 9, 9, 9], [14, 13, 11, 10, 10, 4, 13, 11, 10, 9], [11, 11, 11, 10, 9, 9, 9, 10, 10, 9], [11, 11, 13, 10, 9, 9, 9, 9, 10, 10], [11, 11, 10, 10, 10, 9, 9, 9, 10, 11], [14, 11, 10, 9, 9, 9, 9, 9, 9, 10], [14, 11, 10, 13, 9, 9, 9, 9, 9, 9], [14, 13, 9, 13, 13, 9, 9, 9, 9, 9], [14, 13, 9, 9, 9, 10, 9, 9, 9, 4], [9, 10, 9, 9, 9, 10, 10, 4, 9, 10]];
var a6 = [[8, 7], [7, 6], [8, 5], [8, 4], [9, 5]];
var e6 = [["robber", 2, 5], ["healer", 3, 2], ["robber", 1, 6], ["knight", 6, 2], ["noble", 0, 4]];
var pos6 = [2, 4];
var sound6 = "attack";
var jobs6 = {knight:["Head Break"], healer:["Heal 2"], robber:["Life Steal"]};
var cut6 = ["ta0", "te4", "o"];
var cond6 = "Noble";
var mes6 = ["Prepare to die!", "Your just some kids. Your no match for me."];
var map7 = [[14, 4, 9, 14, 14, 4, 14, 9, 4, 4], [9, 4, 4, 9, 9, 9, 9, 9, 4, 4], [12, 9, 9, 9, 9, 9, 9, 9, 9, 9], [11, 12, 9, 13, 13, 12, 9, 9, 9, 9], [11, 11, 9, 13, 13, 12, 9, 9, 9, 13], [11, 11, 9, 9, 12, 9, 9, 9, 12, 12], [14, 11, 11, 9, 9, 9, 9, 9, 9, 4], [14, 13, 11, 9, 9, 9, 9, 9, 9, 9], [14, 13, 13, 12, 9, 9, 9, 9, 9, 4], [14, 14, 13, 12, 9, 9, 4, 13, 13, 4]];
var a7 = [[6, 7], [7, 6], [7, 4], [6, 2], [4, 1]];
var e7 = [["sorcerer", 0, 3], ["squire", 3, 4], ["archer", 2, 8], ["robber", 2, 1], ["robber", 3, 7]];
var pos7 = [2, 4];
var jobs7 = {robber:["Life Steal"], archer:["Fire Shot"]};
var cut7 = ["te0", "te0", "o"];
var mes7 = ["We gotta get outa here before..", "Damn, the king's guards are here!"];
var map8 = [[4, 4, 4, 9, 9, 9, 14, 14], [14, 13, 9, 9, 9, 12, 12, 9], [12, 11, 10, 9, 9, 9, 9, 10], [11, 11, 10, 10, 9, 9, 10, 11], [11, 13, 9, 9, 9, 9, 13, 12], [9, 14, 7, 9, 9, 9, 10, 12], [4, 4, 9, 9, 9, 9, 9, 11], [14, 13, 10, 9, 9, 4, 7, 13], [14, 4, 10, 9, 9, 9, 9, 4]];
var sound8 = "chase";
var a8 = [[3, 7], [4, 7], [5, 7], [4, 8], [5, 8]];
var e8 = [["robber", 1, 2], ["knight", 2, 3], ["knight", 5, 3], ["archer", 1, 5], ["archer", 7, 3]];
var pos8 = [1, 5];
var jobs8 = {robber:["Life Steal"], knight:["Head Break"], archer:["Fire Shot"]};
var cut8 = ["ta0", "te0", "o"];
var mes8 = ["Who the are you? Were returning to the kingdom. Let us pass.", "The leader of the Belve Clan sent us to kill you all. You're not going anywhere."];
var map9 = [[3, 3, 3, 3, 3, 3, 3], [3, 2, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [8, 8, 8, 8, 13, 12, 0], [0, 0, 0, 0, 0, 0, 0], [3, 2, 0, 0, 0, 0, 0]];
var a9 = [[0, 3]];
var sound9 = "drama";
var e9 = [["king", 5, 3]];
var pos9 = [4, 2];
var cut9 = ["ma033", "ta0", "te0", "ta0", "te0", "ta0", "w"];
var mes9 = ["I'm back my king. We have taken out some of the Belve's hideouts.", "Well while you were gone the kingdom was attacked. I need your party to stay here and guard the castle", "But I know where the Belve Clan leader is hiding. I can take him out now!", "Thats an order!", "No, i'm going to the Abandend Storehouse."];
var map10 = [[4, 4, 6, 6, 6, 4, 7], [4, 4, 6, 6, 6, 4, 4], [4, 4, 6, 6, 6, 4, 4], [7, 4, 6, 6, 6, 4, 4], [4, 4, 6, 6, 6, 4, 4], [5, 5, 5, 6, 5, 5, 5], [5, 5, 5, 5, 5, 5, 5], [7, 4, 5, 5, 5, 4, 4], [4, 4, 4, 5, 4, 4, 7]];
var sound10 = "drama";
var a10 = [[1, 7], [2, 7], [3, 7], [4, 7], [5, 7]];
var e10 = [["sorcerer", 6, 1], ["sorcerer", 0, 1], ["knight", 3, 1], ["archer", 4, 0], ["archer", 2, 0]];
var pos10 = [1, 5];
var jobs10 = {sorcerer:["Fire 3"], archer:["Fire Shot"]};
var cut10 = ["o"];
var map11 = [[13, 5, 4, 6, 13, 4, 4, 4, 4], [4, 4, 4, 4, 4, 4, 4, 4, 4], [6, 4, 13, 6, 5, 4, 4, 13, 6], [6, 6, 6, 6, 6, 4, 4, 5, 5], [6, 5, 4, 6, 5, 4, 4, 6, 6], [5, 4, 4, 4, 4, 4, 4, 5, 6], [6, 4, 4, 4, 13, 4, 4, 4, 5], [13, 6, 13, 6, 6, 4, 4, 13, 6], [6, 6, 6, 5, 4, 4, 4, 6, 6]];
var sound11 = "attack";
var a11 = [[7, 7], [7, 5], [7, 4], [7, 3], [8, 2]];
var e11 = [["healer", 1, 5], ["sorcerer", 1, 0], ["knight", 3, 4], ["knight", 3, 2], ["knight", 4, 7]];
var pos11 = [2, 4];
var jobs11 = {knight:["Head Break"], healer:["Heal 2"], sorcerer:["Fire 3"]};
var cut11 = ["o"];
var map12 = [[10, 10, 9, 9, 4, 9, 10, 14, 14, 10], [9, 10, 9, 14, 14, 14, 9, 9, 10, 9], [13, 13, 10, 9, 13, 14, 13, 9, 9, 9], [14, 13, 13, 10, 12, 12, 12, 9, 9, 12], [14, 13, 13, 9, 9, 9, 10, 9, 12, 14], [14, 13, 13, 12, 9, 9, 9, 9, 9, 9], [9, 13, 10, 10, 9, 9, 9, 9, 9, 9], [9, 11, 10, 9, 9, 9, 12, 12, 10, 10], [13, 9, 9, 13, 9, 12, 12, 12, 10, 10], [9, 9, 9, 14, 13, 12, 14, 9, 9, 10]];
var sound12 = "attack";
var a12 = [[9, 2], [6, 7], [7, 7], [8, 8], [9, 1]];
var e12 = [["robber", 2, 6], ["robber", 5, 3], ["sorcerer", 2, 4], ["knight", 3, 5], ["knight", 2, 4], ["sorcerer", 4, 2]];
var pos12 = [2, 4];
var jobs12 = {robber:["Life Steal"], sorcerer:["Fire 3"]};
var cut12 = ["ta0", "te2", "o"];
var mes12 = ["Where is your leader hiding?", "Your going to have to kill us first before we tell you anything!"];
var map13 = [[14, 14, 13, 13, 17, 9, 9], [14, 14, 17, 13, 13, 12, 9], [14, 13, 13, 13, 11, 9, 9], [14, 17, 13, 12, 9, 9, 9], [13, 17, 13, 12, 9, 9, 9], [14, 17, 17, 13, 9, 9, 10], [13, 17, 12, 12, 9, 9, 12], [16, 9, 9, 9, 9, 9, 9]];
var a13 = [[5, 7], [6, 6], [6, 3], [6, 1], [5, 5]];
var e13 = [["spearman", 1, 5], ["spearman", 3, 2], ["noble", 1, 3], ["sorcerer", 3, 0], ["robber", 2, 6], ["robber", 1, 4]];
var pos13 = [2, 4];
var sound13 = "attack";
var jobs13 = {spearman:["Thrust"], sorcerer:["Fire 3"]};
var cut13 = ["ta2", "te0", "o"];
var cond13 = "Noble";
var mes13 = ["Damn the Belve leader isn't here.", "We have company boys!"];
var map14 = [[3, 3, 3, 3, 3, 3], [3, 2, 2, 2, 2, 2], [3, 0, 0, 0, 0, 0], [3, 12, 0, 0, 0, 0], [3, 12, 13, 8, 8, 8], [3, 12, 0, 0, 0, 0], [3, 0, 0, 0, 0, 0]];
var a14 = [[5, 4]];
var e14 = [["king", 1, 4]];
var sound14 = "drama";
var pos14 = [2, 4];
var cut14 = ["pe04", "ma034", "pa02", "ta0", "te0", "te0", "w"];
var mes14 = ["I have returned my king and I have weakend the Belve Clan.", "I am not happy, you disobayed my orders. But no worries.", "Head to Doct City at once! The head leader of the Belve Clan will be there. Once he is killed the rebellion will be over."];
var map15 = [[17, 9, 9, 9, 10, 9, 9, 9, 17, 17], [17, 17, 16, 16, 16, 10, 9, 9, 9, 10], [9, 13, 9, 9, 9, 15, 9, 15, 9, 10], [9, 10, 9, 12, 16, 9, 9, 9, 9, 9], [9, 9, 15, 10, 9, 9, 16, 13, 10, 9], [15, 15, 9, 15, 15, 15, 12, 10, 9, 9], [9, 9, 12, 9, 15, 9, 9, 15, 9, 9], [16, 10, 10, 10, 9, 16, 15, 9, 16, 16], [13, 9, 13, 15, 12, 15, 16, 10, 9, 9], [13, 9, 15, 9, 10, 9, 15, 9, 10, 13]];
var a15 = [[3, 8], [5, 8], [8, 6], [9, 5], [1, 7]];
var sound15 = "chase";
var e15 = [["sorcerer", 1, 2], ["sorcerer", 7, 1], ["spearman", 6, 2], ["healer", 4, 2], ["spearman", 3, 4], ["knight", 4, 5]];
var pos15 = [1, 5];
var jobs15 = {healer:["Heal 2"], sorcerer:["Fire 2"], spearman:["Thrust"]};
var cut15 = ["te0", "o"];
var mes15 = ["Heh, your party is no match for ours!"];
var map16 = [[18, 16, 18, 17, 16, 18, 17, 18, 18], [15, 16, 16, 9, 16, 16, 9, 16, 15], [9, 9, 9, 15, 9, 9, 9, 9, 15], [9, 9, 9, 9, 9, 9, 9, 9, 9], [4, 16, 15, 16, 9, 16, 9, 16, 9], [18, 17, 17, 16, 16, 15, 17, 17, 16]];
var a16 = [[2, 3], [3, 2], [4, 3], [5, 2], [6, 3]];
var sound16 = "chase";
var e16 = [["knight", 3, 0], ["robber", 1, 1], ["sorcerer", 7, 1], ["sorcerer", 4, 5], ["robber", 8, 5], ["sorcerer", 5, 1]];
var pos16 = [2, 5];
var jobs16 = {robber:["Steal Life"], sorcerer:["Fire 3"]};
var cut16 = ["ta0", "te0", "o"];
var mes16 = ["Huh? Who are you! Are you part of the Belve Clan?", "We were sent by someone else."];
var map17 = [[14, 14, 13, 13, 9, 16, 15, 9, 14], [9, 13, 13, 13, 9, 15, 15, 15, 13], [9, 16, 12, 12, 9, 15, 13, 13, 13], [9, 9, 9, 9, 9, 9, 13, 13, 12], [9, 9, 9, 9, 9, 9, 9, 9, 9], [9, 13, 13, 12, 9, 9, 9, 9, 9], [9, 13, 13, 16, 9, 15, 9, 9, 9], [9, 14, 13, 9, 9, 9, 13, 9, 12], [16, 9, 9, 15, 9, 13, 14, 13, 12]];
var a17 = [[6, 2], [7, 2], [8, 2], [8, 1], [8, 3]];
var e17 = [["noble", 1, 5], ["knight", 1, 1], ["spearman", 3, 5], ["knight", 3, 6], ["spearman", 7, 5], ["knight", 8, 7]];
var pos17 = [2, 4];
var jobs17 = {spearman:["Thrust"]};
var cut17 = ["te0", "te0", "ta3", "te0", "o"];
var sound17 = "attack";
var mes17 = ["Hmm the king's guards are here. You know the king is planning on killing all of us?", "Its not too late you can join us.", "So thats who ambushed us. No you and the king are both dead!", "!!!"];
var map18 = [[1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 0, 1, 1], [3, 3, 2, 0, 0, 2, 3, 3], [4, 4, 0, 0, 0, 0, 7, 4], [4, 4, 0, 0, 0, 0, 4, 4], [7, 4, 0, 0, 0, 0, 4, 4], [4, 4, 0, 0, 0, 0, 4, 7], [4, 4, 0, 0, 0, 0, 4, 4], [4, 7, 0, 0, 0, 0, 4, 4], [4, 4, 0, 0, 0, 0, 7, 4]];
var a18 = [[2, 8], [4, 8], [5, 8], [3, 9], [3, 8]];
var e18 = [["archer", 1, 0], ["archer", 6, 0], ["spearman", 3, 1], ["spearman", 4, 1], ["drummer", 3, 0]];
var pos18 = [1, 5];
var jobs18 = {archer:["Fire Shot"], spearman:["Thrust"]};
var sound18 = "drama";
var cut18 = ["ta0", "te4", "o"];
var mes18 = ["Were back from defeating the Belve Clan. Let us in.", "Your not fooling anyone. Soldiers attack!"];
var map19 = [[3, 3, 4, 0, 0, 4, 4, 3, 3], [3, 3, 4, 0, 0, 4, 4, 3, 3], [2, 4, 1, 0, 0, 1, 4, 4, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 4, 1, 0, 0, 1, 4, 4, 2], [3, 4, 4, 0, 0, 4, 4, 4, 3], [3, 4, 4, 0, 0, 4, 4, 4, 3], [3, 4, 4, 0, 0, 4, 4, 4, 3]];
var a19 = [[2, 8], [3, 8], [4, 8], [5, 8], [6, 8]];
var sound19 = "chase";
var e19 = [["sorcerer", 2, 3], ["knight", 5, 3], ["spearman", 3, 2], ["spearman", 4, 2], ["healer", 3, 0], ["knight", 4, 4]];
var pos19 = [1, 5];
var jobs19 = {spearman:["Thrust"], healer:["Heal 2"], sorcerer:["Fire 3"]};
var cut19 = ["o"];
var map20 = [[3, 3, 3, 3, 3, 3, 3, 3], [3, 1, 1, 1, 1, 1, 1, 1], [3, 1, 0, 0, 0, 0, 0, 0], [8, 8, 8, 8, 8, 8, 8, 8], [8, 8, 8, 8, 8, 8, 8, 8], [3, 1, 0, 0, 0, 0, 0, 0], [3, 1, 0, 0, 0, 0, 0, 0], [3, 1, 0, 0, 0, 0, 0, 0]];
var a20 = [[7, 6], [7, 5], [7, 4], [7, 3], [7, 2]];
var e20 = [["knight", 2, 5], ["knight", 2, 2], ["sorcerer", 1, 6], ["sorcerer", 1, 1], ["noble", 0, 3]];
var pos20 = [2, 4];
var sound20 = "attack";
var jobs20 = {sorcerer:["Fire 3"], knight:["Head Break"]};
var cut20 = ["o"];
var map21 = [[3, 3, 3, 0, 0, 3], [3, 0, 0, 0, 0, 0], [3, 0, 1, 0, 0, 1], [3, 0, 0, 0, 0, 0], [3, 0, 1, 0, 0, 1], [3, 0, 0, 0, 0, 0], [3, 0, 1, 0, 0, 1]];
var a21 = [[1, 6], [2, 6], [3, 6], [4, 6], [5, 6]];
var sound21 = "attack";
var e21 = [["noble", 2, 2], ["noble", 5, 2], ["drummer", 2, 1], ["healer", 3, 0], ["healer", 4, 0]];
var pos21 = [1, 5];
var jobs21 = {healer:["Heal 2"]};
var cut21 = ["o"];
var map22 = [[3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 0, 4, 1, 0, 0, 4, 1, 0], [3, 0, 1, 4, 0, 0, 1, 4, 0], [12, 0, 0, 0, 0, 0, 0, 0, 0], [12, 13, 8, 8, 8, 8, 8, 8, 8], [12, 0, 0, 0, 0, 0, 0, 0, 0], [3, 0, 1, 4, 0, 0, 1, 4, 0], [3, 0, 4, 1, 0, 0, 4, 1, 0], [3, 0, 0, 0, 0, 0, 0, 0, 0]];
var a22 = [[8, 6], [8, 5], [8, 4], [8, 3], [8, 2]];
var sound22 = "chase";
var e22 = [["king", 0, 4], ["noble", 1, 5], ["noble", 1, 3], ["knight", 5, 5], ["knight", 5, 3], ["archer", 3, 5], ["archer", 3, 3]];
var pos22 = [2, 4];
var jobs22 = {archer:["Fire Shot"]};
var cut22 = ["te0", "o"];
var mes22 = ["No one disobays my orders!"];
var cond22 = "King";
var sound99 = "chase";
var pos99 = [4, 4];
var cut99 = ["o"];
var jobs99 = {archer:["Fire Shot"], healer:["Heal 2"], sorcerer:["Fire 3"], knight:["Head Break"], alchemist:["Super Potion"], spearman:["Thrust"]};
var cutL = _root["cut" + game.currentMap].length;
var cutN = 0;
var cs = true;
var chatN = 0;
game.T0 = function () {
};
game.T0.prototype.walkable = true;
game.T1 = function () {
};
game.T1.prototype.walkable = true;
game.T1.prototype.height = 20;
game.T2 = function () {
};
game.T2.prototype.walkable = true;
game.T2.prototype.height = 40;
game.T3 = function () {
};
game.T3.prototype.walkable = false;
game.T3.prototype.height = 70;
game.T4 = function () {
};
game.T4.prototype.walkable = true;
game.T5 = function () {
};
game.T5.prototype.walkable = true;
game.T5.prototype.height = 10;
game.T6 = function () {
};
game.T6.prototype.walkable = true;
game.T6.prototype.height = 20;
game.T7 = function () {
};
game.T7.prototype.walkable = false;
game.T7.prototype.height = 24;
game.T8 = function () {
};
game.T8.prototype.walkable = true;
game.T9 = function () {
};
game.T9.prototype.walkable = true;
game.T10 = function () {
};
game.T10.prototype.walkable = true;
game.T10.prototype.height = 10;
game.T11 = function () {
};
game.T11.prototype.walkable = true;
game.T11.prototype.height = 20;
game.T12 = function () {
};
game.T12.prototype.walkable = true;
game.T12.prototype.height = 20;
game.T13 = function () {
};
game.T13.prototype.walkable = true;
game.T13.prototype.height = 40;
game.T14 = function () {
};
game.T14.prototype.walkable = true;
game.T14.prototype.height = 80;
game.T15 = function () {
};
game.T15.prototype.walkable = true;
game.T16 = function () {
};
game.T16.prototype.walkable = true;
game.T16.prototype.height = 20;
game.T17 = function () {
};
game.T17.prototype.walkable = true;
game.T17.prototype.height = 40;
game.T18 = function () {
};
game.T18.prototype.walkable = true;
game.T18.prototype.height = 80;
game.Jsquire = function () {
};
game.Jsquire.prototype.job = "Squire";
game.Jsquire.prototype.eva = 5;
game.Jsquire.prototype.hpM = 97;
game.Jsquire.prototype.hp = game.Jsquire.prototype.hpM;
game.Jsquire.prototype.mpM = 43;
game.Jsquire.prototype.mp = game.Jsquire.prototype.mpM;
game.Jsquire.prototype.sp = 7;
game.Jsquire.prototype.atk = 29;
game.Jsquire.prototype.m = 3;
game.Jsquire.prototype.j = 3;
game.Jknight = function () {
};
game.Jknight.prototype.job = "Knight";
game.Jknight.prototype.eva = 15;
game.Jknight.prototype.hpM = 107;
game.Jknight.prototype.hp = game.Jknight.prototype.hpM;
game.Jknight.prototype.mpM = 12;
game.Jknight.prototype.mp = game.Jknight.prototype.mpM;
game.Jknight.prototype.sp = 7;
game.Jknight.prototype.atk = 35;
game.Jknight.prototype.m = 3;
game.Jknight.prototype.j = 2;
game.Jalchemist = function () {
};
game.Jalchemist.prototype.job = "Alchemist";
game.Jalchemist.prototype.eva = 0;
game.Jalchemist.prototype.hpM = 72;
game.Jalchemist.prototype.hp = game.Jalchemist.prototype.hpM;
game.Jalchemist.prototype.mpM = 0;
game.Jalchemist.prototype.mp = game.Jalchemist.prototype.mpM;
game.Jalchemist.prototype.sp = 6;
game.Jalchemist.prototype.atk = 20;
game.Jalchemist.prototype.m = 2;
game.Jalchemist.prototype.j = 2;
game.Jsorcerer = function () {
};
game.Jsorcerer.prototype.job = "Sorcerer";
game.Jsorcerer.prototype.eva = 0;
game.Jsorcerer.prototype.hpM = 68;
game.Jsorcerer.prototype.hp = game.Jsorcerer.prototype.hpM;
game.Jsorcerer.prototype.mpM = 42;
game.Jsorcerer.prototype.mp = game.Jsorcerer.prototype.mpM;
game.Jsorcerer.prototype.sp = 6;
game.Jsorcerer.prototype.atk = 20;
game.Jsorcerer.prototype.m = 2;
game.Jsorcerer.prototype.j = 2;
game.Jhealer = function () {
};
game.Jhealer.prototype.job = "Healer";
game.Jhealer.prototype.eva = 0;
game.Jhealer.prototype.hpM = 75;
game.Jhealer.prototype.hp = game.Jhealer.prototype.hpM;
game.Jhealer.prototype.mpM = 62;
game.Jhealer.prototype.mp = game.Jhealer.prototype.mpM;
game.Jhealer.prototype.sp = 6;
game.Jhealer.prototype.atk = 23;
game.Jhealer.prototype.m = 2;
game.Jhealer.prototype.j = 2;
game.Jarcher = function () {
};
game.Jarcher.prototype.job = "Archer";
game.Jarcher.prototype.eva = 5;
game.Jarcher.prototype.hpM = 91;
game.Jarcher.prototype.hp = game.Jarcher.prototype.hpM;
game.Jarcher.prototype.mpM = 0;
game.Jarcher.prototype.mp = game.Jarcher.prototype.mpM;
game.Jarcher.prototype.sp = 7;
game.Jarcher.prototype.atk = 24;
game.Jarcher.prototype.m = 3;
game.Jarcher.prototype.j = 4;
game.Jrobber = function () {
};
game.Jrobber.prototype.job = "Robber";
game.Jrobber.prototype.eva = 20;
game.Jrobber.prototype.hpM = 80;
game.Jrobber.prototype.hp = game.Jrobber.prototype.hpM;
game.Jrobber.prototype.mpM = 0;
game.Jrobber.prototype.mp = game.Jrobber.prototype.mpM;
game.Jrobber.prototype.sp = 7;
game.Jrobber.prototype.atk = 15;
game.Jrobber.prototype.m = 4;
game.Jrobber.prototype.j = 4;
game.Jspearman = function () {
};
game.Jspearman.prototype.job = "Spearman";
game.Jspearman.prototype.eva = 15;
game.Jspearman.prototype.hpM = 118;
game.Jspearman.prototype.hp = game.Jspearman.prototype.hpM;
game.Jspearman.prototype.mpM = 13;
game.Jspearman.prototype.mp = game.Jspearman.prototype.mpM;
game.Jspearman.prototype.sp = 7;
game.Jspearman.prototype.atk = 37;
game.Jspearman.prototype.m = 3;
game.Jspearman.prototype.j = 6;
game.Jdrummer = function () {
};
game.Jdrummer.prototype.job = "Drummer";
game.Jdrummer.prototype.eva = 10;
game.Jdrummer.prototype.hpM = 102;
game.Jdrummer.prototype.hp = game.Jdrummer.prototype.hpM;
game.Jdrummer.prototype.mpM = 10;
game.Jdrummer.prototype.mp = game.Jdrummer.prototype.mpM;
game.Jdrummer.prototype.sp = 8;
game.Jdrummer.prototype.atk = 27;
game.Jdrummer.prototype.m = 4;
game.Jdrummer.prototype.j = 2;
game.Jnoble = function () {
};
game.Jnoble.prototype.job = "Noble";
game.Jnoble.prototype.eva = 20;
game.Jnoble.prototype.hpM = 146;
game.Jnoble.prototype.hp = game.Jnoble.prototype.hpM;
game.Jnoble.prototype.mpM = 23;
game.Jnoble.prototype.mp = game.Jnoble.prototype.mpM;
game.Jnoble.prototype.sp = 8;
game.Jnoble.prototype.atk = 44;
game.Jnoble.prototype.m = 3;
game.Jnoble.prototype.j = 2;
game.Jking = function () {
};
game.Jking.prototype.job = "King";
game.Jking.prototype.eva = 20;
game.Jking.prototype.hpM = 180;
game.Jking.prototype.hp = game.Jking.prototype.hpM;
game.Jking.prototype.mpM = 84;
game.Jking.prototype.mp = game.Jking.prototype.mpM;
game.Jking.prototype.sp = 8;
game.Jking.prototype.atk = 55;
game.Jking.prototype.m = 3;
game.Jking.prototype.j = 2;
function makeMap(map) {
mains.stop();
mains.attachSound(_root["sound" + game.currentMap]);
mains.start(0, 999);
attachMovie("blank", "tiles", 1);
attachMovie("gui", "gui", 2);
tiles.attachMovie("blank", "back", 0);
tiles.attachMovie("mouse", "mouse", 1);
tiles._y = 400;
tiles.mouse._x = 560;
i = 0;
while (i < map.length) {
j = 0;
while (j < map[0].length) {
name = (("t_" + i) + "_") + j;
game[name] = new game["T" + map[i][j]]();
game[name].depth = (((((j + i) * game.tile) / 2) * 300) + ((j - i) * game.tile)) + 3;
if (game[name].height == undefined) {
clip = tiles.back;
} else {
clip = tiles;
}
clip.attachMovie("tiles", name, game[name].depth);
if (game[name].height != undefined) {
clip[name].walk._y = clip[name].walk._y - game[name].height;
}
clip[name]._x = (j - i) * game.tile;
clip[name]._y = ((j + i) * game.tile) / 2;
clip[name].gotoAndStop(map[i][j] + 1);
j++;
}
i++;
}
var _local3 = _root["a" + game.currentMap];
i = 0;
while (i < _local3.length) {
var name = ("a" + i);
ally[name] = new game["J" + a[i]]();
ally[name].status = {};
ally[name].ct = 0;
ally[name].dead = 0;
ally[name].xt = _local3[i][0];
ally[name].yt = _local3[i][1];
ally[name].x = _local3[i][0] * game.tile;
ally[name].y = _local3[i][1] * game.tile;
ally[name].xiso = ally[name].x - ally[name].y;
ally[name].yiso = (ally[name].x + ally[name].y) / 2;
ally[name].depth = (((((_local3[i][1] + _local3[i][0]) * game.tile) / 2) * 310) + ((_local3[i][1] - _local3[i][0]) * game.tile)) + 2;
tiles.attachMovie(a[i], name, ally[name].depth);
tiles[name]._x = ally[name].xiso;
tiles[name]._y = ally[name].yiso;
if (game[(("t_" + _local3[i][1]) + "_") + _local3[i][0]].height != undefined) {
tiles[name]._y = tiles[name]._y - game[(("t_" + _local3[i][1]) + "_") + _local3[i][0]].height;
}
tiles[name].gotoAndStop(_root["pos" + game.currentMap][0]);
i++;
}
var _local2 = _root["e" + game.currentMap];
i = 0;
while (i < _local2.length) {
var name = ("e" + i);
enemy[name] = new game["J" + _local2[i][0]]();
enemy[name].status = {act:0, move:0, poison:0, slow:0};
enemy[name].depth = (((((_local2[i][2] + _local2[i][1]) * game.tile) / 2) * 310) + ((_local2[i][2] - _local2[i][1]) * game.tile)) + 2;
enemy[name].ct = 0;
enemy[name].xt = _local2[i][1];
enemy[name].yt = _local2[i][2];
enemy[name].dead = 0;
enemy[name].x = _local2[i][1] * game.tile;
enemy[name].y = _local2[i][2] * game.tile;
enemy[name].xiso = enemy[name].x - enemy[name].y;
enemy[name].yiso = (enemy[name].x + enemy[name].y) / 2;
tiles.attachMovie(_local2[i][0], name, enemy[name].depth);
tiles[name]._x = enemy[name].xiso;
tiles[name]._y = enemy[name].yiso;
tiles[name].char.head.gotoAndStop(2);
tiles[name].char.arm.gotoAndStop(2);
tiles[name].char.arm2.gotoAndStop(2);
tiles[name].char.body.gotoAndStop(2);
if (game[(("t_" + _local2[i][2]) + "_") + _local2[i][1]].height != undefined) {
tiles[name]._y = tiles[name]._y - game[(("t_" + _local2[i][2]) + "_") + _local2[i][1]].height;
}
tiles[name].gotoAndStop(_root["pos" + game.currentMap][1]);
switch (enemy[name].job) {
case "Archer" :
enemy[name].r = 4;
break;
case "Healer" :
enemy[name].r = 4;
break;
case "Sorcerer" :
enemy[name].r = 4;
break;
case "Drummer" :
enemy[name].r = 1;
break;
case "Alchemist" :
enemy[name].r = 3;
break;
case "King" :
enemy[name].r = 3;
break;
case "Noble" :
enemy[name].r = 3;
}
i++;
}
enemyTurn = false;
steal = "";
turn = "";
_root.hideT = false;
_root.stopS = true;
tiles._x = ((_root["map" + game.currentMap].length / 2) * -1) + 220;
tiles._y = ((_root["map" + game.currentMap][0].length / 2) * -1) + 130;
i = 0;
while (i < _local2.length) {
var name = ("e" + i);
tiles[name].char.head.gotoAndStop(2);
tiles[name].char.arm.gotoAndStop(2);
tiles[name].char.arm2.gotoAndStop(2);
tiles[name].char.body.gotoAndStop(2);
i++;
}
}
function work() {
var _local2 = ((2 * (_ymouse - tiles._y)) - (_xmouse - tiles._x)) / 2;
var _local3 = (_xmouse - tiles._x) + _local2;
game.ymouse = Math.round(_local2 / game.tile);
game.xmouse = Math.round(_local3 / game.tile) - 1;
if (cs == false) {
tiles.mouse._x = (game.xmouse - game.ymouse) * game.tile;
tiles.mouse._y = ((game.xmouse + game.ymouse) * game.tile) / 2;
if (game[(("t_" + game.ymouse) + "_") + game.xmouse].height != undefined) {
tiles.mouse._y = tiles.mouse._y - game[(("t_" + game.ymouse) + "_") + game.xmouse].height;
gui.heig.text = "Height: " + (game[(("t_" + game.ymouse) + "_") + game.xmouse].height / 10);
tiles.mouse.swapDepths((((((game.xmouse + game.ymouse) * game.tile) / 2) * 301) + ((game.xmouse - game.ymouse) * game.tile)) + 4);
} else {
gui.heig.text = "Height: 0";
tiles.mouse.swapDepths((((((game.xmouse + game.ymouse) * game.tile) / 2) * 299) + ((game.xmouse - game.ymouse) * game.tile)) + 1);
}
stat();
if (turn == "") {
speed();
}
if (ally[turn].hp == 0) {
tiles[turn].tu.gotoAndStop(1);
turn = "";
}
} else {
cutScene();
}
if (move == 2) {
moveChar();
}
i = 0;
while (i < _root["a" + game.currentMap].length) {
if ((ally["a" + i].dead == 1) || ((ally["a" + i].hp <= 0) && (ally["a" + i].dead == 1))) {
tiles.char["a" + i].gotoAndPlay("dead");
}
i++;
}
l = 0;
while (l < _root["e" + game.currentMap].length) {
if ((enemy["e" + l].dead == 1) || ((enemy["e" + l].hp <= 0) && (enemy["e" + l].dead == 1))) {
tiles.char["e" + l].gotoAndPlay("dead");
}
l++;
}
}
function cutScene() {
var _local2 = _root["cut" + game.currentMap][cutN];
if (cutN < cutL) {
if (_local2.charAt(0) == "m") {
turn = _local2.charAt(1) + _local2.charAt(2);
game.targety = Number(_local2.charAt(4));
game.targetx = Number(_local2.charAt(3));
move = 2;
} else if (_local2.charAt(0) == "p") {
tiles[_local2.charAt(1) + _local2.charAt(2)].gotoAndStop(_local2.charAt(3));
tiles[_local2.charAt(1) + _local2.charAt(2)].char.gotoAndStop(1);
cutN = cutN + 1;
} else if (_local2.charAt(0) == "t") {
tiles._x = (tiles[_local2.charAt(1) + _local2.charAt(2)]._x * -1) + 220;
tiles._y = (tiles[_local2.charAt(1) + _local2.charAt(2)]._y * -1) + 180;
gui.talk.mes.text = _root["mes" + game.currentMap][chatN];
gui.talk._x = tiles[_local2.charAt(1) + _local2.charAt(2)]._x + tiles._x;
gui.talk._y = tiles[_local2.charAt(1) + _local2.charAt(2)]._y + tiles._y;
} else if (_local2.charAt(0) == "w") {
tiles._y = tiles._y * 1.1;
if (tiles._y > 390) {
gui.gotoAndPlay("next");
}
if (tiles._y > 440) {
cutN = cutN + 1;
}
} else if (_local2.charAt(0) == "o") {
gui.gotoAndPlay("objective");
cutN = cutN + 1;
} else if (_local2.charAt(0) == "d") {
tiles._x = (tiles[_local2.charAt(1) + _local2.charAt(2)]._x * -1) + 220;
tiles._y = (tiles[_local2.charAt(1) + _local2.charAt(2)]._y * -1) + 180;
cutN = cutN + 1;
}
}
}
function getTarget() {
if (turn != "") {
if ((move == 1) && (!wait)) {
moveTarget();
} else if (wait) {
waitTarget();
} else if (act == 1) {
attackTarget();
} else if (act == 0) {
setAttack();
} else if (act == 4) {
setAbility();
} else if (act == 5) {
targetAbility();
}
}
}
function speed() {
var _local3 = _root["e" + game.currentMap];
i = 0;
while (i < _local3.length) {
var _local2 = "e" + i;
enemy[_local2].ct = enemy[_local2].ct + enemy[_local2].sp;
if (enemy[_local2].ct >= 100) {
enemy[_local2].ct = 100;
turn = _local2;
enemyTurn = true;
move = 0;
act = 0;
if (enemy[_local2].status.move > 0) {
move = 3;
enemy[_local2].status.move = enemy[_local2].status.move - 1;
}
if (enemy[_local2].status.act > 0) {
enemy[_local2].status.act = enemy[_local2].status.act - 1;
act = 2;
}
break;
}
i++;
}
i = 0;
while (i < a.length) {
var _local2 = "a" + i;
if (ally[_local2].hp > 0) {
ally[_local2].ct = ally[_local2].ct + ally[_local2].sp;
if (ally[_local2].ct > 100) {
ally[_local2].ct = 100;
}
if ((ally[_local2].ct >= 100) && (turn == "")) {
ally[_local2].ct = 100;
wait = false;
turn = _local2;
move = 0;
act = 0;
gui.menu.gotoAndStop(2);
if ((ally[_local2].status.act > 0) && (ally[_local2].status.move > 0)) {
gui.menu.gotoAndStop(5);
} else if (ally[_local2].status.act > 0) {
gui.menu.gotoAndStop(4);
} else if (ally[_local2].status.move > 0) {
gui.menu.gotoAndStop(3);
}
if (ally[_local2].status.move > 0) {
move = 3;
ally[_local2].status.move = ally[_local2].status.move - 1;
}
if (ally[_local2].status.act > 0) {
act = 2;
ally[_local2].status.act = ally[_local2].status.act - 1;
}
break;
}
}
i++;
}
tiles[turn].tu.gotoAndPlay(2);
}
function node(y, x, f) {
var _local3 = 0;
if (game[(("t_" + x) + "_") + y].walkable) {
if (game[(("t_" + x) + "_") + y].height != undefined) {
if (game[(("t_" + ally[turn].yt) + "_") + ally[turn].xt].height != undefined) {
_local3 = game[(("t_" + ally[turn].yt) + "_") + ally[turn].xt].height / 10;
}
if (((game[(("t_" + x) + "_") + y].height / 10) - (ally[turn].j + _local3)) <= 1) {
tiles[(("t_" + x) + "_") + y].walk.gotoAndStop(f);
}
} else {
tiles.back[(("t_" + x) + "_") + y].walk.gotoAndStop(f);
}
}
}
function enemyNode(y, x, f) {
var _local3 = 0;
if (game[(("t_" + x) + "_") + y].walkable) {
if (game[(("t_" + x) + "_") + y].height != undefined) {
if (game[(("t_" + enemy[turn].yt) + "_") + enemy[turn].xt].height != undefined) {
_local3 = game[(("t_" + enemy[turn].yt) + "_") + enemy[turn].xt].height / 10;
}
if (((game[(("t_" + x) + "_") + y].height / 10) - (enemy[turn].j + _local3)) < 1) {
if ((tiles[(("t_" + x) + "_") + y].walk._currentframe == 1) || (tiles[(("t_" + x) + "_") + y].walk._currentframe == f)) {
tiles[(("t_" + x) + "_") + y].walk.gotoAndStop(f);
} else {
tiles[(("t_" + x) + "_") + y].walk.gotoAndStop(9);
}
}
} else if ((tiles.back[(("t_" + x) + "_") + y].walk._currentframe == 1) || (tiles.back[(("t_" + x) + "_") + y].walk._currentframe == f)) {
tiles.back[(("t_" + x) + "_") + y].walk.gotoAndStop(f);
} else {
tiles.back[(("t_" + x) + "_") + y].walk.gotoAndStop(9);
}
}
}
function moveChar() {
var _local2 = tiles;
if (ally[turn].ct == 100) {
_local2 = ally[turn];
} else if (enemy[turn].ct == 100) {
_local2 = enemy[turn];
} else if (_root["cut" + game.currentMap][cutN].charAt(1) == "a") {
_local2 = ally[turn];
} else if (_root["cut" + game.currentMap][cutN].charAt(1) == "e") {
_local2 = enemy[turn];
}
if ((_root["cut" + game.currentMap][cutN].charAt(1) == "e") && (cs)) {
i = 0;
while (i < en.length) {
var _local3 = "e" + i;
tiles[_local3].char.head.gotoAndStop(2);
tiles[_local3].char.arm.gotoAndStop(2);
tiles[_local3].char.arm2.gotoAndStop(2);
tiles[_local3].char.body.gotoAndStop(2);
i++;
}
}
if (((_local2.x % game.tile) == 0) && ((_local2.y % game.tile) == 0)) {
gui.menu.gotoAndStop(1);
dirx = 0;
diry = 0;
_local2.xt = Math.floor(_local2.x / game.tile);
_local2.yt = Math.floor(_local2.y / game.tile);
if (game.targetx > _local2.xt) {
dirx = 1;
} else if (game.targetx < _local2.xt) {
dirx = -1;
} else if (game.targety > _local2.yt) {
diry = 1;
} else if (game.targety < _local2.yt) {
diry = -1;
} else {
move = 3;
if (enemyTurn && (enemy[turn].status.act == 0)) {
act = 0;
}
tiles[turn].gotoAndStop(endd);
if (ally[turn].ct == 100) {
if (act == 0) {
gui.menu.gotoAndStop(3);
} else {
gui.menu.gotoAndStop(5);
}
} else if (cs) {
cutN = cutN + 1;
}
}
}
_local2.y = _local2.y + (game.sp * diry);
_local2.x = _local2.x + (game.sp * dirx);
_local2.xiso = _local2.x - _local2.y;
_local2.yiso = (_local2.x + _local2.y) / 2;
_local2.depth = ((((((_local2.y / 40) + (_local2.x / 40)) * game.tile) / 2) * 304) + (((_local2.y / 40) - (_local2.x / 40)) * game.tile)) + 4;
tiles[turn].swapDepths(_local2.depth);
tiles[turn]._x = _local2.xiso;
tiles[turn]._y = _local2.yiso;
if (move == 2) {
tiles[turn].gotoAndStop((dirx + (diry * 2)) + 3);
var endd = ((dirx + (diry * 2)) + 3);
}
if (game[(("t_" + (_local2.yt + diry)) + "_") + (_local2.xt + dirx)].height != undefined) {
tiles[turn]._y = tiles[turn]._y - game[(("t_" + (_local2.yt + diry)) + "_") + (_local2.xt + dirx)].height;
}
}
function checkDeath(targ, info) {
var _local2 = 0;
var _local4 = 0;
if (targ.hp <= 0) {
info.char.gotoAndPlay("dead");
targ.hp = 0;
if (!enemyTurn) {
game.count = game.count + 35;
} else {
game.count = game.count - 20;
}
ac.attachSound("die");
ac.start(0, 1);
info.char.gotoAndPlay("dead");
targ.dead = 1;
targ.status.move = 0;
targ.status.act = 0;
targ.status.poison = 0;
targ.status.slow = 0;
targ.status.regen = 0;
n = 0;
while (n < _root["a" + game.currentMap].length) {
if (ally["a" + n].hp <= 0) {
_local4 = _local4 + 1;
}
n++;
}
if (_local4 == _root["a" + game.currentMap].length) {
gui.gotoAndPlay("lose");
turn = "sd";
}
i = 0;
while (i < _root["e" + game.currentMap].length) {
if (enemy["e" + i].hp == 0) {
_local2 = _local2 + 1;
}
i++;
}
if (_local2 == _root["e" + game.currentMap].length) {
gui.gotoAndPlay("win");
turn = "sd";
}
if (targ.job == _root["cond" + game.currentMap]) {
game.count = game.count + 100;
turn = "sd";
gui.gotoAndPlay("win");
}
info.char.gotoAndPlay("dead");
}
}
function enemyAi() {
var _local1 = enemy[turn];
if (move == 0) {
enemyMove();
} else if ((act == 0) && (move == 3)) {
enemyAttack();
} else if ((move == 3) && (act == 2)) {
if (_local1.status.poison > 0) {
_local1.status.poison = _local1.status.poison - 1;
damage = Math.floor(_local1.hpM / 5);
_local1.hp = _local1.hp - damage;
tiles[turn].turn.gotoAndPlay("num");
tiles[turn].turn.hit.k.htmlText = ("<font color='#00CC66'>" + damage) + "</font>";
checkDeath(enemy[turn], tiles[turn]);
} else if (_local1.status.regen > 0) {
_local1.status.regen = _local1.status.regen - 1;
damage = Math.floor(_local1.hpM / 5);
_local1.hp = _local1.hp + damage;
if (_local1.hp > _local1.hpM) {
_local1.hp = _local1.hpM;
}
tiles[turn].turn.gotoAndPlay("num");
tiles[turn].turn.hit.k.htmlText = ("<font color='#0000CC'>" + damage) + "</font>";
}
if (_local1.status.slow > 0) {
_local1.status.slow = _local1.status.slow - 1;
if (_local1.status.slow == 0) {
_local1.sp = _local1.sp + 3;
}
}
tiles[turn].tu.gotoAndStop(1);
enemy[turn].ct = 0;
turn = "";
enemyTurn = false;
}
}
function enemyTurnAI() {
var _local1 = enemy[turn];
tiles[turn].char.head.gotoAndStop(2);
tiles[turn].char.arm.gotoAndStop(2);
tiles[turn].char.arm2.gotoAndStop(2);
tiles[turn].char.body.gotoAndStop(2);
if (_local1.ct == 100) {
if (_local1.hp != 0) {
enemyAi();
} else {
_local1.ct = 0;
tiles[turn].tu.gotoAndStop(1);
turn = "";
enemyTurn = false;
}
}
}
function tileCheck(x, y, con) {
var _local2 = true;
var _local5 = false;
var _local6 = false;
if (con == "both") {
_local5 = true;
_local6 = true;
} else if (con == "enemy") {
_local5 = true;
} else if (con == "ally") {
_local6 = true;
}
if (_local5) {
t = 0;
while (t < _root["e" + game.currentMap].length) {
if ((enemy["e" + t].xt == x) && (enemy["e" + t].yt == y)) {
_local2 = false;
_root.enemyTarg = t;
break;
}
t++;
}
}
if (_local6) {
w = 0;
while (w < _root["a" + game.currentMap].length) {
if ((ally["a" + w].xt == x) && (ally["a" + w].yt == y)) {
_local2 = false;
_root.allyTarg = w;
break;
}
w++;
}
}
return(_local2);
}
function enemyMove() {
var _local8 = false;
var _local7 = enemy[turn];
var _local9 = 0;
var _local6 = enemy[turn].m + 1;
var _local4 = _local7.r;
if (((_local7.job == "Alchemist") || (_local7.job == "Healer")) || (_local7.job == "Drummer")) {
_local9 = 2;
_local6 = _local6 - 1;
t = 0;
while (t < _root["e" + game.currentMap].length) {
var _local2 = enemy["e" + t];
if ((_local2.hp <= Math.floor(_local2.hpM * 0.6)) && (_local2.hp > 0)) {
p = 1;
while (p < _local4) {
i = 0;
while (i < _local4) {
var _local5 = _local4 - p;
enemyNode(_local2.xt - p, (_local2.yt - i) + _local5, 7);
enemyNode(_local2.xt + p, (_local2.yt + i) - _local5, 7);
enemyNode((_local2.xt - i) + _local5, _local2.yt + p, 7);
enemyNode((_local2.xt + i) - _local5, _local2.yt - p, 7);
enemyNode((_local2.xt - p) - 1, _local2.yt, 7);
enemyNode((_local2.xt + p) + 1, _local2.yt, 7);
enemyNode(_local2.xt, (_local2.yt + p) + 1, 7);
enemyNode(_local2.xt, (_local2.yt - p) - 1, 7);
i++;
}
p++;
}
}
t++;
}
} else if ((((_local7.job == "Archer") || (_local7.job == "Sorcerer")) || (_local7.job == "Noble")) || (_local7.job == "King")) {
_local9 = 1;
_local6 = _local6 - 1;
t = 0;
while (t < a.length) {
var _local2 = ally["a" + t];
if (_local2.hp > 0) {
p = 1;
while (p < _local4) {
i = 0;
while (i < _local4) {
var _local5 = _local4 - p;
enemyNode(_local2.xt - p, (_local2.yt - i) + _local5, 7);
enemyNode(_local2.xt + p, (_local2.yt + i) - _local5, 7);
enemyNode((_local2.xt - i) + _local5, _local2.yt + p, 7);
enemyNode((_local2.xt + i) - _local5, _local2.yt - p, 7);
enemyNode((_local2.xt - p) - 1, _local2.yt, 7);
enemyNode((_local2.xt + p) + 1, _local2.yt, 7);
enemyNode(_local2.xt, (_local2.yt + p) + 1, 7);
enemyNode(_local2.xt, (_local2.yt - p) - 1, 7);
i++;
}
p++;
}
}
t++;
}
}
p = 1;
while (p < _local6) {
i = 0;
while (i < _local6) {
var _local5 = _local6 - p;
enemyNode(enemy[turn].xt - p, (enemy[turn].yt - i) + _local5, 8);
enemyNode(enemy[turn].xt + p, (enemy[turn].yt + i) - _local5, 8);
enemyNode((enemy[turn].xt - i) + _local5, enemy[turn].yt + p, 8);
enemyNode((enemy[turn].xt + i) - _local5, enemy[turn].yt - p, 8);
enemyNode((enemy[turn].xt - p) - 1, enemy[turn].yt, 8);
enemyNode((enemy[turn].xt + p) + 1, enemy[turn].yt, 8);
enemyNode(enemy[turn].xt, (enemy[turn].yt + p) + 1, 8);
enemyNode(enemy[turn].xt, (enemy[turn].yt - p) - 1, 8);
i++;
}
p++;
}
if (enemy[turn].status.act == 0) {
if (_local9 == 0) {
i = 0;
while (i < a.length) {
var _local3 = ally["a" + i];
if (((tiles[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 8) && (_local3.hp > 0)) || ((tiles.back[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 8) && (_local3.hp > 0))) {
_local8 = true;
if ((tileCheck(_local3.xt + 1, _local3.yt, "both") && (tiles[(("t_" + _local3.yt) + "_") + (_local3.xt + 1)].walk._currentframe == 8)) || (tileCheck(_local3.xt + 1, _local3.yt, "both") && (tiles.back[(("t_" + _local3.yt) + "_") + (_local3.xt + 1)].walk._currentframe == 8))) {
game.targetx = _local3.xt + 1;
game.targety = _local3.yt;
} else if ((tileCheck(_local3.xt, _local3.yt - 1, "both") && (tiles[(("t_" + (_local3.yt - 1)) + "_") + _local3.xt].walk._currentframe == 8)) || (tileCheck(_local3.xt, _local3.yt - 1, "both") && (tiles.back[(("t_" + (_local3.yt - 1)) + "_") + _local3.xt].walk._currentframe == 8))) {
game.targetx = _local3.xt;
game.targety = _local3.yt - 1;
} else if ((tileCheck(_local3.xt, _local3.yt + 1, "both") && (tiles[(("t_" + (_local3.yt + 1)) + "_") + _local3.xt].walk._currentframe == 8)) || (tileCheck(_local3.xt, _local3.yt + 1, "both") && (tiles.back[(("t_" + (_local3.yt + 1)) + "_") + _local3.xt].walk._currentframe == 8))) {
game.targetx = _local3.xt;
game.targety = _local3.yt + 1;
} else if ((tilesCheck(_local3.xt - 1, _local3.yt, "both") && (tiles[(("t_" + _local3.yt) + "_") + (_local3.xt - 1)].walk._currentframe == 8)) || (tilesCheck(_local3.xt - 1, _local3.yt, "both") && (tiles.back[(("t_" + _local3.yt) + "_") + (_local3.xt - 1)].walk._currentframe == 8))) {
game.targetx = _local3.xt - 1;
game.targety = _local3.yt;
} else {
blankWalk(_local7, 0);
}
break;
}
i++;
}
} else if (_local9 == 1) {
_local8 = true;
if (readMap()) {
game.targetx = mapTargetx;
game.targety = mapTargety;
} else {
blankWalk(_local7, 1);
}
} else if (_local9 == 2) {
_local8 = true;
if (readMap()) {
game.targetx = mapTargetx;
game.targety = mapTargety;
} else {
blankWalk(_local7, 2);
}
}
}
if (!_local8) {
blankWalk(_local7, 0);
}
move = 2;
clearMap();
}
function enemyAttack() {
var _local3 = enemy[turn];
var _local2 = _root["jobs" + game.currentMap][_local3.job.toLowerCase()];
switch (_local3.job) {
case "Alchemist" :
if (returnValue(_local2, "Super Potion")) {
enemyAbility("Super Potion", 1, 1);
} else {
enemyAbility("Potion", 1, 1);
}
break;
case "Healer" :
if (returnValue(_local2, "Heal 2") && (enemy[turn].mp >= 11)) {
enemyAbility("Heal 2", 1, 2);
} else if (enemy[turn].mp >= 6) {
enemyAbility("Heal", 1, 2);
} else {
enemySwing();
}
break;
case "Robber" :
if (returnValue(_local2, "Life Steal") && (_local3.hp <= (_local3.hpM * 0.7))) {
enemyAbility("Life Steal", 0, 0);
} else {
enemySwing();
}
break;
case "Squire" :
enemySwing(_local3);
break;
case "Knight" :
if (returnValue(_local2, "Head Break") && (random(3) == 1)) {
enemyAbility("Head Break", 0, 0);
} else {
enemySwing();
}
break;
case "Noble" :
enemyAbility("Knight's Sword", 1, 0);
break;
case "King" :
enemyAbility("King's Sword", 1, 0);
break;
case "Drummer" :
enemyAbility("Life Song", 2, 2);
break;
case "Spearman" :
if (returnValue(_local2, "Thrust")) {
enemyAbility("Thrust", 0, 0);
} else {
enemySwing();
}
break;
case "Sorcerer" :
if (returnValue(_local2, "Fire 3") && (enemy[turn].mp >= 11)) {
enemyAbility("Fire 3", 1, 3);
} else if (returnValue(_local2, "Fire 2") && (enemy[turn].mp >= 9)) {
enemyAbility("Fire 2", 1, 3);
} else if (enemy[turn].mp >= 6) {
enemyAbility("Fire", 1, 3);
} else {
enemySwing();
}
break;
case "Archer" :
if (returnValue(_local2, "Fire Shot")) {
enemyAbility("Fire Shot", 1, 0);
} else {
enemyAbility("Bow Shot", 1, 0);
}
}
}
function enemyAbility(ab, ty, tar) {
var _local2 = enemy[turn];
if (act != 1) {
var _local7 = 0;
_root.effect = "";
var _local9 = 0;
var _local8 = "";
_root.cure = 0;
if (ty == 0) {
enemyNode(_local2.xt + 1, _local2.yt, 7);
enemyNode(_local2.xt - 1, _local2.yt, 7);
enemyNode(_local2.xt, _local2.yt - 1, 7);
enemyNode(_local2.xt, _local2.yt + 1, 7);
} else if (ty == 1) {
var _local6 = _local2.r;
p = 1;
while (p < _local6) {
i = 0;
while (i < _local6) {
var _local4 = _local6 - p;
enemyNode(_local2.xt - p, (_local2.yt - i) + _local4, 7);
enemyNode(_local2.xt + p, (_local2.yt + i) - _local4, 7);
enemyNode((_local2.xt - i) + _local4, _local2.yt + p, 7);
enemyNode((_local2.xt + i) - _local4, _local2.yt - p, 7);
enemyNode((_local2.xt - p) - 1, _local2.yt, 7);
enemyNode((_local2.xt + p) + 1, _local2.yt, 7);
enemyNode(_local2.xt, (_local2.yt + p) + 1, 7);
enemyNode(_local2.xt, (_local2.yt - p) - 1, 7);
i++;
}
p++;
}
enemyNode(_local2.xt, _local2.yt, 7);
} else if (ty == 2) {
enemyNode(_local2.xt + 1, _local2.yt, 7);
enemyNode(_local2.xt - 1, _local2.yt, 7);
enemyNode(_local2.xt, _local2.yt - 1, 7);
enemyNode(_local2.xt, _local2.yt + 1, 7);
enemyNode(_local2.xt, _local2.yt, 7);
}
if (tar == 0) {
z = 0;
while (z < _root["a" + game.currentMap].length) {
var _local3 = ally["a" + z];
if (_local3.hp > 0) {
if ((tiles[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 7) || (tiles.back[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 7)) {
allyTarg = z;
_local7 = 1;
break;
}
}
z++;
}
switch (ab) {
case "Bow Shot" :
acc = 100 - ally["a" + allyTarg].eva;
_local8 = "bow";
damage = _local2.atk;
break;
case "Fire Shot" :
acc = 75;
_local8 = "bow";
damage = Math.floor(_local2.atk * 1.7);
anim = "fire";
break;
case "Head Break" :
_local8 = "swing";
damage = Math.floor(_local2.atk / 2);
acc = 80;
effect = "hp";
break;
case "Knight's Sword" :
_local8 = "swing";
acc = 100;
damage = 44;
anim = "Knight's Sword";
break;
case "King's Sword" :
_local8 = "swing";
acc = 100;
damage = 55;
anim = "King's sword";
break;
case "Life Steal" :
_local8 = "steal";
steal = "hp";
acc = 80;
damage = 25;
break;
case "Thrust" :
_local8 = "Thrust";
damage = _local2.atk;
acc = 75;
}
_root.targA = tiles["a" + allyTarg];
_root.targP = ally["a" + allyTarg];
if (targP.yt > _local2.yt) {
tiles[turn].gotoAndStop(5);
} else if (targP.yt < _local2.yt) {
tiles[turn].gotoAndStop(1);
} else if (targP.xt > _local2.xt) {
tiles[turn].gotoAndStop(4);
} else if (_local7 == 1) {
tiles[turn].gotoAndStop(3);
}
} else if (tar == 1) {
i = 0;
while (i < _root["e" + game.currentMap].length) {
var _local5 = enemy["e" + i];
if ((_local5.hp <= Math.floor(_local5.hpM * 0.6)) && (_local5.hp > 0)) {
if ((tiles[(("t_" + _local5.yt) + "_") + _local5.xt].walk._currentframe == 7) || (tiles.back[(("t_" + _local5.yt) + "_") + _local5.xt].walk._currentframe == 7)) {
_root.enemyTarg = i;
_local7 = 1;
break;
}
}
i++;
}
switch (ab) {
case "Potion" :
cure = 30;
break;
case "Super Potion" :
cure = 45;
}
_root.cureType = 0;
_local8 = "potion";
_root.anim = "potion";
if (enemy["e" + enemyTarg].yt > _local2.yt) {
tiles[turn].gotoAndStop(5);
} else if (enemy["e" + enemyTarg].yt < _local2.yt) {
tiles[turn].gotoAndStop(1);
} else if (enemy["e" + enemyTarg].xt > _local2.xt) {
tiles[turn].gotoAndStop(4);
} else if (_local7 == 1) {
tiles[turn].gotoAndStop(3);
}
} else if (tar == 2) {
hitAl = [];
z = 0;
while (z < a.length) {
var _local3 = enemy["e" + z];
if (((_local3.hp > 0) && (_local3.hp <= (_local3.hpM * 0.7))) || (enemy[turn].job == "Drummer")) {
if ((tiles[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 7) || (tiles.back[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 7)) {
_local7 = 1;
hitAl.push(z);
if (!tileCheck(_local3.xt + 1, _local3.yt, "enemy")) {
if ((enemy["e" + enemyTarg].hp > 0) || (enemy[turn].job == "Drummer")) {
hitAl.push(enemyTarg);
}
}
if (!tileCheck(_local3.xt - 1, _local3.yt, "enemy")) {
if ((enemy["e" + enemyTarg].hp > 0) || (enemy[turn].job == "Drummer")) {
hitAl.push(enemyTarg);
}
}
if (!tileCheck(_local3.xt, _local3.yt - 1, "enemy")) {
if ((enemy["e" + enemyTarg].hp > 0) || (enemy[turn].job == "Drummer")) {
hitAl.push(enemyTarg);
}
}
if (!tileCheck(_local3.xt, _local3.yt + 1, "enemy")) {
if ((enemy["e" + enemyTarg].hp > 0) || (enemy[turn].job == "Drummer")) {
hitAl.push(enemyTarg);
}
}
break;
}
}
z++;
}
switch (ab) {
case "Heal 2" :
cure = 65;
_local9 = 11;
case "Heal" :
cure = 45;
_local9 = 6;
break;
case "Life Song" :
cure = 25;
anim = "song";
effect = "hp";
}
_local8 = "cast";
} else if (tar == 3) {
hitEn = [];
z = 0;
while (z < a.length) {
var _local3 = ally["a" + z];
if (_local3.hp > 0) {
if ((tiles[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 7) || (tiles.back[(("t_" + _local3.yt) + "_") + _local3.xt].walk._currentframe == 7)) {
hitEn.push(z);
_local7 = 1;
if (!tileCheck(_local3.xt + 1, _local3.yt, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
hitEn.push(allyTarg);
}
}
if (!tileCheck(_local3.xt - 1, _local3.yt, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
hitEn.push(allyTarg);
}
}
if (!tileCheck(_local3.xt, _local3.yt - 1, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
hitEn.push(allyTarg);
}
}
if (!tileCheck(_local3.xt, _local3.yt + 1, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
hitEn.push(allyTarg);
}
}
break;
}
}
z++;
}
switch (ab) {
case "Fire" :
damage = _local2.atk;
_local9 = 6;
case "Fire 2" :
damage = Math.floor(_local2.atk * 1.6);
_local9 = 9;
break;
case "Fire 3" :
damage = Math.floor(_local2.atk * 2.1);
_local9 = 11;
}
_local8 = "cast";
}
}
if (_local7 == 1) {
_root.abi = ab;
enemy[turn].mp = enemy[turn].mp - _local9;
gui.ability.gotoAndPlay(2);
gui.ability.te.text = ab;
tiles[turn].char.gotoAndPlay(_local8);
act = 1;
var _local7 = 2;
} else if (_local7 == 0) {
anim = "";
act = 2;
}
}
function enemySwing() {
var _local2 = enemy[turn];
var _local5 = 0;
var _local4 = _local2.xt;
var _local3 = _local2.yt;
roll = 100;
if ((!tileCheck(_local2.xt + 1, _local2.yt, "ally")) && (ally["a" + allyTarg].hp > 0)) {
var _local6 = tiles["a" + allyTarg];
if ((_local6._currentframe == 2) || (_local6._currentframe == 3)) {
roll = 100;
} else if ((_local6._currentframe == 1) || (_local6._currentframe == 5)) {
roll = 90;
} else {
roll = 80;
}
_local5 = 4;
_local4 = _local4 + 1;
} else if ((!tileCheck(_local2.xt, _local2.yt + 1, "ally")) && (ally["a" + allyTarg].hp > 0)) {
var _local6 = tiles["a" + allyTarg];
if (((_local6._currentframe == 2) || (_local6._currentframe == 3)) || (_local6._currentframe == 4)) {
roll = 90;
} else if (_local6._currentframe == 5) {
roll = 100;
} else {
roll = 80;
}
_local5 = 5;
_local3 = _local3 + 1;
} else if ((!tileCheck(_local2.xt - 1, _local2.yt, "ally")) && (ally["a" + allyTarg].hp > 0)) {
var _local6 = tiles["a" + allyTarg];
if ((_local6._currentframe == 2) || (_local6._currentframe == 3)) {
roll = 80;
} else if ((_local6._currentframe == 1) || (_local6._currentframe == 5)) {
roll = 90;
} else {
roll = 100;
}
_local5 = 2;
_local4 = _local4 - 1;
} else if ((!tileCheck(_local2.xt, _local2.yt - 1, "ally")) && (ally["a" + allyTarg].hp > 0)) {
var _local6 = tiles["a" + allyTarg];
if (((_local6._currentframe == 2) || (_local6._currentframe == 3)) || (_local6._currentframe == 4)) {
roll = 90;
} else if (a._currentframe == 1) {
roll = 100;
} else {
roll = 80;
}
_local5 = 1;
_local3 = _local3 - 1;
}
if (_local5 > 0) {
tiles[turn].gotoAndStop(_local5);
tiles[turn].char.gotoAndPlay("swing");
effect = "";
i = 0;
while (i < a.length) {
if ((_local3 == ally["a" + i].yt) && (ally["a" + i].xt == _local4)) {
_root.targA = tiles["a" + i];
_root.targP = ally["a" + i];
acc = roll - ally["a" + i].eva;
damage = _local2.atk;
break;
}
i++;
}
}
act = 2;
}
function readMap() {
var _local2 = false;
i = 0;
while (i < _root["map" + game.currentMap].length) {
p = 0;
while (p < _root["map" + game.currentMap][0].length) {
if (((tiles[(("t_" + i) + "_") + p].walk._currentframe == 9) && (tileCheck(p, i, "both"))) || ((tiles.back[(("t_" + i) + "_") + p].walk._currentframe == 9) && (tileCheck(p, i, "both")))) {
_local2 = true;
mapTargetx = p;
mapTargety = i;
break;
}
p++;
}
i++;
}
return(_local2);
}
function blankWalk(ob, movement) {
var _local5 = random(a.length);
var _local2 = 0;
if (movement == 0) {
_local2 = random(ob.m) + 1;
} else if (movement == 1) {
_local2 = random(ob.m - 1) + 1;
} else if (movement == 2) {
_local2 = random(ob.m - 2) + 1;
}
if (ally["a" + _local5].hp > 0) {
var _local3 = ally["a" + _local5];
if ((movement == 0) || (movement == 1)) {
if (((_local3.xt < ob.xt) && (tileCheck(ob.xt - _local2, ob.yt, "both"))) && (game[(("t_" + ob.yt) + "_") + (ob.xt - _local2)].walkable)) {
game.targetx = ob.xt - _local2;
game.targety = ob.yt;
} else if (((_local3.xt > ob.xt) && (tileCheck(ob.xt + _local2, ob.yt, "both"))) && (game[(("t_" + ob.yt) + "_") + (ob.xt + _local2)].walkable)) {
game.targetx = ob.xt + _local2;
game.targety = ob.yt;
} else if (((_local3.yt < ob.yt) && (tileCheck(ob.xt, ob.yt - _local2, "both"))) && (game[(("t_" + (ob.yt - _local2)) + "_") + ob.xt].walkable)) {
game.targetx = ob.xt;
game.targety = ob.yt - _local2;
} else if (((_local3.yt > ob.yt) && (tileCheck(ob.xt, ob.yt + _local2, "both"))) && (game[(("t_" + (ob.yt + _local2)) + "_") + ob.xt].walkable)) {
game.targetx = ob.xt;
game.targety = ob.yt + _local2;
} else {
game.targetx = ob.xt;
game.targety = ob.yt;
}
} else if (movement == 2) {
if (((_local3.xt < ob.xt) && (tileCheck(ob.xt + _local2, ob.yt, "both"))) && (game[(("t_" + ob.yt) + "_") + (ob.xt + _local2)].walkable)) {
game.targetx = ob.xt + _local2;
game.targety = ob.yt;
} else if (((_local3.xt > ob.xt) && (tileCheck(ob.xt - _local2, ob.yt, "both"))) && (game[(("t_" + ob.yt) + "_") + (ob.xt - _local2)].walkable)) {
game.targetx = ob.xt - _local2;
game.targety = ob.yt;
} else if (((_local3.yt < ob.yt) && (tileCheck(ob.xt, ob.yt + _local2, "both"))) && (game[(("t_" + (ob.yt + _local2)) + "_") + ob.xt].walkable)) {
game.targetx = ob.xt;
game.targety = ob.yt + _local2;
} else if (((_local3.yt > ob.yt) && (tileCheck(ob.xt, ob.yt - _local2, "both"))) && (game[(("t_" + (ob.yt - _local2)) + "_") + ob.xt].walkable)) {
game.targetx = ob.xt;
game.targety = ob.yt - _local2;
} else {
game.targetx = ob.xt;
game.targety = ob.yt;
}
}
} else {
game.targetx = ob.xt;
game.targety = ob.yt;
}
act = 2;
}
function returnValue(info, targ) {
i = 0;
while (i < info.length) {
if (info[i] == targ) {
return(true);
}
i++;
}
return(false);
}
function walk() {
gui.ability.gotoAndStop("move");
move = 1;
var _local1 = ally[turn].m;
p = 0;
while (p < _local1) {
i = 0;
while (i < _local1) {
k = _local1 - p;
node(ally[turn].xt - p, (ally[turn].yt - i) + k, 2);
node(ally[turn].xt + p, (ally[turn].yt + i) - k, 2);
node((ally[turn].xt - i) + k, ally[turn].yt + p, 2);
node((ally[turn].xt + i) - k, ally[turn].yt - p, 2);
node((ally[turn].xt - p) - 1, ally[turn].yt, 2);
node((ally[turn].xt + p) + 1, ally[turn].yt, 2);
node(ally[turn].xt, (ally[turn].yt + p) + 1, 2);
node(ally[turn].xt, (ally[turn].yt - p) - 1, 2);
i++;
}
p++;
}
}
function attack() {
gui.ability.gotoAndStop("attack");
var _local1 = ally[turn];
node(_local1.xt, _local1.yt + 1, 3);
node(_local1.xt, _local1.yt - 1, 3);
node(_local1.xt - 1, _local1.yt, 3);
node(_local1.xt + 1, _local1.yt, 3);
}
function ability() {
gui.menu.ability_menu.gotoAndStop(2);
i = 0;
while (i < 5) {
if (jobs[ally[turn].job.toLowerCase()][i] != undefined) {
gui.menu.ability_menu["a" + i].text = jobs[ally[turn].job.toLowerCase()][i];
}
i++;
}
}
function showDamage() {
var _local3 = _root.targA;
var _local2 = _root.targP;
if (_local2.hp > 0) {
_local3.turn.gotoAndPlay("num");
if ((random(100) + 1) < acc) {
_local3.char.gotoAndPlay("hit");
if (steal == "") {
if (effect == "mp") {
_local2.mp = _local2.mp - damage;
} else if (effect == "hp") {
_local2.hpM = _local2.hpM - damage;
if (_local2.hpM < 45) {
_local2.hpM = 45;
}
if (_local2.hp > _local2.hpM) {
_local2.hp = _local2.hpM;
}
} else {
_local2.hp = _local2.hp - damage;
}
ac.attachSound("hit");
ac.start(0, 1);
_local3.turn.hit.k.htmlText = ("<font color='#FFFFFF'>" + damage) + "</font>";
if (effect != "") {
if (((effect != "hp") && (effect != "mp")) && (effect != "atk")) {
_local2.status[effect] = 3;
} else if (effect == "atk") {
_local2.atk = _local2.atk - 4;
}
}
if (anim != "") {
_local3.effects.gotoAndPlay(anim);
}
} else {
_local3.turn.hit.k.htmlText = "<font color='#000000'>Steal</font>";
ac.attachSound("hit");
ac.start(0, 1);
if ((_local2[steal] - damage) > 0) {
_local2[steal] = _local2[steal] - damage;
}
if (enemyTurn == true) {
enemy[turn][steal] = enemy[turn][steal] + damage;
} else {
ally[turn][steal] = ally[turn][steal] + damage;
if (ally[turn].hp > ally[turn].hpM) {
ally[turn].hp = ally[turn].hpM;
}
if (ally[turn].mp > ally[turn].mpM) {
ally[turn].mp;
}
}
}
checkDeath(_local2, _local3);
} else {
_local3.char.gotoAndPlay("miss");
ac.attachSound("avoid");
ac.start(0, 1);
_local3.turn.hit.k.htmlText = "<font color='#003300'>Miss!</font>";
_local3.char.gotoAndPlay("miss");
}
}
anim = "";
effect = "";
steal = "";
if (enemyTurn) {
act = 2;
}
}
function showMultiple() {
if (!enemyTurn) {
game.count = game.count + (5 * hitEn.length);
}
i = 0;
while (i < hitEn.length) {
if (!enemyTurn) {
var _local3 = enemy["e" + hitEn[i]];
var _local2 = tiles["e" + hitEn[i]];
} else {
acc = 100;
effect = "";
var _local3 = ally["a" + hitEn[i]];
var _local2 = tiles["a" + hitEn[i]];
act = 2;
}
_local2.turn.gotoAndPlay("num");
if ((random(100) + 1) <= acc) {
if ((_root.abi == "Polearm Spin") || (_root.abi == "Spear Swing")) {
_root.ac.attachSound("hit");
_root.ac.start(0, 1);
}
_local2.char.gotoAndPlay("hit");
_local2.effects.gotoAndPlay(abi);
if (effect == "") {
_local2.turn.hit.k.htmlText = ("<font color='#CC0000'>" + damage) + "</font>";
_local3.hp = _local3.hp - damage;
} else {
_local2.turn.hit.k.htmlText = ("<font color='#FFFFFF'>" + effect) + "</font>";
_local3.status[effect] = 3;
if (effect == "slow") {
_local3.sp = _local3.sp - 3;
}
}
checkDeath(_local3, _local2);
} else {
_root.ac.attachSound("avoid");
_root.ac.start(0, 1);
_local2.char.gotoAndPlay("miss");
_local2.turn.hit.k.htmlText = "<font color='#003300'>Miss!</font>";
}
i++;
}
}
function showMultipleCure() {
if (!enemyTurn) {
game.count = game.count + (5 * hitAl.length);
}
i = 0;
while (i < hitAl.length) {
if (enemyTurn) {
var _local1 = enemy["e" + hitAl[i]];
var _local2 = tiles["e" + hitAl[i]];
acc = 100;
if (enemy[turn].job != "Drummer") {
effect = "";
}
act = 2;
} else {
var _local1 = ally["a" + hitAl[i]];
var _local2 = tiles["a" + hitAl[i]];
}
_local2.turn.gotoAndPlay("num");
if ((random(100) + 1) <= acc) {
if (anim != "") {
_local2.effects.gotoAndPlay(anim);
} else if ((ally[turn].job == "Healer") || (enemy[turn].job == "Healer")) {
_local2.effects.gotoAndPlay("Share");
} else {
_local2.effects.gotoAndPlay(abi);
}
if (effect == "") {
_local2.turn.hit.k.htmlText = ("<font color='#00CCFF'>" + cure) + "</font>";
_local1.hp = _local1.hp + cure;
if (_local1.hp > _local1.hpM) {
_local1.hp = _local1.hpM;
}
} else {
_local2.turn.hit.k.htmlText = ("<font color='#FFFF00'>" + effect) + "</font>";
if ((ally[turn].job == "Drummer") || (enemy[turn].job == "Drummer")) {
if ((effect == "hp") || (effect == "mp")) {
if (((_local1[effect] + cure) > _local1[effect + "M"]) && ((_local1[effect] + cure) < 180)) {
_local1[effect + "M"] = _local1[effect] + cure;
}
}
if (_local1.hp == 0) {
_local2.char.gotoAndPlay(1);
}
_local1[effect] = _local1[effect] + cure;
} else {
_local1.status[effect] = 3;
}
}
} else {
ac.attachSound("avoid");
ac.start(0, 1);
_local2.turn.hit.k.htmlText = "<font color='#003300'>Miss!</font>";
}
i++;
}
anim = "";
effect = "";
}
function showCure() {
if (!enemyTurn) {
var _local1 = ally["a" + allyTarg];
var _local2 = tiles["a" + allyTarg];
} else {
var _local1 = enemy["e" + enemyTarg];
var _local2 = tiles["e" + enemyTarg];
act = 2;
}
_local2.turn.gotoAndPlay("num");
if ((cureType == 0) || (abi == "Life")) {
_local2.turn.hit.k.htmlText = ("<font color='#00CCFF'>" + cure) + "</font>";
_local1.hp = _local1.hp + cure;
if (_local1.hp > _local1.hpM) {
_local1.hp = _local1.hpM;
}
if ((_local1.hp - cure) == 0) {
_local2.char.gotoAndPlay(1);
}
} else if (cureType == 1) {
_local2.turn.hit.k.htmlText = ("<font color='#0000CC'>" + cure) + "</font>";
_local1.mp = _local1.mp + cure;
if (_local1.mp > _local1.mpM) {
_local1.mp = _local1.mpM;
}
} else {
_local2.turn.hit.k.htmlText = "<font color='#0000CC'>Removed</font>";
_local1.status.poison = 0;
_local1.status.act = 0;
_local1.status.move = 0;
}
if (anim != "") {
abi = anim;
}
anim = "";
_local2.effects.gotoAndPlay(abi);
}
function hideTiles() {
var _local2 = _root["map" + game.currentMap];
if (!hideT) {
p = 0;
while (p < _local2.length) {
i = 0;
while (i < _local2[0].length) {
if (game[(("t_" + p) + "_") + i].height >= 4) {
tiles[(("t_" + p) + "_") + i]._alpha = 60;
}
i++;
}
p++;
}
hideT = true;
} else {
p = 0;
while (p < _local2.length) {
i = 0;
while (i < _local2[0].length) {
if (game[(("t_" + p) + "_") + i].height >= 4) {
tiles[(("t_" + p) + "_") + i]._alpha = 100;
}
i++;
}
p++;
}
hideT = false;
}
}
function clearMap() {
var _local3 = _root["map" + game.currentMap];
i = 0;
while (i < _local3.length) {
j = 0;
while (j < _local3[0].length) {
var _local2 = (("t_" + i) + "_") + j;
tiles[_local2].walk.gotoAndStop(1);
tiles.back[_local2].walk.gotoAndStop(1);
j++;
}
i++;
}
}
function stat() {
var _local2 = gui.stat;
_local2.gotoAndStop(1);
i = 0;
while (i < a.length) {
var _local4 = ally["a" + i];
if ((game.xmouse == _local4.xt) && (game.ymouse == _local4.yt)) {
_local2.gotoAndStop(2);
_local2.hp.text = (_local4.hp + "/") + _local4.hpM;
_local2.hpb._xscale = (_local4.hp / _local4.hpM) * 63;
_local2.mp.text = (_local4.mp + "/") + _local4.mpM;
_local2.mpb._xscale = (_local4.mp / _local4.mpM) * 63;
_local2.ct.text = _local4.ct + "/100";
_local2.ctb._xscale = (_local4.ct / 100) * 63;
_local2.job.text = _local4.job;
_local2.move.text = (_local4.m + ",") + _local4.j;
_local2.atk.text = _local4.atk;
_local2.eva.text = _local4.eva;
_local2.sp.text = _local4.sp;
_local2.team.gotoAndStop(2);
if (_local4.status.poison > 0) {
addStatus("poison");
}
if (_local4.status.move > 0) {
addStatus("move");
}
if (_local4.status.act > 0) {
addStatus("act");
}
if (_local4.status.regen > 0) {
addStatus("regen");
}
if (_local4.status.slow > 0) {
addStatus("slow");
}
break;
}
i++;
}
q = 0;
while (q < _root["e" + game.currentMap].length) {
var _local3 = enemy["e" + q];
if ((game.xmouse == _local3.xt) && (game.ymouse == _local3.yt)) {
_local2.gotoAndStop(2);
_local2.hp.text = (_local3.hp + "/") + _local3.hpM;
_local2.hpb._xscale = (_local3.hp / _local3.hpM) * 63;
_local2.mp.text = (_local3.mp + "/") + _local3.mpM;
_local2.mpb._xscale = (_local3.mp / _local3.mpM) * 63;
_local2.ct.text = _local3.ct + "/100";
_local2.ctb._xscale = (_local3.ct / 100) * 63;
_local2.job.text = _local3.job;
_local2.move.text = (_local3.m + ",") + _local3.j;
_local2.atk.text = _local3.atk;
_local2.eva.text = _local3.eva;
_local2.sp.text = _local3.sp;
if (_local3.status.poison > 0) {
addStatus("poison");
}
if (_local3.status.move > 0) {
addStatus("move");
}
if (_local3.status.act > 0) {
addStatus("act");
}
if (_local3.status.regen > 0) {
addStatus("regen");
}
if (_local3.status.slow > 0) {
addStatus("slow");
}
break;
}
q++;
}
if ((tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 5) || (tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 5)) {
if (act == 1) {
_local2.at.gotoAndStop(2);
_local2.at.atk.text = ((("Hp -" + ally[turn].atk) + " Accuracy ") + roll) + "%";
} else if (act == 5) {
_local2.at.gotoAndStop(2);
if (para == 0) {
if (steal != "") {
_local2.at.atk.text = ((((("Steal " + steal) + "->") + damage) + " Accuracy ") + acc) + "%";
} else if (effect != "") {
_local2.at.atk.text = ((effect + " break Accuracy ") + acc) + "%";
} else {
_local2.at.atk.text = ((("Hp -" + damage) + " Accuracy ") + acc) + "%";
}
} else if (para == 2) {
if (damage > 0) {
_local2.at.atk.text = ((("Hp -" + damage) + " Accuracy ") + acc) + "%";
} else {
_local2.at.atk.text = ((effect + " Accuracy ") + acc) + "%";
}
} else if (para == 3) {
if (effect == "") {
_local2.at.atk.text = ((abi + " Hp+") + cure) + " Accuracy 100%";
} else if (ally[turn].job == "Drummer") {
_local2.at.atk.text = ((((effect + "+") + cure) + " Accuracy ") + acc) + "%";
} else {
_local2.at.atk.text = ((effect + " Accuracy ") + acc) + "%";
}
} else {
_local2.at.atk.text = textAbi;
}
}
}
}
function addStatus(type) {
h = 0;
while (h < 5) {
if (gui.stat["e" + h]._currentframe == 1) {
gui.stat["e" + h].gotoAndStop(type);
break;
}
h++;
}
}
function centerChar() {
var _local1 = tiles[turn];
tiles._x = (_local1._x * -1) + 240;
tiles._y = (_local1._y * -1) + 200;
}
function wai() {
gui.ability.gotoAndStop("control");
var _local1 = ally[turn];
node(_local1.xt, _local1.yt + 1, 4);
node(_local1.xt, _local1.yt - 1, 4);
node(_local1.xt - 1, _local1.yt, 4);
node(_local1.xt + 1, _local1.yt, 4);
wait = true;
gui.menu.gotoAndStop(7);
if (_local1.status.poison > 0) {
_local1.status.poison = _local1.status.poison - 1;
damage = Math.floor(_local1.hpM / 5);
_local1.hp = _local1.hp - damage;
tiles[turn].turn.gotoAndPlay("num");
tiles[turn].turn.hit.k.htmlText = ("<font color='#00CC66'>" + damage) + "</font>";
checkDeath(ally[turn], tiles[turn]);
} else if (_local1.status.regen > 0) {
_local1.status.regen = _local1.status.regen - 1;
damage = Math.floor(_local1.hpM / 5);
_local1.hp = _local1.hp + damage;
if (_local1.hp > _local1.hpM) {
_local1.hp = _local1.hpM;
}
tiles[turn].turn.gotoAndPlay("num");
tiles[turn].turn.hit.k.htmlText = ("<font color='#0000CC'>" + damage) + "</font>";
}
if (_local1.status.slow > 0) {
_local1.status.slow = _local1.status.slow - 1;
if (_local1.status.slow == 0) {
_local1.sp = _local1.sp + 3;
}
}
}
function abilitySelect(ab) {
gui.ability.gotoAndStop("attack");
var _local1 = ally[turn];
max = 1;
var _local3 = 0;
cure = 0;
effect = "";
anim = "";
cost = 0;
para = 0;
steal = "";
acc = 100;
abi = ab;
switch (ab) {
case "Throw Stone" :
max = 3;
acc = 85;
damage = Math.floor(_local1.atk / 2);
break;
case "Tackle" :
damage = Math.floor(_local1.atk * 0.8);
_local3 = 1;
break;
case "Berserk" :
_local3 = 2;
para = 1;
break;
case "Slash" :
_local3 = 1;
abi = "swing";
damage = Math.floor(_local1.atk * 1.4);
acc = 75;
break;
case "Share" :
cost = 18;
cure = 36;
_local3 = 3;
para = 1;
break;
case "Long Shot" :
max = 6;
acc = 90;
damage = Math.floor(_local1.atk * 0.9);
abi = "bow";
break;
case "Short Shot" :
max = 3;
acc = 100;
abi = "bow";
damage = Math.floor(_local1.atk * 1.3);
break;
case "Fire Shot" :
anim = "fire";
max = 4;
acc = 75;
damage = Math.floor(_local1.atk * 1.6);
abi = "bow";
break;
case "Bow Shot" :
max = 4;
acc = 95;
damage = _local1.atk;
abi = "bow";
break;
case "Poison Shot" :
anim = "poison";
effect = "poison";
max = 4;
acc = 70;
damage = Math.floor(_local1.atk * 0.5);
abi = "bow";
break;
case "Potion" :
anim = "potion";
para = 1;
max = 3;
_local3 = 4;
cure = 30;
break;
case "Super Potion" :
anim = "potion";
para = 1;
max = 3;
_local3 = 4;
cure = 45;
break;
case "Angelwing" :
anim = "potion";
para = 1;
max = 3;
_local3 = 4;
cure = 1;
break;
case "Elixir" :
anim = "potion";
para = 1;
max = 3;
_local3 = 4;
cure = 40;
break;
case "Remedy" :
anim = "potion";
para = 1;
max = 3;
_local3 = 4;
break;
case "Leg Swing" :
effect = "move";
_local3 = 1;
acc = 80;
break;
case "Arm Stab" :
effect = "act";
_local3 = 1;
acc = 80;
break;
case "Head Break" :
_local3 = 1;
acc = 80;
effect = "hp";
break;
case "Wand Break" :
_local3 = 1;
acc = 80;
effect = "mp";
break;
case "Sword Break" :
_local3 = 1;
acc = 80;
effect = "atk";
break;
case "Speed Steal" :
steal = "sp";
_local3 = 1;
acc = 80;
damage = 1;
break;
case "Life Steal" :
steal = "hp";
_local3 = 1;
acc = 80;
damage = 25;
break;
case "Magic Steal" :
steal = "mp";
_local3 = 1;
acc = 80;
damage = 25;
break;
case "Eva Steal" :
steal = "eva";
_local3 = 1;
acc = 80;
damage = 5;
break;
case "Atk Steal" :
steal = "atk";
_local3 = 1;
acc = 80;
damage = 3;
break;
case "Spear Swing" :
para = 2;
damage = Math.floor(_local1.atk * 0.7);
acc = 80;
max = 2;
break;
case "Earth Jab" :
para = 2;
acc = 60;
_local3 = 6;
max = 6;
damage = _local1.atk;
break;
case "Thrust" :
_local3 = 1;
acc = 75;
damage = _local1.atk;
break;
case "Javelin" :
_local3 = 0;
max = 3;
damage = _local1.atk;
acc = 90;
break;
case "Polearm Spin" :
acc = 90;
para = 2;
_local3 = 7;
damage = Math.floor(_local1.atk * 0.8);
break;
case "Life" :
cost = 12;
cure = 50;
para = 1;
max = 4;
_local3 = 4;
break;
case "Heal" :
cure = 40;
para = 3;
cost = 6;
max = 4;
_local3 = 4;
break;
case "Heal 2" :
cure = 65;
cost = 11;
para = 3;
_local3 = 4;
max = 4;
break;
case "Clear" :
effect = "remove";
cost = 5;
_local3 = 4;
para = 3;
max = 4;
break;
case "Regen" :
cost = 4;
_local3 = 4;
para = 3;
effect = "regen";
max = 4;
break;
case "Fire" :
cost = 6;
para = 2;
max = 4;
damage = _local1.atk;
break;
case "Fire 2" :
cost = 9;
para = 2;
max = 4;
damage = Math.floor(_local1.atk * 1.6);
break;
case "Fire 3" :
cost = 11;
para = 2;
damage = Math.floor(_local1.atk * 2.1);
max = 4;
break;
case "Poison" :
cost = 5;
para = 2;
effect = "poison";
max = 4;
acc = 80;
break;
case "Slow" :
cost = 6;
para = 2;
acc = 80;
effect = "slow";
max = 4;
break;
case "Life Song" :
anim = "song";
cure = 25;
effect = "hp";
_local3 = 2;
para = 3;
break;
case "Magic Song" :
anim = "song";
cure = 15;
effect = "mp";
_local3 = 2;
para = 3;
break;
case "Eva Song" :
anim = "song";
cure = 8;
effect = "eva";
_local3 = 2;
para = 3;
break;
case "Atk Song" :
anim = "song";
cure = 5;
effect = "atk";
_local3 = 2;
para = 3;
break;
case "Speed Song" :
anim = "song";
cure = 1;
effect = "sp";
_local3 = 2;
para = 3;
}
if (ally[turn].mp >= cost) {
switch (_local3) {
case 0 :
p = 1;
while (p < max) {
i = 1;
while (i < max) {
var _local2 = max - p;
node(_local1.xt - p, (_local1.yt - i) + _local2, 3);
node(_local1.xt + p, (_local1.yt + i) - _local2, 3);
node((_local1.xt - i) + _local2, _local1.yt + p, 3);
node((_local1.xt + i) - _local2, _local1.yt - p, 3);
node((_local1.xt - p) - 1, _local1.yt, 3);
node((_local1.xt + p) + 1, _local1.yt, 3);
node(_local1.xt, (_local1.yt + p) + 1, 3);
node(_local1.xt, (_local1.yt - p) - 1, 3);
i++;
}
p++;
}
break;
case 1 :
node(_local1.xt + max, _local1.yt, 3);
node(_local1.xt - max, _local1.yt, 3);
node(_local1.xt, _local1.yt + max, 3);
node(_local1.xt, _local1.yt - max, 3);
break;
case 2 :
node(_local1.xt, _local1.yt, 6);
break;
case 3 :
node(_local1.xt + max, _local1.yt, 6);
node(_local1.xt - max, _local1.yt, 6);
node(_local1.xt, _local1.yt + max, 6);
node(_local1.xt, _local1.yt - max, 6);
break;
case 4 :
p = 1;
while (p < max) {
i = 1;
while (i < max) {
var _local2 = max - p;
node(_local1.xt, _local1.yt, 6);
node(_local1.xt - p, (_local1.yt - i) + _local2, 6);
node(_local1.xt + p, (_local1.yt + i) - _local2, 6);
node((_local1.xt - i) + _local2, _local1.yt + p, 6);
node((_local1.xt + i) - _local2, _local1.yt - p, 6);
node((_local1.xt - p) - 1, _local1.yt, 6);
node((_local1.xt + p) + 1, _local1.yt, 6);
node(_local1.xt, (_local1.yt + p) + 1, 6);
node(_local1.xt, (_local1.yt - p) - 1, 6);
i++;
}
p++;
}
break;
case 5 :
node(_local1.xt, _local1.yt, 3);
break;
case 6 :
i = 1;
while (i < max) {
node(_local1.xt + i, _local1.yt, 3);
node(_local1.xt - i, _local1.yt, 3);
node(_local1.xt, _local1.yt + i, 3);
node(_local1.xt, _local1.yt - i, 3);
i++;
}
break;
case 7 :
node(_local1.xt, _local1.yt, 3);
}
}
act = 4;
}
function setAbility() {
if ((tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 3) || (tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 3)) {
if (para == 0) {
i = 0;
while (i < _root["e" + game.currentMap].length) {
var _local2 = enemy["e" + i];
if ((_local2.xt == game.xmouse) && (_local2.yt == game.ymouse)) {
tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(5);
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(5);
if (acc == 0) {
acc = 100;
} else {
acc = acc - _local2.eva;
}
act = 5;
gui.menu.ability_menu.gotoAndStop(1);
break;
}
i++;
}
} else if (para == 2) {
hitEn = [];
if (abi == "Polearm Spin") {
if (!tileCheck(ally[turn].xt + 1, ally[turn].yt, "enemy")) {
hitEn.push(enemyTarg);
node(ally[turn].xt + 1, ally[turn].yt, 5);
} else if (tileCheck(ally[turn].xt + 1, ally[turn].yt, "ally")) {
node(ally[turn].xt + 1, ally[turn].yt, 12);
}
if (!tileCheck(ally[turn].xt, ally[turn].yt + 1, "enemy")) {
hitEn.push(enemyTarg);
node(ally[turn].xt, ally[turn].yt + 1, 5);
} else if (tileCheck(ally[turn].xt, ally[turn].yt + 1, "ally")) {
node(ally[turn].xt, ally[turn].yt + 1, 12);
}
if (!tileCheck(ally[turn].xt, ally[turn].yt - 1, "enemy")) {
hitEn.push(enemyTarg);
node(ally[turn].xt, ally[turn].yt - 1, 5);
} else if (tileCheck(ally[turn].xt, ally[turn].yt - 1, "ally")) {
node(ally[turn].xt, ally[turn].yt - 1, 12);
}
if (!tileCheck(ally[turn].xt - 1, ally[turn].yt, "enemy")) {
hitEn.push(enemyTarg);
node(ally[turn].xt - 1, ally[turn].yt, 5);
} else if (tileCheck(ally[turn].xt - 1, ally[turn].yt, "ally")) {
node(ally[turn].xt - 1, ally[turn].yt, 12);
}
} else if (abi == "Earth Jab") {
i = 1;
while (i < max) {
if (game.ymouse > ally[turn].yt) {
if (!tileCheck(ally[turn].xt, ally[turn].yt + i, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(ally[turn].xt, ally[turn].yt + i, 5);
hitEn.push(enemyTarg);
}
}
} else if (game.ymouse < ally[turn].yt) {
if (!tileCheck(ally[turn].xt, ally[turn].yt - i, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(ally[turn].xt, ally[turn].yt - i, 5);
hitEn.push(enemyTarg);
}
}
} else if (game.xmouse > ally[turn].xt) {
if (!tileCheck(ally[turn].xt + i, ally[turn].yt, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(ally[turn].xt + i, ally[turn].yt, 5);
hitEn.push(enemyTarg);
}
}
} else if (!tileCheck(ally[turn].xt - i, ally[turn].yt, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(ally[turn].xt - i, ally[turn].yt, 5);
hitEn.push(enemyTarg);
}
}
i++;
}
} else {
if (!tileCheck(game.xmouse, game.ymouse, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(game.xmouse, game.ymouse, 5);
hitEn.push(enemyTarg);
}
} else if (tileCheck(game.xmouse, game.ymouse, "ally")) {
node(game.xmouse, game.ymouse, 12);
}
if (!tileCheck(game.xmouse + 1, game.ymouse, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(game.xmouse + 1, game.ymouse, 5);
hitEn.push(enemyTarg);
}
} else if (tileCheck(game.xmouse + 1, game.ymouse, "ally")) {
node(game.xmouse + 1, game.ymouse, 12);
}
if (!tileCheck(game.xmouse - 1, game.ymouse, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(game.xmouse - 1, game.ymouse, 5);
hitEn.push(enemyTarg);
}
} else if (tileCheck(game.xmouse - 1, game.ymouse, "ally")) {
node(game.xmouse - 1, game.ymouse, 12);
}
if (!tileCheck(game.xmouse, game.ymouse + 1, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(game.xmouse, game.ymouse + 1, 5);
hitEn.push(enemyTarg);
}
} else if (tileCheck(game.xmouse, game.ymouse + 1, "ally")) {
node(game.xmouse, game.ymouse + 1, 12);
}
if (!tileCheck(game.xmouse, game.ymouse - 1, "enemy")) {
if (enemy["e" + enemyTarg].hp > 0) {
node(game.xmouse, game.ymouse - 1, 5);
hitEn.push(enemyTarg);
}
} else if (tileCheck(game.xmouse, game.ymouse - 1, "ally")) {
node(game.xmouse, game.ymouse - 1, 12);
}
}
act = 5;
gui.menu.ability_menu.gotoAndStop(1);
}
} else if ((tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 6) || (tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 6)) {
if (para == 1) {
if (abi == "Berserk") {
textAbi = "Attack+5 Accuracy 100%";
} else if (abi == "Share") {
if (!tileCheck(game.xmouse, game.ymouse, "ally")) {
cure = cost * 2;
if (ally["a" + allyTarg].hp > 0) {
textAbi = ("Hp+" + cure) + " Accuracy 100%";
} else {
textAbi = ("Hp+" + cure) + " Accuracy 0%";
cure = 0;
}
}
} else if ((abi == "Potion") || (abi == "Super Potion")) {
if (!tileCheck(game.xmouse, game.ymouse, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
textAbi = ("Hp+" + cure) + " Accuracy 100%";
} else {
textAbi = ("Hp+" + cure) + " Accuracy 0%";
cure = 0;
}
}
} else if ((abi == "Angelwing") || (abi == "Life")) {
if (!tileCheck(game.xmouse, game.ymouse, "ally")) {
if (ally["a" + allyTarg].hp == 0) {
textAbi = ("Hp+" + cure) + " Accuracy 100%";
} else {
textAbi = ("Hp+" + cure) + " Accuracy 0%";
}
}
} else if (abi == "Remedy") {
if (!tileCheck(game.xmouse, game.ymouse, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
if ((((ally["a" + allyTarg].status.poison > 0) || (ally["a" + allyTarg].status.act > 0)) || (ally["a" + allyTarg].status.move > 0)) || (ally["a" + allyTarg].status.slow > 0)) {
textAbi = "Remove Effects Accuracy 100%";
} else {
textAbi = "Accuracy 0%";
}
} else {
textAbi = "Accuracy 0%";
}
}
} else if (abi == "Elixir") {
if (!tileCheck(game.xmouse, game.ymouse, "ally")) {
if (ally["a" + allyTarg].hp > 0) {
textAbi = ("Mp+" + cure) + " Accuracy 100%";
} else {
textAbi = ("Mp+" + cure) + " Accuracy 0%";
cure = 0;
}
}
}
tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(5);
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(5);
} else if (para == 3) {
hitAl = [];
if (!tileCheck(game.xmouse, game.ymouse, "ally")) {
if ((ally["a" + allyTarg].hp > 0) || (ally[turn].job == "Drummer")) {
node(game.xmouse, game.ymouse, 5);
hitAl.push(allyTarg);
}
} else if (tileCheck(game.xmouse, game.ymouse, "enemy")) {
node(game.xmouse, game.ymouse, 12);
}
if (!tileCheck(game.xmouse + 1, game.ymouse, "ally")) {
if ((ally["a" + allyTarg].hp > 0) || (ally[turn].job == "Drummer")) {
node(game.xmouse + 1, game.ymouse, 5);
hitAl.push(allyTarg);
}
} else if (tileCheck(game.xmouse + 1, game.ymouse, "enemy")) {
node(game.xmouse + 1, game.ymouse, 12);
}
if (!tileCheck(game.xmouse - 1, game.ymouse, "ally")) {
if ((ally["a" + allyTarg].hp > 0) || (ally[turn].job == "Drummer")) {
node(game.xmouse - 1, game.ymouse, 5);
hitAl.push(allyTarg);
}
} else if (tileCheck(game.xmouse - 1, game.ymouse, "enemy")) {
node(game.xmouse - 1, game.ymouse, 12);
}
if (!tileCheck(game.xmouse, game.ymouse + 1, "ally")) {
if ((ally["a" + allyTarg].hp > 0) || (ally[turn].job == "Drummer")) {
node(game.xmouse, game.ymouse + 1, 5);
hitAl.push(allyTarg);
}
} else if (tileCheck(game.xmouse, game.ymouse + 1, "enemy")) {
node(game.xmouse, game.ymouse + 1, 12);
}
if (!tileCheck(game.xmouse, game.ymouse - 1, "ally")) {
if ((ally["a" + allyTarg].hp > 0) || (ally[turn].job == "Drummer")) {
node(game.xmouse, game.ymouse - 1, 5);
hitAl.push(allyTarg);
}
} else if (tileCheck(game.xmouse, game.ymouse - 1, "enemy")) {
node(game.xmouse, game.ymouse - 1, 12);
}
}
act = 5;
gui.menu.ability_menu.gotoAndStop(1);
} else {
effect = "";
act = 0;
anim = "";
clearMap();
}
}
function targetAbility() {
var _local5 = ally[turn];
if ((tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 5) || (tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 5)) {
gui.ability.play();
gui.ability.te.text = abi;
if (game.ymouse > ally[turn].yt) {
tiles[turn].gotoAndStop(5);
} else if (game.ymouse < ally[turn].yt) {
tiles[turn].gotoAndStop(1);
} else if (game.xmouse > ally[turn].xt) {
tiles[turn].gotoAndStop(4);
} else {
tiles[turn].gotoAndStop(3);
}
if (para == 0) {
var _local4 = _root["e" + game.currentMap];
i = 0;
while (i < _local4.length) {
var _local3 = tiles["e" + i];
var _local2 = enemy["e" + i];
if ((_local2.xt == game.xmouse) && (_local2.yt == game.ymouse)) {
if (((((abi == "Sword Break") || (abi == "Wand Break")) || (abi == "Head Break")) || (abi == "Leg Swing")) || (abi == "Arm Stab")) {
abi = "swing";
game.count = game.count + 5;
} else if (((((abi == "Life Steal") || (abi == "Magic Steal")) || (abi == "Speed Steal")) || (abi == "Eva Steal")) || (abi == "Atk Steal")) {
abi = "steal";
game.count = game.count + 5;
}
tiles[turn].char.gotoAndPlay(abi);
_root.targA = _local3;
_root.targP = _local2;
act = 2;
clearMap();
if (move == 0) {
gui.menu.gotoAndStop(4);
} else {
gui.menu.gotoAndStop(5);
}
break;
}
i++;
}
} else {
if (abi == "Berserk") {
game.count = game.count + 15;
pol = "Berserk";
ally[turn].atk = ally[turn].atk + 5;
tiles[turn].effects.gotoAndPlay(abi);
} else if (abi == "Share") {
game.count = game.count + 15;
pol = "Share";
cureType = 0;
} else if (((abi == "Potion") || (abi == "Super Potion")) || (abi == "Angelwing")) {
game.count = game.count + 15;
cureType = 0;
pol = "potion";
} else if (abi == "Elixir") {
game.count = game.count + 15;
cureType = 1;
pol = "potion";
} else if (abi == "Remedy") {
game.count = game.count + 20;
cureType = 2;
pol = "potion";
} else if (abi == "Polearm Spin") {
pol = "Earth Jab";
} else if (abi == "Spear Swing") {
pol = "Earth Jab";
} else if (((((((((((((((abi == "Fire") || (abi == "Fire 2")) || (abi == "Fire 3")) || (abi == "Poison")) || (abi == "Slow")) || (abi == "Regen")) || (abi == "Heal")) || (abi == "Heal 2")) || (abi == "Life")) || (abi == "Clear")) || (abi == "Life Song")) || (abi == "Magic Song")) || (abi == "Atk Song")) || (abi == "Eva Song")) || (abi == "Speed Song")) {
pol = "cast";
ally[turn].mp = ally[turn].mp - cost;
game.count = game.count + 15;
if (((abi == "Poison") || (abi == "Life")) || (abi == "Regen")) {
game.count = game.count + 10;
}
} else {
pol = abi;
game.count = game.count + 5;
}
tiles[turn].char.gotoAndPlay(pol);
act = 2;
clearMap();
if (move == 0) {
gui.menu.gotoAndStop(4);
} else {
gui.menu.gotoAndStop(5);
}
}
} else {
act = 0;
clearMap();
}
}
function setAttack() {
roll = 0;
var _local4 = ally[turn];
if ((tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 3) || (tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 3)) {
var _local5 = _root["e" + game.currentMap];
i = 0;
while (i < _local5.length) {
var _local3 = tiles["e" + i];
var _local2 = enemy["e" + i];
if (_local2.hp > 0) {
if (((_local2.xt - 1) == _local4.xt) && (_local4.yt == _local2.yt)) {
if ((_local3._currentframe == 2) || (_local3._currentframe == 3)) {
roll = 80 - _local2.eva;
} else if ((_local3._currentframe == 1) || (_local3._currentframe == 5)) {
roll = 90 - _local2.eva;
} else {
roll = 100 - _local2.eva;
}
break;
}
if (((_local2.xt + 1) == _local4.xt) && (_local2.yt == _local4.yt)) {
if ((_local3._currentframe == 2) || (_local3._currentframe == 3)) {
roll = 100 - _local2.eva;
} else if ((_local3._currentframe == 1) || (_local3._currentframe == 5)) {
roll = 90 - _local2.eva;
} else {
roll = 80 - _local2.eva;
}
break;
}
if (((_local2.yt - 1) == _local4.yt) && (_local2.xt == _local4.xt)) {
if (((_local3._currentframe == 2) || (_local3._currentframe == 3)) || (_local3._currentframe == 4)) {
roll = 90 - _local2.eva;
} else if (_local3._currentframe == 1) {
roll = 100 - _local2.eva;
} else {
roll = 80 - _local2.eva;
}
break;
}
if (((_local2.yt + 1) == _local4.yt) && (_local2.xt == _local4.xt)) {
if (((_local3._currentframe == 2) || (_local3._currentframe == 3)) || (_local3._currentframe == 4)) {
roll = 90 - _local2.eva;
} else if (_local3._currentframe == 5) {
roll = 100 - _local2.eva;
} else {
roll = 80 - _local2.eva;
}
break;
}
}
i++;
}
tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(5);
tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk.gotoAndStop(5);
act = 1;
}
}
function attackTarget() {
game.count = game.count + 5;
var _local4 = ally[turn];
if ((tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 5) || (tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 5)) {
if (game.ymouse > ally[turn].yt) {
tiles[turn].gotoAndStop(5);
} else if (game.ymouse < ally[turn].yt) {
tiles[turn].gotoAndStop(1);
} else if (game.xmouse > ally[turn].xt) {
tiles[turn].gotoAndStop(4);
} else {
tiles[turn].gotoAndStop(3);
}
var _local5 = _root["e" + game.currentMap];
i = 0;
while (i < _local5.length) {
var _local3 = tiles["e" + i];
var _local2 = enemy["e" + i];
if ((_local2.xt == game.xmouse) && (_local2.yt == game.ymouse)) {
tiles[turn].char.gotoAndPlay("swing");
_root.targA = _local3;
_root.targP = _local2;
acc = roll;
damage = _local4.atk;
act = 2;
clearMap();
if (move == 0) {
gui.menu.gotoAndStop(4);
} else {
gui.menu.gotoAndStop(5);
}
break;
}
i++;
}
} else {
gui.ability.gotoAndStop(1);
act = 0;
clearMap();
}
}
function waitTarget() {
var _local1 = false;
if (game.xmouse > ally[turn].xt) {
tiles[turn].gotoAndStop(4);
_local1 = true;
} else if (game.xmouse < ally[turn].xt) {
tiles[turn].gotoAndStop(2);
_local1 = true;
} else if (game.ymouse > ally[turn].yt) {
tiles[turn].gotoAndStop(5);
_local1 = true;
} else if (game.ymouse < ally[turn].yt) {
tiles[turn].gotoAndStop(1);
_local1 = true;
}
if (_local1) {
clearMap();
if ((move == 0) && (act == 0)) {
ally[turn].ct = ally[turn].sp * 3;
} else if (move == 0) {
ally[turn].ct = ally[turn].sp * 2;
} else if (act == 0) {
ally[turn].ct = ally[turn].sp * 2;
} else {
ally[turn].ct = 0;
}
tiles[turn].tu.gotoAndStop(1);
gui.menu.gotoAndStop(1);
turn = "";
}
}
function moveTarget() {
if ((tiles.back[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 2) || (tiles[(("t_" + game.ymouse) + "_") + game.xmouse].walk._currentframe == 2)) {
if (tileCheck(game.xmouse, game.ymouse, "both")) {
game.targetx = game.xmouse;
game.targety = game.ymouse;
move = 2;
clearMap();
gui.ability.gotoAndStop(1);
}
} else {
gui.ability.gotoAndStop(1);
move = 0;
clearMap();
}
}
makeMap(_root["map" + game.currentMap]);
Instance of Symbol 306 MovieClip [blank] in Frame 12 (1.15 KiB) ●
onClipEvent (enterFrame) {
if (!_root.cs) {
if (Key.isDown(40) && (_root.tiles._y > ((-_root.tiles._height) / 4))) {
_root.tiles._y = _root.tiles._y - _root.game.speed;
} else if (Key.isDown(38) && (_root.tiles._y < (_root.tiles._height / 2))) {
_root.tiles._y = _root.tiles._y + _root.game.speed;
}
if (Key.isDown(39) && (_root.tiles._x > ((-_root.tiles._width) / 5))) {
_root.tiles._x = _root.tiles._x - _root.game.speed;
} else if (Key.isDown(37) && (_root.tiles._x < _root.tiles._width)) {
_root.tiles._x = _root.tiles._x + _root.game.speed;
}
}
_root.work();
if (_root.enemyTurn) {
_root.enemyTurnAI();
}
}
onClipEvent (keyDown) {
if (Key.isDown(32)) {
_root.centerChar();
} else if (Key.isDown(72)) {
_root.hideTiles();
} else if (Key.isDown(81)) {
_root.game.currentMap = 2;
_root.tiles.removeMovieClip();
_root.gui.removeMovieClip();
_root.gotoAndStop("title");
} else if (Key.isDown(77)) {
if (_root.stopS) {
_root.mains.stop();
_root.stopS = false;
} else {
_root.mains.start(0, 500);
_root.stopS = true;
}
}
}
onClipEvent (mouseUp) {
_root.getTarget();
}
Frame 13 (66 B)
MochiAd.showInterLevelAd({id:"5a6925bfc3c62442", res:"550x400"});
Frame 14 (100 B)
if (retry == false) {
gotoAndStop ("title");
} else if (retry) {
gotoAndStop ("play_game");
}
Symbol 14 MovieClip Frame 1 (8 B)
stop();
Symbol 14 MovieClip Frame 56 (17 B)
gotoAndPlay (2);
Symbol 14 MovieClip Frame 57 (8 B)
play();
Symbol 52 MovieClip Frame 1 (8 B)
stop();
Symbol 52 MovieClip Frame 14 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 26 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 41 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 53 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 65 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 77 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 94 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 108 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 120 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 131 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 140 (17 B)
gotoAndStop (1);
Symbol 52 MovieClip Frame 160 (17 B)
gotoAndStop (1);
Symbol 58 MovieClip Frame 1 (8 B)
stop();
Symbol 62 MovieClip Frame 1 (8 B)
play();
Symbol 62 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 62 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 62 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 62 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 62 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 62 MovieClip Frame 48 (8 B)
stop();
Symbol 62 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 62 MovieClip Frame 60 (18 B)
_root.showCure();
Symbol 65 MovieClip Frame 1 (8 B)
stop();
Symbol 67 MovieClip Frame 1 (8 B)
play();
Symbol 67 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 67 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 67 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 67 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 67 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 67 MovieClip Frame 48 (8 B)
stop();
Symbol 67 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 67 MovieClip Frame 60 (18 B)
_root.showCure();
Symbol 70 MovieClip Frame 1 (8 B)
stop();
Symbol 76 MovieClip Frame 1 (8 B)
stop();
Symbol 78 MovieClip Frame 1 (8 B)
play();
Symbol 78 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 78 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 78 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 78 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 78 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 78 MovieClip Frame 48 (8 B)
stop();
Symbol 78 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 78 MovieClip Frame 60 (18 B)
_root.showCure();
Symbol 82 MovieClip Frame 1 (8 B)
stop();
Symbol 84 MovieClip Frame 1 (8 B)
play();
Symbol 84 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 84 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 84 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 84 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 84 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 84 MovieClip Frame 48 (8 B)
stop();
Symbol 84 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 90 MovieClip [mouse] Frame 21 (17 B)
gotoAndPlay (1);
Symbol 98 MovieClip Frame 15 (17 B)
gotoAndPlay (1);
Instance of Symbol 98 MovieClip in Symbol 103 MovieClip Frame 1 (136 B)
on (release) {
_root.chatN = _root.chatN + 1;
_root.cutN = _root.cutN + 1;
_parent._x = -330;
this.gotoAndPlay(this._totalframes);
}
Symbol 109 MovieClip Frame 1 (23 B)
stop();
te.text = "";
Symbol 109 MovieClip Frame 44 (17 B)
gotoAndStop (1);
Symbol 117 Button (50 B)
on (release) {
_root.clearMap();
_root.walk();
}
Symbol 120 Button (66 B)
on (release) {
_root.clearMap();
_root.abilitySelect(a4.text);
}
Symbol 121 Button (66 B)
on (release) {
_root.clearMap();
_root.abilitySelect(a3.text);
}
Symbol 122 Button (66 B)
on (release) {
_root.clearMap();
_root.abilitySelect(a2.text);
}
Symbol 123 Button (66 B)
on (release) {
_root.clearMap();
_root.abilitySelect(a1.text);
}
Symbol 124 Button (66 B)
on (release) {
_root.clearMap();
_root.abilitySelect(a0.text);
}
Symbol 125 Button (34 B)
on (release) {
gotoAndStop (1);
}
Symbol 134 MovieClip Frame 1 (8 B)
stop();
Symbol 135 Button (53 B)
on (release) {
_root.clearMap();
_root.ability();
}
Symbol 137 Button (52 B)
on (release) {
_root.clearMap();
_root.attack();
}
Symbol 139 Button (49 B)
on (release) {
_root.clearMap();
_root.wai();
}
Symbol 144 MovieClip Frame 1 (8 B)
stop();
Symbol 158 MovieClip Frame 1 (8 B)
stop();
Symbol 164 MovieClip Frame 1 (8 B)
stop();
Symbol 169 MovieClip Frame 1 (8 B)
stop();
Symbol 178 MovieClip Frame 1 (8 B)
stop();
Symbol 182 Button (248 B)
on (release) {
if (_root.game.currentMap != 99) {
_root.game.points = _root.game.points + _root.game.count;
_root.game.count = 0;
}
_root.retry = true;
_root.tiles.removeMovieClip();
_root.gotoAndStop("ad");
_root.gui.removeMovieClip();
}
Symbol 184 Button (249 B)
on (release) {
if (_root.game.currentMap != 99) {
_root.game.points = _root.game.points + _root.game.count;
_root.game.count = 0;
}
_root.retry = false;
_root.tiles.removeMovieClip();
_root.gotoAndStop("ad");
_root.gui.removeMovieClip();
}
Symbol 191 Button (458 B)
on (release) {
if ((_root.game.currentMap != 99) && (_root.game.currentMap != 23)) {
_root.game.story = _root.game.story + 1;
_root.game.points = _root.game.points + (_root.game.count + 50);
} else if (_root.game.currentMap == 23) {
_root.game.points = _root.game.points + (_root.game.count + 50);
gotoAndStop ("credits");
}
_root.game.count = 0;
_root.tiles.removeMovieClip();
_root.gotoAndStop("game");
_root.gui.removeMovieClip();
}
Symbol 201 Button (54 B)
on (release) {
_root.cs = false;
gotoAndStop (15);
}
Symbol 204 Button (107 B)
on (release) {
_root.tiles.removeMovieClip();
_root.gotoAndStop("title");
_root.gui.removeMovieClip();
}
Symbol 207 MovieClip [gui] Frame 15 (8 B)
stop();
Symbol 207 MovieClip [gui] Frame 30 (99 B)
if (_root.game.currentMap != 99) {
montext.text = "Points Won: " + _root.game.count;
}
stop();
Symbol 207 MovieClip [gui] Frame 47 (99 B)
if (_root.game.currentMap != 99) {
montext.text = "Points Won: " + _root.game.count;
}
stop();
Symbol 207 MovieClip [gui] Frame 48 (8 B)
play();
Symbol 207 MovieClip [gui] Frame 59 (140 B)
stop();
_root.tiles.removeMovieClip();
_root.game.story = _root.game.story + 1;
_root.gotoAndStop("game");
_root.gui.removeMovieClip();
Symbol 207 MovieClip [gui] Frame 69 (184 B)
if (typeof(_root["cond" + _root.game.currentMap]) == "string") {
cond.text = "Defeat the " + _root["cond" + _root.game.currentMap];
} else {
cond.text = "Defeat All Enemies!";
}
Symbol 207 MovieClip [gui] Frame 76 (8 B)
stop();
Symbol 217 MovieClip Frame 1 (8 B)
stop();
Symbol 241 Button (40 B)
on (release) {
gotoAndStop ("print");
}
Symbol 242 Button (42 B)
on (release) {
_root.selectedTile = 19;
}
Symbol 243 Button (42 B)
on (release) {
_root.selectedTile = 18;
}
Symbol 244 Button (42 B)
on (release) {
_root.selectedTile = 13;
}
Symbol 245 Button (42 B)
on (release) {
_root.selectedTile = 14;
}
Symbol 246 Button (42 B)
on (release) {
_root.selectedTile = 15;
}
Symbol 247 Button (42 B)
on (release) {
_root.selectedTile = 16;
}
Symbol 248 Button (42 B)
on (release) {
_root.selectedTile = 17;
}
Symbol 249 Button (42 B)
on (release) {
_root.selectedTile = 12;
}
Symbol 257 Button (78 B)
on (release) {
if (jj4 >= 1) {
jj4 = jj4 - 1;
j4.text = job[jj4];
}
}
Symbol 258 Button (92 B)
on (release) {
if (jj4 < (job.length - 1)) {
jj4 = jj4 + 1;
j4.text = job[jj4];
}
}
Symbol 259 Button (78 B)
on (release) {
if (jj3 >= 1) {
jj3 = jj3 - 1;
j3.text = job[jj3];
}
}
Symbol 260 Button (92 B)
on (release) {
if (jj3 < (job.length - 1)) {
jj3 = jj3 + 1;
j3.text = job[jj3];
}
}
Symbol 261 Button (78 B)
on (release) {
if (jj2 >= 1) {
jj2 = jj2 - 1;
j2.text = job[jj2];
}
}
Symbol 262 Button (92 B)
on (release) {
if (jj2 < (job.length - 1)) {
jj2 = jj2 + 1;
j2.text = job[jj2];
}
}
Symbol 263 Button (78 B)
on (release) {
if (jj1 >= 1) {
jj1 = jj1 - 1;
j1.text = job[jj1];
}
}
Symbol 264 Button (92 B)
on (release) {
if (jj1 < (job.length - 1)) {
jj1 = jj1 + 1;
j1.text = job[jj1];
}
}
Symbol 265 Button (78 B)
on (release) {
if (jj0 >= 1) {
jj0 = jj0 - 1;
j0.text = job[jj0];
}
}
Symbol 266 Button (92 B)
on (release) {
if (jj0 < (job.length - 1)) {
jj0 = jj0 + 1;
j0.text = job[jj0];
}
}
Symbol 273 Button (34 B)
on (release) {
gotoAndStop (2);
}
Symbol 276 Button (107 B)
on (release) {
_root.gotoAndStop("title");
_root.tiles.removeMovieClip();
_root.gui.removeMovieClip();
}
Symbol 277 Button (41 B)
on (release) {
_root.selectedTile = 7;
}
Symbol 278 Button (41 B)
on (release) {
_root.selectedTile = 8;
}
Symbol 279 Button (41 B)
on (release) {
_root.selectedTile = 9;
}
Symbol 280 Button (42 B)
on (release) {
_root.selectedTile = 10;
}
Symbol 281 Button (42 B)
on (release) {
_root.selectedTile = 11;
}
Symbol 282 Button (41 B)
on (release) {
_root.selectedTile = 6;
}
Symbol 283 Button (41 B)
on (release) {
_root.selectedTile = 5;
}
Symbol 284 Button (41 B)
on (release) {
_root.selectedTile = 3;
}
Symbol 285 Button (41 B)
on (release) {
_root.selectedTile = 4;
}
Symbol 286 Button (41 B)
on (release) {
_root.selectedTile = 2;
}
Symbol 287 Button (41 B)
on (release) {
_root.selectedTile = 1;
}
Symbol 293 Button (34 B)
on (release) {
gotoAndStop (1);
}
Symbol 295 Button (847 B)
on (release) {
var st = false;
i = 0;
while (i < _root.ene.length) {
_root.ene[i][0] = job[_root.gui["jj" + i]];
if ((_root.ene[i][1] == -1) && (_root.ene[i][2] == -1)) {
st = true;
}
i++;
}
i = 0;
while (i < _root.all.length) {
if ((_root.all[i][0] == -1) && (_root.all[i][1] == -1)) {
st = true;
}
i++;
}
if ((n.text.length >= 4) && (n.text.length <= 20)) {
if (!st) {
_root.user.data.maps[_root.game.saveMap] = {name:n.text, map:_root.map, enemies:_root.ene, allies:_root.all};
_root.tiles.removeMovieClip();
_root.gotoAndStop("load map");
_root.gui.removeMovieClip();
} else {
error.text = "Please place all the units on the map. Your map name may be too big or small";
}
} else {
error.text = "Your game name is too long or short. 4-20 characters.";
}
}
Symbol 300 Button (34 B)
on (release) {
gotoAndStop (1);
}
Symbol 305 MovieClip [editor_gui] Frame 1 (133 B)
stop();
job = ["squire", "alchemist", "archer", "spearman", "knight", "robber", "healer", "sorcerer", "drummer", "king", "noble"];
Symbol 305 MovieClip [editor_gui] Frame 3 (1.7 KiB) ●
i = 0;
while (i < 5) {
_root.ene[i][0] = _root.gui["j" + i].text;
i++;
}
i = 0;
while (i < _root.ene.length) {
temp = _root.ene[i][1];
_root.ene[i][1] = _root.ene[i][2];
_root.ene[i][2] = temp;
i++;
}
i = 0;
while (i < _root.all.length) {
temp = _root.all[i][0];
_root.all[i][0] = _root.all[i][1];
_root.all[i][1] = temp;
i++;
}
rut = ["map", "all", "ene"];
lazy = ["map", "a", "e"];
j = 0;
while (j < 3) {
hu.text = hu.text + (("var " + lazy[j]) + ":Array = [");
i = 0;
while (i < _root[rut[j]].length) {
p = 0;
while (p < _root[rut[j]][0].length) {
if (p == 0) {
if (rut[j] == "map") {
hu.htmlText = hu.htmlText + "[";
} else {
hu.text = hu.text + "[";
}
}
if ((rut[j] == "ene") && (p == 0)) {
hu.text = hu.text + "\"";
}
hu.text = hu.text + _root[rut[j]][i][p];
if ((rut[j] == "ene") && (p == 0)) {
hu.text = hu.text + "\"";
}
if (p == (_root[rut[j]][0].length - 1)) {
if (i != (_root[rut[j]].length - 1)) {
hu.text = hu.text + "],";
} else {
hu.text = hu.text + "]";
}
} else {
hu.text = hu.text + ",";
}
p++;
}
if (i == (_root[rut[j]].length - 1)) {
if (rut[j] == "map") {
hu.htmlText = hu.htmlText + "];<br>";
} else {
hu.text = hu.text + "];";
hu.htmlText = hu.htmlText + "<br>";
}
}
i++;
}
j++;
}
i = 0;
while (i < _root.ene.length) {
temp = _root.ene[i][1];
_root.ene[i][1] = _root.ene[i][2];
_root.ene[i][2] = temp;
i++;
}
i = 0;
while (i < _root.all.length) {
temp = _root.all[i][0];
_root.all[i][0] = _root.all[i][1];
_root.all[i][1] = temp;
i++;
}
Symbol 309 Button (69 B)
on (release) {
getURL ("http://www.flashninjaclan.com", "_blank");
}
Symbol 314 Button (44 B)
on (release) {
_root.gotoAndStop("play");
}
Symbol 317 Button (44 B)
on (release) {
_root.gotoAndStop("help");
}
Symbol 320 Button (45 B)
on (release) {
_root.gotoAndStop("about");
}
Symbol 323 Button (69 B)
on (release) {
getURL ("http://www.flashninjaclan.com", "_blank");
}
Symbol 336 MovieClip Frame 1 (10 B)
page = 1;
Symbol 336 MovieClip Frame 2 (26 B)
holder.gotoAndStop(page);
Symbol 336 MovieClip Frame 60 (70 B)
page = page + 1;
if (page > 5) {
page = 1;
}
gotoAndPlay (2);
Symbol 337 MovieClip Frame 27 (8 B)
stop();
Symbol 338 Button (70 B)
on (release) {
getURL ("http://www.throwtheproject.com", "_blank");
}
Symbol 806 MovieClip [__Packages.MochiAd] Frame 0 (13.87 KiB) ● ●
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 342 Button (108 B)
on (release) {
user.data.file0 = {};
user.data.file1 = {};
user.data.file2 = {};
gotoAndStop ("home");
}
Symbol 354 Button (279 B)
on (release) {
i = 0;
while (i < 3) {
if (user.data.game.length <= 3) {
user.data.game.push({story:0, points:200, a:[]});
currentGame = i;
gotoAndStop ("title");
break;
}
if (i == 2) {
mes.text = "Error you must delete a saved game.";
}
i++;
}
}
Symbol 357 Button (39 B)
on (release) {
gotoAndStop ("home");
}
Symbol 361 Button (37 B)
on (release) {
_root.mains.stop();
}
Symbol 393 Button (475 B)
on (release) {
if ((name.text.length > 3) && (name.text.length < 15)) {
nukescore = game.story;
nukename = name.text;
loadVariablesNum ("http://www.flashninjaclan.com/games/knighttactics/newscore.php", 0, "POST");
postHPScore(game.story, "");
_root.kongregateServices.connect();
_root.kongregateStats.submit("HighScore", game.story);
message.text = "Your score has been sent.";
} else {
message.text = "Your name can only be 4-14 chars.";
}
}
Symbol 396 Button (40 B)
on (release) {
gotoAndStop ("party");
}
Symbol 400 Button (441 B)
on (release) {
var user = SharedObject.getLocal("knight_tactics");
user.data.game[currentGame].a = a;
user.data.game[currentGame].points = game.points;
user.data.game[currentGame].story = game.story;
user.data.game[currentGame].jobs = jobs;
if ((user.data.game[currentGame].a == a) && (user.data.game[currentGame].story == game.story)) {
message.text = "Game saved";
} else {
message.text = "Error game didn't save.";
}
}
Symbol 402 Button (39 B)
on (release) {
gotoAndStop ("load");
}
Symbol 403 Button (43 B)
on (release) {
gotoAndStop ("load map");
}
Symbol 404 Button (39 B)
on (release) {
gotoAndStop ("game");
}
Symbol 455 Button (109 B)
on (release) {
if (nodes.length >= (page + 10)) {
page = page + 10;
pag = pag + 1;
showList();
}
}
Symbol 456 Button (92 B)
on (release) {
if (page >= 10) {
page = page - 10;
pag = pag - 1;
showList();
}
}
Symbol 462 MovieClip Frame 1 (8 B)
stop();
Symbol 466 MovieClip Frame 1 (8 B)
stop();
Symbol 471 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 471 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 471 MovieClip Frame 41 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 471 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 471 MovieClip Frame 48 (8 B)
stop();
Symbol 471 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 471 MovieClip Frame 78 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 471 MovieClip Frame 93 (38 B)
gotoAndStop (1);
_root.showDamage();
Symbol 471 MovieClip Frame 103 (17 B)
gotoAndPlay (1);
Symbol 471 MovieClip Frame 112 (18 B)
_root.showCure();
Symbol 471 MovieClip Frame 119 (17 B)
gotoAndPlay (1);
Symbol 506 Button (25 B)
on (release) {
play();
}
Symbol 511 MovieClip Frame 1 (8 B)
stop();
Symbol 511 MovieClip Frame 10 (662 B)
var lo = ["squire", "alchemist", "drummer", "archer", "knight", "robber", "healer", "sorcerer", "spearman"];
i = 0;
while (i < 9) {
if (_root.jobs[lo[i]] != undefined) {
_root.change_jobs["q" + i].text = lo[i];
_root.change_jobs["b" + i].onRelease = function () {
_root.a[_root.target] = _root.change_jobs["q" + this._name.charAt(1)].text;
_root["aa" + _root.target].gotoAndStop(_root.change_jobs["q" + this._name.charAt(1)].text);
_root["aa" + _root.target].char.gotoAndStop(4);
_root["aa" + _root.target].char.char.gotoAndStop(1);
play();
};
} else {
_root.change_jobs["q" + i].text = "locked";
}
i++;
}
stop();
Symbol 511 MovieClip Frame 15 (37 B)
gotoAndStop (1);
_visible = false;
Symbol 512 Button (82 B)
on (release) {
target = "3";
change_jobs._visible = true;
change_jobs.play();
}
Symbol 513 Button (75 B)
on (release) {
page = "drummer";
learn.gotoAndStop(10);
jobCost = 800;
}
Symbol 514 Button (76 B)
on (release) {
page = "spearman";
learn.gotoAndStop(10);
jobCost = 790;
}
Symbol 515 Button (74 B)
on (release) {
page = "robber";
learn.gotoAndStop(10);
jobCost = 650;
}
Symbol 516 Button (76 B)
on (release) {
page = "sorcerer";
learn.gotoAndStop(10);
jobCost = 550;
}
Symbol 517 Button (74 B)
on (release) {
page = "healer";
learn.gotoAndStop(10);
jobCost = 450;
}
Symbol 518 Button (74 B)
on (release) {
page = "archer";
learn.gotoAndStop(10);
jobCost = 380;
}
Symbol 519 Button (74 B)
on (release) {
page = "knight";
learn.gotoAndStop(10);
jobCost = 300;
}
Symbol 520 Button (77 B)
on (release) {
page = "alchemist";
learn.gotoAndStop(10);
jobCost = 100;
}
Symbol 521 Button (58 B)
on (release) {
page = "squire";
learn.gotoAndStop(10);
}
Symbol 542 MovieClip Frame 1 (440 B)
stop();
a0 = "Throw Stone";
t0.text = a0 + " - Weak ranged attack";
c0.text = "90";
a1 = "Tackle";
t1.text = a1 + " - Weak unblockable hit";
c1.text = "100";
a2 = "Berserk";
t2.text = a2 + " - Increases your attack";
c2.text = "250";
a3 = "Share";
t3.text = a3 + " - Give Mp to restore an allies Hp";
c3.text = "300";
a4 = "Slash";
t4.text = a4 + " - Deal a powerful but inaccurate attack";
c4.text = "180";
_root.showAb();
Symbol 542 MovieClip Frame 2 (396 B)
a0 = "Potion";
t0.text = a0 + " - Restores 35 hp";
c0.text = "70";
a1 = "Super Potion";
t1.text = a1 + " - Restores 60 hp";
c1.text = "250";
a2 = "Angelwing";
t2.text = a2 + " - Revives a unit";
c2.text = "300";
a3 = "Elixir";
t3.text = a3 + " - Restores 40 mp";
c3.text = "210";
a4 = "Remedy";
t4.text = a4 + " - Removes bad effects from an ally";
c4.text = "90";
_root.showAb();
Symbol 542 MovieClip Frame 3 (443 B)
a0 = "Leg Swing";
t0.text = a0 + " - Stops an enemy from moving";
c0.text = "280";
a1 = "Arm Stab";
t1.text = a1 + " - Stops an enemy from acting";
c1.text = "280";
a2 = "Head Break";
t2.text = a2 + " - Lowers an enemies max hp";
c2.text = "200";
a3 = "Wand Break";
t3.text = a3 + " - Lowers an enemies max mp";
c3.text = "180";
a4 = "Sword Break";
t4.text = a4 + " - Lowers an enemies attack";
c4.text = "180";
_root.showAb();
Symbol 542 MovieClip Frame 4 (440 B)
a0 = "Long Shot";
t0.text = a0 + " - High range, low attack";
c0.text = "250";
a1 = "Bow Shot";
t1.text = a1 + " - Normal ranged attack";
c1.text = "100";
a2 = "Short Shot";
t2.text = a2 + " - Low range, high damage";
c2.text = "250";
a3 = "Poison Shot";
t3.text = a3 + " - adds effect poison";
c3.text = "190";
a4 = "Fire Shot";
t4.text = a4 + " - Normal ranged attack, deals bonus damage";
c4.text = "350";
_root.showAb();
Symbol 542 MovieClip Frame 5 (454 B)
a0 = "Heal";
t0.text = a0 + " - Restores 34 hp up to five units";
c0.text = "120";
a1 = "Heal 2";
t1.text = a1 + " - Restores 70 hp up to five units";
c1.text = "270";
a2 = "Regen";
t2.text = a2 + " - Ally units gain hp over turns";
c2.text = "190";
a3 = "Life";
t3.text = a3 + " - Brings an ally unit back to life";
c3.text = "270";
a4 = "Clear";
t4.text = a4 + " - Removes negative effects from allies";
c4.text = "120";
_root.showAb();
Symbol 542 MovieClip Frame 6 (465 B)
a0 = "Fire";
t0.text = a0 + " - Deals 29 damage to five enemies";
c0.text = "120";
a1 = "Fire 2";
t1.text = a1 + " - Deals 37 damage to five enemies";
c1.text = "230";
a2 = "Fire 3";
t2.text = a2 + " - Deals 65 damage to five enemies";
c2.text = "380";
a3 = "Poison";
t3.text = a3 + " - Targets take damage at the end of there turn";
c3.text = "190";
a4 = "Slow";
t4.text = a4 + " - Lowers up to five enemies speed";
c4.text = "160";
_root.showAb();
Symbol 542 MovieClip Frame 7 (448 B)
a0 = "Life Steal";
t0.text = a0 + " - Steals hp from an enemy";
c0.text = "210";
a1 = "Magic Steal";
t1.text = a1 + " - Steals mp from an enemy";
c1.text = "210";
a2 = "Atk Steal";
t2.text = a2 + " - Steals attack from an enemy";
c2.text = "180";
a3 = "Eva Steal";
t3.text = a3 + " - Steals evasion from an enemy";
c3.text = "180";
a4 = "Speed Steal";
t4.text = a4 + " - Steals speed from an enemy";
c4.text = "250";
_root.showAb();
Symbol 542 MovieClip Frame 8 (516 B)
a0 = "Earth Jab";
t0.text = a0 + " - Deals damage to enemies vertical or horizontal";
c0.text = "420";
a1 = "Thrust";
t1.text = a1 + " - Deal a two-fold attack but with low accuracy";
c1.text = "570";
a2 = "Javelin";
t2.text = a2 + " - A high accuracy ranged attack";
c2.text = "280";
a3 = "Polearm Spin";
t3.text = a3 + " - Deal damage to all the enemies around you";
c3.text = "180";
a4 = "Spear Swing";
t4.text = a4 + " - Deal a ranged attack to multiple enemies";
c4.text = "200";
_root.showAb();
Symbol 542 MovieClip Frame 9 (513 B)
a0 = "Life Song";
t0.text = a0 + " - Increases hp to all allies around you";
c0.text = "340";
a1 = "Atk Song";
t1.text = a1 + " - Increases attack to all allies around you";
c1.text = "280";
a2 = "Magic Song";
t2.text = a2 + " - Increases mp to all allies around you";
c2.text = "290";
a3 = "Eva Song";
t3.text = a3 + " - Increases evasion to all allies around you";
c3.text = "320";
a4 = "Speed Song";
t4.text = a4 + " - Increases speed to all allies around you";
c4.text = "350";
_root.showAb();
Symbol 542 MovieClip Frame 10 (25 B)
gotoAndStop(_root.page);
Symbol 553 Button (82 B)
on (release) {
target = "4";
change_jobs._visible = true;
change_jobs.play();
}
Symbol 554 Button (82 B)
on (release) {
target = "2";
change_jobs._visible = true;
change_jobs.play();
}
Symbol 555 Button (82 B)
on (release) {
target = "1";
change_jobs._visible = true;
change_jobs.play();
}
Symbol 556 Button (82 B)
on (release) {
target = "0";
change_jobs._visible = true;
change_jobs.play();
}
Symbol 562 MovieClip Frame 1 (8 B)
stop();
Symbol 565 MovieClip Frame 1 (8 B)
stop();
Symbol 570 MovieClip Frame 1 (8 B)
stop();
Symbol 574 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 574 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 574 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 574 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 574 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 574 MovieClip Frame 48 (8 B)
stop();
Symbol 574 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 574 MovieClip Frame 67 (18 B)
_root.showCure();
Symbol 577 MovieClip Frame 1 (8 B)
stop();
Symbol 578 MovieClip Frame 1 (8 B)
stop();
Symbol 579 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 579 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 579 MovieClip Frame 41 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 579 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 579 MovieClip Frame 48 (8 B)
stop();
Symbol 579 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 579 MovieClip Frame 66 (18 B)
_root.showCure();
Symbol 584 MovieClip Frame 1 (8 B)
stop();
Symbol 590 MovieClip Frame 1 (8 B)
stop();
Symbol 595 MovieClip Frame 1 (8 B)
play();
Symbol 595 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 595 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 595 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 595 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 595 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 595 MovieClip Frame 48 (8 B)
stop();
Symbol 595 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 595 MovieClip Frame 69 (20 B)
_root.showDamage();
Symbol 599 MovieClip Frame 1 (8 B)
stop();
Symbol 600 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 600 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 600 MovieClip Frame 41 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 600 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 600 MovieClip Frame 48 (8 B)
stop();
Symbol 600 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 600 MovieClip Frame 69 (20 B)
_root.showDamage();
Symbol 602 MovieClip Frame 1 (8 B)
stop();
Symbol 608 MovieClip Frame 1 (8 B)
stop();
Symbol 612 MovieClip Frame 1 (8 B)
play();
Symbol 612 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 612 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 612 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 612 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 612 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 612 MovieClip Frame 48 (8 B)
stop();
Symbol 612 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 612 MovieClip Frame 64 (26 B)
_root.showMultipleCure();
Symbol 616 MovieClip Frame 1 (8 B)
stop();
Symbol 617 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 617 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 617 MovieClip Frame 41 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 617 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 617 MovieClip Frame 48 (8 B)
stop();
Symbol 617 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 617 MovieClip Frame 64 (26 B)
_root.showMultipleCure();
Symbol 622 MovieClip Frame 1 (8 B)
stop();
Symbol 626 MovieClip Frame 1 (8 B)
stop();
Symbol 630 MovieClip Frame 1 (8 B)
stop();
Symbol 632 MovieClip Frame 1 (8 B)
play();
Symbol 632 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 632 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 632 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 632 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 632 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 632 MovieClip Frame 48 (8 B)
stop();
Symbol 632 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 632 MovieClip Frame 64 (88 B)
if (_root.abi == "Life") {
_root.showCure();
} else {
_root.showMultipleCure();
}
Symbol 635 MovieClip Frame 1 (8 B)
stop();
Symbol 638 MovieClip Frame 1 (8 B)
stop();
Symbol 639 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 639 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 639 MovieClip Frame 41 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 639 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 639 MovieClip Frame 48 (8 B)
stop();
Symbol 639 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 639 MovieClip Frame 64 (88 B)
if (_root.abi == "Life") {
_root.showCure();
} else {
_root.showMultipleCure();
}
Symbol 641 MovieClip Frame 1 (8 B)
stop();
Symbol 644 MovieClip Frame 1 (8 B)
stop();
Symbol 648 MovieClip Frame 1 (8 B)
stop();
Symbol 652 MovieClip Frame 1 (8 B)
play();
Symbol 652 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 652 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 652 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 652 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 652 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 652 MovieClip Frame 48 (8 B)
stop();
Symbol 652 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 652 MovieClip Frame 63 (22 B)
_root.showMultiple();
Symbol 655 MovieClip Frame 1 (8 B)
stop();
Symbol 656 MovieClip Frame 1 (8 B)
stop();
Symbol 657 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 657 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 657 MovieClip Frame 41 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 657 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 657 MovieClip Frame 48 (8 B)
stop();
Symbol 657 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 657 MovieClip Frame 64 (22 B)
_root.showMultiple();
Symbol 663 MovieClip Frame 1 (8 B)
stop();
Symbol 669 MovieClip Frame 1 (8 B)
stop();
Symbol 671 MovieClip Frame 1 (8 B)
play();
Symbol 671 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 671 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 671 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 671 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 671 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 671 MovieClip Frame 48 (8 B)
stop();
Symbol 671 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 671 MovieClip Frame 60 (18 B)
_root.showCure();
Symbol 673 MovieClip Frame 1 (8 B)
stop();
Symbol 675 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 675 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 675 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 675 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 675 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 675 MovieClip Frame 48 (8 B)
stop();
Symbol 675 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 680 MovieClip Frame 1 (8 B)
stop();
Symbol 683 MovieClip Frame 1 (8 B)
play();
Symbol 683 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 39 (20 B)
_root.showDamage();
Symbol 683 MovieClip Frame 41 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 42 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 683 MovieClip Frame 48 (8 B)
stop();
Symbol 683 MovieClip Frame 59 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 74 (20 B)
_root.showDamage();
Symbol 683 MovieClip Frame 78 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 87 (20 B)
_root.showDamage();
Symbol 683 MovieClip Frame 93 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 103 (17 B)
gotoAndPlay (1);
Symbol 683 MovieClip Frame 112 (18 B)
_root.showCure();
Symbol 688 MovieClip Frame 1 (8 B)
stop();
Symbol 695 MovieClip Frame 1 (8 B)
stop();
Symbol 699 MovieClip Frame 1 (8 B)
play();
Symbol 699 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 699 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 699 MovieClip Frame 38 (20 B)
_root.showDamage();
Symbol 699 MovieClip Frame 42 (17 B)
gotoAndPlay (1);
Symbol 699 MovieClip Frame 43 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 699 MovieClip Frame 49 (8 B)
stop();
Symbol 699 MovieClip Frame 60 (17 B)
gotoAndPlay (1);
Symbol 699 MovieClip Frame 65 (22 B)
_root.showMultiple();
Symbol 699 MovieClip Frame 70 (17 B)
gotoAndPlay (1);
Symbol 699 MovieClip Frame 75 (20 B)
_root.showDamage();
Symbol 699 MovieClip Frame 80 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 699 MovieClip Frame 90 (20 B)
_root.showDamage();
Symbol 701 MovieClip Frame 1 (8 B)
stop();
Symbol 702 MovieClip Frame 1 (8 B)
stop();
Symbol 703 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 703 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 703 MovieClip Frame 40 (20 B)
_root.showDamage();
Symbol 703 MovieClip Frame 42 (17 B)
gotoAndPlay (1);
Symbol 703 MovieClip Frame 43 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 703 MovieClip Frame 49 (8 B)
stop();
Symbol 703 MovieClip Frame 60 (17 B)
gotoAndPlay (1);
Symbol 703 MovieClip Frame 65 (22 B)
_root.showMultiple();
Symbol 703 MovieClip Frame 70 (17 B)
gotoAndPlay (1);
Symbol 703 MovieClip Frame 75 (20 B)
_root.showDamage();
Symbol 703 MovieClip Frame 80 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 703 MovieClip Frame 90 (20 B)
_root.showDamage();
Symbol 709 MovieClip Frame 1 (8 B)
stop();
Symbol 712 MovieClip Frame 1 (8 B)
stop();
Symbol 716 MovieClip Frame 1 (8 B)
stop();
Symbol 720 MovieClip Frame 1 (8 B)
play();
Symbol 720 MovieClip Frame 24 (17 B)
gotoAndPlay (1);
Symbol 720 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 720 MovieClip Frame 38 (20 B)
_root.showDamage();
Symbol 720 MovieClip Frame 47 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 720 MovieClip Frame 48 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 720 MovieClip Frame 54 (8 B)
stop();
Symbol 720 MovieClip Frame 65 (17 B)
gotoAndPlay (1);
Symbol 720 MovieClip Frame 70 (20 B)
_root.showDamage();
Symbol 723 MovieClip Frame 1 (8 B)
stop();
Symbol 726 MovieClip Frame 1 (8 B)
stop();
Symbol 727 MovieClip Frame 23 (17 B)
gotoAndPlay (1);
Symbol 727 MovieClip Frame 33 (17 B)
gotoAndPlay (1);
Symbol 727 MovieClip Frame 38 (20 B)
_root.showDamage();
Symbol 727 MovieClip Frame 47 (38 B)
_root.showDamage();
gotoAndPlay (1);
Symbol 727 MovieClip Frame 48 (128 B)
if (_parent._name.charAt(0) == "a") {
_root.ally[_parent._name].dead = 2;
} else {
_root.enemy[_parent._name].dead = 2;
}
Symbol 727 MovieClip Frame 54 (8 B)
stop();
Symbol 727 MovieClip Frame 65 (17 B)
gotoAndPlay (1);
Symbol 727 MovieClip Frame 70 (20 B)
_root.showDamage();
Symbol 731 Button (40 B)
on (release) {
gotoAndStop ("title");
}
Symbol 737 Button (1.1 KiB) ●
on (release) {
dateTime = new Date();
if (dateTime.getDate() == user.data.submit) {
if (((upload && (_root.by.text.length > 2)) && (_root.by.text.length <= 10)) && (_root.by.text.toLowerCase() != "lautan")) {
var k = user.data.maps[game.saveMap];
loading._visible = true;
error.text = "Please wait...";
newEntry = new LoadVars();
newEntry.ref = this;
newEntry.submit = "Yes";
newEntry.title = k.name;
newEntry.by = _root.by.text;
newEntry.map = decoder(k.map);
newEntry.enemies = decoder(k.enemies);
newEntry.allies = decoder(k.allies);
newEntry.sendAndLoad("http://www.throwtheproject.com/data_kt.php?action=write", newEntry, "POST");
newEntry.onLoad = function (success) {
if (success) {
user.data.submit = dateTime.getDate();
error.text = this.val;
loading._visible = false;
} else {
error.text = "Error could not send";
loading._visible = false;
}
};
} else {
error.text = "Select a map and/or enter a username for credit.";
}
} else {
error.text = "You have already submitted a game today.";
}
}
Symbol 785 Button (64 B)
on (release) {
if (e < 5) {
e = e + 1;
ee.text = e;
}
}
Symbol 786 Button (64 B)
on (release) {
if (e > 1) {
e = e - 1;
ee.text = e;
}
}
Symbol 788 Button (64 B)
on (release) {
if (a < 5) {
a = a + 1;
aa.text = a;
}
}
Symbol 789 Button (64 B)
on (release) {
if (a > 1) {
a = a - 1;
aa.text = a;
}
}
Symbol 791 Button (65 B)
on (release) {
if (w < 13) {
w = w + 1;
ww.text = w;
}
}
Symbol 792 Button (64 B)
on (release) {
if (w > 5) {
w = w - 1;
ww.text = w;
}
}
Symbol 793 Button (64 B)
on (release) {
if (h > 5) {
h = h - 1;
hh.text = h;
}
}
Symbol 794 Button (65 B)
on (release) {
if (h < 13) {
h = h + 1;
hh.text = h;
}
}
Symbol 801 Button (91 B)
on (release) {
_root.makeEditor(ww.text, hh.text, aa.text, ee.text);
_visible = false;
}
Symbol 805 MovieClip Frame 1 (31 B)
a = 5;
e = 5;
w = 6;
h = 7;