Frame 1
function SWFLoader(destination) {
chargement.loadingBar_mc.gotoAndStop(1);
chargement.perc.text = "0 %";
_global.Chess.onEnterFrame = function () {
var _local2 = destination.getBytesTotal();
var _local3 = destination.getBytesLoaded();
if ((_local3 == 0) || (_local2 == 0)) {
percent = 0;
chargement.perc.text = percent + " %";
chargement.loadingBar_mc.gotoAndStop(percent);
} else {
percent = Math.round((_local3 / _local2) * 100);
chargement.perc.text = percent + " %";
chargement.loadingBar_mc.gotoAndStop(percent);
if (percent != 100) {
} else {
chargement.gotoAndPlay("Close");
delete _global.Chess.onEnterFrame;
}
}
};
}
stop();
_focusrect = false;
_global.Chess = this;
SWFLoader(this);
Frame 7
AmbienceChess.playSnd();
_global.Muted = false;
_focusrect = false;
var sItem = "ALL";
panel1_mc.tabEnabled = false;
titre_txt.text = "Echec et Spies";
var chessRoot = this;
var nArcadeLevel = 0;
var bHasWinArcade = false;
stop();
var mouseListener = new Object();
mouseListener.onMouseMove = function () {
flecheCurseur._x = _xmouse;
flecheCurseur._y = _ymouse;
};
Mouse.hide();
Mouse.addListener(mouseListener);
Frame 12
_focusrect = false;
sound_mc.tabEnabled = false;
quit_mc.tabEnabled = false;
play();
Instance of Symbol 1197 MovieClip "info" in Frame 12
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 82 MovieClip "quit_mc" in Frame 12
onClipEvent (load) {
onPressFct = function () {
_parent.ZeGame.KillGame();
delete _parent.ZeGame;
_global.Chess.fx.playSnd("blink6");
_parent.gotoAndStop("Play");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}
Frame 13
stop();
_focusrect = false;
_quality = "MEDIUM";
playerFocus.gotoAndStop("player2");
createGamePlay = new LoadVars();
resultat = new LoadVars();
createGamePlay.createGameURL = _root.createGameURL_;
createGamePlay.language = _root.language_;
createGamePlay.user = _root.user_;
createGamePlay.gameID = _root.gameID_;
createGamePlay.userName = _root.userName_;
createGamePlay.sendAndLoad(createGamePlay.createGameURL, resultat, "GET");
var ZeGame = new Game(nArcadeLevel, 25, grille_mc, chessRoot, sItem);
Frame 18
delete ZeGame;
stop();
Symbol 39 MovieClip Frame 41
stop();
Symbol 39 MovieClip Frame 42
play();
Symbol 39 MovieClip Frame 50
stop();
_parent.gotoAndStop("Play");
Symbol 1231 MovieClip [__Packages.Game] Frame 0
class Game
{
var sItem, nDelayPerTurn, mcMapRef, nStageX, nStageY, aPlayer1List, aPlayer2List, aPlayer1DeadList, aPlayer2DeadList, aCurrentPlayerList, aPlayerImmunity, aItemList, aFreezeList, aPlayerFlash, aFlashedCPU, nLevel, bItemInUse, nCurrentItem, nMaxItem, nTurnCounter, nExtraTurn, nTurnCount, nPopupInterval_ID, aLastSelection, bPlayer1Active, bCloudAnim, chessRoot, nMoveInterval_ID, theCloud, nTimeLimitInterval_ID, Chess_AI, nOldCRC, bMultiplayer, aCurrentEnnemyList, mcLastFocus;
function Game (_nLevel, _nDelayPerTurn, _mcMapRef, _chessRoot, _sItem) {
sItem = _sItem;
nDelayPerTurn = _nDelayPerTurn;
mcMapRef = _mcMapRef;
nStageX = 8;
nStageY = 8;
aPlayer1List = new Array();
aPlayer2List = new Array();
aPlayer1DeadList = new Array();
aPlayer2DeadList = new Array();
aCurrentPlayerList = new Array();
aPlayerImmunity = new Array();
aItemList = new Array();
aFreezeList = new Array();
aPlayerFlash = new Array();
aFlashedCPU = new Array();
nLevel = _nLevel;
bItemInUse = false;
nCurrentItem = -1;
nMaxItem = 4;
nTurnCounter = 1;
nExtraTurn = 0;
nTurnCount = 0;
nPopupInterval_ID = 0;
aLastSelection = new Array();
bPlayer1Active = true;
bCloudAnim = false;
chessRoot = _chessRoot;
chessRoot.Score_Manager.Clear();
chessRoot.Score_Manager.Set_New_Level(nLevel);
Init_Map();
Init_Cloud();
nLevel = _nLevel;
Init_Player();
Init_Arcade_Mode();
}
function Init_Player() {
var _local5 = new Avatar(mcMapRef.fig00, "roi", mcMapRef.c_7_3, 0 + nMaxItem, this, 1, 1);
var _local4 = new Avatar(mcMapRef.fig01, "tour", mcMapRef.c_7_4, 1 + nMaxItem, this, 1, 1);
var _local3 = new Avatar(mcMapRef.fig02, "fou", mcMapRef.c_6_4, 2 + nMaxItem, this, 1, 1);
var _local9 = new Avatar(mcMapRef.fig03, "fou", mcMapRef.c_6_3, 3 + nMaxItem, this, 1, 1);
aPlayer1List.push(_local5);
aPlayer1List.push(_local4);
aPlayer1List.push(_local3);
aPlayer1List.push(_local9);
var _local8 = new Avatar(mcMapRef.fig04, "tour", mcMapRef.c_0_3, 4 + nMaxItem, this, 2, 1);
var _local7 = new Avatar(mcMapRef.fig05, "fou", mcMapRef.c_1_3, 5 + nMaxItem, this, 2, 1);
var _local6 = new Avatar(mcMapRef.fig06, "fou", mcMapRef.c_1_4, 6 + nMaxItem, this, 2, 1);
mcMapRef.c_0_3.bIsEnnemy = true;
mcMapRef.c_1_3.bIsEnnemy = true;
mcMapRef.c_1_4.bIsEnnemy = true;
aPlayer2List.push(_local8);
aPlayer2List.push(_local7);
aPlayer2List.push(_local6);
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
aPlayer1List[_local2].Refresh_Depth();
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2List.length) {
aPlayer2List[_local2].Refresh_Depth();
_local2++;
}
nMoveInterval_ID = setInterval(this, "Do_Avatar_Anim", 50);
}
function Init_Cloud() {
theCloud = new Cloud(mcMapRef, mcMapRef.nuage_mc, this);
}
function Init_Arcade_Mode() {
bPlayer1Active = true;
aCurrentPlayerList = aPlayer1List;
chessRoot.level_txt.text = nLevel + 1;
chessRoot.time_txt.text = nDelayPerTurn;
nTimeLimitInterval_ID = setInterval(this, "Time_Check", 1000);
Cast_Items_First_Time();
Add_Pion();
Chess_AI = new AI(this, mcMapRef, aPlayer2List, aPlayer1List, aItemList);
nOldCRC = Get_Game_CRC();
}
function Add_Pion() {
var _local5 = 6;
var _local3 = 0;
while (_local3 < nLevel) {
var _local2 = String("fig" + (_local5 + _local3));
var _local6 = mcMapRef.attachMovie("Pion", _local2, 51000 + _local3);
mcMapRef[_local2].nHair = random(7) + 1;
mcMapRef[_local2].nBody = _local3;
mcMapRef[_local2].gotoAndStop("Reset");
var _local4 = new Avatar(mcMapRef[_local2], "pion", Get_Pion_Spawn_Place(), (_local5 + _local3) + nMaxItem, this, 2, 1);
_local4.mcAvatar.gotoAndStop(_local3);
aPlayer2List.push(_local4);
_local3++;
}
_local3 = 0;
while (_local3 < aPlayer2List.length) {
aPlayer2List[_local3].Refresh_Depth();
_local3++;
}
}
function Get_Pion_Spawn_Place() {
var _local4;
var _local2;
_local4 = ["c_0_3", "c_0_4", "c_1_3", "c_1_4", "c_0_2", "c_0_5", "c_1_2", "c_1_5", "c_0_1", "c_0_6", "c_1_1", "c_1_6", "c_0_0", "c_0_7", "c_1_0", "c_1_7", "c_2_3", "c_2_4"];
var _local3 = 0;
while (_local3 < _local4.length) {
_local2 = mcMapRef[_local4[_local3]];
if ((_local2.sAvatar_ID == "vide") && (_local2.nItem_ID == -1)) {
_local2.bIsEnnemy = true;
return(_local2);
}
_local3++;
}
}
function Cast_Items_First_Time() {
var _local3 = new Item(mcMapRef.c_2_6, 1, this, mcMapRef);
var _local2 = new Item(mcMapRef.c_1_1, 2, this, mcMapRef);
var _local5 = new Item(mcMapRef.c_5_6, 3, this, mcMapRef);
var _local4 = new Item(mcMapRef.c_6_1, 4, this, mcMapRef);
aItemList.push(_local3, _local2, _local5, _local4);
}
function Get_Total_Avatar() {
return(Avatar.nTotalAvatar);
}
function Kill_Avatar(_avatar) {
var _local4 = false;
var _local3 = 0;
while (_local3 < aPlayer1List.length) {
if (aPlayer1List[_local3] == _avatar) {
_avatar.mcAvatar._x = 170 + (aPlayer1DeadList.length * 50);
_avatar.mcAvatar._y = 135;
_local4 = true;
aPlayer1DeadList.push(_avatar);
aPlayer1List.splice(_local3, 1);
break;
}
_local3++;
}
if (_local4 == false) {
_local3 = 0;
while (_local3 < aPlayer2List.length) {
if (aPlayer2List[_local3] == _avatar) {
_avatar.mcAvatar._x = 140 + (aPlayer2DeadList.length * 50);
_avatar.mcAvatar._y = 500;
_avatar.mcAvatar.gotoAndStop("dead");
_local4 = true;
aPlayer2DeadList.push(aPlayer2List[_local3]);
aPlayer2List.splice(_local3, 1);
break;
}
_local3++;
}
if (_local4 == false) {
_local3 = 0;
while (_local3 < aFreezeList.length) {
if (aFreezeList[_local3] == _avatar) {
if (aFreezeList[_local3].Get_Team() == 1) {
_avatar.mcAvatar._x = 170 + (aPlayer1DeadList.length * 50);
_avatar.mcAvatar._y = 135;
aPlayer1DeadList.push(_avatar);
aFreezeList.splice(_local3, 1);
break;
}
_avatar.mcAvatar._x = 140 + (aPlayer2DeadList.length * 50);
_avatar.mcAvatar._y = 500;
aPlayer2DeadList.push(_avatar);
aFreezeList.splice(_local3, 1);
break;
}
_local3++;
}
}
}
if (_local4) {
_avatar.Refresh_Depth();
_avatar.Refresh_Scale();
}
}
function Revive_Avatar(_avatar) {
var _local3 = false;
var _local2 = 0;
while (_local2 < aPlayer1DeadList.length) {
if (aPlayer1DeadList[_local2] == _avatar) {
_local3 = true;
aPlayer1List.push(aPlayer1DeadList[_local2]);
aPlayer1DeadList.splice(_local2, 1);
break;
}
_local2++;
}
if (_local3 == false) {
_local2 = 0;
while (_local2 < aPlayer2DeadList.length) {
if (aPlayer2DeadList[_local2] == _avatar) {
_local3 = true;
aPlayer2List.push(aPlayer2DeadList[_local2]);
aPlayer2DeadList.splice(_local2, 1);
break;
}
_local2++;
}
}
}
function Cast_Items() {
var _local4 = 0;
while (_local4 < aItemList.length) {
aItemList[_local4].Delete_Item();
_local4++;
}
aItemList = [];
_local4 = 0;
while (_local4 < aPlayerImmunity.length) {
aPlayerImmunity[_local4].bIsInvincible = false;
aPlayerImmunity[_local4].unFreeze("Idle");
_local4++;
}
aPlayerImmunity = [];
var _local2 = 0;
var _local6 = 0;
nCurrentItem = -1;
bItemInUse = false;
do {
var _local3;
var _local5;
_local6++;
if (bMultiplayer) {
_local3 = chessRoot.randRange(0, 7, (nTurnCounter + _local2) + _local6);
_local5 = chessRoot.randRange(0, 7, ((nTurnCounter + _local2) + _local6) + 50);
} else {
_local3 = random(8);
_local5 = random(8);
}
if (mcMapRef[(("c_" + _local3) + "_") + _local5].bIsWhite) {
if (mcMapRef[(("c_" + _local3) + "_") + _local5].sAvatar_ID == "vide") {
if (mcMapRef[(("c_" + _local3) + "_") + _local5].nItem_ID == -1) {
_local2++;
var _local7 = new Item(mcMapRef[(("c_" + _local3) + "_") + _local5], _local2, this, mcMapRef);
aItemList.push(_local7);
}
}
}
} while (aItemList.length < 2);
do {
_local6++;
_local3 = random(8);
_local5 = random(8);
if (mcMapRef[(("c_" + _local3) + "_") + _local5].bIsWhite == false) {
if (mcMapRef[(("c_" + _local3) + "_") + _local5].sAvatar_ID == "vide") {
if (mcMapRef[(("c_" + _local3) + "_") + _local5].nItem_ID == -1) {
_local2++;
var _local7 = new Item(mcMapRef[(("c_" + _local3) + "_") + _local5], _local2, this, mcMapRef);
aItemList.push(_local7);
}
}
}
} while (aItemList.length < 4);
}
function Time_Check() {
nTurnCount = nTurnCount + 1;
chessRoot.time_txt.text = nDelayPerTurn - nTurnCount;
var _local4 = chessRoot.time_txt.text;
switch (_local4) {
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
_global.Chess.fx.playSnd("alert");
break;
}
if (nTurnCount == nDelayPerTurn) {
nTurnCount = 0;
clearInterval(nTimeLimitInterval_ID);
var _local3 = Get_Game_CRC();
if (nOldCRC == _local3) {
Switch_Turn();
}
}
}
function GameOver(_bWin) {
var _local2 = this;
clearInterval(nPopupInterval_ID);
if (_bWin) {
if (chessRoot.nArcadeLevel < 10) {
chessRoot.nArcadeLevel++;
}
chessRoot.bHasWinArcade = true;
chessRoot.popup_score.gotoAndStop("win");
} else {
chessRoot.popup_score.gotoAndStop("lose");
chessRoot.bHasWinArcade = false;
}
KillGame();
chessRoot.gotoAndStop("Restart");
}
function KillGame() {
clearInterval(nTimeLimitInterval_ID);
clearInterval(nMoveInterval_ID);
clearInterval(nPopupInterval_ID);
Chess_AI.Kill_AI();
theCloud.Remove_Instance();
delete theCloud;
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
aPlayer1List[_local2].Remove_Instance();
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2List.length) {
aPlayer2List[_local2].Remove_Instance();
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer1DeadList.length) {
aPlayer1DeadList[_local2].Remove_Instance();
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2DeadList.length) {
aPlayer2DeadList[_local2].Remove_Instance();
_local2++;
}
_local2 = 0;
while (_local2 < aItemList.length) {
aItemList[_local2].Delete_Item();
_local2++;
}
delete aPlayer1List;
delete aPlayer2List;
delete aPlayer1DeadList;
delete aPlayer2DeadList;
delete aCurrentPlayerList;
delete aCurrentEnnemyList;
delete aPlayerImmunity;
delete aItemList;
delete aFreezeList;
delete aPlayerFlash;
delete aFlashedCPU;
}
function Get_Game_CRC() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
_local3 = _local3 + ((aPlayer1List[_local2].Get_Pos().posX * 10) + aPlayer1List[_local2].Get_Pos().posY);
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2List.length) {
_local3 = _local3 + ((aPlayer2List[_local2].Get_Pos().posX * 10) + aPlayer2List[_local2].Get_Pos().posY);
_local2++;
}
_local2 = 0;
while (_local2 < aFlashedCPU.length) {
_local3 = _local3 + ((aFlashedCPU[_local2].Get_Pos().posX * 10) + aFlashedCPU[_local2].Get_Pos().posY);
_local2++;
}
_local2 = 0;
while (_local2 < aItemList.length) {
_local3 = _local3 + ((aItemList[_local2].Get_Pos().posX / 100) + (aItemList[_local2].Get_Pos().posY / 10));
_local2++;
}
return(_local3);
}
function Switch_Turn() {
nOldCRC = Get_Game_CRC();
_global.Chess.fx.playSnd("next_turn");
Reset_Vision();
mcLastFocus = null;
aLastSelection = [];
var _local8 = this;
var _local5 = true;
var _local6 = true;
if (bItemInUse == true) {
aItemList[nCurrentItem - 1].Reset_Vision_Outside();
aItemList[nCurrentItem - 1].Delete_Item();
nCurrentItem = -1;
bItemInUse = false;
}
var _local3 = 0;
while (_local3 < aPlayer1List.length) {
if (aPlayer1List[_local3].Get_IsAlive()) {
_local5 = false;
break;
}
_local3++;
}
_local3 = 0;
while (_local3 < aPlayer2List.length) {
if (aPlayer2List[_local3].Get_IsAlive()) {
_local6 = false;
break;
}
_local3++;
}
_local3 = 0;
while (_local3 < aPlayerFlash.length) {
if ((aPlayerFlash[_local3].nTeam == 1) && (aPlayer1List.length == 1)) {
aPlayerFlash[_local3].nFreezeTurn = aPlayerFlash[_local3].nFreezeTurn - 2;
} else if ((aPlayerFlash[_local3].nTeam == 2) && (aPlayer2List.length == 1)) {
aPlayerFlash[_local3].nFreezeTurn = aPlayerFlash[_local3].nFreezeTurn - 2;
} else {
aPlayerFlash[_local3].nFreezeTurn--;
}
if (aPlayerFlash[_local3].nFreezeTurn == 0) {
var _local4 = aPlayerFlash[_local3].mcAvatar;
aPlayerFlash[_local3].bFlashed = false;
if (_local4.Get_IsAlive()) {
_local4.fCallBack = function () {
this.unFreeze("Idle");
this.fCallBack = null;
};
_local4.unFreeze("Blind_Recover");
}
_local4.bFlashed = false;
aPlayerFlash.splice(_local3, 1);
}
_local3++;
}
if (_local5 || (_local6)) {
clearInterval(nTimeLimitInterval_ID);
chessRoot.Score_Manager.Convert_Average_Turn_Time();
if (_local5) {
nPopupInterval_ID = setInterval(this, "GameOver", 2000, false);
_local3 = 0;
while (_local3 < aPlayer2List.length) {
aPlayer2List[_local3].fCallBack = null;
aPlayer2List[_local3].unFreeze("Win");
_local3++;
}
} else {
chessRoot.Score_Manager.Add_Score("Player_Alive", aPlayer1List.length);
nPopupInterval_ID = setInterval(this, "GameOver", 2000, true);
_local3 = 0;
while (_local3 < aPlayer1List.length) {
aPlayer1List[_local3].fCallBack = null;
aPlayer1List[_local3].unFreeze("Win");
_local3++;
}
}
} else {
if (nExtraTurn > 0) {
nExtraTurn--;
} else {
bPlayer1Active = !bPlayer1Active;
if (bPlayer1Active) {
if (Does_Player_Can_Play(aPlayer1List) == false) {
bPlayer1Active = false;
}
} else if (Does_Player_Can_Play(aPlayer2List) == false) {
bPlayer1Active = true;
}
}
if (bPlayer1Active) {
chessRoot.playerFocus.gotoAndStop("player2");
Unflash_CPU();
aCurrentPlayerList = aPlayer1List;
aCurrentEnnemyList = aPlayer2List;
mcMapRef.blocker_mc.gotoAndStop("off");
} else {
var _local7 = nDelayPerTurn - nTurnCount;
chessRoot.Score_Manager.Add_Turn_Time(_local7);
chessRoot.playerFocus.gotoAndStop("player1");
Flash_CPU();
aCurrentPlayerList = aPlayer2List;
aCurrentEnnemyList = aPlayer1List;
mcMapRef.blocker_mc.gotoAndStop("on");
Chess_AI.Play();
}
clearInterval(nTimeLimitInterval_ID);
nTurnCount = 0;
chessRoot.time_txt.text = nDelayPerTurn - nTurnCount;
nTimeLimitInterval_ID = setInterval(this, "Time_Check", 1000);
nTurnCounter++;
if ((nTurnCounter % 10) == 0) {
Cast_Items();
}
_local3 = 0;
while (_local3 < aFreezeList.length) {
aFreezeList[_local3].nFreezeTurn--;
if (aFreezeList[_local3].nFreezeTurn == 0) {
var _local4 = aFreezeList[_local3].mcAvatar;
_local4.unFreeze("Blind_Recover");
if (_local4.Get_Team() == 1) {
aPlayer1List.push(_local4);
} else {
aPlayer2List.push(_local4);
}
aFreezeList.splice(_local3, 1);
}
_local3++;
}
}
}
function Does_Player_Can_Play(_aPlayerList) {
var _local3 = 0;
var _local2 = _aPlayerList.length;
var _local1 = 0;
while (_local1 < _local2) {
if (_aPlayerList[_local1].bFlashed) {
_local3++;
}
_local1++;
}
if (_local3 == _local2) {
return(false);
}
return(true);
}
function Flash_CPU() {
var _local2 = 0;
while (_local2 < aPlayer2List.length) {
if (aPlayer2List[_local2].bFlashed == true) {
aFlashedCPU.push(aPlayer2List[_local2]);
aPlayer2List.splice(_local2, 1);
}
_local2++;
}
}
function Unflash_CPU() {
var _local2 = 0;
while (_local2 < aFlashedCPU.length) {
aPlayer2List.push(aFlashedCPU[_local2]);
_local2++;
}
aFlashedCPU = [];
}
function Remove_Focus() {
mcLastFocus.filters = [];
mcLastFocus = null;
}
function Flash_Avatar(_mcAvatar, _nFreezeTurn) {
_mcAvatar.fCallBack = null;
if (_mcAvatar.bFlashed == true) {
var _local2 = 0;
while (_local2 < aPlayerFlash.length) {
if (aPlayerFlash[_local2].mcAvatar.Get_ID() == _mcAvatar.Get_ID()) {
aPlayerFlash[_local2].nFreezeTurn = aPlayerFlash[_local2].nFreezeTurn + _nFreezeTurn;
}
_local2++;
}
} else {
_mcAvatar.bFlashed = true;
var _local5 = new Object();
_local5.mcAvatar = _mcAvatar;
_local5.nFreezeTurn = _nFreezeTurn;
aPlayerFlash.push(_local5);
}
}
function Freeze_Avatar(_mcAvatar, _nFreezeTurn) {
var _local5 = new Object();
_local5.mcAvatar = _mcAvatar;
_local5.nFreezeTurn = _nFreezeTurn;
aFreezeList.push(_local5);
var _local3 = false;
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
if (aPlayer1List[_local2].Get_ID() == _mcAvatar.Get_ID()) {
aPlayer1List.splice(_local2, 1);
_local3 = true;
break;
}
_local2++;
}
if (_local3 == false) {
_local2 = 0;
while (_local2 < aPlayer2List.length) {
if (aPlayer2List[_local2].Get_ID() == _mcAvatar.Get_ID()) {
aPlayer2List.splice(_local2, 1);
_local3 = true;
break;
}
_local2++;
}
}
}
function Do_Avatar_Anim() {
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
aPlayer1List[_local2].doMove();
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2List.length) {
aPlayer2List[_local2].doMove();
_local2++;
}
_local2 = 0;
while (_local2 < aFreezeList.length) {
aFreezeList[_local2].mcAvatar.doMove();
_local2++;
}
_local2 = 0;
while (_local2 < aFlashedCPU.length) {
aFlashedCPU[_local2].doMove();
_local2++;
}
if (bCloudAnim) {
theCloud.doAnim();
}
}
function Stop_Avatar_Anim() {
clearInterval(nMoveInterval_ID);
}
function Start_Avatar_Anim() {
clearInterval(nMoveInterval_ID);
nMoveInterval_ID = setInterval(this, "Do_Avatar_Anim", 50);
}
function trace_Info() {
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2List.length) {
_local2++;
}
}
function Init_Map() {
var owner = this;
var _local4 = 0;
while (_local4 < 8) {
var _local3 = 0;
while (_local3 < 8) {
mcMapRef[(("c_" + _local4) + "_") + _local3].onRelease = function () {
owner.Do_Release(owner, this, "in");
_global.Chess.fx.playSnd("click");
owner.chessRoot.info._visible = false;
};
mcMapRef[(("c_" + _local4) + "_") + _local3].onRollOver = function () {
this.bMouseHover = true;
if (this.bPossibleMove == false) {
if (this.bShowEnnemyPath) {
owner.Apply_Effects("Ennemy_Path_Over", [this]);
} else {
owner.Apply_Effects("Nothing_Over", [this]);
}
} else if ((this.bIsEnnemy == true) || (this.bAttackSelection == true)) {
owner.Apply_Effects("Ennemy_Over", [this]);
} else if (this.bHaveFocus == false) {
owner.Apply_Effects("Vision_Over", [this]);
} else {
owner.Apply_Effects("Focus_Over", [this]);
}
if (this.nItem_ID != -1) {
owner.chessRoot.info.txt.text = owner.aItemList[this.nItem_ID - 1].Get_Info();
owner.chessRoot.info._visible = true;
_global.Chess.fx.playSnd("rollover_hit");
} else if (this.sAvatar_ID != "vide") {
owner.chessRoot.info.txt.text = owner.Get_Avatar_From_ID_For_Item(this.sAvatar_ID).Get_Info();
owner.chessRoot.info._visible = true;
_global.Chess.fx.playSnd("rollover_hit");
} else {
_global.Chess.fx.playSnd("rollover");
}
};
mcMapRef[(("c_" + _local4) + "_") + _local3].onRollOut = function () {
this.bMouseHover = false;
if (this.bPossibleMove == false) {
if (this.bShowEnnemyPath) {
owner.Apply_Effects("Ennemy_Path", [this]);
} else {
owner.Apply_Effects("Nothing", [this]);
}
} else if ((this.bIsEnnemy == true) || (this.bAttackSelection == true)) {
if (this.bAttackSelection == true) {
owner.Apply_Effects("Ennemy", [this]);
} else {
owner.Apply_Effects("Nothing", [this]);
}
} else if (this.bHaveFocus == false) {
owner.Apply_Effects("Vision", [this]);
} else {
owner.Apply_Effects("Focus", [this]);
}
owner.chessRoot.info._visible = false;
};
mcMapRef[(("c_" + _local4) + "_") + _local3].onReleaseOutside = function () {
owner.Do_Release(owner, this, "out");
_global.Chess.fx.playSnd("click");
owner.chessRoot.info._visible = false;
};
mcMapRef[(("c_" + _local4) + "_") + _local3].posY = _local3;
mcMapRef[(("c_" + _local4) + "_") + _local3].posX = _local4;
mcMapRef[(("c_" + _local4) + "_") + _local3].sAvatar_ID = "vide";
mcMapRef[(("c_" + _local4) + "_") + _local3].nItem_ID = -1;
mcMapRef[(("c_" + _local4) + "_") + _local3].tabEnabled = false;
mcMapRef[(("c_" + _local4) + "_") + _local3].bIsEnnemy = false;
mcMapRef[(("c_" + _local4) + "_") + _local3].bPossibleMove = false;
mcMapRef[(("c_" + _local4) + "_") + _local3].bHaveFocus = false;
mcMapRef[(("c_" + _local4) + "_") + _local3].bMouseHover = true;
mcMapRef[(("c_" + _local4) + "_") + _local3].bDestinationGlow = false;
mcMapRef[(("c_" + _local4) + "_") + _local3].bAttackSelection = false;
mcMapRef[(("c_" + _local4) + "_") + _local3].bShowEnnemyPath = false;
_local3++;
}
_local4++;
}
Init_Cases_Color();
}
function Get_Index_From_ID(_sTemp_ID, _owner) {
var _local3 = -1;
var _local1 = 0;
while (_local1 < _owner.aPlayer1List.length) {
if (_sTemp_ID == _owner.aPlayer1List[_local1].Get_ID()) {
_local3 = _local1;
break;
}
_local1++;
}
if (_local3 == -1) {
_local1 = 0;
while (_local1 < _owner.aPlayer2List.length) {
if (_sTemp_ID == _owner.aPlayer2List[_local1].Get_ID()) {
_local3 = _local1;
break;
}
_local1++;
}
}
return(_local3);
}
function Get_Avatar_From_ID(_sTemp_ID, _owner) {
var _local2 = 0;
while (_local2 < _owner.aPlayer1List.length) {
if (_sTemp_ID == _owner.aPlayer1List[_local2].Get_ID()) {
return(_owner.aPlayer1List[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < _owner.aPlayer2List.length) {
if (_sTemp_ID == _owner.aPlayer2List[_local2].Get_ID()) {
return(_owner.aPlayer2List[_local2]);
}
_local2++;
}
return(null);
}
function Get_Avatar_From_ID_For_Item(_sTemp_ID) {
var _local2 = 0;
while (_local2 < aPlayer1List.length) {
if (_sTemp_ID == aPlayer1List[_local2].Get_ID()) {
return(aPlayer1List[_local2]);
}
_local2++;
}
_local2 = 0;
while (_local2 < aPlayer2List.length) {
if (_sTemp_ID == aPlayer2List[_local2].Get_ID()) {
return(aPlayer2List[_local2]);
}
_local2++;
}
return(null);
}
function Is_Player_Invincible(_sAvatar_ID) {
var _local2 = 0;
while (_local2 < aPlayerImmunity.length) {
if (aPlayerImmunity[_local2].Get_ID() == _sAvatar_ID) {
return(true);
}
_local2++;
}
return(false);
}
function Remove_Invincibility(_sAvatar_ID) {
var _local2 = 0;
while (_local2 < aPlayerImmunity.length) {
if (_sAvatar_ID == aPlayerImmunity[_local2].Get_ID()) {
aPlayerImmunity[_local2].bIsInvincible = false;
aPlayerImmunity.splice(_local2, 1);
}
_local2++;
}
}
function Do_Release(_owner, _scope, _from) {
var _local8 = _owner.Get_Avatar_From_ID_For_Item(_scope.sAvatar_ID);
if (_owner.bItemInUse == false) {
var _local5 = _owner.Get_Index_From_ID(_scope.sAvatar_ID, _owner);
if ((_local5 != -1) && (_scope.bIsEnnemy == false)) {
if (_local8.bFlashed == false) {
if ((_owner.mcLastFocus == null) || (_local5 != _owner.Get_Index_From_ID(_owner.mcLastFocus.sAvatar_ID, _owner))) {
_scope.bPossibleMove = true;
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_scope.bHaveFocus = true;
_owner.mcLastFocus = _scope;
_owner.Reset_Vision();
_owner.Apply_Effects("Focus_Over", [_scope]);
var _local4 = _owner.Select_Cases(_owner.aCurrentPlayerList[_local5].Get_Type(), _scope);
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].bIsEnnemy == false) {
_owner.Apply_Effects("Vision", [_local4[_local3]]);
} else {
_owner.Apply_Effects("Ennemy", [_local4[_local3]]);
}
_local3++;
}
}
} else if (_owner.aCurrentPlayerList[_local5].Get_ID() == _owner.mcLastFocus.sAvatar_ID) {
}
} else if ((_local5 != -1) && (_scope.bIsEnnemy == true)) {
if (_scope.bAttackSelection == true) {
var _local9 = _owner.Get_Avatar_From_ID(_owner.mcLastFocus.sAvatar_ID, _owner);
var _local7 = _owner.Get_Avatar_From_ID(_scope.sAvatar_ID, _owner);
var nPlayer_Index = _owner.Get_Index_From_ID(_owner.mcLastFocus.sAvatar_ID, _owner);
_local8 = _owner.aCurrentPlayerList[nPlayer_Index];
_owner.theCloud.doSequence_1(_local8, _local7, _scope);
_owner.chessRoot.Score_Manager.Add_Score("Kill", 1);
} else {
_owner.Reset_Vision();
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_owner.mcLastFocus = null;
var _local6 = _owner.Get_Avatar_From_ID_For_Item(_scope.sAvatar_ID);
_owner.aLastSelection = _owner.Chess_AI.Select_Path_Without_Items(_local6.Get_Type(), _scope);
var _local3 = 0;
while (_local3 < _owner.aLastSelection.length) {
_owner.aLastSelection[_local3].bShowEnnemyPath = true;
_local3++;
}
_owner.Apply_Effects("Ennemy_Path", aLastSelection);
}
} else if (_scope.bPossibleMove == true) {
if (_scope.nItem_ID != -1) {
_owner.bItemInUse = true;
_owner.nCurrentItem = _scope.nItem_ID;
var nPlayer_Index = _owner.Get_Index_From_ID(_owner.mcLastFocus.sAvatar_ID, _owner);
if (_owner.aItemList[_scope.nItem_ID - 1].Get_Type() == "Ciseaux") {
clearInterval(_owner.nTimeLimitInterval_ID);
_owner.aCurrentPlayerList[nPlayer_Index].fCallBack = function () {
this.fCallBack = function () {
this.unFreeze("Idle");
_owner.aItemList[_scope.nItem_ID - 1].doCiseaux(_owner.bPlayer1Active);
this.fCallBack = null;
};
this.unFreeze("Ciseaux");
_owner.aItemList[_scope.nItem_ID - 1].mcItem._visible = false;
};
_owner.aCurrentPlayerList[nPlayer_Index].Move_To(_scope);
_owner.bItemInUse = false;
_owner.nCurrentItem = -1;
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_scope.bHaveFocus = false;
_owner.mcLastFocus = null;
} else if (_owner.aItemList[_scope.nItem_ID - 1].Get_Type() == "Bouclier") {
_owner.aCurrentPlayerList[nPlayer_Index].fCallBack = function () {
_owner.aCurrentPlayerList[nPlayer_Index].unFreeze("Bouclier");
_owner.aPlayerImmunity.push(this);
_owner.aCurrentPlayerList[nPlayer_Index].mcAvatar.bouclier.gotoAndStop("On");
_owner.aCurrentPlayerList[nPlayer_Index].bIsInvincible = true;
_owner.aItemList[_scope.nItem_ID - 1].Delete_Item();
_owner.Switch_Turn();
this.fCallBack = null;
};
_owner.chessRoot.Score_Manager.Add_Score("Bouclier", 0);
_owner.aCurrentPlayerList[nPlayer_Index].Move_To(_scope);
_owner.bItemInUse = false;
_owner.nCurrentItem = -1;
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_scope.bHaveFocus = false;
_owner.mcLastFocus = null;
} else if (_owner.aItemList[_scope.nItem_ID - 1].Get_Type() == "Cadran") {
_owner.nExtraTurn = _owner.nExtraTurn + 2;
_owner.aCurrentPlayerList[nPlayer_Index].fCallBack = function () {
_owner.aCurrentPlayerList[nPlayer_Index].unFreeze("Idle");
_global.Chess.fx.playSnd("warp");
_owner.aItemList[_scope.nItem_ID - 1].Delete_Item();
_owner.Switch_Turn();
this.fCallBack = null;
};
_owner.chessRoot.Score_Manager.Add_Score("Cadran", 0);
_owner.aCurrentPlayerList[nPlayer_Index].Move_To(_scope);
_owner.bItemInUse = false;
_owner.nCurrentItem = -1;
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_scope.bHaveFocus = false;
_owner.mcLastFocus = null;
} else {
_owner.aCurrentPlayerList[nPlayer_Index].fCallBack = function () {
this.unFreeze("Idle");
if (_owner.aItemList[_scope.nItem_ID - 1].Show_Possible_Move() == true) {
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_scope.bHaveFocus = true;
_owner.mcLastFocus = _scope;
_owner.Apply_Effects("Focus", [_scope]);
this.fCallBack = null;
} else {
_owner.chessRoot.Score_Manager.Add_Score(_owner.aItemList[_scope.nItem_ID - 1].Get_Type(), 0);
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_scope.bHaveFocus = false;
_owner.mcLastFocus = null;
_owner.aItemList[_scope.nItem_ID - 1].Delete_Item();
_owner.Switch_Turn();
this.fCallBack = null;
}
};
_owner.aCurrentPlayerList[nPlayer_Index].Move_To(_scope);
}
} else {
var nPlayer_Index = _owner.Get_Index_From_ID(_owner.mcLastFocus.sAvatar_ID, _owner);
_owner.aCurrentPlayerList[nPlayer_Index].fCallBack = function () {
this.unFreeze("Idle");
_owner.Switch_Turn();
};
_owner.aCurrentPlayerList[nPlayer_Index].bIsReady = true;
_owner.aCurrentPlayerList[nPlayer_Index].Move_To(_scope);
_owner.bHaveFocus = false;
_owner.mcLastFocus = null;
_scope.bDestinationGlow = true;
_owner.Apply_Effects("Destination", [_scope]);
}
_owner.Reset_Vision();
} else if ((_scope.sAvatar_ID == "vide") && (_scope.bPossibleMove == false)) {
if (_scope.bShowEnnemyPath) {
if (_from == "out") {
_owner.Apply_Effects("Ennemy_Path", [_scope]);
} else {
_owner.Apply_Effects("Ennemy_Path_Over", [_scope]);
}
} else if (_from == "out") {
_owner.Apply_Effects("Nothing", [_scope]);
} else {
_owner.Apply_Effects("Nothing_Over", [_scope]);
}
}
} else if (_scope.bAttackSelection == true) {
clearInterval(_owner.nTimeLimitInterval_ID);
var _local9 = _owner.Get_Avatar_From_ID(_owner.mcLastFocus.sAvatar_ID, _owner);
var _local7 = _owner.Get_Avatar_From_ID(_scope.sAvatar_ID, _owner);
_owner.aItemList[_owner.mcLastFocus.nItem_ID - 1].Do_Action(_local9, [_local7], _scope);
_owner.aItemList[_owner.mcLastFocus.nItem_ID - 1].Delete_Item();
_owner.bItemInUse = false;
_owner.mcLastFocus.bHaveFocus = false;
_owner.mcLastFocus.filters = [];
_owner.mcLastFocus = null;
}
}
function Get_Effect_Name(_mcRef) {
return("");
}
function Reset_Vision() {
var _local2 = 0;
while (_local2 < aLastSelection.length) {
aLastSelection[_local2].bPossibleMove = false;
aLastSelection[_local2].bAttackSelection = false;
aLastSelection[_local2].bDestinationGlow = false;
aLastSelection[_local2].bHaveFocus = false;
aLastSelection[_local2].bShowEnnemyPath = false;
aLastSelection[_local2].filters = null;
_local2++;
}
aLastSelection = [];
}
function Select_Cases(_piece, _pos) {
_pos.bPossibleMove = true;
aLastSelection.push(_pos);
switch (_piece) {
case "tour" :
var _local10 = _pos.posX;
var _local9 = _pos.posY;
var _local8 = _pos.posX + 1;
while (_local8 < nStageX) {
var _local6 = mcMapRef[(("c_" + _local8) + "_") + _local9];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
_local8++;
}
_local8 = _pos.posX - 1;
while (_local8 >= 0) {
var _local6 = mcMapRef[(("c_" + _local8) + "_") + _local9];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
_local8--;
}
var _local7 = _pos.posY + 1;
while (_local7 < nStageY) {
var _local6 = mcMapRef[(("c_" + _local10) + "_") + _local7];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
_local7++;
}
_local7 = _pos.posY - 1;
while (_local7 >= 0) {
var _local6 = mcMapRef[(("c_" + _local10) + "_") + _local7];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
_local7--;
}
break;
case "fou" :
var _local4 = _pos.posX + 1;
var _local3 = _pos.posY + 1;
while ((_local4 < nStageX) && (_local3 < nStageY)) {
var _local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4++;
_local3++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
}
_local4 = _pos.posX - 1;
_local3 = _pos.posY - 1;
while ((_local4 >= 0) && (_local3 >= 0)) {
var _local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4--;
_local3--;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
}
_local4 = _pos.posX - 1;
_local3 = _pos.posY + 1;
while ((_local4 >= 0) && (_local3 < nStageY)) {
var _local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4--;
_local3++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
}
_local4 = _pos.posX + 1;
_local3 = _pos.posY - 1;
while ((_local4 < nStageX) && (_local3 >= 0)) {
var _local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4++;
_local3--;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
}
break;
case "roi" :
_local4 = _pos.posX + 1;
_local3 = _pos.posY + 1;
var _local2 = 0;
do {
if (!((_local4 < nStageX) && (_local3 < nStageY))) {
break;
}
var _local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4++;
_local3++;
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
} while (_local2 != 2);
_local4 = _pos.posX - 1;
_local3 = _pos.posY - 1;
_local2 = 0;
do {
if (!((_local4 >= 0) && (_local3 >= 0))) {
break;
}
_local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4--;
_local3--;
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
} while (_local2 != 2);
_local4 = _pos.posX - 1;
_local3 = _pos.posY + 1;
_local2 = 0;
do {
if (!((_local4 >= 0) && (_local3 < nStageY))) {
break;
}
_local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4--;
_local3++;
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
} while (_local2 != 2);
_local4 = _pos.posX + 1;
_local3 = _pos.posY - 1;
_local2 = 0;
do {
if (!((_local4 < nStageX) && (_local3 >= 0))) {
break;
}
_local6 = mcMapRef[(("c_" + _local4) + "_") + _local3];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local4++;
_local3--;
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
} while (_local2 != 2);
_local10 = _pos.posX;
_local9 = _pos.posY;
_local2 = 0;
_local8 = _pos.posX + 1;
while (_local8 < nStageX) {
_local6 = mcMapRef[(("c_" + _local8) + "_") + _local9];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
if (_local2 == 2) {
break;
}
_local8++;
}
_local2 = 0;
_local8 = _pos.posX - 1;
while (_local8 >= 0) {
_local6 = mcMapRef[(("c_" + _local8) + "_") + _local9];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
if (_local2 == 2) {
break;
}
_local8--;
}
_local2 = 0;
_local7 = _pos.posY + 1;
while (_local7 < nStageY) {
_local6 = mcMapRef[(("c_" + _local10) + "_") + _local7];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
if (_local2 == 2) {
break;
}
_local7++;
}
_local2 = 0;
_local7 = _pos.posY - 1;
if (_local7 < 0) {
break;
}
_local6 = mcMapRef[(("c_" + _local10) + "_") + _local7];
if (_local6.sAvatar_ID == "vide") {
_local6.bPossibleMove = true;
aLastSelection.push(_local6);
_local2++;
} else {
if (_local6.bIsEnnemy == true) {
if (Is_Player_Invincible(_local6.sAvatar_ID) == false) {
_local6.bPossibleMove = true;
_local6.bAttackSelection = true;
aLastSelection.push(_local6);
Apply_Effects("Ennemy", [_local6]);
}
}
break;
}
if (_local2 == 2) {
break;
}
_local7--;
// unexpected jump
}
return(aLastSelection);
}
function Apply_Effects(_Effect, _mcList) {
switch (_Effect) {
case "Vision_Over" :
var _local7 = new ColorMatrix();
_local7.adjustHue(-58);
_local7.adjustSaturation(60);
_local7.adjustBrightness(100);
var _local3 = new Array();
var _local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
var _local5 = new flash.filters.GlowFilter();
_local5.color = 3946331 /* 0x3C375B */;
_local5.strength = 100;
_local5.quality = 1;
_local5.inner = true;
_local5.blurX = 13;
_local5.blurY = 15;
_local3.push(_local8);
_local3.push(_local5);
_mcList[0].filters = _local3;
break;
case "Focus_Over" :
_local7 = new ColorMatrix();
_local7.adjustContrast(1);
_local7.adjustBrightness(255);
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local5 = new flash.filters.GlowFilter();
_local5.color = 3946331 /* 0x3C375B */;
_local5.strength = 100;
_local5.quality = 1;
_local5.inner = true;
_local5.blurX = 10;
_local5.blurY = 10;
_local3 = new Array();
_local3.push(_local8);
_local3.push(_local5);
_mcList[0].filters = _local3;
break;
case "Focus" :
_local7 = new ColorMatrix();
_local7.adjustContrast(1);
_local7.adjustBrightness(255);
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local3 = new Array();
_local3.push(_local8);
_mcList[0].filters = _local3;
break;
case "Destination" :
_local7 = new ColorMatrix();
_local7.adjustContrast(1);
_local7.adjustBrightness(128);
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local3 = new Array();
_local3.push(_local8);
_mcList[0].filters = _local3;
break;
case "Nothing" :
_mcList[0].filters = [];
break;
case "Nothing_Over" :
_local5 = new flash.filters.GlowFilter();
_local5.color = 3946331 /* 0x3C375B */;
_local5.strength = 100;
_local5.quality = 1;
_local5.inner = true;
_local5.blurX = 10;
_local5.blurY = 10;
_local3 = new Array();
_local3.push(_local5);
_mcList[0].filters = _local3;
break;
case "Vision" :
_local7 = new ColorMatrix();
_local7.adjustHue(-65);
_local7.adjustSaturation(120);
_local7.adjustBrightness(120);
_local3 = new Array();
var _local4 = new Array();
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
var _local6 = new ColorMatrix();
_local6.adjustHue(-30);
_local6.adjustSaturation(60);
_local6.adjustContrast(40);
_local6.adjustBrightness(100);
var _local9 = new flash.filters.ColorMatrixFilter(_local6.matrix);
_local3.push(_local8);
_local4.push(_local9);
var _local2 = 0;
while (_local2 < _mcList.length) {
if (_mcList.bIsWhite) {
_mcList[_local2].filters = _local4;
} else {
_mcList[_local2].filters = _local3;
}
_local2++;
}
break;
case "Ennemy" :
_local7 = new ColorMatrix();
_local7.adjustHue(54);
_local7.adjustSaturation(45);
_local7.adjustBrightness(-33);
_local3 = new Array();
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local3.push(_local8);
_local2 = 0;
while (_local2 < _mcList.length) {
_mcList[_local2].filters = _local3;
_local2++;
}
break;
case "Ennemy_Over" :
_local7 = new ColorMatrix();
_local7.adjustHue(54);
_local7.adjustSaturation(45);
_local7.adjustBrightness(-33);
_local3 = new Array();
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local5 = new flash.filters.GlowFilter();
_local5.color = 3946331 /* 0x3C375B */;
_local5.strength = 100;
_local5.quality = 1;
_local5.inner = true;
_local5.blurX = 10;
_local5.blurY = 10;
_local3.push(_local5);
_local3.push(_local8);
_local2 = 0;
while (_local2 < _mcList.length) {
_mcList[_local2].filters = _local3;
_local2++;
}
break;
case "Ennemy_Path" :
_local7 = new ColorMatrix();
_local7.adjustHue(134);
_local7.adjustSaturation(85);
_local3 = new Array();
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local3.push(_local8);
_local2 = 0;
while (_local2 < _mcList.length) {
_mcList[_local2].filters = _local3;
_local2++;
}
break;
case "Ennemy_Path_Over" :
_local7 = new ColorMatrix();
_local7.adjustHue(134);
_local7.adjustSaturation(85);
_local3 = new Array();
_local8 = new flash.filters.ColorMatrixFilter(_local7.matrix);
_local5 = new flash.filters.GlowFilter();
_local5.color = 3946331 /* 0x3C375B */;
_local5.strength = 100;
_local5.quality = 1;
_local5.inner = true;
_local5.blurX = 10;
_local5.blurY = 10;
_local3.push(_local5);
_local3.push(_local8);
_local2 = 0;
while (_local2 < _mcList.length) {
_mcList[_local2].filters = _local3;
_local2++;
}
break;
}
}
function Init_Cases_Color() {
mcMapRef.c_0_0.bIsWhite = true;
mcMapRef.c_0_1.bIsWhite = false;
mcMapRef.c_0_2.bIsWhite = true;
mcMapRef.c_0_3.bIsWhite = false;
mcMapRef.c_0_4.bIsWhite = true;
mcMapRef.c_0_5.bIsWhite = false;
mcMapRef.c_0_6.bIsWhite = true;
mcMapRef.c_0_7.bIsWhite = false;
mcMapRef.c_1_0.bIsWhite = false;
mcMapRef.c_1_1.bIsWhite = true;
mcMapRef.c_1_2.bIsWhite = false;
mcMapRef.c_1_3.bIsWhite = true;
mcMapRef.c_1_4.bIsWhite = false;
mcMapRef.c_1_5.bIsWhite = true;
mcMapRef.c_1_6.bIsWhite = false;
mcMapRef.c_1_7.bIsWhite = true;
mcMapRef.c_2_0.bIsWhite = true;
mcMapRef.c_2_1.bIsWhite = false;
mcMapRef.c_2_2.bIsWhite = true;
mcMapRef.c_2_3.bIsWhite = false;
mcMapRef.c_2_4.bIsWhite = true;
mcMapRef.c_2_5.bIsWhite = false;
mcMapRef.c_2_6.bIsWhite = true;
mcMapRef.c_2_7.bIsWhite = false;
mcMapRef.c_3_0.bIsWhite = false;
mcMapRef.c_3_1.bIsWhite = true;
mcMapRef.c_3_2.bIsWhite = false;
mcMapRef.c_3_3.bIsWhite = true;
mcMapRef.c_3_4.bIsWhite = false;
mcMapRef.c_3_5.bIsWhite = true;
mcMapRef.c_3_6.bIsWhite = false;
mcMapRef.c_3_7.bIsWhite = true;
mcMapRef.c_4_0.bIsWhite = true;
mcMapRef.c_4_1.bIsWhite = false;
mcMapRef.c_4_2.bIsWhite = true;
mcMapRef.c_4_3.bIsWhite = false;
mcMapRef.c_4_4.bIsWhite = true;
mcMapRef.c_4_5.bIsWhite = false;
mcMapRef.c_4_6.bIsWhite = true;
mcMapRef.c_4_7.bIsWhite = false;
mcMapRef.c_5_0.bIsWhite = false;
mcMapRef.c_5_1.bIsWhite = true;
mcMapRef.c_5_2.bIsWhite = false;
mcMapRef.c_5_3.bIsWhite = true;
mcMapRef.c_5_4.bIsWhite = false;
mcMapRef.c_5_5.bIsWhite = true;
mcMapRef.c_5_6.bIsWhite = false;
mcMapRef.c_5_7.bIsWhite = true;
mcMapRef.c_6_0.bIsWhite = true;
mcMapRef.c_6_1.bIsWhite = false;
mcMapRef.c_6_2.bIsWhite = true;
mcMapRef.c_6_3.bIsWhite = false;
mcMapRef.c_6_4.bIsWhite = true;
mcMapRef.c_6_5.bIsWhite = false;
mcMapRef.c_6_6.bIsWhite = true;
mcMapRef.c_6_7.bIsWhite = false;
mcMapRef.c_7_0.bIsWhite = false;
mcMapRef.c_7_1.bIsWhite = true;
mcMapRef.c_7_2.bIsWhite = false;
mcMapRef.c_7_3.bIsWhite = true;
mcMapRef.c_7_4.bIsWhite = false;
mcMapRef.c_7_5.bIsWhite = true;
mcMapRef.c_7_6.bIsWhite = false;
mcMapRef.c_7_7.bIsWhite = true;
}
}
Symbol 1232 MovieClip [__Packages.AI] Frame 0
class AI
{
var mcMapRef, GameScope, aCpuList, aPlayerList, aItemList, nBrainSpeed, aTargetList, aCpuInDanger, aCpuInDanger_Avatar, nBrainInterval_ID, Attaquant, Destination, nBrainStep;
function AI (_game, _mcMapRef, _aCpuList, _aPlayerList, _aItemList) {
mcMapRef = _mcMapRef;
GameScope = _game;
aCpuList = _aCpuList;
aPlayerList = _aPlayerList;
aItemList = _aItemList;
nBrainSpeed = 5;
aTargetList = new Array();
aCpuInDanger = new Array();
aCpuInDanger_Avatar = new Array();
}
function Kill_AI() {
_global.clearTimeout(nBrainInterval_ID);
}
function Play() {
aTargetList = [];
aCpuInDanger = [];
aCpuInDanger_Avatar = [];
Attaquant = null;
Destination = null;
if (aCpuList.length > 0) {
GameScope.aPlayer1List.push(GameScope.aPlayer1List.shift());
nBrainInterval_ID = _global.setTimeout(this, "Process", 1500);
nBrainStep = 0;
}
}
function Process() {
mcMapRef.brain_txt.text = nBrainStep;
switch (nBrainStep) {
case 0 :
aTargetList = [];
aTargetList = Check_Direct_Attack();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 1 :
Flag_Protected_Target(aTargetList);
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 2 :
Check_Cpu_In_Danger();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 3 :
Check_Cpu_In_Danger();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 4 :
if (Check_Kill_Danger() == true) {
nBrainStep = 6;
} else {
nBrainStep = 9;
}
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 5 :
if (Check_Kill_Danger() == true) {
nBrainStep = 6;
} else {
nBrainStep = 7;
}
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 6 :
_global.clearTimeout(nBrainInterval_ID);
Kill_n_Jump_To();
break;
case 7 :
Kill_Unprotected_Piece();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 8 :
Kill_Protected_Piece();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 9 :
Kill_Protected_Piece();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 11 :
if (Check_For_Free_Spot() == true) {
_global.clearTimeout(nBrainInterval_ID);
Attaquant.fCallBack = function () {
this.unFreeze("Idle");
this.GameScope.Switch_Turn();
this.fCallBack = null;
};
Attaquant.Move_To(Destination);
} else {
nBrainStep = 12;
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
}
break;
case 12 :
if (Look_For_Item() == true) {
nBrainStep = 14;
} else {
nBrainStep = 13;
}
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
case 13 :
Move_Random();
_global.clearTimeout(nBrainInterval_ID);
if (Destination == null) {
GameScope.Switch_Turn();
} else {
Attaquant.fCallBack = function () {
this.unFreeze("Idle");
this.GameScope.Switch_Turn();
this.fCallBack = null;
};
Attaquant.Move_To(Destination);
}
break;
case 14 :
Pick_Item();
break;
case 100 :
Check_Cpu_In_Danger();
nBrainInterval_ID = _global.setTimeout(this, "Process", nBrainSpeed);
break;
default :
_global.clearTimeout(nBrainInterval_ID);
GameScope.Switch_Turn();
}
}
function Look_For_Item() {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < aCpuList.length) {
_local3 = Select_Items(aCpuList[_local2].Get_Type(), aCpuList[_local2].Get_Pos());
if (_local3.length > 0) {
Attaquant = aCpuList[_local2];
Destination = _local3[0];
return(true);
}
_local2++;
}
return(false);
}
function Pick_Item() {
var owner = this;
var theItem = GameScope.aItemList[Destination.nItem_ID - 1];
var _local13 = theItem.Get_Type();
_global.clearTimeout(nBrainInterval_ID);
switch (_local13) {
case "Ciseaux" :
Attaquant.fCallBack = function () {
this.fCallBack = function () {
this.unFreeze("Idle");
owner.GameScope.aItemList[owner.Destination.nItem_ID - 1].doCiseaux(false);
this.fCallBack = null;
};
this.unFreeze("Ciseaux");
owner.GameScope.bItemInUse = false;
owner.GameScope.nCurrentItem = -1;
};
Attaquant.Move_To(Destination);
break;
case "Lampe" :
var i_to_kill = 0;
var _local5 = 0;
while (_local5 < GameScope.aPlayer1List.length) {
if ((GameScope.Is_Player_Invincible(GameScope.aPlayer1List[_local5].Get_ID()) == false) && (GameScope.aPlayer1List[_local5].bFlashed == false)) {
i_to_kill = _local5;
break;
}
_local5++;
}
Attaquant.fCallBack = function () {
theItem.Do_Action(this, [owner.GameScope.aPlayer1List[i_to_kill]], owner.Destination);
};
Attaquant.Move_To(Destination);
break;
case "Bouclier" :
Attaquant.fCallBack = function () {
this.unFreeze("Bouclier");
this.bIsReady = true;
owner.GameScope.aPlayerImmunity.push(this);
this.mcAvatar.bouclier.gotoAndStop("On");
theItem.Delete_Item();
owner.GameScope.Switch_Turn();
this.fCallBack = null;
};
Attaquant.bIsInvincible = true;
Attaquant.Move_To(Destination);
break;
case "Cadran" :
GameScope.nExtraTurn = GameScope.nExtraTurn + 2;
Attaquant.fCallBack = function () {
this.unFreeze("Idle");
_global.Chess.fx.playSnd("warp");
theItem.Delete_Item();
owner.GameScope.Switch_Turn();
this.fCallBack = null;
};
Attaquant.Move_To(Destination);
break;
case "Corde" :
var _local12 = theItem.Get_Pos().posX - 2;
var _local11 = theItem.Get_Pos().posX + 2;
var _local9 = theItem.Get_Pos().posY - 2;
var _local8 = theItem.Get_Pos().posY + 2;
if (_local12 < 0) {
_local12 = 0;
}
if (_local11 >= 8) {
_local11 = 7;
}
if (_local9 < 0) {
_local9 = 0;
}
if (_local8 >= 8) {
_local8 = 7;
}
var _local10;
var _local7 = false;
var _local6 = _local12;
while (_local6 <= _local11) {
if (_local7 == false) {
var _local4 = _local9;
while (_local4 <= _local8) {
var _local3 = mcMapRef[(("c_" + _local6) + "_") + _local4];
if (_local3.sAvatar_ID != "vide") {
if (_local3.bIsEnnemy == false) {
if (GameScope.Is_Player_Invincible(_local3.sAvatar_ID) == false) {
_local10 = _local3;
_local7 = true;
break;
}
}
}
_local4++;
}
} else {
break;
}
_local6++;
}
if ((_local10.sAvatar_ID != "vide") && (_local10.sAvatar_ID != undefined)) {
var mcEnnemy = GameScope.Get_Avatar_From_ID_For_Item(_local10.sAvatar_ID);
Attaquant.fCallBack = function () {
this.fCallBack = function () {
this.unFreeze("Idle");
mcEnnemy.fCallBack = function () {
this.fCallBack = function () {
owner.GameScope.Kill_Avatar(this);
owner.GameScope.Switch_Turn();
this.fCallBack = null;
owner.Attaquant.fCallBack = null;
};
this.setMove("Dead");
};
mcEnnemy.setMove("Die");
};
theItem.Delete_Item();
this.setMove("Lasso");
mcEnnemy.Kill();
};
Attaquant.Move_To(theItem.Get_Pos());
} else {
Attaquant.fCallBack = function () {
this.unFreeze("Idle");
theItem.Delete_Item();
owner.GameScope.Switch_Turn();
this.fCallBack = null;
};
Attaquant.Move_To(theItem.Get_Pos());
}
break;
default :
GameScope.Switch_Turn();
}
}
function Kill_n_Jump_To() {
var _local2 = GameScope.Get_Avatar_From_ID_For_Item(Destination.sAvatar_ID);
var _local3 = this;
GameScope.theCloud.doSequence_1(Attaquant, _local2, _local3.Destination);
Destination.bIsEnnemy = true;
GameScope.mcLastFocus = null;
}
function Trace_Array(temp) {
for (var _local2 in temp) {
}
}
function Check_Direct_Attack() {
var _local5 = new Array();
var _local2 = 0;
while (_local2 < aCpuList.length) {
var _local4 = Select_Cases(aCpuList[_local2].Get_Type(), aCpuList[_local2].Get_Pos(), false);
if (_local4.length > 0) {
var _local3 = new Object();
_local3.Avatar = aCpuList[_local2];
_local3.aTargetList = _local4;
_local5.push(_local3);
}
_local2++;
}
if (_local5.length == 0) {
nBrainStep = 100;
return(null);
}
nBrainStep = 1;
return(_local5);
}
function Convert_CaseArray_To_AvatarArray(_caseList) {
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _caseList.length) {
_local4.push(GameScope.Get_Avatar_From_ID_For_Item(_caseList[_local2].Get_ID()));
_local2++;
}
return(_local4);
}
function Check_Cpu_In_Danger() {
var _local2 = 0;
while (_local2 < aPlayerList.length) {
var _local4 = Select_Cases(aPlayerList[_local2].Get_Type(), aPlayerList[_local2].Get_Pos(), true);
if (_local4.length > 0) {
var _local3 = new Object();
_local3.Avatar = aPlayerList[_local2];
_local3.aTargetList = _local4;
aCpuInDanger.push(_local3);
var _local6 = Convert_CaseArray_To_AvatarArray(_local4);
var _local5 = aCpuInDanger_Avatar.concat(_local6);
aCpuInDanger_Avatar = _local5;
}
_local2++;
}
if (aCpuInDanger.length == 0) {
if (nBrainStep == 2) {
nBrainStep = 7;
} else if (nBrainStep == 3) {
var _local7 = random(100);
if (_local7 < 50) {
nBrainStep = 8;
} else {
nBrainStep = 12;
}
} else if (nBrainStep == 100) {
nBrainStep = 12;
}
} else if (nBrainStep == 2) {
nBrainStep = 5;
} else if (nBrainStep == 3) {
nBrainStep = 4;
} else if (nBrainStep == 100) {
nBrainStep = 11;
}
}
function Check_Kill_Danger() {
var _local4 = true;
var _local6 = 0;
while (_local6 < aCpuInDanger.length) {
if (_local4) {
var _local5 = aCpuInDanger[_local6].Avatar;
var _local2 = 0;
while (_local2 < aTargetList.length) {
if (_local4) {
var _local3 = 0;
while (_local3 < aTargetList[_local2].aTargetList.length) {
if (_local4) {
if (aTargetList[_local2].aTargetList[_local3] == _local5) {
Attaquant = aTargetList[_local2].Avatar;
Destination = aTargetList[_local2].aTargetList[_local3].Get_Pos();
_local4 = false;
}
} else {
break;
}
_local3++;
}
} else {
break;
}
_local2++;
}
} else {
break;
}
_local6++;
}
if (_local4 == true) {
return(false);
}
return(true);
}
function Flag_Protected_Target(_aTargetList) {
var _local6 = 2;
var _local2 = 0;
while (_local2 < _aTargetList.length) {
var _local3 = 0;
while (_local3 < _aTargetList[_local2].aTargetList.length) {
var _local5 = _aTargetList[_local2].aTargetList[_local3];
if (Piece_Is_Protected(_local5)) {
_aTargetList[_local2].bProtected = true;
_aTargetList[_local2].nTarget_Index = _local3;
_local6 = 3;
} else {
_aTargetList[_local2].bProtected = false;
_aTargetList[_local2].nTarget_Index = _local3;
}
_local3++;
}
_local2++;
}
nBrainStep = _local6;
}
function Piece_Is_Protected(_Avatar) {
var _local5 = false;
var _local7 = _Avatar.Get_Pos();
var _local3 = 0;
while (_local3 < aPlayerList.length) {
if (_Avatar != aPlayerList[_local3]) {
var _local4 = Select_Cases(aPlayerList[_local3].Get_Type(), aPlayerList[_local3].Get_Pos(), false);
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local7 == _local4[_local2].Get_Pos()) {
_local5 = true;
break;
}
_local2++;
}
}
if (_local5) {
break;
}
_local3++;
}
return(_local5);
}
function Kill_Unprotected_Piece() {
nBrainStep = 101;
var _local2 = 0;
while (_local2 < aTargetList.length) {
if (aTargetList[_local2].bProtected == false) {
Attaquant = aTargetList[_local2].Avatar;
Destination = aTargetList[_local2].aTargetList[aTargetList[_local2].nTarget_Index].Get_Pos();
nBrainStep = 6;
}
_local2++;
}
}
function Kill_Protected_Piece() {
nBrainStep = 101;
var _local2 = 0;
while (_local2 < aTargetList.length) {
if (aTargetList[_local2].bProtected == true) {
Attaquant = aTargetList[_local2].Avatar;
Destination = aTargetList[_local2].aTargetList[aTargetList[_local2].nTarget_Index].Get_Pos();
nBrainStep = 6;
}
_local2++;
}
}
function Check_For_Free_Spot() {
var _local6 = 0;
while (_local6 < aCpuInDanger_Avatar.length) {
var _local4 = new Object();
var _local7 = Select_Path(aCpuInDanger_Avatar[_local6].Get_Type(), aCpuInDanger_Avatar[_local6].Get_Pos());
var _local3 = 0;
while (_local3 < _local7.length) {
_local4[_local7[_local3]._name] = true;
_local3++;
}
_local3 = 0;
while (_local3 < aPlayerList.length) {
var _local5 = Select_Path(aPlayerList[_local3].Get_Type(), aPlayerList[_local3].Get_Pos());
var _local2 = 0;
while (_local2 < _local5.length) {
_local4[_local5[_local2]._name] = false;
_local2++;
}
_local3++;
}
for (var _local9 in _local4) {
if (_local4[_local9] == true) {
var _local8 = new Object();
Attaquant = aCpuInDanger_Avatar[_local6];
Destination = mcMapRef[_local9];
return(true);
}
}
_local6++;
}
return(false);
}
function Move_Random() {
var _local9 = random(aCpuList.length);
var _local5 = new Object();
var _local6 = Select_Path(aCpuList[_local9].Get_Type(), aCpuList[_local9].Get_Pos());
var _local4 = 0;
while (_local4 < _local6.length) {
_local5[_local6[_local4]._name] = true;
_local4++;
}
_local4 = 0;
while (_local4 < aPlayerList.length) {
var _local3 = Select_Path(aPlayerList[_local4].Get_Type(), aPlayerList[_local4].Get_Pos());
var _local2 = 0;
while (_local2 < _local3.length) {
_local5[_local3[_local2]._name] = false;
_local2++;
}
_local4++;
}
var _local7 = new Array();
var _local8 = new Array();
var _local10 = 0;
for (var _local11 in _local5) {
if (_local5[_local11] == true) {
_local7.push(_local11);
} else {
_local8.push(_local11);
}
}
if (_local7.length > 0) {
_local10 = random(_local7.length);
Destination = mcMapRef[_local7[_local10]];
} else if (_local6.length > 0) {
_local10 = random(_local6.length);
Destination = mcMapRef[_local6[_local10]._name];
} else {
Destination = null;
}
Attaquant = aCpuList[_local9];
return(true);
}
function Select_Cases(_piece, _pos, _bBreakOnCPU) {
var _local3 = new Array();
var _local10 = 8;
var _local9 = 8;
switch (_piece) {
case "tour" :
var _local15 = _pos.posX;
var _local14 = _pos.posY;
var _local13 = _pos.posX + 1;
while (_local13 < _local10) {
var _local11 = mcMapRef[(("c_" + _local13) + "_") + _local14];
if (_local11.sAvatar_ID != "vide") {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
_local13++;
}
_local13 = _pos.posX - 1;
while (_local13 >= 0) {
var _local11 = mcMapRef[(("c_" + _local13) + "_") + _local14];
if (_local11.sAvatar_ID != "vide") {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
_local13--;
}
var _local12 = _pos.posY + 1;
while (_local12 < _local9) {
var _local11 = mcMapRef[(("c_" + _local15) + "_") + _local12];
if (_local11.sAvatar_ID != "vide") {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
_local12++;
}
_local12 = _pos.posY - 1;
while (_local12 >= 0) {
var _local11 = mcMapRef[(("c_" + _local15) + "_") + _local12];
if (_local11.sAvatar_ID != "vide") {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
_local12--;
}
break;
case "fou" :
var _local6 = _pos.posX + 1;
var _local5 = _pos.posY + 1;
while ((_local6 < _local10) && (_local5 < _local9)) {
var _local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6++;
_local5++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
}
_local6 = _pos.posX - 1;
_local5 = _pos.posY - 1;
while ((_local6 >= 0) && (_local5 >= 0)) {
var _local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6--;
_local5--;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
}
_local6 = _pos.posX - 1;
_local5 = _pos.posY + 1;
while ((_local6 >= 0) && (_local5 < _local9)) {
var _local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6--;
_local5++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
}
_local6 = _pos.posX + 1;
_local5 = _pos.posY - 1;
while ((_local6 < _local10) && (_local5 >= 0)) {
var _local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6++;
_local5--;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
}
break;
case "roi" :
case "pion" :
var _local8 = 0;
if (_piece == "pion") {
_local8 = 1;
} else {
_local8 = 2;
}
_local6 = _pos.posX + 1;
_local5 = _pos.posY + 1;
var _local2 = 0;
do {
if (!((_local6 < _local10) && (_local5 < _local9))) {
break;
}
var _local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6++;
_local5++;
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
} while (_local2 != _local8);
_local6 = _pos.posX - 1;
_local5 = _pos.posY - 1;
_local2 = 0;
do {
if (!((_local6 >= 0) && (_local5 >= 0))) {
break;
}
_local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6--;
_local5--;
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
} while (_local2 != _local8);
_local6 = _pos.posX - 1;
_local5 = _pos.posY + 1;
_local2 = 0;
do {
if (!((_local6 >= 0) && (_local5 < _local9))) {
break;
}
_local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6--;
_local5++;
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
} while (_local2 != _local8);
_local6 = _pos.posX + 1;
_local5 = _pos.posY - 1;
_local2 = 0;
do {
if (!((_local6 < _local10) && (_local5 >= 0))) {
break;
}
_local11 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if (_local11.sAvatar_ID == "vide") {
_local6++;
_local5--;
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
} while (_local2 != _local8);
_local15 = _pos.posX;
_local14 = _pos.posY;
_local2 = 0;
_local13 = _pos.posX + 1;
while (_local13 < _local10) {
_local11 = mcMapRef[(("c_" + _local13) + "_") + _local14];
if (_local11.sAvatar_ID == "vide") {
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
if (_local2 == _local8) {
break;
}
_local13++;
}
_local2 = 0;
_local13 = _pos.posX - 1;
while (_local13 >= 0) {
_local11 = mcMapRef[(("c_" + _local13) + "_") + _local14];
if (_local11.sAvatar_ID == "vide") {
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
if (_local2 == _local8) {
break;
}
_local13--;
}
_local2 = 0;
_local12 = _pos.posY + 1;
while (_local12 < _local9) {
_local11 = mcMapRef[(("c_" + _local15) + "_") + _local12];
if (_local11.sAvatar_ID == "vide") {
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
if (_local2 == _local8) {
break;
}
_local12++;
}
_local2 = 0;
_local12 = _pos.posY - 1;
if (_local12 < 0) {
break;
}
_local11 = mcMapRef[(("c_" + _local15) + "_") + _local12];
if (_local11.sAvatar_ID == "vide") {
_local2++;
} else {
if (_local11.bIsEnnemy == _bBreakOnCPU) {
if (GameScope.Is_Player_Invincible(_local11.sAvatar_ID) == false) {
_local3.push(GameScope.Get_Avatar_From_ID_For_Item(_local11.sAvatar_ID));
}
}
break;
}
if (_local2 == _local8) {
break;
}
_local12--;
// unexpected jump
}
return(_local3);
}
function Select_Path(_piece, _pos) {
var _local2 = new Array();
var _local8 = 8;
var _local7 = 8;
switch (_piece) {
case "tour" :
var _local13 = _pos.posX;
var _local12 = _pos.posY;
var _local11 = _pos.posX + 1;
while (_local11 < _local8) {
var _local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
break;
}
_local2.push(_local9);
_local11++;
}
_local11 = _pos.posX - 1;
while (_local11 >= 0) {
var _local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
break;
}
_local2.push(_local9);
_local11--;
}
var _local10 = _pos.posY + 1;
while (_local10 < _local7) {
var _local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
break;
}
_local2.push(_local9);
_local10++;
}
_local10 = _pos.posY - 1;
while (_local10 >= 0) {
var _local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
break;
}
_local2.push(_local9);
_local10--;
}
break;
case "fou" :
var _local6 = _pos.posX + 1;
var _local5 = _pos.posY + 1;
while ((_local6 < _local8) && (_local5 < _local7)) {
var _local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6++;
_local5++;
_local2.push(_local9);
} else {
break;
}
}
_local6 = _pos.posX - 1;
_local5 = _pos.posY - 1;
while ((_local6 >= 0) && (_local5 >= 0)) {
var _local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6--;
_local5--;
_local2.push(_local9);
} else {
break;
}
}
_local6 = _pos.posX - 1;
_local5 = _pos.posY + 1;
while ((_local6 >= 0) && (_local5 < _local7)) {
var _local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6--;
_local5++;
_local2.push(_local9);
} else {
break;
}
}
_local6 = _pos.posX + 1;
_local5 = _pos.posY - 1;
while ((_local6 < _local8) && (_local5 >= 0)) {
var _local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6++;
_local5--;
_local2.push(_local9);
} else {
break;
}
}
break;
case "roi" :
_local6 = _pos.posX + 1;
_local5 = _pos.posY + 1;
var _local3 = 0;
do {
if (!((_local6 < _local8) && (_local5 < _local7))) {
break;
}
var _local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local6++;
_local5++;
_local3++;
} else {
break;
}
} while (_local3 != 2);
_local6 = _pos.posX - 1;
_local5 = _pos.posY - 1;
_local3 = 0;
do {
if (!((_local6 >= 0) && (_local5 >= 0))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local6--;
_local5--;
_local3++;
} else {
break;
}
} while (_local3 != 2);
_local6 = _pos.posX - 1;
_local5 = _pos.posY + 1;
_local3 = 0;
do {
if (!((_local6 >= 0) && (_local5 < _local7))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local6--;
_local5++;
_local3++;
} else {
break;
}
} while (_local3 != 2);
_local6 = _pos.posX + 1;
_local5 = _pos.posY - 1;
_local3 = 0;
do {
if (!((_local6 < _local8) && (_local5 >= 0))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local6++;
_local5--;
_local3++;
} else {
break;
}
} while (_local3 != 2);
_local13 = _pos.posX;
_local12 = _pos.posY;
_local3 = 0;
_local11 = _pos.posX + 1;
while (_local11 < _local8) {
_local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local3++;
} else {
break;
}
if (_local3 == 2) {
break;
}
_local11++;
}
_local3 = 0;
_local11 = _pos.posX - 1;
while (_local11 >= 0) {
_local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local3++;
} else {
break;
}
if (_local3 == 2) {
break;
}
_local11--;
}
_local3 = 0;
_local10 = _pos.posY + 1;
while (_local10 < _local7) {
_local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local3++;
} else {
break;
}
if (_local3 == 2) {
break;
}
_local10++;
}
_local3 = 0;
_local10 = _pos.posY - 1;
while (_local10 >= 0) {
_local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2.push(_local9);
_local3++;
} else {
break;
}
if (_local3 == 2) {
break;
}
_local10--;
}
break;
case "pion" :
_local6 = _pos.posX + 1;
_local5 = _pos.posY + 1;
_local3 = 0;
do {
if (!((_local6 < _local8) && (_local5 < _local7))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6++;
_local5++;
_local3++;
_local2.push(_local9);
} else {
break;
}
} while (_local3 != 1);
_local6 = _pos.posX - 1;
_local5 = _pos.posY - 1;
_local3 = 0;
do {
if (!((_local6 >= 0) && (_local5 >= 0))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6--;
_local5--;
_local3++;
_local2.push(_local9);
} else {
break;
}
} while (_local3 != 1);
_local6 = _pos.posX - 1;
_local5 = _pos.posY + 1;
_local3 = 0;
do {
if (!((_local6 >= 0) && (_local5 < _local7))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6--;
_local5++;
_local3++;
_local2.push(_local9);
} else {
break;
}
} while (_local3 != 1);
_local6 = _pos.posX + 1;
_local5 = _pos.posY - 1;
_local3 = 0;
do {
if (!((_local6 < _local8) && (_local5 >= 0))) {
break;
}
_local9 = mcMapRef[(("c_" + _local6) + "_") + _local5];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local6++;
_local5--;
_local3++;
_local2.push(_local9);
} else {
break;
}
} while (_local3 != 1);
_local13 = _pos.posX;
_local12 = _pos.posY;
_local3 = 0;
_local11 = _pos.posX + 1;
while (_local11 < _local8) {
_local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local3++;
_local2.push(_local9);
} else {
break;
}
if (_local3 == 1) {
break;
}
_local11++;
}
_local3 = 0;
_local11 = _pos.posX - 1;
while (_local11 >= 0) {
_local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local3++;
_local2.push(_local9);
} else {
break;
}
if (_local3 == 1) {
break;
}
_local11--;
}
_local3 = 0;
_local10 = _pos.posY + 1;
while (_local10 < _local7) {
_local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local3++;
_local2.push(_local9);
} else {
break;
}
if (_local3 == 1) {
break;
}
_local10++;
}
_local3 = 0;
_local10 = _pos.posY - 1;
if (_local10 < 0) {
break;
}
_local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local3++;
_local2.push(_local9);
} else {
break;
}
if (_local3 == 1) {
break;
}
_local10--;
// unexpected jump
}
return(_local2);
}
function Select_Items(_piece, _pos) {
var _local3 = new Array();
var _local8 = 8;
var _local7 = 8;
switch (_piece) {
case "tour" :
var _local13 = _pos.posX;
var _local12 = _pos.posY;
var _local11 = _pos.posX + 1;
while (_local11 < _local8) {
var _local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
_local11++;
}
_local11 = _pos.posX - 1;
while (_local11 >= 0) {
var _local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
_local11--;
}
var _local10 = _pos.posY + 1;
while (_local10 < _local7) {
var _local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
_local10++;
}
_local10 = _pos.posY - 1;
while (_local10 >= 0) {
var _local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID != "vide") || (_local9.nItem_ID != -1)) {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
_local10--;
}
break;
case "fou" :
var _local5 = _pos.posX + 1;
var _local4 = _pos.posY + 1;
while ((_local5 < _local8) && (_local4 < _local7)) {
var _local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5++;
_local4++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
}
_local5 = _pos.posX - 1;
_local4 = _pos.posY - 1;
while ((_local5 >= 0) && (_local4 >= 0)) {
var _local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5--;
_local4--;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
}
_local5 = _pos.posX - 1;
_local4 = _pos.posY + 1;
while ((_local5 >= 0) && (_local4 < _local7)) {
var _local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5--;
_local4++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
}
_local5 = _pos.posX + 1;
_local4 = _pos.posY - 1;
while ((_local5 < _local8) && (_local4 >= 0)) {
var _local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5++;
_local4--;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
}
break;
case "pion" :
_local5 = _pos.posX + 1;
_local4 = _pos.posY + 1;
var _local2 = 0;
do {
if (!((_local5 < _local8) && (_local4 < _local7))) {
break;
}
var _local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5++;
_local4++;
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
} while (_local2 != 1);
_local5 = _pos.posX - 1;
_local4 = _pos.posY - 1;
_local2 = 0;
do {
if (!((_local5 >= 0) && (_local4 >= 0))) {
break;
}
_local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5--;
_local4--;
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
} while (_local2 != 1);
_local5 = _pos.posX - 1;
_local4 = _pos.posY + 1;
_local2 = 0;
do {
if (!((_local5 >= 0) && (_local4 < _local7))) {
break;
}
_local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5--;
_local4++;
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
} while (_local2 != 1);
_local5 = _pos.posX + 1;
_local4 = _pos.posY - 1;
_local2 = 0;
do {
if (!((_local5 < _local8) && (_local4 >= 0))) {
break;
}
_local9 = mcMapRef[(("c_" + _local5) + "_") + _local4];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local5++;
_local4--;
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
} while (_local2 != 1);
_local13 = _pos.posX;
_local12 = _pos.posY;
_local2 = 0;
_local11 = _pos.posX + 1;
while (_local11 < _local8) {
_local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
if (_local2 == 1) {
break;
}
_local11++;
}
_local2 = 0;
_local11 = _pos.posX - 1;
while (_local11 >= 0) {
_local9 = mcMapRef[(("c_" + _local11) + "_") + _local12];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
if (_local2 == 1) {
break;
}
_local11--;
}
_local2 = 0;
_local10 = _pos.posY + 1;
while (_local10 < _local7) {
_local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
if (_local2 == 1) {
break;
}
_local10++;
}
_local2 = 0;
_local10 = _pos.posY - 1;
if (_local10 < 0) {
break;
}
_local9 = mcMapRef[(("c_" + _local13) + "_") + _local10];
if ((_local9.sAvatar_ID == "vide") && (_local9.nItem_ID == -1)) {
_local2++;
} else {
if (_local9.nItem_ID != -1) {
_local3.push(_local9);
}
break;
}
if (_local2 == 1) {
break;
}
_local10--;
// unexpected jump
}
return(_local3);
}
function Select_Path_Without_Items(_piece, _pos) {
var _local2 = new Array();
var _local9 = 8;
var _local8 = 8;
var _local3 = _pos.bIsEnnemy;
switch (_piece) {
case "tour" :
var _local14 = _pos.posX;
var _local13 = _pos.posY;
var _local12 = _pos.posX + 1;
while (_local12 < _local9) {
var _local10 = mcMapRef[(("c_" + _local12) + "_") + _local13];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
_local12++;
}
_local12 = _pos.posX - 1;
while (_local12 >= 0) {
var _local10 = mcMapRef[(("c_" + _local12) + "_") + _local13];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
_local12--;
}
var _local11 = _pos.posY + 1;
while (_local11 < _local8) {
var _local10 = mcMapRef[(("c_" + _local14) + "_") + _local11];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
_local11++;
}
_local11 = _pos.posY - 1;
while (_local11 >= 0) {
var _local10 = mcMapRef[(("c_" + _local14) + "_") + _local11];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
_local11--;
}
break;
case "fou" :
var _local7 = _pos.posX + 1;
var _local6 = _pos.posY + 1;
while ((_local7 < _local9) && (_local6 < _local8)) {
var _local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7++;
_local6++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
}
_local7 = _pos.posX - 1;
_local6 = _pos.posY - 1;
while ((_local7 >= 0) && (_local6 >= 0)) {
var _local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7--;
_local6--;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
}
_local7 = _pos.posX - 1;
_local6 = _pos.posY + 1;
while ((_local7 >= 0) && (_local6 < _local8)) {
var _local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7--;
_local6++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
}
_local7 = _pos.posX + 1;
_local6 = _pos.posY - 1;
while ((_local7 < _local9) && (_local6 >= 0)) {
var _local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7++;
_local6--;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
}
break;
case "roi" :
_local7 = _pos.posX + 1;
_local6 = _pos.posY + 1;
var _local4 = 0;
do {
if (!((_local7 < _local9) && (_local6 < _local8))) {
break;
}
var _local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local7++;
_local6++;
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 2);
_local7 = _pos.posX - 1;
_local6 = _pos.posY - 1;
_local4 = 0;
do {
if (!((_local7 >= 0) && (_local6 >= 0))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local7--;
_local6--;
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 2);
_local7 = _pos.posX - 1;
_local6 = _pos.posY + 1;
_local4 = 0;
do {
if (!((_local7 >= 0) && (_local6 < _local8))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local7--;
_local6++;
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 2);
_local7 = _pos.posX + 1;
_local6 = _pos.posY - 1;
_local4 = 0;
do {
if (!((_local7 < _local9) && (_local6 >= 0))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local7++;
_local6--;
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 2);
_local14 = _pos.posX;
_local13 = _pos.posY;
_local4 = 0;
_local12 = _pos.posX + 1;
while (_local12 < _local9) {
_local10 = mcMapRef[(("c_" + _local12) + "_") + _local13];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 2) {
break;
}
_local12++;
}
_local4 = 0;
_local12 = _pos.posX - 1;
while (_local12 >= 0) {
_local10 = mcMapRef[(("c_" + _local12) + "_") + _local13];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 2) {
break;
}
_local12--;
}
_local4 = 0;
_local11 = _pos.posY + 1;
while (_local11 < _local8) {
_local10 = mcMapRef[(("c_" + _local14) + "_") + _local11];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 2) {
break;
}
_local11++;
}
_local4 = 0;
_local11 = _pos.posY - 1;
while (_local11 >= 0) {
_local10 = mcMapRef[(("c_" + _local14) + "_") + _local11];
if (_local10.sAvatar_ID == "vide") {
_local2.push(_local10);
_local4++;
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 2) {
break;
}
_local11--;
}
break;
case "pion" :
_local7 = _pos.posX + 1;
_local6 = _pos.posY + 1;
_local4 = 0;
do {
if (!((_local7 < _local9) && (_local6 < _local8))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7++;
_local6++;
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 1);
_local7 = _pos.posX - 1;
_local6 = _pos.posY - 1;
_local4 = 0;
do {
if (!((_local7 >= 0) && (_local6 >= 0))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7--;
_local6--;
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 1);
_local7 = _pos.posX - 1;
_local6 = _pos.posY + 1;
_local4 = 0;
do {
if (!((_local7 >= 0) && (_local6 < _local8))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7--;
_local6++;
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 1);
_local7 = _pos.posX + 1;
_local6 = _pos.posY - 1;
_local4 = 0;
do {
if (!((_local7 < _local9) && (_local6 >= 0))) {
break;
}
_local10 = mcMapRef[(("c_" + _local7) + "_") + _local6];
if (_local10.sAvatar_ID == "vide") {
_local7++;
_local6--;
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
} while (_local4 != 1);
_local14 = _pos.posX;
_local13 = _pos.posY;
_local4 = 0;
_local12 = _pos.posX + 1;
while (_local12 < _local9) {
_local10 = mcMapRef[(("c_" + _local12) + "_") + _local13];
if (_local10.sAvatar_ID == "vide") {
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 1) {
break;
}
_local12++;
}
_local4 = 0;
_local12 = _pos.posX - 1;
while (_local12 >= 0) {
_local10 = mcMapRef[(("c_" + _local12) + "_") + _local13];
if (_local10.sAvatar_ID == "vide") {
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 1) {
break;
}
_local12--;
}
_local4 = 0;
_local11 = _pos.posY + 1;
while (_local11 < _local8) {
_local10 = mcMapRef[(("c_" + _local14) + "_") + _local11];
if (_local10.sAvatar_ID == "vide") {
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 1) {
break;
}
_local11++;
}
_local4 = 0;
_local11 = _pos.posY - 1;
if (_local11 < 0) {
break;
}
_local10 = mcMapRef[(("c_" + _local14) + "_") + _local11];
if (_local10.sAvatar_ID == "vide") {
_local4++;
_local2.push(_local10);
} else {
if ((!_local3) == _local10.bIsEnnemy) {
_local2.push(_local10);
}
break;
}
if (_local4 == 1) {
break;
}
_local11--;
// unexpected jump
}
return(_local2);
}
}
Symbol 1233 MovieClip [__Packages.Avatar] Frame 0
class Avatar
{
var mcAvatar, sType, mcCase, nFreezeTurn, sAction, GameScope, nFlip, bIsInvincible, bIsReady, nID, bIsAlive, nTeam, bCloudCall, bFlashed, nFrom_X, nFrom_Y, nTo_X, nTo_Y, fCallBack;
function Avatar (_mcAvatar, _sType, _mcCase, _nID, _game, _nTeam, _nFlip) {
mcAvatar = _mcAvatar;
sType = _sType;
mcCase = _mcCase;
nFreezeTurn = 0;
mcCase.sAvatar_ID = mcAvatar._name;
sAction = "Idle";
GameScope = _game;
mcAvatar._x = mcCase._x;
mcAvatar._y = mcCase._y;
nFlip = _nFlip;
Refresh_Scale();
bIsInvincible = false;
bIsReady = true;
nID = _nID;
nTotalAvatar++;
bIsAlive = true;
nTeam = _nTeam;
bCloudCall = false;
Refresh_Depth();
bFlashed = false;
}
function Trace_ID() {
}
function Get_Pos() {
return(mcCase);
}
function Get_Focus() {
return(mcCase.bHaveFocus);
}
function Get_Type() {
return(sType);
}
function Get_MC() {
return(mcAvatar);
}
function Get_Total_Avatar() {
return(nTotalAvatar);
}
function Get_isReady() {
return(bIsReady);
}
function Get_IsAlive() {
return(bIsAlive);
}
function Get_ID() {
return(mcAvatar._name);
}
function Get_Team() {
return(nTeam);
}
function Refresh_Depth() {
var _local2 = 0;
if (GameScope.bMultiplayer) {
_local2 = 8;
} else {
_local2 = GameScope.nLevel + 7;
}
mcAvatar.swapDepths((Math.floor(mcAvatar._y) * (_local2 + 4)) + nID);
}
function Move_To(_mcCase) {
if (bIsInvincible == true) {
GameScope.Remove_Invincibility(Get_ID());
}
mcCase.bHaveFocus = false;
nFrom_X = mcCase._x;
nFrom_Y = mcCase._y;
mcCase.sAvatar_ID = "vide";
if (mcCase.bIsEnnemy == true) {
mcCase.bIsEnnemy = false;
_mcCase.bIsEnnemy = true;
}
mcCase = _mcCase;
nTo_X = mcCase._x;
nTo_Y = mcCase._y;
mcCase.sAvatar_ID = mcAvatar._name;
bIsReady = false;
sAction = "Jump";
_global.Chess.fx.playSnd("jump");
mcAvatar.gotoAndStop("Jump");
}
function Get_Info() {
switch (sType) {
case "tour" :
return("Tower: Move horizontally and vertically.");
case "fou" :
return("Bishop: Move diagonally.");
case "roi" :
return("King: Can move from 1 to 2 spaces in any directions.");
case "pion" :
return("Pawn: Can move only 1 space in any directions.");
}
return("Avatar error");
}
function setMove(_sAction) {
sAction = _sAction;
mcAvatar.gotoAndStop(sAction);
bIsReady = false;
}
function Kill() {
bIsAlive = false;
mcCase.bAttackSelection = false;
mcCase.bIsEnnemy = false;
bIsAlive = false;
mcCase.sAvatar_ID = "vide";
}
function Remove_Instance() {
removeMovieClip(mcAvatar);
}
function unFreeze(_sRecoverAnim) {
switch (_sRecoverAnim) {
case "Idle" :
sAction = "Idle";
bIsReady = true;
mcAvatar.gotoAndStop("Idle");
break;
default :
sAction = _sRecoverAnim;
bIsReady = false;
mcAvatar.gotoAndStop(_sRecoverAnim);
}
}
function doMove() {
var _local5 = this;
if (bIsReady == false) {
switch (sAction) {
case "Flashlight" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
} else if (mcAvatar.perso._currentframe == (mcAvatar.perso._totalframes - 1)) {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
fCallBack();
} else if (mcAvatar.perso._currentframe == 1) {
_global.Chess.fx.playSnd("flashlight");
mcAvatar.perso.gotoAndStop(2);
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Lasso" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
var _local4 = mcAvatar.perso._currentframe;
if (((_local4 == 15) || (_local4 == 25)) || (_local4 == 35)) {
_global.Chess.fx.playSnd("rope");
}
}
break;
case "Ciseaux" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
if ((mcAvatar.perso._currentframe == 15) || (mcAvatar.perso._currentframe == 25)) {
_global.Chess.fx.playSnd("cut");
}
}
break;
case "Blind" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Blind_Idle" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
mcAvatar.perso.gotoAndStop(1);
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Bouclier" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
mcAvatar.perso.gotoAndStop(1);
} else {
if (mcAvatar.perso._currentframe == 1) {
_global.Chess.fx.playSnd("shield");
}
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Die" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
var _local4 = mcAvatar.perso._currentframe;
switch (_local4) {
case 1 :
case 11 :
case 18 :
case 23 :
case 29 :
case 35 :
case 40 :
_global.Chess.fx.playSnd("rope");
break;
}
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Dead" :
fCallBack();
break;
case "Blind_Recover" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
unFreeze("Idle");
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Back_On" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
Refresh_Scale();
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
if (mcAvatar.perso._currentframe == 6) {
_global.Chess.fx.playSnd("back_on");
}
Refresh_Depth();
}
break;
case "Free" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Win" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
break;
case "Jump" :
if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
fCallBack();
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
if ((mcAvatar.perso._currentframe >= 4) && (mcAvatar.perso._currentframe <= 14)) {
var _local3 = (mcAvatar.perso._currentframe - 3) / 11;
if (nFrom_X <= nTo_X) {
mcAvatar._x = nFrom_X - ((nFrom_X - nTo_X) * _local3);
} else {
mcAvatar._x = nFrom_X + ((nTo_X - nFrom_X) * _local3);
}
if (nFrom_Y >= nTo_Y) {
mcAvatar._y = nFrom_Y - ((nFrom_Y - nTo_Y) * _local3);
} else {
mcAvatar._y = nFrom_Y + ((nTo_Y - nFrom_Y) * _local3);
}
Refresh_Scale();
Refresh_Depth();
} else {
if (mcAvatar.perso._currentframe != 15) {
break;
}
_global.Chess.fx.playSnd("ground");
if (!bCloudCall) {
break;
}
bCloudCall = false;
GameScope.bCloudAnim = true;
}
}
}
} else if (mcAvatar.perso._currentframe == mcAvatar.perso._totalframes) {
mcAvatar.perso.gotoAndStop(1);
} else {
mcAvatar.perso.gotoAndStop(mcAvatar.perso._currentframe + 1);
}
}
function Refresh_Scale() {
var _local2 = (mcAvatar._y / 9) + 80;
mcAvatar._yscale = _local2;
mcAvatar._xscale = _local2 * nFlip;
}
static var nTotalAvatar = 0;
}
Symbol 1234 MovieClip [__Packages.Item] Frame 0
class Item
{
var mcCase, mcMapRef, nID, GameScope, aPossibleMove, sType, aGauche, aDroite, aBas, aHaut, mcItem;
function Item (_mcCase, _nID, _game, _mcMapRef) {
mcCase = _mcCase;
mcMapRef = _mcMapRef;
nID = _nID;
mcCase.nItem_ID = nID;
GameScope = _game;
aPossibleMove = new Array();
var _local2;
if (GameScope.sItem == "ALL") {
_local2 = new Array("Lampe", "Cadran", "Ciseaux", "Corde", "Bouclier");
} else {
switch (GameScope.sItem) {
case "Lampe" :
_local2 = new Array("Lampe");
break;
case "Cadran" :
_local2 = new Array("Cadran");
break;
case "Ciseaux" :
_local2 = new Array("Ciseaux");
break;
case "Corde" :
_local2 = new Array("Corde");
break;
case "Bouclier" :
_local2 = new Array("Bouclier");
}
}
if (GameScope.bMultiplayer == true) {
var _local3 = GameScope.chessRoot.randRange(0, _local2.length - 1, GameScope.nTurnCounter + nID);
sType = _local2[_local3];
} else {
sType = _local2[random(_local2.length)];
}
Init_Item(sType);
aGauche = new Array();
aDroite = new Array();
aBas = new Array();
aHaut = new Array();
}
function Get_Type() {
return(sType);
}
function Get_Pos() {
return(mcCase);
}
function Get_Info() {
switch (sType) {
case "Lampe" :
return("Flashlight: to blind an opponent. He'll miss a turn.");
case "Cadran" :
return("Clock: to play two times in a row.");
case "Ciseaux" :
return("Scissors: to free an ensnared enemy.");
case "Corde" :
return("Rope: to ensnare an opponent (within a 2-square range).");
case "Bouclier" :
return("Shield: the player on it is invicible.");
}
return("Item error");
}
function Delete_Item() {
Reset_Vision(aPossibleMove);
mcCase.nItem_ID = -1;
Reset_Vision_Sechoir();
mcItem.removeMovieClip();
}
function Refresh_Depth() {
var _local2 = 0;
if (GameScope.bMultiplayer) {
_local2 = 8;
} else {
_local2 = GameScope.nLevel + 7;
}
mcItem.swapDepths((Math.floor(mcItem._y) * (GameScope.nMaxItem + _local2)) + nID);
}
function Init_Item(_sType) {
switch (_sType) {
case "Lampe" :
mcItem = mcMapRef.attachMovie("Lampe", "Item" + nID, 50000);
break;
case "Cadran" :
mcItem = mcMapRef.attachMovie("Cadran", "Item" + nID, 50000);
break;
case "Ciseaux" :
mcItem = mcMapRef.attachMovie("Ciseaux", "Item" + nID, 50000);
break;
case "Corde" :
mcItem = mcMapRef.attachMovie("Corde", "Item" + nID, 50000);
break;
case "Bouclier" :
mcItem = mcMapRef.attachMovie("Bouclier", "Item" + nID, 50000);
break;
}
mcItem._x = mcCase._x;
mcItem._y = mcCase._y;
Refresh_Depth();
}
function Show_Possible_Move() {
var _local7 = GameScope.aCurrentEnnemyList;
aPossibleMove = [];
switch (sType) {
case "Lampe" :
if (_local7.length > 0) {
var _local4 = 0;
while (_local4 < _local7.length) {
if (GameScope.Is_Player_Invincible(_local7[_local4].Get_ID()) == false) {
aPossibleMove.push(_local7[_local4].Get_Pos());
}
_local4++;
}
if (aPossibleMove.length > 0) {
var _local5 = 0;
while (_local5 < aPossibleMove.length) {
aPossibleMove[_local5].bPossibleMove = true;
aPossibleMove[_local5].bAttackSelection = true;
_local5++;
}
GameScope.Apply_Effects("Ennemy", aPossibleMove);
return(true);
}
return(false);
}
return(false);
case "Ciseaux" :
return(false);
case "Corde" :
var _local11 = mcCase.posX - 2;
var _local10 = mcCase.posX + 2;
var _local9 = mcCase.posY - 2;
var _local8 = mcCase.posY + 2;
if (_local11 < 0) {
_local11 = 0;
}
if (_local10 >= 8) {
_local10 = 7;
}
if (_local9 < 0) {
_local9 = 0;
}
if (_local8 >= 8) {
_local8 = 7;
}
var _local6 = _local11;
while (_local6 <= _local10) {
var _local3 = _local9;
while (_local3 <= _local8) {
var _local2 = mcMapRef[(("c_" + _local6) + "_") + _local3];
if (_local2._name != mcCase._name) {
if (_local2.sAvatar_ID != "vide") {
if (GameScope.bMultiplayer == false) {
if (_local2.bIsEnnemy) {
if (GameScope.Is_Player_Invincible(_local2.sAvatar_ID) == false) {
_local2.bPossibleMove = true;
_local2.bAttackSelection = true;
aPossibleMove.push(_local2);
}
}
} else if (GameScope.Is_Player_Invincible(_local2.sAvatar_ID) == false) {
if ((GameScope.bPlayer1Active == false) && (_local2.bIsEnnemy == false)) {
_local2.bPossibleMove = true;
_local2.bAttackSelection = true;
aPossibleMove.push(_local2);
} else if ((GameScope.bPlayer1Active == true) && (_local2.bIsEnnemy == true)) {
_local2.bPossibleMove = true;
_local2.bAttackSelection = true;
aPossibleMove.push(_local2);
}
}
}
}
_local3++;
}
_local6++;
}
if (aPossibleMove.length == 0) {
GameScope.bItemInUse = false;
GameScope.Remove_Focus();
return(false);
}
GameScope.Apply_Effects("Ennemy", aPossibleMove);
return(true);
}
}
function Do_Action(_mcAvatar, _aEnnemy, _case) {
var owner = this;
switch (sType) {
case "Lampe" :
_mcAvatar.fCallBack = function () {
_aEnnemy[0].fCallBack = function () {
owner.GameScope.Flash_Avatar(this, 4);
this.unFreeze("Blind_Idle");
owner.GameScope.Switch_Turn();
owner.Delete_Item();
_mcAvatar.fCallBack = null;
};
this.unFreeze("Idle");
_aEnnemy[0].setMove("Blind");
};
_mcAvatar.setMove("Flashlight");
if (GameScope.bPlayer1Active) {
GameScope.chessRoot.Score_Manager.Add_Score("Lampe", 1);
}
Reset_Vision(aPossibleMove);
break;
case "Corde" :
_mcAvatar.fCallBack = function () {
this.unFreeze("Idle");
_aEnnemy[0].fCallBack = function () {
this.fCallBack = function () {
this.GameScope.Kill_Avatar(this);
this.GameScope.Switch_Turn();
this.fCallBack = null;
_mcAvatar.fCallBack = null;
};
this.setMove("Dead");
};
_global.Chess.fx.playSnd("pull_rope");
_aEnnemy[0].setMove("Die");
};
_mcAvatar.setMove("Lasso");
if (GameScope.bPlayer1Active) {
GameScope.chessRoot.Score_Manager.Add_Score("Corde", 1);
}
_global.Chess.fx.playSnd("rope");
_aEnnemy[0].Kill();
Reset_Vision(aPossibleMove);
break;
}
}
function Reset_Vision(_aCases) {
var _local1 = 0;
while (_local1 < _aCases.length) {
_aCases[_local1].bAttackSelection = false;
_aCases[_local1].bPossibleMove = false;
_aCases[_local1].filters = null;
_local1++;
}
_aCases = [];
}
function Reset_Vision_Outside() {
if (sType != "Sechoir") {
Reset_Vision(aPossibleMove);
} else {
Reset_Vision_Sechoir();
}
}
function Reset_Vision_Sechoir() {
Reset_Vision(aGauche);
Reset_Vision(aDroite);
Reset_Vision(aBas);
Reset_Vision(aHaut);
}
function Get_Spawn_Pos(_mcAvatar, _bIsPlayer1) {
var _local4;
var _local2;
if (GameScope.bMultiplayer) {
if (_bIsPlayer1 == true) {
if (GameScope.chessRoot.MySide == 0) {
_local4 = ["c_7_3", "c_7_4", "c_6_3", "c_6_4", "c_7_2", "c_7_5", "c_6_2", "c_6_5", "c_7_1", "c_7_6", "c_6_1", "c_6_6", "c_7_0", "c_7_7", "c_6_0", "c_6_7", "c_5_3", "c_5_4"];
} else {
_local4 = ["c_0_3", "c_0_4", "c_1_3", "c_1_4", "c_0_2", "c_0_5", "c_1_2", "c_1_5", "c_0_1", "c_0_6", "c_1_1", "c_1_6", "c_0_0", "c_0_7", "c_1_0", "c_1_7", "c_2_3", "c_2_4"];
}
} else if (GameScope.chessRoot.MySide == 0) {
_local4 = ["c_0_3", "c_0_4", "c_1_3", "c_1_4", "c_0_2", "c_0_5", "c_1_2", "c_1_5", "c_0_1", "c_0_6", "c_1_1", "c_1_6", "c_0_0", "c_0_7", "c_1_0", "c_1_7", "c_2_3", "c_2_4"];
} else {
_local4 = ["c_7_3", "c_7_4", "c_6_3", "c_6_4", "c_7_2", "c_7_5", "c_6_2", "c_6_5", "c_7_1", "c_7_6", "c_6_1", "c_6_6", "c_7_0", "c_7_7", "c_6_0", "c_6_7", "c_5_3", "c_5_4"];
}
} else if (_bIsPlayer1 == false) {
_local4 = ["c_0_3", "c_0_4", "c_1_3", "c_1_4", "c_0_2", "c_0_5", "c_1_2", "c_1_5", "c_0_1", "c_0_6", "c_1_1", "c_1_6", "c_0_0", "c_0_7", "c_1_0", "c_1_7", "c_2_3", "c_2_4"];
} else {
_local4 = ["c_7_3", "c_7_4", "c_6_3", "c_6_4", "c_7_2", "c_7_5", "c_6_2", "c_6_5", "c_7_1", "c_7_6", "c_6_1", "c_6_6", "c_7_0", "c_7_7", "c_6_0", "c_6_7", "c_5_3", "c_5_4"];
}
var _local3 = 0;
while (_local3 < _local4.length) {
_local2 = mcMapRef[_local4[_local3]];
if ((_local2.sAvatar_ID == "vide") && (_local2.nItem_ID == -1)) {
return(_local2);
}
_local3++;
}
return(null);
}
function Get_Best_Piece(_aList) {
var _local3;
var _local2 = 0;
while (_local2 < _aList.length) {
if (_aList[_local2].Get_Type() == "tour") {
_local3 = _aList[_local2];
_aList.splice(_local2, 1);
return(_local3);
}
_local2++;
}
_local2 = 0;
while (_local2 < _aList.length) {
if (_aList[_local2].Get_Type() == "fou") {
_local3 = _aList[_local2];
_aList.splice(_local2, 1);
return(_local3);
}
_local2++;
}
_local3 = _aList[0];
_aList.splice(0, 1);
return(_local3);
}
function doCiseaux(_bIsPlayer1) {
var _local2;
var _local3;
var _local4 = false;
var owner = this;
mcItem._visible = false;
if (_bIsPlayer1) {
if (GameScope.aPlayer1DeadList.length > 0) {
_local4 = true;
_local2 = Get_Best_Piece(GameScope.aPlayer1DeadList);
GameScope.aPlayer1List.push(_local2);
}
} else if (GameScope.aPlayer2DeadList.length > 0) {
_local4 = true;
_local2 = Get_Best_Piece(GameScope.aPlayer2DeadList);
GameScope.aPlayer2List.push(_local2);
}
if (_local4) {
_local3 = Get_Spawn_Pos(_local2, _bIsPlayer1);
_local2.mcAvatar.respawn_x = _local3._x;
_local2.mcAvatar.respawn_y = _local3._y;
_local2.mcAvatar.respawn_xscale = ((_local3._y / 9) + 80) * _local2.nFlip;
_local2.mcAvatar.respawn_yscale = (_local3._y / 9) + 80;
_local3.sAvatar_ID = _local2.Get_ID();
_local2.mcCase = _local3;
if (_bIsPlayer1 == false) {
_local3.bIsEnnemy = true;
} else {
GameScope.chessRoot.Score_Manager.Add_Score("Ciseaux", 1);
}
_local2.fCallBack = function () {
this.fCallBack = function () {
this.unFreeze("Idle");
this.bIsAlive = true;
owner.GameScope.Switch_Turn();
owner.Delete_Item();
this.fCallBack = null;
};
this.mcAvatar._x = this.mcAvatar.respawn_x;
this.mcAvatar._y = this.mcAvatar.respawn_y;
this.mcAvatar._xscale = this.mcAvatar.respawn_xscale;
this.mcAvatar._yscale = this.mcAvatar.respawn_yscale;
this.unFreeze("Back_On");
};
_local2.unFreeze("Free");
} else {
Delete_Item();
GameScope.Switch_Turn();
}
}
function AI_Sechoir_Selection() {
var _local6 = 0;
var _local5 = 0;
var _local3 = 0;
var _local4 = 0;
var _local7 = 0;
var _local9 = null;
var _local8 = "";
var _local2 = 0;
while (_local2 < aGauche.length) {
if (aGauche[_local2].sAvatar_ID != "vide") {
if (aGauche[_local2].bIsEnnemy == false) {
_local6++;
} else {
break;
}
}
_local2++;
}
if (_local6 >= _local7) {
_local7 = _local6;
_local9 = aGauche[0];
_local8 = "nGauche";
}
_local2 = 0;
while (_local2 < aDroite.length) {
if (aDroite[_local2].sAvatar_ID != "vide") {
if (aDroite[_local2].bIsEnnemy == false) {
_local5++;
} else {
break;
}
}
_local2++;
}
if (_local5 >= _local7) {
_local7 = _local5;
_local9 = aDroite[0];
_local8 = "nDroite";
}
_local2 = 0;
while (_local2 < aHaut.length) {
if (aHaut[_local2].sAvatar_ID != "vide") {
if (aHaut[_local2].bIsEnnemy == false) {
_local3++;
} else {
break;
}
}
_local2++;
}
if (_local3 >= _local7) {
_local7 = _local3;
_local9 = aHaut[0];
_local8 = "nHaut";
}
_local2 = 0;
while (_local2 < aBas.length) {
if (aBas[_local2].sAvatar_ID != "vide") {
if (aBas[_local2].bIsEnnemy == false) {
_local4++;
} else {
break;
}
}
_local2++;
}
if (_local4 >= _local7) {
_local7 = _local4;
_local9 = aBas[0];
_local8 = "nBas";
}
return(_local9);
}
}
Symbol 1235 MovieClip [__Packages.Cloud] Frame 0
class Cloud
{
var mcCloud, mcMapRef, GameScope, nTotalFrame, mcCase, mcAvatar, mcEnnemy, sAvatar_ID, bIsEnnemy;
function Cloud (_mcMapRef, _mcCloud, _game) {
mcCloud = _mcCloud;
mcMapRef = _mcMapRef;
GameScope = _game;
nTotalFrame = mcCloud._totalframes;
mcCloud._x = 3000;
}
function doSequence_1(_avatar, _ennemy, _mcCase) {
mcCase = _mcCase;
mcAvatar = _avatar;
mcEnnemy = _ennemy;
sAvatar_ID = _avatar.Get_ID();
bIsEnnemy = _avatar.Get_Pos().bIsEnnemy;
var owner = this;
clearInterval(GameScope.nTimeLimitInterval_ID);
mcAvatar.fCallBack = function () {
this.unFreeze("Idle");
owner.Refresh_Depth();
this.fCallBack = null;
_global.Chess.fx.playSnd("fight");
};
mcCloud._x = mcCase._x;
mcCloud._y = mcCase._y;
mcCloud._visible = true;
mcAvatar.bCloudCall = true;
mcAvatar.bIsReady = true;
mcAvatar.Move_To(mcCase);
}
function Refresh_Depth() {
var _local2 = mcAvatar.mcAvatar.getDepth();
if (mcEnnemy.mcAvatar.getDepth() > _local2) {
_local2 = mcEnnemy.mcAvatar.getDepth();
}
var _local3 = false;
do {
_local2++;
if (mcMapRef.getInstanceAtDepth(_local2) == undefined) {
_local3 = true;
}
} while (_local3 == false);
mcCloud.swapDepths(_local2);
}
function doAnim() {
var _local3 = mcCloud._currentframe;
var owner = this;
if (_local3 == nTotalFrame) {
GameScope.bCloudAnim = false;
Finish();
} else {
mcCloud.gotoAndStop(_local3 + 1);
if (_local3 == 35) {
mcEnnemy.fCallBack = function () {
this.setMove("Dead");
this.GameScope.Kill_Avatar(this);
owner.mcCase.sAvatar_ID = owner.sAvatar_ID;
owner.mcCase.bIsEnnemy = owner.bIsEnnemy;
this.fCallBack = null;
};
mcEnnemy.setMove("Die");
_global.Chess.fx.playSnd("pull_rope");
mcEnnemy.Kill();
}
}
}
function Finish() {
mcCloud._visible = false;
mcCloud._x = 3000;
mcCloud.swapDepths(858745);
GameScope.Switch_Turn();
mcCloud.gotoAndStop(1);
}
function Remove_Instance() {
removeMovieClip(mcCloud);
}
}
Symbol 1236 MovieClip [__Packages.ColorMatrix] Frame 0
class ColorMatrix
{
var matrix;
function ColorMatrix (mat) {
if (mat instanceof ColorMatrix) {
matrix = mat.matrix.concat();
} else if (mat instanceof Array) {
matrix = mat.concat();
} else {
reset();
}
}
function reset() {
matrix = IDENTITY.concat();
}
function clone() {
return(new ColorMatrix(matrix));
}
function adjustSaturation(s) {
s = (3 * s) / 100;
var _local3 = 1 - s;
var _local6 = _local3 * r_lum;
var _local4 = _local3 * g_lum;
var _local5 = _local3 * b_lum;
var _local7 = Array(_local6 + s, _local4, _local5, 0, 0, _local6, _local4 + s, _local5, 0, 0, _local6, _local4, _local5 + s, 0, 0, 0, 0, 0, 1, 0);
concat(_local7);
}
function adjustContrast(r, g, b) {
g = g || (r);
b = b || (r);
r = r + 1;
g = g + 1;
b = b + 1;
var _local5 = Array(r, 0, 0, 0, 128 * (1 - r), 0, g, 0, 0, 128 * (1 - g), 0, 0, b, 0, 128 * (1 - b), 0, 0, 0, 1, 0);
concat(_local5);
}
function adjustBrightness(r, g, b) {
g = g || (r);
b = b || (r);
var _local4 = Array(1, 0, 0, 0, r, 0, 1, 0, 0, g, 0, 0, 1, 0, b, 0, 0, 0, 1, 0);
concat(_local4);
}
function adjustHue(angle) {
angle = angle * (Math.PI/180);
var _local2 = Math.cos(angle);
var _local3 = Math.sin(angle);
var _local6 = 0.213;
var _local5 = 0.715;
var _local4 = 0.072;
var _local8 = Array((_local6 + (_local2 * (1 - _local6))) + (_local3 * (-_local6)), (_local5 + (_local2 * (-_local5))) + (_local3 * (-_local5)), (_local4 + (_local2 * (-_local4))) + (_local3 * (1 - _local4)), 0, 0, (_local6 + (_local2 * (-_local6))) + (_local3 * 0.143), (_local5 + (_local2 * (1 - _local5))) + (_local3 * 0.14), (_local4 + (_local2 * (-_local4))) + (_local3 * -0.283), 0, 0, (_local6 + (_local2 * (-_local6))) + (_local3 * (-(1 - _local6))), (_local5 + (_local2 * (-_local5))) + (_local3 * _local5), (_local4 + (_local2 * (1 - _local4))) + (_local3 * _local4), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1);
concat(_local8);
}
function colorize(rgb, amount) {
var _local4 = ((rgb >> 16) & 255) / 255;
var _local6 = ((rgb >> 8) & 255) / 255;
var _local3 = (rgb & 255) / 255;
if (amount == null) {
amount = 1;
}
var _local5 = 1 - amount;
var _local8 = Array(_local5 + ((amount * _local4) * r_lum), (amount * _local4) * g_lum, (amount * _local4) * b_lum, 0, 0, (amount * _local6) * r_lum, _local5 + ((amount * _local6) * g_lum), (amount * _local6) * b_lum, 0, 0, (amount * _local3) * r_lum, (amount * _local3) * g_lum, _local5 + ((amount * _local3) * b_lum), 0, 0, 0, 0, 0, 1, 0);
concat(_local8);
}
function setAlpha(alpha) {
var _local2 = Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, alpha, 0);
concat(_local2);
}
function desaturate() {
var _local2 = Array(r_lum, g_lum, b_lum, 0, 0, r_lum, g_lum, b_lum, 0, 0, r_lum, g_lum, b_lum, 0, 0, 0, 0, 0, 1, 0);
concat(_local2);
}
function invert() {
var _local2 = Array(-1, 0, 0, 0, 255, 0, -1, 0, 0, 255, 0, 0, -1, 0, 255, 0, 0, 0, 1, 0);
concat(_local2);
}
function threshold(t) {
var _local3 = Array(r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, r_lum * 256, g_lum * 256, b_lum * 256, 0, -256 * t, 0, 0, 0, 1, 0);
concat(_local3);
}
function randomize(amount) {
if (amount == null) {
amount = 1;
}
var _local3 = 1 - amount;
var _local10 = _local3 + (amount * (Math.random() - Math.random()));
var _local15 = amount * (Math.random() - Math.random());
var _local12 = amount * (Math.random() - Math.random());
var _local6 = (amount * 255) * (Math.random() - Math.random());
var _local8 = amount * (Math.random() - Math.random());
var _local14 = _local3 + (amount * (Math.random() - Math.random()));
var _local11 = amount * (Math.random() - Math.random());
var _local5 = (amount * 255) * (Math.random() - Math.random());
var _local7 = amount * (Math.random() - Math.random());
var _local13 = amount * (Math.random() - Math.random());
var _local9 = _local3 + (amount * (Math.random() - Math.random()));
var _local4 = (amount * 255) * (Math.random() - Math.random());
var _local16 = Array(_local10, _local15, _local12, 0, _local6, _local8, _local14, _local11, 0, _local5, _local7, _local13, _local9, 0, _local4, 0, 0, 0, 1, 0);
concat(_local16);
}
function setChannels(r, g, b, a) {
var _local3 = (((((r & 1) == 1) ? 1 : 0) + (((r & 2) == 2) ? 1 : 0)) + (((r & 4) == 4) ? 1 : 0)) + (((r & 8) == 8) ? 1 : 0);
if (_local3 > 0) {
_local3 = 1 / _local3;
}
var _local2 = (((((g & 1) == 1) ? 1 : 0) + (((g & 2) == 2) ? 1 : 0)) + (((g & 4) == 4) ? 1 : 0)) + (((g & 8) == 8) ? 1 : 0);
if (_local2 > 0) {
_local2 = 1 / _local2;
}
var _local4 = (((((b & 1) == 1) ? 1 : 0) + (((b & 2) == 2) ? 1 : 0)) + (((b & 4) == 4) ? 1 : 0)) + (((b & 8) == 8) ? 1 : 0);
if (_local4 > 0) {
_local4 = 1 / _local4;
}
var _local5 = (((((a & 1) == 1) ? 1 : 0) + (((a & 2) == 2) ? 1 : 0)) + (((a & 4) == 4) ? 1 : 0)) + (((a & 8) == 8) ? 1 : 0);
if (_local5 > 0) {
_local5 = 1 / _local5;
}
var _local10 = Array((((r & 1) == 1) ? (_local3) : 0), (((r & 2) == 2) ? (_local3) : 0), (((r & 4) == 4) ? (_local3) : 0), (((r & 8) == 8) ? (_local3) : 0), 0, (((g & 1) == 1) ? (_local2) : 0), (((g & 2) == 2) ? (_local2) : 0), (((g & 4) == 4) ? (_local2) : 0), (((g & 8) == 8) ? (_local2) : 0), 0, (((b & 1) == 1) ? (_local4) : 0), (((b & 2) == 2) ? (_local4) : 0), (((b & 4) == 4) ? (_local4) : 0), (((b & 8) == 8) ? (_local4) : 0), 0, (((a & 1) == 1) ? (_local5) : 0), (((a & 2) == 2) ? (_local5) : 0), (((a & 4) == 4) ? (_local5) : 0), (((a & 8) == 8) ? (_local5) : 0), 0);
concat(_local10);
}
function blend(m, amount) {
var _local3 = 1 - amount;
var _local2 = 0;
while (_local2 < 20) {
matrix[_local2] = (_local3 * matrix[_local2]) + (amount * m.matrix[_local2]);
_local2++;
}
}
function concat(mat) {
var _local6 = Array();
var _local3 = 0;
var _local5 = 0;
while (_local5 < 4) {
var _local2 = 0;
while (_local2 < 5) {
_local6[_local3 + _local2] = ((((mat[_local3] * matrix[_local2]) + (mat[_local3 + 1] * matrix[_local2 + 5])) + (mat[_local3 + 2] * matrix[_local2 + 10])) + (mat[_local3 + 3] * matrix[_local2 + 15])) + ((_local2 == 4) ? (mat[_local3 + 4]) : 0);
_local2++;
}
_local3 = _local3 + 5;
_local5++;
}
matrix = _local6;
}
function get filter() {
return(new flash.filters.ColorMatrixFilter(matrix));
}
static var r_lum = 0.212671;
static var g_lum = 0.71516;
static var b_lum = 0.072169;
static var IDENTITY = Array(1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0);
}
Symbol 42 MovieClip Frame 1
var Music = new Sound(this);
playSnd = function () {
gotoAndPlay ("start");
};
stopSnd = function () {
gotoAndStop ("stop");
};
NewVolume = function (vol) {
this.Music.setVolume(vol);
};
Symbol 42 MovieClip Frame 2
stop();
Symbol 42 MovieClip Frame 3
gotoAndStop ("idle");
Symbol 42 MovieClip Frame 4
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 1
var Music = new Sound(this);
newVolume = function (vol) {
this.Music.setVolume(vol);
};
playSndVol = function (fx, vol) {
if (!_global.Muted) {
this.Music.setVolume(vol);
gotoAndPlay(fx);
}
};
playSnd = function (fx) {
if (!_global.Muted) {
this.Music.setVolume(50);
gotoAndPlay(fx);
}
};
Symbol 61 MovieClip Frame 2
stop();
Symbol 61 MovieClip Frame 3
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 4
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 5
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 6
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 8
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 9
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 10
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 11
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 12
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 13
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 14
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 15
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 16
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 17
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 18
gotoAndStop ("idle");
Symbol 61 MovieClip Frame 19
gotoAndStop ("idle");
Symbol 79 Button
on (rollOver) {
onRollOverFct();
over = true;
out = false;
gotoAndPlay ("over");
}
on (rollOut) {
onRollOutFct();
if (over) {
out = true;
} else {
gotoAndPlay ("out");
}
}
on (press) {
onPressFct();
gotoAndPlay ("down");
}
Symbol 82 MovieClip Frame 1
btn.tabEnabled = false;
Instance of Symbol 77 MovieClip "quit_btn" in Symbol 82 MovieClip Frame 1
on (press) {
gotoAndPlay ("out");
}
on (rollOver) {
_global.oSnd.playSnd("blink7", 50, 1, false);
}
Symbol 82 MovieClip Frame 4
over = false;
out = false;
stop();
Symbol 82 MovieClip Frame 12
over = false;
if (out) {
gotoAndPlay ("out");
} else {
stop();
}
Symbol 82 MovieClip Frame 23
gotoAndStop (1);
Symbol 82 MovieClip Frame 26
onClicFct();
gotoAndStop (1);
Symbol 85 Button
on (rollOver) {
onRollOverFct();
over = true;
out = false;
gotoAndPlay ("over");
}
on (rollOut) {
onRollOutFct();
if (over) {
out = true;
} else {
gotoAndPlay ("out");
}
}
on (press) {
onPressFct();
gotoAndPlay ("down");
}
Symbol 88 MovieClip Frame 1
btn.tabEnabled = false;
Instance of Symbol 84 MovieClip "quit_btn" in Symbol 88 MovieClip Frame 1
on (press) {
gotoAndPlay ("out");
}
on (rollOver) {
_global.oSnd.playSnd("blink7", 50, 1, false);
}
Symbol 88 MovieClip Frame 4
over = false;
out = false;
stop();
Symbol 88 MovieClip Frame 12
over = false;
if (out) {
gotoAndPlay ("out");
} else {
stop();
}
Symbol 88 MovieClip Frame 23
gotoAndStop (1);
Symbol 88 MovieClip Frame 26
onClicFct();
gotoAndStop (1);
Symbol 91 MovieClip Frame 1
stop();
jouer_mc.tabEnabled = false;
instruction_mc.tabEnabled = false;
Instance of Symbol 82 MovieClip "instruction_mc" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
onPressFct = function () {
_global.Chess.fx.playSnd("blink6");
_parent._parent.instructions.gotoAndStop("instr_1");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}
Instance of Symbol 88 MovieClip "jouer_mc" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
onPressFct = function () {
_global.oSnd.playSnd("blink6", 50, 1, false);
_parent._parent.gotoAndPlay("Game");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}
Symbol 125 Button
on (press) {
_global.Chess.fx.playSnd("blink6");
gotoAndStop ("instr_2");
}
on (rollOver) {
_global.Chess.fx.playSnd("blink7");
}
Symbol 135 Button
on (release) {
_global.Chess.fx.playSnd("blink6");
gotoAndPlay ("hide");
}
on (rollOver) {
_global.Chess.fx.playSnd("blink7");
}
Symbol 137 Button
on (press) {
_global.Chess.fx.playSnd("blink6");
gotoAndStop ("instr_1");
}
on (rollOver) {
_global.Chess.fx.playSnd("blink7");
}
Symbol 164 MovieClip [Bouclier] Frame 1
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 2
next_prop.tabEnabled = false;
quit_btn.tabEnabled = false;
jouer_mc.tabEnabled = false;
Instance of Symbol 88 MovieClip "jouer_mc" in Symbol 187 MovieClip Frame 2
onClipEvent (load) {
onPressFct = function () {
_global.Chess.fx.playSnd("blink6");
_parent._parent.gotoAndPlay("Game");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}
Symbol 187 MovieClip Frame 3
previous_prop.tabEnabled = false;
quit_btn.tabEnabled = false;
jouer_mc.tabEnabled = false;
Symbol 337 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 1
stop();
Symbol 349 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 1
stop();
Symbol 351 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 417 MovieClip Frame 1
stop();
Symbol 419 MovieClip Frame 1
play();
Symbol 419 MovieClip Frame 35
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 1
stop();
stop();
Symbol 427 MovieClip Frame 7
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 14
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 23
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 38
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 48
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 56
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 64
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 73
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 80
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 97
blocker_btn.useHandCursor = false;
Symbol 427 MovieClip Frame 106
blocker_btn.useHandCursor = false;
Symbol 470 MovieClip Frame 1
stop();
Symbol 471 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 473 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 1
stop();
Symbol 480 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 510 MovieClip Frame 1
stop();
Symbol 511 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 1
play();
Symbol 512 MovieClip Frame 35
stop();
Symbol 513 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 515 MovieClip Frame 1
stop();
stop();
Symbol 515 MovieClip Frame 7
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 14
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 23
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 38
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 48
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 56
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 64
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 73
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 80
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 97
blocker_btn.useHandCursor = false;
Symbol 515 MovieClip Frame 106
blocker_btn.useHandCursor = false;
Symbol 552 MovieClip Frame 1
stop();
Symbol 553 MovieClip Frame 1
stop();
Symbol 554 MovieClip Frame 1
stop();
Symbol 555 MovieClip Frame 1
stop();
Symbol 556 MovieClip Frame 1
stop();
Symbol 557 MovieClip Frame 1
stop();
Symbol 559 MovieClip Frame 1
stop();
Symbol 560 MovieClip Frame 1
stop();
Symbol 575 MovieClip Frame 1
stop();
Symbol 588 MovieClip Frame 1
stop();
Symbol 589 MovieClip Frame 1
stop();
Symbol 590 MovieClip Frame 1
play();
Symbol 590 MovieClip Frame 35
stop();
stop();
Symbol 591 MovieClip Frame 1
stop();
Symbol 592 MovieClip Frame 1
stop();
Symbol 593 MovieClip Frame 1
stop();
stop();
Symbol 593 MovieClip Frame 7
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 14
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 23
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 38
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 48
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 56
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 64
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 73
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 80
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 97
blocker_btn.useHandCursor = false;
Symbol 593 MovieClip Frame 106
blocker_btn.useHandCursor = false;
Symbol 636 MovieClip Frame 1
stop();
Symbol 637 MovieClip Frame 1
stop();
Symbol 658 MovieClip Frame 1
stop();
Symbol 659 MovieClip Frame 1
play();
Symbol 659 MovieClip Frame 35
stop();
Symbol 674 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 1
stop();
Symbol 678 MovieClip Frame 1
stop();
Symbol 681 MovieClip Frame 1
stop();
Symbol 682 MovieClip Frame 1
stop();
Symbol 683 MovieClip Frame 1
stop();
Symbol 684 MovieClip Frame 1
stop();
Symbol 685 MovieClip Frame 1
stop();
Symbol 686 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 1
stop();
Symbol 690 MovieClip Frame 1
stop();
stop();
Symbol 690 MovieClip Frame 5
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 10
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 19
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 24
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 31
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 36
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 43
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 57
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 68
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 75
blocker_btn.useHandCursor = false;
Symbol 690 MovieClip Frame 83
blocker_btn.useHandCursor = false;
Symbol 735 MovieClip Frame 1
stop();
Symbol 736 MovieClip Frame 1
stop();
Symbol 749 MovieClip Frame 1
stop();
Symbol 750 MovieClip Frame 1
play();
Symbol 750 MovieClip Frame 35
stop();
Symbol 764 MovieClip Frame 1
stop();
Symbol 765 MovieClip Frame 1
stop();
Symbol 767 MovieClip Frame 1
stop();
Symbol 770 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 1
stop();
Symbol 773 MovieClip Frame 1
stop();
Symbol 774 MovieClip Frame 1
stop();
Symbol 775 MovieClip Frame 1
stop();
Symbol 778 MovieClip Frame 1
stop();
Symbol 779 MovieClip Frame 1
stop();
stop();
Symbol 779 MovieClip Frame 5
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 10
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 19
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 24
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 31
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 36
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 43
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 57
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 68
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 75
blocker_btn.useHandCursor = false;
Symbol 779 MovieClip Frame 83
blocker_btn.useHandCursor = false;
Symbol 812 MovieClip Frame 1
stop();
Symbol 813 MovieClip Frame 1
stop();
Symbol 826 MovieClip Frame 1
stop();
Symbol 828 MovieClip Frame 1
play();
Symbol 828 MovieClip Frame 35
stop();
Symbol 842 MovieClip Frame 1
stop();
Symbol 843 MovieClip Frame 1
stop();
Symbol 845 MovieClip Frame 1
stop();
Symbol 846 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 1
stop();
Symbol 848 MovieClip Frame 1
stop();
Symbol 849 MovieClip Frame 1
stop();
Symbol 850 MovieClip Frame 1
stop();
Symbol 851 MovieClip Frame 1
stop();
Symbol 852 MovieClip Frame 1
stop();
Symbol 853 MovieClip Frame 1
stop();
stop();
Symbol 853 MovieClip Frame 5
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 10
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 19
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 24
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 31
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 36
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 43
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 57
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 68
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 75
blocker_btn.useHandCursor = false;
Symbol 853 MovieClip Frame 83
blocker_btn.useHandCursor = false;
Symbol 912 MovieClip Frame 18
stop();
Symbol 913 MovieClip Frame 1
stop();
blocker_btn.useHandCursor = false;
Symbol 926 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 936 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 947 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 957 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 968 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 975 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHair);
Symbol 988 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 1006 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHair);
Symbol 1016 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 1026 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nBody);
Symbol 1029 MovieClip Frame 1
stop();
Symbol 1030 MovieClip Frame 1
stop();
Symbol 1043 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 1
play();
Symbol 1044 MovieClip Frame 35
stop();
Symbol 1057 MovieClip Frame 1
stop();
Symbol 1058 MovieClip Frame 1
stop();
Symbol 1060 MovieClip Frame 1
stop();
Symbol 1064 MovieClip Frame 1
stop();
Symbol 1065 MovieClip Frame 1
stop();
Symbol 1066 MovieClip Frame 1
stop();
Symbol 1067 MovieClip Frame 1
stop();
Symbol 1068 MovieClip Frame 1
stop();
Symbol 1069 MovieClip Frame 1
stop();
Symbol 1073 MovieClip Frame 1
stop();
Symbol 1074 MovieClip [Pion] Frame 1
stop();
stop();
Symbol 1074 MovieClip [Pion] Frame 5
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 10
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 19
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 24
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 31
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 36
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 43
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 57
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 68
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 75
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 83
blocker_btn.useHandCursor = false;
Symbol 1074 MovieClip [Pion] Frame 92
gotoAndStop (1);
Symbol 1097 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHead);
Symbol 1104 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHead);
Symbol 1113 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHead);
Symbol 1122 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHead);
Symbol 1126 MovieClip Frame 1
stop();
this.gotoAndStop(_parent._parent.nHead);
Symbol 1130 MovieClip Frame 1
stop();
Symbol 1131 MovieClip Frame 1
stop();
Symbol 1136 MovieClip Frame 1
stop();
this.gotoAndStop(_global.SO.nHead);
Symbol 1137 MovieClip Frame 1
stop();
Symbol 1138 MovieClip Frame 1
stop();
Symbol 1139 MovieClip Frame 1
stop();
Symbol 1140 MovieClip Frame 1
stop();
Symbol 1142 MovieClip Frame 1
stop();
Symbol 1143 MovieClip Frame 1
stop();
Symbol 1162 MovieClip Frame 1
stop();
Symbol 1176 MovieClip Frame 1
stop();
Symbol 1177 MovieClip Frame 1
stop();
Symbol 1179 MovieClip Frame 1
play();
Symbol 1179 MovieClip Frame 35
stop();
Symbol 1180 MovieClip Frame 1
stop();
Symbol 1181 MovieClip Frame 1
stop();
Symbol 1182 MovieClip [avatarChess] Frame 1
stop();
Symbol 1182 MovieClip [avatarChess] Frame 7
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 14
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 23
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 38
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 48
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 56
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 64
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 73
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 80
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 97
blocker_btn.useHandCursor = false;
Symbol 1182 MovieClip [avatarChess] Frame 106
blocker_btn.useHandCursor = false;
Symbol 1188 MovieClip Frame 1
stop();
Symbol 1188 MovieClip Frame 6
blocker_btn.useHandCursor = false;
Symbol 1189 MovieClip Frame 1
stop();
Instance of Symbol 289 MovieClip in Symbol 1189 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 1189 MovieClip Frame 2
gotoAndStop (1);
Instance of Symbol 289 MovieClip in Symbol 1189 MovieClip Frame 3
onClipEvent (load) {
_visible = false;
}
Symbol 1203 Button
on (release) {
_global.Muted = true;
_parent.AmbienceChess.stopSnd();
gotoAndStop ("off");
}
on (rollOver) {
_global.Chess.fx.playSnd("blink7");
}
Symbol 1206 Button
on (release) {
_global.Muted = false;
_parent.AmbienceChess.playSnd();
_global.Chess.fx.playSnd("blink6");
gotoAndStop ("on");
}
Symbol 1207 MovieClip Frame 1
sound_btn.tabEnabled = false;
Symbol 1207 MovieClip Frame 6
stop();
Symbol 1207 MovieClip Frame 7
sound_btn.tabEnabled = false;
Symbol 1207 MovieClip Frame 12
stop();
Symbol 1212 MovieClip Frame 1
stop();
Symbol 1230 MovieClip Frame 1
stop();
Symbol 1230 MovieClip Frame 2
var nScore = _parent.Score_Manager.Get_Score();
totalpoints_txt.text = nScore;
points_txt.text = _parent.Score_Manager.Get_Level_Score();
time_txt.text = _parent.Score_Manager.Get_Average_Turn_Time() + " sec.";
stop();
Instance of Symbol 88 MovieClip "btnNo" in Symbol 1230 MovieClip Frame 2
onClipEvent (load) {
onPressFct = function () {
_parent._parent.grille_mc.gotoAndStop("Restart");
_global.Chess.fx.playSnd("blink6");
_parent._parent.gotoAndPlay("Game");
_parent.gotoAndStop("hide");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}
Instance of Symbol 88 MovieClip "btnNo" in Symbol 1230 MovieClip Frame 2
onClipEvent (load) {
onPressFct = function () {
_global.Chess.fx.playSnd("blink6");
_parent._parent.gotoAndStop("Play");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}
Symbol 1230 MovieClip Frame 3
stop();
var nScore = _parent.Score_Manager.Get_Score();
totalpoints_txt.text = nScore;
points_txt.text = _parent.Score_Manager.Get_Level_Score();
time_txt.text = _parent.Score_Manager.Get_Average_Turn_Time() + " sec.";
Instance of Symbol 88 MovieClip "btnNo" in Symbol 1230 MovieClip Frame 3
onClipEvent (load) {
onPressFct = function () {
_global.Chess.fx.playSnd("blink6");
_global.Chess.nArcadeLevel = 0;
_parent._parent.grille_mc.gotoAndStop("Restart");
_parent._parent.gotoAndPlay("Game");
_parent.gotoAndStop("hide");
};
onRollOverFct = function () {
_global.Chess.fx.playSnd("blink7");
};
}