Frame 1
_root.ReleaseText = "release 1.5";
_root.TotalBytes = _root.getBytesTotal();
_root.LoadedBytes = _root.getBytesLoaded();
_root.PercentDone = int((_root.LoadedBytes / _root.TotalBytes) * 100);
Frame 2
if (_root.LoadedBytes == _root.TotalBytes) {
nextFrame();
} else {
gotoAndPlay (1);
}
Frame 3
play();
Frame 6
function INITIALIZE() {
_root.TreasureGold = 10;
_root.SpareGold = 110;
_root.DungeonRank = 0;
_root.TreasureIsPlaced = false;
_root.Text0seen = false;
_root.Text1seen = false;
_root.Text2seen = false;
_root.Text3seen = false;
_root.Text4seen = false;
_root.Text5seen = false;
_root.Text6seen = false;
_root.SETUP_MAP();
_root.GET_GOLD_AND_DUNGEON_RANK();
}
function SETUP_MAP__________VECCHIO() {
_root.Rows = 31;
_root.Columns = 31;
_root.Map = new Array();
i = 0;
while (i < _root.Rows) {
_root.Map[i] = new Array();
j = 0;
while (j < _root.Columns) {
_root.Map[i][j] = 1;
j++;
}
i++;
}
i = 0;
while (i < (_root.Rows * _root.Columns)) {
duplicateMovieClip ("_root.GroundButtonTemplate", "GroundButton" + i, i);
setProperty("GroundButton" + i, _x , ((i % _root.Columns) * _root.CellSize) + _root.CellSize);
setProperty("GroundButton" + i, _y , (int(i / _root.Columns) * _root.CellSize) + _root.CellSize);
_root.TopLevel = i;
i++;
}
removeMovieClip("GroundButton15");
duplicateMovieClip ("_root.ExitTemplate", "Exit", 15);
setProperty("Exit", _x , GroundButton14._x + _root.CellSize);
setProperty("Exit", _y , GroundButton14._y);
_root.Map[0][15] = 2;
removeMovieClip("GroundButton46");
_root.Map[1][15] = 0;
}
function SETUP_MAP() {
_root.Rows = 31;
_root.Columns = 31;
_root.Map = new Array();
i = 0;
while (i < _root.Rows) {
_root.Map[i] = new Array();
j = 0;
while (j < _root.Columns) {
_root.Map[i][j] = 1;
j++;
}
i++;
}
_root.DRAW_MAP();
}
function DRAW_MAP() {
_root.CellSize = 15;
m = 0;
while (m < _root.Rows) {
n = 0;
while (n < _root.Columns) {
i = (m * _root.Columns) + n;
if (_root.Map[m][n] == 1) {
duplicateMovieClip ("_root.GroundButtonTemplate", "GroundButton" + i, i);
setProperty("GroundButton" + i, _x , ((i % _root.Columns) * _root.CellSize) + _root.CellSize);
setProperty("GroundButton" + i, _y , (int(i / _root.Columns) * _root.CellSize) + _root.CellSize);
_root.TopLevel = i;
}
n++;
}
m++;
}
removeMovieClip("GroundButton15");
duplicateMovieClip ("_root.ExitTemplate", "Exit", 15);
setProperty("Exit", _x , GroundButton14._x + _root.CellSize);
setProperty("Exit", _y , GroundButton14._y);
_root.Map[0][15] = 2;
removeMovieClip("GroundButton46");
_root.Map[1][15] = 0;
}
function INITIALIZE_GAME() {
_root.TreasureGold = 10;
_root.SpareGold = 110;
_root.TotalGold = _root.TreasureGold + _root.TotalGold;
}
function GET_GOLD_AND_DUNGEON_RANK() {
_root.TotalGold = _root.TreasureGold + _root.SpareGold;
i = 0;
while (i < 7) {
if (_root.TotalGold >= _root.DungeonRanks[i][1]) {
_root.DungeonRank = _root.DungeonRanks[i][0];
}
i++;
}
}
function SETUP_HERO_MAP() {
_root.Rows = 31;
_root.Columns = 31;
_root.HeroMap = new Array();
i = 0;
while (i < _root.Rows) {
_root.HeroMap[i] = new Array();
j = 0;
while (j < _root.Columns) {
_root.HeroMap[i][j] = 0;
j++;
}
i++;
}
_root.HeroMap[0][15] = 1;
_root.HeroMap[1][15] = 1;
}
function RESET_HERO_MAP() {
_root.Rows = 31;
_root.Columns = 31;
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if ((_root.HeroMap[i][j] == 0) && (_root.Map[i][j] != 2)) {
_root.HeroMap[i][j] = 9999;
} else {
_root.HeroMap[i][j] = 0;
}
j++;
}
i++;
}
}
function REMOVE_TILE() {
if ((_root.Focus == "Dig") && (Number(_root.DungeonInfo.v0) > 4)) {
N_Tile = _root.Map[_root.TempRow - 1][_root.TempColumn];
S_Tile = _root.Map[_root.TempRow + 1][_root.TempColumn];
E_Tile = _root.Map[_root.TempRow][_root.TempColumn + 1];
W_Tile = _root.Map[_root.TempRow][_root.TempColumn - 1];
if (N_tile == undefined) {
N_Tile = 1;
}
if (S_tile == undefined) {
S_Tile = 1;
}
if (E_tile == undefined) {
E_Tile = 1;
}
if (W_tile == undefined) {
W_Tile = 1;
}
if ((((N_Tile != 1) || (S_Tile != 1)) || (E_Tile != 1)) || (W_Tile != 1)) {
_root.Piccone_sfx.gotoAndPlay(2);
removeMovieClip("GroundButton" + ((_root.TempRow * _root.Columns) + _root.TempColumn));
_root.Map[_root.TempRow][_root.TempColumn] = 0;
_root.DungeonInfo.v0 = Number(_root.DungeonInfo.v0) - 2;
_root.Interface.T0.text = _root.DungeonInfo.v0;
_root.DungeonInfo.v3 = Number(_root.DungeonInfo.v3) + 1;
_root.Interface.T3.text = _root.DungeonInfo.v3;
_root.DungeonInfo.v4 = Math.round((Number(_root.DungeonInfo.v3) / (_root.Rows * _root.Columns)) * 1000) / 10;
_root.Interface.T4.text = _root.DungeonInfo.v4 + " %";
_root.CHECK_DIG_EVENT();
}
}
}
function SHOW_CUTSCENE(label) {
_root.TempFocus = _root.Focus;
_root.Focus = "Cutscene";
duplicateMovieClip ("_root.CutsceneTemplate", "Cutscene", 10010);
setProperty("_root.Cutscene", _x , 320);
setProperty("_root.Cutscene", _y , 240);
_root.Cutscene.gotoAndStop(label);
}
function CHECK_DUNGEON_LEVEL_UP() {
_root.TempNewRank = Number(_root.DungeonInfo.v1) + 1;
if (Number(_root.DungeonInfo.v0) >= Number(_root.DungeonRanks[_root.TempNewRank][1])) {
_root.DungeonInfo.v1 = Number(_root.DungeonInfo.v1) + 1;
_root.DungeonInfo.v2 = _root.DungeonRanks[_root.TempNewRank][2];
_root.SHOW_CUTSCENE("DungeonLevelUp");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
_root.Cutscene.removeMovieClip();
}
}
function CHECK_DIG_EVENT() {
_root.TempRoll = Math.floor(Math.random() * 100);
if (_root.TempRoll < 3) {
_root.Focus = "DigEvent";
_root.TempGoldAmount = Math.round(_root.GoldForDigEvents[_root.DungeonRank] * (0.6 + (Math.random() * 0.4)));
_root.DungeonInfo.v0 = Number(_root.DungeonInfo.v0) + Number(_root.TempGoldAmount);
_root.Interface.T0.text = _root.DungeonInfo.v0;
removeMovieClip("_root.Piccone");
_root.SHOW_CUTSCENE("GoldFound");
} else if ((_root.TempRoll < 5) && (_root.DungeonInfo.v0 > 1)) {
_root.Focus = "DigEvent";
_root.TempGoldAmount = Math.round(_root.GoldForDigEvents[_root.DungeonRank] * (0.8 + (Math.random() * 0.4)));
if (_root.TempGoldAmount >= _root.DungeonInfo.v0) {
_root.TempGoldAmount = _root.DungeonInfo.v0 - 1;
}
_root.DungeonInfo.v0 = _root.DungeonInfo.v0 - _root.TempGoldAmount;
_root.Interface.T0.text = _root.DungeonInfo.v0;
removeMovieClip("_root.Piccone");
_root.SHOW_CUTSCENE("CaveIn");
}
}
_root.Beginning = true;
Frame 7
function SHOW_SHOP(label) {
_root.Focus = "Shop";
duplicateMovieClip ("_root.ShopTemplate", "Shop", 10005);
setProperty("_root.Shop", _x , 320);
setProperty("_root.Shop", _y , 240);
_root.Shop.gotoAndStop(label);
}
function SHOW_MONSTER_DETAIL(id) {
_root.Focus = "MonsterDetail";
_root.Shop.ShopDetail.gotoAndStop("MonsterDetail");
_root.Shop.ShopDetail.Portrait.gotoAndStop(id + 1);
setProperty("_root.Shop.ShopDetail", _y , "0");
i = 0;
while (i < 17) {
Set(("_root.Shop.ShopDetail.TM" + i) + ".text", eval ((("_root.Monsters.ID" + id) + ".v") + i));
i++;
}
i = 5;
while (i < 9) {
Set(("_root.Shop.ShopDetail.TM" + i) + ".text", eval (("_root.Shop.ShopDetail.TM" + i) + ".text") + "%");
i++;
}
}
function SHOW_TRAP_DETAIL(id) {
_root.Focus = "TrapDetail";
_root.Shop.ShopDetail.gotoAndStop("TrapDetail");
_root.Shop.ShopDetail.Portrait.gotoAndStop(id + 1);
setProperty("_root.Shop.ShopDetail", _y , "0");
i = 0;
while (i < 6) {
Set(("_root.Shop.ShopDetail.TT" + i) + ".text", eval ((("_root.Traps.ID" + id) + ".v") + i));
i++;
}
_root.Shop.ShopDetail.TTL.text = 1;
_root.TempTT5 = eval (("_root.Traps.ID" + id) + ".v5");
_root.Shop.ShopDetail.TT6.text = Math.pow(_root.TempTT5, 2);
_root.TempTrapClass = eval (("_root.Traps.ID" + id) + ".v3");
_root.UPDATE_TRAP_FORBID("Buy", id, _root.TempTrapClass);
}
function CHECK_AVAILABLE_CELLS() {
_root.AvailableCells = 0;
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if (_root.Map[i][j] == 0) {
_root.AvailableCells = _root.AvailableCells + 1;
}
j++;
}
i++;
}
}
function BUY_MONSTER() {
_root.TempMonsterID = Number(_root.Shop.ShopDetail.TM0.text);
_root.DungeonInfo.v0 = _root.DungeonInfo.v0 - Number(_root.Shop.ShopDetail.TM16.text);
_root.Interface.T0.text = _root.DungeonInfo.v0;
setProperty("_root.Shop.ShopDetail", _y , "1050");
if (_root.Text5seen == false) {
_root.SHOW_CUTSCENE("BuyMonster");
} else {
_root.Interface.gotoAndStop("Beastmaster");
_root.SHOW_NEW_MONSTER();
}
}
function BUY_TRAP() {
_root.TempTrapID = Number(_root.Shop.ShopDetail.TT0.text);
_root.TempTrapLevel = Number(_root.Shop.ShopDetail.TTL.text);
_root.DungeonInfo.v0 = _root.DungeonInfo.v0 - Number(_root.Shop.ShopDetail.TT6.text);
_root.Interface.T0.text = _root.DungeonInfo.v0;
setProperty("_root.Shop.ShopDetail", _y , "1050");
if (_root.Text6seen == false) {
_root.SHOW_CUTSCENE("BuyTrap");
} else {
_root.Interface.gotoAndStop("TrapMaster");
_root.SHOW_NEW_TRAP();
}
}
function SHOW_UPGRADE_TRAP() {
_root.TempTrapRow = int((_ymouse - 10) / _root.CellSize);
_root.TempTrapColumn = int((_xmouse - 10) / _root.CellSize);
_root.TrapFound = false;
_root.TrapCounter = 0;
while ((_root.TrapFound == false) && (_root.TrapCounter < 999)) {
if ((_root.PlacedTraps[_root.TrapCounter][91] == _root.TempTrapRow) && (_root.PlacedTraps[_root.TrapCounter][92] == _root.TempTrapColumn)) {
_root.TrapFound = true;
_root.TrapID = _root.TrapCounter;
} else {
_root.TrapCounter = _root.TrapCounter + 1;
}
}
if (_root.TrapCounter < 999) {
duplicateMovieClip ("_root.TrapUpgradeTemplate", "TrapUpgrade", 10006);
setProperty("_root.TrapUpgrade", _x , "320");
setProperty("_root.TrapUpgrade", _y , "240");
_root.Focus = "UpgradingTrap";
_root.TrapUpgrade.Portrait.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
_root.TrapUpgrade.TT0.text = _root.PlacedTraps[_root.TrapID][0];
_root.TrapUpgrade.TT1.text = _root.PlacedTraps[_root.TrapID][1];
_root.TrapUpgrade.TT2.text = _root.PlacedTraps[_root.TrapID][2];
_root.TrapUpgrade.TT4.text = _root.PlacedTraps[_root.TrapID][4];
_root.TempTT5 = _root.PlacedTraps[_root.TrapID][5];
_root.TrapUpgrade.TT6.text = _root.PlacedTraps[_root.TrapID][6];
_root.TrapUpgrade.TT7.text = (Math.pow(_root.TempTT5, 2) * _root.PlacedTraps[_root.TrapID][6]) - _root.PlacedTraps[_root.TrapID][7];
_root.TrapUpgrade.TG.text = _root.DungeonInfo.v0;
_root.UPDATE_TRAP_FORBID("Upgrade", _root.TrapID, _root.PlacedTraps[_root.TrapID][3]);
}
}
function UPGRADE_TRAP() {
_root.DungeonInfo.v0 = _root.DungeonInfo.v0 - Number(_root.TrapUpgrade.TT7.text);
_root.Interface.T0.text = _root.DungeonInfo.v0;
_root.PlacedTraps[_root.TrapID][6] = Number(_root.TrapUpgrade.TT6.text);
_root.PlacedTraps[_root.TrapID][7] = _root.PlacedTraps[_root.TrapID][7] + Number(_root.TrapUpgrade.TT7.text);
_root.PlacedTraps[_root.TrapID][8] = _root.PlacedTraps[_root.TrapID][6] * _root.PlacedTraps[_root.TrapID][4];
_root.Focus = "TrapUpgraded";
removeMovieClip("_root.TrapUpgrade");
_root.SHOW_CUTSCENE("TrapUpgraded");
}
function UPDATE_TRAP_FORBID(why, id, kind) {
if (why == "Buy") {
_root.Shop.ShopDetail.ForbidDown.gotoAndStop("Off");
_root.Shop.ShopDetail.ForbidUp.gotoAndStop("Off");
if (_root.Shop.ShopDetail.TTL.text == 1) {
_root.Shop.ShopDetail.ForbidDown.gotoAndStop("On");
} else if (_root.Shop.ShopDetail.TTL.text >= _root.MaxTrapsLevel[kind][_root.DungeonRank]) {
_root.Shop.ShopDetail.ForbidUp.gotoAndStop("On");
}
} else if (why == "Upgrade") {
_root.TrapUpgrade.ForbidDown.gotoAndStop("Off");
_root.TrapUpgrade.ForbidUp.gotoAndStop("Off");
if (_root.TrapUpgrade.TT6.text <= _root.PlacedTraps[id][6]) {
_root.TrapUpgrade.ForbidDown.gotoAndStop("On");
}
if (_root.TrapUpgrade.TT6.text >= _root.MaxTrapsLevel[kind][_root.DungeonRank]) {
_root.TrapUpgrade.ForbidUp.gotoAndStop("On");
}
}
}
Frame 8
function SHOW_NEW_MONSTER() {
_root.Shop.removeMovieClip();
_root.Cutscene.removeMovieClip();
_root.CREATE_NEW_MONSTER(_root.TempMonsterID);
Set(("_root.Monster" + _root.TotalPlacedMonsters) + ".MonsterID", _root.TotalPlacedMonsters);
duplicateMovieClip ("_root.MonsterTemplate", "Monster" + _root.TotalPlacedMonsters, 2000 + _root.TotalPlacedMonsters);
startDrag ("_root.Monster" + _root.TotalPlacedMonsters, true);
_root.Focus = "MonsterPlacing";
}
function CREATE_NEW_MONSTER(id) {
_root.TotalPlacedMonsters = _root.TotalPlacedMonsters + 1;
_root.DungeonInfo.v10 = _root.TotalPlacedMonsters;
_root.DungeonInfo.v11 = _root.DungeonInfo.v11 + 1;
_root.CurrentPlacedMonsters = _root.CurrentPlacedMonsters + 1;
_root.PlacedMonsters[_root.TotalPlacedMonsters] = new Array();
i = 0;
while (i < 17) {
_root.PlacedMonsters[_root.TotalPlacedMonsters][i] = eval ((("_root.Monsters.ID" + id) + ".v") + i);
i++;
}
_root.PlacedMonsters[_root.TotalPlacedMonsters][17] = _root.PlacedMonsters[_root.TotalPlacedMonsters][4];
_root.PlacedMonsters[_root.TotalPlacedMonsters][90] = _root.TotalPlacedMonsters;
_root.PlacedMonsters[_root.TotalPlacedMonsters][91] = -1;
_root.PlacedMonsters[_root.TotalPlacedMonsters][91] = -1;
}
function PLACE_NEW_MONSTER() {
_root.TempMonsterRow = int((_ymouse - 10) / _root.CellSize);
_root.TempMonsterColumn = int((_xmouse - 10) / _root.CellSize);
_root.TempCellContent = _root.Map[_root.TempMonsterRow][_root.TempMonsterColumn];
if ((((_root.TempMonsterRow <= _root.Rows) && (_root.TempMonsterColumn <= _root.Columns)) && (_root.TempCellContent == 0)) && ((_root.TempMonsterRow != 1) || (_root.TempMonsterColumn != 15))) {
stopDrag();
setProperty("_root.Monster" + _root.TotalPlacedMonsters, _x , _root.CellSize * (_root.TempMonsterColumn + 1));
setProperty("_root.Monster" + _root.TotalPlacedMonsters, _y , _root.CellSize * (_root.TempMonsterRow + 1));
_root.PlacedMonsters[_root.TotalPlacedMonsters][91] = _root.TempMonsterRow;
_root.PlacedMonsters[_root.TotalPlacedMonsters][92] = _root.TempMonsterColumn;
_root.PlacedMonsters[_root.TotalPlacedMonsters][95] = _root.TempMonsterRow;
_root.PlacedMonsters[_root.TotalPlacedMonsters][96] = _root.TempMonsterColumn;
_root.Map[_root.TempMonsterRow][_root.TempMonsterColumn] = 5;
_root.Focus = "Beastmaster";
_root.SHOW_SHOP("BeastShop");
}
}
function REMOVE_NEW_MONSTER() {
removeMovieClip("_root.Monster" + _root.TotalPlacedMonsters);
_root.TempMonsterRow = undefined;
_root.TempMonsterColumn = undefined;
_root.PlacedMonsters[_root.TotalPlacedMonsters] = new Array();
_root.Focus = "Beastmaster";
}
function SHOW_MONSTER_INFO() {
_root.TempMonsterRow = int((_ymouse - 10) / _root.CellSize);
_root.TempMonsterColumn = int((_xmouse - 10) / _root.CellSize);
_root.MonsterFound = false;
_root.MonsterCounter = 0;
while ((_root.MonsterFound == false) && (_root.MonsterCounter < 9999)) {
if ((_root.PlacedMonsters[_root.MonsterCounter][91] == _root.TempMonsterRow) && (_root.PlacedMonsters[_root.MonsterCounter][92] == _root.TempMonsterColumn)) {
_root.MonsterFound = true;
} else {
_root.MonsterCounter = _root.MonsterCounter + 1;
}
}
if (_root.MonsterCounter < 9999) {
duplicateMovieClip ("_root.ItemInfoTemplate", "ItemInfo", 10010);
_root.ItemInfo.gotoAndStop("MonsterInfo");
_root.ItemInfo.Portrait.gotoAndStop(_root.PlacedMonsters[_root.MonsterCounter][0] + 1);
_root.ItemInfo.T1.text = _root.PlacedMonsters[_root.MonsterCounter][1];
_root.ItemInfo.LifeBar.gotoAndStop(Math.ceil((_root.PlacedMonsters[_root.MonsterCounter][17] / _root.PlacedMonsters[_root.MonsterCounter][4]) * 100));
setProperty("_root.ItemInfo", _y , 420);
setProperty("_root.ItemInfo", _x , 240);
}
}
function SHOW_NEW_TRAP() {
_root.Shop.removeMovieClip();
_root.Cutscene.removeMovieClip();
_root.CREATE_NEW_TRAP(_root.TempTrapID, _root.TempTrapLevel);
duplicateMovieClip ("_root.TrapTemplate", "Trap" + _root.TotalPlacedTraps, 1000 + _root.TotalPlacedTraps);
startDrag (eval ("_root.Trap" + _root.TotalPlacedTraps), true);
_root.Focus = "TrapPlacing";
}
function CREATE_NEW_TRAP(id, lv) {
_root.TotalPlacedTraps = _root.TotalPlacedTraps + 1;
_root.CurrentPlacedTraps = _root.CurrentPlacedTraps + 1;
_root.PlacedTraps[_root.TotalPlacedTraps] = new Array();
i = 0;
while (i < 6) {
_root.PlacedTraps[_root.TotalPlacedTraps][i] = eval ((("_root.Traps.ID" + id) + ".v") + i);
i++;
}
_root.PlacedTraps[_root.TotalPlacedTraps][6] = lv;
_root.PlacedTraps[_root.TotalPlacedTraps][7] = (_root.PlacedTraps[_root.TotalPlacedTraps][5] * _root.PlacedTraps[_root.TotalPlacedTraps][5]) * lv;
_root.PlacedTraps[_root.TotalPlacedTraps][8] = _root.PlacedTraps[_root.TotalPlacedTraps][4] * lv;
_root.PlacedTraps[_root.TotalPlacedTraps][9] = "Ready";
_root.PlacedTraps[_root.TotalPlacedTraps][90] = _root.TotalPlacedTraps;
_root.PlacedTraps[_root.TotalPlacedTraps][91] = -1;
_root.PlacedTraps[_root.TotalPlacedTraps][91] = -1;
}
function PLACE_NEW_TRAP() {
_root.TempTrapRow = int((_ymouse - 10) / _root.CellSize);
_root.TempTrapColumn = int((_xmouse - 10) / _root.CellSize);
_root.TempCellContent = _root.Map[_root.TempTrapRow][_root.TempTrapColumn];
if ((((_root.TempTrapRow <= _root.Rows) && (_root.TempTrapColumn <= _root.Columns)) && (_root.TempCellContent == 0)) && ((_root.TempTrapRow != 1) || (_root.TempTrapColumn != 15))) {
stopDrag();
setProperty("_root.Trap" + _root.TotalPlacedTraps, _x , _root.CellSize * (_root.TempTrapColumn + 1));
setProperty("_root.Trap" + _root.TotalPlacedTraps, _y , _root.CellSize * (_root.TempTrapRow + 1));
_root.PlacedTraps[_root.TotalPlacedTraps][91] = _root.TempTrapRow;
_root.PlacedTraps[_root.TotalPlacedTraps][92] = _root.TempTrapColumn;
_root.Map[_root.TempTrapRow][_root.TempTrapColumn] = 4;
_root.Focus = "Trapmaster";
_root.SHOW_SHOP("TrapShop");
}
}
function REMOVE_NEW_TRAP() {
removeMovieClip("_root.Trap" + _root.TotalPlacedTraps);
_root.TempTrapRow = undefined;
_root.TempTrapColumn = undefined;
trace(_root.PlacedTraps[_root.TotalPlacedTraps]);
_root.PlacedTraps[_root.TotalPlacedTraps] = new Array();
trace(_root.PlacedTraps[_root.TotalPlacedTraps]);
_root.Focus = "Trapmaster";
}
function SHOW_TRAP_INFO() {
_root.TempTrapRow = int((_ymouse - 10) / _root.CellSize);
_root.TempTrapColumn = int((_xmouse - 10) / _root.CellSize);
_root.TrapFound = false;
_root.TrapCounter = 0;
while ((_root.TrapFound == false) && (_root.TrapCounter < 999)) {
if ((_root.PlacedTraps[_root.TrapCounter][91] == _root.TempTrapRow) && (_root.PlacedTraps[_root.TrapCounter][92] == _root.TempTrapColumn)) {
_root.TrapFound = true;
} else {
_root.TrapCounter = _root.TrapCounter + 1;
}
}
if (_root.TrapCounter < 999) {
duplicateMovieClip ("_root.ItemInfoTemplate", "ItemInfo", 10010);
_root.ItemInfo.gotoAndStop("TrapInfo");
_root.ItemInfo.Portrait.gotoAndStop(_root.PlacedTraps[_root.TrapCounter][0] + 1);
_root.ItemInfo.T1.text = _root.PlacedTraps[_root.TrapCounter][1];
_root.ItemInfo.T6.text = _root.PlacedTraps[_root.TrapCounter][6];
setProperty("_root.ItemInfo", _y , 420);
setProperty("_root.ItemInfo", _x , 240);
}
}
Frame 9
function ROLL_HERO() {
_root.DungeonRank = _root.DungeonInfo.v1;
if (_root.DungeonRank == 0) {
_root.HeroClass = 0;
} else if (_root.DungeonRank < 4) {
_root.HeroClass = Math.floor(Math.random() * 7);
} else if (_root.DungeonRank < 6) {
_root.HeroClass = Math.floor(Math.random() * 6) + 1;
} else if (_root.DungeonRank == 6) {
_root.HeroClass = 7;
}
_root.HeroClassName = _root.Heroes[_root.HeroClass][1];
if (_root.DungeonRank < 6) {
_root.HeroLevel = Math.ceil(_root.DungeonInfo.v6 / _root.Heroes[_root.HeroClass][3]);
if ((_root.DungeonRank == 2) && (_root.HeroLevel < 5)) {
_root.HeroLevel = 3;
} else if ((_root.DungeonRank == 3) && (_root.HeroLevel < 10)) {
_root.HeroLevel = 8;
} else if ((_root.DungeonRank == 4) && (_root.HeroLevel < 15)) {
_root.HeroLevel = 15;
} else if ((_root.DungeonRank == 5) && (_root.HeroLevel < 20)) {
_root.HeroLevel = 20;
}
} else {
_root.HeroLevel = 50;
}
_root.Hero = new Array();
i = 0;
while (i < 19) {
_root.Hero[i] = _root.Heroes[_root.HeroClass][i];
i++;
}
_root.Hero[0] = _root.HeroLevel;
_root.Hero[1] = _root.HeroClass;
_root.Hero[2] = _root.HeroLevel * _root.Heroes[_root.HeroClass][2];
_root.Hero[3] = _root.HeroLevel * _root.Heroes[_root.HeroClass][3];
_root.TempGoldCoeff = (Math.random() * 3) / 10;
_root.Hero[3] = Math.round(_root.Hero[3] * (0.8 + _root.TempGoldCoeff));
_root.Hero[10] = _root.HeroLevel * _root.Heroes[_root.HeroClass][10];
_root.Hero[12] = _root.HeroLevel * _root.Heroes[_root.HeroClass][12];
_root.Hero[14] = _root.HeroLevel * _root.Heroes[_root.HeroClass][14];
_root.Hero[19] = 1;
_root.Hero[20] = 15;
_root.Hero[21] = 1;
_root.Hero[22] = 15;
_root.Hero[23] = undefined;
_root.Hero[24] = undefined;
_root.Hero[25] = "Treasure";
_root.Hero[26] = _root.Hero[2];
_root.Hero[27] = _root.HeroClassName;
}
function SHOW_HERO() {
duplicateMovieClip ("_root.HeroTemplate", "HeroPointer", 10000);
setProperty("_root.HeroPointer", _x , _root.CellSize * (_root.Hero[20] + 1));
setProperty("_root.HeroPointer", _y , _root.CellSize * (_root.Hero[19] + 1));
_root.HeroPointer.BlackScreen.gotoAndStop("On");
}
function HERO_AI() {
_root.TurnTimer.gotoAndStop("StopTimer");
_root.HeroAI.gotoAndPlay(2);
}
function HERO_AI_______________VECCHIO() {
_root.CHECK_EXIT();
if (_root.StepOnTheExit == true) {
_root.END_OF_RAID("Hero");
} else {
_root.CHECK_TRAP();
if (_root.StepOnATrap == true) {
_root.TRAP_MANAGEMENT();
} else {
_root.CHECK_TREASURE_CONTACT();
if ((((_root.TreasureN == true) || (_root.TreasureS == true)) || (_root.TreasureW == true)) || (_root.TreasureE == true)) {
_root.GET_TREASURE();
} else {
_root.CHECK_MONSTERS_CONTACT();
if ((((_root.Monster_N == true) || (_root.Monster_S == true)) || (_root.Monster_E == true)) || (_root.Monster_W == true)) {
_root.ATTACK_MONSTER();
} else {
_root.MOVE_HERO();
}
}
}
}
}
function CHECK_EXIT() {
if ((_root.Hero[25] == "Exit") && (_root.Map[_root.Hero[21]][_root.Hero[22]] == 2)) {
_root.StepOnTheExit = true;
} else if (((_root.Hero[25] != "Treasure") && (_root.Hero[21] == 1)) && (_root.Hero[22] == 15)) {
_root.StepOnTheExit = true;
} else {
_root.StepOnTheExit = false;
}
}
function CHECK_TRAP() {
if (_root.Map[_root.Hero[21]][_root.Hero[22]] == 4) {
_root.StepOnATrap = true;
} else {
_root.StepOnATrap = false;
}
}
function CHECK_TREASURE_CONTACT() {
_root.TreasureN = false;
_root.TreasureS = false;
_root.TreasureW = false;
_root.TreasureE = false;
if ((_root.Hero[25] == "Treasure") && (_root.Map[_root.Hero[21] - 1][_root.Hero[22]] == 3)) {
_root.TreasureN = true;
}
if ((_root.Hero[25] == "Treasure") && (_root.Map[_root.Hero[21] + 1][_root.Hero[22]] == 3)) {
_root.TreasureS = true;
}
if ((_root.Hero[25] == "Treasure") && (_root.Map[_root.Hero[21]][_root.Hero[22] - 1] == 3)) {
_root.TreasureW = true;
}
if ((_root.Hero[25] == "Treasure") && (_root.Map[_root.Hero[21]][_root.Hero[22] + 1] == 3)) {
_root.TreasureE = true;
}
}
function CHECK_MONSTERS_CONTACT() {
_root.Monster_N = false;
_root.Monster_S = false;
_root.Monster_W = false;
_root.Monster_E = false;
if (_root.Map[_root.Hero[21] - 1][_root.Hero[22]] == 5) {
_root.Monster_N = true;
}
if (_root.Map[_root.Hero[21] + 1][_root.Hero[22]] == 5) {
_root.Monster_S = true;
}
if (_root.Map[_root.Hero[21]][_root.Hero[22] - 1] == 5) {
_root.Monster_W = true;
}
if (_root.Map[_root.Hero[21]][_root.Hero[22] + 1] == 5) {
_root.Monster_E = true;
}
}
function ATTACK_MONSTER() {
_root.FIND_TARGET_MONSTER();
if (_root.Hero[0] < _root.PlacedMonsters[_root.TargetMonsterID][3]) {
_root.ChanceOfFailure = 5 + (3 * (_root.PlacedMonsters[_root.TargetMonsterID][3] - _root.Hero[0]));
} else {
_root.ChanceOfFailure = 5;
}
_root.HitRoll = Math.ceil(Math.random() * 100);
if (_root.HitRoll <= _root.ChanceOfFailure) {
_root.HeroAttackOutcome = "Miss";
} else {
_root.HeroAttackOutcome = "Hit";
_root.AttackIdRoll = Math.ceil(Math.random() * 100);
if (_root.AttackIdRoll <= 65) {
_root.AttackType = _root.Hero[9];
_root.AttackDamage = _root.Hero[10];
} else if (_root.AttackIdRoll <= 90) {
_root.AttackType = _root.Hero[11];
_root.AttackDamage = _root.Hero[12];
} else {
_root.AttackType = _root.Hero[13];
_root.AttackDamage = _root.Hero[14];
}
}
_root.GET_HERO_ACTUAL_DAMAGE();
_root.MonsterFrame = Number(_root.PlacedMonsters[_root.TargetMonsterID][0]) + 1;
_root.SHOW_HERO_ATTACK_EVENT();
}
function FIND_TARGET_MONSTER() {
if (_root.Monster_N == true) {
_root.TargetMonsterRow = _root.Hero[21] - 1;
_root.TargetMonsterColumn = _root.Hero[22];
_root.TargetMonsterDirection = "N";
} else if (_root.Monster_S == true) {
_root.TargetMonsterRow = _root.Hero[21] + 1;
_root.TargetMonsterColumn = _root.Hero[22];
_root.TargetMonsterDirection = "S";
} else if (_root.Monster_W == true) {
_root.TargetMonsterRow = _root.Hero[21];
_root.TargetMonsterColumn = _root.Hero[22] - 1;
_root.TargetMonsterDirection = "W";
} else if (_root.Monster_E == true) {
_root.TargetMonsterRow = _root.Hero[21];
_root.TargetMonsterColumn = _root.Hero[22] + 1;
_root.TargetMonsterDirection = "E";
}
_root.TargetMonsterID = undefined;
_root.TempTargetCounter = 1;
while ((_root.TargetMonsterID == undefined) && (_root.TempTargetCounter <= _root.TotalPlacedMonsters)) {
if ((_root.PlacedMonsters[_root.TempTargetCounter][91] == _root.TargetMonsterRow) && (_root.PlacedMonsters[_root.TempTargetCounter][92] == _root.TargetMonsterColumn)) {
_root.TargetMonsterID = _root.TempTargetCounter;
} else {
_root.TempTargetCounter = _root.TempTargetCounter + 1;
}
}
if (_root.TargetMonsterID == undefined) {
trace("ERROR! _root.TargetMonsterID = undefined (!!!)");
}
}
function GET_HERO_ACTUAL_DAMAGE() {
if (_root.AttackType == "Physical") {
_root.ResistanceCoeff = _root.PlacedMonsters[_root.TargetMonsterID][5] / 100;
} else if (_root.AttackType == "Fire") {
_root.ResistanceCoeff = _root.PlacedMonsters[_root.TargetMonsterID][6] / 100;
} else if (_root.AttackType == "Magic") {
_root.ResistanceCoeff = _root.PlacedMonsters[_root.TargetMonsterID][7] / 100;
} else if (_root.AttackType == "Mystic") {
_root.ResistanceCoeff = _root.PlacedMonsters[_root.TargetMonsterID][8] / 100;
}
_root.ActualDamage = Math.round(_root.AttackDamage * (1 - _root.ResistanceCoeff));
_root.MonsterFamily = _root.PlacedMonsters[_root.TargetMonsterID][2];
if (_root.MonsterFamily == "Humanoid") {
_root.HeroPower = _root.Hero[15];
} else if (_root.MonsterFamily == "Undead") {
_root.HeroPower = _root.Hero[16];
} else if (_root.MonsterFamily == "Beast") {
_root.HeroPower = _root.Hero[17];
} else if (_root.MonsterFamily == "Arcane") {
_root.HeroPower = _root.Hero[18];
}
if (_root.HeroPower == "Strong") {
_root.ActualDamage = Math.round(_root.ActualDamage * 1.3);
} else if (_root.HeroPower == "Weak") {
_root.ActualDamage = Math.round(_root.ActualDamage * 0.7);
} else if (((_root.HeroPower != "Strong") && (_root.HeroPower != "Weak")) && (_root.HeroPower != "Normal")) {
trace("ERROR! _root.HeroPower is not 'Strong' nor 'Weak' nor 'Normal' (!!!)");
}
}
function SHOW_HERO_ATTACK_EVENT() {
_root.Focus = "HeroAttackEvent";
_root.TempMonsterID = _root.TargetMonsterID;
duplicateMovieClip ("_root.RaidEventTemplate", "RaidEvent", 10010);
setProperty("_root.RaidEvent", _x , "320");
setProperty("_root.RaidEvent", _y , "240");
if (_root.TargetMonsterDirection == "N") {
_root.RaidEvent.gotoAndPlay("HeroAttacksN");
} else if (_root.TargetMonsterDirection == "S") {
_root.RaidEvent.gotoAndPlay("HeroAttacksS");
} else if (_root.TargetMonsterDirection == "W") {
_root.RaidEvent.gotoAndPlay("HeroAttacksW");
} else if (_root.TargetMonsterDirection == "E") {
_root.RaidEvent.gotoAndPlay("HeroAttacksE");
}
}
Frame 10
function RESET_TRAPS() {
i = 0;
while (i <= _root.TotalPlacedTraps) {
if (_root.PlacedTraps[i][9] != "Broken") {
_root.PlacedTraps[i][9] = "Ready";
setProperty("_root.Trap" + i, _alpha , 100);
_root.TempRow = _root.PlacedTraps[i][91];
_root.TempColumn = _root.PlacedTraps[i][92];
_root.Map[_root.TempRow][_root.TempColumn] = 4;
}
i++;
}
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if (_root.Map[i][j] == 7) {
_root.Map[i][j] = 4;
}
j++;
}
i++;
}
}
function TRAP_MANAGEMENT() {
_root.TurnTimer.gotoAndStop(1);
_root.FIND_TRAP();
if (_root.PlacedTraps[_root.TrapID][9] == "Ready") {
_root.ROLL_TRAP_OUTCOME();
_root.SHOW_TRAP_EVENT();
}
}
function FIND_TRAP() {
_root.TempTrapRow = _root.Hero[21];
_root.TempTrapColumn = _root.Hero[22];
_root.TrapFound = false;
_root.TrapCounter = 0;
while ((_root.TrapFound == false) && (_root.TrapCounter < 999)) {
if ((_root.PlacedTraps[_root.TrapCounter][91] == _root.TempTrapRow) && (_root.PlacedTraps[_root.TrapCounter][92] == _root.TempTrapColumn)) {
_root.TrapFound = true;
} else {
_root.TrapCounter = _root.TrapCounter + 1;
}
}
_root.TrapID = _root.TrapCounter;
}
function ROLL_TRAP_OUTCOME() {
_root.TempRoll = Math.floor(Math.random() * 100);
_root.TempTreshold = Number(_root.Hero[4]) - ((Number(_root.PlacedTraps[_root.TrapID][6]) - 1) * 2);
if (_root.TempTreshold < 1) {
_root.TempTreshold = 1;
}
if (_root.TempRoll < _root.TempTreshold) {
_root.PlacedTraps[_root.TrapID][9] = "Disarmed";
} else {
_root.PlacedTraps[_root.TrapID][9] = "Sprung";
_root.GET_TRAP_ACTUAL_DAMAGE();
}
}
function SHOW_TRAP_EVENT() {
_root.Focus = "TrapEvent";
duplicateMovieClip ("_root.RaidEventTemplate", "RaidEvent", 10010);
setProperty("_root.RaidEvent", _x , "320");
setProperty("_root.RaidEvent", _y , "240");
if (_root.Hero[19] < _root.Hero[21]) {
_root.RaidEvent.gotoAndPlay("StepOnTrapFromN");
} else if (_root.Hero[19] > _root.Hero[21]) {
_root.RaidEvent.gotoAndPlay("StepOnTrapFromS");
} else if (_root.Hero[20] < _root.Hero[22]) {
_root.RaidEvent.gotoAndPlay("StepOnTrapFromW");
} else if (_root.Hero[20] > _root.Hero[22]) {
_root.RaidEvent.gotoAndPlay("StepOnTrapFromE");
}
}
function GET_TRAP_ACTUAL_DAMAGE() {
if (_root.PlacedTraps[_root.TrapID][2] == "Physical") {
_root.ActualDamage = Math.round(_root.PlacedTraps[_root.TrapID][8] * (1 - (_root.Hero[5] / 100)));
} else if (_root.PlacedTraps[_root.TrapID][2] == "Fire") {
_root.ActualDamage = Math.round(_root.PlacedTraps[_root.TrapID][8] * (1 - (_root.Hero[6] / 100)));
} else if (_root.PlacedTraps[_root.TrapID][2] == "Magic") {
_root.ActualDamage = Math.round(_root.PlacedTraps[_root.TrapID][8] * (1 - (_root.Hero[7] / 100)));
} else if (_root.PlacedTraps[_root.TrapID][2] == "Holy") {
_root.ActualDamage = Math.round(_root.PlacedTraps[_root.TrapID][8] * (1 - (_root.Hero[8] / 100)));
}
}
function BREAK_TRAP(id) {
_root.Map[_root.PlacedTraps[id][91]][_root.PlacedTraps[id][92]] = 0;
_root.PlacedTraps[id][91] = -10000;
_root.PlacedTraps[id][92] = -10000;
_root.PlacedTraps[id][9] = "Broken";
removeMovieClip("_root.Trap" + id);
}
Frame 11
function MONSTER_AI(mID) {
if (_root.FocusListenerIsOn == true) {
_root.Focus = "Info";
_root.FocusListenerIsOn = false;
} else {
_root.Focus = "MonsterAI";
if (_root.PlacedMonsters[_root.TempMonsterCounter][17] > 1) {
_root.CHECK_HERO_POSITION(mID);
if ((((_root.TempHeroPosition == "N") || (_root.TempHeroPosition == "S")) || (_root.TempHeroPosition == "W")) || (_root.TempHeroPosition == "E")) {
_root.ATTACK_HERO(mID);
} else if (_root.PlacedMonsters[mID][15] > 0) {
_root.MOVE_MONSTER(mID);
} else {
_root.NEXT_MONSTER_AI(mID);
}
} else {
_root.NEXT_MONSTER_AI(mID);
}
}
}
function NEXT_MONSTER_AI(mID1) {
_root.TempMonsterCounter = mID1 + 1;
if (_root.TempMonsterCounter <= _root.DungeonInfo.v10) {
_root.MONSTER_AI(_root.TempMonsterCounter);
} else {
_root.Focus = "Raid";
_root.LoopCounter = 0;
_root.TurnTimer.gotoAndPlay(2);
}
}
function CHECK_HERO_POSITION(mID2) {
if ((_root.Hero[21] == _root.PlacedMonsters[mID2][91]) && (_root.Hero[22] == (_root.PlacedMonsters[mID2][92] + 1))) {
_root.TempHeroPosition = "E";
} else if ((_root.Hero[21] == _root.PlacedMonsters[mID2][91]) && (_root.Hero[22] == (_root.PlacedMonsters[mID2][92] - 1))) {
_root.TempHeroPosition = "W";
} else if ((_root.Hero[21] == (_root.PlacedMonsters[mID2][91] + 1)) && (_root.Hero[22] == _root.PlacedMonsters[mID2][92])) {
_root.TempHeroPosition = "S";
} else if ((_root.Hero[21] == (_root.PlacedMonsters[mID2][91] - 1)) && (_root.Hero[22] == _root.PlacedMonsters[mID2][92])) {
_root.TempHeroPosition = "N";
} else {
_root.TempHeroPosition = "X";
}
}
function ATTACK_HERO(mID3) {
if (_root.Hero[0] > _root.PlacedMonsters[mID3][3]) {
_root.ChanceOfFailure = (5 + _root.Hero[0]) - _root.PlacedMonsters[mID3][3];
} else {
_root.ChanceOfFailure = 5;
}
_root.HitRoll = Math.ceil(Math.random() * 100);
if (_root.HitRoll <= _root.ChanceOfFailure) {
_root.MonsterAttackOutcome = "Miss";
} else {
_root.MonsterAttackOutcome = "Hit";
_root.AttackIdRoll = Math.ceil(Math.random() * 100);
if (_root.AttackIdRoll <= 65) {
_root.AttackType = _root.PlacedMonsters[mID3][9];
_root.AttackDamage = _root.PlacedMonsters[mID3][10];
} else if (_root.AttackIdRoll <= 90) {
_root.AttackType = _root.PlacedMonsters[mID3][11];
_root.AttackDamage = _root.PlacedMonsters[mID3][12];
} else {
_root.AttackType = _root.PlacedMonsters[mID3][13];
_root.AttackDamage = _root.PlacedMonsters[mID3][14];
}
}
_root.GET_MONSTER_ACTUAL_DAMAGE();
_root.TempMonsterID = mID3;
_root.MonsterFrame = Number(_root.PlacedMonsters[mID3][0]) + 1;
_root.SHOW_MONSTER_ATTACK_EVENT();
}
function GET_MONSTER_ACTUAL_DAMAGE() {
if (_root.AttackType == "Physical") {
_root.ActualDamage = Math.round(_root.AttackDamage * (1 - (_root.Hero[5] / 100)));
} else if (_root.AttackType == "Fire") {
_root.ActualDamage = Math.round(_root.AttackDamage * (1 - (_root.Hero[6] / 100)));
} else if (_root.AttackType == "Magic") {
_root.ActualDamage = Math.round(_root.AttackDamage * (1 - (_root.Hero[7] / 100)));
} else if (_root.AttackType == "Holy") {
_root.ActualDamage = Math.round(_root.AttackDamage * (1 - (_root.Hero[8] / 100)));
}
_root.ActualDamage = _root.ActualDamage * 2;
}
function SHOW_MONSTER_ATTACK_EVENT() {
_root.Focus = "MonsterAttackEvent";
duplicateMovieClip ("_root.RaidEventTemplate", "RaidEvent", 10010);
setProperty("_root.RaidEvent", _x , "320");
setProperty("_root.RaidEvent", _y , "240");
if (_root.TempHeroPosition == "N") {
_root.RaidEvent.gotoAndPlay("MonsterAttacksS");
} else if (_root.TempHeroPosition == "S") {
_root.RaidEvent.gotoAndPlay("MonsterAttacksN");
} else if (_root.TempHeroPosition == "W") {
_root.RaidEvent.gotoAndPlay("MonsterAttacksE");
} else if (_root.TempHeroPosition == "E") {
_root.RaidEvent.gotoAndPlay("MonsterAttacksW");
}
}
function DELETE_MONSTER(mID) {
i = 0;
while (i < 100) {
_root.PlacedMonsters[mID][i] = undefined;
i++;
}
removeMovieClip("_root.Monster" + mID);
if (_root.Map[_root.TargetMonsterRow][_root.TargetMonsterColumn] == 5) {
_root.Map[_root.TargetMonsterRow][_root.TargetMonsterColumn] = 0;
_root.DungeonInfo.v11 = _root.DungeonInfo.v11 - 1;
_root.DungeonInfo.v12 = _root.DungeonInfo.v12 + 1;
}
}
function HEAL_MONSTERS() {
i = 1;
while (i <= _root.TotalPlacedMonsters) {
if (_root.PlacedMonsters[i][17] > 0) {
_root.PlacedMonsters[i][17] = Math.round(_root.PlacedMonsters[i][17] + (_root.PlacedMonsters[i][4] / 10));
if (_root.PlacedMonster[i][17] > _root.PlacedMonster[i][4]) {
_root.PlacedMonsters[i][17] = _root.PlacedMonsters[i][4];
}
}
i++;
}
}
function DRAG_MONSTER() {
_root.TempOldMonsterRow = int((_ymouse - 10) / _root.CellSize);
_root.TempOldMonsterColumn = int((_xmouse - 10) / _root.CellSize);
_root.MonsterFound = false;
_root.MonsterCounter = 0;
while ((_root.MonsterFound == false) && (_root.MonsterCounter < 9999)) {
if ((_root.PlacedMonsters[_root.MonsterCounter][91] == _root.TempOldMonsterRow) && (_root.PlacedMonsters[_root.MonsterCounter][92] == _root.TempOldMonsterColumn)) {
_root.MonsterFound = true;
_root.TempMonsterID = _root.MonsterCounter;
} else {
_root.MonsterCounter = _root.MonsterCounter + 1;
}
}
if (_root.MonsterCounter < 9999) {
startDrag ("_root.Monster" + _root.TempMonsterID);
_root.Focus = "DraggingMonster";
_root.Map[_root.TempOldMonsterRow][_root.TempOldMonsterColumn] = 0;
_root.Interface.MonsterQuickDisplay.gotoAndStop("On");
_root.Interface.MonsterQuickDisplay.Portrait.gotoAndStop(Number(_root.PlacedMonsters[_root.TempMonsterID][0]) + 1);
_root.TempCurrHP = Number(_root.PlacedMonsters[_root.TempMonsterID][17]);
_root.TempMaxHP = Number(_root.PlacedMonsters[_root.TempMonsterID][4]);
_root.Interface.MonsterQuickDisplay.LifeBar.gotoAndStop(Math.ceil((_root.TempCurrHP / _root.TempMaxHP) * 100));
}
}
function UNDRAG_MONSTER() {
_root.TempNewMonsterRow = int((_ymouse - 10) / _root.CellSize);
_root.TempNewMonsterColumn = int((_xmouse - 10) / _root.CellSize);
if (_root.Map[_root.TempNewMonsterRow][_root.TempNewMonsterColumn] == 0) {
if ((_root.TempNewMonsterRow != 1) || (_root.TempNewMonsterColumn != 15)) {
_root.Map[_root.TempNewMonsterRow][_root.TempNewMonsterColumn] = 5;
_root.PlacedMonsters[_root.TempMonsterID][91] = _root.TempNewMonsterRow;
_root.PlacedMonsters[_root.TempMonsterID][92] = _root.TempNewMonsterColumn;
_root.PlacedMonsters[_root.TempMonsterID][95] = _root.TempNewMonsterRow;
_root.PlacedMonsters[_root.TempMonsterID][96] = _root.TempNewMonsterColumn;
stopDrag();
setProperty("_root.Monster" + _root.TempMonsterID, _y , _root.CellSize * (_root.TempNewMonsterRow + 1));
setProperty("_root.Monster" + _root.TempMonsterID, _x , _root.CellSize * (_root.TempNewMonsterColumn + 1));
_root.Focus = "DragCreatures";
}
}
}
Frame 12
function START_RAID() {
_root.Focus = "Raid";
_root.SETUP_HERO_MAP();
_root.Interface.swapDepths(10003);
_root.Interface.gotoAndStop("Raid");
_root.Interface.TI0.text = _root.Hero[0];
_root.Interface.TI1.text = _root.Hero[27];
_root.Interface.TI2.text = _root.Hero[3];
_root.Interface.Hero.gotoAndStop(_root.Hero[27]);
_root.Interface.HeroLifeBar.gotoAndStop(Math.ceil((_root.Hero[2] / _root.Hero[26]) * 100));
_root.SHOW_HERO();
_root.CHECK_BORDERS();
_root.CHECK_WALLS();
_root.TurnTimer.gotoAndPlay(2);
}
function GET_TREASURE() {
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if (_root.Map[i][j] == 3) {
_root.Map[i][j] = 0;
}
j++;
}
i++;
}
removeMovieClip("_root.Treasure");
_root.CashSound.gotoAndPlay("Cash");
_root.Hero[25] = "Exit";
_root.RESET_HERO_MAP();
_root.TreasureN = false;
_root.TreasureS = false;
_root.TreasureW = false;
_root.TreasureE = false;
_root.TreasureIsPlaced = false;
_root.TreasureRow = undefined;
_root.TreasureColumn = undefined;
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
}
function END_OF_RAID(winner) {
_root.Hero[2] = -1;
_root.Hero[21] = -1;
_root.Hero[22] = -1;
_root.TurnTimer.stop();
_root.TurnTimer.gotoAndStop(1);
removeMovieClip("_root.HeroPointer");
_root.Interface.swapDepths(963);
_root.RESET_TRAPS();
_root.RESET_MONSTERS_POSITIONS();
_root.HEAL_MONSTERS();
if (winner == "Hero") {
_root.DungeonInfo.v0 = _root.DungeonInfo.v0 - _root.DungeonInfo.v6;
_root.Interface.T0.text = _root.DungeonInfo.v0;
_root.SHOW_CUTSCENE("PlayerLoses");
} else if (winner == "Player") {
_root.REMOVE_TREASURE();
_root.DungeonInfo.v0 = Number(_root.DungeonInfo.v0) + Number(_root.Hero[3]);
_root.Interface.T0.text = _root.DungeonInfo.v0;
_root.Interface.T2.text = _root.DungeonInfo.v2;
_root.EarnedGold = _root.Hero[3];
_root.SHOW_CUTSCENE("PlayerWins");
}
}
function SHOW_TREASURE() {
duplicateMovieClip ("_root.TreasureTemplate", "Treasure", 965);
startDrag ("_root.Treasure", true);
_root.TreasureIsPlaced = false;
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if (_root.Map[i][j] == 3) {
_root.Map[i][j] = 0;
}
j++;
}
i++;
}
}
function CHECK_TREASURE_AMOUNT() {
_root.Treasure1 = Number(_root.Interface.TXXXX.text) * 1000;
_root.Treasure2 = Number(_root.Interface.TXXX.text) * 100;
_root.Treasure3 = Number(_root.Interface.TXX.text) * 10;
_root.Treasure4 = Number(_root.Interface.TX.text);
_root.TreasureAmount = ((_root.Treasure1 + _root.Treasure2) + _root.Treasure3) + _root.Treasure4;
if ((Number(_root.TreasureAmount) <= Number(_root.DungeonInfo.v0)) && (Number(_root.TreasureAmount) > 0)) {
_root.DungeonInfo.v6 = _root.TreasureAmount;
_root.Focus = "TreasurePlacing";
} else if ((Number(_root.TreasureAmount) > Number(_root.DungeonInfo.v0)) && (Number(_root.TreasureAmount) > 0)) {
_root.TempTreasure = _root.DungeonInfo.v0;
_root.Interface.TX.text = _root.TempTreasure % 10;
if (_root.DungeonInfo.v0 > 9) {
_root.TempTreasure = Math.floor(Number(_root.TempTreasure) / 10);
_root.Interface.TXX.text = _root.TempTreasure % 10;
if (_root.DungeonInfo.v0 > 99) {
_root.TempTreasure = Math.floor(Number(_root.TempTreasure) / 10);
_root.Interface.TXXX.text = _root.TempTreasure % 10;
if (_root.DungeonInfo.v0 > 999) {
_root.TempTreasure = Math.floor(Number(_root.TempTreasure) / 10);
_root.Interface.TXXXX.text = _root.TempTreasure % 10;
} else {
_root.Interface.TXXXX.text = "0";
}
} else {
_root.Interface.TXXX.text = "0";
_root.Interface.TXXXX.text = "0";
}
} else {
_root.Interface.TXX.text = "0";
_root.Interface.TXXX.text = "0";
_root.Interface.TXXXX.text = "0";
}
_root.TempTXXXX = _root.Interface.TXXXX.text;
_root.TempTXXX = _root.Interface.TXXX.text;
_root.TempTXX = _root.Interface.TXX.text;
_root.TempTX = _root.Interface.TX.text;
if (_root.Interface.TXXXX.text == "0") {
_root.TempTXXXX = "";
if (_root.Interface.TXXX.text == "0") {
_root.TempTXXX = "";
if (_root.Interface.TXX.text == "0") {
_root.TempTXX = "";
if (_root.Interface.TX.text == "0") {
_root.TempTX = "";
}
}
}
}
_root.DungeonInfo.v6 = Number(((_root.TempTXXXX + _root.TempTXXX) + _root.TempTXX) + _root.TempTX);
_root.Focus = "TreasurePlacing";
}
if (Number(_root.TreasureAmount) > 0) {
_root.SHOW_TREASURE();
}
}
function PLACE_TREASURE() {
_root.TreasureRow = int((_ymouse - 10) / _root.CellSize);
_root.TreasureColumn = int((_xmouse - 10) / _root.CellSize);
_root.TempCellContent = _root.Map[_root.TreasureRow][_root.TreasureColumn];
if (((_root.TreasureRow <= _root.Rows) && (_root.TreasureColumn <= _root.Columns)) && (_root.TempCellContent == 0)) {
if ((_root.TreasureRow != 1) || (_root.TreasureColumn != 15)) {
stopDrag();
setProperty("Treasure", _x , _root.CellSize * (_root.TreasureColumn + 1));
setProperty("Treasure", _y , _root.CellSize * (_root.TreasureRow + 1));
_root.Map[_root.TreasureRow][_root.TreasureColumn] = 3;
_root.TreasureIsPlaced = true;
} else {
_root.REMOVE_TREASURE();
}
} else {
_root.REMOVE_TREASURE();
}
_root.Focus = "Treasure";
}
function REMOVE_TREASURE() {
if (_root.DungeonRank < 6) {
_root.Focus = "Treasure";
removeMovieClip("_root.Treasure");
_root.TreasureRow = undefined;
_root.TreasureColumn = undefined;
_root.TreasureIsPlaced = false;
_root.RESET_TREASURE_VARS();
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if (_root.Map[i][j] == 3) {
_root.Map[i][j] = 0;
}
j++;
}
i++;
}
}
}
function RESET_TREASURE_VARS() {
_root.DungeonInfo.v6 = 0;
_root.Interface.T6.text = "0";
_root.Interface.TX.text = "0";
_root.Interface.TXX.text = "0";
_root.Interface.TXXX.text = "0";
_root.Interface.TXXXX.text = "0";
}
function PLACE_LAST_TREASURE() {
removeMovieClip("_root.Cutscene");
_root.Focus = "Treasure";
_root.Interface.gotoAndStop("Treasure");
_root.Interface.TX.text = 9;
_root.Interface.TXX.text = 9;
_root.Interface.TXXX.text = 9;
_root.Interface.TXXXX.text = 9;
_root.CHECK_TREASURE_AMOUNT();
_root.DungeonInfo.v6 = _root.DungeonInfo.v0;
_root.Interface.T6.text = _root.DungeonInfo.v6;
_root.Focus = "TreasurePlacing";
}
Frame 13
function MOVE_HERO() {
_root.TempN = 0;
_root.TempS = 0;
_root.TempE = 0;
_root.TempW = 0;
_root.CHECK_BORDERS();
_root.CHECK_BLOCKS();
_root.CHECK_NEARBY_CELLS();
_root.ROLL_HERO_DIRECTION();
_root.APPLY_HERO_MOVEMENT();
}
function CHECK_BORDERS() {
if (_root.Hero[21] == 0) {
_root.TempN = -1;
}
if (_root.Hero[21] == (_root.Rows - 1)) {
_root.TempS = -1;
}
if (_root.Hero[22] == 0) {
_root.TempW = -1;
}
if (_root.Hero[22] == (_root.Columns - 1)) {
_root.TempE = -1;
}
}
function CHECK_BLOCKS() {
if (((_root.Map[_root.Hero[21] - 1][_root.Hero[22]] == 1) || (_root.Map[_root.Hero[21] - 1][_root.Hero[22]] == 3)) || (_root.Map[_root.Hero[21] - 1][_root.Hero[22]] == 5)) {
_root.TempN = -1;
}
if (((_root.Map[_root.Hero[21] + 1][_root.Hero[22]] == 1) || (_root.Map[_root.Hero[21] + 1][_root.Hero[22]] == 3)) || (_root.Map[_root.Hero[21] + 1][_root.Hero[22]] == 5)) {
_root.TempS = -1;
}
if (((_root.Map[_root.Hero[21]][_root.Hero[22] - 1] == 1) || (_root.Map[_root.Hero[21]][_root.Hero[22] - 1] == 3)) || (_root.Map[_root.Hero[21]][_root.Hero[22] - 1] == 5)) {
_root.TempW = -1;
}
if (((_root.Map[_root.Hero[21]][_root.Hero[22] + 1] == 1) || (_root.Map[_root.Hero[21]][_root.Hero[22] + 1] == 3)) || (_root.Map[_root.Hero[21]][_root.Hero[22] + 1] == 5)) {
_root.TempE = -1;
}
if ((((_root.Monster_N == true) || (_root.Monster_S == true)) || (_root.Monster_W == true)) || (_root.Monster_E == true)) {
_root.TempN = -1;
_root.TempS = -1;
_root.TempW = -1;
_root.TempE = -1;
}
}
function CHECK_NEARBY_CELLS() {
if ((((_root.TempN == -1) && (_root.TempS == -1)) && (_root.TempW == -1)) && (_root.TempE == -1)) {
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
} else {
_root.Flag = false;
_root.TempCounter = -1;
while (_root.Flag == false) {
_root.TempCounter = _root.TempCounter + 1;
if ((_root.TempN != -1) && (_root.HeroMap[_root.Hero[21] - 1][_root.Hero[22]] == _root.TempCounter)) {
_root.Flag = true;
_root.TempN = 1;
}
if ((_root.TempS != -1) && (_root.HeroMap[_root.Hero[21] + 1][_root.Hero[22]] == _root.TempCounter)) {
_root.Flag = true;
_root.TempS = 1;
}
if ((_root.TempW != -1) && (_root.HeroMap[_root.Hero[21]][_root.Hero[22] - 1] == _root.TempCounter)) {
_root.Flag = true;
_root.TempW = 1;
}
if ((_root.TempE != -1) && (_root.HeroMap[_root.Hero[21]][_root.Hero[22] + 1] == _root.TempCounter)) {
_root.Flag = true;
_root.TempE = 1;
}
}
}
}
function ROLL_HERO_DIRECTION() {
_root.TempRoll = Math.floor(Math.random() * 100);
if (((_root.TempRoll < 50) && (_root.TempN == 1)) && (_root.Hero[28] == "N")) {
_root.NewDirection = "N";
} else if (((_root.TempRoll < 50) && (_root.TempS == 1)) && (_root.Hero[28] == "S")) {
_root.NewDirection = "S";
} else if (((_root.TempRoll < 50) && (_root.TempW == 1)) && (_root.Hero[28] == "W")) {
_root.NewDirection = "W";
} else if (((_root.TempRoll < 50) && (_root.TempE == 1)) && (_root.Hero[28] == "E")) {
_root.NewDirection = "E";
} else {
_root.Directions = new Array();
_root.TempCounter = 0;
if (_root.TempN == 1) {
_root.Directions[_root.TempCounter] = "N";
_root.TempCounter = _root.TempCounter + 1;
}
if (_root.TempS == 1) {
_root.Directions[_root.TempCounter] = "S";
_root.TempCounter = _root.TempCounter + 1;
}
if (_root.TempW == 1) {
_root.Directions[_root.TempCounter] = "W";
_root.TempCounter = _root.TempCounter + 1;
}
if (_root.TempE == 1) {
_root.Directions[_root.TempCounter] = "E";
_root.TempCounter = _root.TempCounter + 1;
}
_root.TempValue = Math.floor(Math.random() * _root.TempCounter);
_root.NewDirection = _root.Directions[_root.TempValue];
_root.Hero[28] = _root.NewDirection;
}
if (_root.NewDirection == "N") {
_root.Hero[23] = _root.Hero[21] - 1;
_root.Hero[24] = _root.Hero[22];
} else if (_root.NewDirection == "S") {
_root.Hero[23] = _root.Hero[21] + 1;
_root.Hero[24] = _root.Hero[22];
} else if (_root.NewDirection == "E") {
_root.Hero[23] = _root.Hero[21];
_root.Hero[24] = _root.Hero[22] + 1;
} else if (_root.NewDirection == "W") {
_root.Hero[23] = _root.Hero[21];
_root.Hero[24] = _root.Hero[22] - 1;
}
}
function APPLY_HERO_MOVEMENT() {
if ((((_root.Monster_N == false) && (_root.Monster_S == false)) && (_root.Monster_E == false)) && (_root.Monster_W == false)) {
_root.OldHeroY = _root.Hero[21];
_root.OldHeroX = _root.Hero[22];
_root.NewHeroY = _root.Hero[23];
_root.NewHeroX = _root.Hero[24];
_root.Map[_root.OldHeroY][_root.OldHeroX] = 0;
_root.Hero[19] = _root.Hero[21];
_root.Hero[20] = _root.Hero[22];
_root.Hero[21] = _root.Hero[23];
_root.Hero[22] = _root.Hero[24];
_root.Hero[23] = undefined;
_root.Hero[24] = undefined;
setProperty("_root.HeroPointer", _x , _root.CellSize * (_root.Hero[22] + 1));
setProperty("_root.HeroPointer", _y , _root.CellSize * (_root.Hero[21] + 1));
_root.HeroMap[_root.Hero[21]][_root.Hero[22]] = _root.HeroMap[_root.Hero[21]][_root.Hero[22]] + 1;
}
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
}
Frame 14
function MOVE_MONSTER(mID4) {
_root.TempN = true;
_root.TempS = true;
_root.TempE = true;
_root.TempW = true;
_root.CHECK_MONSTER_BORDERS(mID4);
_root.CHECK_OBSTACLES(mID4);
_root.ROLL_MONSTER_DIRECTION(mID4);
_root.APPLY_MONSTER_MOVEMENT(mID4);
}
function CHECK_MONSTER_BORDERS(mID5) {
if (_root.PlacedMonsters[mID5][91] == 0) {
_root.TempN = false;
}
if (_root.PlacedMonsters[mID5][91] == (_root.Rows - 1)) {
_root.TempS = false;
}
if (_root.PlacedMonsters[mID5][92] == 0) {
_root.TempW = false;
}
if (_root.PlacedMonsters[mID5][92] == (_root.Columns - 1)) {
_root.TempE = false;
}
}
function CHECK_OBSTACLES(mID6) {
_root.TempRow = Number(_root.PlacedMonsters[mID6][91]);
_root.TempColumn = Number(_root.PlacedMonsters[mID6][92]);
if ((_root.Map[_root.TempRow - 1][_root.TempColumn] != 0) && (_root.Map[_root.TempRow - 1][_root.TempColumn] != 7)) {
_root.TempN = false;
}
if ((_root.Map[_root.TempRow + 1][_root.TempColumn] != 0) && (_root.Map[_root.TempRow + 1][_root.TempColumn] != 7)) {
_root.TempS = false;
}
if ((_root.Map[_root.TempRow][_root.TempColumn - 1] != 0) && (_root.Map[_root.TempRow][_root.TempColumn - 1] != 7)) {
_root.TempW = false;
}
if ((_root.Map[_root.TempRow][_root.TempColumn + 1] != 0) && (_root.Map[_root.TempRow][_root.TempColumn + 1] != 7)) {
_root.TempE = false;
}
}
function ROLL_MONSTER_DIRECTION(mID7) {
_root.MovementIsPossible = false;
if ((((_root.TempN == true) || (_root.TempS == true)) || (_root.TempW == true)) || (_root.TempE == true)) {
_root.MovementIsPossible = true;
_root.TempRoll = Math.floor(Math.random() * 100);
if (((_root.PlacedMonsters[mID7][97] == "N") && (_root.TempN == true)) && (_root.TempRoll < 50)) {
_root.NewMonsterDirection = "N";
} else if (((_root.PlacedMonsters[mID7][97] == "S") && (_root.TempS == true)) && (_root.TempRoll < 50)) {
_root.NewMonsterDirection = "S";
} else if (((_root.PlacedMonsters[mID7][97] == "W") && (_root.TempW == true)) && (_root.TempRoll < 50)) {
_root.NewMonsterDirection = "W";
} else if (((_root.PlacedMonsters[mID7][97] == "E") && (_root.TempE == true)) && (_root.TempRoll < 50)) {
_root.NewMonsterDirection = "E";
} else {
_root.MonsterDirections = new Array();
_root.TempCounter = 0;
if (_root.TempN == true) {
_root.MonsterDirections[_root.TempCounter] = "N";
_root.TempCounter = _root.TempCounter + 1;
}
if (_root.TempS == true) {
_root.MonsterDirections[_root.TempCounter] = "S";
_root.TempCounter = _root.TempCounter + 1;
}
if (_root.TempW == true) {
_root.MonsterDirections[_root.TempCounter] = "W";
_root.TempCounter = _root.TempCounter + 1;
}
if (_root.TempE == true) {
_root.MonsterDirections[_root.TempCounter] = "E";
_root.TempCounter = _root.TempCounter + 1;
}
_root.TempValue = Math.floor(Math.random() * _root.TempCounter);
_root.NewMonsterDirection = _root.MonsterDirections[_root.TempValue];
_root.PlacedMonsters[mID7][97] = _root.NewMonsterDirection;
}
if (_root.NewMonsterDirection == "N") {
_root.PlacedMonsters[mID7][93] = _root.PlacedMonsters[mID7][91] - 1;
_root.PlacedMonsters[mID7][94] = _root.PlacedMonsters[mID7][92];
} else if (_root.NewMonsterDirection == "S") {
_root.PlacedMonsters[mID7][93] = _root.PlacedMonsters[mID7][91] + 1;
_root.PlacedMonsters[mID7][94] = _root.PlacedMonsters[mID7][92];
} else if (_root.NewMonsterDirection == "E") {
_root.PlacedMonsters[mID7][93] = _root.PlacedMonsters[mID7][91];
_root.PlacedMonsters[mID7][94] = _root.PlacedMonsters[mID7][92] + 1;
} else if (_root.NewMonsterDirection == "W") {
_root.PlacedMonsters[mID7][93] = _root.PlacedMonsters[mID7][91];
_root.PlacedMonsters[mID7][94] = _root.PlacedMonsters[mID7][92] - 1;
}
}
}
function APPLY_MONSTER_MOVEMENT(mID8) {
if (_root.MovementIsPossible == true) {
_root.OldMonsterY = _root.PlacedMonsters[mID8][91];
_root.OldMonsterX = _root.PlacedMonsters[mID8][92];
_root.NewMonsterY = _root.PlacedMonsters[mID8][93];
_root.NewMonsterX = _root.PlacedMonsters[mID8][94];
if (_root.Map[_root.NewMonsterY][_root.NewMonsterX] == 0) {
_root.Map[_root.NewMonsterY][_root.NewMonsterX] = 5;
}
if (_root.Map[_root.OldMonsterY][_root.OldMonsterX] == 5) {
_root.Map[_root.OldMonsterY][_root.OldMonsterX] = 0;
}
_root.PlacedMonsters[mID8][91] = _root.PlacedMonsters[mID8][93];
_root.PlacedMonsters[mID8][92] = _root.PlacedMonsters[mID8][94];
_root.PlacedMonsters[mID8][93] = undefined;
_root.PlacedMonsters[mID8][94] = undefined;
setProperty("_root.Monster" + mID8, _y , _root.CellSize * (_root.PlacedMonsters[mID8][91] + 1));
setProperty("_root.Monster" + mID8, _x , _root.CellSize * (_root.PlacedMonsters[mID8][92] + 1));
}
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
}
function RESET_MONSTERS_POSITIONS() {
i = 1;
while (i <= _root.DungeonInfo.v10) {
if (_root.PlacedMonsters[i][17] > 0) {
_root.OldMonsterY = _root.PlacedMonsters[i][91];
_root.OldMonsterX = _root.PlacedMonsters[i][92];
_root.NewMonsterY = _root.PlacedMonsters[i][95];
_root.NewMonsterX = _root.PlacedMonsters[i][96];
_root.Map[_root.OldMonsterY][_root.OldMonsterX] = 0;
_root.Map[_root.NewMonsterY][_root.NewMonsterX] = 5;
_root.PlacedMonsters[i][91] = _root.PlacedMonsters[i][95];
_root.PlacedMonsters[i][92] = _root.PlacedMonsters[i][96];
setProperty("_root.Monster" + i, _y , _root.CellSize * (_root.PlacedMonsters[i][91] + 1));
setProperty("_root.Monster" + i, _x , _root.CellSize * (_root.PlacedMonsters[i][92] + 1));
}
i++;
}
}
Frame 15
function SAVE_GAME() {
_root.SaveGame.data.FirstFlag = true;
_root.SaveGame.data.Beginning = false;
_root.SaveGame.data.Focus = "Info";
_root.SaveGame.data.TotalPlacedMonsters = _root.TotalPlacedMonsters;
_root.SaveGame.data.CurrentPlacedMonsters = _root.CurrentPlacedMonsters;
_root.SaveGame.data.TotalPlacedTraps = _root.TotalPlacedTraps;
_root.SaveGame.data.CurrentPlacedTraps = _root.CurrentPlacedTraps;
_root.SaveGame.data.DungeonRank = _root.DungeonRank;
_root.SaveGame.data.Patch_1_5_done = _root.Patch_1_5_done;
_root.SaveGame.data.Map = new Array();
i = 0;
while (i < _root.Rows) {
_root.SaveGame.data.Map[i] = new Array();
i++;
}
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
_root.SaveGame.data.Map[i][j] = _root.Map[i][j];
j++;
}
i++;
}
_root.SaveGame.data.PlacedMonsters = new Array();
i = 1;
while (i <= _root.TotalPlacedMonsters) {
_root.SaveGame.data.PlacedMonsters[i] = new Array();
i++;
}
i = 1;
while (i <= _root.TotalPlacedMonsters) {
j = 0;
while (j < 100) {
if (_root.PlacedMonsters[i][j] != undefined) {
_root.SaveGame.data.PlacedMonsters[i][j] = _root.PlacedMonsters[i][j];
}
j++;
}
i++;
}
_root.SaveGame.data.PlacedTraps = new Array();
i = 1;
while (i <= _root.TotalPlacedTraps) {
_root.SaveGame.data.PlacedTraps[i] = new Array();
i++;
}
i = 1;
while (i <= _root.TotalPlacedTraps) {
j = 0;
while (j < 100) {
if (_root.PlacedTraps[i][j] != undefined) {
_root.SaveGame.data.PlacedTraps[i][j] = _root.PlacedTraps[i][j];
}
j++;
}
i++;
}
_root.SaveGame.data.DungeonInfo = new Array();
i = 0;
while (i < 50) {
if (eval ("_root.DungeonInfo.v" + i) != undefined) {
_root.SaveGame.data.DungeonInfo[i] = eval ("_root.DungeonInfo.v" + i);
}
i++;
}
_root.SaveGame.flush();
}
function LOAD_GAME() {
if (_root.SaveGame.data.FirstFlag != true) {
} else {
_root.DELETE_WHOLE_MAP();
_root.Beginning = _root.SaveGame.data.Beginning;
_root.Focus = _root.SaveGame.data.Focus;
_root.TotalPlacedMonsters = _root.SaveGame.data.TotalPlacedMonsters;
_root.CurrentPlacedMonsters = _root.SaveGame.data.CurrentPlacedMonsters;
_root.TotalPlacedTraps = _root.SaveGame.data.TotalPlacedTraps;
_root.CurrentPlacedTraps = _root.SaveGame.data.CurrentPlacedTraps;
_root.DungeonRank = _root.SaveGame.data.DungeonRank;
_root.Patch_1_5_done = _root.SaveGame.data.Patch_1_5_done;
_root.Map = new Array();
i = 0;
while (i < _root.Rows) {
_root.Map[i] = new Array();
i++;
}
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
_root.Map[i][j] = _root.SaveGame.data.Map[i][j];
j++;
}
i++;
}
_root.PlacedMonsters = new Array();
i = 1;
while (i <= _root.TotalPlacedMonsters) {
_root.PlacedMonsters[i] = new Array();
i++;
}
i = 1;
while (i <= _root.TotalPlacedMonsters) {
j = 0;
while (j < 100) {
if (_root.SaveGame.data.PlacedMonsters[i][j] != undefined) {
_root.PlacedMonsters[i][j] = _root.SaveGame.data.PlacedMonsters[i][j];
}
j++;
}
i++;
}
_root.PlacedTraps = new Array();
i = 1;
while (i <= _root.TotalPlacedTraps) {
_root.PlacedTraps[i] = new Array();
i++;
}
i = 1;
while (i <= _root.TotalPlacedTraps) {
j = 0;
while (j < 100) {
if (_root.SaveGame.data.PlacedTraps[i][j] != undefined) {
_root.PlacedTraps[i][j] = _root.SaveGame.data.PlacedTraps[i][j];
}
j++;
}
i++;
}
_root.DungeonInfo = new Object();
i = 0;
while (i < 50) {
if (_root.SaveGame.data.DungeonInfo[i] != undefined) {
Set("_root.DungeonInfo.v" + i, _root.SaveGame.data.DungeonInfo[i]);
}
i++;
}
_root.DRAW_MAP();
_root.SET_LOADED_MONSTERS();
_root.SET_LOADED_TRAPS();
_root.PATCH_PLACED_TRAPS_COST();
_root.PATCH_DUNGEON_RANK();
if (_root.Patch_1_5_done == false) {
_root.PATCH_1_5();
_root.Patch_1_5_done = true;
}
duplicateMovieClip ("_root.InterfaceTemplate", "Interface", 963);
setProperty("_root.Interface", _x , 556);
setProperty("_root.Interface", _y , 240);
_root.UPDATE_INTERFACE();
}
}
function SET_LOADED_MONSTERS() {
i = 1;
while (i <= _root.TotalPlacedMonsters) {
if (_root.PlacedMonsters[i][17] > 0) {
duplicateMovieClip ("_root.MonsterTemplate", "Monster" + i, 2000 + i);
setProperty("_root.Monster" + i, _y , (_root.PlacedMonsters[i][95] + 1) * _root.CellSize);
setProperty("_root.Monster" + i, _x , (_root.PlacedMonsters[i][96] + 1) * _root.CellSize);
}
i++;
}
}
function SET_LOADED_TRAPS() {
i = 1;
while (i <= _root.TotalPlacedTraps) {
duplicateMovieClip ("_root.TrapTemplate", "Trap" + i, 1000 + i);
setProperty("_root.Trap" + i, _y , (_root.PlacedTraps[i][91] + 1) * _root.CellSize);
setProperty("_root.Trap" + i, _x , (_root.PlacedTraps[i][92] + 1) * _root.CellSize);
i++;
}
}
function UPDATE_INTERFACE() {
_root.Interface.T0.text = _root.DungeonInfo.v0;
_root.Interface.T1.text = _root.DungeonInfo.v1;
_root.Interface.T2.text = _root.DungeonInfo.v2;
}
function DELETE_WHOLE_MAP() {
removeMovieClip("_root.Cutscene");
removeMovieClip("_root.Treasure");
removeMovieClip("_root.Exit");
removeMovieClip("_root.Interface");
i = 0;
while (i < (_root.Rows * _root.Columns)) {
removeMovieClip("_root.GroundButton" + i);
i++;
}
i = 0;
while (i <= _root.TotalPlacedTraps) {
removeMovieClip("_root.Trap" + i);
i++;
}
i = 0;
while (i <= _root.TotalPlacedMonsters) {
removeMovieClip("_root.Monster" + i);
i++;
}
}
function RESTART_GAME() {
_root.DELETE_WHOLE_MAP();
_root.Beginning = true;
_root.StepOnTheExit = undefined;
gotoAndPlay (1);
}
function LOAD_GAME_2() {
_root.FocusListenerIsOn = true;
_root.INITIALIZE();
_root.LOAD_GAME();
}
function PATCH_PLACED_TRAPS_COST() {
i = 1;
while (i <= _root.TotalPlacedTraps) {
if (_root.PlacedTraps[i][9] == "Ready") {
_root.PlacedTraps[i][7] = (_root.PlacedTraps[i][5] * _root.PlacedTraps[i][5]) * _root.PlacedTraps[i][6];
}
i++;
}
}
function PATCH_DUNGEON_RANK() {
_root.DungeonRank = _root.DungeonInfo.v1;
}
function PATCH_1_5() {
_root.PatchMap = new Array();
i = 0;
while (i < _root.Rows) {
_root.PatchMap[i] = new Array();
j = 0;
while (j < _root.Columns) {
_root.PatchMap[i][j] = 0;
j++;
}
i++;
}
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
if (_root.Map[i][j] == 1) {
_root.PatchMap[i][j] = 1;
}
j++;
}
i++;
}
i = 1;
while (i <= _root.TotalPlacedTraps) {
if (((((_root.PlacedTraps[i][91] >= 0) && (_root.PlacedTraps[i][91] < _root.Rows)) && (_root.PlacedTraps[i][92] >= 0)) && (_root.PlacedTraps[i][92] < _root.Columns)) && (_root.PlacedTraps[i][9] == "Ready")) {
_root.TrapY = _root.PlacedTraps[i][91];
_root.TrapX = _root.PlacedTraps[i][92];
_root.PatchMap[_root.TrapY][_root.TrapX] = 4;
}
i++;
}
i = 1;
while (i <= _root.TotalPlacedMonsters) {
if (((((_root.PlacedMonsters[i][91] >= 0) && (_root.PlacedMonsters[i][91] < _root.Rows)) && (_root.PlacedMonsters[i][92] >= 0)) && (_root.PlacedMonsters[i][92] < _root.Columns)) && (_root.PlacedMonsters[i][17] > 0)) {
_root.MonsterY = _root.PlacedMonsters[i][91];
_root.MonsterX = _root.PlacedMonsters[i][92];
_root.PatchMap[_root.MonsterY][_root.MonsterX] = 4;
}
i++;
}
_root.PatchMap[1][15] = 2;
i = 0;
while (i < _root.Rows) {
j = 0;
while (j < _root.Columns) {
_root.Map[i][j] = _root.PatchMap[i][j];
j++;
}
i++;
}
}
_root.SaveGame = SharedObject.getLocal("DungeonSweetDungeonSaveGame");
Frame 16
_root.DungeonRanks = new Array();
i = 0;
while (i < 8) {
_root.DungeonRanks[i] = new Array();
i++;
}
_root.DungeonRanks[0][0] = 0;
_root.DungeonRanks[0][1] = 0;
_root.DungeonRanks[0][2] = "Nobody is aware of the dungeon";
_root.DungeonRanks[1][0] = 1;
_root.DungeonRanks[1][1] = 200;
_root.DungeonRanks[1][2] = "A few people are aware of the dungeon";
_root.DungeonRanks[2][0] = 2;
_root.DungeonRanks[2][1] = 1000;
_root.DungeonRanks[2][2] = "Nearby townfolks know the dungeon";
_root.DungeonRanks[3][0] = 3;
_root.DungeonRanks[3][1] = 2500;
_root.DungeonRanks[3][2] = "The dungeon is well known locally";
_root.DungeonRanks[4][0] = 4;
_root.DungeonRanks[4][1] = 5000;
_root.DungeonRanks[4][2] = "The dungeon is well known in all the region";
_root.DungeonRanks[5][0] = 5;
_root.DungeonRanks[5][1] = 10000;
_root.DungeonRanks[5][2] = "The dungeon is famous across all the kingdom";
_root.DungeonRanks[6][0] = 6;
_root.DungeonRanks[6][1] = 20000;
_root.DungeonRanks[6][2] = "The dungeon is legendary";
_root.DungeonInfo = new Object();
_root.DungeonInfo.v0 = 150;
_root.DungeonInfo.v1 = 0;
_root.DungeonInfo.v2 = _root.DungeonRanks[0][2];
_root.DungeonInfo.v3 = 2;
_root.DungeonInfo.v4 = 0.1;
_root.DungeonInfo.v10 = 0;
_root.DungeonInfo.v11 = 0;
_root.DungeonInfo.v12 = 0;
_root.DungeonInfo.v13 = 0;
_root.DungeonInfo.v14 = 0;
_root.DungeonInfo.v15 = 0;
_root.DungeonInfo.v16 = 0;
i = 5;
while (i < 50) {
Set("_root.DungeonInfo.v" + i, 0);
i++;
}
_root.GoldForDigEvents = new Array();
_root.GoldForDigEvents[0] = 20;
_root.GoldForDigEvents[1] = 100;
_root.GoldForDigEvents[2] = 250;
_root.GoldForDigEvents[3] = 500;
_root.GoldForDigEvents[4] = 1000;
_root.GoldForDigEvents[5] = 2000;
_root.GoldForDigEvents[6] = 5000;
_root.PlacedMonsters = new Array();
_root.TotalPlacedMonsters = 0;
_root.CurrentPlacedMonsters = 0;
_root.PlacedTraps = new Array();
_root.TotalPlacedTraps = 0;
_root.CurrentPlacedTraps = 0;
_root.MapValues = new Array();
_root.MapValues[0] = "Vuoto";
_root.MapValues[1] = "Muro";
_root.MapValues[2] = "Uscita";
_root.MapValues[3] = "Tesoro";
_root.MapValues[4] = "Trappola";
_root.MapValues[5] = "Mostro";
_root.MapValues[6] = "Eroe";
_root.MapValues[7] = "Trappola scarica";
_root.Patch_1_5_done = false;
Frame 17
_root.Heroes = new Array();
i = 0;
while (i < 8) {
_root.Heroes[i] = new Array();
i++;
}
_root.Heroes[0][0] = 0;
_root.Heroes[0][1] = "VILLAGER";
_root.Heroes[0][2] = 30;
_root.Heroes[0][3] = 15;
_root.Heroes[0][4] = 10;
_root.Heroes[0][5] = 0;
_root.Heroes[0][6] = 0;
_root.Heroes[0][7] = 0;
_root.Heroes[0][8] = 0;
_root.Heroes[0][9] = "Physical";
_root.Heroes[0][10] = 2;
_root.Heroes[0][11] = "Physical";
_root.Heroes[0][12] = 5;
_root.Heroes[0][13] = "Physical";
_root.Heroes[0][14] = 10;
_root.Heroes[0][15] = "Normal";
_root.Heroes[0][16] = "Weak";
_root.Heroes[0][17] = "Weak";
_root.Heroes[0][18] = "Weak";
_root.Heroes[1][0] = 1;
_root.Heroes[1][1] = "WARRIOR";
_root.Heroes[1][2] = 70;
_root.Heroes[1][3] = 35;
_root.Heroes[1][4] = 30;
_root.Heroes[1][5] = 50;
_root.Heroes[1][6] = 10;
_root.Heroes[1][7] = 0;
_root.Heroes[1][8] = 0;
_root.Heroes[1][9] = "Physical";
_root.Heroes[1][10] = 4;
_root.Heroes[1][11] = "Physical";
_root.Heroes[1][12] = 8;
_root.Heroes[1][13] = "Physical";
_root.Heroes[1][14] = 15;
_root.Heroes[1][15] = "Strong";
_root.Heroes[1][16] = "Normal";
_root.Heroes[1][17] = "Normal";
_root.Heroes[1][18] = "Weak";
_root.Heroes[2][0] = 2;
_root.Heroes[2][1] = "CLERIC";
_root.Heroes[2][2] = 50;
_root.Heroes[2][3] = 30;
_root.Heroes[2][4] = 20;
_root.Heroes[2][5] = 20;
_root.Heroes[2][6] = 0;
_root.Heroes[2][7] = 20;
_root.Heroes[2][8] = 50;
_root.Heroes[2][9] = "Physical";
_root.Heroes[2][10] = 3;
_root.Heroes[2][11] = "Mystic";
_root.Heroes[2][12] = 6;
_root.Heroes[2][13] = "Mystic";
_root.Heroes[2][14] = 10;
_root.Heroes[2][15] = "Normal";
_root.Heroes[2][16] = "Strong";
_root.Heroes[2][17] = "Normal";
_root.Heroes[2][18] = "Normal";
_root.Heroes[3][0] = 3;
_root.Heroes[3][1] = "DRUID";
_root.Heroes[3][2] = 50;
_root.Heroes[3][3] = 30;
_root.Heroes[3][4] = 20;
_root.Heroes[3][5] = 10;
_root.Heroes[3][6] = 50;
_root.Heroes[3][7] = 0;
_root.Heroes[3][8] = 30;
_root.Heroes[3][9] = "Fire";
_root.Heroes[3][10] = 3;
_root.Heroes[3][11] = "Physical";
_root.Heroes[3][12] = 6;
_root.Heroes[3][13] = "Mystic";
_root.Heroes[3][14] = 10;
_root.Heroes[3][15] = "Normal";
_root.Heroes[3][16] = "Normal";
_root.Heroes[3][17] = "Strong";
_root.Heroes[3][18] = "Weak";
_root.Heroes[4][0] = 4;
_root.Heroes[4][1] = "WIZARD";
_root.Heroes[4][2] = 40;
_root.Heroes[4][3] = 30;
_root.Heroes[4][4] = 10;
_root.Heroes[4][5] = 0;
_root.Heroes[4][6] = 30;
_root.Heroes[4][7] = 50;
_root.Heroes[4][8] = 0;
_root.Heroes[4][9] = "Magic";
_root.Heroes[4][10] = 3;
_root.Heroes[4][11] = "Fire";
_root.Heroes[4][12] = 5;
_root.Heroes[4][13] = "Magic";
_root.Heroes[4][14] = 10;
_root.Heroes[4][15] = "Normal";
_root.Heroes[4][16] = "Weak";
_root.Heroes[4][17] = "Normal";
_root.Heroes[4][18] = "Strong";
_root.Heroes[5][0] = 5;
_root.Heroes[5][1] = "THIEF";
_root.Heroes[5][2] = 40;
_root.Heroes[5][3] = 40;
_root.Heroes[5][4] = 80;
_root.Heroes[5][5] = 10;
_root.Heroes[5][6] = 10;
_root.Heroes[5][7] = 20;
_root.Heroes[5][8] = 0;
_root.Heroes[5][9] = "Physical";
_root.Heroes[5][10] = 3;
_root.Heroes[5][11] = "Fire";
_root.Heroes[5][12] = 5;
_root.Heroes[5][13] = "Fire";
_root.Heroes[5][14] = 10;
_root.Heroes[5][15] = "Strong";
_root.Heroes[5][16] = "Weak";
_root.Heroes[5][17] = "Normal";
_root.Heroes[5][18] = "Weak";
_root.Heroes[6][0] = 6;
_root.Heroes[6][1] = "RANGER";
_root.Heroes[6][2] = 60;
_root.Heroes[6][3] = 30;
_root.Heroes[6][4] = 40;
_root.Heroes[6][5] = 20;
_root.Heroes[6][6] = 10;
_root.Heroes[6][7] = 0;
_root.Heroes[6][8] = 10;
_root.Heroes[6][9] = "Physical";
_root.Heroes[6][10] = 3;
_root.Heroes[6][11] = "Fire";
_root.Heroes[6][12] = 6;
_root.Heroes[6][13] = "Mystic";
_root.Heroes[6][14] = 10;
_root.Heroes[6][15] = "Normal";
_root.Heroes[6][16] = "Weak";
_root.Heroes[6][17] = "Strong";
_root.Heroes[6][18] = "Weak";
_root.Heroes[7][0] = 7;
_root.Heroes[7][1] = "AVATAR";
_root.Heroes[7][2] = 200;
_root.Heroes[7][3] = 0;
_root.Heroes[7][4] = 50;
_root.Heroes[7][5] = 50;
_root.Heroes[7][6] = 50;
_root.Heroes[7][7] = 50;
_root.Heroes[7][8] = 50;
_root.Heroes[7][9] = "Mystic";
_root.Heroes[7][10] = 10;
_root.Heroes[7][11] = "Magic";
_root.Heroes[7][12] = 20;
_root.Heroes[7][13] = "Fire";
_root.Heroes[7][14] = 40;
_root.Heroes[7][15] = "Strong";
_root.Heroes[7][16] = "Strong";
_root.Heroes[7][17] = "Strong";
_root.Heroes[7][18] = "Strong";
Frame 18
_root.Monsters = new Object();
i = 0;
while (i < 20) {
Set("_root.Monsters.ID" + i, new Object());
i++;
}
_root.Monsters.ID0.v0 = 0;
_root.Monsters.ID0.v1 = "GOBLIN";
_root.Monsters.ID0.v2 = "Humanoid";
_root.Monsters.ID0.v3 = 1;
_root.Monsters.ID0.v4 = 15;
_root.Monsters.ID0.v5 = 0;
_root.Monsters.ID0.v6 = 20;
_root.Monsters.ID0.v7 = 0;
_root.Monsters.ID0.v8 = 30;
_root.Monsters.ID0.v9 = "Physical";
_root.Monsters.ID0.v10 = 2;
_root.Monsters.ID0.v11 = "Physical";
_root.Monsters.ID0.v12 = 5;
_root.Monsters.ID0.v13 = "Physical";
_root.Monsters.ID0.v14 = 7;
_root.Monsters.ID0.v15 = 1;
_root.Monsters.ID0.v16 = 12;
_root.Monsters.ID1.v0 = 1;
_root.Monsters.ID1.v1 = "ORC";
_root.Monsters.ID1.v2 = "Humanoid";
_root.Monsters.ID1.v3 = 5;
_root.Monsters.ID1.v4 = 70;
_root.Monsters.ID1.v5 = 0;
_root.Monsters.ID1.v6 = 20;
_root.Monsters.ID1.v7 = 0;
_root.Monsters.ID1.v8 = 30;
_root.Monsters.ID1.v9 = "Physical";
_root.Monsters.ID1.v10 = 7;
_root.Monsters.ID1.v11 = "Physical";
_root.Monsters.ID1.v12 = 12;
_root.Monsters.ID1.v13 = "Physical";
_root.Monsters.ID1.v14 = 25;
_root.Monsters.ID1.v15 = 1;
_root.Monsters.ID1.v16 = 35;
_root.Monsters.ID2.v0 = 2;
_root.Monsters.ID2.v1 = "LIZARDMAN";
_root.Monsters.ID2.v2 = "Humanoid";
_root.Monsters.ID2.v3 = 10;
_root.Monsters.ID2.v4 = 250;
_root.Monsters.ID2.v5 = 0;
_root.Monsters.ID2.v6 = 20;
_root.Monsters.ID2.v7 = 0;
_root.Monsters.ID2.v8 = 30;
_root.Monsters.ID2.v9 = "Physical";
_root.Monsters.ID2.v10 = 10;
_root.Monsters.ID2.v11 = "Fire";
_root.Monsters.ID2.v12 = 20;
_root.Monsters.ID2.v13 = "Fire";
_root.Monsters.ID2.v14 = 30;
_root.Monsters.ID2.v15 = 1;
_root.Monsters.ID2.v16 = 70;
_root.Monsters.ID3.v0 = 3;
_root.Monsters.ID3.v1 = "OGRE";
_root.Monsters.ID3.v2 = "Humanoid";
_root.Monsters.ID3.v3 = 25;
_root.Monsters.ID3.v4 = 700;
_root.Monsters.ID3.v5 = 0;
_root.Monsters.ID3.v6 = 20;
_root.Monsters.ID3.v7 = 0;
_root.Monsters.ID3.v8 = 30;
_root.Monsters.ID3.v9 = "Physical";
_root.Monsters.ID3.v10 = 30;
_root.Monsters.ID3.v11 = "Physical";
_root.Monsters.ID3.v12 = 50;
_root.Monsters.ID3.v13 = "Mystic";
_root.Monsters.ID3.v14 = 80;
_root.Monsters.ID3.v15 = 1;
_root.Monsters.ID3.v16 = 200;
_root.Monsters.ID4.v0 = 4;
_root.Monsters.ID4.v1 = "GORGON";
_root.Monsters.ID4.v2 = "Humanoid";
_root.Monsters.ID4.v3 = 50;
_root.Monsters.ID4.v4 = 1500;
_root.Monsters.ID4.v5 = 0;
_root.Monsters.ID4.v6 = 20;
_root.Monsters.ID4.v7 = 0;
_root.Monsters.ID4.v8 = 30;
_root.Monsters.ID4.v9 = "Magic";
_root.Monsters.ID4.v10 = 80;
_root.Monsters.ID4.v11 = "Physical";
_root.Monsters.ID4.v12 = 130;
_root.Monsters.ID4.v13 = "Magic";
_root.Monsters.ID4.v14 = 150;
_root.Monsters.ID4.v15 = 1;
_root.Monsters.ID4.v16 = 450;
Frame 19
_root.Monsters.ID5.v0 = 5;
_root.Monsters.ID5.v1 = "SKELETON";
_root.Monsters.ID5.v2 = "Undead";
_root.Monsters.ID5.v3 = 1;
_root.Monsters.ID5.v4 = 15;
_root.Monsters.ID5.v5 = 50;
_root.Monsters.ID5.v6 = 0;
_root.Monsters.ID5.v7 = 20;
_root.Monsters.ID5.v8 = 0;
_root.Monsters.ID5.v9 = "Physical";
_root.Monsters.ID5.v10 = 2;
_root.Monsters.ID5.v11 = "Physical";
_root.Monsters.ID5.v12 = 4;
_root.Monsters.ID5.v13 = "Physical";
_root.Monsters.ID5.v14 = 6;
_root.Monsters.ID5.v15 = 1;
_root.Monsters.ID5.v16 = 12;
_root.Monsters.ID6.v0 = 6;
_root.Monsters.ID6.v1 = "ZOMBIE";
_root.Monsters.ID6.v2 = "Undead";
_root.Monsters.ID6.v3 = 5;
_root.Monsters.ID6.v4 = 70;
_root.Monsters.ID6.v5 = 50;
_root.Monsters.ID6.v6 = 0;
_root.Monsters.ID6.v7 = 20;
_root.Monsters.ID6.v8 = 0;
_root.Monsters.ID6.v9 = "Physical";
_root.Monsters.ID6.v10 = 5;
_root.Monsters.ID6.v11 = "Physical";
_root.Monsters.ID6.v12 = 10;
_root.Monsters.ID6.v13 = "Physical";
_root.Monsters.ID6.v14 = 20;
_root.Monsters.ID6.v15 = 1;
_root.Monsters.ID6.v16 = 35;
_root.Monsters.ID7.v0 = 7;
_root.Monsters.ID7.v1 = "GHOUL";
_root.Monsters.ID7.v2 = "Undead";
_root.Monsters.ID7.v3 = 10;
_root.Monsters.ID7.v4 = 250;
_root.Monsters.ID7.v5 = 50;
_root.Monsters.ID7.v6 = 0;
_root.Monsters.ID7.v7 = 20;
_root.Monsters.ID7.v8 = 0;
_root.Monsters.ID7.v9 = "Physical";
_root.Monsters.ID7.v10 = 10;
_root.Monsters.ID7.v11 = "Mystic";
_root.Monsters.ID7.v12 = 20;
_root.Monsters.ID7.v13 = "Mystic";
_root.Monsters.ID7.v14 = 30;
_root.Monsters.ID7.v15 = 1;
_root.Monsters.ID7.v16 = 70;
_root.Monsters.ID8.v0 = 8;
_root.Monsters.ID8.v1 = "GHOST";
_root.Monsters.ID8.v2 = "Undead";
_root.Monsters.ID8.v3 = 25;
_root.Monsters.ID8.v4 = 700;
_root.Monsters.ID8.v5 = 50;
_root.Monsters.ID8.v6 = 0;
_root.Monsters.ID8.v7 = 20;
_root.Monsters.ID8.v8 = 0;
_root.Monsters.ID8.v9 = "Mystic";
_root.Monsters.ID8.v10 = 20;
_root.Monsters.ID8.v11 = "Magic";
_root.Monsters.ID8.v12 = 40;
_root.Monsters.ID8.v13 = "Mystic";
_root.Monsters.ID8.v14 = 70;
_root.Monsters.ID8.v15 = 1;
_root.Monsters.ID8.v16 = 180;
_root.Monsters.ID9.v0 = 9;
_root.Monsters.ID9.v1 = "VAMPIRE";
_root.Monsters.ID9.v2 = "Undead";
_root.Monsters.ID9.v3 = 50;
_root.Monsters.ID9.v4 = 1500;
_root.Monsters.ID9.v5 = 50;
_root.Monsters.ID9.v6 = 0;
_root.Monsters.ID9.v7 = 20;
_root.Monsters.ID9.v8 = 0;
_root.Monsters.ID9.v9 = "Physical";
_root.Monsters.ID9.v10 = 70;
_root.Monsters.ID9.v11 = "Mystic";
_root.Monsters.ID9.v12 = 100;
_root.Monsters.ID9.v13 = "Mystic";
_root.Monsters.ID9.v14 = 150;
_root.Monsters.ID9.v15 = 1;
_root.Monsters.ID9.v16 = 500;
Frame 20
_root.Monsters.ID10.v0 = 10;
_root.Monsters.ID10.v1 = "BAT";
_root.Monsters.ID10.v2 = "Beast";
_root.Monsters.ID10.v3 = 1;
_root.Monsters.ID10.v4 = 15;
_root.Monsters.ID10.v5 = 20;
_root.Monsters.ID10.v6 = 0;
_root.Monsters.ID10.v7 = 0;
_root.Monsters.ID10.v8 = 20;
_root.Monsters.ID10.v9 = "Physical";
_root.Monsters.ID10.v10 = 1;
_root.Monsters.ID10.v11 = "Physical";
_root.Monsters.ID10.v12 = 3;
_root.Monsters.ID10.v13 = "Physical";
_root.Monsters.ID10.v14 = 5;
_root.Monsters.ID10.v15 = 1;
_root.Monsters.ID10.v16 = 10;
_root.Monsters.ID11.v0 = 11;
_root.Monsters.ID11.v1 = "SPIDER";
_root.Monsters.ID11.v2 = "Beast";
_root.Monsters.ID11.v3 = 5;
_root.Monsters.ID11.v4 = 70;
_root.Monsters.ID11.v5 = 20;
_root.Monsters.ID11.v6 = 0;
_root.Monsters.ID11.v7 = 0;
_root.Monsters.ID11.v8 = 20;
_root.Monsters.ID11.v9 = "Physical";
_root.Monsters.ID11.v10 = 5;
_root.Monsters.ID11.v11 = "Physical";
_root.Monsters.ID11.v12 = 10;
_root.Monsters.ID11.v13 = "Fire";
_root.Monsters.ID11.v14 = 15;
_root.Monsters.ID11.v15 = 1;
_root.Monsters.ID11.v16 = 30;
_root.Monsters.ID12.v0 = 12;
_root.Monsters.ID12.v1 = "SALAMANDER";
_root.Monsters.ID12.v2 = "Beast";
_root.Monsters.ID12.v3 = 10;
_root.Monsters.ID12.v4 = 250;
_root.Monsters.ID12.v5 = 20;
_root.Monsters.ID12.v6 = 0;
_root.Monsters.ID12.v7 = 0;
_root.Monsters.ID12.v8 = 20;
_root.Monsters.ID12.v9 = "Fire";
_root.Monsters.ID12.v10 = 10;
_root.Monsters.ID12.v11 = "Fire";
_root.Monsters.ID12.v12 = 20;
_root.Monsters.ID12.v13 = "Fire";
_root.Monsters.ID12.v14 = 30;
_root.Monsters.ID12.v15 = 1;
_root.Monsters.ID12.v16 = 80;
_root.Monsters.ID13.v0 = 13;
_root.Monsters.ID13.v1 = "BASILISK";
_root.Monsters.ID13.v2 = "Beast";
_root.Monsters.ID13.v3 = 25;
_root.Monsters.ID13.v4 = 700;
_root.Monsters.ID13.v5 = 20;
_root.Monsters.ID13.v6 = 0;
_root.Monsters.ID13.v7 = 0;
_root.Monsters.ID13.v8 = 20;
_root.Monsters.ID13.v9 = "Magic";
_root.Monsters.ID13.v10 = 20;
_root.Monsters.ID13.v11 = "Physical";
_root.Monsters.ID13.v12 = 40;
_root.Monsters.ID13.v13 = "Mystic";
_root.Monsters.ID13.v14 = 50;
_root.Monsters.ID13.v15 = 0;
_root.Monsters.ID13.v16 = 200;
_root.Monsters.ID14.v0 = 14;
_root.Monsters.ID14.v1 = "CHIMAERA";
_root.Monsters.ID14.v2 = "Beast";
_root.Monsters.ID14.v3 = 50;
_root.Monsters.ID14.v4 = 1500;
_root.Monsters.ID14.v5 = 20;
_root.Monsters.ID14.v6 = 0;
_root.Monsters.ID14.v7 = 0;
_root.Monsters.ID14.v8 = 20;
_root.Monsters.ID14.v9 = "Magic";
_root.Monsters.ID14.v10 = 80;
_root.Monsters.ID14.v11 = "Fire";
_root.Monsters.ID14.v12 = 130;
_root.Monsters.ID14.v13 = "Physical";
_root.Monsters.ID14.v14 = 180;
_root.Monsters.ID14.v15 = 1;
_root.Monsters.ID14.v16 = 500;
Frame 21
_root.Monsters.ID15.v0 = 15;
_root.Monsters.ID15.v1 = "SLIME";
_root.Monsters.ID15.v2 = "Arcane";
_root.Monsters.ID15.v3 = 1;
_root.Monsters.ID15.v4 = 15;
_root.Monsters.ID15.v5 = 20;
_root.Monsters.ID15.v6 = 20;
_root.Monsters.ID15.v7 = 20;
_root.Monsters.ID15.v8 = 50;
_root.Monsters.ID15.v9 = "Fire";
_root.Monsters.ID15.v10 = 1;
_root.Monsters.ID15.v11 = "Fire";
_root.Monsters.ID15.v12 = 3;
_root.Monsters.ID15.v13 = "Fire";
_root.Monsters.ID15.v14 = 5;
_root.Monsters.ID15.v15 = 0;
_root.Monsters.ID15.v16 = 10;
_root.Monsters.ID16.v0 = 16;
_root.Monsters.ID16.v1 = "IMP";
_root.Monsters.ID16.v2 = "Arcane";
_root.Monsters.ID16.v3 = 5;
_root.Monsters.ID16.v4 = 70;
_root.Monsters.ID16.v5 = 20;
_root.Monsters.ID16.v6 = 20;
_root.Monsters.ID16.v7 = 20;
_root.Monsters.ID16.v8 = 50;
_root.Monsters.ID16.v9 = "Magic";
_root.Monsters.ID16.v10 = 5;
_root.Monsters.ID16.v11 = "Fire";
_root.Monsters.ID16.v12 = 10;
_root.Monsters.ID16.v13 = "Magic";
_root.Monsters.ID16.v14 = 20;
_root.Monsters.ID16.v15 = 1;
_root.Monsters.ID16.v16 = 35;
_root.Monsters.ID17.v0 = 17;
_root.Monsters.ID17.v1 = "GARGOYLE";
_root.Monsters.ID17.v2 = "Arcane";
_root.Monsters.ID17.v3 = 10;
_root.Monsters.ID17.v4 = 250;
_root.Monsters.ID17.v5 = 50;
_root.Monsters.ID17.v6 = 20;
_root.Monsters.ID17.v7 = 20;
_root.Monsters.ID17.v8 = 50;
_root.Monsters.ID17.v9 = "Physical";
_root.Monsters.ID17.v10 = 10;
_root.Monsters.ID17.v11 = "Magic";
_root.Monsters.ID17.v12 = 20;
_root.Monsters.ID17.v13 = "Magic";
_root.Monsters.ID17.v14 = 30;
_root.Monsters.ID17.v15 = 0;
_root.Monsters.ID17.v16 = 80;
_root.Monsters.ID18.v0 = 18;
_root.Monsters.ID18.v1 = "BEHOLDER";
_root.Monsters.ID18.v2 = "Arcane";
_root.Monsters.ID18.v3 = 25;
_root.Monsters.ID18.v4 = 700;
_root.Monsters.ID18.v5 = 20;
_root.Monsters.ID18.v6 = 20;
_root.Monsters.ID18.v7 = 20;
_root.Monsters.ID18.v8 = 50;
_root.Monsters.ID18.v9 = "Magic";
_root.Monsters.ID18.v10 = 30;
_root.Monsters.ID18.v11 = "Fire";
_root.Monsters.ID18.v12 = 50;
_root.Monsters.ID18.v13 = "Magic";
_root.Monsters.ID18.v14 = 100;
_root.Monsters.ID18.v15 = 1;
_root.Monsters.ID18.v16 = 250;
_root.Monsters.ID19.v0 = 19;
_root.Monsters.ID19.v1 = "DRAGON";
_root.Monsters.ID19.v2 = "Arcane";
_root.Monsters.ID19.v3 = 50;
_root.Monsters.ID19.v4 = 1500;
_root.Monsters.ID19.v5 = 20;
_root.Monsters.ID19.v6 = 20;
_root.Monsters.ID19.v7 = 20;
_root.Monsters.ID19.v8 = 50;
_root.Monsters.ID19.v9 = "Physical";
_root.Monsters.ID19.v10 = 100;
_root.Monsters.ID19.v11 = "Fire";
_root.Monsters.ID19.v12 = 150;
_root.Monsters.ID19.v13 = "Magic";
_root.Monsters.ID19.v14 = 200;
_root.Monsters.ID19.v15 = 0;
_root.Monsters.ID19.v16 = 600;
Frame 22
_root.Traps = new Object();
i = 0;
while (i < 20) {
Set("_root.traps.ID" + i, new Object());
i++;
}
_root.Traps.ID0.v0 = 0;
_root.Traps.ID0.v1 = "DART TRAP";
_root.Traps.ID0.v2 = "Physical";
_root.Traps.ID0.v3 = "Weak";
_root.Traps.ID0.v4 = 10;
_root.Traps.ID0.v5 = 6;
_root.Traps.ID1.v0 = 1;
_root.Traps.ID1.v1 = "SPIKE PIT";
_root.Traps.ID1.v2 = "Physical";
_root.Traps.ID1.v3 = "Strong";
_root.Traps.ID1.v4 = 50;
_root.Traps.ID1.v5 = 18;
_root.Traps.ID2.v0 = 2;
_root.Traps.ID2.v1 = "FLAME JET";
_root.Traps.ID2.v2 = "Fire";
_root.Traps.ID2.v3 = "Weak";
_root.Traps.ID2.v4 = 10;
_root.Traps.ID2.v5 = 7;
_root.Traps.ID3.v0 = 3;
_root.Traps.ID3.v1 = "LAVA FLOW";
_root.Traps.ID3.v2 = "Fire";
_root.Traps.ID3.v3 = "Strong";
_root.Traps.ID3.v4 = 50;
_root.Traps.ID3.v5 = 19;
_root.Traps.ID4.v0 = 4;
_root.Traps.ID4.v1 = "MAGIC BOLT";
_root.Traps.ID4.v2 = "Magic";
_root.Traps.ID4.v3 = "Weak";
_root.Traps.ID4.v4 = 10;
_root.Traps.ID4.v5 = 8;
_root.Traps.ID5.v0 = 5;
_root.Traps.ID5.v1 = "SHOCK WALL";
_root.Traps.ID5.v2 = "Magic";
_root.Traps.ID5.v3 = "Strong";
_root.Traps.ID5.v4 = 50;
_root.Traps.ID5.v5 = 20;
_root.Traps.ID6.v0 = 6;
_root.Traps.ID6.v1 = "PAIN CURSE";
_root.Traps.ID6.v2 = "Mystic";
_root.Traps.ID6.v3 = "Weak";
_root.Traps.ID6.v4 = 10;
_root.Traps.ID6.v5 = 7;
_root.Traps.ID7.v0 = 7;
_root.Traps.ID7.v1 = "RUNE CIRCLE";
_root.Traps.ID7.v2 = "Mystic";
_root.Traps.ID7.v3 = "Strong";
_root.Traps.ID7.v4 = 50;
_root.Traps.ID7.v5 = 19;
_root.MaxTrapsLevel = new Array();
_root.MaxTrapsLevel.Weak = new Array();
_root.MaxTrapsLevel.Strong = new Array();
_root.MaxTrapsLevel.Weak[0] = 3;
_root.MaxTrapsLevel.Weak[1] = 5;
_root.MaxTrapsLevel.Weak[2] = 7;
_root.MaxTrapsLevel.Weak[3] = 9;
_root.MaxTrapsLevel.Weak[4] = 9;
_root.MaxTrapsLevel.Weak[5] = 9;
_root.MaxTrapsLevel.Weak[6] = 9;
_root.MaxTrapsLevel.Strong[0] = 1;
_root.MaxTrapsLevel.Strong[1] = 1;
_root.MaxTrapsLevel.Strong[2] = 1;
_root.MaxTrapsLevel.Strong[3] = 3;
_root.MaxTrapsLevel.Strong[4] = 6;
_root.MaxTrapsLevel.Strong[5] = 9;
_root.MaxTrapsLevel.Strong[6] = 9;
Frame 23
stop();
Frame 35
if (_root.Beginning == true) {
_root.INITIALIZE();
duplicateMovieClip ("_root.InterfaceTemplate", "Interface", 963);
setProperty("_root.Interface", _x , 556);
setProperty("_root.Interface", _y , 240);
_root.SHOW_CUTSCENE("Opening");
_root.StepOnTheExit = undefined;
_root.Beginning = false;
}
stop();
Symbol 59 Button
on (release) {
gotoAndStop (35);
}
Symbol 60 Button
on (release) {
nextFrame();
}
Symbol 66 Button
on (release) {
nextFrame();
}
Symbol 67 Button
on (release) {
prevFrame();
}
Symbol 156 Button
on (release) {
if (_root.Focus == "TreasurePlacing") {
_root.PLACE_TREASURE();
if (((_root.TreasureRow <= _root.Rows) && (_root.TreasureColumn <= _root.Columns)) && (_root.TempCellContent == 0)) {
if (_root.DungeonRank < 6) {
_root.SHOW_CUTSCENE("EndOfPreparations");
} else {
_root.SHOW_CUTSCENE("LastRaid");
}
} else {
_root.REMOVE_TREASURE();
if (_root.DungeonRank == 6) {
_root.Focus = "TreasurePlacing";
}
}
} else if (_root.Focus == "MonsterPlacing") {
_root.PLACE_NEW_MONSTER();
} else if (_root.Focus == "TrapPlacing") {
_root.PLACE_NEW_TRAP();
}
}
Symbol 161 Button
on (release) {
if (_root.Focus == "Dig") {
_root.TempRow = int((_ymouse - 10) / _root.CellSize);
_root.TempColumn = int((_xmouse - 10) / _root.CellSize);
_root.REMOVE_TILE();
}
}
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 3
stop();
Symbol 175 MovieClip Frame 8
gotoAndPlay (5);
Symbol 175 MovieClip Frame 12
gotoAndPlay (9);
Symbol 175 MovieClip Frame 16
gotoAndPlay (13);
Symbol 175 MovieClip Frame 20
gotoAndPlay (17);
Symbol 175 MovieClip Frame 24
gotoAndPlay (21);
Symbol 175 MovieClip Frame 28
gotoAndPlay (25);
Symbol 175 MovieClip Frame 32
gotoAndPlay (29);
Symbol 175 MovieClip Frame 36
gotoAndPlay (33);
Symbol 177 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 2
stop();
Symbol 180 MovieClip Frame 1
_root.LoopCounter = 0;
stop();
Symbol 180 MovieClip Frame 2
if ((_root.Hero[2] < 1) || (_root.Focus != "Raid")) {
prevFrame();
} else {
_root.LoopCounter = _root.LoopCounter + 1;
play();
}
Symbol 180 MovieClip Frame 3
if (_root.LoopCounter >= 1) {
_root.HERO_AI();
_root.HeroX = _root.Hero[22];
_root.HeroY = _root.Hero[21];
_root.LoopCounter = 0;
_root.TempMapValue = _root.Map[_root.HeroY][_root.HeroX];
_root.Interface.MapTest.MapValue.text = _root.TempMapValue;
_root.Interface.MapTest.MapText.text = _root.MapValues[_root.TempMapValue];
} else {
gotoAndPlay (2);
}
Symbol 180 MovieClip Frame 4
stop();
Symbol 194 Button
on (release) {
if (_root.Focus == "Info") {
if (_root.Text0seen == false) {
_root.SHOW_CUTSCENE("GoToDigMode");
} else {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
}
}
}
Symbol 195 Button
on (release) {
if (_root.Focus == "Info") {
if (_root.DungeonRank < 6) {
if (_root.Text1seen == false) {
_root.SHOW_CUTSCENE("GoToTreasureMode");
} else {
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
}
} else {
_root.SHOW_CUTSCENE("AvatarAttack");
}
}
}
Symbol 196 Button
on (release) {
if (_root.Focus == "Info") {
if (_root.Text2seen == false) {
_root.SHOW_CUTSCENE("GoToBeastmaster");
} else {
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
}
}
}
Symbol 197 Button
on (release) {
if (_root.Focus == "Info") {
if (_root.Text3seen == false) {
_root.SHOW_CUTSCENE("GoToTrapmaster");
} else {
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
}
}
}
Symbol 199 Button
on (release) {
if (_root.Focus == "Info") {
_root.SHOW_CUTSCENE("LoadGame");
}
}
Symbol 201 Button
on (release) {
if (_root.Focus == "Info") {
_root.SHOW_CUTSCENE("SaveGame");
}
}
Symbol 208 Button
on (release) {
if (_root.Focus == "Dig") {
if (_root.Text4seen == false) {
_root.SHOW_CUTSCENE("GoToInfo");
removeMovieClip("_root.Piccone");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
removeMovieClip("_root.Piccone");
}
}
}
Symbol 209 Button
on (release) {
if (_root.Focus == "Dig") {
if (_root.Text1seen == false) {
_root.SHOW_CUTSCENE("GoToTreasureMode");
removeMovieClip("_root.Piccone");
} else {
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
removeMovieClip("_root.Piccone");
}
if (_root.DungeonRank < 6) {
} else {
_root.SHOW_CUTSCENE("AvatarAttack");
}
}
}
Symbol 210 Button
on (release) {
if (_root.Focus == "Dig") {
if (_root.Text2seen == false) {
_root.SHOW_CUTSCENE("GoToBeastmaster");
removeMovieClip("_root.Piccone");
} else {
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
removeMovieClip("_root.Piccone");
}
}
}
Symbol 211 Button
on (release) {
if (_root.Focus == "Dig") {
if (_root.Text3seen == false) {
_root.SHOW_CUTSCENE("GoToTrapmaster");
removeMovieClip("_root.Piccone");
} else {
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
removeMovieClip("_root.Piccone");
}
}
}
Symbol 219 Button
on (release) {
if (_root.Focus == "Treasure") {
if (_root.Text0seen == false) {
_root.SHOW_CUTSCENE("GoToDigMode");
} else {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
}
}
}
Symbol 220 Button
on (release) {
if (_root.Focus == "Treasure") {
if (_root.Text4seen == false) {
_root.SHOW_CUTSCENE("GoToInfo");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
}
}
}
Symbol 221 Button
on (release) {
if (_root.Focus == "Treasure") {
if (_root.Text2seen == false) {
_root.SHOW_CUTSCENE("GoToBeastmaster");
} else {
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
}
}
}
Symbol 222 Button
on (release) {
if (_root.Focus == "Treasure") {
if (_root.Text3seen == false) {
_root.SHOW_CUTSCENE("GoToTrapmaster");
} else {
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
}
}
}
Symbol 225 Button
on (release) {
if (_root.Focus == "Treasure") {
_root.CHECK_TREASURE_AMOUNT();
_root.Interface.T6.text = _root.DungeonInfo.v6;
} else if ((_root.Focus == "TreasurePlacing") && (_root.DungeonRank < 6)) {
_root.REMOVE_TREASURE();
}
}
Symbol 231 Button
on (release) {
if (((_root.Focus == "Treasure") && (Number(_root.Interface.TXXXX.text) < 9)) && (_root.DungeonRank < 6)) {
_root.Interface.TXXXX.text = Number(_root.Interface.TXXXX.text) + 1;
}
}
Symbol 232 Button
on (release) {
if (((_root.Focus == "Treasure") && (Number(_root.Interface.TXXX.text) < 9)) && (_root.DungeonRank < 6)) {
_root.Interface.TXXX.text = Number(_root.Interface.TXXX.text) + 1;
}
}
Symbol 233 Button
on (release) {
if (((_root.Focus == "Treasure") && (Number(_root.Interface.TXX.text) < 9)) && (_root.DungeonRank < 6)) {
_root.Interface.TXX.text = Number(_root.Interface.TXX.text) + 1;
}
}
Symbol 234 Button
on (release) {
if (((_root.Focus == "Treasure") && (Number(_root.Interface.TXXXX.text) > 0)) && (_root.DungeonRank < 6)) {
_root.Interface.TXXXX.text = Number(_root.Interface.TXXXX.text) - 1;
}
}
Symbol 235 Button
on (release) {
if (((_root.Focus == "Treasure") && (Number(_root.Interface.TXXX.text) > 0)) && (_root.DungeonRank < 6)) {
_root.Interface.TXXX.text = Number(_root.Interface.TXXX.text) - 1;
}
}
Symbol 236 Button
on (release) {
if (((_root.Focus == "Treasure") && (Number(_root.Interface.TXX.text) > 0)) && (_root.DungeonRank < 6)) {
_root.Interface.TXX.text = Number(_root.Interface.TXX.text) - 1;
}
}
Symbol 240 Button
on (release) {
if (_root.Focus == "Beastmaster") {
if (_root.Text0seen == false) {
_root.SHOW_CUTSCENE("GoToDigMode");
} else {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
}
}
}
Symbol 241 Button
on (release) {
if (_root.Focus == "Beastmaster") {
if (_root.DungeonRank < 6) {
if (_root.Text1seen == false) {
_root.SHOW_CUTSCENE("GoToTreasureMode");
} else {
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
}
} else {
_root.SHOW_CUTSCENE("AvatarAttack");
}
}
}
Symbol 242 Button
on (release) {
if (_root.Focus == "Beastmaster") {
if (_root.Text4seen == false) {
_root.SHOW_CUTSCENE("GoToInfo");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
}
}
}
Symbol 243 Button
on (release) {
if (_root.Focus == "Beastmaster") {
if (_root.Text3seen == false) {
_root.SHOW_CUTSCENE("GoToTrapmaster");
} else {
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
}
}
}
Symbol 246 Button
on (release) {
if (_root.Focus == "Beastmaster") {
_root.Focus = "DragCreatures";
_root.Interface.gotoAndStop("DragCreatures");
}
}
Symbol 248 Button
on (release) {
if (_root.Focus == "Beastmaster") {
if (_root.TotalPlacedMonsters < 7000) {
_root.SHOW_SHOP("BeastShop");
} else {
_root.Focus = "7000monsters";
_root.SHOW_CUTSCENE("7000monsters");
}
}
}
Symbol 250 Button
on (release) {
if (_root.Focus == "Trapmaster") {
if (_root.Text0seen == false) {
_root.SHOW_CUTSCENE("GoToDigMode");
} else {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
}
}
}
Symbol 251 Button
on (release) {
if (_root.Focus == "Trapmaster") {
if (_root.DungeonRank < 6) {
if (_root.Text1seen == false) {
_root.SHOW_CUTSCENE("GoToTreasureMode");
} else {
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
}
} else {
_root.SHOW_CUTSCENE("AvatarAttack");
}
}
}
Symbol 252 Button
on (release) {
if (_root.Focus == "Trapmaster") {
if (_root.Text2seen == false) {
_root.SHOW_CUTSCENE("GoToBeastmaster");
} else {
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
}
}
}
Symbol 253 Button
on (release) {
if (_root.Focus == "Trapmaster") {
if (_root.Text4seen == false) {
_root.SHOW_CUTSCENE("GoToInfo");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
}
}
}
Symbol 256 Button
on (release) {
if (_root.Focus == "Trapmaster") {
_root.Focus = "UpgradeTraps";
_root.Interface.gotoAndStop("UpgradeTraps");
}
}
Symbol 258 Button
on (release) {
if (_root.Focus == "Trapmaster") {
if (_root.TotalPlacedTraps < 2000) {
_root.SHOW_SHOP("TrapShop");
} else {
_root.Focus = "2000traps";
_root.SHOW_CUTSCENE("2000traps");
}
}
}
Symbol 270 MovieClip Frame 1
stop();
Symbol 270 MovieClip Frame 2
stop();
Symbol 270 MovieClip Frame 3
stop();
Symbol 270 MovieClip Frame 4
stop();
Symbol 270 MovieClip Frame 5
stop();
Symbol 270 MovieClip Frame 6
stop();
Symbol 270 MovieClip Frame 7
stop();
Symbol 270 MovieClip Frame 8
stop();
Symbol 279 Button
on (release) {
if (_root.Focus == "UpgradeTraps") {
if (_root.Text0seen == false) {
_root.SHOW_CUTSCENE("GoToDigMode");
} else {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
}
}
}
Symbol 280 Button
on (release) {
if (_root.Focus == "UpgradeTraps") {
if (_root.Text1seen == false) {
_root.SHOW_CUTSCENE("GoToTreasureMode");
} else {
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
}
}
}
Symbol 281 Button
on (release) {
if (_root.Focus == "UpgradeTraps") {
if (_root.Text2seen == false) {
_root.SHOW_CUTSCENE("GoToBeastmaster");
} else {
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
}
}
}
Symbol 282 Button
on (release) {
if (_root.Focus == "UpgradeTraps") {
if (_root.Text4seen == false) {
_root.SHOW_CUTSCENE("GoToInfo");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
}
}
}
Symbol 285 Button
on (release) {
if (_root.Focus == "UpgradeTraps") {
_root.Focus = "Trapmaster";
_root.Interface.gotoAndStop("Trapmaster");
}
}
Symbol 287 Button
on (release) {
if (_root.Focus == "DragCreatures") {
if (_root.Text0seen == false) {
_root.SHOW_CUTSCENE("GoToDigMode");
} else {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
}
}
}
Symbol 288 Button
on (release) {
if (_root.Focus == "DragCreatures") {
if (_root.Text1seen == false) {
_root.SHOW_CUTSCENE("GoToTreasureMode");
} else {
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
}
}
}
Symbol 289 Button
on (release) {
if (_root.Focus == "DragCreatures") {
if (_root.Text4seen == false) {
_root.SHOW_CUTSCENE("GoToInfo");
} else {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
}
}
}
Symbol 290 Button
on (release) {
if (_root.Focus == "DragCreatures") {
if (_root.Text3seen == false) {
_root.SHOW_CUTSCENE("GoToTrapmaster");
} else {
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
}
}
}
Symbol 292 Button
on (release) {
if (_root.Focus == "DragCreatures") {
_root.Focus = "Beastmaster";
_root.Interface.gotoAndStop("Beastmaster");
}
}
Symbol 315 MovieClip Frame 1
stop();
Symbol 315 MovieClip Frame 2
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 328 Button
on (release) {
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
_root.Cutscene.removeMovieClip();
}
Symbol 331 Button
on (release) {
_root.ROLL_HERO();
nextFrame();
}
Symbol 334 Button
on (release) {
_root.REMOVE_TREASURE();
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
_root.Cutscene.removeMovieClip();
}
Symbol 340 Button
on (release) {
_root.START_RAID();
_root.Interface.gotoAndStop("Raid");
_root.Focus = "Raid";
_root.Cutscene.removeMovieClip();
}
Symbol 348 Button
on (release) {
_root.START_RAID();
_root.Interface.gotoAndStop("Raid");
_root.Focus = "Raid";
_root.Cutscene.removeMovieClip();
}
Symbol 351 Button
on (release) {
if (_root.HeroClass == 7) {
_root.Cutscene.gotoAndStop("GoodEnding");
} else {
nextFrame();
}
}
Symbol 360 Button
on (release) {
_root.CHECK_DUNGEON_LEVEL_UP();
}
Symbol 363 Button
on (release) {
if (_root.DungeonInfo.v0 == 0) {
_root.Cutscene.gotoAndStop("BadEnding");
} else {
nextFrame();
}
}
Symbol 371 Button
on (release) {
_root.DungeonInfo.v6 = 0;
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
_root.Cutscene.removeMovieClip();
}
Symbol 373 Button
on (release) {
_root.Text0seen = true;
_root.Interface.gotoAndStop("Dig");
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
_root.Cutscene.removeMovieClip();
}
Symbol 375 Button
on (release) {
_root.Text1seen = true;
_root.Interface.gotoAndStop("Treasure");
_root.Focus = "Treasure";
_root.Cutscene.removeMovieClip();
}
Symbol 377 Button
on (release) {
_root.Text2seen = true;
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
_root.Cutscene.removeMovieClip();
}
Symbol 379 Button
on (release) {
_root.Text3seen = true;
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
_root.Cutscene.removeMovieClip();
}
Symbol 381 Button
on (release) {
_root.Text4seen = true;
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
_root.Cutscene.removeMovieClip();
}
Symbol 383 Button
on (release) {
_root.Text5seen = true;
_root.Interface.gotoAndStop("Beastmaster");
_root.SHOW_NEW_MONSTER();
}
Symbol 385 Button
on (release) {
_root.Text6seen = true;
_root.Interface.gotoAndStop("TrapMaster");
_root.SHOW_NEW_TRAP();
}
Symbol 387 Button
on (release) {
_root.Interface.gotoAndStop("Info");
_root.Focus = "Info";
_root.Cutscene.removeMovieClip();
}
Symbol 398 Button
on (release) {
_root.RESTART_GAME();
}
Symbol 410 Button
on (release) {
_root.SAVE_GAME();
nextFrame();
}
Symbol 413 Button
on (release) {
_root.Focus = _root.TempFocus;
_root.Cutscene.removeMovieClip();
}
Symbol 418 Button
on (release) {
_root.LOAD_GAME();
nextFrame();
}
Symbol 421 Button
on (release) {
_root.Focus = "UpgradeTraps";
_root.Cutscene.removeMovieClip();
}
Symbol 423 Button
on (release) {
_root.Focus = "Dig";
duplicateMovieClip ("_root.PickTemplate", "Piccone", 966);
startDrag ("_root.Piccone", true);
setProperty("_root.Piccone", _x , _xmouse);
setProperty("_root.Piccone", _y , _ymouse);
removeMovieClip("_root.Cutscene");
}
Symbol 433 Button
on (release) {
_root.Focus = "Trapmaster";
_root.Cutscene.removeMovieClip();
}
Symbol 435 Button
on (release) {
_root.Focus = "Beastmaster";
_root.Cutscene.removeMovieClip();
}
Symbol 456 Button
on (release) {
_root.PLACE_LAST_TREASURE();
}
Symbol 460 MovieClip Frame 1
stop();
Symbol 460 MovieClip Frame 11
stop();
Symbol 460 MovieClip Frame 17
_root.Cutscene.TC0.text = _root.Hero[0];
_root.Cutscene.TC1.text = _root.Hero[27];
Symbol 460 MovieClip Frame 19
stop();
_root.TurnTimer.gotoAndStop(1);
Symbol 460 MovieClip Frame 23
stop();
_root.TurnTimer.gotoAndStop(1);
Symbol 460 MovieClip Frame 27
stop();
Symbol 460 MovieClip Frame 28
stop();
Symbol 460 MovieClip Frame 29
stop();
Symbol 460 MovieClip Frame 30
stop();
Symbol 460 MovieClip Frame 31
stop();
Symbol 460 MovieClip Frame 32
stop();
Symbol 460 MovieClip Frame 33
stop();
Symbol 460 MovieClip Frame 34
stop();
_root.Cutscene.TC0.text = _root.DungeonInfo.v1;
_root.Cutscene.TC1.text = _root.DungeonInfo.v2;
Symbol 460 MovieClip Frame 35
stop();
Symbol 460 MovieClip Frame 47
stop();
Symbol 460 MovieClip Frame 49
stop();
Symbol 460 MovieClip Frame 51
stop();
Symbol 460 MovieClip Frame 52
stop();
Symbol 460 MovieClip Frame 53
stop();
Symbol 460 MovieClip Frame 54
stop();
Symbol 460 MovieClip Frame 55
stop();
Symbol 460 MovieClip Frame 56
stop();
Symbol 460 MovieClip Frame 76
stop();
Symbol 464 Button
on (release) {
if (_root.Focus == "TrapPlacing") {
_root.PLACE_NEW_TRAP();
} else if (_root.Focus == "UpgradeTraps") {
_root.SHOW_UPGRADE_TRAP();
} else if (((((((((_root.Focus != "MonsterPlacing") && (_root.Focus != "TreasurePlacing")) && (_root.Focus != "Shop")) && (_root.Focus != "MonsterDetail")) && (_root.Focus != "TrapDetail")) && (_root.Focus != "Cutscene")) && (_root.Focus != "Raid")) && (_root.Focus != "DragCreatures")) && (_root.Focus != "DraggingMonster")) {
_root.SHOW_TRAP_INFO();
}
}
on (rollOut) {
removeMovieClip("_root.ItemInfo");
}
Symbol 468 Button
on (release) {
if (_root.Focus == "MonsterPlacing") {
_root.PLACE_NEW_MONSTER();
} else if (_root.Focus == "DragCreatures") {
_root.DRAG_MONSTER();
} else if (_root.Focus == "DraggingMonster") {
_root.Interface.MonsterQuickDisplay.gotoAndStop("Off");
_root.UNDRAG_MONSTER();
} else if (((((((_root.Focus != "TrapPlacing") && (_root.Focus != "TreasurePlacing")) && (_root.Focus != "Shop")) && (_root.Focus != "MonsterDetail")) && (_root.Focus != "TrapDetail")) && (_root.Focus != "Cutscene")) && (_root.Focus != "Raid")) {
_root.SHOW_MONSTER_INFO();
}
}
on (rollOut) {
if (_root.Focus == "DragCreatures") {
_root.Interface.MonsterQuickDisplay.gotoAndStop("Off");
} else {
removeMovieClip("_root.ItemInfo");
}
}
Symbol 473 Button
on (release) {
if (_root.Focus == "Shop") {
_root.Interface.gotoAndStop("Beastmaster");
_root.Focus = "Beastmaster";
_root.Shop.removeMovieClip();
}
}
Symbol 484 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(0);
}
}
Symbol 485 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(5);
}
}
Symbol 486 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(10);
}
}
Symbol 487 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(15);
}
}
Symbol 492 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(1);
}
}
Symbol 493 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(6);
}
}
Symbol 494 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(11);
}
}
Symbol 495 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(16);
}
}
Symbol 500 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(2);
}
}
Symbol 501 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(7);
}
}
Symbol 502 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(12);
}
}
Symbol 503 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(17);
}
}
Symbol 508 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(3);
}
}
Symbol 509 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(8);
}
}
Symbol 510 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(13);
}
}
Symbol 511 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(18);
}
}
Symbol 516 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(4);
}
}
Symbol 517 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(9);
}
}
Symbol 518 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(14);
}
}
Symbol 519 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_MONSTER_DETAIL(19);
}
}
Symbol 520 MovieClip Frame 1
_root.Shop.PrevBtn._alpha = 0;
_root.Shop.NextBtn._alpha = 100;
_root.Shop.Forbid._alpha = 100;
stop();
Symbol 520 MovieClip Frame 2
_root.Shop.PrevBtn._alpha = 100;
_root.Shop.NextBtn._alpha = 100;
_root.Shop.Forbid._alpha = 100;
stop();
Symbol 520 MovieClip Frame 3
_root.Shop.PrevBtn._alpha = 100;
_root.Shop.NextBtn._alpha = 100;
_root.Shop.Forbid._alpha = 100;
stop();
Symbol 520 MovieClip Frame 4
_root.Shop.PrevBtn._alpha = 100;
_root.Shop.NextBtn._alpha = 100;
_root.Shop.Forbid._alpha = 100;
stop();
Symbol 520 MovieClip Frame 5
_root.Shop.PrevBtn._alpha = 100;
_root.Shop.NextBtn._alpha = 0;
_root.Shop.Forbid._alpha = 0;
stop();
Symbol 522 Button
on (release) {
if (_root.Shop.MonsterList._currentframe < _root.DungeonInfo.v1) {
_root.Shop.MonsterList.nextFrame();
if (_root.Shop.MonsterList._currentframe == _root.DungeonInfo.v1) {
_root.Shop.Forbid.gotoAndStop("On");
}
}
}
Symbol 523 Button
on (release) {
if (_root.Shop.MonsterList._currentframe > 1) {
_root.Shop.MonsterList.prevFrame();
_root.Shop.Forbid.gotoAndStop("Off");
}
}
Symbol 525 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 2
stop();
Symbol 532 Button
on (release) {
_root.CHECK_AVAILABLE_CELLS();
_root.TempTG = Number(_root.Shop.ShopDetail.TG.text);
_root.TempTM16 = Number(_root.Shop.ShopDetail.TM16.text);
if (((_root.AvailableCells > 1) && (_root.Focus == "MonsterDetail")) && (_root.TempTG > _root.TempTM16)) {
_root.BUY_MONSTER();
}
}
Symbol 533 Button
on (release) {
_root.Focus = "Shop";
setProperty("_root.Shop.ShopDetail", _y , "1050");
}
Symbol 565 Button
on (release) {
_root.CHECK_AVAILABLE_CELLS();
_root.TempTG = Number(_root.Shop.ShopDetail.TG.text);
_root.TempTT6 = Number(_root.Shop.ShopDetail.TT6.text);
if (((_root.AvailableCells > 1) && (_root.Focus == "TrapDetail")) && (_root.TempTG > _root.TempTT6)) {
_root.BUY_TRAP();
}
}
Symbol 572 Button
on (release) {
if (((_root.Focus == "TrapDetail") && (_root.Shop.ShopDetail.TTL.text < 9)) && (_root.Shop.ShopDetail.ForbidUp._currentframe == 1)) {
_root.Shop.ShopDetail.TTL.text = Number(_root.Shop.ShopDetail.TTL.text) + 1;
_root.TempTT6a = _root.TempTT5;
_root.TempTT6b = Number(_root.Shop.ShopDetail.TTL.text);
_root.TempTT6 = Math.pow(_root.TempTT6a, 2) * Number(_root.TempTT6b);
_root.Shop.ShopDetail.TT6.text = _root.TempTT6;
_root.UPDATE_TRAP_FORBID("Buy", _root.TrapID, _root.TempTrapClass);
}
}
Symbol 573 Button
on (release) {
if (((_root.Focus == "TrapDetail") && (_root.Shop.ShopDetail.TTL.text > 1)) && (_root.Shop.ShopDetail.ForbidDown._currentframe == 1)) {
_root.Shop.ShopDetail.TTL.text = Number(_root.Shop.ShopDetail.TTL.text) - 1;
_root.TempTT6a = _root.TempTT5;
_root.TempTT6b = Number(_root.Shop.ShopDetail.TTL.text);
_root.TempTT6 = Math.pow(_root.TempTT6a, 2) * Number(_root.TempTT6b);
_root.Shop.ShopDetail.TT6.text = _root.TempTT6;
_root.UPDATE_TRAP_FORBID("Buy", _root.TrapID, _root.TempTrapClass);
}
}
Symbol 575 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 2
stop();
Symbol 579 Button
on (release) {
if (_root.Focus == "Shop") {
_root.Interface.gotoAndStop("Trapmaster");
_root.Focus = "Trapmaster";
_root.Shop.removeMovieClip();
}
}
Symbol 584 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(0);
}
}
Symbol 585 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(2);
}
}
Symbol 586 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(4);
}
}
Symbol 587 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(6);
}
}
Symbol 592 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(1);
}
}
Symbol 593 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(3);
}
}
Symbol 594 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(5);
}
}
Symbol 595 Button
on (release) {
if (_root.Focus == "Shop") {
_root.SHOW_TRAP_DETAIL(7);
}
}
Symbol 596 MovieClip Frame 1
_root.Shop.PrevBtn._alpha = 0;
_root.Shop.NextBtn._alpha = 100;
stop();
Symbol 596 MovieClip Frame 2
_root.Shop.PrevBtn._alpha = 100;
_root.Shop.NextBtn._alpha = 0;
_root.Shop.Forbid._alpha = 0;
stop();
Symbol 597 Button
on (release) {
if (_root.DungeonInfo.v1 > 2) {
_root.Shop.TrapList.nextFrame();
}
}
Symbol 598 Button
on (release) {
if (_root.Shop.TrapList._currentframe > 1) {
_root.Shop.TrapList.prevFrame();
_root.Shop.Forbid.gotoAndStop("Off");
}
}
Symbol 599 MovieClip Frame 1
if (_root.DungeonInfo.v1 < 2) {
_root.Shop.Forbid.gotoAndStop("On");
}
stop();
Symbol 599 MovieClip Frame 2
if (_root.DungeonInfo.v1 < 3) {
_root.Shop.Forbid.gotoAndStop("On");
}
stop();
Symbol 608 MovieClip Frame 1
stop();
Symbol 608 MovieClip Frame 2
_root.CHECK_EXIT();
_root.CHECK_TRAP();
_root.CHECK_TREASURE_CONTACT();
_root.CHECK_MONSTERS_CONTACT();
Symbol 608 MovieClip Frame 4
if (_root.StepOnTheExit == true) {
_root.END_OF_RAID("Hero");
} else if (_root.StepOnATrap == true) {
_root.TRAP_MANAGEMENT();
} else if ((((_root.TreasureN == true) || (_root.TreasureS == true)) || (_root.TreasureW == true)) || (_root.TreasureE == true)) {
_root.GET_TREASURE();
} else if ((((_root.Monster_N == true) || (_root.Monster_S == true)) || (_root.Monster_E == true)) || (_root.Monster_W == true)) {
_root.ATTACK_MONSTER();
} else {
_root.MOVE_HERO();
}
Symbol 612 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 1
stop();
Symbol 618 Button
on (release) {
if (_root.DungeonInfo.v0 > Number(_root.TrapUpgrade.TT7.text)) {
_root.UPGRADE_TRAP();
}
}
Symbol 619 Button
on (release) {
_root.Focus = "UpgradeTraps";
removeMovieClip("_root.TrapUpgrade");
}
Symbol 625 Button
on (release) {
if (((_root.Focus == "UpgradingTrap") && (_root.TrapUpgrade.TT6.text < 9)) && (_root.TrapUpgrade.ForbidUp._currentframe == 1)) {
_root.TrapUpgrade.TT6.text = Number(_root.TrapUpgrade.TT6.text) + 1;
_root.TempTT7a = _root.TempTT5;
_root.TempTT7b = Number(_root.TrapUpgrade.TT6.text);
_root.TempTT7 = (Math.pow(_root.TempTT7a, 2) * Number(_root.TempTT7b)) - _root.PlacedTraps[_root.TrapID][7];
_root.TrapUpgrade.TT7.text = _root.TempTT7;
_root.UPDATE_TRAP_FORBID("Upgrade", _root.TrapID, _root.PlacedTraps[_root.TrapID][3]);
}
}
Symbol 626 Button
on (release) {
if (((_root.Focus == "UpgradingTrap") && (_root.TrapUpgrade.TT6.text > _root.PlacedTraps[_root.TrapID][6])) && (_root.TrapUpgrade.ForbidDown._currentframe == 1)) {
_root.TrapUpgrade.TT6.text = Number(_root.TrapUpgrade.TT6.text) - 1;
_root.TempTT7a = _root.TempTT5;
_root.TempTT7b = Number(_root.TrapUpgrade.TT6.text);
_root.TempTT7 = (Math.pow(_root.TempTT7a, 2) * Number(_root.TempTT7b)) - _root.PlacedTraps[_root.TrapID][7];
_root.TrapUpgrade.TT7.text = _root.TempTT7;
_root.UPDATE_TRAP_FORBID("Upgrade", _root.TrapID, _root.PlacedTraps[_root.TrapID][3]);
}
}
Symbol 628 MovieClip Frame 1
stop();
Symbol 630 MovieClip Frame 1
stop();
Symbol 630 MovieClip Frame 2
_root.Piccone.gotoAndPlay(2);
Symbol 633 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 22
stop();
Symbol 637 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 23
stop();
Symbol 662 MovieClip Frame 1
stop();
Symbol 662 MovieClip Frame 2
play();
Symbol 662 MovieClip Frame 10
gotoAndStop (1);
Symbol 662 MovieClip Frame 11
play();
Symbol 662 MovieClip Frame 20
gotoAndStop (1);
Symbol 662 MovieClip Frame 21
play();
Symbol 662 MovieClip Frame 30
gotoAndPlay (1);
Symbol 662 MovieClip Frame 31
play();
Symbol 662 MovieClip Frame 40
gotoAndStop (1);
Symbol 662 MovieClip Frame 41
play();
Symbol 662 MovieClip Frame 50
gotoAndStop (1);
Symbol 662 MovieClip Frame 51
play();
Symbol 662 MovieClip Frame 60
gotoAndStop (1);
Symbol 662 MovieClip Frame 61
play();
Symbol 662 MovieClip Frame 70
gotoAndStop (1);
Symbol 674 MovieClip Frame 1
_root.TurnTimer.gotoAndStop("StopTimer");
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("HN");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 14
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 18
if (_root.HeroAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.MonsterHitSquare.gotoAndPlay("On");
_root.PlacedMonsters[_root.TempMonsterID][17] = _root.PlacedMonsters[_root.TempMonsterID][17] - _root.ActualDamage;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
if (_root.PlacedMonsters[_root.TempMonsterID][17] <= 0) {
_root.PlacedMonsters[_root.TempMonsterID][17] = 0;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(1);
_root.RaidEvent.MonsterXclip.gotoAndPlay(2);
_root.DELETE_MONSTER(_root.TempMonsterID);
}
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 24
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 38
stop();
_root.Focus = "Raid";
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
removeMovieClip("_root.RaidEvent");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 39
_root.TurnTimer.gotoAndStop("StopTimer");
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("HS");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 52
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 56
if (_root.HeroAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.MonsterHitSquare.gotoAndPlay("On");
_root.PlacedMonsters[_root.TempMonsterID][17] = _root.PlacedMonsters[_root.TempMonsterID][17] - _root.ActualDamage;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
if (_root.PlacedMonsters[_root.TempMonsterID][17] <= 0) {
_root.PlacedMonsters[_root.TempMonsterID][17] = 0;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(1);
_root.RaidEvent.MonsterXclip.gotoAndPlay(2);
_root.DELETE_MONSTER(_root.TempMonsterID);
}
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 62
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 76
stop();
_root.Focus = "Raid";
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
removeMovieClip("_root.RaidEvent");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 77
_root.TurnTimer.gotoAndStop("StopTimer");
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("HW");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Hero0.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 90
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 94
if (_root.HeroAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.MonsterHitSquare.gotoAndPlay("On");
_root.PlacedMonsters[_root.TempMonsterID][17] = _root.PlacedMonsters[_root.TempMonsterID][17] - _root.ActualDamage;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
if (_root.PlacedMonsters[_root.TempMonsterID][17] <= 0) {
_root.PlacedMonsters[_root.TempMonsterID][17] = 0;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(1);
_root.RaidEvent.MonsterXclip.gotoAndPlay(2);
_root.DELETE_MONSTER(_root.TempMonsterID);
}
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 100
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 114
stop();
_root.Focus = "Raid";
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
removeMovieClip("_root.RaidEvent");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 115
_root.TurnTimer.gotoAndStop("StopTimer");
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("HE");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Hero0.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 128
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 132
if (_root.HeroAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.MonsterHitSquare.gotoAndPlay("On");
_root.PlacedMonsters[_root.TempMonsterID][17] = _root.PlacedMonsters[_root.TempMonsterID][17] - _root.ActualDamage;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
if (_root.PlacedMonsters[_root.TempMonsterID][17] <= 0) {
_root.PlacedMonsters[_root.TempMonsterID][17] = 0;
_root.RaidEvent.MonsterLifeBar.gotoAndStop(1);
_root.RaidEvent.MonsterXclip.gotoAndPlay(2);
_root.DELETE_MONSTER(_root.TempMonsterID);
}
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 138
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 152
stop();
_root.Focus = "Raid";
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
removeMovieClip("_root.RaidEvent");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 153
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("MN");
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Monster0.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 166
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 170
if (_root.MonsterAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroLifeBar.gotoAndStop(1);
_root.Interface.HeroLifeBar.gotoAndStop(1);
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 176
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 190
stop();
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 191
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("MS");
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Monster0.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 204
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 208
if (_root.MonsterAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroLifeBar.gotoAndStop(1);
_root.Interface.HeroLifeBar.gotoAndStop(1);
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 214
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 228
stop();
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 229
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("MW");
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Monster0.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 242
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 246
if (_root.MonsterAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroLifeBar.gotoAndStop(1);
_root.Interface.HeroLifeBar.gotoAndStop(1);
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 252
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 266
stop();
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 267
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.RaidEvent.TM3.text = _root.PlacedMonsters[_root.TempMonsterID][3];
_root.RaidEvent.TM1.text = _root.PlacedMonsters[_root.TempMonsterID][1];
_root.HeroPointer.AttackDirection.gotoAndPlay("ME");
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Monster0.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 280
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 284
if (_root.MonsterAttackOutcome == "Miss") {
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.MonsterLifeBar.gotoAndStop(Math.round((_root.PlacedMonsters[_root.TempMonsterID][17] / _root.PlacedMonsters[_root.TempMonsterID][4]) * 100) + 1);
_root.RaidEvent.Effects.gotoAndPlay("Miss");
} else {
_root.RaidEvent.Effects.gotoAndPlay(_root.AttackType);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroLifeBar.gotoAndStop(1);
_root.Interface.HeroLifeBar.gotoAndStop(1);
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 290
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
Symbol 674 MovieClip Frame 304
stop();
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Monster1.gotoAndStop(_root.MonsterFrame);
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 305
_root.RaidEvent.Hero0.gotoAndStop(Number(_root.Hero[27]));
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 318
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 325
if (_root.PlacedTraps[_root.TrapID][9] == "Sprung") {
_root.RaidEvent.Effects.gotoAndPlay(_root.PlacedTraps[_root.TrapID][2]);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
} else if (Math.floor(Math.random() * 100) < 20) {
_root.RaidEvent.Effects.gotoAndPlay("Broken");
_root.BREAK_TRAP(_root.TrapID);
} else {
_root.RaidEvent.Effects.gotoAndPlay("Disarmed");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 347
stop();
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.Focus = "Raid";
setProperty("_root.Trap" + _root.TrapID, _alpha , "10");
if (_root.PlacedTraps[_root.TrapID][9] == "Broken") {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 0;
} else {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 7;
}
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 348
_root.RaidEvent.Hero0.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 356
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 363
if (_root.PlacedTraps[_root.TrapID][9] == "Sprung") {
_root.RaidEvent.Effects.gotoAndPlay(_root.PlacedTraps[_root.TrapID][2]);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
} else if (Math.floor(Math.random() * 100) < 20) {
_root.RaidEvent.Effects.gotoAndPlay("Broken");
_root.BREAK_TRAP(_root.TrapID);
} else {
_root.RaidEvent.Effects.gotoAndPlay("Disarmed");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 385
stop();
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.Focus = "Raid";
setProperty("_root.Trap" + _root.TrapID, _alpha , "10");
if (_root.PlacedTraps[_root.TrapID][9] == "Broken") {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 0;
} else {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 7;
}
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 386
_root.RaidEvent.Hero0.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 394
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 401
if (_root.PlacedTraps[_root.TrapID][9] == "Sprung") {
_root.RaidEvent.Effects.gotoAndPlay(_root.PlacedTraps[_root.TrapID][2]);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
} else if (Math.floor(Math.random() * 100) < 20) {
_root.RaidEvent.Effects.gotoAndPlay("Broken");
_root.BREAK_TRAP(_root.TrapID);
} else {
_root.RaidEvent.Effects.gotoAndPlay("Disarmed");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 423
stop();
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.Focus = "Raid";
setProperty("_root.Trap" + _root.TrapID, _alpha , "10");
if (_root.PlacedTraps[_root.TrapID][9] == "Broken") {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 0;
} else {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 7;
}
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 424
_root.RaidEvent.Hero0.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.RaidEvent.TH0.text = _root.Hero[0];
_root.RaidEvent.TH1.text = _root.Hero[27];
_root.HeroPointer.AttackDirection.gotoAndStop("Empty");
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);
Symbol 674 MovieClip Frame 432
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 439
if (_root.PlacedTraps[_root.TrapID][9] == "Sprung") {
_root.RaidEvent.Effects.gotoAndPlay(_root.PlacedTraps[_root.TrapID][2]);
_root.RaidEvent.HeroHitSquare.gotoAndPlay("On");
_root.Hero[2] = _root.Hero[2] - _root.ActualDamage;
if (_root.Hero[2] <= 0) {
_root.Hero[2] = 0;
_root.RaidEvent.HeroXclip.gotoAndPlay(2);
}
_root.RaidEvent.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
_root.Interface.HeroLifeBar.gotoAndStop(Math.round((_root.Hero[2] / _root.Hero[26]) * 100) + 1);
} else if (Math.floor(Math.random() * 100) < 20) {
_root.RaidEvent.Effects.gotoAndPlay("Broken");
_root.BREAK_TRAP(_root.TrapID);
} else {
_root.RaidEvent.Effects.gotoAndPlay("Disarmed");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
Symbol 674 MovieClip Frame 461
stop();
if (_root.Hero[2] < 1) {
_root.Focus = "Debug";
_root.END_OF_RAID("Player");
removeMovieClip("_root.RaidEvent");
} else {
_root.Focus = "Raid";
setProperty("_root.Trap" + _root.TrapID, _alpha , "10");
if (_root.PlacedTraps[_root.TrapID][9] == "Broken") {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 0;
} else {
_root.Map[_root.Hero[21]][_root.Hero[22]] = 7;
}
_root.TempMonsterCounter = 0;
_root.NEXT_MONSTER_AI(_root.TempMonsterCounter);
removeMovieClip("_root.RaidEvent");
}
_root.RaidEvent.Hero1.gotoAndStop(_root.Hero[27]);
_root.RaidEvent.Trap1.gotoAndStop(_root.PlacedTraps[_root.TrapID][0] + 1);