STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228097
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2561 · P5121

swfchan turned sixteen years old yesterday! (5may2024)

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/24998623?noj=FRM24998623-6DC" width="1" height="1"></div>

unknown_artist.swf

This is the info page for
Flash #210082

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 36 { frame 1 { stop(); } frame 6 { stop(); } } movieClip 37 { frame 1 { if (_parent.position_x == _root.position_heros_x && _parent.position_y == _root.position_heros_y || _parent.position_x == _root.persistance_position_heros_x && _parent.position_y == _root.persistance_position_heros_y) { if (_root.jeu_on) { _root.position_heros_x = _root.persistance_position_heros_x; _root.position_heros_y = _root.persistance_position_heros_y; _root.mort.start(0, 0); _root.minotaure_kill.start(0, 0); _root.game_over(); } } } frame 2 { gotoAndPlay(1); } } movieClip 38 bibli_minotaure { frame 1 { function direction_chute(direction_potentielle) { switch (direction_potentielle) { return false; case 0: i = 0; while (i < _root.fosse_x.length) { if (position_x == _root.fosse_x[i] && position_y - 1 == _root.fosse_y[i]) { return true; } ++i; } return false; case 1: i = 0; while (i < _root.fosse_x.length) { if (position_x + 1 == _root.fosse_x[i] && position_y == _root.fosse_y[i]) { return true; } ++i; } return false; case 2: i = 0; while (i < _root.fosse_x.length) { if (position_x == _root.fosse_x[i] && position_y + 1 == _root.fosse_y[i]) { return true; } ++i; } return false; case 3: i = 0; while (i < _root.fosse_x.length) { if (position_x - 1 == _root.fosse_x[i] && position_y == _root.fosse_y[i]) { return true; } ++i; } return false; } return false; } function direction_impasse(direction_potentielle) { switch (direction_potentielle) { return false; case 0: i = 0; while (i < _root.fosse_x.length) { if (_root.impasse(_root.matrice_laby[position_x][position_y - 1])) { return true; } ++i; } return false; case 1: i = 0; while (i < _root.fosse_x.length) { if (_root.impasse(_root.matrice_laby[position_x + 1][position_y])) { return true; } ++i; } return false; case 2: i = 0; while (i < _root.fosse_x.length) { if (_root.impasse(_root.matrice_laby[position_x][position_y + 1])) { return true; } ++i; } return false; case 3: i = 0; while (i < _root.fosse_x.length) { if (_root.impasse(_root.matrice_laby[position_x - 1][position_y])) { return true; } ++i; } return false; } return false; } direction_future = -1; pas_parite = 0; cri_parite = 0; attaque_parite = 0; delai_cri = 0; etape_courante = 1; contact_visuel = false; contact_visuel_recent = false; stop(); } frame 2 { _root.ennemi._x = position_x * _root.taille_case + _root.taille_marge; _root.ennemi._y = position_y * _root.taille_case + _root.taille_marge; if (delai_cri > 0) { --delai_cri; } if (!contact_visuel && (position_x != _root.position_heros_x || position_y != _root.position_heros_y)) { if (position_y == _root.position_heros_y) { ligne = position_y; depart = position_x; arrivee = _root.position_heros_x; if (depart < arrivee) { pas_vision = 1; direction_vision = 1; } else { pas_vision = -1; direction_vision = 3; } contact_visuel = true; } if (position_x == _root.position_heros_x) { ligne = position_x; depart = position_y; arrivee = _root.position_heros_y; if (depart < arrivee) { pas_vision = 1; direction_vision = 2; } else { pas_vision = -1; direction_vision = 0; } contact_visuel = true; } if (contact_visuel) { if (direction_vision % 2 == 0) { i = depart; for (;;) { if (!(contact_visuel && i != arrivee)) break; if (_root.matrice_laby[ligne][i][direction_vision]) { contact_visuel = false; } i += pas_vision; } } else { i = depart; for (;;) { if (!(contact_visuel && i != arrivee)) break; if (_root.matrice_laby[i][ligne][direction_vision]) { contact_visuel = false; } i += pas_vision; } } } if (contact_visuel) { attaque_parite = (attaque_parite + 1) % 2; cri_parite = (cri_parite + 1) % 2; (eval('_root.minotaure_attaque_' + attaque_parite)).start(0, 0); (eval('_root.cri_minotaure_' + cri_parite)).start(0, 0); delai_cri = 5; nb_etapes = vitesse_course; } } if (!_root.jeu_on) { stop(); } else { pas_parite = (pas_parite + 1) % 2; (eval('_root.minotaure_pas_' + pas_parite)).start(0, 0); if (contact_visuel && !_root.matrice_laby[position_x][position_y][direction_vision]) { direction_courante = direction_vision; } else { if (contact_visuel) { contact_visuel = false; contact_visuel_recent = true; nb_etapes = vitesse_marche; } if (Math.random() < 0.5) { if (position_x < _root.position_heros_x) { intuition_A = 1; } else { intuition_A = 3; } if (position_y < _root.position_heros_y) { intuition_B = 2; } else { intuition_B = 0; } } else { if (position_x < _root.position_heros_x) { intuition_B = 1; } else { intuition_B = 3; } if (position_y < _root.position_heros_y) { intuition_A = 2; } else { intuition_A = 0; } } pourcentage_erreur_intuition = 0.25; if ((intuition_A != (direction_courante + 2) % 4 || contact_visuel_recent) && !_root.matrice_laby[position_x][position_y][intuition_A] && !direction_chute(intuition_A) && !direction_impasse(intuition_A) && Math.random() > pourcentage_erreur_intuition) { direction_courante = intuition_A; } else { if ((intuition_B != (direction_courante + 2) % 4 || contact_visuel_recent) && !_root.matrice_laby[position_x][position_y][intuition_B] && !direction_chute(intuition_B) && !direction_impasse(intuition_B) && Math.random() > pourcentage_erreur_intuition) { direction_courante = intuition_B; } else { do { direction_future = Math.floor(4 * Math.random()); } while (direction_future == (direction_courante + 2) % 4 && !contact_visuel_recent || _root.matrice_laby[position_x][position_y][direction_future] || direction_chute(direction_future) || direction_impasse(direction_future)); direction_courante = direction_future; } } } contact_visuel_recent = false; gotoAndPlay('MOUVEMENT'); } } frame 3 { gotoAndPlay('BOUCLE'); } frame 4 { if (etape_courante == Math.ceil(nb_etapes / 2)) { switch (direction_courante) { case 0: --position_y; break; case 1: ++position_x; break; case 2: ++position_y; break; case 3: --position_x; } i = 0; while (i < _root.fosse_x.length) { if (position_x == _root.fosse_x[i] && position_y == _root.fosse_y[i]) { _root.mode_jeu = 'WIN'; _root.game_over(); } ++i; } if (_root.mode_jeu != 'WIN' && contact_visuel && _root.matrice_laby[position_x][position_y][direction_vision] && (position_x != _root.position_heros_x || position_y != _root.position_heros_y)) { _root.minotaure_impact.start(0, 0); } } if (position_x != _root.position_heros_x || position_y != _root.position_heros_y) { switch (direction_courante) { case 0: _y = _y - _root.taille_case / nb_etapes; break; case 1: _x = _x + _root.taille_case / nb_etapes; break; case 2: _y = _y + _root.taille_case / nb_etapes; break; case 3: _x = _x - _root.taille_case / nb_etapes; } if (personnage._currentframe <= personnage._totalframes / 2) { personnage.gotoAndStop(Math.ceil((personnage._totalframes / 2) * etape_courante / nb_etapes)); } else { personnage.gotoAndStop(Math.ceil((personnage._totalframes / 2) * etape_courante / nb_etapes + personnage._totalframes / 2)); } } if ((direction_courante == 1 && personnage._currentframe > personnage._totalframes / 2 || direction_courante == 3 && personnage._currentframe <= personnage._totalframes / 2) && _root.jeu_on) { if (!contact_visuel) { cri_parite = (cri_parite + 1) % 2; if (Math.random() < 0.25 || delai_cri > 0) { cri_parite += 2; } else { delai_cri = 5; } (eval('_root.cri_minotaure_' + cri_parite)).start(0, 0); } if (direction_courante == 1) { personnage.gotoAndStop('DROITE'); } else { personnage.gotoAndStop('GAUCHE'); } } } frame 5 { if (etape_courante >= nb_etapes) { etape_courante = 1; gotoAndPlay('BOUCLE'); } else { ++etape_courante; gotoAndPlay('MOUVEMENT'); } } } movieClip 44 { frame 1 { stop(); } frame 14 { gotoAndStop(1); } } movieClip 48 { frame 7 { gotoAndStop('DROITE'); } frame 14 { gotoAndStop('GAUCHE'); } } movieClip 49 { frame 1 { if (_root.chemin_x[_parent.curseur] == _root.position_heros_x && _root.chemin_y[_parent.curseur] == _root.position_heros_y || _root.chemin_x[_parent.curseur] == _root.persistance_position_heros_x && _root.chemin_y[_parent.curseur] == _root.persistance_position_heros_y) { if (_root.jeu_on) { _root.position_heros_x = _root.persistance_position_heros_x; _root.position_heros_y = _root.persistance_position_heros_y; _root.mort.start(0, 0); _root.griffon_mort.start(0, 0); _root.game_over(); } } } frame 2 { gotoAndPlay(1); } } movieClip 50 bibli_griffon { frame 1 { stop(); } frame 2 { personnage.stop(); direction_courante = 0; pas_parite = 0; cri_parite = 0; ailes_parite = 1; etape_courante = 1; dernier_cri = curseur + 1; } frame 3 { _root.ennemi._x = _root.chemin_x[curseur] * _root.taille_case + _root.taille_marge; _root.ennemi._y = _root.chemin_y[curseur] * _root.taille_case + _root.taille_marge; if (curseur == 1) { _root.son_escaliers.start(0, 0); } if (curseur <= 0) { _root.game_over(); stop(); } else { if (!_root.jeu_on) { stop(); } else { pas_parite = (pas_parite + 1) % 2; (eval('_root.pas_griffon_' + pas_parite)).start(0, 0); direction_courante = (_root.chemin_directions[curseur - 1] + 2) % 4; gotoAndPlay('MOUVEMENT'); } } } frame 4 { gotoAndPlay('BOUCLE'); } frame 5 { switch (direction_courante) { case 0: _y = _y - _root.taille_case / nb_etapes; break; case 1: _x = _x + _root.taille_case / nb_etapes; break; case 2: _y = _y + _root.taille_case / nb_etapes; break; case 3: _x = _x - _root.taille_case / nb_etapes; } if (personnage._currentframe <= personnage._totalframes / 2) { personnage.gotoAndStop(Math.ceil((personnage._totalframes / 2) * etape_courante / nb_etapes)); } else { personnage.gotoAndStop(Math.ceil((personnage._totalframes / 2) * etape_courante / nb_etapes + personnage._totalframes / 2)); } if ((direction_courante == 1 && personnage._currentframe > personnage._totalframes / 2 || direction_courante == 3 && personnage._currentframe <= personnage._totalframes / 2) && curseur > 0 && _root.jeu_on) { if (dernier_cri - curseur > 3) { cri_parite = (cri_parite + 1) % 2; if (Math.random() < 0.4) { cri_parite += 2; } personnage.tete.play(); (eval('_root.cri_griffon_' + cri_parite)).start(0, 0); dernier_cri = curseur; } else { ailes_parite = (ailes_parite + 1) % 2; (eval('_root.aile_griffon_' + ailes_parite)).start(0, 0); } if (direction_courante == 1) { personnage.gotoAndStop('DROITE'); } else { personnage.gotoAndStop('GAUCHE'); } } if (etape_courante == Math.ceil(nb_etapes / 2)) { --curseur; } } frame 6 { if (etape_courante >= nb_etapes) { etape_courante = 1; gotoAndPlay('BOUCLE'); } else { ++etape_courante; gotoAndPlay('MOUVEMENT'); } } } movieClip 56 { frame 5 { gotoAndPlay('DROITE'); } frame 10 { gotoAndPlay('GAUCHE'); } } movieClip 57 bibli_heros { frame 1 { thesee.stop(); if (_root.jeu_on) { if (_root.position_heros_x == _root.arrivee_effective_x && _root.position_heros_y == _root.arrivee_effective_y) { _root.play(); stop(); } else { if (_root.file_clavier[0] != -1) { i = 0; for (;;) { if (!(_root.file_clavier[i] != -1 && i < 2)) break; if (!_root.matrice_laby[_root.position_heros_x][_root.position_heros_y][_root.file_clavier[i]]) { gotoAndPlay('direction_' + _root.file_clavier[i]); } ++i; } } } } } frame 2 { gotoAndPlay(1); } frame 3 { thesee.play(); } frame 5 { _root.persistance_position_heros_x = _root.position_heros_x; _root.persistance_position_heros_y = _root.position_heros_y; --_root.position_heros_y; if (_root.niveau == _root.nb_niveaux - 1 && _root.jeu_on) { i = 0; for (;;) { if (!(!chute && i < _root.fosse_x.length)) break; if (_root.position_heros_x == _root.fosse_x[i] && _root.position_heros_y == _root.fosse_y[i]) { _root.mort.start(0, 0); _root.game_over(); } ++i; } } pas_parite = (pas_parite + 1) % 2; (eval('_root.pas_' + pas_parite)).start(0, 0); } frame 6 { _root.persistance_position_heros_x = -1; _root.persistance_position_heros_y = -1; } frame 7 { _root.heros._y -= _root.taille_case; gotoAndPlay(1); } frame 8 { thesee.gotoAndPlay('DROITE'); } frame 10 { _root.persistance_position_heros_x = _root.position_heros_x; _root.persistance_position_heros_y = _root.position_heros_y; ++_root.position_heros_x; if (_root.niveau == _root.nb_niveaux - 1 && _root.jeu_on) { i = 0; for (;;) { if (!(!chute && i < _root.fosse_x.length)) break; if (_root.position_heros_x == _root.fosse_x[i] && _root.position_heros_y == _root.fosse_y[i]) { _root.mort.start(0, 0); _root.game_over(); } ++i; } } pas_parite = (pas_parite + 1) % 2; (eval('_root.pas_' + pas_parite)).start(0, 0); } frame 11 { _root.persistance_position_heros_x = -1; _root.persistance_position_heros_y = -1; } frame 12 { _root.heros._x += _root.taille_case; gotoAndPlay(1); } frame 13 { thesee.play(); } frame 15 { _root.persistance_position_heros_x = _root.position_heros_x; _root.persistance_position_heros_y = _root.position_heros_y; ++_root.position_heros_y; if (_root.niveau == _root.nb_niveaux - 1 && _root.jeu_on) { i = 0; for (;;) { if (!(!chute && i < _root.fosse_x.length)) break; if (_root.position_heros_x == _root.fosse_x[i] && _root.position_heros_y == _root.fosse_y[i]) { _root.mort.start(0, 0); _root.game_over(); } ++i; } } pas_parite = (pas_parite + 1) % 2; (eval('_root.pas_' + pas_parite)).start(0, 0); } frame 16 { _root.persistance_position_heros_x = -1; _root.persistance_position_heros_y = -1; } frame 17 { _root.heros._y += _root.taille_case; gotoAndPlay(1); } frame 18 { thesee.gotoAndPlay('GAUCHE'); } frame 20 { _root.persistance_position_heros_x = _root.position_heros_x; _root.persistance_position_heros_y = _root.position_heros_y; --_root.position_heros_x; if (_root.niveau == _root.nb_niveaux - 1 && _root.jeu_on) { i = 0; for (;;) { if (!(!chute && i < _root.fosse_x.length)) break; if (_root.position_heros_x == _root.fosse_x[i] && _root.position_heros_y == _root.fosse_y[i]) { _root.mort.start(0, 0); _root.game_over(); } ++i; } } pas_parite = (pas_parite + 1) % 2; (eval('_root.pas_' + pas_parite)).start(0, 0); } frame 21 { _root.persistance_position_heros_x = -1; _root.persistance_position_heros_y = -1; } frame 22 { _root.heros._x -= _root.taille_case; gotoAndPlay(1); } } frame 1 { curseur_temps = loader._totalframes - Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * loader._totalframes); if (curseur_temps > 227) { curseur_temps = 227; } if (curseur_temps == 0) { curseur_temps = 1; } loader.gotoAndStop(curseur_temps); } movieClip 119 { frame 1 { stop(); } } // unknown tag 88 length 181 frame 2 { if (_framesloaded < _totalframes) { gotoAndPlay(1); } else { loader.gotoAndStop(1); } } frame 3 { function creation_matrice(labyrinthe, taille_laby) { false; labyrinthe = new Array(); i = 0; while (i < taille_laby) { labyrinthe[i] = new Array(); j = 0; while (j < taille_laby) { labyrinthe[i][j] = new Array(true, true, true, true, false); ++j; } ++i; } return labyrinthe; } function applique_masque(labyrinthe, interdits_x, interdits_y, multiplicateur_x, multiplicateur_y, offset_masque_x, offset_masque_y) { i = 0; while (i < interdits_x.length) { j = 0; while (j < multiplicateur_x) { k = 0; while (k < multiplicateur_y) { if (interdits_x[i] * multiplicateur_x + j + offset_masque_x < labyrinthe.length && interdits_y[i] * multiplicateur_y + k + offset_masque_y < labyrinthe.length) { labyrinthe[interdits_x[i] * multiplicateur_x + j + offset_masque_x][interdits_y[i] * multiplicateur_y + k + offset_masque_y][4] = true; } ++k; } ++j; } ++i; } } function symetrie_verticale(labyrinthe) { abscisse = 0; while (abscisse < labyrinthe.length) { ordonnee = 0; while (ordonnee < Math.ceil(labyrinthe.length / 2)) { tampon = labyrinthe[abscisse][ordonnee][4]; labyrinthe[abscisse][ordonnee][4] = labyrinthe[abscisse][labyrinthe.length - 1 - ordonnee][4]; labyrinthe[abscisse][labyrinthe.length - 1 - ordonnee][4] = tampon; ++ordonnee; } ++abscisse; } } function symetrie_horizontale(labyrinthe) { abscisse = 0; while (abscisse < Math.ceil(labyrinthe.length / 2)) { ordonnee = 0; while (ordonnee < labyrinthe.length) { tampon = labyrinthe[abscisse][ordonnee][4]; labyrinthe[abscisse][ordonnee][4] = labyrinthe[labyrinthe.length - 1 - abscisse][ordonnee][4]; labyrinthe[labyrinthe.length - 1 - abscisse][ordonnee][4] = tampon; ++ordonnee; } ++abscisse; } } function visitee(case_laby) { if (case_laby[0] && case_laby[1] && case_laby[2] && case_laby[3] && !case_laby[4]) { return false; } else { return true; } } function deplace_creation(labyrinthe, pos_x, pos_y) { voisins_libres = new Array(); i = 0; if (pos_y > 0 && !labyrinthe[pos_x][pos_y - 1][4] && !visitee(labyrinthe[pos_x][pos_y - 1])) { voisins_libres[i] = 0; ++i; } if (pos_x < labyrinthe.length - 1 && !labyrinthe[pos_x + 1][pos_y][4] && !visitee(labyrinthe[pos_x + 1][pos_y])) { voisins_libres[i] = 1; ++i; } if (pos_y < labyrinthe.length - 1 && !labyrinthe[pos_x][pos_y + 1][4] && !visitee(labyrinthe[pos_x][pos_y + 1])) { voisins_libres[i] = 2; ++i; } if (pos_x > 0 && !labyrinthe[pos_x - 1][pos_y][4] && !visitee(labyrinthe[pos_x - 1][pos_y])) { voisins_libres[i] = 3; ++i; } if (i != 0) { pos_direction = voisins_libres[Math.floor(Math.random() * voisins_libres.length)]; labyrinthe[pos_x][pos_y][pos_direction] = false; switch (pos_direction) { case 0: labyrinthe[pos_x][pos_y - 1][(pos_direction + 2) % 4] = false; break; case 1: labyrinthe[pos_x + 1][pos_y][(pos_direction + 2) % 4] = false; break; case 2: labyrinthe[pos_x][pos_y + 1][(pos_direction + 2) % 4] = false; break; case 3: labyrinthe[pos_x - 1][pos_y][(pos_direction + 2) % 4] = false; } return pos_direction; } else { return -1; } } function impasse(case_laby) { nb_murs = 0; i = 0; while (i < 4) { if (case_laby[i]) { ++nb_murs; } ++i; } if (nb_murs == 3 && !case_laby[4]) { return true; } else { return false; } } function affecte_impasse(labyrinthe, code_angle, type_recherche) { if (code_angle < 4) { balayage = 0; } else { impasse_trouvee = false; if (labyrinthe.length % 2 == 1) { balayage = 1; } else { balayage = 2; } correctif = -3; } do { if (code_angle < 4) { scan_balayage = 0; do { switch (code_angle) { case 0: impasse_trouvee = impasse(labyrinthe[labyrinthe.length - (balayage - scan_balayage)][scan_balayage]); break; case 1: impasse_trouvee = impasse(labyrinthe[labyrinthe.length - (balayage - scan_balayage)][labyrinthe.length - scan_balayage]); break; case 2: impasse_trouvee = impasse(labyrinthe[balayage - scan_balayage][labyrinthe.length - scan_balayage]); break; case 3: impasse_trouvee = impasse(labyrinthe[balayage - scan_balayage][scan_balayage]); } if (!impasse_trouvee) { ++scan_balayage; } } while (scan_balayage <= balayage && !impasse_trouvee); if (!impasse_trouvee) { ++balayage; } } else { scan_balayage = 0; for (;;) { if (!(!impasse_trouvee && (scan_balayage < 4 * (balayage - 1) || balayage == 1 && scan_balayage == 0))) break; if (scan_balayage < balayage) { coord_x = Math.floor(labyrinthe.length / 2) - Math.floor(balayage / 2) + scan_balayage; coord_y = Math.floor(labyrinthe.length / 2 + correctif) - Math.floor(balayage / 2); impasse_trouvee = impasse(labyrinthe[coord_x][coord_y]); } else { if (scan_balayage < 2 * (balayage - 1)) { coord_x = Math.floor(labyrinthe.length / 2) + Math.floor((balayage - 1) / 2); coord_y = Math.floor(labyrinthe.length / 2 + correctif) - Math.floor(balayage / 2) + scan_balayage - (balayage - 1); impasse_trouvee = impasse(labyrinthe[coord_x][coord_y]); } else { if (scan_balayage < 3 * balayage - 2) { coord_x = Math.floor(labyrinthe.length / 2) - Math.floor(balayage / 2) + scan_balayage - 2 * (balayage - 1); coord_y = Math.floor(labyrinthe.length / 2 + correctif) + Math.floor((balayage - 1) / 2); impasse_trouvee = impasse(labyrinthe[coord_x][coord_y]); } else { coord_x = Math.floor(labyrinthe.length / 2) - Math.floor(balayage / 2); coord_y = Math.floor(labyrinthe.length / 2 + correctif) - Math.floor(balayage / 2) + scan_balayage - 3 * (balayage - 1); impasse_trouvee = impasse(labyrinthe[coord_x][coord_y]); } } } ++scan_balayage; } if (!impasse_trouvee) { balayage += 2; } } } while (!impasse_trouvee); switch (code_angle) { case 0: eval(type_recherche + '_x') = labyrinthe.length - (balayage - scan_balayage); eval(type_recherche + '_y') = scan_balayage; break; case 1: eval(type_recherche + '_x') = labyrinthe.length - (balayage - scan_balayage); eval(type_recherche + '_y') = labyrinthe.length - scan_balayage; break; case 2: eval(type_recherche + '_x') = balayage - scan_balayage; eval(type_recherche + '_y') = labyrinthe.length - scan_balayage; break; case 3: eval(type_recherche + '_x') = balayage - scan_balayage; eval(type_recherche + '_y') = scan_balayage; break; case 4: eval(type_recherche + '_x') = coord_x; eval(type_recherche + '_y') = coord_y; } if (type_recherche == 'arrivee') { i = 0; while (i < 4) { if (!labyrinthe[arrivee_x][arrivee_y][i]) { switch (i) { case 0: arrivee_effective_x = arrivee_x; arrivee_effective_y = arrivee_y - 1; break; case 1: arrivee_effective_x = arrivee_x + 1; arrivee_effective_y = arrivee_y; break; case 2: arrivee_effective_x = arrivee_x; arrivee_effective_y = arrivee_y + 1; break; case 3: arrivee_effective_x = arrivee_x - 1; arrivee_effective_y = arrivee_y; } } ++i; } } } function genere(labyrinthe, angle_depart, angle_arrivee) { trajet_x = new Array(); trajet_y = new Array(); curseur_trajet = 0; do { trajet_x[0] = Math.floor(Math.random() * labyrinthe.length); trajet_y[0] = Math.floor(Math.random() * labyrinthe.length); } while (labyrinthe[trajet_x[0]][trajet_y[0]][4]); do { pos_direction = deplace_creation(labyrinthe, trajet_x[curseur_trajet], trajet_y[curseur_trajet]); if (pos_direction != -1) { ++curseur_trajet; trajet_x[curseur_trajet] = trajet_x[curseur_trajet - 1]; trajet_y[curseur_trajet] = trajet_y[curseur_trajet - 1]; } switch (pos_direction) { case -1: --curseur_trajet; break; case 0: --trajet_y[curseur_trajet]; break; case 1: ++trajet_x[curseur_trajet]; break; case 2: ++trajet_y[curseur_trajet]; break; case 3: --trajet_x[curseur_trajet]; continue; } } while (curseur_trajet != 0); interdits_x = new Array(); interdits_y = new Array(); curseur_interdits = 0; i = 0; while (i < labyrinthe.length) { j = 0; while (j < labyrinthe.length) { if (labyrinthe[i][j][4]) { interdits_x[curseur_interdits] = i; interdits_y[curseur_interdits] = j; ++curseur_interdits; } ++j; } ++i; } if (interdits_x.length > 0) { curseur_interdits = 0; i = 0; while (i < interdits_x.length) { labyrinthe[interdits_x[i]][interdits_y[i]][4] = false; ++i; } do { curseur_trajet = 0; trajet_x[0] = interdits_x[curseur_interdits]; trajet_y[0] = interdits_y[curseur_interdits]; do { pos_direction = deplace_creation(labyrinthe, trajet_x[curseur_trajet], trajet_y[curseur_trajet]); if (pos_direction != -1) { ++curseur_trajet; trajet_x[curseur_trajet] = trajet_x[curseur_trajet - 1]; trajet_y[curseur_trajet] = trajet_y[curseur_trajet - 1]; } switch (pos_direction) { case -1: if (curseur_trajet == 0) { labyrinthe[trajet_x[curseur_trajet]][trajet_y[curseur_trajet]][4] = true; } --curseur_trajet; break; case 0: --trajet_y[curseur_trajet]; break; case 1: ++trajet_x[curseur_trajet]; break; case 2: ++trajet_y[curseur_trajet]; break; case 3: --trajet_x[curseur_trajet]; continue; } } while (curseur_trajet > -1); do { ++curseur_interdits; } while (visitee(labyrinthe[interdits_x[curseur_interdits]][interdits_y[curseur_interdits]]) && curseur_interdits < interdits_x.length); } while (curseur_interdits < interdits_x.length); i = 0; while (i < interdits_x.length) { labyrinthe[interdits_x[i]][interdits_y[i]][4] = true; ++i; } } affecte_impasse(labyrinthe, angle_depart, 'depart'); affecte_impasse(labyrinthe, angle_arrivee, 'arrivee'); } function nettoie_chemin_global() { while (chemin_x.length != 0) { chemin_x.pop(); } while (chemin_y.length != 0) { chemin_y.pop(); } while (chemin_directions.length != 0) { chemin_directions.pop(); } } function recherche_DFS(labyrinthe, DFS_x, DFS_y, DFS_directions, start_x, start_y, goal_x, goal_y) { DFS_x[0] = start_x; DFS_y[0] = start_y; DFS_directions[0] = 0; curseur = 0; do { direction_test = DFS_directions[curseur]; for (;;) { if (!(direction_test < 4 && (labyrinthe[DFS_x[curseur]][DFS_y[curseur]][direction_test] || curseur != 0 && direction_test == (DFS_directions[curseur - 1] + 2) % 4))) break; ++direction_test; } if (direction_test != 4) { DFS_directions[curseur] = direction_test; ++curseur; switch (direction_test) { case 0: DFS_x[curseur] = DFS_x[curseur - 1]; DFS_y[curseur] = DFS_y[curseur - 1] - 1; break; case 1: DFS_x[curseur] = DFS_x[curseur - 1] + 1; DFS_y[curseur] = DFS_y[curseur - 1]; break; case 2: DFS_x[curseur] = DFS_x[curseur - 1]; DFS_y[curseur] = DFS_y[curseur - 1] + 1; break; case 3: DFS_x[curseur] = DFS_x[curseur - 1] - 1; DFS_y[curseur] = DFS_y[curseur - 1]; } DFS_directions[curseur] = 0; } else { --curseur; DFS_x.pop(); DFS_y.pop(); DFS_directions.pop(); ++DFS_directions[curseur]; } } while (!(DFS_x[curseur] == goal_x && DFS_y[curseur] == goal_y)); } function dessiner_marches(escaliers_x, escaliers_y, largeur_case, escaliers_direction, couleur_direction) { switch (escaliers_direction) { case 0: i = 0; while (i <= nb_marches_escaliers) { maze.lineStyle(largeur_trait, couleur_trait, 100 - i * 100 / nb_marches_escaliers); maze.moveTo(escaliers_x, escaliers_y + i * Math.floor(largeur_case / nb_marches_escaliers)); maze.beginFill(couleur_direction, i * 100 / nb_marches_escaliers); maze.lineTo(escaliers_x + largeur_case, escaliers_y + i * Math.floor(largeur_case / nb_marches_escaliers)); maze.lineStyle(); if ((i + 1) * Math.floor(largeur_case / nb_marches_escaliers) < largeur_case) { maze.lineTo(escaliers_x + largeur_case, escaliers_y + (i + 1) * Math.floor(largeur_case / nb_marches_escaliers)); maze.lineTo(escaliers_x, escaliers_y + (i + 1) * Math.floor(largeur_case / nb_marches_escaliers)); } else { maze.lineTo(escaliers_x + largeur_case, escaliers_y + largeur_case); maze.lineTo(escaliers_x, escaliers_y + largeur_case); } maze.lineTo(escaliers_x, escaliers_y + i * Math.floor(largeur_case / nb_marches_escaliers)); maze.endFill(); ++i; } break; case 1: i = 0; while (i <= nb_marches_escaliers) { maze.lineStyle(largeur_trait, couleur_trait, 100 - i * 100 / nb_marches_escaliers); maze.moveTo(escaliers_x + largeur_case - i * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y); maze.beginFill(couleur_direction, i * 100 / nb_marches_escaliers); maze.lineTo(escaliers_x + largeur_case - i * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y + largeur_case); maze.lineStyle(); if ((i + 1) * Math.floor(largeur_case / nb_marches_escaliers) < largeur_case) { maze.lineTo(escaliers_x + largeur_case - (i + 1) * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y + largeur_case); maze.lineTo(escaliers_x + largeur_case - (i + 1) * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y); } else { maze.lineTo(escaliers_x, escaliers_y + largeur_case); maze.lineTo(escaliers_x, escaliers_y); } maze.lineTo(escaliers_x + largeur_case - i * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y); maze.endFill(); ++i; } break; case 2: i = 0; while (i <= nb_marches_escaliers) { maze.lineStyle(largeur_trait, couleur_trait, 100 - i * 100 / nb_marches_escaliers); maze.moveTo(escaliers_x, escaliers_y + largeur_case - i * Math.floor(largeur_case / nb_marches_escaliers)); maze.beginFill(couleur_direction, i * 100 / nb_marches_escaliers); maze.lineTo(escaliers_x + largeur_case, escaliers_y + largeur_case - i * Math.floor(largeur_case / nb_marches_escaliers)); maze.lineStyle(); if ((i + 1) * Math.floor(largeur_case / nb_marches_escaliers) < largeur_case) { maze.lineTo(escaliers_x + largeur_case, escaliers_y + largeur_case - (i + 1) * Math.floor(largeur_case / nb_marches_escaliers)); maze.lineTo(escaliers_x, escaliers_y + largeur_case - (i + 1) * Math.floor(largeur_case / nb_marches_escaliers)); } else { maze.lineTo(escaliers_x + largeur_case, escaliers_y); maze.lineTo(escaliers_x, escaliers_y); } maze.lineTo(escaliers_x, escaliers_y + largeur_case - i * Math.floor(largeur_case / nb_marches_escaliers)); maze.endFill(); ++i; } break; case 3: i = 0; while (i <= nb_marches_escaliers) { maze.lineStyle(largeur_trait, couleur_trait, 100 - i * 100 / nb_marches_escaliers); maze.moveTo(escaliers_x + i * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y); maze.beginFill(couleur_direction, i * 100 / nb_marches_escaliers); maze.lineTo(escaliers_x + i * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y + largeur_case); maze.lineStyle(); if ((i + 1) * Math.floor(largeur_case / nb_marches_escaliers) < largeur_case) { maze.lineTo(escaliers_x + (i + 1) * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y + largeur_case); maze.lineTo(escaliers_x + (i + 1) * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y); } else { maze.lineTo(escaliers_x + largeur_case, escaliers_y + largeur_case); maze.lineTo(escaliers_x + largeur_case, escaliers_y); } maze.lineTo(escaliers_x + i * Math.floor(largeur_case / nb_marches_escaliers), escaliers_y); maze.endFill(); ++i; } } } function affiche_chemin(labyrinthe, DFS_x, DFS_y) { profondeur_chemin = chemin.getDepth(); removeMovieClip(chemin); _root.createEmptyMovieClip('chemin', profondeur_chemin); chemin.lineStyle(largeur_trait, 16777215); chemin.moveTo(DFS_x[1] * taille_case + taille_case / 2 + taille_marge, DFS_y[1] * taille_case + taille_case / 2 + taille_marge); i = 2; while (i < chemin_x.length) { chemin.lineTo(DFS_x[i] * taille_case + taille_case / 2 + taille_marge, DFS_y[i] * taille_case + taille_case / 2 + taille_marge); ++i; } } function affiche_maze(labyrinthe, largeur_case) { taille_case = largeur_case; profondeur_maze = maze.getDepth(); removeMovieClip(maze); _root.createEmptyMovieClip('maze', profondeur_maze); marge = (taille_swf - labyrinthe.length * largeur_case) / 2; taille_marge = marge; trait = largeur_case + 0.5; maze.lineStyle(); maze.moveTo(0, 0); maze.beginFill(couleur_marges, opacite_marges); maze.lineTo(taille_swf, 0); maze.lineTo(taille_swf, marge); maze.lineTo(0, marge); maze.lineTo(0, 0); maze.endFill(); maze.moveTo(taille_swf - marge, marge); maze.beginFill(couleur_marges, opacite_marges); maze.lineTo(taille_swf, marge); maze.lineTo(taille_swf, taille_swf - marge); maze.lineTo(taille_swf - marge, taille_swf - marge); maze.lineTo(taille_swf - marge, marge); maze.endFill(); maze.lineStyle(); maze.moveTo(0, taille_swf - marge); maze.beginFill(couleur_marges, opacite_marges); maze.lineTo(taille_swf, taille_swf - marge); maze.lineTo(taille_swf, taille_swf); maze.lineTo(0, taille_swf); maze.lineTo(0, taille_swf - marge); maze.endFill(); maze.moveTo(0, marge); maze.beginFill(couleur_marges, opacite_marges); maze.lineTo(marge, marge); maze.lineTo(marge, taille_swf - marge); maze.lineTo(0, taille_swf - marge); maze.lineTo(0, marge); maze.endFill(); direction_escaliers = 0; while (labyrinthe[depart_x][depart_y][direction_escaliers]) { ++direction_escaliers; } dessiner_marches(depart_x * largeur_case + marge, depart_y * largeur_case + marge, largeur_case, direction_escaliers, couleur_escaliers_depart); if (niveau != nb_niveaux - 1) { direction_escaliers = 0; while (labyrinthe[arrivee_x][arrivee_y][direction_escaliers]) { ++direction_escaliers; } dessiner_marches(arrivee_x * largeur_case + marge, arrivee_y * largeur_case + marge, largeur_case, direction_escaliers, couleur_escaliers_arrivee); } maze.lineStyle(largeur_trait, couleur_trait); maze.moveTo(marge, marge); maze.lineTo(taille_swf - marge, marge); maze.lineTo(taille_swf - marge, taille_swf - marge); maze.lineTo(marge, taille_swf - marge); maze.lineTo(marge, marge); i = 0; while (i < labyrinthe.length) { j = 0; while (j < labyrinthe.length) { if (labyrinthe[i][j][4]) { maze.lineStyle(); maze.moveTo(i * largeur_case + marge, j * largeur_case + marge); maze.beginFill(couleur_interdit, opacite_interdit); maze.lineTo(i * largeur_case + largeur_case + marge, j * largeur_case + marge); maze.lineTo(i * largeur_case + largeur_case + marge, j * largeur_case + largeur_case + marge); maze.lineTo(i * largeur_case + marge, j * largeur_case + largeur_case + marge); maze.lineTo(i * largeur_case + marge, j * largeur_case + marge); maze.endFill(); } maze.lineStyle(largeur_trait, couleur_trait); if (labyrinthe[i][j][1] && i < labyrinthe.length - 1) { maze.moveTo(i * largeur_case + largeur_case + marge, j * largeur_case + marge); maze.lineTo(i * largeur_case + largeur_case + marge, j * largeur_case + trait + marge); } if (labyrinthe[i][j][2] && j < labyrinthe.length - 1) { maze.moveTo(i * largeur_case + marge, j * largeur_case + largeur_case + marge); maze.lineTo(i * largeur_case + trait + marge, j * largeur_case + largeur_case + marge); } ++j; } ++i; } } function casse_mur(labyrinthe, coord_x, coord_y, direction_casse) { if (coord_x >= 0 && coord_y >= 0 && coord_x < labyrinthe.length && coord_y < labyrinthe.length) { switch (direction_casse) { case 0: if (coord_y > 0) { labyrinthe[coord_x][coord_y][direction_casse] = false; labyrinthe[coord_x][coord_y - 1][(direction_casse + 2) % 4] = false; } break; case 1: if (coord_x < labyrinthe.length - 1) { labyrinthe[coord_x][coord_y][direction_casse] = false; labyrinthe[coord_x + 1][coord_y][(direction_casse + 2) % 4] = false; } break; case 2: if (coord_y < labyrinthe.length - 1) { labyrinthe[coord_x][coord_y][direction_casse] = false; labyrinthe[coord_x][coord_y + 1][(direction_casse + 2) % 4] = false; } break; case 3: if (coord_x > 0) { labyrinthe[coord_x][coord_y][direction_casse] = false; labyrinthe[coord_x - 1][coord_y][(direction_casse + 2) % 4] = false; } } } } function confirme_mur_ES(labyrinthe, coord_x, coord_y, est, sud) { if (!est) { casse_mur(labyrinthe, coord_x, coord_y, 1); } if (!sud) { casse_mur(labyrinthe, coord_x, coord_y, 2); } } function vide_file(tableau) { i = 0; while (i < tableau.length) { tableau[i] = -1; ++i; } } function ajout_file_clavier(code_direction) { i = 0; for (;;) { if (!(i < file_clavier.length && file_clavier[i] != code_direction)) break; ++i; } if (i == file_clavier.length) { file_clavier.unshift(code_direction); file_clavier.pop(); } } function enleve_file_clavier(code_direction) { i = 0; for (;;) { if (!(i < file_clavier.length && file_clavier[i] != code_direction)) break; ++i; } if (i < file_clavier.length) { file_clavier.splice(i, 1); file_clavier.push(-1); } } function game_over() { _root.jeu_on = false; _root.heros.stop(); _root.heros.thesee.stop(); _root.ennemi.stop(); _root.ennemi.personnage.stop(); _root.play(); } _focusrect = false; niveau = 0; nb_niveaux = 16; largeur_trait = 1; couleur_trait = 1843497; couleur_escaliers_depart = 6845324; couleur_escaliers_arrivee = 4345182; nb_marches_escaliers = 4; couleur_interdit = 1513285; couleur_marges = 1051433; opacite_interdit = 23; opacite_marges = 32; mode_jeu = 'RIEN'; angle_depart_courant = 0; matrice_laby = new Array(); chemin_x = new Array(); chemin_y = new Array(); chemin_directions = new Array(); taille_case = 0; taille_marge = 0; position_heros_x = 0; position_heros_y = 0; persistance_position_heros_x = -1; persistance_position_heros_y = -1; vies = 0; depart_x = 0; depart_y = 0; arrivee_x = 0; arrivee_y = 0; arrivee_effective_x = 0; arrivee_effective_y = 0; file_clavier = new Array(-1, -1, -1, -1); jeu_on = false; taille_swf = 730; fin_OK = new Sound(); fin_OK.attachSound('fin_OK'); fin_death = new Sound(); fin_death.attachSound('fin_death'); menu_run = new Sound(); menu_run.attachSound('menu_run'); son_escaliers = new Sound(); son_escaliers.attachSound('bibli_escaliers'); papier = new Sound(); papier.attachSound('papier'); pas_0 = new Sound(); pas_0.attachSound('bibli_pas_1'); pas_1 = new Sound(); pas_1.attachSound('bibli_pas_2'); mort = new Sound(); mort.attachSound('bibli_mort'); pas_griffon_0 = new Sound(); pas_griffon_0.attachSound('bibli_pas_griffon_1'); pas_griffon_1 = new Sound(); pas_griffon_1.attachSound('bibli_pas_griffon_2'); cri_griffon_0 = new Sound(); cri_griffon_0.attachSound('bibli_cri_griffon_1'); cri_griffon_1 = new Sound(); cri_griffon_1.attachSound('bibli_cri_griffon_2'); cri_griffon_2 = new Sound(); cri_griffon_2.attachSound('bibli_cri_griffon_3'); cri_griffon_3 = new Sound(); cri_griffon_3.attachSound('bibli_cri_griffon_4'); aile_griffon_0 = new Sound(); aile_griffon_0.attachSound('bibli_ailes_griffon_1'); aile_griffon_1 = new Sound(); aile_griffon_1.attachSound('bibli_ailes_griffon_2'); griffon_mort = new Sound(); griffon_mort.attachSound('bibli_griffon_mort'); sifflement_griffon = new Sound(); sifflement_griffon.attachSound('bibli_sifflement_griffon'); sifflement_griffon.onSoundComplete = function () { if (jeu_on && (position_heros_x != arrivee_effective_x || position_heros_y != arrivee_effective_y) && ennemi.curseur > 0) { if (Math.random() < 0.4) { sifflement_griffon.attachSound('bibli_sifflement_griffon_b'); sifflement_griffon.start(0, 0); sifflement_griffon.attachSound('bibli_sifflement_griffon'); } else { sifflement_griffon.start(0, 0); } } }; dernier_niveau = new Sound(); dernier_niveau.attachSound('dernier_niveau'); minotaure_pas_0 = new Sound(); minotaure_pas_0.attachSound('bibli_minotaure_pas_1'); minotaure_pas_1 = new Sound(); minotaure_pas_1.attachSound('bibli_minotaure_pas_2'); minotaure_attaque_0 = new Sound(); minotaure_attaque_0.attachSound('bibli_minotaure_attaque_1'); minotaure_attaque_1 = new Sound(); minotaure_attaque_1.attachSound('bibli_minotaure_attaque_2'); minotaure_impact = new Sound(); minotaure_impact.attachSound('bibli_minotaure_impact'); minotaure_kill = new Sound(); minotaure_kill.attachSound('bibli_minotaure_kill'); minotaure_mort = new Sound(); minotaure_mort.attachSound('bibli_minotaure_mort'); cri_minotaure_0 = new Sound(); cri_minotaure_0.attachSound('bibli_cri_minotaure_1'); cri_minotaure_1 = new Sound(); cri_minotaure_1.attachSound('bibli_cri_minotaure_2'); cri_minotaure_2 = new Sound(); cri_minotaure_2.attachSound('bibli_cri_minotaure_light_1'); cri_minotaure_3 = new Sound(); cri_minotaure_3.attachSound('bibli_cri_minotaure_light_2'); fosse_x = new Array(10, 11, 12); fosse_y = new Array(8, 8, 8); masque_point_x = new Array(); masque_point_x[0] = 0; masque_point_y = new Array(); masque_point_y[0] = 0; masque_forteresse_x = new Array(0, 1, 3, 4, 0, 4, 0, 4, 0, 1, 3, 4); masque_forteresse_y = new Array(0, 0, 0, 0, 1, 1, 3, 3, 4, 4, 4, 4); masque_mario_x = new Array(1, 2, 3, 4, 5, 6, 0, 1, 6, 7, 0, 1, 6, 7, 0, 1, 6, 7, 0, 1, 6, 7, 5, 6, 7, 4, 5, 4, 5, 4, 5, 4, 5); masque_mario_y = new Array(0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 7, 7, 10, 10, 11, 11); motif_grec_x = new Array(0, 1, 2, 2, 2, 3, 4); motif_grec_y = new Array(2, 2, 2, 1, 0, 0, 0); masque_interrogation_x = new Array(0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 0); masque_interrogation_y = new Array(0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 7); var clavier = new Object(); var bouton_press = new Object(); clavier.onKeyDown = function () { if (jeu_on) { if (Key.getCode() == 38 || Key.getCode() == 74) { ajout_file_clavier(0); } if (Key.getCode() == 39 || Key.getCode() == 67) { ajout_file_clavier(1); } if (Key.getCode() == 40 || Key.getCode() == 78) { ajout_file_clavier(2); } if (Key.getCode() == 37 || Key.getCode() == 88) { ajout_file_clavier(3); } if (Key.getCode() == 35 || Key.getCode() == 27) { menu_run.start(0, 0); mode_jeu = 'STOP'; gotoAndPlay('STOP'); } } }; clavier.onKeyUp = function () { if (jeu_on) { if (Key.getCode() == 38 || Key.getCode() == 74) { enleve_file_clavier(0); } if (Key.getCode() == 39 || Key.getCode() == 67) { enleve_file_clavier(1); } if (Key.getCode() == 40 || Key.getCode() == 78) { enleve_file_clavier(2); } if (Key.getCode() == 37 || Key.getCode() == 88) { enleve_file_clavier(3); } } }; bouton_press.onKeyDown = function () { if (Key.getCode() == 13 || Key.getCode() == 32) { bouton.gotoAndStop(2); } }; bouton_press.onKeyUp = function () { if (Key.getCode() == 13 || Key.getCode() == 32) { bouton.gotoAndStop(1); papier.start(0, 0); play(); } }; } movieClip 126 { frame 61 { gotoAndPlay(1); } } movieClip 129 { } movieClip 132 { } button 141 { on (release) { _root.mode_jeu = 'RANDOM'; stade = 'RANDOM'; gotoAndPlay('OFF'); } } button 143 { on (release) { _root.mode_jeu = 'QUEST_FREE'; _root.play(); } } button 145 { on (release) { _root.mode_jeu = 'QUEST_TIME'; stade = 'DIFFICULTE'; gotoAndPlay('OFF'); } } button 147 { on (release) { _root.mode_jeu = 'QUEST_FOE'; stade = 'DIFFICULTE'; gotoAndPlay('OFF'); } } button 151 { on (release) { getURL('http://riddler.batbad.com/', '_top'); } } button 157 { on (release) { _root.mode_jeu += '_LARGE'; gotoAndPlay('RANDOM_OFF'); } } button 159 { on (release) { _root.mode_jeu += '_MEDIUM'; gotoAndPlay('RANDOM_OFF'); } } button 161 { on (release) { _root.mode_jeu += '_TINY'; gotoAndPlay('RANDOM_OFF'); } } button 163 { on (release) { _root.mode_jeu += '_QUEST'; gotoAndPlay('RANDOM_OFF'); } } button 166 { on (release) { _root.mode_jeu += '_FREE'; _root.play(); } } button 168 { on (release) { _root.mode_jeu += '_TIME'; gotoAndPlay('TYPE_OFF'); } } button 170 { on (release) { _root.mode_jeu += '_FOE'; gotoAndPlay('TYPE_OFF'); } } button 175 { on (release) { _root.mode_jeu += '_HARD'; _root.play(); } } button 177 { on (release) { _root.mode_jeu += '_MODERATE'; _root.play(); } } button 179 { on (release) { _root.mode_jeu += '_EASY'; _root.play(); } } movieClip 180 { frame 1 { stade = 'MAIN'; } frame 340 { if (stade != 'MAIN') { gotoAndPlay(stade); } } frame 471 { gotoAndPlay(1); } frame 483 { stop(); } frame 504 { stop(); } frame 514 { gotoAndPlay('DIFFICULTE'); } frame 526 { stop(); } } frame 12 { stop(); } frame 20 { angle_depart_courant = Math.floor(Math.random() * 4); if (mode_jeu.indexOf('QUEST') != -1 && mode_jeu.indexOf('RANDOM') == -1 && mode_jeu.indexOf('FREE') == -1) { vies = 3; } else { vies = 0; } niveau = 0; } movieClip 182 { } movieClip 185 { frame 1 { stop(); } } movieClip 187 { } frame 29 { if (mode_jeu.indexOf('RANDOM') != -1 && mode_jeu.indexOf('QUEST') == -1) { if (mode_jeu.indexOf('TINY') != -1) { message_niveau.titre_niveau.text = 'tiny maze'; } else { if (mode_jeu.indexOf('MEDIUM') != -1) { message_niveau.titre_niveau.text = 'o.k. maze'; } else { if (mode_jeu.indexOf('LARGE') != -1) { message_niveau.titre_niveau.text = 'large maze'; } } } if (mode_jeu.indexOf('FOE') != -1) { if (mode_jeu.indexOf('EASY') != -1) { message_niveau.commentaire_niveau.text = 'with slow opponent'; } else { if (mode_jeu.indexOf('MODERATE') != -1) { message_niveau.commentaire_niveau.text = 'with moderate opponent'; } else { if (mode_jeu.indexOf('HARD') != -1) { message_niveau.commentaire_niveau.text = 'with fierce opponent'; } } } } if (mode_jeu.indexOf('TIME') != -1) { if (mode_jeu.indexOf('EASY') != -1) { message_niveau.commentaire_niveau.text = 'very loose timer'; } else { if (mode_jeu.indexOf('MODERATE') != -1) { message_niveau.commentaire_niveau.text = 'moderate timer'; } else { if (mode_jeu.indexOf('HARD') != -1) { message_niveau.commentaire_niveau.text = 'very tight timer'; } } } } if (mode_jeu.indexOf('FREE') != -1) { message_niveau.commentaire_niveau.text = 'look freely for the exit'; } } else { if (mode_jeu.indexOf('RANDOM') == -1) { if (niveau < nb_niveaux - 1) { message_niveau.titre_niveau.text = 'level ' + (niveau + 1); } else { dernier_niveau.start(0, 0); message_niveau.titre_niveau.text = 'final level'; } } else { message_niveau.titre_niveau.text = 'quest maze'; niveau = Math.floor((nb_niveaux - 3) * Math.random()) + 1; } switch (niveau) { case 0: message_niveau.commentaire_niveau.text = 'basic beginnings'; break; case 1: message_niveau.commentaire_niveau.text = 'swirl'; break; case 2: message_niveau.commentaire_niveau.text = 'this way'; break; case 3: message_niveau.commentaire_niveau.text = 'the fortress'; break; case 4: message_niveau.commentaire_niveau.text = 'strength, courage and wisdom'; break; case 5: message_niveau.commentaire_niveau.text = 'the main pillar'; break; case 6: message_niveau.commentaire_niveau.text = 'greek tapestry'; break; case 7: message_niveau.commentaire_niveau.text = 'the minotaur is in another maze'; break; case 8: message_niveau.commentaire_niveau.text = 'meta maze'; break; case 9: message_niveau.commentaire_niveau.text = 'the crossroads'; break; case 10: message_niveau.commentaire_niveau.text = 'sandglass'; break; case 11: message_niveau.commentaire_niveau.text = 'nine rooms'; break; case 12: message_niveau.commentaire_niveau.text = 'the temple'; break; case 13: message_niveau.commentaire_niveau.text = 'u-turn'; break; case 14: message_niveau.commentaire_niveau.text = 'almost there ?'; break; case nb_niveaux - 1: message_niveau.commentaire_niveau.text = 'beware the minotaur'; } } message_niveau.vies.gotoAndStop(vies + 1); } movieClip 189 { frame 1 { stop(); } } // unknown tag 88 length 71 movieClip 193 { } frame 41 { if (mode_jeu.indexOf('QUEST') != -1) { switch (niveau) { case 0: matrice_laby = creation_matrice(matrice_laby, 25); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 24); break; case 1: matrice_laby = creation_matrice(matrice_laby, 29); pas = 9; applique_masque(matrice_laby, masque_point_x, masque_point_y, 2 * (pas + 1), 1, 0, pas); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 5, 2 * pas + 1, pas); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2 * (pas + 1), 1, matrice_laby.length - 2 * (pas + 1), matrice_laby.length - 1 - pas); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 5, pas, 2 * pas - 3); if (angle_depart_courant % 2 == 0) { symetrie_verticale(matrice_laby); } angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 21); break; case 2: matrice_laby = creation_matrice(matrice_laby, 29); marge_fleche = 6; taille_fleche = 13; ligne = 0; while (ligne < taille_fleche) { applique_masque(matrice_laby, masque_point_x, masque_point_y, taille_fleche - ligne, 1, marge_fleche, marge_fleche + ligne); ++ligne; } angle_arrivee_courant = (angle_depart_courant + 2) % 4; switch (angle_arrivee_courant) { case 0: symetrie_horizontale(matrice_laby); break; case 1: symetrie_horizontale(matrice_laby); symetrie_verticale(matrice_laby); break; case 2: symetrie_verticale(matrice_laby); } genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 21); break; case 3: matrice_laby = creation_matrice(matrice_laby, 34); applique_masque(matrice_laby, masque_forteresse_x, masque_forteresse_y, 2, 2, 12, 12); applique_masque(matrice_laby, masque_point_x, masque_point_y, 14, 6, 10, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 14, 6, 10, 28); applique_masque(matrice_laby, masque_point_x, masque_point_y, 6, 14, 0, 10); applique_masque(matrice_laby, masque_point_x, masque_point_y, 6, 14, 28, 10); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 18); break; case 4: matrice_laby = creation_matrice(matrice_laby, 33); largeur_triangle = 13; marge_triangle_x = 3; marge_triangle_y = 3; ligne = 0; while (ligne < largeur_triangle) { applique_masque(matrice_laby, masque_point_x, masque_point_y, largeur_triangle - ligne, 1, marge_triangle_x + ligne / 2, marge_triangle_y + ligne); applique_masque(matrice_laby, masque_point_x, masque_point_y, largeur_triangle - ligne, 1, marge_triangle_x + ligne / 2, marge_triangle_y + ligne + 1); ligne += 2; } marge_triangle_x += largeur_triangle + 1; ligne = 0; while (ligne < largeur_triangle) { applique_masque(matrice_laby, masque_point_x, masque_point_y, largeur_triangle - ligne, 1, marge_triangle_x + ligne / 2, marge_triangle_y + ligne); applique_masque(matrice_laby, masque_point_x, masque_point_y, largeur_triangle - ligne, 1, marge_triangle_x + ligne / 2, marge_triangle_y + ligne + 1); ligne += 2; } marge_triangle_x -= Math.floor(largeur_triangle / 2) + 1; marge_triangle_y += largeur_triangle + 2; ligne = 0; while (ligne < largeur_triangle) { applique_masque(matrice_laby, masque_point_x, masque_point_y, largeur_triangle - ligne, 1, marge_triangle_x + ligne / 2, marge_triangle_y + ligne); applique_masque(matrice_laby, masque_point_x, masque_point_y, largeur_triangle - ligne, 1, marge_triangle_x + ligne / 2, marge_triangle_y + ligne + 1); ligne += 2; } symetrie_verticale(matrice_laby); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 19); break; case 5: matrice_laby = creation_matrice(matrice_laby, 35); case_x = 0; while (case_x < matrice_laby.length) { case_y = 0; while (case_y < matrice_laby.length) { if (Math.sqrt(Math.pow(Math.floor(matrice_laby.length / 2) - case_x, 2) + Math.pow(Math.floor(matrice_laby.length / 2) - case_y, 2)) > Math.ceil(matrice_laby.length / 2)) { applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 1, case_x, case_y); } ++case_y; } ++case_x; } angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 18); break; case 6: matrice_laby = creation_matrice(matrice_laby, 29); motif_num = 0; while (motif_num < 7) { applique_masque(matrice_laby, motif_grec_x, motif_grec_y, 1, 1, 4 * motif_num, 8); applique_masque(matrice_laby, motif_grec_x, motif_grec_y, 1, 1, 4 * motif_num, 18); ++motif_num; } angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 21); break; case 7: matrice_laby = creation_matrice(matrice_laby, 32); applique_masque(matrice_laby, masque_mario_x, masque_mario_y, 2, 2, 7, 4); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, 2, 2); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, matrice_laby.length - 4, 2); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, 2, matrice_laby.length - 4); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, matrice_laby.length - 4, matrice_laby.length - 4); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 19); break; case 8: matrice_laby = creation_matrice(matrice_laby, 32); applique_masque(matrice_laby, masque_point_x, masque_point_y, 12, 1, 10, 10); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 12, 10, 10); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 12, 21, 21); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 19); break; case 9: matrice_laby = creation_matrice(matrice_laby, 33); rayon = 23; case_x = 0; while (case_x < matrice_laby.length) { case_y = 0; while (case_y < matrice_laby.length) { distance = Math.sqrt(Math.pow(Math.floor(matrice_laby.length / 2) - case_x, 2) + Math.pow(Math.floor(matrice_laby.length / 2) - case_y, 2)); if (distance <= 3 || case_x != Math.floor(matrice_laby.length / 2) - 1 && case_x != Math.floor(matrice_laby.length / 2) && case_x != Math.floor(matrice_laby.length / 2) + 1 && case_y != Math.floor(matrice_laby.length / 2) - 1 && case_y != Math.floor(matrice_laby.length / 2) && case_y != Math.floor(matrice_laby.length / 2) + 1 && distance < Math.ceil(rayon / 2) && distance > Math.ceil(rayon / 2) - 2) { applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 1, case_x, case_y); } ++case_y; } ++case_x; } angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 19); break; case 10: matrice_laby = creation_matrice(matrice_laby, 34); i = 0; while (i < matrice_laby.length) { j = 0; while (j < matrice_laby.length) { if (i < matrice_laby.length - 1 - j && i < j || i > matrice_laby.length - 1 - j && i > j) { matrice_laby[i][j][4] = true; } ++j; } ++i; } angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 18); break; case 11: taille_salle = 10; taille_ouverture = 2; matrice_laby = creation_matrice(matrice_laby, 3 * taille_salle + 2); applique_masque(matrice_laby, masque_point_x, masque_point_y, (taille_salle - taille_ouverture) / 2, 1, 0, taille_salle); applique_masque(matrice_laby, masque_point_x, masque_point_y, taille_salle + 1 - taille_ouverture, 1, (taille_salle + taille_ouverture) / 2, taille_salle); applique_masque(matrice_laby, masque_point_x, masque_point_y, taille_salle + 1 - taille_ouverture, 1, (3 * taille_salle + taille_ouverture) / 2 + 1, taille_salle); applique_masque(matrice_laby, masque_point_x, masque_point_y, (taille_salle - taille_ouverture) / 2, 1, 3 * taille_salle + 2 - (taille_salle - taille_ouverture) / 2, taille_salle); applique_masque(matrice_laby, masque_point_x, masque_point_y, (taille_salle - taille_ouverture) / 2, 1, 0, taille_salle * 2 + 1); applique_masque(matrice_laby, masque_point_x, masque_point_y, taille_salle + 1 - taille_ouverture, 1, (taille_salle + taille_ouverture) / 2, taille_salle * 2 + 1); applique_masque(matrice_laby, masque_point_x, masque_point_y, taille_salle + 1 - taille_ouverture, 1, (3 * taille_salle + taille_ouverture) / 2 + 1, taille_salle * 2 + 1); applique_masque(matrice_laby, masque_point_x, masque_point_y, (taille_salle - taille_ouverture) / 2, 1, 3 * taille_salle + 2 - (taille_salle - taille_ouverture) / 2, taille_salle * 2 + 1); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, (taille_salle - taille_ouverture) / 2, taille_salle, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, taille_salle + 1 - taille_ouverture, taille_salle, (taille_salle + taille_ouverture) / 2); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, taille_salle + 1 - taille_ouverture, taille_salle, (3 * taille_salle + taille_ouverture) / 2 + 1); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, (taille_salle - taille_ouverture) / 2, taille_salle, 3 * taille_salle + 2 - (taille_salle - taille_ouverture) / 2); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, (taille_salle - taille_ouverture) / 2, taille_salle * 2 + 1, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, taille_salle + 1 - taille_ouverture, taille_salle * 2 + 1, (taille_salle + taille_ouverture) / 2); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, taille_salle + 1 - taille_ouverture, taille_salle * 2 + 1, (3 * taille_salle + taille_ouverture) / 2 + 1); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, (taille_salle - taille_ouverture) / 2, taille_salle * 2 + 1, 3 * taille_salle + 2 - (taille_salle - taille_ouverture) / 2); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, Math.floor(620 / (3 * taille_salle + 2))); break; case 12: matrice_laby = creation_matrice(matrice_laby, 33); ligne = 0; while (ligne < 6) { applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, 3, 3 + ligne * 5); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, matrice_laby.length - 5, 3 + ligne * 5); ++ligne; } applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 21, 8, 6); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 21, 23, 6); colonne = 2; while (colonne < 4) { applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, 3 + colonne * 5, 6); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 2, 3 + colonne * 5, matrice_laby.length - 8); ++colonne; } applique_masque(matrice_laby, masque_point_x, masque_point_y, 4, 3, 10, 15); applique_masque(matrice_laby, masque_point_x, masque_point_y, 4, 3, 19, 15); angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 18); break; case 13: matrice_laby = creation_matrice(matrice_laby, 34); if (angle_depart_courant < 2) { applique_masque(matrice_laby, masque_point_x, masque_point_y, 27, 2, 0, 16); applique_masque(matrice_laby, masque_point_x, masque_point_y, 5, 1, 0, 18); applique_masque(matrice_laby, masque_point_x, masque_point_y, 3, 1, 0, 19); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 1, 0, 20); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 2, 0, 21); symetrie_verticale(matrice_laby); applique_masque(matrice_laby, masque_point_x, masque_point_y, 5, 1, 0, 18); applique_masque(matrice_laby, masque_point_x, masque_point_y, 3, 1, 0, 19); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 1, 0, 20); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 2, 0, 21); symetrie_horizontale(matrice_laby); if (angle_depart_courant == 0) { angle_arrivee_courant = 1; } else { angle_arrivee_courant = 0; } } else { applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 27, 16, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 5, 18, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 3, 19, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 2, 20, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 1, 21, 0); symetrie_horizontale(matrice_laby); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 5, 18, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 3, 19, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 1, 2, 20, 0); applique_masque(matrice_laby, masque_point_x, masque_point_y, 2, 1, 21, 0); if (angle_depart_courant == 2) { symetrie_verticale(matrice_laby); angle_arrivee_courant = 1; } if (angle_depart_courant == 3) { angle_arrivee_courant = 0; } } genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 18); break; case 14: matrice_laby = creation_matrice(matrice_laby, 34); applique_masque(matrice_laby, masque_interrogation_x, masque_interrogation_y, 3, 3, 5, 6); angle_arrivee_courant = 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, 18); break; case nb_niveaux - 1: matrice_laby = creation_matrice(matrice_laby, 23); confirme_mur_ES(matrice_laby, 0, 0, false, false); confirme_mur_ES(matrice_laby, 2, 0, false, false); confirme_mur_ES(matrice_laby, 3, 0, false, true); confirme_mur_ES(matrice_laby, 4, 0, false, true); confirme_mur_ES(matrice_laby, 5, 0, false, true); confirme_mur_ES(matrice_laby, 6, 0, false, true); confirme_mur_ES(matrice_laby, 7, 0, true, false); confirme_mur_ES(matrice_laby, 9, 0, true, false); confirme_mur_ES(matrice_laby, 10, 0, false, true); confirme_mur_ES(matrice_laby, 11, 0, false, true); confirme_mur_ES(matrice_laby, 0, 1, true, false); confirme_mur_ES(matrice_laby, 1, 1, false, false); confirme_mur_ES(matrice_laby, 2, 1, false, false); confirme_mur_ES(matrice_laby, 3, 1, false, false); confirme_mur_ES(matrice_laby, 4, 1, false, true); confirme_mur_ES(matrice_laby, 5, 1, false, false); confirme_mur_ES(matrice_laby, 6, 1, true, false); confirme_mur_ES(matrice_laby, 7, 1, true, false); confirme_mur_ES(matrice_laby, 8, 1, false, false); confirme_mur_ES(matrice_laby, 9, 1, false, true); confirme_mur_ES(matrice_laby, 10, 1, false, true); confirme_mur_ES(matrice_laby, 11, 1, false, false); confirme_mur_ES(matrice_laby, 0, 2, true, false); confirme_mur_ES(matrice_laby, 1, 2, true, false); confirme_mur_ES(matrice_laby, 2, 2, true, false); confirme_mur_ES(matrice_laby, 3, 2, true, false); confirme_mur_ES(matrice_laby, 4, 2, false, false); confirme_mur_ES(matrice_laby, 5, 2, true, false); confirme_mur_ES(matrice_laby, 6, 2, true, false); confirme_mur_ES(matrice_laby, 7, 2, true, false); confirme_mur_ES(matrice_laby, 8, 2, true, false); confirme_mur_ES(matrice_laby, 9, 2, false, false); confirme_mur_ES(matrice_laby, 11, 2, true, false); confirme_mur_ES(matrice_laby, 1, 3, true, false); confirme_mur_ES(matrice_laby, 2, 3, true, false); confirme_mur_ES(matrice_laby, 3, 3, true, false); confirme_mur_ES(matrice_laby, 4, 3, false, false); confirme_mur_ES(matrice_laby, 6, 3, true, false); confirme_mur_ES(matrice_laby, 7, 3, true, false); confirme_mur_ES(matrice_laby, 8, 3, true, false); confirme_mur_ES(matrice_laby, 10, 3, false, false); confirme_mur_ES(matrice_laby, 11, 3, false, true); confirme_mur_ES(matrice_laby, 0, 4, false, true); confirme_mur_ES(matrice_laby, 1, 4, true, false); confirme_mur_ES(matrice_laby, 2, 4, true, false); confirme_mur_ES(matrice_laby, 3, 4, false, true); confirme_mur_ES(matrice_laby, 4, 4, false, true); confirme_mur_ES(matrice_laby, 5, 4, false, true); confirme_mur_ES(matrice_laby, 6, 4, false, true); confirme_mur_ES(matrice_laby, 7, 4, true, false); confirme_mur_ES(matrice_laby, 8, 4, false, false); confirme_mur_ES(matrice_laby, 10, 4, true, false); confirme_mur_ES(matrice_laby, 0, 5, true, false); confirme_mur_ES(matrice_laby, 1, 5, true, false); confirme_mur_ES(matrice_laby, 2, 5, false, true); confirme_mur_ES(matrice_laby, 3, 5, false, true); confirme_mur_ES(matrice_laby, 4, 5, false, true); confirme_mur_ES(matrice_laby, 5, 5, false, true); confirme_mur_ES(matrice_laby, 6, 5, false, false); confirme_mur_ES(matrice_laby, 8, 5, true, false); confirme_mur_ES(matrice_laby, 9, 5, false, false); confirme_mur_ES(matrice_laby, 10, 5, false, true); confirme_mur_ES(matrice_laby, 11, 5, false, false); confirme_mur_ES(matrice_laby, 0, 6, true, false); confirme_mur_ES(matrice_laby, 1, 6, false, false); confirme_mur_ES(matrice_laby, 2, 6, false, true); confirme_mur_ES(matrice_laby, 3, 6, false, true); confirme_mur_ES(matrice_laby, 4, 6, false, true); confirme_mur_ES(matrice_laby, 5, 6, true, false); confirme_mur_ES(matrice_laby, 6, 6, true, false); confirme_mur_ES(matrice_laby, 7, 6, false, true); confirme_mur_ES(matrice_laby, 8, 6, true, false); confirme_mur_ES(matrice_laby, 9, 6, true, false); confirme_mur_ES(matrice_laby, 11, 6, true, false); confirme_mur_ES(matrice_laby, 0, 7, true, false); confirme_mur_ES(matrice_laby, 1, 7, true, false); confirme_mur_ES(matrice_laby, 2, 7, false, true); confirme_mur_ES(matrice_laby, 3, 7, false, true); confirme_mur_ES(matrice_laby, 5, 7, true, false); confirme_mur_ES(matrice_laby, 6, 7, false, false); confirme_mur_ES(matrice_laby, 8, 7, true, false); confirme_mur_ES(matrice_laby, 9, 7, false, true); confirme_mur_ES(matrice_laby, 10, 7, false, false); confirme_mur_ES(matrice_laby, 11, 7, false, false); confirme_mur_ES(matrice_laby, 1, 8, false, true); confirme_mur_ES(matrice_laby, 2, 8, false, true); confirme_mur_ES(matrice_laby, 3, 8, false, true); confirme_mur_ES(matrice_laby, 4, 8, false, true); confirme_mur_ES(matrice_laby, 5, 8, true, false); confirme_mur_ES(matrice_laby, 6, 8, false, true); confirme_mur_ES(matrice_laby, 7, 8, false, true); confirme_mur_ES(matrice_laby, 9, 8, true, false); confirme_mur_ES(matrice_laby, 10, 8, false, true); confirme_mur_ES(matrice_laby, 11, 8, false, true); confirme_mur_ES(matrice_laby, 9, 9, false, false); confirme_mur_ES(matrice_laby, 10, 9, false, false); confirme_mur_ES(matrice_laby, 11, 9, false, true); confirme_mur_ES(matrice_laby, 9, 10, false, true); confirme_mur_ES(matrice_laby, 11, 10, true, false); confirme_mur_ES(matrice_laby, 9, 11, false, false); confirme_mur_ES(matrice_laby, 10, 11, false, true); confirme_mur_ES(matrice_laby, 11, 11, false, false); confirme_mur_ES(matrice_laby, 9, 12, true, false); confirme_mur_ES(matrice_laby, 11, 12, true, false); confirme_mur_ES(matrice_laby, 9, 13, false, false); confirme_mur_ES(matrice_laby, 10, 13, false, true); confirme_mur_ES(matrice_laby, 11, 13, false, false); confirme_mur_ES(matrice_laby, 9, 14, true, false); confirme_mur_ES(matrice_laby, 11, 14, true, false); confirme_mur_ES(matrice_laby, 9, 15, false, false); confirme_mur_ES(matrice_laby, 10, 15, false, true); confirme_mur_ES(matrice_laby, 11, 15, false, false); confirme_mur_ES(matrice_laby, 9, 16, true, false); confirme_mur_ES(matrice_laby, 11, 16, true, false); confirme_mur_ES(matrice_laby, 9, 17, false, true); confirme_mur_ES(matrice_laby, 10, 17, false, true); confirme_mur_ES(matrice_laby, 11, 17, false, false); confirme_mur_ES(matrice_laby, 0, 9, false, false); confirme_mur_ES(matrice_laby, 1, 9, false, true); confirme_mur_ES(matrice_laby, 2, 9, true, false); confirme_mur_ES(matrice_laby, 3, 9, false, true); confirme_mur_ES(matrice_laby, 4, 9, false, true); confirme_mur_ES(matrice_laby, 0, 10, true, false); confirme_mur_ES(matrice_laby, 2, 10, true, false); confirme_mur_ES(matrice_laby, 3, 10, false, true); confirme_mur_ES(matrice_laby, 4, 10, false, true); confirme_mur_ES(matrice_laby, 0, 11, false, true); confirme_mur_ES(matrice_laby, 1, 11, false, true); confirme_mur_ES(matrice_laby, 2, 11, false, false); confirme_mur_ES(matrice_laby, 3, 11, false, true); confirme_mur_ES(matrice_laby, 4, 11, false, false); confirme_mur_ES(matrice_laby, 0, 12, false, true); confirme_mur_ES(matrice_laby, 2, 12, true, false); confirme_mur_ES(matrice_laby, 3, 12, false, false); confirme_mur_ES(matrice_laby, 4, 12, false, true); confirme_mur_ES(matrice_laby, 0, 13, false, false); confirme_mur_ES(matrice_laby, 1, 13, false, true); confirme_mur_ES(matrice_laby, 2, 13, true, false); confirme_mur_ES(matrice_laby, 3, 13, false, true); confirme_mur_ES(matrice_laby, 4, 13, false, false); confirme_mur_ES(matrice_laby, 0, 14, true, false); confirme_mur_ES(matrice_laby, 2, 14, false, false); confirme_mur_ES(matrice_laby, 3, 14, false, true); confirme_mur_ES(matrice_laby, 4, 14, false, true); confirme_mur_ES(matrice_laby, 0, 15, false, false); confirme_mur_ES(matrice_laby, 1, 15, false, false); confirme_mur_ES(matrice_laby, 2, 15, false, true); confirme_mur_ES(matrice_laby, 3, 15, true, false); confirme_mur_ES(matrice_laby, 4, 15, true, false); confirme_mur_ES(matrice_laby, 0, 16, true, false); confirme_mur_ES(matrice_laby, 1, 16, false, true); confirme_mur_ES(matrice_laby, 2, 16, true, false); confirme_mur_ES(matrice_laby, 3, 16, true, false); confirme_mur_ES(matrice_laby, 0, 17, false, true); confirme_mur_ES(matrice_laby, 1, 17, false, true); confirme_mur_ES(matrice_laby, 2, 17, false, true); confirme_mur_ES(matrice_laby, 3, 17, false, true); confirme_mur_ES(matrice_laby, 4, 17, false, true); confirme_mur_ES(matrice_laby, 9, 18, false, false); confirme_mur_ES(matrice_laby, 10, 18, false, true); confirme_mur_ES(matrice_laby, 11, 18, false, false); confirme_mur_ES(matrice_laby, 9, 19, true, false); confirme_mur_ES(matrice_laby, 10, 19, false, false); confirme_mur_ES(matrice_laby, 11, 19, false, true); confirme_mur_ES(matrice_laby, 9, 20, true, false); confirme_mur_ES(matrice_laby, 10, 20, true, false); confirme_mur_ES(matrice_laby, 9, 21, true, false); confirme_mur_ES(matrice_laby, 10, 21, false, true); confirme_mur_ES(matrice_laby, 11, 21, false, false); confirme_mur_ES(matrice_laby, 9, 22, false, true); confirme_mur_ES(matrice_laby, 10, 22, false, true); confirme_mur_ES(matrice_laby, 11, 22, false, true); confirme_mur_ES(matrice_laby, 0, 18, false, false); confirme_mur_ES(matrice_laby, 1, 18, false, true); confirme_mur_ES(matrice_laby, 2, 18, false, true); confirme_mur_ES(matrice_laby, 3, 18, false, false); confirme_mur_ES(matrice_laby, 4, 18, false, true); confirme_mur_ES(matrice_laby, 0, 19, true, false); confirme_mur_ES(matrice_laby, 1, 19, false, false); confirme_mur_ES(matrice_laby, 2, 19, false, true); confirme_mur_ES(matrice_laby, 3, 19, true, false); confirme_mur_ES(matrice_laby, 0, 20, false, false); confirme_mur_ES(matrice_laby, 1, 20, true, false); confirme_mur_ES(matrice_laby, 3, 20, false, false); confirme_mur_ES(matrice_laby, 4, 20, false, true); confirme_mur_ES(matrice_laby, 0, 21, true, false); confirme_mur_ES(matrice_laby, 1, 21, false, true); confirme_mur_ES(matrice_laby, 2, 21, false, true); confirme_mur_ES(matrice_laby, 3, 21, true, false); confirme_mur_ES(matrice_laby, 0, 22, false, true); confirme_mur_ES(matrice_laby, 1, 22, false, true); confirme_mur_ES(matrice_laby, 2, 22, false, true); confirme_mur_ES(matrice_laby, 3, 22, false, true); confirme_mur_ES(matrice_laby, 4, 22, false, true); matrice_laby[0][0][4] = true; matrice_laby[1][0][4] = true; matrice_laby[8][0][4] = true; matrice_laby[10][0][4] = true; matrice_laby[11][0][4] = true; matrice_laby[0][1][4] = true; matrice_laby[0][2][4] = true; matrice_laby[9][2][4] = true; matrice_laby[10][2][4] = true; matrice_laby[0][3][4] = true; matrice_laby[9][3][4] = true; matrice_laby[11][4][4] = true; matrice_laby[0][5][4] = true; matrice_laby[0][6][4] = true; matrice_laby[10][6][4] = true; matrice_laby[0][7][4] = true; matrice_laby[2][7][4] = true; matrice_laby[3][7][4] = true; matrice_laby[4][7][4] = true; matrice_laby[0][8][4] = true; matrice_laby[9][8][4] = true; matrice_laby[9][9][4] = true; matrice_laby[10][9][4] = true; matrice_laby[11][9][4] = true; matrice_laby[9][10][4] = true; matrice_laby[10][10][4] = true; matrice_laby[10][12][4] = true; matrice_laby[10][14][4] = true; matrice_laby[10][16][4] = true; matrice_laby[1][10][4] = true; matrice_laby[0][12][4] = true; matrice_laby[1][12][4] = true; matrice_laby[1][14][4] = true; matrice_laby[4][15][4] = true; matrice_laby[4][16][4] = true; matrice_laby[11][20][4] = true; matrice_laby[4][19][4] = true; matrice_laby[2][20][4] = true; matrice_laby[4][21][4] = true; i = 0; while (i <= 4) { j = 9; while (j < 23) { matrice_laby[8 - i][j][0] = matrice_laby[i][j][0]; matrice_laby[8 - i][j][1] = matrice_laby[i][j][3]; matrice_laby[8 - i][j][2] = matrice_laby[i][j][2]; matrice_laby[8 - i][j][3] = matrice_laby[i][j][1]; matrice_laby[8 - i][j][4] = matrice_laby[i][j][4]; ++j; } ++i; } matrice_laby[5][9][0] = false; confirme_mur_ES(matrice_laby, 2, 9, false, false); confirme_mur_ES(matrice_laby, 5, 9, true, false); confirme_mur_ES(matrice_laby, 3, 10, false, false); confirme_mur_ES(matrice_laby, 4, 17, false, false); confirme_mur_ES(matrice_laby, 8, 20, false, false); i = 0; while (i < Math.floor(matrice_laby.length / 2)) { j = 0; while (j <= Math.floor(matrice_laby.length)) { matrice_laby[matrice_laby.length - 1 - i][j][0] = matrice_laby[i][j][0]; matrice_laby[matrice_laby.length - 1 - i][j][1] = matrice_laby[i][j][3]; matrice_laby[matrice_laby.length - 1 - i][j][2] = matrice_laby[i][j][2]; matrice_laby[matrice_laby.length - 1 - i][j][3] = matrice_laby[i][j][1]; matrice_laby[matrice_laby.length - 1 - i][j][4] = matrice_laby[i][j][4]; ++j; } ++i; } depart_x = 11; depart_y = 10; arrivee_effective_x = -10; arrivee_effective_y = -10; largeur_case_minotaure = 26; affiche_maze(matrice_laby, largeur_case_minotaure); fosse.gotoAndStop(2); profondeur_minotaure = ennemi.getDepth(); removeMovieClip(ennemi); this.attachMovie('bibli_minotaure', 'ennemi', profondeur_minotaure); position_initiale_minotaure_x = 1; position_initiale_minotaure_y = 2; ennemi.position_x = position_initiale_minotaure_x; ennemi.position_y = position_initiale_minotaure_y; ennemi.direction_courante = 2; ennemi._x = taille_marge + taille_case * position_initiale_minotaure_x; ennemi._y = taille_marge + taille_case * position_initiale_minotaure_y; ennemi._width = taille_case; ennemi._height = taille_case; if (mode_jeu.indexOf('EASY') != -1) { ennemi.vitesse_marche = 8; ennemi.nb_etapes = 8; ennemi.vitesse_course = 5; } else { if (mode_jeu.indexOf('MODERATE') != -1) { ennemi.vitesse_marche = 7; ennemi.nb_etapes = 7; ennemi.vitesse_course = 4; } else { if (mode_jeu.indexOf('HARD') != -1) { ennemi.vitesse_marche = 6; ennemi.nb_etapes = 6; ennemi.vitesse_course = 3; } } } profondeur_chemin = chemin.getDepth(); removeMovieClip(chemin); _root.createEmptyMovieClip('chemin', profondeur_chemin); } } else { if (mode_jeu.indexOf('TINY') != -1) { matrice_laby = creation_matrice(matrice_laby, 12 + Math.floor(Math.random() * 5 + 1)); } else { if (mode_jeu.indexOf('MEDIUM') != -1) { matrice_laby = creation_matrice(matrice_laby, 22 + Math.floor(Math.random() * 5 + 1)); } else { if (mode_jeu.indexOf('LARGE') != -1) { matrice_laby = creation_matrice(matrice_laby, 32 + Math.floor(Math.random() * 5 + 1)); } } } angle_arrivee_courant = (angle_depart_courant + 2) % 4; genere(matrice_laby, angle_depart_courant, angle_arrivee_courant); affiche_maze(matrice_laby, Math.floor(620 / matrice_laby.length)); } if (niveau != nb_niveaux - 1) { nettoie_chemin_global(); recherche_DFS(matrice_laby, chemin_x, chemin_y, chemin_directions, depart_x, depart_y, arrivee_effective_x, arrivee_effective_y); affiche_chemin(matrice_laby, chemin_x, chemin_y); } chemin._alpha = 0; profondeur_heros = hero.getDepth(); removeMovieClip(hero); this.attachMovie('bibli_heros', 'heros', profondeur_heros); heros.pas_parite = 0; heros._x = depart_x * taille_case + taille_marge; heros._y = depart_y * taille_case + taille_marge; heros._width = taille_case; heros._height = taille_case; position_heros_x = depart_x; position_heros_y = depart_y; if (niveau != nb_niveaux - 1) { profondeur_griffon = ennemi.getDepth(); removeMovieClip(ennemi); this.attachMovie('bibli_griffon', 'ennemi', profondeur_griffon); ennemi._x = arrivee_effective_x * taille_case + taille_marge; ennemi._y = arrivee_effective_y * taille_case + taille_marge; ennemi._width = taille_case; ennemi._height = taille_case; ennemi.curseur = chemin_directions.length - 1; if (mode_jeu.indexOf('FOE') != -1) { ennemi.gotoAndStop(2); if (chemin_directions[chemin_directions.length - 2] == 1) { ennemi.personnage.gotoAndStop('GAUCHE'); } if (mode_jeu.indexOf('EASY') != -1) { ennemi.nb_etapes = 13; } else { if (mode_jeu.indexOf('MODERATE') != -1) { ennemi.nb_etapes = 10; } else { if (mode_jeu.indexOf('HARD') != -1) { ennemi.nb_etapes = 7; } } } } } timer_object._x = taille_swf - 5 - Math.ceil(taille_marge / 2); if (mode_jeu.indexOf('TIME') != -1 && niveau != nb_niveaux - 1) { timer_object.gotoAndStop(2); if (mode_jeu.indexOf('EASY') != -1) { timer_object.limite_temps = chemin_x.length / 1.7; } else { if (mode_jeu.indexOf('MODERATE') != -1) { timer_object.limite_temps = chemin_x.length / 2.9; } else { if (mode_jeu.indexOf('HARD') != -1) { timer_object.limite_temps = chemin_x.length / 4.1; } } } bouton.bouton_texte.gotoAndStop('TEMPS'); bouton.bouton_texte.texte.text = Math.floor(timer_object.limite_temps / 60) + '\''; temps_restant = timer_object.limite_temps - Math.floor(timer_object.limite_temps / 60) * 60; if (temps_restant < 10) { bouton.bouton_texte.texte.text += '0' + Math.floor(temps_restant) + '"'; } else { bouton.bouton_texte.texte.text += Math.floor(temps_restant) + '"'; } temps_restant = Math.floor((temps_restant - Math.floor(temps_restant)) * 100); if (temps_restant < 10) { bouton.bouton_texte.texte.text += '0' + Math.floor(temps_restant); } else { bouton.bouton_texte.texte.text += Math.floor(temps_restant); } bouton.bouton_texte.texte.text += '\nSTART'; } else { bouton.bouton_texte.gotoAndStop('START'); } } movieClip 194 { frame 1 { stop(); } frame 3 { temps = limite_temps; } frame 4 { if (!_root.jeu_on) { stop(); } } frame 5 { fil_timer.gotoAndStop(Math.ceil(227 - 227 * (temps / limite_temps))); temps -= 0.037; if (temps < 0) { _root.game_over(); stop(); } else { gotoAndPlay(4); } } } movieClip 199 { frame 1 { stop(); } } movieClip 202 { frame 1 { stop(); } frame 2 { stop(); } } frame 52 { Key.addListener(bouton_press); stop(); } button 203 { on (rollOver) { bouton.gotoAndStop(2); } on (rollOut) { bouton.gotoAndStop(1); } on (release) { real_bouton.useHandCursor = false; papier.start(0, 0); play(); } } frame 53 { Key.removeListener(bouton_press); } frame 73 { son_escaliers.start(0.2, 0); } frame 77 { jeu_on = true; i = 0; while (i < 4) { if (!matrice_laby[depart_x][depart_y][i]) { heros.gotoAndPlay('direction_' + i); matrice_laby[depart_x][depart_y][i] = true; switch (i) { case 0: matrice_laby[depart_x][depart_y - 1][(i + 2) % 4] = true; break; case 1: matrice_laby[depart_x + 1][depart_y][(i + 2) % 4] = true; break; case 2: matrice_laby[depart_x][depart_y + 1][(i + 2) % 4] = true; break; case 3: matrice_laby[depart_x - 1][depart_y][(i + 2) % 4] = true; } } ++i; } } frame 81 { Key.addListener(clavier); if (niveau != nb_niveaux - 1) { if (mode_jeu.indexOf('FOE') != -1) { ennemi.play(); sifflement_griffon.start(0, 0); } if (mode_jeu.indexOf('TIME') != -1) { timer_object.play(); } } else { ennemi.play(); } stop(); } frame 82 { jeu_on = false; heros.stop(); heros.thesee.stop(); ennemi.stop(); ennemi.personnage.stop(); Key.removeListener(clavier); vide_file(file_clavier); } movieClip 208 { frame 7 { gotoAndPlay(1); } } movieClip 210 { } movieClip 211 { frame 1 { stop(); } frame 5 { stop(); } frame 18 { stop(); } } frame 83 { if (position_heros_x == arrivee_effective_x && position_heros_y == arrivee_effective_y) { fin_OK.start(0, 0); } else { if (mode_jeu != 'WIN') { if (mode_jeu.indexOf('RANDOM') != -1) { mode_jeu = 'GAME_OVER'; } brouillage.play(); fin_death.start(0, 0); if (mode_jeu.indexOf('QUEST') != -1 && mode_jeu.indexOf('RANDOM') == -1 && mode_jeu.indexOf('FREE') == -1) { --vies; } } else { brouillage.gotoAndPlay('WIN'); fin_death.start(0, 0); } } } frame 84 { chemin._alpha += 5; } frame 85 { chemin._alpha += 5; } frame 86 { chemin._alpha += 5; } frame 87 { chemin._alpha += 5; } frame 88 { chemin._alpha += 5; } frame 89 { chemin._alpha += 5; } frame 90 { chemin._alpha += 5; } frame 91 { chemin._alpha += 5; } frame 92 { chemin._alpha += 5; } frame 93 { chemin._alpha += 5; } frame 94 { chemin._alpha += 5; } frame 95 { chemin._alpha += 5; } frame 96 { chemin._alpha += 5; } frame 96 { if (mode_jeu == 'WIN') { minotaure_mort.start(0, 0); } } frame 97 { chemin._alpha += 5; } frame 98 { chemin._alpha += 5; } frame 99 { chemin._alpha += 5; } frame 100 { chemin._alpha += 5; } frame 101 { chemin._alpha += 5; } frame 102 { chemin._alpha += 5; } frame 103 { chemin._alpha += 5; } frame 104 { chemin._alpha -= 5; } frame 105 { chemin._alpha -= 5; } frame 106 { chemin._alpha -= 5; } frame 107 { chemin._alpha -= 5; } frame 108 { chemin._alpha -= 5; } frame 109 { chemin._alpha -= 5; } frame 110 { chemin._alpha -= 5; } frame 111 { chemin._alpha -= 5; } frame 112 { chemin._alpha -= 5; } frame 113 { chemin._alpha -= 5; } frame 114 { chemin._alpha -= 5; } frame 115 { chemin._alpha -= 5; } frame 116 { chemin._alpha -= 5; } frame 117 { chemin._alpha -= 5; } frame 118 { chemin._alpha -= 5; } frame 119 { chemin._alpha -= 5; } frame 120 { chemin._alpha -= 5; } frame 121 { chemin._alpha -= 5; } frame 122 { chemin._alpha -= 5; } frame 123 { chemin._alpha -= 5; } frame 132 { if (position_heros_x == arrivee_effective_x && position_heros_y == arrivee_effective_y) { son_escaliers.start(0, 0); ++niveau; angle_depart_courant = angle_arrivee_courant; } } frame 134 { if (position_heros_x == arrivee_effective_x && position_heros_y == arrivee_effective_y) { i = 0; while (i < 4) { if (!matrice_laby[arrivee_x][arrivee_y][i]) { heros.gotoAndPlay('direction_' + (i + 2) % 4); } ++i; } } } frame 135 { if (mode_jeu == 'STOP') { jeu_on = false; Key.removeListener(clavier); vide_file(file_clavier); } } frame 143 { if (mode_jeu == 'QUEST_FREE' && niveau == nb_niveaux - 1) { gotoAndPlay('CONGRATULATIONS_FREE'); } else { if (mode_jeu.indexOf('QUEST') != -1 && mode_jeu.indexOf('RANDOM') == -1) { if (vies == -1) { mode_jeu = 'GAME_OVER'; } else { gotoAndPlay('JEU'); } } } } frame 151 { fosse.gotoAndStop(1); if (mode_jeu == 'GAME_OVER') { gotoAndPlay('GAME_OVER'); } else { if (mode_jeu == 'WIN') { gotoAndPlay('WIN'); } else { if (mode_jeu.indexOf('RANDOM') == -1) { gotoAndPlay('MENU'); } else { gotoAndPlay('CONGRATULATIONS_RANDOM'); } } } } frame 253 { gotoAndPlay('MENU'); } movieClip 218 { } frame 355 { gotoAndPlay('MENU'); } movieClip 222 { } frame 677 { gotoAndPlay('MENU'); } movieClip 228 { frame 1 { stop(); } } movieClip 238 { frame 1 { stop(); } frame 232 { texte.gotoAndStop(texte._currentframe + 1); } frame 474 { texte.gotoAndStop(texte._currentframe + 1); } frame 716 { texte.gotoAndStop(texte._currentframe + 1); } frame 958 { texte.gotoAndStop(texte._currentframe + 1); } frame 1189 { _root.play(); stop(); } } frame 689 { cinematique.play(); stop(); } frame 710 { gotoAndPlay('MENU'); }




http://swfchan.com/43/210082/info.shtml
Created: 8/10 -2018 11:55:37 Last modified: 8/10 -2018 11:55:37 Server time: 06/05 -2024 14:20:51