Frame 1
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
MochiAd.showPreloaderAd({id:"b57db63438c326dc", res:"550x500"});
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndStop ("loading");
}
Frame 5
stop();
stop();
Instance of Symbol 74 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
_game_name = "genghis_khan";
score_var = "_root.score";
}
Frame 7
function globalInit() {
if (bGlobalInited) {
return(undefined);
}
sHard = "MEDIUM";
_quality = "HIGH";
bFistNoted = false;
bGlobalInited = true;
bShowRoll = false;
bShowPut = false;
bShowMode = false;
bTeached = false;
bFightModeSeted = false;
aGold = {BEGINNER:400, EASY:400, MEDIUM:400, HARD:350, INSANE:300};
oGoldRate = {BEGINNER:0.06, EASY:0.045, MEDIUM:0.035, HARD:0.025, INSANE:0.02};
aExpRate = {BEGINNER:1, EASY:1, MEDIUM:1, HARD:0.9, INSANE:0.7};
aScoreRate = {BEGINNER:0.5, EASY:0.75, MEDIUM:1, HARD:1.25, INSANE:1.5};
aRoleType = new Array("cavalry", "pike", "sword", "bow", "medic");
aStandDis = new Array(40, 35, 30, 100, 50);
aHitDis = new Array(500, 500, 500, 500, 500);
aSpeed = new Array(4, 3, 3, 2.6);
aFightMode = ["normal", "berserker", "aggressive", "defensive", "tactical"];
maxBerPW = 0.3;
maxBerHP = -0.2;
minBerPW = -0.2;
berPWStep = 0.015;
maxAggPW = 0.1;
maxAggHP = -0.1;
minAggPW = -0.1;
aggPWStep = 0.01;
maxDefenPW = -0.1;
maxDefenHP = 0.2;
maxTactPW = -0.05;
maxTactHP = 0;
nMaxUpLevel = 12;
aCost = new Array(60, 25, 20, 25, 20);
aPower = new Array(20, 12, 8, 10, 10);
aHitPoint = new Array(300, 200, 200, 100, 100);
aCostUpRate = new Array(0.15, 0.18, 0.18, 0.2);
aPowerUpRate = new Array(0.15, 0.15, 0.15, 0.2);
aHpUpRate = new Array(0.1, 0.15, 0.1, 0.15);
upDRate = 0.003;
minRate = 0.05;
oCavalryRate = {Plain:0.1, Forest:-0.4, GrassLand:0.2, Mountain:-0.5};
oPikeRate = {Plain:0.15, Forest:-0.1, GrassLand:0.1, Mountain:0.05};
oSwordRate = {Plain:-0.05, Forest:0.05, GrassLand:-0.1, Mountain:0};
oBowRate = {Plain:0.2, Forest:-0.15, GrassLand:0.15, Mountain:0};
oCavalryPowerRate = {Plain:0.15, Forest:-0.4, GrassLand:0.3, Mountain:-0.4};
oPikePowerRate = {Plain:0.2, Forest:-0.3, GrassLand:0.1, Mountain:0.05};
oSwordPowerRate = {Plain:-0.05, Forest:0.05, GrassLand:-0.1, Mountain:0};
oBowPowerRate = {Plain:0.1, Forest:-0.25, GrassLand:0.2, Mountain:-0.2};
brightTrans = {ra:100, rb:255, ga:100, gb:-255, ba:100, bb:255, aa:100, ab:0};
selTrans = {ra:100, rb:255, ga:100, gb:255, ba:100, bb:255, aa:100, ab:0};
normalTrans = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
mongColor = 16737792 /* 0xFF6600 */;
loadSceneMask();
initSoundArray();
loadSD();
initMusic();
initSD();
}
function loadSceneMask() {
kill(sceneMasker);
newMasker();
}
function clearScene() {
var _local3 = new Array("mcRetreat", "mcLevel", "mcLayout", "mcMenu", "mcPause", "mcPass", "mcOver", "mcEnd");
for (var _local4 in _local3) {
var _local2 = _root[_local3[_local4]];
kill(_local2);
}
}
function activeGame() {
bPause = false;
trace("::::\u6E38\u620F\u88AB\u6FC0\u6D3B\uFF01::::");
}
function pauseGame() {
bPause = true;
trace("::::\u6E38\u620F\u6682\u505C\uFF01::::");
}
function initGame() {
bRetreat = false;
bLoad = false;
bInstructions = false;
noteTxt = "";
globalHardRate = 0.6;
nLevel = 1;
nMaxLevel = 56;
nMissionLevel = Math.floor(nMaxLevel * 0.75);
nouseGold = 0;
soldierBonusGold = 0;
bonusGold = 0;
disGold = gold;
prevGold = gold;
scoreRate = aScoreRate[sHard];
gold = aGold[sHard];
goldRate = oGoldRate[sHard];
expRate = aExpRate[sHard];
sScore = 1;
liveCost = 0;
liveCostRate = 0.008;
nousedNum = 0;
interest = 0.1;
levelScore = 0;
score = 0;
levelUnit = 100;
goldStep = 0.5;
expStep = 3;
expUnit = 50;
speedTimes = 1;
fightMode = aFightMode[0];
aLastRole = new Array();
aPrevLastRole = new Array();
aMap.resetConquered();
aConquered = new Array();
aConquered.push("Mongolia");
aLeave = new Array();
landShape = "GrassLand";
aEnemyLevel = new Array();
aEnemyShape = new Array();
enemyPower = null;
selfPower = null;
missionID = null;
missionNum = missionID + 1;
aMCountry = new Array();
aMConquered = new Array();
initMissions();
initGold();
shape = new as.Shape();
map = new as.Map();
aMap = map.aMap;
getACountry();
}
function gameReset() {
trace("\u6E38\u620F\u88AB\u91CD\u7F6E");
bStart = false;
bPause = false;
bPass = false;
bOver = false;
bEnd = false;
levelScore = 0;
liveCost = 0;
rivalCountry = null;
enemyFightMode = aFightMode[Math.floor(Math.random() * aFightMode.length)];
}
function initGold() {
gold = aGold[sHard];
goldRate = oGoldRate[sHard];
scoreRate = aScoreRate[sHard];
expRate = aExpRate[sHard];
disGold = gold;
}
function teachRoll() {
if (bTeached) {
return(undefined);
}
if (bShowRoll) {
return(undefined);
}
bShowRoll = true;
trace("\u5F00\u59CB\u6559\u5B66\uFF01" + mcLayout.mcTeachRoll);
mcLayout.mcTeachRoll.gotoAndPlay("start");
}
function teachPut() {
if (bTeached) {
return(undefined);
}
if (bShowPut) {
return(undefined);
}
if (!bShowRoll) {
return(undefined);
}
bShowPut = true;
mcLayout.mcTeachRoll.gotoAndStop(1);
mcLayout.mcTeachPut.gotoAndPlay("start");
}
function endTeach() {
if (bTeached) {
return(undefined);
}
if (!bShowPut) {
return(undefined);
}
mcLayout.mcTeachPut.gotoAndStop(1);
bTeached = true;
}
function endAllTeach() {
bTeached = true;
mcLayout.mcTeachRoll.gotoAndStop(1);
mcLayout.mcTeachPut.gotoAndStop(1);
}
function alrm(_sort, _id) {
trace("\u5F39\u51FA\u8B66\u544A");
var _local4 = new Array();
_local4.push("Please select one record to load!");
_local4.push("No record to load!");
var _local1 = new Array();
_local1.push("You can not fight with this country!");
_local1.push("This country has been conquered!");
_local1.push("Please select one country to fight!");
_local1.push("Please select one mission to start fight!");
var _local2 = new Array();
_local2.push("Please select fight mode!");
_local2.push("Not enough money!");
_local2.push("Place the soldier in the staging area!");
var _local3 = new Array();
_local3.push("Please enter your name!");
_local3.push("Please select one row to record!");
switch (_sort) {
case "load" :
noteTxt = _local4[_id];
var _local6 = mcStart.mcNote;
trace("\u5F39\u51FA\u5BFC\u5165\u8B66\u544A");
break;
case "map" :
noteTxt = _local1[_id];
_local6 = mcStart.mcNote;
trace("\u5F39\u51FA\u5730\u56FE\u8B66\u544A");
break;
case "layout" :
noteTxt = _local2[_id];
_local6 = mcLayout.mcNote;
trace("\u5F39\u51FA\u754C\u9762\u8B66\u544A");
break;
case "save" :
noteTxt = _local3[_id];
_local6 = mcPass.mcNote;
trace("\u5F39\u51FA\u5B58\u50A8\u8B66\u544A");
}
_local6.gotoAndPlay(2);
}
function getCurrTime() {
var _local1 = new Date();
currYear = _local1.getFullYear();
currMonth = _local1.getMonth();
currDate = _local1.getDate();
currTime = (((currYear + "/") + currMonth) + "/") + currDate;
}
function stSaveGame(_useName, _selID) {
var _local3 = _useName;
var _local2 = _selID;
trace((("\u8BB0\u5F55\u524Dgold: " + gold) + " ") + disGold);
getCurrTime();
aConquered = getConquered();
var _local1 = SharedObject.getLocal("userPreferences");
_local1.data["record" + _local2] = {name:_local3, time:currTime, missionNum:missionNum, power:selfPower, gold:gold, score:score, aLastRole:aLastRole, aConquered:aConquered, sHard:sHard};
_local1.flush();
trace((((("\u8BB0\u5F55\u540D\u5B57: " + _local1.data["record" + _local2].name) + " gold: ") + gold) + " ") + disGold);
}
function stLoadGame(_recordID) {
var _local2 = _recordID;
var _local1 = getLoad(_local2);
sHard = _local1.sHard;
initGold();
missionNum = _local1.missionNum;
missionID = missionNum - 1;
gold = Math.floor(_local1.gold);
disGold = gold;
trace((("disGold = gold: " + disGold) + " = ") + gold);
aLastRole = _local1.aLastRole;
aConquered = _local1.aConquered;
if (_local1.score) {
score = _local1.score;
}
setConquered();
bRetreat = true;
}
function getLoad(_recordID) {
var _local1 = SharedObject.getLocal("userPreferences");
var _local2 = _recordID;
return(_local1.data["record" + _local2]);
}
function getLastRole() {
aLastRole = new Array();
for (var _local5 in mcLevel.aRole) {
var _local1 = mcLevel.aRole[_local5];
aLastRole.push({nTypeID:_local1.nTypeID, nLevel:_local1.nLevel, exper:_local1.exper});
}
aPrevLastRole = aLastRole.slice();
}
function initMissions() {
aAllMCounty = new Array();
aAllMCounty.push(["Korea", "Japan", "Vietnam", "Laos", "Cambodia", "Thailand", "Burma"]);
aAllMCounty.push(["Kazakhstan"]);
aAllMCounty.push(["Syria", "Iraq", "Israel", "Jordan", "Saudi", "Yemen", "UnitedArab", "Aman", "Kuwait"]);
aAllMCounty.push(["India", "Russia"]);
aAllMCounty.push(["Greece"]);
aAllMCounty.push(["Germany"]);
aMBonus = new Array(500, 1000, 1500, 2000, 2500, 3000, 4000, 5000);
}
function setMission(_id) {
missionID = _id;
missionNum = missionID + 1;
if (missionID <= 5) {
getMCountry();
}
var _local3 = new Array(-60, 80, 260, 30, 300, 300, -60, -60);
mcStart.tMission.text = "Mission: " + (missionID + 1);
var _local1 = mcStart.mcMap._x;
mcStart.mcMap._x = _local3[missionID];
var _local2 = mcStart.mcMap._x - _local1;
mcStart.mcArrow._x = mcStart.mcArrow._x + _local2;
initMissionMark();
disMissionMark();
}
function getMCountry() {
aMCountry = aAllMCounty[missionID].slice();
trace(aMCountry);
}
function getConNum() {
aConquered = getConquered();
return(aConquered.length);
}
function initMissionMark() {
var _local3 = mcStart.mcMap.map;
for (var _local5 in aAllMCounty) {
var _local2 = aAllMCounty[_local5];
for (var _local4 in _local2) {
var _local1 = _local2[_local4];
_local3["mark" + _local1]._visible = false;
}
}
if (missionID != null) {
mcStart.tMission.text = "Mission: " + (missionID + 1);
} else {
mcStart.tMission.text = "";
}
}
function disMissionMark() {
var _local2 = mcStart.mcMap.map;
for (var _local3 in aMCountry) {
var _local1 = aMCountry[_local3];
_local2["mark" + _local1]._visible = true;
checkMConquered();
}
}
function checkMConquered() {
aMConquered = new Array();
var _local2 = mcStart.mcMap.map;
for (var _local4 in aMCountry) {
var _local1 = aMCountry[_local4];
for (var _local3 in aMap) {
if (_local1 == aMap[_local3].country) {
if (aMap[_local3].bConquered) {
_local2["mark" + _local1].gotoAndStop("on");
aMConquered.push(_local1);
trace(aMConquered);
}
}
}
}
}
function checkMEnd() {
trace((((((missionID + " ") + aMConquered.length) + " ") + nMaxLevel) + " ") + aConquered.length);
if (missionID == 7) {
if (aConquered.length == nMaxLevel) {
bEnd = true;
}
} else if (missionID == 6) {
if (aConquered.length == nMissionLevel) {
bEnd = true;
}
} else {
checkMConquered();
if (aMConquered.length == aMCountry.length) {
bEnd = true;
}
}
}
function setPrevGold() {
prevGold = gold;
}
function getPrevGold() {
gold = prevGold;
disGold = Math.floor(gold);
}
function setFightMode(_ID) {
if (bStart) {
return(undefined);
}
fightMode = aFightMode[_ID];
bFightModeSeted = true;
mcLayout.mcFightMode.rest();
mcLayout.mcFightMode.disSel();
}
function getLandRate(_sType, _land) {
var _local3 = 0;
switch (_sType) {
case "cavalry" :
rate1 = _root.oCavalryRate[_land];
rate2 = _root.oCavalryPowerRate[_land];
break;
case "pike" :
rate1 = _root.oPikeRate[_land];
rate2 = _root.oPikePowerRate[_land];
break;
case "sword" :
rate1 = _root.oSwordRate[_land];
rate2 = _root.oSwordPowerRate[_land];
break;
case "bow" :
rate1 = _root.oBowRate[_land];
rate2 = _root.oBowPowerRate[_land];
}
return([rate1, rate2]);
}
function stSelMap() {
mcStart.gotoAndStop("map");
}
function getACountry() {
aCountry = new Array();
for (var _local1 in aMap) {
aCountry.push(aMap[_local1].country);
}
}
function getANeighbor(_country) {
for (var _local2 in aMap) {
if (aMap[_local2].country == _country) {
return(aMap[_local2].aNeighbor);
}
}
}
function getConquered() {
aConquered = new Array();
var _local2 = mcStart.mcMap.map;
for (var _local1 in aMap) {
if (aMap[_local1].bConquered) {
aConquered.push(aMap[_local1].country);
}
}
return(aConquered);
}
function setConquered() {
for (var _local2 in aConquered) {
for (var _local1 in aMap) {
if (aMap[_local1].country == aConquered[_local2]) {
aMap[_local1].bConquered = true;
}
}
}
}
function resetConquered() {
for (var _local1 in aMap) {
if (aMap[_local1].country != "Mongolia") {
aMap[_local1].bConquered = false;
}
}
}
function setColorConquered() {
rivalCountry = null;
var _local3 = mcStart.mcMap.map;
for (var _local4 in aMap) {
var _local2 = new Color(_local3[aMap[_local4].country]);
if (aMap[_local4].bConquered) {
_local2.setRGB(_root.mongColor);
}
}
}
function getLastCountry() {
return(aConquered[aConquered.length - 1]);
}
function selRivalCountry(_country) {
var _local3 = false;
for (var _local5 in aMap) {
if (!aMap[_local5].bConquered) {
continue;
}
var _local1 = getANeighbor(aMap[_local5].country);
for (var _local4 in _local1) {
if (_local1[_local4] == _country) {
_local3 = true;
break;
}
}
}
if (!_local3) {
alrm("map", 0);
return(undefined);
}
for (var _local5 in aConquered) {
if (_country == aConquered[_local5]) {
alrm("map", 1);
return(undefined);
}
}
var _local6 = mcStart.mcMap.map;
var _local7 = new Color(_local6[rivalCountry]);
_local7.setTransform(normalTrans);
rivalCountry = _country;
mcStart.mcArrow._x = _xmouse;
mcStart.mcArrow._y = _ymouse;
_local7 = new Color(_local6[rivalCountry]);
_local7.setTransform(selTrans);
getLand();
}
function getLand() {
for (var _local1 in aMap) {
if (aMap[_local1].country == rivalCountry) {
landShape = aMap[_local1].land;
return(undefined);
}
}
}
function addConquered(_rivalCountry) {
aConquered.push(_rivalCountry);
for (var _local2 in aMap) {
if (aMap[_local2].country == _rivalCountry) {
aMap[_local2].bConquered = true;
return(undefined);
}
}
}
function getALeave() {
aLeave = new Array();
for (var _local1 in aMap) {
if (!aMap[_local1].bConquered) {
aLeave.push(aMap[_local1].country);
}
}
}
function disMapNote(_country) {
var _local9 = mcStart.mcMapNote;
if (_country) {
_local9.gotoAndStop(2);
}
for (var _local11 in aMap) {
if (_country == aMap[_local11].country) {
if (_country == "Mongolia") {
var _local5 = aMap[_local11].land;
var _local7 = aLastRole.length;
power = gold * 5;
for (var _local10 in aLastRole) {
var _local2 = aLastRole[_local10].nLevel;
var _local1 = aLastRole[_local10].nTypeID;
var _local3 = getUpgradNum(aCost[_local1], aCostUpRate[_local1], _local2);
power = power + (_local3 * 5);
}
} else {
var _local5 = aMap[_local11].land;
var power = aMap[_local11].oPower.power;
var _local7 = aMap[_local11].oPower.soldierNum;
var _local8 = aMap[_local11].oPower.aLevel;
var _local6 = aMap[_local11].oPower.aShape;
}
}
}
selfPower = gold * 5;
for (var _local10 in aLastRole) {
var _local2 = aLastRole[_local10].nLevel;
var _local1 = aLastRole[_local10].nTypeID;
var _local3 = getUpgradNum(aCost[_local1], aCostUpRate[_local1], _local2);
selfPower = selfPower + (_local3 * 5);
}
_local9.tSelfPower.text = Math.floor(selfPower);
_local9.tCountry.text = _country;
_local9.tLand.text = _local5;
_local9.tPower.text = Math.floor(power);
_local9.tSoldierNum.text = Math.floor(_local7);
enemyPower = power;
selfPower = selfPower;
aEnemyLevel = _local8;
aEnemyShape = _local6;
}
function getUpgradNum(_baseNum, _rate, _nLevel, _type, _roleType) {
var _local9 = new Object();
var _local6 = getLandRate(_roleType, landShape)[0];
var _local5 = getLandRate(_roleType, landShape)[1];
if (_type == "power") {
_baseNum = _baseNum + (_local5 * _baseNum);
} else if (_type == "hitPoint") {
_baseNum = _baseNum + (_local6 * _baseNum);
}
var _local3 = (_nLevel * levelUnit) / expUnit;
var _local1 = 0;
while (_local1 < _local3) {
_baseNum = Math.floor(_baseNum * (1 + getUpRate(_rate, _local3)));
_local1++;
}
return(_baseNum);
}
function getUpRate(_rate, _level) {
var _local1 = _rate;
_local1 = _local1 * 1.5;
var _local2 = upDRate * 1;
_local1 = _local1 - (upDRate * _level);
if (_local1 < minRate) {
_local1 = minRate;
}
return(_local1);
}
function loadLevel() {
atMc(this, "mcLevel", "mcLevel");
atMc(this, "mcLayout");
loadSceneMask();
mcLevel._visible = false;
mcLayout._visible = false;
}
function playGame() {
turnTo("gameScene");
clearScene();
gameReset();
loadLevel();
mcLevel._visible = false;
mcLayout._visible = false;
}
function loadGame() {
bLoad = true;
turnTo("gameScene");
clearScene();
gameReset();
loadLevel();
mcLevel._visible = false;
mcLayout._visible = false;
}
function startGame() {
bStart = true;
}
function tryAgain() {
clearScene();
initGame();
gameReset();
turnTo("gameScene");
loadLevel();
}
function continueGame() {
bRetreat = true;
aLastRole = aPrevLastRole.slice();
score = score * 0.7;
score = floor(score);
getPrevGold();
clearScene();
gameReset();
turnTo("gameScene");
loadLevel();
}
function playMoreMissions() {
clearScene();
initGame();
gameReset();
bRetreat = true;
turnTo("gameScene");
loadLevel();
}
function nextLevel() {
bRetreat = true;
clearScene();
gameTime = levelTime;
nLevel = nLevel + 1;
gameReset();
turnTo("gameScene");
loadLevel();
}
function instructions() {
bInstructions = true;
turnTo("gameScene");
}
function backToFrontPage() {
turnTo("frontPage");
}
function initLayoutBt(mc) {
mc.btPlay.onPress = function () {
_root.playGame();
};
mc.btReturn.onPress = function () {
_root.bPause = false;
this._parent.removeMovieClip();
};
mc.btContinue.onPress = function () {
_root.continueGame();
};
mc.btTryAgain.onPress = function () {
_root.tryAgain();
};
mc.btNextLevel.onPress = function () {
_root.nextLevel();
};
mc.btInstructions.onPress = function () {
_root.instructions();
};
mc.btViewScore.onPress = function () {
viewHighscore();
};
mc.btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
mc.btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
mc.btSetting.onPress = function () {
};
mc.btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
mc.btMainMenu.onPress = function () {
turnTo("frontPage");
};
}
function initSoundArray() {
aSDType = new Array("aMusic", "aSound");
aMusic = new Array("mainMusic");
aSound = new Array("sdBow ", "sdPike", "sdSword");
aMuscVol = new Array();
aMuscVol.push(20);
aSoundVol = new Array(10, 10, 10);
bMusicOn = true;
bSoundOn = true;
musicHolder = newMc(_root, "musicHolder");
sdHolder = newMc(_root, "sdHolder");
}
function loadSD() {
for (var _local8 in aSDType) {
var _local3 = _root[aSDType[_local8]];
var _local7 = _local3.length;
var _local2 = 0;
while (_local2 < _local7) {
var _local4 = _local3[_local2];
var _local5 = _local4 + "mc";
var _local6 = newMc(_root, _local5);
_root[_local3[_local2]] = new Sound(_local6);
_root[_local3[_local2]].attachSound(_local4);
if (_local3 == aMusic) {
_root[_local3[_local2]].setVolume(aMuscVol[_local2]);
} else if (_local3 == aSound) {
_root[_local3[_local2]].setVolume(aSoundVol[_local2]);
}
_local2++;
}
}
mainMusic.start(0, 999);
}
function initMusic() {
var _local4 = aMusic.length;
var _local2 = 0;
while (_local2 < _local4) {
if (bMusicOn) {
var _local3 = aMuscVol[_local2];
} else {
var _local3 = 0;
}
_root[aMusic[_local2]].setVolume(_local3);
_local2++;
}
}
function initSD() {
var _local4 = aSound.length;
var _local2 = 0;
while (_local2 < _local4) {
if (bSoundOn) {
var _local3 = aSoundVol[_local2];
} else {
var _local3 = 0;
}
_root[aSound[_local2]].setVolume(_local3);
_local2++;
}
}
new global.GlobalFun();
stop();
trace("::::\u8FDB\u5165\u6E38\u620F\u9996\u9875::::");
globalInit();
clearScene();
mcFrontPage.gotoAndStop("in");
initGame();
initLayoutBt(this);
Frame 21
function initAfterMap() {
trace("\u5730\u56FE\u52A0\u8F7D\u540E\u6267\u884C\u521D\u59CB\u5316!");
disMapNote(rivalCountry);
mcLevel._visible = true;
mcLayout._visible = true;
mcLayout.trans.gotoAndPlay(1);
mcLayout.mcLand.gotoAndStop(landShape);
mcLevel.createCastle();
mcLevel.addEnemy();
mcLevel.initLastRole();
setPrevGold();
initRoleModeDis();
initEnemyModeDis();
bRetreat = false;
bLoad = false;
_root.bFistNoted = true;
teachRoll();
}
function initRoleModeDis() {
mcLayout.mcRoleMode.gotoAndStop(fightMode);
}
function initEnemyModeDis() {
mcLayout.mcEnemyMode.gotoAndStop(enemyFightMode);
}
function getLiveCost() {
liveCost = 0;
for (var _local2 in mcLevel.aRole) {
var _local1 = mcLevel.aRole[_local2];
if (!_local1.bHold) {
liveCost = liveCost + (_local1.cost * liveCostRate);
}
}
liveCost = Math.floor(liveCost);
lossGold(liveCost);
}
function changeSpeed() {
speedTimes = speedTimes + 1;
if (speedTimes > 4) {
speedTimes = 1;
}
checkSpeedButton();
}
function checkSpeedButton() {
mcLayout.mcSpeedCtr.gotoAndStop(speedTimes);
}
function retreatAlarm() {
mcLayout.mcAskRetreat._visible = true;
bPause = true;
}
function killRetreatAlarm() {
mcLayout.mcAskRetreat._visible = false;
bPause = false;
}
function stRetreat() {
mcLayout.mcAskRetreat._visible = false;
trace("\u64A4\u9000");
turnTo("temp");
getLastRole();
bPause = true;
atMc(this, "mcRetreat");
kill(mcLevel);
delete onEnterFrame;
}
function retreat() {
score = score * 0.9;
gold = gold * 0.9;
score = floor(score);
gold = floor(gold);
disGold = gold;
clearScene();
gameReset();
turnTo("gameScene");
loadLevel();
mcLevel._visible = false;
mcLayout._visible = false;
bRetreat = true;
}
function disLandHP(typeID) {
sType = aRoleType[typeID];
var _local12 = getLandRate(sType, "Plain");
var _local10 = getLandRate(sType, "Forest");
var _local9 = getLandRate(sType, "GrassLand");
var _local11 = getLandRate(sType, "Mountain");
var _local2 = _local12[0] * 100;
var _local3 = _local10[0] * 100;
var _local7 = _local9[0] * 100;
var _local6 = _local11[0] * 100;
var _local4 = _local12[1] * 100;
var _local1 = _local10[1] * 100;
var _local8 = _local9[1] * 100;
var _local5 = _local11[1] * 100;
if (_local2 > 0) {
_local2 = "+" + _local2;
}
if (_local3 > 0) {
_local3 = "+" + _local3;
}
if (_local7 > 0) {
_local7 = "+" + _local7;
}
if (_local6 > 0) {
_local6 = "+" + _local6;
}
if (_local4 > 0) {
_local4 = "+" + _local4;
}
if (_local1 > 0) {
_local1 = "+" + _local1;
}
if (_local8 > 0) {
_local8 = "+" + _local8;
}
if (_local5 > 0) {
_local5 = "+" + _local5;
}
mcLayout.mcAttr.tPlainHP.text = _local2;
mcLayout.mcAttr.tForestHP.text = _local3;
mcLayout.mcAttr.tGrassHP.text = _local7;
mcLayout.mcAttr.tMountainHP.text = _local6;
mcLayout.mcAttr.tPlainPW.text = _local4;
mcLayout.mcAttr.tForestPW.text = _local1;
mcLayout.mcAttr.tGrassPW.text = _local8;
mcLayout.mcAttr.tMountainPW.text = _local5;
}
function lossGold(_gold) {
gold = gold - _gold;
if (gold < 0) {
gold = 0;
}
disGold = Math.floor(gold);
}
function addGold(_gold) {
if (isNaN(_gold)) {
return(undefined);
}
gold = gold + _gold;
disGold = Math.floor(gold);
}
function addScore(_score) {
if (isNaN(_score)) {
return(undefined);
}
score = score + Math.ceil(_score * scoreRate);
}
function levelStart() {
if (!bFightModeSeted) {
alrm("layout", 0);
return(undefined);
}
mcLayout.mcFightMode.gotoAndStop(1);
mcLayout.mcBTStart.gotoAndStop(2);
hideMcAttr();
startGame();
mcLevel.getEnemyCoord();
mcLevel.activeRole();
mcLevel.resetAllTile();
mcLevel.initFightMode();
endAllTeach();
initRoleDis();
}
function support() {
hideMcAttr();
startGame();
mcLevel.activeRole();
mcLevel.resetAllTile();
initRoleDis();
}
function initRoleDis() {
var _local1 = mcLevel.currRole;
_local1.mc.selNote._visible = false;
mcLevel.currRole = null;
}
function getGoldInterest() {
nouseGold = Math.floor(gold);
soldierBonusGold = 0;
bonusGold = 0;
nousedNum = 0;
for (var _local5 in mcLevel.aRole) {
var _local1 = mcLevel.aRole[_local5];
if (_local1.bHold) {
var _local3 = _local1.nLevel;
var _local2 = _local1.nTypeID;
var _local4 = aCost[_local2] * (1 + ((_local3 - 1) * aCostUpRate[_local2]));
soldierBonusGold = soldierBonusGold + _local4;
nousedNum = nousedNum + 1;
}
}
soldierBonusGold = Math.floor(soldierBonusGold * 0.2);
bonusGold = Math.floor(nouseGold * interest);
gold = gold + Math.floor(bonusGold + soldierBonusGold);
disGold = Math.floor(gold);
}
function recover() {
var _local1 = mcLevel.currRole;
_local1.repair();
}
function sell() {
var _local1 = mcLevel.currRole;
_local1.mc.removeMovieClip();
mcLevel.resetTile(_local1.tile);
mcLevel.resetTile(_local1.leftTile);
mcLevel.resetTile(_local1.rightTile);
addGold(Math.floor(_local1.cost * 0.75));
_local1.killSelf();
hideMcAttr();
}
function upgrade() {
var _local1 = mcLevel.currRole;
_local1.upgrade();
disUpgrade();
}
function showMcAttr() {
mcLayout.mcAttr._visible = true;
}
function hideMcAttr() {
mcLayout.mcAttr._visible = false;
mcLevel.currRole.mc.selNote._visible = false;
mcLevel.currRole = null;
}
function disRecover() {
var _local1 = mcLayout.mcAttr;
_local1.gotoAndStop("recover");
disAttr();
}
function disUpgrade() {
disAttr();
var _local2 = mcLayout.mcAttr;
var _local1 = mcLevel.currRole;
var _local3 = _local1.nTypeID;
_local2.gotoAndStop("upgrade");
var _local5 = Math.ceil(_local1.cost * aCostUpRate[_local3]);
var _local4 = _local1.nLevel + 1;
var _local6 = Math.ceil(_local1.power * (1 + aPowerUpRate[_local3]));
var _local7 = Math.ceil(_local1.hitPoint * (1 + aHpUpRate[_local3]));
var _local8 = _local1.exper + _local1.expUnit;
_local2.tUpCost.text = Math.floor(_local5);
_local2.tUpLevel.text = Math.floor(_local4);
_local2.tUpPower.text = Math.floor(_local6);
_local2.tUpHP.text = Math.floor(_local7);
_local2.tUpExp.text = Math.floor(_local8);
showMcAttr();
}
function disAttr() {
var _local1 = mcLayout.mcAttr;
var _local2 = mcLevel.currRole;
var _local4 = _local2.cost;
var _local8 = _local2.sType;
var _local3 = _local2.nLevel;
var _local5 = _local2.power;
var _local6 = _local2.hitPoint;
var _local7 = _local2.exper;
_local1.tCost.text = Math.floor(_local4);
_local1.tType.text = _local8;
_local1.tLevel.text = Math.floor(_local3);
_local1.tPower.text = Math.floor(_local5);
_local1.tHP.text = Math.floor(_local6);
_local1.tExp.text = Math.floor(_local7);
showMcAttr();
}
function disViewAttr(_typeID) {
var _local1 = mcLayout.mcAttr;
var _local4 = aCost[_typeID];
var _local8 = aRoleType[_typeID];
var _local3 = 0;
var _local5 = aPower[_typeID];
var _local6 = aHitPoint[_typeID];
var _local7 = 0;
_local1.tCost.text = Math.floor(_local4);
_local1.tType.text = _local8;
_local1.tLevel.text = Math.floor(_local3);
_local1.tPower.text = Math.floor(_local5);
_local1.tHP.text = Math.floor(_local6);
_local1.tExp.text = Math.floor(_local7);
_local1.gotoAndStop("view");
showMcAttr();
}
function dcOver() {
if (!bStart) {
return(undefined);
}
if (bPass) {
return(undefined);
}
if (mcLevel.roleCastle.hitPoint == 0) {
bOver = true;
}
if (bOver) {
turnTo("temp");
atMc(this, "mcOver");
kill(mcLevel);
delete onEnterFrame;
trace(":::::::\u6E38\u620F\u7ED3\u675F::::::::");
}
}
function dcPass() {
if (!bStart) {
return(undefined);
}
if (bOver) {
return(undefined);
}
if (mcLevel.enemyCastle.hitPoint == 0) {
bPass = true;
}
if (bPass) {
getGoldInterest();
getLiveCost();
getLastRole();
turnTo("temp");
addConquered(rivalCountry);
checkMEnd();
if (bEnd) {
addScore(aMBonus[missionID]);
atMc(this, "mcEnd");
} else {
atMc(this, "mcPass");
}
trace((("4 gold disgold " + gold) + " ") + disGold);
kill(mcLevel);
trace((("5 gold disgold " + gold) + " ") + disGold);
delete onEnterFrame;
}
}
function dcPause() {
if (bPass) {
return(undefined);
}
if (bOver) {
return(undefined);
}
if (bEnd) {
return(undefined);
}
if (mcMenu instanceof MovieClip) {
return(undefined);
}
if (bStart) {
if (!(mcPause instanceof MovieClip)) {
pauseGame();
kill(mcPause);
atMc(this, "mcPause");
} else if (mcPause instanceof MovieClip) {
activeGame();
kill(mcPause);
}
}
}
function onEnterFrame() {
dcOver();
dcPass();
}
function rollScreen(_dir) {
var _local4 = 30;
var _local3 = 20;
var _local2 = -850;
if (_dir == "left") {
mcLevel._x = mcLevel._x + _local3;
} else {
mcLevel._x = mcLevel._x - _local3;
}
if (mcLevel._x >= 0) {
mcLevel._x = 0;
return(undefined);
}
if (mcLevel._x <= _local2) {
mcLevel._x = _local2;
return(undefined);
}
_root.mcLayout.slider.bar._x = (_root.mcLayout.slider.bg._width * mcLevel._x) / _local2;
}
stop();
trace("::::\u5F00\u59CB\u6E38\u620F::::");
checkSpeedButton();
var myLis = new Object();
bKeyDown = false;
myLis.onKeyDown = function () {
if (bKeyDown) {
return(undefined);
}
if (Key.isDown(80)) {
dcPause();
bKeyDown = true;
}
if (Key.isDown(72)) {
mcLevel.holdRole();
bKeyDown = true;
}
if (Key.isDown(83)) {
sell();
bKeyDown = true;
}
if (Key.isDown(85)) {
upgrade();
bKeyDown = true;
}
if (Key.isDown(82)) {
recover();
bKeyDown = true;
}
if (Key.isDown(78)) {
setFightMode(0);
bKeyDown = true;
}
if (Key.isDown(66)) {
setFightMode(1);
bKeyDown = true;
}
if (Key.isDown(65)) {
setFightMode(2);
bKeyDown = true;
}
if (Key.isDown(68)) {
setFightMode(3);
bKeyDown = true;
}
if (Key.isDown(84)) {
setFightMode(4);
bKeyDown = true;
}
if (Key.isDown(37)) {
rollScreen("left");
}
if (Key.isDown(39)) {
rollScreen("right");
}
if (Key.isDown(70)) {
levelStart();
bKeyDown = true;
}
};
myLis.onKeyUp = function () {
bKeyDown = false;
};
Key.addListener(myLis);
Symbol 3 MovieClip [sceneMasker] Frame 1
bound_n = 500;
stage_width_n = stageW;
stage_height_n = stageH;
top_mask._width = stage_width_n + (2 * bound_n);
top_mask._height = bound_n;
bottom_mask._width = stage_width_n + (2 * bound_n);
bottom_mask._height = bound_n;
left_mask._width = bound_n;
left_mask._height = stage_height_n + (2 * bound_n);
right_mask._width = bound_n;
right_mask._height = stage_height_n + (2 * bound_n);
top_mask._x = -1 * bound_n;
top_mask._y = -1 * bound_n;
bottom_mask._x = -1 * bound_n;
bottom_mask._y = stage_height_n;
left_mask._x = -1 * bound_n;
left_mask._y = -1 * bound_n;
right_mask._x = stage_width_n;
right_mask._y = -1 * bound_n;
this._x = 0;
this._y = 0;
Symbol 10 MovieClip [mcTile] Frame 1
stop();
bt.useHandCursor = false;
Symbol 10 MovieClip [mcTile] Frame 15
bt.useHandCursor = false;
Symbol 10 MovieClip [mcTile] Frame 30
bt.useHandCursor = false;
Symbol 15 MovieClip Frame 1
onEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local5 = int((_local4 / _local3) * 100);
num_txt.text = _local5 + "%";
if (_local4 == _local3) {
delete this.onEnterFrame;
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
};
Symbol 19 MovieClip Frame 1
this._visible = false;
Symbol 19 MovieClip Frame 2
this._visible = true;
Symbol 19 MovieClip Frame 39
stop();
Instance of Symbol 12 MovieClip in Symbol 19 MovieClip Frame 39
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 1219 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(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 showTimedAd(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.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 _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 _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
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 _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
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) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
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 _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
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 _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_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 1220 MovieClip [__Packages.as.Soldier] Frame 0
class as.Soldier
{
var LEVEL, nLevel, nMaxLevel, standDis, hitDis, rivalNum, normalRN, bowRN, maxNormalRN, maxBowRN, maxRivalNum, maxHitPoint, hitPoint, power, diceNum, levelUnit, expStep, expUnit, goldStep, exper, cost, rangeOffset, topBD, bottomBD, sState, F, aRelation, aAim, bHitCastle, bHold, bFighting, bLossPW, mcColorTrans, mc, tile, leftTile, rightTile, nTypeID, killer, sFamily, minPW, lossPWStep, defaultHP, v, initv, sType, aim, abs, rivalCastleXLine, rivalCastle, bDie, aFamily;
function Soldier () {
_global.initGlobalFun(this);
LEVEL = _root.mcLevel;
nLevel = 1;
nMaxLevel = _root.nMaxUpLevel;
standDis = 30;
hitDis = 100;
rivalNum = 0;
normalRN = 0;
bowRN = 0;
maxNormalRN = 5;
maxBowRN = 6;
maxRivalNum = maxNormalRN + maxBowRN;
maxHitPoint = 100;
hitPoint = maxHitPoint;
power = 10;
diceNum = 0;
levelUnit = LEVEL.levelUnit;
expStep = LEVEL.expStep;
expUnit = LEVEL.expUnit;
goldStep = LEVEL.goldStep;
exper = 0;
cost = 0;
rangeOffset = 150;
topBD = LEVEL.worldy + 15;
bottomBD = LEVEL.worldy + (LEVEL.tileWidth * LEVEL.tileRow);
sState = "stand";
F = new global.Vector(0, 0);
aRelation = new Array();
aAim = new Array();
bHitCastle = false;
bHold = false;
bFighting = false;
bLossPW = false;
mcColorTrans = {ra:100, ga:100, ba:100, rb:0, gb:0, bb:0, aa:100, ab:0};
}
function disLevel() {
mc.tLevel.text = nLevel;
}
function stFighting() {
if (bHold) {
return(undefined);
}
if (_root.bStart) {
bFighting = true;
setState("walk");
}
}
function setHold() {
bHold = true;
mc.holdNote._visible = bHold;
}
function hold() {
if (bFighting) {
return(undefined);
}
if (bHold) {
bHold = false;
stFighting();
} else {
bHold = true;
}
mc.holdNote._visible = bHold;
}
function setTile(_tile, _leftTile, _rightTile) {
tile = _tile;
leftTile = _leftTile;
rightTile = _rightTile;
}
function addCost(_cost) {
cost = cost + _cost;
}
function addScore(_score) {
_root.score = _root.score + _score;
}
function repair() {
var _local3 = Math.floor((cost * (1 - (hitPoint / maxHitPoint))) * 0.5);
if (_root.gold < _local3) {
return(undefined);
}
_root.lossGold(_local3);
hitPoint = maxHitPoint;
_root.disRecover();
checkHitPoint();
}
function setExp(_exp) {
exper = _exp;
nLevel = Math.floor(exper / levelUnit);
disLevel();
}
function addExp(_exp) {
if (nLevel >= _root.nMaxUpLevel) {
return(undefined);
}
exper = exper + (_exp * _root.expRate);
nLevel = Math.floor(exper / levelUnit);
disLevel();
}
function upgrade() {
if (nLevel >= _root.nMaxUpLevel) {
return(undefined);
}
var _local4 = (nLevel * levelUnit) / expUnit;
var _local3 = Math.floor(cost * _root.aCostUpRate[nTypeID]);
var _local6 = Math.floor(power * _root.getUpRate(_root.aPowerUpRate[nTypeID], _local4));
var _local5 = Math.floor(hitPoint * (1 + _root.getUpRate(_root.aHpUpRate[nTypeID], _local4)));
if (_root.gold < _local3) {
_root.alrm("layout", 1);
return(undefined);
}
addExp(expUnit);
cost = cost + _local3;
power = power + _local6;
setHitPoint(_local5);
_root.lossGold(_local3);
disLevel();
}
function setKiller(_killer) {
killer = _killer;
}
function setColor(_colorTrans) {
mcColorTrans.rb = _colorTrans.rb;
mcColorTrans.gb = _colorTrans.gb;
mcColorTrans.bb = _colorTrans.bb;
var _local2 = new Color(mc);
_local2.setTransform(mcColorTrans);
}
function setDiceNum(_num) {
diceNum = _num;
}
function initFightMode() {
if (sFamily == "role") {
var _local3 = _root.fightMode;
} else {
var _local3 = _root.enemyFightMode;
}
if (_local3 == "berserker") {
var _local4 = _root.minBerPW;
var _local5 = _root.berPWStep;
bLossPW = true;
}
if (_local3 == "aggressive") {
var _local4 = _root.minAggPW;
var _local5 = _root.aggPWStep;
bLossPW = true;
}
minPW = power * (1 + _local4);
lossPWStep = power * _local5;
}
function setPower(_power) {
power = _power;
}
function lossPower(_power) {
power = power - _power;
}
function setHitPoint(_point) {
defaultHP = _point;
maxHitPoint = _point;
hitPoint = maxHitPoint;
}
function addHitPoint(_point) {
hitPoint = hitPoint + Math.floor(_point);
if (hitPoint > maxHitPoint) {
hitPoint = maxHitPoint;
}
}
function lossHitPoint(_power) {
hitPoint = hitPoint - Math.floor(_power);
if (hitPoint < 0) {
hitPoint = 0;
}
checkDie();
}
function setState(_state) {
sState = _state;
mc.body.gotoAndStop(sState);
if (_state == "walk") {
v = initv.clone();
}
}
function addAim(_aim) {
aAim.push(_aim);
}
function removeAim(_aim) {
var _local6 = _aim;
var _local5 = aAim.length;
var _local2 = 0;
var _local4 = 0;
var _local3 = false;
while (_local2 < _local5) {
if (_local6 == aAim[_local2]) {
_local4 = _local2;
_local3 = true;
break;
}
_local2++;
}
if (_local3) {
aAim.splice(_local4, 1);
}
}
function setMaxRivalNum(_normalRN, _bowRN) {
maxNormalRN = _normalRN;
maxBowRN = _bowRN;
maxRivalNum = maxNormalRN + maxBowRN;
}
function resetRivalNum() {
rivalNum = 0;
normalRN = 0;
bowRN = 0;
}
function addNormalRN() {
normalRN = normalRN + 1;
rivalNum = rivalNum + 1;
}
function addBowRN() {
bowRN = bowRN + 1;
rivalNum = rivalNum + 1;
}
function setStandDis(_standDis) {
standDis = _standDis;
}
function setHitDis(_hitDis) {
hitDis = _hitDis;
}
function resetForce() {
F.reset(0, 0);
}
function addForce(_newF) {
F.plus(_newF);
}
function resetRelation() {
aRelation = new Array();
}
function getRelation() {
return(aRelation);
}
function addRelation(_role) {
aRelation.push(_role);
}
function setType(_type, _typeID) {
sType = _type;
nTypeID = _typeID;
}
function setV(_speed) {
v.normalize(_speed);
initv.normalize(_speed);
}
function mv() {
if (mc._y < topBD) {
mc._y = topBD;
}
if (mc._y > bottomBD) {
mc._y = bottomBD;
}
mc._x = mc._x + F.x;
mc._y = mc._y + F.y;
var _local6 = aim.mc;
if (_local6 instanceof MovieClip) {
var _local10 = mc._x;
var _local8 = mc._y;
var _local9 = _local6._x;
var _local7 = _local6._y;
var _local18 = Math.atan2(_local7 - _local8, _local9 - _local10) * 57.29578;
var _local15 = _local18;
var _local4 = mc.body._rotation;
var _local16 = 0.1 * _root.speedTimes;
var _local14 = 1;
var _local13 = _local15 - _local4;
_local13 = _local13 % 360;
_local13 = (((_local13 % 360) < 0) ? (_local13 + 360) : (_local13));
var _local3 = abs(_local13);
var _local5 = _local3 / _local13;
if (_local3 > _local14) {
if (_local3 > 180) {
_local3 = 360 - _local3;
_local5 = -_local5;
}
_local4 = _local4 + ((_local5 * _local3) * _local16);
v.setAng(_local4);
mc.body._rotation = _local4;
}
if (aim.sType == "castle") {
return(undefined);
}
var _local12 = _local9 - _local10;
var _local11 = _local7 - _local8;
var _local17 = Math.sqrt((_local12 * _local12) + (_local11 * _local11));
if (_local17 < standDis) {
return(undefined);
}
} else {
if (sState != "walk") {
v = initv.clone();
sState = "walk";
mc.body.gotoAndStop(sState);
}
var _local15 = initv.getAng();
var _local4 = mc.body._rotation;
var _local16 = 0.05 * _root.speedTimes;
var _local14 = 1;
var _local13 = _local15 - _local4;
_local13 = _local13 % 360;
_local13 = (((_local13 % 360) < 0) ? (_local13 + 360) : (_local13));
var _local3 = abs(_local13);
var _local5 = _local3 / _local13;
if (_local3 > _local14) {
if (_local3 > 180) {
_local3 = 360 - _local3;
_local5 = -_local5;
}
_local4 = _local4 + ((_local5 * _local3) * _local16);
v.setAng(_local4);
mc.body._rotation = _local4;
}
}
mc._x = mc._x + (v.x * _root.speedTimes);
mc._y = mc._y + (v.y * _root.speedTimes);
if (sFamily == "role") {
if (mc._x > (rivalCastleXLine - standDis)) {
stAttackCastle(rivalCastleXLine - standDis);
}
} else if (mc._x < (rivalCastleXLine + standDis)) {
stAttackCastle(rivalCastleXLine + standDis);
}
}
function stAttackCastle(_rivalCastleXLine) {
mc._x = _rivalCastleXLine;
mc.body.gotoAndStop("attack");
aim = rivalCastle;
bHitCastle = true;
sState = "attack";
}
function getAim(_aRival) {
var _local25 = aim.mc;
if (_local25 instanceof MovieClip) {
if (aim.sType != "castle") {
return(undefined);
}
}
var _local20 = mc._x;
var _local19 = mc._y;
var _local5 = new Array();
var _local16 = new Array();
var _local18 = new Array();
var _local9 = new Array();
var _local26 = new Array();
var _local8 = new Array();
var _local15 = new Array();
for (var _local24 in _aRival) {
var _local13 = _aRival[_local24];
var _local7 = _local13.mc._x;
var _local6 = _local13.mc._y;
var _local3 = _local7 - _local20;
var _local12 = _local6 - _local19;
var _local14 = Math.sqrt((_local3 * _local3) + (_local12 * _local12));
var _local4 = Math.abs(_local12);
_local5.push({rival:_local13, dis:_local14, dy:_local4});
if (_local14 < hitDis) {
_local16.push({rival:_local13, dis:_local14, dy:_local4});
}
}
if (_local16.length > 0) {
for (var _local24 in _local5) {
var _local2 = _local5[_local24];
var _local13 = _local2.rival;
if (_local2.dis < (hitDis + rangeOffset)) {
if (_local2.dis > hitDis) {
_local18.push(_local2);
}
}
}
}
var _local10 = _local16.concat(_local18);
for (var _local23 in _local10) {
var _local2 = _local10[_local23];
var _local13 = _local2.rival;
if (_local13.rivalNum < _local13.maxRivalNum) {
if (sType == "bow") {
if (_local13.bowRN < _local13.maxBowRN) {
_local9.push(_local2);
}
} else if (_local13.normalRN < _local13.maxNormalRN) {
_local9.push(_local2);
}
} else {
continue;
}
}
_local8 = _local9;
_local8.sortOn("dy", Array.NUMERIC);
var _local21 = _local8[0].dy;
for (var _local22 in _local8) {
var _local2 = _local8[_local22];
var _local13 = _local2.rival;
if (_local2.dy == _local21) {
_local15.push(_local2);
}
}
_local15.sortOn("dis", Array.NUMERIC);
var _local17 = _local15[0].rival;
if (killer.mc instanceof MovieClip) {
_local17 = killer;
sState = "walk";
mc.body.gotoAndStop(sState);
}
if (!_local17) {
return(undefined);
}
if (sType == "bow") {
_local17.addBowRN();
} else {
_local17.addNormalRN();
}
_local17.addAim(this);
_local17.setKiller(this);
aim = _local17;
}
function checkAttack() {
var _local2 = aim.mc;
if (!(_local2 instanceof MovieClip)) {
return(undefined);
}
if (sState == "attack") {
return(undefined);
}
var _local8 = mc._x;
var _local6 = mc._y;
var _local7 = _local2._x;
var _local5 = _local2._y;
var _local4 = _local7 - _local8;
var _local3 = _local5 - _local6;
var _local9 = Math.sqrt((_local4 * _local4) + (_local3 * _local3));
if (_local9 <= standDis) {
mc.body.gotoAndStop("attack");
sState = "attack";
}
}
function attack() {
if (sState != "attack") {
return(undefined);
}
if (diceNum >= aim.diceNum) {
if (sType == "bow") {
shoot();
}
aim.lossHitPoint(power);
aim.checkHitPoint();
addExp(expStep);
if (sFamily == "role") {
if (aim.sType == "castle") {
var _local3 = (power * _root.goldRate) * 0.5;
} else {
var _local3 = aim.power * _root.goldRate;
}
_root.addGold(_local3);
_root.addScore(power * 0.02);
}
if (bLossPW) {
if (power > minPW) {
lossPower(lossPWStep);
}
}
}
}
function shoot() {
if (!(aim.mc instanceof MovieClip)) {
return(undefined);
}
if (!(mc instanceof MovieClip)) {
return(undefined);
}
var _local4 = LEVEL.getNextHighestDepth();
var _local3 = LEVEL.attachMovie("arrow", "arrow" + _local4, _local4);
_local3._x = mc._x;
_local3._y = mc._y;
var _local5 = {aim:aim, mc:_local3, bowman:this};
LEVEL.aArrow.push(_local5);
mc.body.anim.gotoAndPlay(2);
_root.sdBow.start();
}
function checkHitPoint() {
var _local2 = mc.bloodBar.bar;
_local2._xscale = (100 * hitPoint) / maxHitPoint;
}
function checkDie() {
if (bDie) {
return(undefined);
}
if (hitPoint == 0) {
bDie = true;
} else {
return(undefined);
}
killSelf();
}
function killSelf() {
aim.removeAim(this);
killElem(LEVEL.aActived, this);
killElem(aFamily, this);
mc.removeMovieClip();
this=null;//parameter overwritten
}
function killElem(_a, _elem) {
var _local6 = _elem;
var _local2 = _a;
var _local5 = _local2.length;
var _local1 = 0;
var _local4 = 0;
var _local3 = false;
while (_local1 < _local5) {
if (_local6 == _local2[_local1]) {
_local4 = _local1;
_local3 = true;
break;
}
_local1++;
}
if (_local3) {
_local2.splice(_local4, 1);
}
}
}
Symbol 1221 MovieClip [__Packages.global.Vector] Frame 0
class global.Vector
{
var x, y;
function Vector (ox, oy) {
x = ox;
y = oy;
}
function clone() {
return(new global.Vector(x, y));
}
function reset(newx, newy) {
x = newx;
y = newy;
}
function equals(v) {
return((x == v.x) && (y == v.y));
}
function normalize(len) {
var _local2 = len / length;
x = x * _local2;
y = y * _local2;
}
function normalizeNew(len) {
return(new global.Vector((x * len) / length, (y * len) / length));
}
function get length() {
return(Math.sqrt((x * x) + (y * y)));
}
function getLength() {
return(Math.sqrt((x * x) + (y * y)));
}
function plus(v) {
x = x + v.x;
y = y + v.y;
}
function plusNew(v) {
return(new global.Vector(x + v.x, y + v.y));
}
function minus(v) {
x = x - v.x;
y = y - v.y;
}
function minusNew(v) {
return(new global.Vector(x - v.x, y - v.y));
}
function dot(v) {
return((x * v.x) + (y * v.y));
}
function cross(v) {
return((x * v.y) - (y * v.x));
}
function mult(s) {
x = x * s;
y = y * s;
}
function multNew(s) {
return(new global.Vector(x * s, y * s));
}
function div(n) {
x = x / n;
y = y / n;
}
function divNew(n) {
return(new global.Vector(x / n, y / n));
}
function negate() {
x = x * -1;
y = y * -1;
}
function negateNew() {
return(new global.Vector(-x, -y));
}
function distance(v) {
var _local3 = x - v.x;
var _local2 = y - v.y;
return(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
}
function projectNew(v) {
var _local4 = dot(v);
var _local5 = (v.x * v.x) + (v.y * v.y);
var _local3 = new global.Vector(0, 0);
_local3.x = (_local4 / _local5) * v.x;
_local3.y = (_local4 / _local5) * v.y;
return(_local3);
}
static function momHit(v1, v2, _mass1, _mass2) {
var _local4 = _mass1;
var _local1 = _mass2;
var _local5 = v1.minusNew(v2);
var _local3 = v1.clone();
var _local2 = v2.clone();
_local3.mult(_local4 - _local1);
_local2.mult(2 * _local1);
v1 = _local3.plusNew(_local2);
v1.div(_local4 + _local1);
v2 = _local5.plusNew(v1);
return({v1:v1, v2:v2});
}
function rotate(ang) {
var _local2 = Math.cos(ang * 0.017453);
var _local3 = Math.sin(ang * 0.017453);
var _local5 = x;
var _local4 = y;
x = (_local5 * _local2) - (_local4 * _local3);
y = (_local5 * _local3) + (_local4 * _local2);
}
function getAng() {
return(Math.atan2(y, x) * 57.29578);
}
function setAng(ang) {
var _local2 = length;
x = _local2 * Math.cos(ang * 0.017453);
y = _local2 * Math.sin(ang * 0.017453);
}
function angBetween(v) {
var _local2 = dot(v);
var _local3 = _local2 / (length * v.__get__length());
return(Math.acos(_local3) * 57.29578);
}
function angDispersion(v) {
var _local3 = cross(v);
var _local2 = dot(v);
return(Math.atan2(_local3, _local2) * 57.29578);
}
function getNormalNew() {
return(new global.Vector(-y, x));
}
function isPerpTo(v) {
return(dot(v) == 0);
}
function toString(Void) {
return(((("( x = " + x) + ", y = ") + y) + ")");
}
}
Symbol 1222 MovieClip [__Packages.as.Castle] Frame 0
class as.Castle
{
var LEVEL, mc, maxHitPoint, hitPoint, sType, xOffset, xLine, bloodBar;
function Castle (_mc, _hitPoint, _xLine) {
_global.initGlobalFun(this);
LEVEL = _root.mcLevel;
mc = _mc;
maxHitPoint = _hitPoint;
hitPoint = maxHitPoint;
sType = "castle";
trace("\u57CE\u5821\u62E5\u6709: " + maxHitPoint);
xOffset = 0;
xLine = _xLine;
if (mc == LEVEL.mcRoleCastle) {
bloodBar = _root.mcLayout.roleBloodBar;
xLine = xLine + xOffset;
} else {
bloodBar = _root.mcLayout.enemyBloodBar;
xLine = xLine - xOffset;
}
}
function lossHitPoint(_power) {
hitPoint = hitPoint - _power;
if (hitPoint < 0) {
hitPoint = 0;
}
bloodBar.bar._xscale = (100 * hitPoint) / maxHitPoint;
}
}
Symbol 1223 MovieClip [__Packages.as.Enemy] Frame 0
class as.Enemy extends as.Soldier
{
var mc, sFamily, v, initv, aFamily, LEVEL, castle, rivalCastle, rivalCastleXLine, bHold, disLevel, checkDie, mv, getAim, checkAttack;
function Enemy (_mc) {
super();
mc = _mc;
sFamily = "enemy";
v = new global.Vector(-1, 0);
initv = v.clone();
mc.body._rotation = mc.body._rotation + 180;
aFamily = LEVEL.aEnemy;
castle = LEVEL.enemyCastle;
rivalCastle = LEVEL.roleCastle;
rivalCastleXLine = rivalCastle.xLine;
mc.holdNote._visible = false;
}
function solve() {
if (bHold) {
return(undefined);
}
disLevel();
checkDie();
mv();
getAim(LEVEL.aRole);
checkAttack();
}
}
Symbol 1224 MovieClip [__Packages.as.Role] Frame 0
class as.Role extends as.Soldier
{
var mc, sFamily, v, initv, aFamily, LEVEL, castle, rivalCastle, rivalCastleXLine, bHold, disLevel, checkDie, mv, getAim, checkAttack;
function Role (_mc) {
super();
mc = _mc;
sFamily = "role";
v = new global.Vector(1, 0);
initv = v.clone();
aFamily = LEVEL.aRole;
castle = LEVEL.roleCastle;
rivalCastle = LEVEL.enemyCastle;
rivalCastleXLine = rivalCastle.xLine;
mc.holdNote._visible = false;
}
function solve() {
if (bHold) {
return(undefined);
}
disLevel();
checkDie();
mv();
getAim(LEVEL.aEnemy);
checkAttack();
}
}
Symbol 1225 MovieClip [__Packages.as.Shape] Frame 0
class as.Shape
{
var totalNum, aShape1, aShape2, aShape3, aShape4, aShape5, aShape6, aShape7, aShape8, aShape9, aShape10, aShape11, aShape12, aShape13, aShape14, aShape15, aShape16, aShape17, aShape18, aShape19, aShape20, aShape21, aShape22, aShape23, aShape24, aShape25, aShape26, aShape27, aShape28, aShape29, aShape30, aShape31, aShape32, aShape33, aShape34, aShape35, aShape36, aShape37, aShape38, aShape39, aShape40, aShape41, aShape42, aShape43, aShape44, aShape45, aShape46, aShape47, aShape48, aShape49, aShape50, aShape51, aShape52, aShape53, aShape54, aShape55, aShape56, aShape57, aShape58, aShape59, aShape60;
function Shape () {
totalNum = 60;
creatShapes1();
creatShapes2();
}
function creatShapes1() {
aShape1 = new Array();
aShape1.push({typeID:2, x:190, y:316});
aShape1.push({typeID:2, x:158, y:316});
aShape1.push({typeID:2, x:190, y:284});
aShape1.push({typeID:2, x:158, y:284});
aShape1.push({typeID:2, x:190, y:220});
aShape1.push({typeID:2, x:158, y:220});
aShape1.push({typeID:2, x:190, y:188});
aShape1.push({typeID:2, x:158, y:188});
aShape2 = new Array();
aShape2.push({typeID:2, x:254, y:348});
aShape2.push({typeID:2, x:254, y:316});
aShape2.push({typeID:2, x:222, y:284});
aShape2.push({typeID:2, x:222, y:252});
aShape2.push({typeID:2, x:190, y:252});
aShape2.push({typeID:2, x:222, y:220});
aShape2.push({typeID:2, x:254, y:188});
aShape2.push({typeID:2, x:254, y:156});
aShape3 = new Array();
aShape3.push({typeID:2, x:222, y:348});
aShape3.push({typeID:3, x:286, y:316});
aShape3.push({typeID:2, x:190, y:284});
aShape3.push({typeID:3, x:286, y:252});
aShape3.push({typeID:2, x:190, y:252});
aShape3.push({typeID:2, x:190, y:220});
aShape3.push({typeID:3, x:286, y:188});
aShape3.push({typeID:2, x:222, y:156});
aShape4 = new Array();
aShape4.push({typeID:3, x:318, y:348});
aShape4.push({typeID:1, x:222, y:348});
aShape4.push({typeID:1, x:222, y:316});
aShape4.push({typeID:2, x:222, y:252});
aShape4.push({typeID:2, x:190, y:252});
aShape4.push({typeID:1, x:222, y:188});
aShape4.push({typeID:3, x:318, y:156});
aShape4.push({typeID:1, x:222, y:156});
aShape5 = new Array();
aShape5.push({typeID:3, x:318, y:348});
aShape5.push({typeID:1, x:222, y:316});
aShape5.push({typeID:1, x:222, y:284});
aShape5.push({typeID:1, x:190, y:252});
aShape5.push({typeID:1, x:158, y:252});
aShape5.push({typeID:1, x:222, y:220});
aShape5.push({typeID:1, x:222, y:188});
aShape5.push({typeID:3, x:318, y:156});
aShape6 = new Array();
aShape6.push({typeID:3, x:286, y:348});
aShape6.push({typeID:2, x:222, y:316});
aShape6.push({typeID:2, x:222, y:284});
aShape6.push({typeID:3, x:286, y:252});
aShape6.push({typeID:0, x:158, y:252});
aShape6.push({typeID:2, x:222, y:220});
aShape6.push({typeID:2, x:222, y:188});
aShape6.push({typeID:3, x:286, y:156});
aShape7 = new Array();
aShape7.push({typeID:3, x:286, y:348});
aShape7.push({typeID:2, x:158, y:348});
aShape7.push({typeID:2, x:126, y:348});
aShape7.push({typeID:3, x:318, y:316});
aShape7.push({typeID:0, x:318, y:252});
aShape7.push({typeID:3, x:318, y:188});
aShape7.push({typeID:3, x:286, y:156});
aShape7.push({typeID:2, x:158, y:156});
aShape7.push({typeID:2, x:126, y:156});
aShape8 = new Array();
aShape8.push({typeID:3, x:254, y:348});
aShape8.push({typeID:0, x:158, y:316});
aShape8.push({typeID:2, x:254, y:252});
aShape8.push({typeID:2, x:222, y:252});
aShape8.push({typeID:2, x:190, y:252});
aShape8.push({typeID:2, x:158, y:252});
aShape8.push({typeID:0, x:158, y:188});
aShape8.push({typeID:3, x:254, y:156});
aShape9 = new Array();
aShape9.push({typeID:2, x:286, y:380});
aShape9.push({typeID:2, x:254, y:380});
aShape9.push({typeID:2, x:222, y:380});
aShape9.push({typeID:2, x:190, y:380});
aShape9.push({typeID:2, x:286, y:124});
aShape9.push({typeID:2, x:254, y:124});
aShape9.push({typeID:2, x:222, y:124});
aShape9.push({typeID:2, x:190, y:124});
aShape10 = new Array();
aShape10.push({typeID:3, x:254, y:284});
aShape10.push({typeID:2, x:222, y:284});
aShape10.push({typeID:2, x:190, y:284});
aShape10.push({typeID:2, x:222, y:252});
aShape10.push({typeID:2, x:190, y:252});
aShape10.push({typeID:3, x:254, y:220});
aShape10.push({typeID:2, x:222, y:220});
aShape10.push({typeID:2, x:190, y:220});
aShape11 = new Array();
aShape11.push({typeID:2, x:254, y:316});
aShape11.push({typeID:2, x:222, y:316});
aShape11.push({typeID:2, x:190, y:316});
aShape11.push({typeID:3, x:286, y:252});
aShape11.push({typeID:2, x:254, y:252});
aShape11.push({typeID:2, x:222, y:252});
aShape11.push({typeID:2, x:190, y:252});
aShape11.push({typeID:2, x:254, y:188});
aShape11.push({typeID:2, x:222, y:188});
aShape11.push({typeID:2, x:190, y:188});
aShape12 = new Array();
aShape12.push({typeID:1, x:286, y:284});
aShape12.push({typeID:2, x:254, y:284});
aShape12.push({typeID:2, x:222, y:284});
aShape12.push({typeID:3, x:318, y:252});
aShape12.push({typeID:1, x:286, y:252});
aShape12.push({typeID:2, x:254, y:252});
aShape12.push({typeID:2, x:222, y:252});
aShape12.push({typeID:1, x:286, y:220});
aShape12.push({typeID:2, x:254, y:220});
aShape12.push({typeID:2, x:222, y:220});
aShape13 = new Array();
aShape13.push({typeID:2, x:286, y:348});
aShape13.push({typeID:2, x:286, y:316});
aShape13.push({typeID:2, x:254, y:316});
aShape13.push({typeID:2, x:222, y:284});
aShape13.push({typeID:2, x:222, y:252});
aShape13.push({typeID:2, x:190, y:252});
aShape13.push({typeID:2, x:222, y:220});
aShape13.push({typeID:2, x:286, y:188});
aShape13.push({typeID:2, x:254, y:188});
aShape13.push({typeID:2, x:286, y:156});
aShape14 = new Array();
aShape14.push({typeID:2, x:222, y:316});
aShape14.push({typeID:2, x:126, y:316});
aShape14.push({typeID:2, x:190, y:284});
aShape14.push({typeID:2, x:158, y:284});
aShape14.push({typeID:3, x:286, y:252});
aShape14.push({typeID:3, x:254, y:252});
aShape14.push({typeID:2, x:190, y:220});
aShape14.push({typeID:2, x:158, y:220});
aShape14.push({typeID:2, x:222, y:188});
aShape14.push({typeID:2, x:126, y:188});
aShape15 = new Array();
aShape15.push({typeID:3, x:286, y:348});
aShape15.push({typeID:1, x:190, y:348});
aShape15.push({typeID:2, x:222, y:316});
aShape15.push({typeID:2, x:254, y:284});
aShape15.push({typeID:3, x:318, y:252});
aShape15.push({typeID:2, x:254, y:252});
aShape15.push({typeID:2, x:254, y:220});
aShape15.push({typeID:2, x:222, y:188});
aShape15.push({typeID:3, x:286, y:156});
aShape15.push({typeID:2, x:190, y:156});
aShape16 = new Array();
aShape16.push({typeID:3, x:286, y:348});
aShape16.push({typeID:2, x:190, y:348});
aShape16.push({typeID:2, x:222, y:316});
aShape16.push({typeID:1, x:254, y:284});
aShape16.push({typeID:1, x:286, y:252});
aShape16.push({typeID:0, x:158, y:252});
aShape16.push({typeID:1, x:254, y:220});
aShape16.push({typeID:2, x:222, y:188});
aShape16.push({typeID:3, x:286, y:156});
aShape16.push({typeID:2, x:190, y:156});
aShape17 = new Array();
aShape17.push({typeID:2, x:254, y:316});
aShape17.push({typeID:1, x:190, y:316});
aShape17.push({typeID:2, x:254, y:284});
aShape17.push({typeID:1, x:190, y:284});
aShape17.push({typeID:2, x:222, y:252});
aShape17.push({typeID:0, x:158, y:252});
aShape17.push({typeID:2, x:254, y:220});
aShape17.push({typeID:1, x:190, y:220});
aShape17.push({typeID:2, x:254, y:188});
aShape17.push({typeID:1, x:190, y:188});
aShape18 = new Array();
aShape18.push({typeID:2, x:190, y:348});
aShape18.push({typeID:1, x:190, y:316});
aShape18.push({typeID:2, x:222, y:284});
aShape18.push({typeID:1, x:190, y:284});
aShape18.push({typeID:2, x:222, y:252});
aShape18.push({typeID:0, x:158, y:252});
aShape18.push({typeID:2, x:222, y:220});
aShape18.push({typeID:1, x:190, y:220});
aShape18.push({typeID:1, x:190, y:188});
aShape18.push({typeID:2, x:190, y:156});
aShape19 = new Array();
aShape19.push({typeID:2, x:158, y:380});
aShape19.push({typeID:2, x:190, y:348});
aShape19.push({typeID:1, x:222, y:316});
aShape19.push({typeID:3, x:286, y:284});
aShape19.push({typeID:3, x:286, y:252});
aShape19.push({typeID:0, x:158, y:252});
aShape19.push({typeID:3, x:286, y:220});
aShape19.push({typeID:1, x:222, y:188});
aShape19.push({typeID:2, x:190, y:156});
aShape19.push({typeID:2, x:158, y:124});
aShape20 = new Array();
aShape20.push({typeID:3, x:286, y:380});
aShape20.push({typeID:3, x:286, y:348});
aShape20.push({typeID:2, x:222, y:316});
aShape20.push({typeID:2, x:222, y:284});
aShape20.push({typeID:3, x:318, y:252});
aShape20.push({typeID:0, x:158, y:252});
aShape20.push({typeID:2, x:222, y:220});
aShape20.push({typeID:2, x:222, y:188});
aShape20.push({typeID:3, x:286, y:156});
aShape20.push({typeID:3, x:286, y:124});
aShape21 = new Array();
aShape21.push({typeID:3, x:318, y:380});
aShape21.push({typeID:3, x:286, y:380});
aShape21.push({typeID:2, x:254, y:348});
aShape21.push({typeID:2, x:222, y:316});
aShape21.push({typeID:2, x:350, y:252});
aShape21.push({typeID:2, x:318, y:252});
aShape21.push({typeID:2, x:286, y:252});
aShape21.push({typeID:2, x:254, y:252});
aShape21.push({typeID:2, x:222, y:188});
aShape21.push({typeID:2, x:254, y:156});
aShape21.push({typeID:3, x:318, y:124});
aShape21.push({typeID:3, x:286, y:124});
aShape22 = new Array();
aShape22.push({typeID:3, x:286, y:348});
aShape22.push({typeID:3, x:286, y:316});
aShape22.push({typeID:1, x:222, y:316});
aShape22.push({typeID:1, x:190, y:316});
aShape22.push({typeID:3, x:286, y:284});
aShape22.push({typeID:3, x:286, y:252});
aShape22.push({typeID:2, x:190, y:252});
aShape22.push({typeID:3, x:286, y:220});
aShape22.push({typeID:3, x:286, y:188});
aShape22.push({typeID:1, x:222, y:188});
aShape22.push({typeID:1, x:190, y:188});
aShape22.push({typeID:3, x:286, y:156});
aShape23 = new Array();
aShape23.push({typeID:2, x:254, y:348});
aShape23.push({typeID:2, x:318, y:316});
aShape23.push({typeID:2, x:222, y:316});
aShape23.push({typeID:2, x:286, y:284});
aShape23.push({typeID:2, x:190, y:284});
aShape23.push({typeID:2, x:254, y:252});
aShape23.push({typeID:2, x:158, y:252});
aShape23.push({typeID:2, x:286, y:220});
aShape23.push({typeID:2, x:190, y:220});
aShape23.push({typeID:2, x:318, y:188});
aShape23.push({typeID:2, x:222, y:188});
aShape23.push({typeID:2, x:254, y:156});
aShape24 = new Array();
aShape24.push({typeID:2, x:158, y:348});
aShape24.push({typeID:2, x:286, y:316});
aShape24.push({typeID:2, x:190, y:316});
aShape24.push({typeID:2, x:318, y:284});
aShape24.push({typeID:2, x:222, y:284});
aShape24.push({typeID:2, x:350, y:252});
aShape24.push({typeID:2, x:254, y:252});
aShape24.push({typeID:2, x:318, y:220});
aShape24.push({typeID:2, x:222, y:220});
aShape24.push({typeID:2, x:286, y:188});
aShape24.push({typeID:2, x:190, y:188});
aShape24.push({typeID:2, x:158, y:156});
aShape25 = new Array();
aShape25.push({typeID:2, x:318, y:348});
aShape25.push({typeID:2, x:286, y:348});
aShape25.push({typeID:2, x:254, y:348});
aShape25.push({typeID:2, x:222, y:348});
aShape25.push({typeID:2, x:318, y:252});
aShape25.push({typeID:2, x:286, y:252});
aShape25.push({typeID:2, x:254, y:252});
aShape25.push({typeID:2, x:222, y:252});
aShape25.push({typeID:2, x:318, y:156});
aShape25.push({typeID:2, x:286, y:156});
aShape25.push({typeID:2, x:254, y:156});
aShape25.push({typeID:2, x:222, y:156});
aShape26 = new Array();
aShape26.push({typeID:2, x:158, y:380});
aShape26.push({typeID:2, x:126, y:380});
aShape26.push({typeID:2, x:190, y:348});
aShape26.push({typeID:3, x:350, y:316});
aShape26.push({typeID:2, x:222, y:316});
aShape26.push({typeID:2, x:254, y:284});
aShape26.push({typeID:0, x:350, y:252});
aShape26.push({typeID:2, x:254, y:220});
aShape26.push({typeID:2, x:222, y:188});
aShape26.push({typeID:2, x:190, y:156});
aShape26.push({typeID:2, x:158, y:124});
aShape26.push({typeID:2, x:126, y:124});
aShape27 = new Array();
aShape27.push({typeID:3, x:350, y:348});
aShape27.push({typeID:0, x:190, y:348});
aShape27.push({typeID:2, x:254, y:316});
aShape27.push({typeID:1, x:222, y:316});
aShape27.push({typeID:3, x:350, y:284});
aShape27.push({typeID:2, x:286, y:284});
aShape27.push({typeID:2, x:254, y:284});
aShape27.push({typeID:2, x:318, y:252});
aShape27.push({typeID:2, x:286, y:252});
aShape27.push({typeID:2, x:350, y:220});
aShape27.push({typeID:2, x:318, y:220});
aShape27.push({typeID:2, x:350, y:188});
aShape28 = new Array();
aShape28.push({typeID:0, x:190, y:348});
aShape28.push({typeID:2, x:254, y:284});
aShape28.push({typeID:2, x:222, y:284});
aShape28.push({typeID:2, x:190, y:284});
aShape28.push({typeID:3, x:318, y:252});
aShape28.push({typeID:2, x:254, y:252});
aShape28.push({typeID:2, x:222, y:252});
aShape28.push({typeID:2, x:190, y:252});
aShape28.push({typeID:2, x:254, y:220});
aShape28.push({typeID:2, x:222, y:220});
aShape28.push({typeID:2, x:190, y:220});
aShape28.push({typeID:0, x:190, y:156});
aShape29 = new Array();
aShape29.push({typeID:2, x:286, y:380});
aShape29.push({typeID:2, x:254, y:380});
aShape29.push({typeID:2, x:222, y:348});
aShape29.push({typeID:3, x:318, y:316});
aShape29.push({typeID:2, x:222, y:316});
aShape29.push({typeID:2, x:254, y:284});
aShape29.push({typeID:2, x:254, y:252});
aShape29.push({typeID:0, x:190, y:252});
aShape29.push({typeID:3, x:318, y:220});
aShape29.push({typeID:2, x:254, y:220});
aShape29.push({typeID:2, x:222, y:188});
aShape29.push({typeID:2, x:222, y:156});
aShape29.push({typeID:2, x:286, y:124});
aShape29.push({typeID:2, x:254, y:124});
aShape30 = new Array();
aShape30.push({typeID:2, x:254, y:380});
aShape30.push({typeID:2, x:222, y:380});
aShape30.push({typeID:2, x:190, y:380});
aShape30.push({typeID:3, x:318, y:348});
aShape30.push({typeID:1, x:190, y:284});
aShape30.push({typeID:3, x:318, y:252});
aShape30.push({typeID:0, x:190, y:252});
aShape30.push({typeID:1, x:190, y:220});
aShape30.push({typeID:3, x:318, y:156});
aShape30.push({typeID:2, x:254, y:124});
aShape30.push({typeID:2, x:222, y:124});
aShape30.push({typeID:2, x:190, y:124});
}
function creatShapes2() {
aShape31 = new Array();
aShape31.push({typeID:2, x:254, y:348});
aShape31.push({typeID:2, x:286, y:316});
aShape31.push({typeID:2, x:254, y:316});
aShape31.push({typeID:2, x:318, y:284});
aShape31.push({typeID:2, x:254, y:284});
aShape31.push({typeID:2, x:350, y:252});
aShape31.push({typeID:2, x:318, y:252});
aShape31.push({typeID:2, x:286, y:252});
aShape31.push({typeID:2, x:254, y:252});
aShape31.push({typeID:2, x:222, y:252});
aShape31.push({typeID:2, x:190, y:252});
aShape31.push({typeID:2, x:254, y:220});
aShape31.push({typeID:2, x:254, y:188});
aShape31.push({typeID:2, x:254, y:156});
aShape32 = new Array();
aShape32.push({typeID:2, x:318, y:380});
aShape32.push({typeID:2, x:286, y:380});
aShape32.push({typeID:3, x:350, y:348});
aShape32.push({typeID:2, x:254, y:348});
aShape32.push({typeID:2, x:222, y:316});
aShape32.push({typeID:2, x:254, y:284});
aShape32.push({typeID:2, x:318, y:252});
aShape32.push({typeID:2, x:286, y:252});
aShape32.push({typeID:2, x:254, y:220});
aShape32.push({typeID:2, x:222, y:188});
aShape32.push({typeID:3, x:350, y:156});
aShape32.push({typeID:2, x:254, y:156});
aShape32.push({typeID:2, x:318, y:124});
aShape32.push({typeID:2, x:286, y:124});
aShape33 = new Array();
aShape33.push({typeID:2, x:254, y:316});
aShape33.push({typeID:2, x:222, y:316});
aShape33.push({typeID:2, x:286, y:284});
aShape33.push({typeID:2, x:222, y:284});
aShape33.push({typeID:2, x:190, y:284});
aShape33.push({typeID:3, x:350, y:252});
aShape33.push({typeID:2, x:318, y:252});
aShape33.push({typeID:2, x:190, y:252});
aShape33.push({typeID:2, x:158, y:252});
aShape33.push({typeID:2, x:286, y:220});
aShape33.push({typeID:2, x:222, y:220});
aShape33.push({typeID:2, x:190, y:220});
aShape33.push({typeID:2, x:254, y:188});
aShape33.push({typeID:2, x:222, y:188});
aShape34 = new Array();
aShape34.push({typeID:2, x:318, y:316});
aShape34.push({typeID:2, x:286, y:316});
aShape34.push({typeID:2, x:254, y:316});
aShape34.push({typeID:2, x:222, y:316});
aShape34.push({typeID:2, x:318, y:284});
aShape34.push({typeID:1, x:222, y:284});
aShape34.push({typeID:2, x:318, y:252});
aShape34.push({typeID:1, x:222, y:252});
aShape34.push({typeID:2, x:318, y:220});
aShape34.push({typeID:1, x:222, y:220});
aShape34.push({typeID:2, x:318, y:188});
aShape34.push({typeID:2, x:286, y:188});
aShape34.push({typeID:2, x:254, y:188});
aShape34.push({typeID:2, x:222, y:188});
aShape35 = new Array();
aShape35.push({typeID:2, x:318, y:348});
aShape35.push({typeID:2, x:286, y:348});
aShape35.push({typeID:2, x:318, y:316});
aShape35.push({typeID:2, x:254, y:316});
aShape35.push({typeID:2, x:318, y:284});
aShape35.push({typeID:2, x:222, y:284});
aShape35.push({typeID:2, x:318, y:252});
aShape35.push({typeID:2, x:190, y:252});
aShape35.push({typeID:2, x:318, y:220});
aShape35.push({typeID:2, x:222, y:220});
aShape35.push({typeID:2, x:318, y:188});
aShape35.push({typeID:2, x:254, y:188});
aShape35.push({typeID:2, x:318, y:156});
aShape35.push({typeID:2, x:286, y:156});
aShape36 = new Array();
aShape36.push({typeID:2, x:350, y:380});
aShape36.push({typeID:2, x:318, y:348});
aShape36.push({typeID:2, x:286, y:316});
aShape36.push({typeID:2, x:222, y:316});
aShape36.push({typeID:2, x:254, y:284});
aShape36.push({typeID:2, x:190, y:284});
aShape36.push({typeID:0, x:350, y:252});
aShape36.push({typeID:0, x:158, y:252});
aShape36.push({typeID:2, x:254, y:220});
aShape36.push({typeID:2, x:190, y:220});
aShape36.push({typeID:2, x:286, y:188});
aShape36.push({typeID:2, x:222, y:188});
aShape36.push({typeID:2, x:318, y:156});
aShape36.push({typeID:2, x:350, y:124});
aShape37 = new Array();
aShape37.push({typeID:1, x:190, y:380});
aShape37.push({typeID:2, x:158, y:380});
aShape37.push({typeID:1, x:222, y:348});
aShape37.push({typeID:2, x:190, y:348});
aShape37.push({typeID:1, x:254, y:316});
aShape37.push({typeID:2, x:222, y:316});
aShape37.push({typeID:1, x:286, y:284});
aShape37.push({typeID:2, x:254, y:284});
aShape37.push({typeID:1, x:318, y:252});
aShape37.push({typeID:2, x:286, y:252});
aShape37.push({typeID:1, x:350, y:220});
aShape37.push({typeID:2, x:318, y:220});
aShape37.push({typeID:2, x:190, y:188});
aShape37.push({typeID:0, x:190, y:156});
aShape38 = new Array();
aShape38.push({typeID:3, x:350, y:316});
aShape38.push({typeID:1, x:286, y:316});
aShape38.push({typeID:2, x:254, y:316});
aShape38.push({typeID:1, x:286, y:284});
aShape38.push({typeID:2, x:254, y:284});
aShape38.push({typeID:3, x:350, y:252});
aShape38.push({typeID:2, x:286, y:252});
aShape38.push({typeID:2, x:254, y:252});
aShape38.push({typeID:0, x:190, y:252});
aShape38.push({typeID:1, x:286, y:220});
aShape38.push({typeID:2, x:254, y:220});
aShape38.push({typeID:3, x:350, y:188});
aShape38.push({typeID:1, x:286, y:188});
aShape38.push({typeID:2, x:254, y:188});
aShape39 = new Array();
aShape39.push({typeID:3, x:318, y:348});
aShape39.push({typeID:2, x:222, y:348});
aShape39.push({typeID:2, x:222, y:316});
aShape39.push({typeID:2, x:222, y:284});
aShape39.push({typeID:3, x:382, y:252});
aShape39.push({typeID:2, x:318, y:252});
aShape39.push({typeID:2, x:286, y:252});
aShape39.push({typeID:2, x:254, y:252});
aShape39.push({typeID:2, x:222, y:252});
aShape39.push({typeID:0, x:158, y:252});
aShape39.push({typeID:2, x:222, y:220});
aShape39.push({typeID:2, x:222, y:188});
aShape39.push({typeID:3, x:318, y:156});
aShape39.push({typeID:2, x:222, y:156});
aShape40 = new Array();
aShape40.push({typeID:2, x:286, y:316});
aShape40.push({typeID:2, x:254, y:316});
aShape40.push({typeID:2, x:222, y:316});
aShape40.push({typeID:2, x:190, y:316});
aShape40.push({typeID:2, x:190, y:284});
aShape40.push({typeID:3, x:318, y:252});
aShape40.push({typeID:2, x:222, y:252});
aShape40.push({typeID:0, x:158, y:252});
aShape40.push({typeID:2, x:254, y:220});
aShape40.push({typeID:2, x:286, y:188});
aShape40.push({typeID:2, x:286, y:156});
aShape40.push({typeID:2, x:254, y:156});
aShape40.push({typeID:2, x:222, y:156});
aShape40.push({typeID:2, x:190, y:156});
aShape41 = new Array();
aShape41.push({typeID:3, x:350, y:348});
aShape41.push({typeID:2, x:190, y:348});
aShape41.push({typeID:2, x:254, y:316});
aShape41.push({typeID:2, x:222, y:316});
aShape41.push({typeID:2, x:286, y:284});
aShape41.push({typeID:2, x:254, y:284});
aShape41.push({typeID:2, x:350, y:252});
aShape41.push({typeID:2, x:318, y:252});
aShape41.push({typeID:2, x:286, y:252});
aShape41.push({typeID:1, x:254, y:252});
aShape41.push({typeID:2, x:286, y:220});
aShape41.push({typeID:2, x:254, y:220});
aShape41.push({typeID:2, x:254, y:188});
aShape41.push({typeID:2, x:222, y:188});
aShape41.push({typeID:3, x:350, y:156});
aShape41.push({typeID:2, x:190, y:156});
aShape42 = new Array();
aShape42.push({typeID:3, x:318, y:316});
aShape42.push({typeID:2, x:286, y:316});
aShape42.push({typeID:2, x:254, y:316});
aShape42.push({typeID:2, x:222, y:316});
aShape42.push({typeID:2, x:190, y:316});
aShape42.push({typeID:2, x:158, y:316});
aShape42.push({typeID:2, x:254, y:284});
aShape42.push({typeID:2, x:222, y:284});
aShape42.push({typeID:2, x:254, y:252});
aShape42.push({typeID:2, x:222, y:252});
aShape42.push({typeID:3, x:318, y:220});
aShape42.push({typeID:2, x:286, y:220});
aShape42.push({typeID:2, x:254, y:220});
aShape42.push({typeID:2, x:222, y:220});
aShape42.push({typeID:2, x:190, y:220});
aShape42.push({typeID:2, x:158, y:220});
aShape43 = new Array();
aShape43.push({typeID:3, x:350, y:348});
aShape43.push({typeID:2, x:318, y:348});
aShape43.push({typeID:3, x:350, y:316});
aShape43.push({typeID:2, x:318, y:316});
aShape43.push({typeID:3, x:350, y:284});
aShape43.push({typeID:2, x:318, y:284});
aShape43.push({typeID:3, x:350, y:252});
aShape43.push({typeID:2, x:318, y:252});
aShape43.push({typeID:3, x:350, y:220});
aShape43.push({typeID:2, x:318, y:220});
aShape43.push({typeID:2, x:286, y:220});
aShape43.push({typeID:2, x:254, y:220});
aShape43.push({typeID:2, x:222, y:220});
aShape43.push({typeID:2, x:190, y:220});
aShape43.push({typeID:1, x:222, y:156});
aShape43.push({typeID:1, x:190, y:156});
aShape44 = new Array();
aShape44.push({typeID:2, x:318, y:316});
aShape44.push({typeID:2, x:286, y:316});
aShape44.push({typeID:2, x:254, y:316});
aShape44.push({typeID:2, x:222, y:316});
aShape44.push({typeID:2, x:190, y:316});
aShape44.push({typeID:2, x:318, y:284});
aShape44.push({typeID:2, x:318, y:252});
aShape44.push({typeID:2, x:286, y:252});
aShape44.push({typeID:2, x:254, y:252});
aShape44.push({typeID:2, x:222, y:252});
aShape44.push({typeID:2, x:318, y:220});
aShape44.push({typeID:2, x:318, y:188});
aShape44.push({typeID:2, x:286, y:188});
aShape44.push({typeID:2, x:254, y:188});
aShape44.push({typeID:2, x:222, y:188});
aShape44.push({typeID:2, x:190, y:188});
aShape45 = new Array();
aShape45.push({typeID:1, x:350, y:348});
aShape45.push({typeID:1, x:318, y:348});
aShape45.push({typeID:1, x:286, y:348});
aShape45.push({typeID:1, x:254, y:348});
aShape45.push({typeID:1, x:222, y:348});
aShape45.push({typeID:1, x:190, y:348});
aShape45.push({typeID:1, x:222, y:316});
aShape45.push({typeID:1, x:190, y:316});
aShape45.push({typeID:3, x:350, y:284});
aShape45.push({typeID:1, x:222, y:284});
aShape45.push({typeID:1, x:254, y:252});
aShape45.push({typeID:1, x:286, y:220});
aShape45.push({typeID:1, x:350, y:188});
aShape45.push({typeID:1, x:318, y:188});
aShape45.push({typeID:1, x:350, y:156});
aShape45.push({typeID:1, x:318, y:156});
aShape46 = new Array();
aShape46.push({typeID:2, x:318, y:380});
aShape46.push({typeID:2, x:286, y:348});
aShape46.push({typeID:2, x:254, y:316});
aShape46.push({typeID:2, x:318, y:284});
aShape46.push({typeID:2, x:286, y:284});
aShape46.push({typeID:2, x:222, y:284});
aShape46.push({typeID:3, x:382, y:252});
aShape46.push({typeID:2, x:318, y:252});
aShape46.push({typeID:2, x:286, y:252});
aShape46.push({typeID:0, x:158, y:252});
aShape46.push({typeID:2, x:318, y:220});
aShape46.push({typeID:2, x:286, y:220});
aShape46.push({typeID:2, x:222, y:220});
aShape46.push({typeID:2, x:254, y:188});
aShape46.push({typeID:2, x:286, y:156});
aShape46.push({typeID:2, x:318, y:124});
aShape47 = new Array();
aShape47.push({typeID:3, x:318, y:348});
aShape47.push({typeID:2, x:254, y:348});
aShape47.push({typeID:2, x:222, y:348});
aShape47.push({typeID:3, x:318, y:316});
aShape47.push({typeID:2, x:254, y:316});
aShape47.push({typeID:2, x:222, y:316});
aShape47.push({typeID:3, x:318, y:284});
aShape47.push({typeID:2, x:254, y:284});
aShape47.push({typeID:2, x:222, y:284});
aShape47.push({typeID:3, x:318, y:252});
aShape47.push({typeID:2, x:254, y:252});
aShape47.push({typeID:2, x:222, y:252});
aShape47.push({typeID:3, x:318, y:220});
aShape47.push({typeID:2, x:254, y:220});
aShape47.push({typeID:2, x:222, y:220});
aShape47.push({typeID:0, x:190, y:156});
aShape48 = new Array();
aShape48.push({typeID:2, x:286, y:348});
aShape48.push({typeID:2, x:254, y:348});
aShape48.push({typeID:2, x:222, y:348});
aShape48.push({typeID:2, x:286, y:316});
aShape48.push({typeID:2, x:254, y:316});
aShape48.push({typeID:2, x:222, y:316});
aShape48.push({typeID:1, x:318, y:284});
aShape48.push({typeID:1, x:318, y:252});
aShape48.push({typeID:0, x:190, y:252});
aShape48.push({typeID:1, x:318, y:220});
aShape48.push({typeID:2, x:286, y:188});
aShape48.push({typeID:2, x:254, y:188});
aShape48.push({typeID:2, x:222, y:188});
aShape48.push({typeID:2, x:286, y:156});
aShape48.push({typeID:2, x:254, y:156});
aShape48.push({typeID:2, x:222, y:156});
aShape49 = new Array();
aShape49.push({typeID:0, x:286, y:380});
aShape49.push({typeID:1, x:318, y:348});
aShape49.push({typeID:2, x:318, y:316});
aShape49.push({typeID:1, x:286, y:316});
aShape49.push({typeID:2, x:286, y:284});
aShape49.push({typeID:2, x:254, y:284});
aShape49.push({typeID:3, x:318, y:252});
aShape49.push({typeID:2, x:254, y:252});
aShape49.push({typeID:2, x:222, y:252});
aShape49.push({typeID:2, x:254, y:220});
aShape49.push({typeID:2, x:222, y:220});
aShape49.push({typeID:2, x:286, y:188});
aShape49.push({typeID:2, x:254, y:188});
aShape49.push({typeID:2, x:318, y:156});
aShape49.push({typeID:2, x:286, y:156});
aShape49.push({typeID:2, x:318, y:124});
aShape50 = new Array();
aShape50.push({typeID:3, x:350, y:348});
aShape50.push({typeID:2, x:286, y:348});
aShape50.push({typeID:2, x:254, y:348});
aShape50.push({typeID:2, x:286, y:316});
aShape50.push({typeID:2, x:254, y:316});
aShape50.push({typeID:2, x:318, y:284});
aShape50.push({typeID:2, x:286, y:284});
aShape50.push({typeID:2, x:254, y:284});
aShape50.push({typeID:2, x:222, y:284});
aShape50.push({typeID:3, x:350, y:252});
aShape50.push({typeID:0, x:158, y:252});
aShape50.push({typeID:2, x:318, y:220});
aShape50.push({typeID:2, x:286, y:220});
aShape50.push({typeID:2, x:254, y:220});
aShape50.push({typeID:2, x:222, y:220});
aShape50.push({typeID:2, x:286, y:188});
aShape50.push({typeID:2, x:254, y:188});
aShape50.push({typeID:3, x:350, y:156});
aShape50.push({typeID:2, x:286, y:156});
aShape50.push({typeID:2, x:254, y:156});
aShape51 = new Array();
aShape51.push({typeID:3, x:350, y:380});
aShape51.push({typeID:3, x:318, y:380});
aShape51.push({typeID:2, x:222, y:380});
aShape51.push({typeID:2, x:190, y:380});
aShape51.push({typeID:2, x:254, y:348});
aShape51.push({typeID:1, x:318, y:316});
aShape51.push({typeID:2, x:286, y:316});
aShape51.push({typeID:2, x:318, y:284});
aShape51.push({typeID:2, x:350, y:252});
aShape51.push({typeID:1, x:318, y:252});
aShape51.push({typeID:2, x:318, y:220});
aShape51.push({typeID:1, x:318, y:188});
aShape51.push({typeID:2, x:286, y:188});
aShape51.push({typeID:2, x:254, y:156});
aShape51.push({typeID:3, x:350, y:124});
aShape51.push({typeID:3, x:318, y:124});
aShape51.push({typeID:2, x:222, y:124});
aShape51.push({typeID:2, x:190, y:124});
aShape52 = new Array();
aShape52.push({typeID:2, x:286, y:380});
aShape52.push({typeID:2, x:254, y:348});
aShape52.push({typeID:2, x:222, y:316});
aShape52.push({typeID:2, x:190, y:284});
aShape52.push({typeID:3, x:382, y:252});
aShape52.push({typeID:3, x:350, y:252});
aShape52.push({typeID:3, x:318, y:252});
aShape52.push({typeID:3, x:286, y:252});
aShape52.push({typeID:3, x:254, y:252});
aShape52.push({typeID:3, x:222, y:252});
aShape52.push({typeID:1, x:190, y:252});
aShape52.push({typeID:2, x:158, y:252});
aShape52.push({typeID:2, x:190, y:220});
aShape52.push({typeID:2, x:222, y:188});
aShape52.push({typeID:2, x:254, y:156});
aShape52.push({typeID:2, x:286, y:124});
aShape53 = new Array();
aShape53.push({typeID:1, x:286, y:348});
aShape53.push({typeID:1, x:254, y:348});
aShape53.push({typeID:1, x:222, y:348});
aShape53.push({typeID:1, x:190, y:348});
aShape53.push({typeID:2, x:286, y:316});
aShape53.push({typeID:2, x:254, y:316});
aShape53.push({typeID:2, x:222, y:316});
aShape53.push({typeID:2, x:190, y:316});
aShape53.push({typeID:3, x:318, y:284});
aShape53.push({typeID:3, x:318, y:220});
aShape53.push({typeID:2, x:286, y:188});
aShape53.push({typeID:2, x:254, y:188});
aShape53.push({typeID:2, x:222, y:188});
aShape53.push({typeID:2, x:190, y:188});
aShape53.push({typeID:1, x:286, y:156});
aShape53.push({typeID:1, x:254, y:156});
aShape53.push({typeID:1, x:222, y:156});
aShape53.push({typeID:1, x:190, y:156});
aShape54 = new Array();
aShape54.push({typeID:2, x:222, y:348});
aShape54.push({typeID:2, x:254, y:316});
aShape54.push({typeID:2, x:222, y:316});
aShape54.push({typeID:3, x:318, y:284});
aShape54.push({typeID:2, x:286, y:284});
aShape54.push({typeID:2, x:254, y:284});
aShape54.push({typeID:2, x:222, y:284});
aShape54.push({typeID:3, x:318, y:252});
aShape54.push({typeID:2, x:286, y:252});
aShape54.push({typeID:2, x:254, y:252});
aShape54.push({typeID:2, x:222, y:252});
aShape54.push({typeID:3, x:318, y:220});
aShape54.push({typeID:2, x:286, y:220});
aShape54.push({typeID:2, x:254, y:220});
aShape54.push({typeID:2, x:222, y:220});
aShape54.push({typeID:2, x:254, y:188});
aShape54.push({typeID:2, x:222, y:188});
aShape54.push({typeID:2, x:222, y:156});
aShape55 = new Array();
aShape55.push({typeID:3, x:286, y:348});
aShape55.push({typeID:2, x:254, y:348});
aShape55.push({typeID:3, x:286, y:316});
aShape55.push({typeID:2, x:254, y:316});
aShape55.push({typeID:2, x:222, y:316});
aShape55.push({typeID:3, x:286, y:284});
aShape55.push({typeID:2, x:254, y:284});
aShape55.push({typeID:2, x:222, y:284});
aShape55.push({typeID:1, x:190, y:284});
aShape55.push({typeID:3, x:286, y:252});
aShape55.push({typeID:2, x:254, y:252});
aShape55.push({typeID:2, x:222, y:252});
aShape55.push({typeID:1, x:190, y:252});
aShape55.push({typeID:3, x:286, y:220});
aShape55.push({typeID:2, x:254, y:220});
aShape55.push({typeID:2, x:222, y:220});
aShape55.push({typeID:3, x:286, y:188});
aShape55.push({typeID:2, x:254, y:188});
aShape56 = new Array();
aShape56.push({typeID:3, x:158, y:380});
aShape56.push({typeID:3, x:382, y:348});
aShape56.push({typeID:2, x:318, y:348});
aShape56.push({typeID:2, x:286, y:348});
aShape56.push({typeID:2, x:254, y:348});
aShape56.push({typeID:2, x:222, y:348});
aShape56.push({typeID:2, x:350, y:252});
aShape56.push({typeID:2, x:318, y:252});
aShape56.push({typeID:2, x:286, y:252});
aShape56.push({typeID:2, x:254, y:252});
aShape56.push({typeID:2, x:222, y:252});
aShape56.push({typeID:0, x:158, y:252});
aShape56.push({typeID:3, x:382, y:156});
aShape56.push({typeID:2, x:318, y:156});
aShape56.push({typeID:2, x:286, y:156});
aShape56.push({typeID:2, x:254, y:156});
aShape56.push({typeID:2, x:222, y:156});
aShape56.push({typeID:3, x:158, y:124});
aShape57 = new Array();
aShape57.push({typeID:1, x:222, y:380});
aShape57.push({typeID:1, x:190, y:380});
aShape57.push({typeID:1, x:222, y:348});
aShape57.push({typeID:1, x:190, y:348});
aShape57.push({typeID:0, x:190, y:316});
aShape57.push({typeID:2, x:318, y:284});
aShape57.push({typeID:2, x:286, y:284});
aShape57.push({typeID:2, x:254, y:284});
aShape57.push({typeID:1, x:222, y:284});
aShape57.push({typeID:1, x:190, y:284});
aShape57.push({typeID:2, x:318, y:252});
aShape57.push({typeID:2, x:286, y:252});
aShape57.push({typeID:2, x:254, y:252});
aShape57.push({typeID:1, x:222, y:252});
aShape57.push({typeID:1, x:190, y:252});
aShape57.push({typeID:3, x:318, y:188});
aShape57.push({typeID:3, x:286, y:188});
aShape57.push({typeID:3, x:254, y:188});
aShape58 = new Array();
aShape58.push({typeID:3, x:254, y:380});
aShape58.push({typeID:3, x:350, y:348});
aShape58.push({typeID:2, x:254, y:348});
aShape58.push({typeID:2, x:222, y:348});
aShape58.push({typeID:2, x:254, y:316});
aShape58.push({typeID:2, x:222, y:316});
aShape58.push({typeID:2, x:254, y:284});
aShape58.push({typeID:2, x:222, y:284});
aShape58.push({typeID:2, x:254, y:252});
aShape58.push({typeID:2, x:222, y:252});
aShape58.push({typeID:3, x:350, y:220});
aShape58.push({typeID:2, x:254, y:220});
aShape58.push({typeID:2, x:222, y:220});
aShape58.push({typeID:3, x:254, y:188});
aShape58.push({typeID:2, x:318, y:156});
aShape58.push({typeID:2, x:286, y:156});
aShape58.push({typeID:2, x:254, y:156});
aShape58.push({typeID:0, x:190, y:156});
aShape59 = new Array();
aShape59.push({typeID:2, x:318, y:348});
aShape59.push({typeID:2, x:286, y:348});
aShape59.push({typeID:2, x:222, y:348});
aShape59.push({typeID:2, x:190, y:348});
aShape59.push({typeID:2, x:318, y:316});
aShape59.push({typeID:2, x:286, y:316});
aShape59.push({typeID:2, x:222, y:316});
aShape59.push({typeID:2, x:190, y:316});
aShape59.push({typeID:3, x:318, y:252});
aShape59.push({typeID:0, x:158, y:252});
aShape59.push({typeID:2, x:318, y:188});
aShape59.push({typeID:2, x:286, y:188});
aShape59.push({typeID:2, x:222, y:188});
aShape59.push({typeID:2, x:190, y:188});
aShape59.push({typeID:2, x:318, y:156});
aShape59.push({typeID:2, x:286, y:156});
aShape59.push({typeID:2, x:222, y:156});
aShape59.push({typeID:2, x:190, y:156});
aShape60 = new Array();
aShape60.push({typeID:3, x:382, y:348});
aShape60.push({typeID:0, x:190, y:348});
aShape60.push({typeID:3, x:382, y:316});
aShape60.push({typeID:2, x:318, y:316});
aShape60.push({typeID:2, x:286, y:316});
aShape60.push({typeID:1, x:190, y:316});
aShape60.push({typeID:2, x:286, y:284});
aShape60.push({typeID:2, x:254, y:284});
aShape60.push({typeID:2, x:254, y:252});
aShape60.push({typeID:2, x:222, y:252});
aShape60.push({typeID:2, x:286, y:220});
aShape60.push({typeID:2, x:254, y:220});
aShape60.push({typeID:3, x:382, y:188});
aShape60.push({typeID:2, x:318, y:188});
aShape60.push({typeID:2, x:286, y:188});
aShape60.push({typeID:1, x:190, y:188});
aShape60.push({typeID:3, x:382, y:156});
aShape60.push({typeID:0, x:190, y:156});
}
}
Symbol 1226 MovieClip [__Packages.as.Map] Frame 0
class as.Map
{
var aMap;
function Map () {
createMap();
}
function getRandomNum(_baseNum, _num) {
return(_baseNum + Math.floor(Math.random() * _num));
}
function getOPower(_typeID, _nLevel) {
var _local10 = Math.ceil(Math.random() * 10) + ((_typeID - 1) * 10);
var _local11 = _root.shape["aShape" + _local10].slice();
var _local12 = 0;
var _local9 = 6 + (_typeID * 2);
var _local14 = new Array();
var _local7 = _local11.length;
var _local3 = 0;
while (_local3 < _local7) {
var _local4 = _local11[_local3].typeID;
var _local6 = (Math.random() - Math.random()) * 3;
var _local2 = Math.floor((_nLevel * _root.globalHardRate) + _local6);
if (_local2 < 0) {
_local2 = 0;
}
var _local5 = _root.getUpgradNum(_root.aCost[_local4], _root.aCostUpRate[_local4], _local2);
_local14.push(_local2);
_local12 = _local12 + (_local5 * 5);
_local3++;
}
return({power:_local12, aShape:_local11, soldierNum:_local9, aLevel:_local14});
}
function createMap() {
aMap = new Array();
aMap.push({bConquered:false, oPower:getOPower(1, getRandomNum(0, 0)), land:"Plain", country:"China", aNeighbor:["Korea", "Afghanistan", "Pakistan", "Tajikstan", "Kirghizstan", "Kazakhstan", "Bhutan", "India", "Nepal", "Burma", "Laos", "Vietnam", "Japan", "Russia", "Mongolia"]});
aMap.push({bConquered:true, oPower:getOPower(1, getRandomNum(0, 0)), land:"GrassLand", country:"Mongolia", aNeighbor:["Russia", "China"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(18, 2)), land:"GrassLand", country:"Russia", aNeighbor:["Korea", "Latvia", "Lithuania", "Poland", "Belarus", "Ukraine", "Syria", "Turkey", "Iran", "Tajikstan", "Kazakhstan", "Mongolia", "China", "Japan"]});
aMap.push({bConquered:false, oPower:getOPower(2, getRandomNum(1, 2)), land:"Mountain", country:"Japan", aNeighbor:["China", "Korea"]});
aMap.push({bConquered:false, oPower:getOPower(1, getRandomNum(3, 2)), land:"Mountain", country:"Korea", aNeighbor:["Russia", "China", "Japan"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(5, 2)), land:"Mountain", country:"Vietnam", aNeighbor:["Burma", "Thailand", "Cambodia", "Laos", "China"]});
aMap.push({bConquered:false, oPower:getOPower(2, getRandomNum(2, 2)), land:"Mountain", country:"Laos", aNeighbor:["Burma", "Thailand", "Cambodia", "Vietnam", "China"]});
aMap.push({bConquered:false, oPower:getOPower(1, getRandomNum(3, 2)), land:"Forest", country:"Cambodia", aNeighbor:["Thailand", "Laos", "Vietnam"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(5, 2)), land:"GrassLand", country:"Thailand", aNeighbor:["Burma", "Cambodia", "Laos", "Vietnam"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(4, 2)), land:"Forest", country:"Burma", aNeighbor:["Bengal", "India", "Thailand", "Laos", "Vietnam", "China"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(1, 2)), land:"Mountain", country:"Nepal", aNeighbor:["Bengal", "India", "China"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(15, 2)), land:"Plain", country:"India", aNeighbor:["Pakistan", "Bhutan", "Bengal", "Nepal", "Burma", "China"]});
aMap.push({bConquered:false, oPower:getOPower(1, getRandomNum(4, 2)), land:"Forest", country:"Bengal", aNeighbor:["India", "Nepal", "Burma"]});
aMap.push({bConquered:false, oPower:getOPower(1, getRandomNum(3, 2)), land:"Forest", country:"Bhutan", aNeighbor:["India", "China"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(15, 2)), land:"GrassLand", country:"Kazakhstan", aNeighbor:["Turkmenistan", "Tajikstan", "Kirghizstan", "Uzbekistan", "Russia", "China"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(9, 3)), land:"GrassLand", country:"Uzbekistan", aNeighbor:["Turkmenistan", "Afghanistan", "Tajikstan", "Kazakhstan"]});
aMap.push({bConquered:false, oPower:getOPower(1, getRandomNum(8, 2)), land:"GrassLand", country:"Kirghizstan", aNeighbor:["Tajikstan", "Kazakhstan", "China"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(4, 2)), land:"GrassLand", country:"Tajikstan", aNeighbor:["Afghanistan", "Pakistan", "Kirghizstan", "Uzbekistan", "Kazakhstan", "China"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(10, 2)), land:"Mountain", country:"Pakistan", aNeighbor:["Turkmenistan", "Iran", "Afghanistan", "Tajikstan", "India", "China"]});
aMap.push({bConquered:false, oPower:getOPower(3, getRandomNum(11, 2)), land:"Mountain", country:"Afghanistan", aNeighbor:["Turkmenistan", "Iran", "Pakistan", "Tajikstan", "Uzbekistan", "China"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(10, 2)), land:"Plain", country:"Iran", aNeighbor:["UnitedArab", "Kuwait", "Aman", "Iraq", "Turkey", "Turkmenistan", "Afghanistan", "Pakistan", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(11, 2)), land:"Mountain", country:"Turkmenistan", aNeighbor:["Iran", "Afghanistan", "Pakistan", "Uzbekistan", "Kazakhstan"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(12, 2)), land:"Mountain", country:"Turkey", aNeighbor:["Bulgaria", "Greece", "Iraq", "Syria", "Iran", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(12, 2)), land:"Mountain", country:"Syria", aNeighbor:["Jordan", "Iraq", "Turkey", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(15, 2)), land:"Plain", country:"Iraq", aNeighbor:["Jordan", "Kuwait", "Saudi", "Syria", "Turkey", "Iran"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(16, 2)), land:"Plain", country:"Saudi", aNeighbor:["Israel", "UnitedArab", "Jordan", "Kuwait", "Aman", "Yemen", "Iraq"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(11, 2)), land:"Plain", country:"Yemen", aNeighbor:["Aman", "Saudi"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(12, 2)), land:"Plain", country:"Aman", aNeighbor:["UnitedArab", "Yemen", "Saudi"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(10, 2)), land:"Plain", country:"Kuwait", aNeighbor:["Saudi", "Iraq", "Iran"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(14, 2)), land:"Plain", country:"Jordan", aNeighbor:["Israel", "Saudi", "Iraq", "Syria"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(14, 2)), land:"Plain", country:"UnitedArab", aNeighbor:["Aman", "Saudi"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(16, 2)), land:"Plain", country:"Israel", aNeighbor:["Jordan", "Saudi"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(18, 4)), land:"Mountain", country:"Greece", aNeighbor:["FYROM", "Alb", "Bulgaria", "Turkey"]});
aMap.push({bConquered:false, oPower:getOPower(3, getRandomNum(12, 2)), land:"Mountain", country:"Bulgaria", aNeighbor:["Serbia", "FYROM", "Ukraine", "Romania", "Greece", "Turkey", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(15, 2)), land:"Mountain", country:"Romania", aNeighbor:["Hungary", "Serbia", "Ukraine", "Moldavia", "Bulgaria"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(12, 2)), land:"Mountain", country:"Moldavia", aNeighbor:["Ukraine", "Romania", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(16, 2)), land:"GrassLand", country:"Ukraine", aNeighbor:["Hungary", "Slovakia", "Poland", "Belarus", "Moldavia", "Romania", "Bulgaria", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(14, 2)), land:"GrassLand", country:"Belarus", aNeighbor:["Latvia", "Lithuania", "Poland", "Ukraine"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(9, 2)), land:"Forest", country:"Alb", aNeighbor:["Yugoslavia", "Serbia", "FYROM", "Greece"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(11, 2)), land:"Forest", country:"FYROM", aNeighbor:["Serbia", "Alb", "Bulgaria", "Greece"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(13, 2)), land:"Mountain", country:"Serbia", aNeighbor:["Yugoslavia", "Bosnia", "Croatia", "Hungary", "FYROM", "Alb", "Romania", "Bulgaria"]});
aMap.push({bConquered:false, oPower:getOPower(2, getRandomNum(16, 2)), land:"Mountain", country:"Poland", aNeighbor:["Hungary", "Slovakia", "Czech", "Austria", "Germany", "Lithuania", "Belarus", "Ukraine", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(12, 2)), land:"Mountain", country:"Lithuania", aNeighbor:["Latvia", "Poland", "Belarus", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(11, 2)), land:"Mountain", country:"Latvia", aNeighbor:["Lithuania", "Belarus", "Russia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(16, 2)), land:"Mountain", country:"Italy", aNeighbor:["Switz", "Austria"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(18, 2)), land:"Plain", country:"Germany", aNeighbor:["Switz", "France", "Czech", "Austria", "Poland"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(12, 2)), land:"Mountain", country:"Austria", aNeighbor:["Switz", "Slovenia", "Hungary", "Slovakia", "Czech", "Germany", "Italy", "Poland"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(12, 2)), land:"GrassLand", country:"Czech", aNeighbor:["Slovakia", "Austria", "Germany", "Poland"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(11, 2)), land:"GrassLand", country:"Slovakia", aNeighbor:["Hungary", "Czech", "Austria", "Poland", "Ukraine"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(14, 2)), land:"GrassLand", country:"Hungary", aNeighbor:["Bosnia", "Croatia", "Slovenia", "Slovakia", "Austria", "Poland", "Serbia", "Ukraine", "Romania"]});
aMap.push({bConquered:false, oPower:getOPower(4, getRandomNum(12, 2)), land:"GrassLand", country:"Slovenia", aNeighbor:["Croatia", "Hungary", "Austria"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(11, 2)), land:"Mountain", country:"Croatia", aNeighbor:["Bosnia", "Slovenia", "Hungary", "Serbia"]});
aMap.push({bConquered:false, oPower:getOPower(6, getRandomNum(13, 2)), land:"GrassLand", country:"Bosnia", aNeighbor:["Yugoslavia", "Croatia", "Hungary", "Serbia"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(15, 2)), land:"GrassLand", country:"France", aNeighbor:["Switz", "Germany"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(10, 2)), land:"GrassLand", country:"Switz", aNeighbor:["France", "Austria", "Germany", "Italy"]});
aMap.push({bConquered:false, oPower:getOPower(5, getRandomNum(12, 2)), land:"Mountain", country:"Yugoslavia", aNeighbor:["Bosnia", "Serbia", "Alb"]});
}
}
Symbol 1227 MovieClip [__Packages.global.GlobalFun] Frame 0
class global.GlobalFun
{
function GlobalFun () {
initFun();
}
function initFun() {
_global.initGlobalFun = function (_mc) {
var _local2 = _mc;
_local2.turnTo = _global.turnTo;
_local2.kill = _global.kill;
_local2.nextDepth = _global.nextDepth;
_local2.atMc = _global.atMc;
_local2.atMc2 = _global.atMc2;
_local2.newMc = _global.newMc;
_local2.newMc2 = _global.newMc2;
_local2.killInter = _global.killInter;
_local2.killArrayElem = _global.killArrayElem;
_local2.funManage = _global.funManage;
_local2.funManage2 = _global.funManage2;
_local2.fixUI2 = _global.fixUI2;
_local2.oddsManage = _global.oddsManage;
_local2.frame2Time = _global.frame2Time;
_local2.time2Frame = _global.time2Frame;
_local2.changeColor = _global.changeColor;
_local2.newFPS = _global.newFPS;
_local2.drawLine = _global.drawLine;
_local2.drawManage = _global.drawManage;
_local2.newMasker = _global.newMasker;
_local2.keyManage = _global.keyManage;
_local2.classMenu = _global.classMenu;
_local2.randPlay = _global.randPlay;
_local2.car2Flash = _global.car2Flash;
_local2.flash2Car = _global.flash2Car;
_local2.car2Polar = _global.car2Polar;
_local2.polar2Car = _global.polar2Car;
_local2.getCoordG = _global.getCoordG;
_local2.getCoordG2 = _global.getCoordG2;
_local2.getCoordL = _global.getCoordL;
_local2.randPole = _global.randPole;
_local2.rand = _global.rand;
_local2.intRand = _global.intRand;
_local2.floor = _global.floor;
_local2.ceil = _global.ceil;
_local2.round = _global.round;
_local2.sqrt = _global.sqrt;
_local2.abs = _global.abs;
_local2.getDis = _global.getDis;
_local2.getL2 = _global.getL2;
_local2.getL3 = _global.getL3;
_local2.sinD = _global.sinD;
_local2.cosD = _global.cosD;
_local2.atan2D = _global.atan2D;
_local2.asinD = _global.asinD;
_local2.acosD = _global.acosD;
_local2.tanD = _global.tanD;
_local2.d2r = _global.d2r;
_local2.r2d = _global.r2d;
_local2.fixAng = _global.fixAng;
_local2.getAng = _global.getAng;
_local2.getAng2 = _global.getAng2;
_local2.getOutAng = _global.getOutAng;
_local2.getRo = _global.getRo;
_local2.classRo = _global.classRo;
_local2.classRo2 = _global.classRo2;
};
_global.turnTo = function (_sFrame) {
var _local2 = _root;
_local2.gotoAndStop(_sFrame);
};
_global.kill = function (_mc) {
_mc.removeMovieClip();
if (_mc) {
_mc.swapDepths(0);
_mc.removeMovieClip();
}
};
_global.nextDepth = function (_mc) {
var _local1 = _mc.getNextHighestDepth();
return(_local1);
};
_global.atMc = function (_dir, _mc, _newName) {
var _local2 = _dir.getNextHighestDepth();
if (!_newName) {
_newName = _mc;
}
var _local1 = _dir.attachMovie(_mc, _newName, _local2);
return(_local1);
};
_global.atMc2 = function (_dir, _mc, _newName) {
var _local1 = _dir.getNextHighestDepth();
if (!_newName) {
_newName = _mc;
}
var _local2 = _dir.attachMovie(_mc, _newName + _local1, _local1);
return(_local2);
};
_global.newMc = function (_dir, _mc) {
var _local2 = _dir.getNextHighestDepth();
var _local1 = _dir.createEmptyMovieClip(_mc, _local2);
return(_local1);
};
_global.newMc2 = function (_dir, _mc) {
var _local1 = _dir.getNextHighestDepth();
var _local2 = _dir.createEmptyMovieClip(_mc + _local1, _local1);
return(_local2);
};
_global.killInter = function (_dir, _aInter) {
_dir.onUnload = function () {
for (var _local1 in _aInter) {
clearInterval(_dir[_aInter[_local1]]);
}
};
};
_global.killArrayElem = function (_a, _elem) {
var _local6 = _elem;
var _local2 = _a;
var _local5 = _local2.length;
var _local1 = 0;
var _local4 = 0;
var _local3 = false;
while (_local1 < _local5) {
if (_local6 == _local2[_local1]) {
_local4 = _local1;
_local3 = true;
break;
}
_local1++;
}
if (_local3) {
_local2.splice(_local4, 1);
}
};
_global.funManage = function (_dir, _aFun) {
var _local3 = _dir;
var _local2 = _aFun;
for (var _local5 in _local2) {
var _local1 = _local2[_local5];
for (var _local4 in _local1) {
_local3[_local1[_local4]]();
}
}
};
_global.funManage2 = function (_dir, _aFun) {
var _local6 = _dir;
var _local5 = _aFun;
for (var _local8 in _local5) {
var _local4 = _local5[_local8];
for (var _local7 in _local4) {
var _local2 = _local6[_local4[_local7]];
var _local3 = _local2.aFun;
this.funManage(_local2, [_local3]);
}
}
};
_global.fixUI2 = function () {
_root.reserved.swapDepths(-2);
_root.focusManager.swapDepths(-1);
};
_global.oddsManage = function (_dir, _aOdds, _aFun) {
var _local8 = _aOdds.length;
var _local6 = Math.random();
var _local7 = 0;
var _local2 = 0;
while (_local2 < _local8) {
var _local3 = 0;
var _local4 = _aOdds[_local2];
var _local1 = 0;
while (_local1 < _local2) {
_local3 = _local3 + _aOdds[_local1];
_local1++;
}
_local4 = _local4 + _local3;
if (_local6 >= _local3) {
if (_local6 < _local4) {
_local7 = _local2;
break;
}
}
_local2++;
}
return(_dir[_aFun[_local7]]());
};
_global.frame2Time = function (_nFrames, _FPS) {
var _local1 = (_nFrames / _FPS) * 1000;
return(_local1);
};
_global.time2Frame = function (_T, _FPS) {
var _local1 = (_T / 1000) * _FPS;
return(_local1);
};
_global.changeColor = function (_mc, _colorTrans) {
var _local1 = new Color(_mc);
_local1.setTransform(_colorTrans);
};
_global.newFPS = function (_vis) {
var mcFPS = this.newMc(_root, "mcFPS");
if (_vis == undefined) {
_vis = true;
}
if (_vis) {
mcFPS.createTextField("FPSTextField", this.nextDepth(mcFPS), 20, 10, 50, 20);
}
var fps = 0;
mcFPS.onEnterFrame = function () {
fps++;
};
mcFPS.calcFPS = function () {
if (_vis) {
mcFPS.FPSTextField.text = String("FPS: " + fps);
}
fps = 0;
};
setInterval(mcFPS, "calcFPS", 1000);
};
_global.drawLine = function (_mc, x1, y1, x2, y2) {
var _local1 = _mc;
_local1.clear();
_local1.lineStyle(1, 0, 100);
_local1.moveTo(x1, y1);
_local1.lineTo(x2, y2);
};
_global.drawManage = function (_mc, aLineStyle, aCoord, aFillColor, baseName) {
var _local7 = _mc;
_local7.lineStyle(aLineStyle[0], aLineStyle[1], aLineStyle[2]);
var _local4 = aCoord[0][0];
var _local3 = aCoord[0][1];
_local7.moveTo(_local4, _local3);
if (aFillColor) {
if (typeof(aFillColor[0]) == "number") {
_local7.beginFill(aFillColor[0], aFillColor[1]);
} else {
_local7.beginBitmapFill(aFillColor[0], aFillColor[1], aFillColor[2], aFillColor[3]);
}
}
var _local5 = 1;
var _local11 = aCoord.length;
while (_local5 < _local11) {
if (baseName) {
var _local2 = this.newMc2(_local7, baseName);
_local2.cacheAsBitmap = true;
_local2.lineStyle(aLineStyle[0], aLineStyle[1], aLineStyle[2]);
_local2.moveTo(_local4, _local3);
}
_local4 = aCoord[_local5][0];
_local3 = aCoord[_local5][1];
_local7.lineTo(_local4, _local3);
if (_local2) {
_local2.lineTo(_local4, _local3);
}
_local5++;
}
if (aFillColor) {
_local7.endFill();
}
};
_global.newMasker = function (aColor, _dir, w, h, L) {
if (!aColor) {
aColor = [0, 100];
}
if (!_dir) {
_dir = _root;
}
if (!w) {
w = Stage.width;
}
if (!h) {
h = Stage.height;
}
if (!L) {
L = 500;
}
this.kill(_dir[_dir._name + "Masker"]);
var _local7 = this.newMc(_dir, _dir._name + "Masker");
var _local12 = [[-L, -L], [w + L, -L], [w + L, 0], [-L, 0]];
var _local11 = [[-L, h], [w + L, h], [w + L, h + L], [-L, h + L]];
var _local10 = [[-L, -L], [0, -L], [0, h + L], [-L, h + L]];
var _local9 = [[w, -L], [w + L, -L], [w + L, h + L], [w, h + L]];
this.drawManage(_local7, [1, 0, 0], _local12, [aColor[0], aColor[1]]);
this.drawManage(_local7, [1, 0, 0], _local11, [aColor[0], aColor[1]]);
this.drawManage(_local7, [1, 0, 0], _local10, [aColor[0], aColor[1]]);
this.drawManage(_local7, [1, 0, 0], _local9, [aColor[0], aColor[1]]);
};
_global.keyManage = function (_dir, aKey, aFun, aExtFun) {
var keyManager = this.newMc(_dir, _dir._name + "KeyManager");
for (var _local4 in aKey) {
var _local2 = aKey[_local4];
keyManager["bDown" + _local2] = false;
}
var len = aKey.length;
keyManager.onEnterFrame = function () {
var _local2 = 0;
while (_local2 < len) {
var _local1 = aKey[_local2];
if (Key.isDown(_local1)) {
if (!keyManager["bDown" + _local1]) {
_dir[aFun[_local2][1]]();
keyManager["bDown" + _local1] = true;
}
_dir[aFun[_local2][0]]();
}
if (!Key.isDown(_local1)) {
if (keyManager["bDown" + _local1]) {
_dir[aFun[_local2][2]]();
keyManager["bDown" + _local1] = false;
}
}
_local2++;
}
_dir[aExtFun]();
};
};
_global.classMenu = function (_dir, aMenu, aFun, aExtFun) {
var _local4 = aMenu.length;
var _local3 = 0;
while (_local3 < _local4) {
var _local2 = _dir[aMenu[_local3]];
_local2.onRollOver = function () {
this.gotoAndPlay(2);
_dir[aExtFun[0]]();
};
_local2.onRollOut = function () {
this.gotoAndPlay(this._totalframes - this._currentframe);
_dir[aExtFun[1]]();
};
if (aFun) {
_local2.id = _local3;
_local2.onPress = function () {
_dir[aFun[this.id]]();
};
}
_local3++;
}
};
_global.classMenu2 = function (_dir, aMenu, aExtFun) {
var len = aMenu.length;
var _local6 = this.newMc2(_dir, "mcHit");
_local6.onEnterFrame = function () {
var _local3 = 0;
while (_local3 < len) {
var _local2 = _dir[aMenu[_local3]];
var _local4 = _local2.hitTest(_root._xmouse, _root._ymouse, true);
if (_local4) {
if (!_local2.bHited) {
_local2.gotoAndPlay(2);
_dir[aExtFun[0]]();
_local2.bHited = true;
}
} else if (_local2.bHited) {
_local2.gotoAndPlay(_local2._totalframes - _local2._currentframe);
_dir[aExtFun[1]]();
_local2.bHited = false;
}
_local3++;
}
};
};
_global.randPlay = function (_mc) {
if (!_mc.bInited) {
_mc.gotoAndPlay(this.intRand(_mc._totalframes));
_mc.bInited = true;
}
};
_global.car2Flash = function (_o) {
_o._y = _o._y * -1;
_o._rotation = _o._rotation * -1;
};
_global.flash2Car = function (_o) {
return(this.car2Flash(_o));
};
_global.car2Polar = function (x, y) {
var _local2 = Math.sqrt((x * x) + (y * y));
var _local5 = this.atan2D(y, x);
return({r:_local2, a:_local5});
};
_global.polar2Car = function (len, ang) {
var _local3 = len * this.cosD(ang);
var _local2 = len * this.sinD(ang);
return({x:_local3, y:_local2});
};
_global.getCoordG = function (_mc) {
var _local1 = {x:_mc._x, y:_mc._y};
_mc._parent.localToGlobal(_local1);
return(_local1);
};
_global.getCoordG2 = function (_mc, xx, yy) {
var _local1 = {x:xx, y:yy};
_mc.localToGlobal(_local1);
return(_local1);
};
_global.getCoordL = function (_mc, xx, yy) {
var _local1 = {x:xx, y:yy};
_mc._parent.globalToLocal(_local1);
return(_local1);
};
_global.randPole = function () {
var _local1 = ((Math.random() > 0.5) ? 1 : -1);
return(_local1);
};
_global.rand = function (_n) {
if (!_n) {
_n = 1;
}
var _local2 = Math.random() * _n;
return(_local2);
};
_global.intRand = function (_n) {
var _local1 = Math.floor(Math.random() * _n);
return(_local1);
};
_global.floor = function (_n) {
var _local1 = Math.floor(_n);
return(_local1);
};
_global.ceil = function (_n) {
var _local1 = Math.ceil(_n);
return(_local1);
};
_global.round = function (_n) {
var _local1 = Math.round(_n);
return(_local1);
};
_global.sqrt = function (_n) {
var _local1 = Math.sqrt(_n);
return(_local1);
};
_global.abs = function (_n) {
var _local1 = Math.abs(_n);
return(_local1);
};
_global.getDis = function (x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
return(_local3);
};
_global.getL2 = function (l1, l3) {
var _local1 = Math.sqrt((l3 * l3) - (l1 * l1));
return(_local1);
};
_global.getL3 = function (l1, l2) {
var _local1 = Math.sqrt((l1 * l1) + (l2 * l2));
return(_local1);
};
_global.sinD = function (_angle) {
var _local1 = Math.sin((_angle * 3.141593) / 180);
return(_local1);
};
_global.cosD = function (_angle) {
var _local1 = Math.cos((_angle * 3.141593) / 180);
return(_local1);
};
_global.atan2D = function (y, x) {
var _local1 = Math.atan2(y, x) * 57.29578;
return(_local1);
};
_global.asinD = function (_ratio) {
var _local1 = Math.asin(_ratio) * 57.29578;
return(_local1);
};
_global.acosD = function (_ratio) {
var _local1 = Math.acos(_ratio) * 57.29578;
return(_local1);
};
_global.tanD = function (_angle) {
var _local1 = Math.tan((_angle * 3.141593) / 180);
return(_local1);
};
_global.d2r = function (_angle) {
var _local1 = _angle * 0.017453;
return(_local1);
};
_global.r2d = function (_radian) {
var _local1 = _radian * 57.29578;
return(_local1);
};
_global.fixAng = function (_ang) {
var _local1 = _ang % 360;
var _local2 = (((_local1 % 360) < 0) ? (_local1 + 360) : (_local1));
return(_local2);
};
_global.getAng = function (x1, y1, x2, y2) {
var _local1 = Math.atan2(y2 - y1, x2 - x1) * 57.29578;
return(_local1);
};
_global.getAng2 = function (_a1, _a2) {
var _local4 = this.fixAng(_a1);
var _local3 = this.fixAng(_a2);
var _local2 = this.abs(_local3 - _local4);
if (_local2 > 180) {
_local2 = 360 - _local2;
}
_local2 = this.fixAng(_local2);
return(_local2);
};
_global.getOutAng = function (_lineAng, _inAng) {
var _local1 = (_lineAng * 2) - _inAng;
return(_local1);
};
_global.getRo = function (_a1, _a2, _mod, _r, _m) {
var _local7 = this.fixAng(_a1);
var _local2 = this.fixAng(_a2);
var _local5 = _r;
var _local6 = _local7 - _local2;
var _local3 = this.abs(_local6);
if (_local3 < _m) {
return(_local2);
}
var _local4 = _local3 / _local6;
if (_local3 > 180) {
_local3 = 360 - _local3;
_local4 = -_local4;
}
if (_mod == 1) {
_local2 = _local2 + ((_local4 * _local3) * _local5);
} else {
_local2 = _local2 + (_local4 * _local5);
}
_local2 = this.fixAng(_local2);
return(_local2);
};
_global.classRo = function (xx, yy, _ang, _ox, _oy) {
var _local8 = xx;
var _local7 = yy;
var _local2 = _ang;
var _local6 = _ox;
var _local5 = _oy;
_local8 = _local8 - _local6;
_local7 = _local7 - _local5;
var _local4 = (this.cosD(_local2) * _local8) - (this.sinD(_local2) * _local7);
var _local3 = (this.cosD(_local2) * _local7) + (this.sinD(_local2) * _local8);
_local4 = _local4 + _local6;
_local3 = _local3 + _local5;
return({x:_local4, y:_local3});
};
_global.classRo2 = function (xx, yy, _mc, offsetAng) {
var _local5 = xx;
var _local4 = yy;
var _local2 = this.atan2D(_local4, _local5);
if (_mc) {
if (!offsetAng) {
offsetAng = 0;
}
_mc._rotation = _local2 + offsetAng;
}
return(_local2);
};
}
}
Symbol 22 MovieClip Frame 1
return(undefined);
Symbol 43 MovieClip Frame 146
_root.nextFrame();
Symbol 48 Button
on (release) {
gotoAndStop ("frontPage");
}
Symbol 53 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 58 Button
on (release) {
gotoAndStop (1);
}
Symbol 68 Button
on (release) {
gotoAndStop ("submited");
}
Symbol 73 Button
on (release) {
viewHighscore();
}
Symbol 74 MovieClip Frame 1
stop();
_global.game_name = _game_name;
var highscore = eval (score_var);
_global.viewHighscore = function () {
getURL ("http://www.freeworldgroup.com/score/index.asp?game=" + game_name, "_blank");
};
if (highscore <= 0) {
this._visible = false;
}
trace(game_name);
trace(highscore);
trace("http://www.freeworldgroup.com/score/index.asp?game=" + game_name);
Symbol 74 MovieClip Frame 3
function sendData() {
send_var.game = game_name;
send_var.score = highscore;
send_var.name = name_txt.text;
if (send_var.name == "") {
send_var.name = "guest" + int(Math.random() * 1000);
}
send_var.sendAndLoad("http://www.freeworldgroup.com/score/score.asp", load_var, "POST");
gotoAndStop ("sending");
}
stop();
gold_txt.text = highscore;
send_var = new LoadVars();
load_var = new LoadVars();
ok_btn.onRelease = sendData;
load_var.onLoad = function () {
gotoAndStop ("done");
};
Instance of Symbol 55 MovieClip in Symbol 74 MovieClip Frame 3
on (release) {
}
Symbol 79 MovieClip Frame 25
stop();
Symbol 96 MovieClip Frame 137
stop();
Symbol 113 Button
on (release) {
viewHighscore();
}
Symbol 116 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 119 Button
on (release) {
_root.backToFrontPage();
}
Symbol 124 Button
on (release) {
_root.continueGame();
}
Symbol 127 MovieClip Frame 20
stop();
Symbol 128 MovieClip Frame 25
stop();
Symbol 129 MovieClip [mcOver] Frame 1
stop();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Instance of Symbol 74 MovieClip in Symbol 129 MovieClip [mcOver] Frame 1
//component parameters
onClipEvent (construct) {
_game_name = "genghis_khan";
score_var = "_root.score";
}
Symbol 201 MovieClip Frame 47
stop();
Symbol 206 Button
on (release) {
_root.playMoreMissions();
}
Symbol 208 MovieClip [mcEnd] Frame 1
stop();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Instance of Symbol 74 MovieClip in Symbol 208 MovieClip [mcEnd] Frame 1
//component parameters
onClipEvent (construct) {
_game_name = "genghis_khan";
score_var = "_root.score";
}
Symbol 218 Button
on (release) {
_root.upgrade();
}
Symbol 232 Button
on (release) {
_root.sell();
}
Symbol 245 Button
on (release) {
this._visible = false;
_root.mcLevel.currRole = null;
}
Symbol 250 Button
on (release) {
_root.recover();
}
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 10
stop();
Symbol 273 MovieClip Frame 20
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 283 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 1
stop();
Symbol 299 MovieClip Frame 2
function rest() {
trace("\u521D\u59CB\u5316");
mcNormal.gotoAndStop(1);
mcBerserker.gotoAndStop(1);
mcAggressive.gotoAndStop(1);
mcDefensive.gotoAndStop(1);
mcTactical.gotoAndStop(1);
}
function disSel() {
switch (_root.fightMode) {
case "normal" :
mcNormal.gotoAndStop(2);
break;
case "berserker" :
mcBerserker.gotoAndStop(2);
break;
case "aggressive" :
mcAggressive.gotoAndStop(2);
break;
case "defensive" :
mcDefensive.gotoAndStop(2);
break;
case "tactical" :
mcTactical.gotoAndStop(2);
}
_root.initRoleModeDis();
}
mcNormal.onPress = function () {
rest();
this.gotoAndStop(2);
_root.setFightMode(0);
disSel();
this._parent.gotoAndStop(1);
};
mcBerserker.onPress = function () {
rest();
this.gotoAndStop(2);
_root.setFightMode(1);
disSel();
this._parent.gotoAndStop(1);
};
mcAggressive.onPress = function () {
rest();
this.gotoAndStop(2);
_root.setFightMode(2);
disSel();
this._parent.gotoAndStop(1);
};
mcDefensive.onPress = function () {
rest();
this.gotoAndStop(2);
_root.setFightMode(3);
disSel();
this._parent.gotoAndStop(1);
};
mcTactical.onPress = function () {
rest();
this.gotoAndStop(2);
_root.setFightMode(4);
disSel();
this._parent.gotoAndStop(1);
};
mcNormal.onRollOver = function () {
mcNote.gotoAndStop(1);
};
mcBerserker.onRollOver = function () {
mcNote.gotoAndStop(2);
};
mcAggressive.onRollOver = function () {
mcNote.gotoAndStop(3);
};
mcDefensive.onRollOver = function () {
mcNote.gotoAndStop(4);
};
mcTactical.onRollOver = function () {
mcNote.gotoAndStop(5);
};
disSel();
Symbol 315 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 1
function onEnterFrame() {
if (bDrag) {
_root.mcLevel._x = (mapRange * bar._x) / len;
}
}
var len = bg._width;
var mapRange = (550 - _root.mcLevel.mapWidth);
bDrag = false;
bar.onPress = function () {
startDrag (this, false, 0, 0, len, 0);
bDrag = true;
_root.teachPut();
_root.hideMcAttr();
};
bar.onMouseUp = function () {
stopDrag();
bDrag = false;
};
Symbol 346 Button
on (release) {
_root.levelStart();
}
Symbol 350 Button
on (release) {
_root.retreatAlarm();
}
Symbol 352 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 1
stop();
this.onPress = function () {
_root.changeSpeed();
};
Symbol 363 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 2
stop();
Symbol 369 MovieClip Frame 1
stop();
Symbol 369 MovieClip Frame 2
stop();
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 2
stop();
Symbol 375 MovieClip Frame 1
if (!_parent.flash_start) {
gotoAndStop (10);
}
Symbol 375 MovieClip Frame 10
stop();
Symbol 376 MovieClip Frame 9
stop();
_parent.flash_start = true;
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 2
stop();
Symbol 381 MovieClip Frame 1
stop();
Symbol 381 MovieClip Frame 2
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 2
stop();
Symbol 385 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 2
stop();
Symbol 386 MovieClip Frame 1
stop();
Symbol 386 MovieClip Frame 10
function quality_init() {
switch (_quality) {
case "LOW" :
bt4.gotoAndStop(2);
return;
case "MEDIUM" :
bt3.gotoAndStop(2);
return;
case "HIGH" :
bt2.gotoAndStop(2);
return;
case "BEST" :
bt1.gotoAndStop(2);
}
}
function bt_init() {
bt1.gotoAndStop(1);
bt2.gotoAndStop(1);
bt3.gotoAndStop(1);
bt4.gotoAndStop(1);
}
stop();
quality_init();
bt1.bt.onPress = function () {
bt_init();
_quality = "BEST";
quality_init();
bt1.gotoAndStop(2);
};
bt2.bt.onPress = function () {
bt_init();
_quality = "HIGH";
quality_init();
bt2.gotoAndStop(2);
};
bt3.bt.onPress = function () {
bt_init();
_quality = "MEDIUM";
quality_init();
bt3.gotoAndStop(2);
};
bt4.bt.onPress = function () {
bt_init();
_quality = "LOW";
quality_init();
bt4.gotoAndStop(2);
};
Symbol 387 MovieClip Frame 1
hit = false;
opend = false;
onEnterFrame = function () {
dcHitMenu();
dcMenu();
};
dcHitMenu = function () {
var _local2 = btQuality.hitTest(_root._xmouse, _root._ymouse, false);
if (_local2) {
hit = true;
} else {
hit = false;
}
};
dcMenu = function () {
if (hit && (!opend)) {
qualityMenu.gotoAndPlay(1);
btQuality.gotoAndStop(2);
opend = true;
}
if (!hit) {
if (opend) {
qualityMenu.gotoAndPlay(11);
opend = false;
}
btQuality.gotoAndStop(1);
}
};
if (!_root.bMusicOn) {
btMusic.gotoAndStop(2);
}
if (!_root.bSoundOn) {
btSound.gotoAndStop(2);
}
btMusic.onPress = function () {
btMusic.play();
_root.bMusicOn = !_root.bMusicOn;
_root.initMusic();
};
btSound.onPress = function () {
btSound.play();
_root.bSoundOn = !_root.bSoundOn;
_root.initSD();
};
Instance of Symbol 363 MovieClip "btMusic" in Symbol 387 MovieClip Frame 1
on (release) {
_root.setMusic(this);
}
Instance of Symbol 369 MovieClip "btSound" in Symbol 387 MovieClip Frame 1
on (release) {
_root.setSound(this);
}
Symbol 399 MovieClip Frame 1
Symbol 399 MovieClip Frame 14
_root.sdSword.start();
Symbol 400 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 1
Symbol 412 MovieClip Frame 15
_root.sdPike.start();
Symbol 413 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 1
Symbol 426 MovieClip Frame 15
_root.sdSword.start();
Symbol 427 MovieClip Frame 1
stop();
Symbol 438 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 1
stop();
Symbol 454 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 461 Button
on (release) {
_root.stRetreat();
}
Symbol 464 Button
on (release) {
_root.killRetreatAlarm();
}
Symbol 465 MovieClip Frame 1
this._visible = false;
Symbol 476 MovieClip Frame 21
stop();
Symbol 477 MovieClip [mcLayout] Frame 1
function initLayoutBt(mc) {
with (mc) {
btCavalry.onPress = function () {
_root.mcLevel.selRole(0);
};
btPike.onPress = function () {
_root.mcLevel.selRole(1);
};
btSword.onPress = function () {
_root.mcLevel.selRole(2);
};
btBow.onPress = function () {
_root.mcLevel.selRole(3);
};
btMedic.onPress = function () {
_root.mcLevel.selRole(4);
};
btCavalry.onRollOver = function () {
_root.disViewAttr(0);
_root.disLandHP(0);
};
btPike.onRollOver = function () {
_root.disViewAttr(1);
_root.disLandHP(1);
};
btSword.onRollOver = function () {
_root.disViewAttr(2);
_root.disLandHP(2);
};
btBow.onRollOver = function () {
_root.disViewAttr(3);
_root.disLandHP(3);
};
btMedic.onRollOver = function () {
_root.disViewAttr(4);
_root.disLandHP(4);
};
btCavalry.onRollOut = function () {
_root.hideMcAttr();
};
btPike.onRollOut = function () {
_root.hideMcAttr();
};
btSword.onRollOut = function () {
_root.hideMcAttr();
};
btBow.onRollOut = function () {
_root.hideMcAttr();
};
btMedic.onRollOut = function () {
_root.hideMcAttr();
};
btStart.onPress = function () {
};
btSupport.onPress = function () {
};
btReset.onPress = function () {
_root.tryAgain();
};
btMenu.onPress = function () {
if (_root.mcMenu instanceof MovieClip) {
return(undefined);
}
_root.pauseGame();
atMc(_root, "mcMenu");
};
btFightMode.onPress = function () {
if (_root.bStart) {
return(undefined);
}
_root.bFightModeSeted = true;
_root.endTeach();
if (mcFightMode._currentframe == 1) {
mcFightMode.gotoAndStop(2);
} else {
mcFightMode.gotoAndStop(1);
}
};
}
}
initLayoutBt(this);
Symbol 481 Button
on (release) {
_root.backToFrontPage();
}
Symbol 485 Button
on (release) {
_root.bPause = false;
this.removeMovieClip();
}
Symbol 486 MovieClip [mcMenu] Frame 1
stop();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 490 Button
on (release) {
_root.nextLevel();
}
Symbol 512 Button
on (release) {
gotoAndStop ("save");
}
Symbol 522 MovieClip Frame 1
stop();
Symbol 522 MovieClip Frame 10
useName = _parent.record.name;
time = _parent.record.time;
missionNum = _parent.record.missionNum;
sHard = _parent.record.sHard;
Symbol 525 MovieClip Frame 1
stop();
record = _root.getLoad(id);
mcRecord.gotoAndStop("off");
if (record.name) {
mcRecord.gotoAndStop("on");
}
bt.onPress = function () {
var _local2 = this._parent._parent;
_local2.rest();
_local2.selID = this._parent.id;
_local2.disSel();
};
Symbol 525 MovieClip Frame 11
record = _root.getLoad(id);
Symbol 529 Button
on (release) {
if (selID != null) {
if (tName.text == "") {
_root.alrm("save", 0);
return(undefined);
}
_root.stSaveGame(tName.text, selID);
gotoAndStop ("saved");
} else {
_root.alrm("save", 1);
}
}
Symbol 534 MovieClip Frame 1
function rest() {
var _local2 = 1;
while (_local2 <= 5) {
this["bt" + _local2].gotoAndStop("off");
_local2++;
}
}
function disSel() {
this["bt" + selID].gotoAndStop("on");
}
stop();
selID = null;
disSel();
var i = 1;
while (i <= 5) {
this["bt" + i].id = i;
i++;
}
Symbol 534 MovieClip Frame 10
rest();
_parent.bSaved = true;
Symbol 537 Button
on (release) {
gotoAndStop (1);
}
Symbol 538 MovieClip [mcPass] Frame 1
stop();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 538 MovieClip [mcPass] Frame 10
if (bSaved) {
mcSave.gotoAndStop("saved");
}
Symbol 541 MovieClip [mcPause] Frame 1
stop();
_root.bPause = true;
btContinue.onPress = function () {
_root.continueGame();
};
btRetry.onPress = function () {
_root.tryAgain();
};
btViewScore.onPress = function () {
viewHighscore();
};
btMore.onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
btDownload.onPress = function () {
getURL ("http://www.ifungames.com", "_blank");
};
btAddGame.onPress = function () {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
};
btMainMenu.onPress = function () {
turnTo("main_menu");
};
Symbol 615 MovieClip [mcRetreat] Frame 90
stop();
_root.retreat();
Symbol 617 MovieClip Frame 1
_visible = false;
Symbol 626 MovieClip [bow] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 636 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 1
stop();
Symbol 642 MovieClip [bow2] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 644 MovieClip [cavalry] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 654 MovieClip Frame 1
Symbol 654 MovieClip Frame 14
_root.sdSword.start();
Symbol 655 MovieClip Frame 1
stop();
Symbol 657 MovieClip [cavalry2] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 659 MovieClip [pike] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 667 MovieClip Frame 1
Symbol 667 MovieClip Frame 15
_root.sdPike.start();
Symbol 668 MovieClip Frame 1
stop();
Symbol 670 MovieClip [pike2] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 672 MovieClip [sword] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 684 MovieClip Frame 1
Symbol 684 MovieClip Frame 13
_root.sdSword.start();
Symbol 685 MovieClip Frame 1
stop();
Symbol 687 MovieClip [sword2] Frame 1
holdNote._visible = false;
selNote._visible = false;
Symbol 714 MovieClip [mcLevel] Frame 1
function levelInit() {
if (bLevelInited) {
return(undefined);
}
bLevelInited = true;
_root.hideMcAttr();
tileWidth = 32;
tileRow = 9;
tileColumn = 9;
worldx = 110;
worldy = 108;
mapWidth = 1400;
enemyCoordOffset = (1400 - (worldx * 2)) - (tileWidth * tileRow);
solveID = 0;
maxsolveID = 100;
diceInter = 0;
maxDiceInter = 25;
levelUnit = _root.levelUnit;
goldStep = _root.goldStep;
expStep = _root.expStep;
expUnit = _root.expUnit;
arrowV = new global.Vector(5, 0);
aTile = new Array();
aRole = new Array();
aEnemy = new Array();
aAllSoldier = new Array();
aActived = new Array();
aArrow = new Array();
aRoleType = _root.aRoleType;
aStandDis = _root.aStandDis;
aHitDis = _root.aHitDis;
aSpeed = _root.aSpeed;
aCost = _root.aCost;
aPower = _root.aPower;
aHitPoint = _root.aHitPoint;
roleColorTrans = {rb:0, gb:-80, bb:-255};
enemyColorTrans = {rb:-255, gb:-80, bb:0};
selRoleID = null;
selReposeRole = null;
mcSelRole = null;
currRole = null;
oldNoteTile = null;
oldLeftNoteTile = null;
oldRightNoteTile = null;
oldTile = {};
oldLeftTile = {};
oldRightTile = {};
bRepose = false;
createWorld();
}
function createCastle() {
roleCastle = new as.Castle(mcRoleCastle, _root.selfPower, worldx);
enemyCastle = new as.Castle(mcEnemyCastle, _root.enemyPower, mapWidth - worldx);
}
function createWorld() {
var _local7 = 0;
while (_local7 < tileRow) {
var _local3 = 0;
while (_local3 < tileColumn) {
var _local2 = atMc(this, "mcTile", (("tile" + _local7) + "_") + _local3);
var _local5 = (tileWidth * _local3) + worldx;
var _local4 = (tileWidth * _local7) + worldy;
_local2._x = _local5;
_local2._y = _local4;
var _local9 = _local5 + (tileWidth / 2);
var _local8 = _local4 + (tileWidth / 2);
var _local6 = {x:_local5, y:_local4, centx:_local9, centy:_local8, mc:_local2, bSet:false, typeID:null, role:null};
aTile.push(_local6);
_local2.tileObj = _local6;
_local3++;
}
_local7++;
}
}
function holdRole() {
currRole.hold();
}
function selRole(_id) {
selRoleID = _id;
if (_root.gold < aCost[selRoleID]) {
_root.alrm("layout", 1);
return(undefined);
}
var _local3 = aRoleType[selRoleID];
mcSelRole = atMc2(this, _local3);
startDrag (mcSelRole, true);
}
function resetAllTile() {
for (var _local1 in aTile) {
resetTile(aTile[_local1]);
}
}
function resetTile(_tile) {
_tile.bSet = false;
_tile.typeID = null;
_tile.role = null;
}
function getTile(_r, _c) {
var _local2 = (_r * tileColumn) + _c;
var _local1 = aTile[_local2];
return(_local1);
}
function getCurrTile(x, y) {
x = x - worldx;
y = y - worldy;
var _local1 = Math.floor(y / tileWidth);
var _local2 = Math.floor(x / tileWidth);
if (_local1 < 0) {
return(undefined);
}
if (_local1 >= tileRow) {
return(undefined);
}
if (_local2 < 0) {
return(undefined);
}
if (_local2 >= tileColumn) {
return(undefined);
}
var _local3 = getTile(_local1, _local2);
return(_local3);
}
function initSetting(_aFamily, _tile, _id, _mcRole, _exp) {
var _local8 = _aFamily;
var _local3 = _id;
var _local15 = _exp;
var _local7 = Math.floor(_exp / levelUnit);
var _local4 = _tile;
var _local5 = _mcRole;
var _local6 = aRoleType[_local3];
var _local13 = aStandDis[_local3];
var _local10 = aHitDis[_local3];
var _local12 = _root.getUpgradNum(_root.aPower[_local3], _root.aPowerUpRate[_local3], _local7, "power", _local6);
var _local16 = _root.getUpgradNum(_root.aHitPoint[_local3], _root.aHpUpRate[_local3], _local7, "hitPoint", _local6);
_local5._x = _local4.centx;
_local5._y = _local4.centy;
if (_local8 == aRole) {
var _local2 = new as.Role(_local5);
var _local17 = roleColorTrans;
} else {
var _local2 = new as.Enemy(_local5);
var _local17 = enemyColorTrans;
}
if (_local6 == "cavalry") {
var _local9 = getCurrTile(_xmouse - tileWidth, _ymouse);
var _local14 = getCurrTile(_xmouse + tileWidth, _ymouse);
_local9.role = _local2;
_local14.role = _local2;
} else {
var _local9 = null;
var _local14 = null;
}
_local4.bSet = true;
_local4.typeID = _local3;
_local4.role = _local2;
_local5.typeID = _local3;
_local5.role = _local2;
var _local11 = aSpeed[_local3];
_local2.setV(_local11);
_local2.setType(_local6, _local3);
_local2.setStandDis(_local13);
_local2.setHitDis(_local10);
_local2.setPower(_local12);
_local2.setHitPoint(_local16);
_local2.setExp(_local15);
_local2.setTile(_local4, _local9, _local14);
_local2.addCost(_root.getUpgradNum(_root.aCost[_local3], _root.aCostUpRate[_local3], _local7));
_local8.push(_local2);
if (_root.bStart) {
_local2.setHold();
}
}
function initLastRole() {
var _local15 = _root.aLastRole.length;
var _local3 = -1;
var _local4 = 0;
while (_local4 < _local15) {
var _local11 = _root.aLastRole[_local4 - 1];
var _local5 = _root.aLastRole[_local4];
var _local10 = aRoleType[_local11.nTypeID];
var _local7 = _local5.nTypeID;
var _local14 = _local5.nLevel;
var _local12 = _local5.exper;
var _local6 = aRoleType[_local7];
if (_local6 != "cavalry") {
if (_local10 != "cavalry") {
_local3 = _local3 + 1;
} else {
_local3 = _local3 + 2;
}
} else {
var _local8 = (_local3 + 1) % tileColumn;
if (_local8 >= (tileColumn - 2)) {
_local3 = _local3 + ((tileColumn - _local8) + 2);
} else {
_local3 = _local3 + 2;
}
}
var _local9 = aTile[_local3];
var _local13 = atMc2(this, _local6);
initSetting(aRole, _local9, _local7, _local13, _local12);
_local4++;
}
}
function onMouseDown() {
reposeRole();
disSelRole();
}
function onMouseUp() {
stopDrag();
setRole();
clearPutNote();
}
function onMouseMove() {
disPutNote();
}
function disPutNote() {
if (!mcSelRole) {
return(undefined);
}
clearPutNote();
var _local1 = getCurrTile(_xmouse, _ymouse);
if (!bRepose) {
var _local2 = aRoleType[selRoleID];
} else {
var _local2 = mcSelRole.role.sType;
}
if (_local2 == "cavalry") {
leftNoteTile = getCurrTile(_xmouse - tileWidth, _ymouse);
rightNoteTile = getCurrTile(_xmouse + tileWidth, _ymouse);
if (leftNoteTile.role) {
if (leftNoteTile.role == mcSelRole.role) {
leftNoteTile.mc.gotoAndStop("on");
} else {
leftNoteTile.mc.gotoAndStop("red");
}
} else {
leftNoteTile.mc.gotoAndStop("on");
}
if (rightNoteTile.role) {
if (rightNoteTile.role == mcSelRole.role) {
rightNoteTile.mc.gotoAndStop("on");
} else {
rightNoteTile.mc.gotoAndStop("red");
}
} else {
rightNoteTile.mc.gotoAndStop("on");
}
}
if (_local1.role) {
if (_local1.role == mcSelRole.role) {
_local1.mc.gotoAndStop("on");
} else {
_local1.mc.gotoAndStop("red");
}
} else {
_local1.mc.gotoAndStop("on");
}
oldNoteTile = _local1;
oldLeftNoteTile = leftNoteTile;
oldRightNoteTile = rightNoteTile;
}
function clearPutNote() {
oldNoteTile.mc.gotoAndStop("off");
leftNoteTile.mc.gotoAndStop("off");
rightNoteTile.mc.gotoAndStop("off");
}
function reposeRole() {
var _local2 = getCurrTile(_xmouse, _ymouse);
oldTile = _local2;
oldLeftTile = getCurrTile(_xmouse - tileWidth, _ymouse);
oldRightTile = getCurrTile(_xmouse + tileWidth, _ymouse);
if (!(_local2 instanceof Object)) {
return(undefined);
}
if (!_local2.role) {
return(undefined);
}
currRole.mc.selNote._visible = false;
currRole = _local2.role;
currRole.mc.selNote._visible = true;
mcSelRole = currRole.mc;
startDrag (mcSelRole);
_root.disUpgrade();
bRepose = true;
}
function disSelRole() {
currRole.mc.selNote._visible = false;
for (var _local3 in aRole) {
var _local2 = aRole[_local3].mc.hitA.hitTest(_root._xmouse, _root._ymouse);
if (_local2) {
currRole = aRole[_local3];
break;
}
}
currRole.mc.selNote._visible = true;
if (currRole) {
if (currRole.bFighting) {
_root.disRecover();
} else {
_root.disUpgrade();
}
}
}
function posebackRole() {
bRepose = false;
mcSelRole._x = oldTile.centx;
mcSelRole._y = oldTile.centy;
}
function clearSel() {
mcSelRole.removeMovieClip();
mcSelRole = null;
selRoleID = null;
}
function setRole() {
if (!bRepose) {
if (_root.gold < aCost[selRoleID]) {
return(undefined);
}
var _local5 = aRoleType[selRoleID];
if (!_local5) {
return(undefined);
}
var _local2 = getCurrTile(_xmouse, _ymouse);
if (!(_local2 instanceof Object)) {
_root.alrm("layout", 2);
clearSel();
return(undefined);
}
if (_local2.bSet) {
clearSel();
return(undefined);
}
if (_local5 == "cavalry") {
var _local3 = getCurrTile(_xmouse - tileWidth, _ymouse);
var _local4 = getCurrTile(_xmouse + tileWidth, _ymouse);
if (!(_local3 instanceof Object)) {
clearSel();
return(undefined);
}
if (!(_local4 instanceof Object)) {
clearSel();
return(undefined);
}
if (_local3.bSet) {
clearSel();
return(undefined);
}
if (_local4.bSet) {
clearSel();
return(undefined);
}
_local3.bSet = true;
_local4.bSet = true;
}
initSetting(aRole, _local2, selRoleID, mcSelRole, 0);
_root.endTeach();
_root.lossGold(aCost[selRoleID]);
selRoleID = null;
if (_root.bStart) {
activeRole();
resetAllTile();
}
} else {
var _local2 = getCurrTile(mcSelRole._x, mcSelRole._y);
if (!(_local2 instanceof Object)) {
_root.alrm("layout", 2);
posebackRole();
return(undefined);
}
if (_local2.role) {
if (_local2.role != mcSelRole.role) {
posebackRole();
return(undefined);
}
}
if (mcSelRole.role.sType == "cavalry") {
var _local3 = getCurrTile(mcSelRole._x - tileWidth, mcSelRole._y);
var _local4 = getCurrTile(mcSelRole._x + tileWidth, mcSelRole._y);
if (!(_local3 instanceof Object)) {
posebackRole();
return(undefined);
}
if (!(_local4 instanceof Object)) {
posebackRole();
return(undefined);
}
if (_local3.role) {
if (_local3.role != mcSelRole.role) {
posebackRole();
return(undefined);
}
}
if (_local4.role) {
if (_local4.role != mcSelRole.role) {
posebackRole();
return(undefined);
}
}
oldLeftTile.bSet = false;
oldLeftTile.typeID = null;
oldLeftTile.role = null;
oldRightTile.bSet = false;
oldRightTile.typeID = null;
oldRightTile.role = null;
_local3.bSet = true;
_local4.bSet = true;
_local3.role = mcSelRole.role;
_local4.role = mcSelRole.role;
}
mcSelRole._x = _local2.centx;
mcSelRole._y = _local2.centy;
oldTile.bSet = false;
oldTile.typeID = null;
oldTile.role = null;
_local2.bSet = true;
_local2.typeID = mcSelRole.typeID;
_local2.role = mcSelRole.role;
bRepose = false;
if (mcSelRole.role.sType == "cavalry") {
currRole.setTile(_local2, _local3, _local4);
} else {
currRole.setTile(_local2, null, null);
}
}
delete mcSelRole;
}
function getEnemyCoord() {
var _local7 = new Array();
var _local3 = aTile.length;
var _local1 = 0;
while (_local1 < _local3) {
var _local2 = (_local3 - _local1) - 1;
if (aTile[_local1].typeID != null) {
var _local4 = aTile[_local1].typeID;
var _local6 = aTile[_local2].centx;
var _local5 = aTile[_local2].centy;
_local7.push({typeID:_local4, x:_local6, y:_local5});
}
_local1++;
}
}
function addEnemy() {
var _local9 = _root.aEnemyShape;
var _local13 = _root.aEnemyLevel;
var _local12 = _local9.length;
var _local3 = 0;
while (_local3 < _local12) {
if (_local9[_local3].typeID == null) {
} else {
var _local4 = _local9[_local3];
var _local5 = _local4.typeID;
var _local7 = aRoleType[_local5];
var _local8 = atMc2(this, _local7 + "2");
var _local6 = {centx:_local4.x + enemyCoordOffset, centy:_local4.y};
initSetting(aEnemy, _local6, _local5, _local8, _local13[_local3] * levelUnit);
}
_local3++;
}
}
function initFightMode() {
solveFightMode(aRole, fightMode);
solveFightMode(aEnemy, enemyFightMode);
trace("\u521D\u59CB\u5316\u6218\u6597\u6A21\u5F0F\uFF01");
}
function solveFightMode(_aRole, _mode) {
for (var _local4 in _aRole) {
var _local2 = _aRole[_local4];
switch (_root.fightMode) {
case "normal" :
break;
case "berserker" :
_local2.setPower(_local2.power * (1 + _root.maxBerPW));
_local2.setHitPoint(_local2.maxHitPoint * (1 + _root.maxBerHP));
break;
case "aggressive" :
_local2.setPower(_local2.power * (1 + _root.maxAggPW));
_local2.setHitPoint(_local2.maxHitPoint * (1 + _root.maxAggHP));
break;
case "defensive" :
_local2.setPower(_local2.power * (1 + _root.maxDefenPW));
_local2.setHitPoint(_local2.maxHitPoint * (1 + _root.maxDefenHP));
break;
case "tactical" :
}
_local2.initFightMode();
}
}
function roleSolve() {
solveID = solveID + 1;
if (solveID > maxsolveID) {
solveID = 0;
}
var _local18 = Math.floor(maxDiceInter / _root.speedTimes);
for (var _local20 in aActived) {
var _local16 = aActived[_local20];
_local16.resetRelation();
_local16.resetForce();
}
if ((solveID % 2) == 0) {
for (var _local20 in aActived) {
var _local16 = aActived[_local20];
var _local14 = _local16.mc._x;
var _local13 = _local16.mc._y;
_local16.resetForce();
var _local9 = _local16.getRelation();
for (var _local19 in aActived) {
var _local2 = aActived[_local19];
if (_local16 == _local2) {
continue;
}
var _local4 = false;
for (var _local17 in _local9) {
if (_local9[_local17] == _local2) {
_local4 = true;
break;
}
}
if (_local4) {
continue;
}
var _local6 = _local2.mc._x;
var _local5 = _local2.mc._y;
var _local8 = _local6 - _local14;
var _local7 = _local5 - _local13;
var _local10 = Math.sqrt((_local8 * _local8) + (_local7 * _local7));
if (_local10 > 25) {
continue;
}
var _local12 = Math.atan2(_local5 - _local13, _local6 - _local14) * 57.29578;
var _local15 = getPushForce(_local10);
var _local3 = new global.Vector(_local15, 0);
var _local11 = _local3.clone();
_local3.setAng(_local12 + 170);
_local11.setAng(_local12);
_local16.addForce(_local3);
_local2.addForce(_local11);
_local2.addRelation(_local16);
}
_local16.solve();
if (diceInter == _local18) {
_local16.attack();
}
}
} else {
for (var _local20 in aActived) {
var _local16 = aActived[_local20];
_local16.solve();
if (diceInter == _local18) {
_local16.attack();
}
}
}
}
function getDiceNum() {
diceInter = diceInter + 1;
var _local4 = Math.floor(maxDiceInter / _root.speedTimes);
if (diceInter > _local4) {
diceInter = 0;
}
if (diceInter == _local4) {
for (var _local3 in aActived) {
var _local2 = Math.ceil(Math.random() * 6);
aActived[_local3].setDiceNum(_local2);
}
}
}
function getPushForce(_r) {
var _local3 = _r;
var _local2 = 2000;
var _local1 = 2;
FB = (_local1 * _local2) / Math.pow(_local3, _local1 + 1);
if (FB > 10) {
FB = 10;
}
return(FB);
}
function activeRole() {
aAllSoldier = aRole.concat(aEnemy);
aActived = aAllSoldier.slice();
for (var _local1 in aActived) {
if (!(aActived[_local1].mc instanceof MovieClip)) {
return(undefined);
}
if (aActived[_local1].sState == "stand") {
aActived[_local1].stFighting();
}
}
}
function arrowMv() {
var _local5 = false;
var _local11 = aArrow.length;
var _local2 = 0;
while (_local2 < _local11) {
var _local1 = aArrow[_local2].mc;
var _local3 = aArrow[_local2].aim.mc;
var _local12 = aArrow[_local2].bowman.mc;
if (!(_local3 instanceof MovieClip)) {
_local5 = true;
} else {
var _local9 = _local1._x;
var _local7 = _local1._y;
var _local8 = _local3._x;
var _local6 = _local3._y;
var _local4 = Math.atan2(_local6 - _local7, _local8 - _local9) * 57.29578;
arrowV.setAng(_local4);
_local1._x = _local1._x + arrowV.x;
_local1._y = _local1._y + arrowV.y;
_local1._rotation = _local4;
}
var _local10 = _local1.hitTest(_local3.hitA);
if (_local10) {
_local5 = true;
}
if (_local5) {
aArrow.splice(_local2, 1);
_local11 = aArrow.length;
_local1.removeMovieClip();
}
_local2++;
}
}
function onEnterFrame() {
if (_root.bPause) {
return(undefined);
}
if (!_root.bStart) {
return(undefined);
}
getDiceNum();
roleSolve();
arrowMv();
}
trace("::::\u5173\u5361\u52A0\u8F7D\u6210\u529F::::");
levelInit();
Symbol 719 MovieClip Frame 1
stop();
Symbol 795 MovieClip Frame 85
_root.nextFrame();
Symbol 796 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 844 Button
on (release) {
_root.loadGame();
}
Symbol 847 Button
on (release) {
getURL ("http://www.ifungames.com", "_blank");
}
Symbol 850 Button
on (release) {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
}
Symbol 854 Button
on (release) {
_root.gotoAndStop("credits");
}
Symbol 857 Button
on (release) {
_root.instructions();
}
Symbol 862 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Symbol 866 Button
on (release) {
_root.playGame();
}
Symbol 867 MovieClip Frame 1
stop();
Instance of Symbol 859 MovieClip in Symbol 867 MovieClip Frame 1
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Instance of Symbol 859 MovieClip in Symbol 867 MovieClip Frame 10
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 868 MovieClip Frame 25
stop();
_root.mcFrontPage._visible = false;
Symbol 872 Button
on (release) {
if (selID != null) {
var loadData = _root.getLoad(selID);
if (loadData.name) {
_root.stLoadGame(selID);
_parent.gotoAndPlay("map");
} else {
_root.alrm("load", 1);
}
} else {
_root.alrm("load", 0);
}
}
Symbol 873 MovieClip Frame 1
function rest() {
var _local2 = 1;
while (_local2 <= 5) {
this["bt" + _local2].gotoAndStop("off");
_local2++;
}
}
function disSel() {
this["bt" + selID].gotoAndStop("on");
}
stop();
selID = null;
disSel();
var i = 1;
while (i <= 5) {
this["bt" + i].id = i;
i++;
}
Symbol 878 MovieClip Frame 1
stop();
Symbol 883 MovieClip Frame 1
stop();
Symbol 888 MovieClip Frame 1
stop();
Symbol 891 Button
on (release) {
if (!_root.bFistNoted) {
gotoAndStop ("start");
} else {
gotoAndStop ("map");
}
}
Symbol 898 MovieClip Frame 1
stop();
Symbol 904 MovieClip Frame 1
stop();
Symbol 924 MovieClip Frame 1
stop();
Symbol 971 MovieClip Frame 1
stop();
Symbol 972 Button
on (release) {
_root.mcStart.page = _root.mcStart.page - 1;
if (_root.mcStart.page == 0) {
_root.mcStart.gotoAndStop("mode");
} else {
_root.mcStart.mcInstructions.gotoAndStop("p" + _root.mcStart.page);
}
}
Symbol 973 Button
on (release) {
_root.mcStart.page = _root.mcStart.page + 1;
if (_root.mcStart.page > 13) {
_root.mcStart.gotoAndStop("map");
} else {
_root.mcStart.mcInstructions.gotoAndStop("p" + _root.mcStart.page);
}
}
Symbol 976 Button
on (release) {
_root.mcStart.gotoAndStop("map");
}
Symbol 977 Button
on (release) {
_root.mcStart.page = _root.mcStart.page + 1;
_root.mcStart.mcInstructions.gotoAndStop("p" + _root.mcStart.page);
gotoAndStop ("mid");
}
Symbol 978 Button
on (release) {
_root.mcStart.page = _root.mcStart.page - 1;
if (_root.mcStart.page == 1) {
gotoAndStop ("start");
}
_root.mcStart.mcInstructions.gotoAndStop("p" + _root.mcStart.page);
}
Symbol 979 Button
on (release) {
_root.mcStart.page = _root.mcStart.page + 1;
if (_root.mcStart.page == 13) {
gotoAndStop ("end");
}
_root.mcStart.mcInstructions.gotoAndStop("p" + _root.mcStart.page);
}
Symbol 980 Button
on (release) {
_root.mcStart.page = _root.mcStart.page - 1;
_root.mcStart.mcInstructions.gotoAndStop("p" + _root.mcStart.page);
gotoAndStop ("mid");
}
Symbol 981 MovieClip Frame 1
stop();
if (_root.bInstructions) {
gotoAndStop ("start");
}
Symbol 981 MovieClip Frame 10
_root.mcStart.page = 1;
Symbol 988 MovieClip Frame 1
stop();
mcMainMenu._visible = false;
Symbol 988 MovieClip Frame 2
if (_root.bRetreat) {
mcControlText._visible = false;
}
Symbol 988 MovieClip Frame 36
stop();
Symbol 988 MovieClip Frame 56
stop();
_root.initAfterMap();
this._parent._visible = false;
Symbol 1137 MovieClip Frame 1
function changeColor(_country, _trans) {
var _local8 = _root.mcStart.mcMission.hitTest(_root._xmouse, _root._ymouse, true);
if (_local8) {
return(undefined);
}
if (_country == "Mongolia") {
return(undefined);
}
if (_country == _root.rivalCountry) {
return(undefined);
}
var _local4 = false;
for (var _local6 in _root.aMap) {
if (!_root.aMap[_local6].bConquered) {
continue;
}
var _local2 = _root.getANeighbor(_root.aMap[_local6].country);
for (var _local5 in _local2) {
if (_local2[_local5] == _country) {
_local4 = true;
break;
}
}
}
for (var _local5 in _root.aConquered) {
if (_country == _root.aConquered[_local5]) {
return(undefined);
}
}
if (!_local4) {
return(undefined);
}
var _local7 = new Color(map[_country]);
_local7.setTransform(_trans);
}
_root.setColorConquered();
for (var i in _root.aCountry) {
var country = map[_root.aCountry[i]];
country.useHandCursor = false;
country.onPress = function () {
trace("\u9009\u62E9\u56FD\u5BB6\uFF01");
_root.selRivalCountry(this._name);
_root.disMapNote(this._name);
};
country.onRollOver = function () {
this._parent._parent.changeColor(this._name, _root.brightTrans);
};
country.onRollOut = function () {
this._parent._parent.changeColor(this._name, _root.normalTrans);
};
}
Symbol 1142 Button
on (release) {
if (_root.missionID == null) {
_root.alrm("map", 3);
} else if (!_root.rivalCountry) {
_root.alrm("map", 2);
} else {
mcControl.gotoAndPlay("close");
}
}
Symbol 1143 Button
on (release) {
if (!_root.bFistNoted) {
gotoAndStop ("start");
} else {
gotoAndStop ("mode");
}
mcControl.gotoAndStop("in");
_root.missionID = null;
}
Symbol 1158 MovieClip Frame 1
stop();
_root.disMapNote();
Symbol 1164 MovieClip Frame 1
stop();
Symbol 1166 MovieClip Frame 1
stop();
Symbol 1168 MovieClip Frame 1
stop();
Symbol 1170 MovieClip Frame 1
stop();
Symbol 1172 MovieClip Frame 1
stop();
Symbol 1174 MovieClip Frame 1
stop();
Symbol 1176 MovieClip Frame 1
stop();
Symbol 1178 MovieClip Frame 1
stop();
Symbol 1201 MovieClip Frame 1
stop();
Symbol 1202 MovieClip Frame 1
stop();
Symbol 1202 MovieClip Frame 2
function rest() {
var _local2 = 1;
while (_local2 <= 8) {
this["m" + _local2].gotoAndStop(1);
_local2++;
}
}
function disSel() {
this["m" + (_root.missionID + 1)].gotoAndStop(2);
}
var i = 1;
while (i <= 8) {
this["m" + i].id = i - 1;
this["m" + i].onPress = function () {
rest();
_root.setMission(this.id);
disSel();
this._parent.gotoAndStop(1);
};
this["m" + i].onRollOver = function () {
this._parent.missionNote.gotoAndStop(this.id + 1);
};
i++;
}
disSel();
Symbol 1207 MovieClip Frame 1
stop();
if (!_root.bTeached) {
play();
}
Symbol 1207 MovieClip Frame 160
stop();
Symbol 1216 MovieClip Frame 1
if (_root.bInstructions) {
_root.bFistNoted = true;
this.gotoAndStop("start");
} else if (_root.bLoad) {
this.gotoAndStop("load");
_root.bFistNoted = true;
_root.bFightModeSeted = true;
} else if (_root.bRetreat) {
mcTransDis.gotoAndStop("end");
mcTrans.gotoAndStop("end");
this.gotoAndStop("map");
} else {
this.gotoAndStop("mode");
}
Symbol 1216 MovieClip Frame 13
stop();
Symbol 1216 MovieClip Frame 25
function initMode() {
switch (_root.sHard) {
case "EASY" :
mcEasy.gotoAndStop("on");
currMc = mcEasy;
break;
case "BEGINNER" :
mcBeginner.gotoAndStop("on");
currMc = mcBeginner;
break;
case "MEDIUM" :
mcMedium.gotoAndStop("on");
currMc = mcMedium;
break;
case "HARD" :
mcHard.gotoAndStop("on");
currMc = mcHard;
break;
case "INSANE" :
mcInsane.gotoAndStop("on");
currMc = mcInsane;
}
}
page = 1;
stop();
mcEasy.onPress = function () {
currMc.gotoAndStop("off");
currMc = this;
currMc.gotoAndStop("on");
_root.sHard = "EASY";
_root.initNormalMode();
_root.initGold();
};
mcBeginner.onPress = function () {
currMc.gotoAndStop("off");
currMc = this;
currMc.gotoAndStop("on");
_root.sHard = "BEGINNER";
_root.initNormalMode();
_root.initGold();
};
mcMedium.onPress = function () {
currMc.gotoAndStop("off");
currMc = this;
currMc.gotoAndStop("on");
_root.sHard = "MEDIUM";
_root.initNormalMode();
_root.initGold();
};
mcHard.onPress = function () {
currMc.gotoAndStop("off");
currMc = this;
currMc.gotoAndStop("on");
_root.sHard = "HARD";
_root.initNormalMode();
_root.initGold();
};
mcInsane.onPress = function () {
currMc.gotoAndStop("off");
currMc = this;
currMc.gotoAndStop("on");
_root.sHard = "INSANE";
_root.initNormalMode();
_root.initGold();
};
initMode();
Symbol 1216 MovieClip Frame 41
stop();
mcInstructions.gotoAndStop("p" + page);
Symbol 1216 MovieClip Frame 51
stop();
Symbol 1216 MovieClip Frame 62
function onMouseUp() {
dir = "null";
}
function onEnterFrame() {
if (mcMap._x > maxX) {
mcMap._x = maxX;
dir = null;
}
if (mcMap._x < minX) {
mcMap._x = minX;
dir = null;
}
if (dir == "left") {
mcMap._x = mcMap._x + step;
mcArrow._x = mcArrow._x + step;
} else if (dir == "right") {
mcMap._x = mcMap._x - step;
mcArrow._x = mcArrow._x - step;
}
}
page = 13;
if (_root.missionID == null) {
btMission.enabled = true;
} else {
btMission.enabled = false;
}
stop();
if (_root.bRetreat) {
btBack._visible = false;
btMainMenu._visible = true;
} else {
btBack._visible = true;
btMainMenu._visible = false;
}
mcControl.gotoAndPlay("out");
_root.setMission(_root.missionID);
_root.initMissionMark();
_root.disMissionMark();
step = 10;
minX = -60;
maxX = 300;
dir = null;
btMapLeft.onPress = function () {
if (mcMap._x <= maxX) {
dir = "left";
} else {
dir = null;
}
};
btMapRight.onPress = function () {
if (mcMap._x >= minX) {
dir = "right";
} else {
dir = "null";
}
};
btMission.onPress = function () {
if (mcMission._currentframe == 1) {
mcMission.gotoAndStop(2);
} else {
mcMission.gotoAndStop(1);
}
};
btH.onPress = function () {
var _local1 = minX - mcMap._x;
mcMap._x = minX;
mcArrow._x = mcArrow._x + _local1;
};
btM.onPress = function () {
_root.setMission(_root.missionID);
};